[llvm-bugs] [Bug 47000] New: regression with i386-linux vectors of f16

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 4 23:29:01 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: andrew at ziglang.org
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200805/dc50474c/attachment.html>


More information about the llvm-bugs mailing list