aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-01-13 10:42:38 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-01-13 10:42:38 -0700
commitc5ee73f65b4c77fe08aa44b8611bf084ae700f24 (patch)
treeaca72ec5f4fe45695bf7eea6bb288ee2f3ef27e9 /src/codegen/llvm.zig
parent9bf2bda68356212168a213141e0a21d9dab22655 (diff)
downloadzig-c5ee73f65b4c77fe08aa44b8611bf084ae700f24.tar.gz
zig-c5ee73f65b4c77fe08aa44b8611bf084ae700f24.zip
stage2: fix build on 32-bit ISAs
Fixes regression introduced in 93b854eb745ab3294054ae71150fe60f134f4d10.
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 7b94410912..7858fa76fa 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -873,7 +873,7 @@ pub const DeclGen = struct {
},
.Vector => {
const elem_type = try dg.llvmType(t.childType());
- return elem_type.vectorType(@intCast(c_uint, t.arrayLen()));
+ return elem_type.vectorType(t.vectorLen());
},
.Optional => {
var buf: Type.Payload.ElemType = undefined;
@@ -4170,7 +4170,7 @@ pub const FuncGen = struct {
const target = self.dg.module.getTarget();
const bits = operand_ty.intInfo(target).bits;
const vec_len: ?u32 = switch (operand_ty.zigTypeTag()) {
- .Vector => @intCast(u32, operand_ty.arrayLen()),
+ .Vector => operand_ty.vectorLen(),
else => null,
};
@@ -4372,7 +4372,7 @@ pub const FuncGen = struct {
const scalar = try self.resolveInst(ty_op.operand);
const scalar_ty = self.air.typeOf(ty_op.operand);
const vector_ty = self.air.typeOfIndex(inst);
- const len = @intCast(u32, vector_ty.arrayLen());
+ const len = vector_ty.vectorLen();
const scalar_llvm_ty = try self.dg.llvmType(scalar_ty);
const op_llvm_ty = scalar_llvm_ty.vectorType(1);
const u32_llvm_ty = self.context.intType(32);