diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp index deaab0b43676..5157f0571e1d 100644 --- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp +++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp @@ -1696,6 +1696,7 @@ private: // mergeLatch may remove the only block in FC1. SE.forgetLoop(FC1.L); SE.forgetLoop(FC0.L); + SE.forgetLoopDispositions(); // Move instructions from FC0.Latch to FC1.Latch. // Note: mergeLatch requires an updated DT. @@ -1988,6 +1989,7 @@ private: // mergeLatch may remove the only block in FC1. SE.forgetLoop(FC1.L); SE.forgetLoop(FC0.L); + SE.forgetLoopDispositions(); // Move instructions from FC0.Latch to FC1.Latch. // Note: mergeLatch requires an updated DT. diff --git a/llvm/test/Transforms/LoopFusion/double_loop_nest_inner_guard.ll b/llvm/test/Transforms/LoopFusion/double_loop_nest_inner_guard.ll index caa122071b6c..d94c2229a0fc 100644 --- a/llvm/test/Transforms/LoopFusion/double_loop_nest_inner_guard.ll +++ b/llvm/test/Transforms/LoopFusion/double_loop_nest_inner_guard.ll @@ -1,7 +1,4 @@ ; RUN: opt -S -loop-fusion < %s 2>&1 | FileCheck %s -; XFAIL: * -; REQUIRES: asserts -; Fails due to incorrect cached loop disposition. ; Verify that LoopFusion can fuse two double-loop nests with guarded inner ; loops. Loops are in canonical form. diff --git a/llvm/test/Transforms/LoopFusion/loop_nest.ll b/llvm/test/Transforms/LoopFusion/loop_nest.ll index b9591728dd3d..44a0ac8093da 100644 --- a/llvm/test/Transforms/LoopFusion/loop_nest.ll +++ b/llvm/test/Transforms/LoopFusion/loop_nest.ll @@ -1,7 +1,4 @@ ; RUN: opt -S -loop-fusion < %s | FileCheck %s -; XFAIL: * -; REQUIRES: asserts -; Fails due to incorrect cached loop disposition. ; ; int A[1024][1024]; ; int B[1024][1024]; diff --git a/llvm/test/Transforms/LoopFusion/triple_loop_nest_inner_guard.ll b/llvm/test/Transforms/LoopFusion/triple_loop_nest_inner_guard.ll index b72b1995f1aa..065b250c0c14 100644 --- a/llvm/test/Transforms/LoopFusion/triple_loop_nest_inner_guard.ll +++ b/llvm/test/Transforms/LoopFusion/triple_loop_nest_inner_guard.ll @@ -1,7 +1,4 @@ ; RUN: opt -S -loop-fusion < %s 2>&1 | FileCheck %s -; XFAIL: * -; REQUIRES: asserts -; Fails due to incorrect cached loop disposition. ; Verify that LoopFusion can fuse two triple-loop nests with guarded inner ; loops. Loops are in canonical form.