summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
index 270fc712be1..2dc0d825c80 100644
--- a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
@@ -55,14 +55,16 @@ protected:
bool Is64Bit = MBB.getParent()->getSubtarget<PPCSubtarget>().isPPC64();
for (MachineBasicBlock::iterator I = MBB.begin(), IE = MBB.end();
- I != IE; ++I) {
+ I != IE;) {
MachineInstr *MI = I;
if (MI->getOpcode() != PPC::ADDItlsgdLADDR &&
MI->getOpcode() != PPC::ADDItlsldLADDR &&
MI->getOpcode() != PPC::ADDItlsgdLADDR32 &&
- MI->getOpcode() != PPC::ADDItlsldLADDR32)
+ MI->getOpcode() != PPC::ADDItlsldLADDR32) {
+ ++I;
continue;
+ }
DEBUG(dbgs() << "TLS Dynamic Call Fixup:\n " << *MI;);
OpenPOWER on IntegriCloud