OSDN Git Service

R600: Fix wrong address when substituting ENDIF
authorVincent Lejeune <vljn@ovi.com>
Thu, 4 Apr 2013 14:00:03 +0000 (14:00 +0000)
committerVincent Lejeune <vljn@ovi.com>
Thu, 4 Apr 2013 14:00:03 +0000 (14:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178762 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/R600ControlFlowFinalizer.cpp

index 850349e..3a6c7ea 100644 (file)
@@ -205,7 +205,7 @@ public:
           CurrentStack--;
           MachineInstr *IfOrElseInst = IfThenElseStack.back();
           IfThenElseStack.pop_back();
-          CounterPropagateAddr(IfOrElseInst, CfCount);
+          CounterPropagateAddr(IfOrElseInst, CfCount + 1);
           MachineInstr *MIb = BuildMI(MBB, MI, MBB.findDebugLoc(MI),
               TII->get(AMDGPU::POP))
               .addImm(CfCount + 1)