diff options
| author | Justus Klausecker <justus@klausecker.de> | 2025-08-09 02:33:25 +0200 |
|---|---|---|
| committer | Justus Klausecker <justus@klausecker.de> | 2025-08-12 16:33:58 +0200 |
| commit | 277e4a8337b233a5d74f8f5b74d606210cf6fd97 (patch) | |
| tree | ea76b3852a13b15dd809157383d4a468730d6250 /src/Sema | |
| parent | 4ec421372f1d8dba8a2221d2ea9c774cdbefbe9d (diff) | |
| download | zig-277e4a8337b233a5d74f8f5b74d606210cf6fd97.tar.gz zig-277e4a8337b233a5d74f8f5b74d606210cf6fd97.zip | |
fix: emit vector instead of scalar u1_zero in shl_with_overflow logic
Diffstat (limited to 'src/Sema')
| -rw-r--r-- | src/Sema/arith.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Sema/arith.zig b/src/Sema/arith.zig index 7fbcb97085..c646dc7b21 100644 --- a/src/Sema/arith.zig +++ b/src/Sema/arith.zig @@ -1895,10 +1895,10 @@ fn intShlWithOverflow( const info = lhs_ty.intInfo(zcu); var lhs_space: Value.BigIntSpace = undefined; - const lhs_bigint = lhs.toBigInt(&lhs_space, zcu); + const lhs_bigint = try lhs.toBigIntSema(&lhs_space, pt); const shift_amt: usize = @intCast(try rhs.toUnsignedIntSema(pt)); - if (shift_amt >= lhs_ty.intInfo(zcu).bits) { + if (shift_amt >= info.bits) { return sema.failWithTooLargeShiftAmount(block, lhs_ty, rhs, rhs_src, vec_idx); } var result_bigint = try intShlInner(sema, lhs_bigint, shift_amt); |
