Issue 151138
Summary How to generate 0xFFFFFFFF NAN value using __builtin_nanf
Labels new issue
Assignees
Reporter quic-k
    I tried using __builtin_nanf("0xFFFFFFFF"), but got 0x7FFFFFFF instead
why is the sign bit never set?
Is this the intended behaviour?

https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ByteCode/InterpBuiltin.cpp#L363

I know the the sign bit is not really relevant for NAN, but if we provide the exact bits, __builtin, should not ignore the sign value
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to