<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60130>60130</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [ARM] signaling NaN constant gets lowerd to quiet NaN
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Hardy7cc
      </td>
    </tr>
</table>

<pre>
    When compiling the following llvm-ir with `llc -mtriple arm-linux-none` the constant value `0xH7C01` seems to get turned into `#32256` `(0x7E00)` inverting the signaling bit and discarding the payload of the float value.
```
define dso_local void @entry() #0 {
Entry:
    %0 = alloca half, align 2
    store half 0xH7C01, ptr %0, align 2
    ret void
}
```
Generated assembler:
```
entry:
        sub     sp, sp, #4
        mov r0, #1
        orr     r0, r0, #32256
        strh    r0, [sp, #2]
 add     sp, sp, #4
        mov     pc, lr
```

I originally discovered this during investigating this zig code with godbolt (https://godbolt.org/z/487zsYsnq) this example is even more weird. The zig example code does switch from `0xH7C01` to `#32257 (0x7E01)` inverting the signaling bit but preserving the payload.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVE1v4zYQ_TXUZWCDpqwPH3RI4nW3h-6hKFD0VFDiSGJBkVpyZMf59QUpO2nSHGIYoun3yHkzmjcyBD1YxIYVj6w4ZnKh0fnmu_TqWnVd1jp1bf4c0ULnplkbbQegEaF3xrhL3Blznjbaw0XTCKzkxnSwmcjr2SBIP22MtsvzxjqLrOTpcOdsIGkJztIsGA_x5-_VE99FQkCcApCDAQlo8RYVaEsu0pjIcyGKMvLStubP1TfOmTjEv7Q9o6e7xJiYTIJbTSCtAqVDJ726E2Z5NU4qcP2aknHyJmnL-JHxhxhi_aatwl5bBBXc38Z10sDZaQVsz9GSvzJRM3EAJnIOrHpcj3xLSP6w7gAAmCg4sPwI0sRLYJSmZ-IJpNGDBfFGDOQ8Jhju1RFPMJNPV3x6xCMlTTf11fHTNH5Bi14SKpAh4NQa9K8KP1Dxf_KTsqVd1zmqWJ9M5Pv3rMmdwfMbtnuPOe_TuuKvrPXdvo9FfnxjsuLxNZxgxS0_kEp9UVD8zF3Ejf804_X5KzivB22lMdfUNe6MHhXQqAOoxccOis0WSA_y1nA6wIseoHMKVy8MTrXOEDBRj0RziHUUJyZON2Dr_MDE6YWJ076uXsJfwf6MHZSuwmc5RQPFn2e0MMVmuKD2agt_jJhC3TkppHIYIFw0dSP03k0fXPXOPxXcnbP7gnPahWD2GNCfPzhnm6kmV4f8IDNsdmW159WhrPNsbPa7shRCqRplV1R5mfdt0ddY91Kq9rCXmW4EFznf7WoheM3zbau6iKu-73JV9Ptoq0lqs43zJZYq0yEs2JR8l_PMyBZNSENLCIsXSCATsSky36SZ1C5DYHtudKDwdgtpMmnaPfz-GyuO_8n1h_zxNpkGpADGXdCrWLufi0aKjGzxpvnwOjWNS7vt3MTEKca5LZvZu3-wIyZOSV1g4pTU_xsAAP__0gijag">