[llvm-bugs] [Bug 47001] New: regression with arm-linux vectors of f16

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 5 00:08:46 PDT 2020


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

            Bug ID: 47001
           Summary: regression with arm-linux vectors of f16
           Product: libraries
           Version: 11.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew at ziglang.org
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

// Zig code:


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

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

fn doTheTestDiv(comptime T: type, x: Vector(4, T), y: Vector(4, T)) void {
    const d0 = x / y;
    std.debug.assert(x[0] / y[0] == d0[0]);
}

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 arm-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 nan != nan. 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/4f00bfb4/attachment.html>


More information about the llvm-bugs mailing list