forked from OSchip/llvm-project
[AMDGPU][NFC] Validate G_MERGE_VALUES as we match zero-extended 32-bit scalars.
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D130001
This commit is contained in:
parent
241f62d8d3
commit
75950be836
|
@ -3245,6 +3245,8 @@ static Register matchZeroExtendFromS32(MachineRegisterInfo &MRI, Register Reg) {
|
|||
if (Def->getOpcode() != AMDGPU::G_MERGE_VALUES)
|
||||
return Register();
|
||||
|
||||
assert(Def->getNumOperands() == 3 &&
|
||||
MRI.getType(Def->getOperand(0).getReg()) == LLT::scalar(64));
|
||||
if (mi_match(Def->getOperand(2).getReg(), MRI, m_ZeroInt())) {
|
||||
return Def->getOperand(1).getReg();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue