From c641fb8f05cfbca7484a09496f33bc9c2d95941e Mon Sep 17 00:00:00 2001 From: William Sengir Date: Sat, 26 Mar 2022 15:40:31 -0700 Subject: stage2: fix {add,sub,mul}_with_overflow vectorization in LLVM backend --- src/codegen/llvm.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3