[PATCH] D84495: [InstCombine] Disable branch predicate canonicalization by default

Yevgeny Rouban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 00:26:08 PDT 2020


yrouban created this revision.
yrouban added reviewers: nikic, efriedma, kuhar.
Herald added a project: LLVM.

Disabling the branch predicate canonicalization in InstCombine might affect many users. This transform is expected to be done by SimplifyCFG (D84492 <https://reviews.llvm.org/D84492>, D84491 <https://reviews.llvm.org/D84491>).
This one line patch allows a simple revert and further investigation for any found issues.
In future this transformation with its flag should be removed from InstCombine.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84495

Files:
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp


Index: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -163,7 +163,7 @@
 
 static cl::opt<bool>
     CanonicalizeBranchPredicates("instcombine-canonicalize-branch-predicates",
-                                 cl::Hidden, cl::init(true),
+                                 cl::Hidden, cl::init(false),
                                  cl::desc("Canonicalize branch predicates"));
 
 Optional<Instruction *>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84495.280344.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200724/f81ec4fc/attachment.bin>


More information about the llvm-commits mailing list