aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Sengir <william@sengir.com>2022-03-26 15:40:31 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-05-16 13:55:26 -0700
commitc641fb8f05cfbca7484a09496f33bc9c2d95941e (patch)
tree200a05dd786f10e10b25ee5f810c0199913c2b6a
parent5b03d55c5ecf697086db7c454e0f3982fec42408 (diff)
downloadzig-c641fb8f05cfbca7484a09496f33bc9c2d95941e.tar.gz
zig-c641fb8f05cfbca7484a09496f33bc9c2d95941e.zip
stage2: fix {add,sub,mul}_with_overflow vectorization in LLVM backend
-rw-r--r--src/codegen/llvm.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 5a8516b363..3e15bd8d9a 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -5604,8 +5604,9 @@ pub const FuncGen = struct {
const rhs = try self.resolveInst(extra.rhs);
const lhs_ty = self.air.typeOf(extra.lhs);
+ const scalar_ty = lhs_ty.scalarType();
- const intrinsic_name = if (lhs_ty.isSignedInt()) signed_intrinsic else unsigned_intrinsic;
+ const intrinsic_name = if (scalar_ty.isSignedInt()) signed_intrinsic else unsigned_intrinsic;
const llvm_lhs_ty = try self.dg.llvmType(lhs_ty);