From 73e53f510affd8c5d97876bf8c85d95bcfee077b Mon Sep 17 00:00:00 2001 From: Hongbin Zheng Date: Fri, 16 Mar 2012 08:31:24 +0000 Subject: [PATCH] More AddUsersIfInteresting related fix. llvm-svn: 152909 --- polly/lib/IndVarSimplify.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/polly/lib/IndVarSimplify.cpp b/polly/lib/IndVarSimplify.cpp index a9d15cd32197..4f19e2da1a22 100644 --- a/polly/lib/IndVarSimplify.cpp +++ b/polly/lib/IndVarSimplify.cpp @@ -1967,8 +1967,11 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // loop exit test instruction. if (IU && NewICmp) { ICmpInst *NewICmpInst = dyn_cast(NewICmp); - if (NewICmpInst) - IU->AddUsersIfInteresting(cast(NewICmpInst->getOperand(0))); + if (NewICmpInst) { + SmallPtrSet SimpleLoopNests; + IU->AddUsersIfInteresting(cast(NewICmpInst->getOperand(0)), + SimpleLoopNests); + } } // Clean up dead instructions. Changed |= DeleteDeadPHIs(L->getHeader());