From 06cd6485ae2d2f390436be53e6318fd49c442c4a Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Fri, 13 Oct 2023 00:41:35 -0700 Subject: [PATCH] [AMDGPU] Make ubsan happy (#68959) --- llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index e16fed445b9f..fa651b9fcb05 100644 --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -2243,7 +2243,8 @@ void AMDGPUOperand::addLiteralImmOperand(MCInst &Inst, int64_t Val, bool ApplyMo return; } - Val = AMDGPU::isSISrcFPOperand(InstDesc, OpNum) ? Val << 32 : Lo_32(Val); + Val = AMDGPU::isSISrcFPOperand(InstDesc, OpNum) ? (uint64_t)Val << 32 + : Lo_32(Val); Inst.addOperand(MCOperand::createImm(Val)); setImmKindLiteral(); -- 2.11.4.GIT