motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit 79b868d504f2b9c583a84c784a2f6197ac91bc25 (tree)
parent b20cee586c6bd1cbc0c5364e8ebe5ae7ecf0ca1f
Author: antlilja <liljaanton2001@gmail.com>
Date:   Sun, 17 Mar 2024 16:26:28 +0100

LLVM: Use fast math when requested

Diffstat:
Msrc/codegen/llvm/Builder.zig | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/codegen/llvm/Builder.zig b/src/codegen/llvm/Builder.zig @@ -14727,7 +14727,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co .@"notail call fast" => .{ .no_tail = true, .call_conv = call_conv }, else => unreachable, }, - .fast_math = .{}, + .fast_math = FastMath.fast, .type_id = extra.data.ty, .callee = extra.data.callee, .args = args, @@ -14786,7 +14786,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co .opcode = kind.toBinaryOpcode(), .lhs = adapter.getOffsetValueIndex(extra.lhs), .rhs = adapter.getOffsetValueIndex(extra.rhs), - .fast_math = .{}, + .fast_math = FastMath.fast, }); }, .alloca, @@ -14884,7 +14884,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co .lhs = adapter.getOffsetValueIndex(extra.lhs), .rhs = adapter.getOffsetValueIndex(extra.rhs), .pred = kind.toCmpPredicate(), - .fast_math = .{}, + .fast_math = FastMath.fast, }); }, .fneg => try function_block.writeAbbrev(FunctionBlock.FNeg{ @@ -14892,7 +14892,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co }), .@"fneg fast" => try function_block.writeAbbrev(FunctionBlock.FNegFast{ .val = adapter.getOffsetValueIndex(@enumFromInt(datas[instr_index])), - .fast_math = .{}, + .fast_math = FastMath.fast, }), .extractvalue => { var extra = func.extraDataTrail(Function.Instruction.ExtractValue, datas[instr_index]); @@ -14940,7 +14940,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co .lhs = adapter.getOffsetValueIndex(extra.lhs), .rhs = adapter.getOffsetValueIndex(extra.rhs), .cond = adapter.getOffsetValueIndex(extra.cond), - .fast_math = .{}, + .fast_math = FastMath.fast, }); }, .shufflevector => {