diff options
Diffstat (limited to 'lib/CodeGen/GlobalISel/Localizer.cpp')
-rw-r--r-- | lib/CodeGen/GlobalISel/Localizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/GlobalISel/Localizer.cpp b/lib/CodeGen/GlobalISel/Localizer.cpp index c5d0999fe438..8e16470b6f90 100644 --- a/lib/CodeGen/GlobalISel/Localizer.cpp +++ b/lib/CodeGen/GlobalISel/Localizer.cpp @@ -101,7 +101,8 @@ bool Localizer::runOnMachineFunction(MachineFunction &MF) { // Don't try to be smart for the insertion point. // There is no guarantee that the first seen use is the first // use in the block. - InsertMBB->insert(InsertMBB->getFirstNonPHI(), LocalizedMI); + InsertMBB->insert(InsertMBB->SkipPHIsAndLabels(InsertMBB->begin()), + LocalizedMI); // Set a new register for the definition. unsigned NewReg = @@ -112,7 +113,7 @@ bool Localizer::runOnMachineFunction(MachineFunction &MF) { MBBWithLocalDef.insert(std::make_pair(MBBAndReg, NewReg)).first; DEBUG(dbgs() << "Inserted: " << *LocalizedMI); } - DEBUG(dbgs() << "Update use with: " << PrintReg(NewVRegIt->second) + DEBUG(dbgs() << "Update use with: " << printReg(NewVRegIt->second) << '\n'); // Update the user reg. MOUse.setReg(NewVRegIt->second); |