[PATCH] D106593: [WIP][SimplifyCFG] Replace FoldTwoEntryPHINode i1 hack with a different hack.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 13:47:11 PDT 2021


efriedma created this revision.
efriedma added reviewers: aqjune, lebedev.ri, nikic.
Herald added a subscriber: hiraditya.
efriedma requested review of this revision.
Herald added a project: LLVM.

Both of these hacks are designed to handle @test9 in llvm/test/Transforms/SimplifyCFG/switch_create.ll (and a duplicate copy of the test in switch_create-custom-dl.ll).  There are side-effects on a couple other tests, but nothing really significant, as far as I can tell, except for two-entry-phi-node.ll.

The new test two-entry-phi-node.ll seems to test i1 heuristic itself, but doesn't really give any hint why we want that heuristic.

I'd appreciate any feedback if this makes sense, or if anyone has testcases that showcase the practical effects of the heuristic. I have an internal testcase where killing off the i1 heuristic helps, but it's not in a state where I can post it.

(See also discussion at https://reviews.llvm.org/rG5419b671375c)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106593

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/CodeGen/Hexagon/pred-simp.ll
  llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
  llvm/test/Transforms/SimplifyCFG/two-entry-phi-node.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106593.360956.patch
Type: text/x-patch
Size: 6707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210722/1f144836/attachment.bin>


More information about the llvm-commits mailing list