From 645e7fc5421cf82055ae7b881f4aea92818a5569 Mon Sep 17 00:00:00 2001 From: Amara Emerson Date: Thu, 23 Jul 2020 14:15:58 -0700 Subject: [PATCH] [GlobalISel] Use existing MIR builder instead of creating one in combiner. --- llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp index eba1a52..422b71b 100644 --- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp @@ -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; } -- 2.7.4