[clang] [AMDGPU] Change the representation of double literals in operands (PR #68740)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 23:17:28 PDT 2023


mikaelholmen wrote:

Hi @rampitec 

With UBSan built binaries the
 MC/AMDGPU/literals.s
testcase fails and triggers UB like
```
07:33:04 ../lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:2246:59: runtime error: left shift of negative value -54321
07:33:04 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:2246:59 
```
It's this new shift that it complains on:
```
    Val = AMDGPU::isSISrcFPOperand(InstDesc, OpNum) ? Val << 32 : Lo_32(Val);
```

https://github.com/llvm/llvm-project/pull/68740


More information about the cfe-commits mailing list