[llvm] [DFAJumpThreading] Avoid exploring the paths that never come back (PR #85505)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 16 04:44:58 PDT 2024
================
@@ -575,6 +582,12 @@ struct AllSwitchPaths {
Visited.insert(BB);
+ // Stop if we have reached the BB out of loop, since its successors have no
+ // impact on the DFA.
+ // TODO: Do we need to stop exploring if BB is the outer loop of the switch?
----------------
XChy wrote:
Yes, it would break @test2 in dfa-jump-threading-transform.ll. This test contains nested loops. If we don't see the outer loop, we can only thread part of switch.
https://github.com/llvm/llvm-project/pull/85505
More information about the llvm-commits
mailing list