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)
clang-tidy: warning: invalid case style for function 'FoldTwoEntryPHINode' [readability-identifier-naming]
not useful