https://bugs.llvm.org/show_bug.cgi?id=47000

            Bug ID: 47000
           Summary: regression with i386-linux vectors of f16
           Product: libraries
           Version: 11.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: and...@ziglang.org
                CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
                    llvm-...@redking.me.uk, spatel+l...@rotateright.com

Created attachment 23817
  --> https://bugs.llvm.org/attachment.cgi?id=23817&action=edit
test.ll

// Zig code:


const std = @import("std");
const Vector = std.meta.Vector;

pub fn main() noreturn {
    doTheTestMod(f16, [4]f16{ 4.0, -4.0, 4.0, -4.0 }, [4]f16{ 1.0, 2.0, 0.5,
3.0 });
    std.process.exit(0);
}

fn doTheTestMod(comptime T: type, x: Vector(4, T), y: Vector(4, T)) void {
    const r1 = @mod(x, y);
}

pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace)
noreturn {
    std.process.exit(1);
}


// Compile with: zig build-exe test.zig -target i386-linux-none
// Expected: exit code 0
// Actual: exit code 1

In master branch zig (LLVM 10), the above test case passes. In llvm11 branch of
zig (LLVM release/11.x a9430a1c9e9c99151361374f0462d751457fa15c), it fails due
to `y` having one of the vector elements incorrectly be zero. It compiles
cleanly against a debug build of LLVM 11, not tripping any asserts. Attached is
the LLVM IR of the executable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to