1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[GlobalISel] Use existing MIR builder instead of creating one in combiner.

This commit is contained in:
Amara Emerson 2020-07-23 14:15:58 -07:00
parent c3dd7f4b12
commit ab3de496a6

View File

@ -604,8 +604,8 @@ bool CombinerHelper::matchSextTruncSextLoad(MachineInstr &MI) {
bool CombinerHelper::applySextTruncSextLoad(MachineInstr &MI) {
assert(MI.getOpcode() == TargetOpcode::G_SEXT_INREG);
MachineIRBuilder MIB(MI);
MIB.buildCopy(MI.getOperand(0).getReg(), MI.getOperand(1).getReg());
Builder.setInstrAndDebugLoc(MI);
Builder.buildCopy(MI.getOperand(0).getReg(), MI.getOperand(1).getReg());
MI.eraseFromParent();
return true;
}