-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
arch-loongarch32-bit and 64-bit LoongArch32-bit and 64-bit LoongArchbackend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorupstreamAn issue with a third party project that Zig uses.An issue with a third party project that Zig uses.
Milestone
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
const std = @import("std");
test {
var a: f16 = 42.0;
_ = &a;
var b: i32 = @intFromFloat(a);
_ = &b;
try std.testing.expect(b == 42);
}
$ zig test test.zig -target loongarch64-linux-musl
LLVM ERROR: Cannot select: 0x7fb49a509b20: i64 = fp_to_fp16 0x7fb49956ba80
0x7fb49956ba80: f32,ch = CopyFromReg 0x7fb4999973e0, Register:f32 %11
0x7fb49956f010: f32 = Register %11
In function: __fixhfsi
Aborted (core dumped)
Expected Behavior
all 1 tests passed
Metadata
Metadata
Assignees
Labels
arch-loongarch32-bit and 64-bit LoongArch32-bit and 64-bit LoongArchbackend-llvmThe LLVM backend outputs an LLVM IR Module.The LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorupstreamAn issue with a third party project that Zig uses.An issue with a third party project that Zig uses.