mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 08:14:48 +00:00
stage2: simplify scalar_ty for mul_add in LLVM backend
This commit is contained in:
parent
6a48345649
commit
adc2824fa4
@ -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" },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user