# stage1: Make \`x and false\`/\`x or true\` comptime-known · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2f732deb3d15752d4977f04b38718e6896460e69)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2f732deb3d15752d4977f04b38718e6896460e69

Requested commit: 2f732deb3d15752d4977f04b38718e6896460e69

Commit: 2f732deb3d15752d4977f04b38718e6896460e69

Tree: 89debe4afe10b7d48a207ff07066218493dac53a

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
stage1: Make `x and false`/`x or true` comptime-known

We need to be careful to respect side-effects/branching in these
cases, but otherwise this behaves very similarly to multiplication.
`lhs and rhs == false` if either lhs or rhs is comptime-known `false`,
just like `lhs * rhs == 0` if either lhs or rhs is comptime-known to
be zero.

Similar reasoning applies to `lhs or rhs`.

```

## Parents

- [1696434063dd6b09af93fbab04727f91397e2e00](https://git.cafe/gitcafe/zig/commit/1696434063dd6b09af93fbab04727f91397e2e00?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2f732deb3d15752d4977f04b38718e6896460e69?format=markdown)
