diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-07-30 17:40:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-07-30 17:40:30 -0700 |
| commit | 6e78c007dff96de98c44c52da890cdae3d6e1389 (patch) | |
| tree | f01868c88c8a045906a0b868243b5df094afe3c6 /src/codegen.zig | |
| parent | 507dc1f2e7fac212e79f152e557cbec98a3c30e9 (diff) | |
| download | zig-6e78c007dff96de98c44c52da890cdae3d6e1389.tar.gz zig-6e78c007dff96de98c44c52da890cdae3d6e1389.zip | |
Sema: improved AIR when one operand of bool cmp is known
When doing `x == true` or `x == false` it is now lowered as either a
no-op or a not, respectively, rather than a cmp instruction.
This commit also extracts a zirCmpEq function out from zirCmp, reducing
the amount of branching (on is_equality_cmp) in both functions.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
