Skip to content

Commit 4a3cb43

Browse files
committed
AMDGPU: Avoid hardcoding mov opcode
1 parent 9753ea8 commit 4a3cb43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6484,7 +6484,7 @@ bool SIInstrInfo::moveFlatAddrToVGPR(MachineInstr &Inst) const {
64846484
if (OldVAddrIdx >= 0) {
64856485
MachineOperand &VAddr = Inst.getOperand(OldVAddrIdx);
64866486
VAddrDef = MRI.getUniqueVRegDef(VAddr.getReg());
6487-
if (!VAddrDef || VAddrDef->getOpcode() != AMDGPU::V_MOV_B32_e32 ||
6487+
if (!VAddrDef || !VAddrDef->isMoveImmediate() ||
64886488
!VAddrDef->getOperand(1).isImm() ||
64896489
VAddrDef->getOperand(1).getImm() != 0)
64906490
return false;

0 commit comments

Comments
 (0)