diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-10 19:34:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-10 19:34:43 -0500 |
| commit | 892fb0fc8830007542381fe845e618dc47493622 (patch) | |
| tree | f36c0b2a945a20e1e04347f97fdd84a31f037652 /src/type.zig | |
| parent | e40c38d258800cd555a4b53af8c711886ca0d38d (diff) | |
| parent | 7b978bf1e05727f15fc83ae7d2455c08833cc439 (diff) | |
| download | zig-892fb0fc8830007542381fe845e618dc47493622.tar.gz zig-892fb0fc8830007542381fe845e618dc47493622.zip | |
Merge pull request #13074 from topolarity/stage2-opt
stage2: Miscellaneous fixes to vector arithmetic and copy elision
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/type.zig b/src/type.zig index 12c969eaec..f24c89ef6f 100644 --- a/src/type.zig +++ b/src/type.zig @@ -5463,13 +5463,13 @@ pub const Type = extern union { } const S = struct { fn fieldWithRange(int_ty: Type, int_val: Value, end: usize, m: *Module) ?usize { - if (int_val.compareWithZero(.lt)) return null; + if (int_val.compareAllWithZero(.lt)) return null; var end_payload: Value.Payload.U64 = .{ .base = .{ .tag = .int_u64 }, .data = end, }; const end_val = Value.initPayload(&end_payload.base); - if (int_val.compare(.gte, end_val, int_ty, m)) return null; + if (int_val.compareAll(.gte, end_val, int_ty, m)) return null; return @intCast(usize, int_val.toUnsignedInt(m.getTarget())); } }; @@ -6455,12 +6455,12 @@ pub const Type = extern union { if (!d.mutable and d.pointee_type.eql(Type.u8, mod)) { switch (d.size) { .Slice => { - if (sent.compareWithZero(.eq)) { + if (sent.compareAllWithZero(.eq)) { return Type.initTag(.const_slice_u8_sentinel_0); } }, .Many => { - if (sent.compareWithZero(.eq)) { + if (sent.compareAllWithZero(.eq)) { return Type.initTag(.manyptr_const_u8_sentinel_0); } }, |
