Insert IMPLICIT_DEF instructions at the current insert position, not
authorDan Gohman <gohman@apple.com>
Sat, 10 Jul 2010 13:55:45 +0000 (13:55 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 10 Jul 2010 13:55:45 +0000 (13:55 +0000)
at the end of the block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108045 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/InstrEmitter.cpp

index 40fb3a46985ca6b332ea8d54a2df6e499f0ec127..f6679333a8c5db98ca9c523d3dd175a46701f069 100644 (file)
@@ -246,7 +246,7 @@ unsigned InstrEmitter::getVR(SDValue Op,
       const TargetRegisterClass *RC = TLI->getRegClassFor(Op.getValueType());
       VReg = MRI->createVirtualRegister(RC);
     }
-    BuildMI(MBB, Op.getDebugLoc(),
+    BuildMI(*MBB, InsertPos, Op.getDebugLoc(),
             TII->get(TargetOpcode::IMPLICIT_DEF), VReg);
     return VReg;
   }