From 67223522355b5d75ef4efc2889722239c44fc255 Mon Sep 17 00:00:00 2001 From: Max Kazantsev Date: Tue, 14 Feb 2023 19:54:19 +0700 Subject: [PATCH] [SimpleLoopUnswitch] Re-enable simple-loop-unswitch-inject-invariant-conditions Underlying bug (taking a branch from inner loop as candidate) is now fixed. We can return it. --- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index 9304d16..0cba37d 100644 --- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp @@ -125,7 +125,7 @@ static cl::opt InjectInvariantConditions( "simple-loop-unswitch-inject-invariant-conditions", cl::Hidden, cl::desc("Whether we should inject new invariants and unswitch them to " "eliminate some existing (non-invariant) conditions."), - cl::init(false)); + cl::init(true)); static cl::opt InjectInvariantConditionHotnesThreshold( "simple-loop-unswitch-inject-invariant-condition-hotness-threshold", -- 2.7.4