Skip to content

The run-pass/simd-intrinsic-float-minmax.rs fails on mips* with glibc 2.27 #52746

Open
@draganmladjenovic

Description

@draganmladjenovic

This is a combination of several issues. First on Mips targets the LLVM expands @llvm.min/maxnum.v4f32 into per element fminf/fmaxf libcalls. Since glibc 2.25 [1] the semantics of these libm functions is changed and no longer follows the rules defined in LLVM lang ref [2]. Now these functions return QNAN if any of the input is SNAN. And finally the bit-pattern of libcore::f32::NAN constant is actually interpreted as SNAN by Mips hardware [3] [4] triggering the issue.

@gnzlbg
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=20947
[2] https://llvm.org/docs/LangRef.html#id480
[3] https://sourceware.org/binutils/docs/as/MIPS-NaN-Encodings.html
[4] https://dmz-portal.mips.com/wiki/MIPS_ABI_-_NaN_Interlinking#1._Introduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-MIPSTarget: MIPS processors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions