[PATCH] D112699: [SimplifyCFG] Simplify conditions of branches

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 02:46:41 PDT 2021


mkazantsev created this revision.
mkazantsev added reviewers: lebedev.ri, critson, chill, craig.topper.
Herald added subscribers: dmgreen, arphaman, hiraditya.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We can achieve much better results of we use InstSimplify to simplify
conditions. The most iconic example that can be simplified away is
constructions like `phi [true][undef]` that may appear during the
optimizaitons.


https://reviews.llvm.org/D112699

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/CodeGen/AArch64/cmp-frameindex.ll
  llvm/test/CodeGen/AArch64/large-stack-cmp.ll
  llvm/test/CodeGen/AArch64/machine-sink-kill-flags.ll
  llvm/test/CodeGen/AArch64/optimize-cond-branch.ll
  llvm/test/CodeGen/ARM/no_redundant_trunc_for_cmp.ll
  llvm/test/CodeGen/Hexagon/loop_correctness.ll
  llvm/test/CodeGen/Thumb2/mve-phireg.ll
  llvm/test/Transforms/CallSiteSplitting/split-loop.ll
  llvm/test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll
  llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
  llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
  llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
  llvm/test/Transforms/SimplifyCFG/fold-branch-to-common-dest.ll
  llvm/test/Transforms/SimplifyCFG/iterative-simplify.ll
  llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
  llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll
  llvm/test/Transforms/SimplifyCFG/switch_create.ll
  llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
  llvm/test/Transforms/SimplifyCFG/undef_phi.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112699.382964.patch
Type: text/x-patch
Size: 53580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/76d8c220/attachment.bin>


More information about the llvm-commits mailing list