forked from OSchip/llvm-project
AMDGPU/GlobalISel: Don't use pointless getConstantVRegVal
This is always a G_CONSTANT already
This commit is contained in:
parent
addc27bc43
commit
d6b83d6ba5
|
@ -2727,9 +2727,7 @@ void AMDGPUInstructionSelector::renderTruncImm32(MachineInstrBuilder &MIB,
|
|||
int OpIdx) const {
|
||||
assert(MI.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 &&
|
||||
"Expected G_CONSTANT");
|
||||
Optional<int64_t> CstVal = getConstantVRegVal(MI.getOperand(0).getReg(), *MRI);
|
||||
assert(CstVal && "Expected constant value");
|
||||
MIB.addImm(CstVal.getValue());
|
||||
MIB.addImm(MI.getOperand(1).getCImm()->getSExtValue());
|
||||
}
|
||||
|
||||
void AMDGPUInstructionSelector::renderNegateImm(MachineInstrBuilder &MIB,
|
||||
|
|
Loading…
Reference in New Issue