-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.14.0-dev.3213+53216d2f2
Steps to Reproduce and Observed Behavior
I found this while trying to build https://github.com/ziglang/translate-c without llvm/lld. This most likely regressed from #22873, as I could compile translate-c yesterday without llvm/lld.
Create the following test.zig
file:
const std = @import("std");
test {
// This works for f16, f32, and f64.
// Both f80 and f128 fail to encode, though.
_ = try std.fmt.parseFloat(f80, "1.0");
_ = try std.fmt.parseFloat(f128, "1.0");
}
Now, test the executable in an unsafe release mode (ReleaseFast or ReleaseSmall):
$ zig test test.zig -fno-llvm -fno-lld -OReleaseSmall
error(x86_64_encoder): no encoding found for: none mul ymm none none none
/home/sno2/projects/zig/lib/std/fmt/parse_float/decimal.zig:186:13: error: emit MIR failed: InvalidInstruction (Zig compiler bug)
pub fn rightShift(self: *Self, shift: usize) void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ zig test test.zig -fno-llvm -fno-lld -OReleaseSmall
error(x86_64_encoder): no encoding found for: none mul ymm none none none
/home/sno2/projects/zig/lib/std/fmt/parse_float/decimal.zig:186:13: error: emit MIR failed: InvalidInstruction (Zig compiler bug)
pub fn rightShift(self: *Self, shift: usize) void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks
Expected Behavior
The test should run and pass like when in Debug mode:
$ zig test test.zig -fno-llvm -fno-lld
All 1 tests passed.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior