diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-23 14:32:13 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-23 14:32:13 -0400 |
| commit | 5a919dd82d798c489219ea60a59f1c0ea3fc3956 (patch) | |
| tree | 4fd8ca25bfa73d842b803353a8aa80a510072829 /src-self-hosted | |
| parent | 10d2f08d376a302bd79e87d17c06922d3145a939 (diff) | |
| parent | 99153ac0aa390f01091308073b39947c45851ae6 (diff) | |
| download | zig-5a919dd82d798c489219ea60a59f1c0ea3fc3956.tar.gz zig-5a919dd82d798c489219ea60a59f1c0ea3fc3956.zip | |
Merge remote-tracking branch 'origin/master' into self-hosted-libc-hello-world
Diffstat (limited to 'src-self-hosted')
| -rw-r--r-- | src-self-hosted/ir.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src-self-hosted/ir.zig b/src-self-hosted/ir.zig index d624fe4dac..c34f06753d 100644 --- a/src-self-hosted/ir.zig +++ b/src-self-hosted/ir.zig @@ -2172,8 +2172,7 @@ const Analyze = struct { break :fits true; } if (dest_type.cast(Type.Int)) |int| { - break :fits (from_int.positive or from_int.eqZero() or int.key.is_signed) and - int.key.bit_count >= from_int.bitcount(); + break :fits from_int.fitsInTwosComp(int.key.is_signed, int.key.bit_count); } break :cast; }; |
