[AMDGPU] Fix assertion failure on mad with negative immediate addend
authorJay Foad <jay.foad@amd.com>
Thu, 23 Jun 2022 12:35:02 +0000 (13:35 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 27 Jun 2022 08:49:20 +0000 (09:49 +0100)
commit77e63b25f9e90320339b621e53738b330c5f1fa3
treed869cf25f7dd5aa00f0d23dea745f6d70c0af46c
parentfe8017476c7788806859a0fbac0c82be38874b47
[AMDGPU] Fix assertion failure on mad with negative immediate addend

Without this, the new test case would fail with:

AMDGPUInstPrinter.cpp:545: void llvm::AMDGPUInstPrinter::printImmediate64(uint64_t, const llvm::MCSubtargetInfo &, llvm::raw_ostream &): Assertion `isUInt<32>(Imm) || Imm == 0x3fc45f306dc9c882' failed.

Differential Revision: https://reviews.llvm.org/D128435
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll