diff options
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 9 | ||||
| -rw-r--r-- | llvm/test/Transforms/LICM/sinking.ll | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 0edba8fc993..29c7a881a7c 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -412,14 +412,7 @@ bool llvm::sinkRegion(DomTreeNode *N, AliasAnalysis *AA, LoopInfo *LI, // bool FreeInLoop = false; if (isNotUsedOrFreeInLoop(I, CurLoop, SafetyInfo, TTI, FreeInLoop) && - canSinkOrHoistInst(I, AA, DT, CurLoop, CurAST, true, ORE) && - // FIXME: Remove the special casing here. Why do we need the - // execution check at all? We're sinking from a dominating location - // to a dominated location. - (isa<LoadInst>(I) || isa<CallInst>(I) || - // TODO: Plumb the context instruction through to make sinking - // more powerful. - isSafeToExecuteUnconditionally(I, DT, CurLoop, SafetyInfo, ORE))) { + canSinkOrHoistInst(I, AA, DT, CurLoop, CurAST, true, ORE)) { if (sink(I, LI, DT, CurLoop, SafetyInfo, ORE, FreeInLoop)) { if (!FreeInLoop) { ++II; diff --git a/llvm/test/Transforms/LICM/sinking.ll b/llvm/test/Transforms/LICM/sinking.ll index 75a943d3ff5..3bcbc5d67db 100644 --- a/llvm/test/Transforms/LICM/sinking.ll +++ b/llvm/test/Transforms/LICM/sinking.ll @@ -53,8 +53,8 @@ Out: ; preds = %Loop ret i32 %A ; CHECK-LABEL: @test2b( ; CHECK: Out: -; CHECK-NOT: sdiv -; CHECK: ret i32 %A.lcssa +; CHECK-NEXT: sdiv +; CHECK-NEXT: ret i32 %A } define double @test2c(double* %P) { |

