aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index df7f05948d..049f7bfad6 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -5218,6 +5218,7 @@ pub const FuncGen = struct {
const ty = self.air.typeOfIndex(inst);
const llvm_ty = try self.dg.llvmType(ty);
+ const scalar_ty = ty.scalarType();
const target = self.dg.module.getTarget();
const Strat = union(enum) {
@@ -5225,11 +5226,6 @@ pub const FuncGen = struct {
libc: [*:0]const u8,
};
- const scalar_ty = if (ty.zigTypeTag() == .Vector)
- ty.elemType()
- else
- ty;
-
const strat: Strat = switch (scalar_ty.floatBits(target)) {
16, 32, 64 => Strat.intrinsic,
80 => if (CType.longdouble.sizeInBits(target) == 80) Strat{ .intrinsic = {} } else Strat{ .libc = "__fmax" },