Index: polly/trunk/lib/Analysis/ScopBuilder.cpp =================================================================== --- polly/trunk/lib/Analysis/ScopBuilder.cpp +++ polly/trunk/lib/Analysis/ScopBuilder.cpp @@ -640,8 +640,11 @@ buildStmts(*I->getNodeAs()); else { std::vector Instructions; - for (Instruction &Inst : *I->getNodeAs()) - Instructions.push_back(&Inst); + for (Instruction &Inst : *I->getNodeAs()) { + Loop *L = LI.getLoopFor(Inst.getParent()); + if (!isa(&Inst) && !canSynthesize(&Inst, *scop, &SE, L)) + Instructions.push_back(&Inst); + } Loop *SurroundingLoop = LI.getLoopFor(I->getNodeAs()); scop->addScopStmt(I->getNodeAs(), SurroundingLoop, Instructions); Index: polly/trunk/test/ScopInfo/statement.ll =================================================================== --- polly/trunk/test/ScopInfo/statement.ll +++ polly/trunk/test/ScopInfo/statement.ll @@ -9,13 +9,8 @@ ; } ; CHECK: Instructions { -; CHECK-NEXT: %idxprom = sext i32 %i.0 to i64 -; CHECK-NEXT: %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom ; CHECK-NEXT: store i32 %i.0, i32* %arrayidx, align 4 -; CHECK-NEXT: %idxprom1 = sext i32 %i.0 to i64 -; CHECK-NEXT: %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %idxprom1 ; CHECK-NEXT: store i32 %i.0, i32* %arrayidx2, align 4 -; CHECK-NEXT: br label %for.inc ; CHECK-NEXT: } ; Function Attrs: noinline nounwind uwtable