[llvm] [SimpleLoopUnswitch] Record loops from unswitching non-trivial conditions (PR #141121)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 14 03:58:40 PDT 2025


================
@@ -88,7 +88,7 @@ static cl::opt<bool> EnableNonTrivialUnswitch(
              "following the configuration passed into the pass."));
 
 static cl::opt<int>
-    UnswitchThreshold("unswitch-threshold", cl::init(50), cl::Hidden,
+    UnswitchThreshold("unswitch-threshold", cl::init(120), cl::Hidden,
----------------
antoniofrighetto wrote:

Thinking on this again, I don't think it should be desirable to unswitch previously unswitched conditions in the new siblings loops; and recording the loops as unswitched should suffice. Updated this and simplified by dropping cost estimator changes.

https://github.com/llvm/llvm-project/pull/141121


More information about the llvm-commits mailing list