Skip to content

Commit 06cd648

Browse files
authored
[AMDGPU] Make ubsan happy (#68959)
1 parent ac32d7b commit 06cd648

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,8 @@ void AMDGPUOperand::addLiteralImmOperand(MCInst &Inst, int64_t Val, bool ApplyMo
22432243
return;
22442244
}
22452245

2246-
Val = AMDGPU::isSISrcFPOperand(InstDesc, OpNum) ? Val << 32 : Lo_32(Val);
2246+
Val = AMDGPU::isSISrcFPOperand(InstDesc, OpNum) ? (uint64_t)Val << 32
2247+
: Lo_32(Val);
22472248

22482249
Inst.addOperand(MCOperand::createImm(Val));
22492250
setImmKindLiteral();

0 commit comments

Comments
 (0)