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

    <tr>
        <th>Summary</th>
        <td>
            Unexpected comparison result of signed long long literal with zero
        </td>
    </tr>

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

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

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

<pre>
    I've come across an unexpected behavior when performing a comparison between the value `0` and the `signed long long` literal `0x8F3700142F89C2A5LL`.

```c
#include<stdio.h>
#include<stdint.h>

int main (int argc, char* argv[])
{   
    long long zero = 0;
 printf("Comparison result of zero <= signed long long 0x8F3700142F89C2A5LL: %d\n", (zero <= 0x8F3700142F89C2A5LL));
    return 0;
}
```
The binary representation of `0x8F3700142F89C2A5LL` is: `1000111100110111000000000001010000101111100010011100001010100101`

This corresponds to the decimal value `-8127026915869867355`, indicating that it is unambiguously a negative number.

Considering that `0x8F3700142F89C2A5LL` is meant to be interpreted as a signed long long and represents a negative value, the expected result for (zero <= 0x8F3700142F89C2A5LL) should be `0`. However, the actual result is `1` across several compilers including gcc and clang.

Interestingly, the cl compiler correctly interprets `ULL` as unsigned and `LL` as signed for the given literal.

It appears that the compiler is not treating the literal `0x8F3700142F89C2A5LL` as a signed long long as it should, which results in this discrepancy.

I'm seeking understanding or clarification regarding this behavior. Would it be possible for this to be a compiler bug?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVU2P4ygQ_TXkUuoI4_gjhxy60xvtSHPc0Z7LuGKzi8ECnEz216_AdtI90z2aKMKGguLVq1dl9F51hujAihdWvG5wCr11h-42Dco0m8a2t8MXJqoLgbQDAUpnvQc0MBn6PpIM1EJDPV6UdXDtycBI7mzdoEwHGA-N6JS3BhoKVyIDoSe4oJ4IWMk5KzmgadMqK3lC04K2pktDNGsVyKFO27_Xp7ziPNuJU70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