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.
Details
- Reviewers
lebedev.ri critson chill craig.topper
Diff Detail
Event Timeline
Look like some of the tests no longer test what they were supposed to test. Some of these could be rewritten in MIR, I suppose.
And/or would it make sense to add test runs with Options.SimplifyCondBranch set to false (somehow), so old tests are not affected?
And which of them do you think now went completely astray? Skimming through this, I noticed just split-loop.ll which doesn't make sense anymore. What else do you think should be preserved?
I think this needs a PhaseOrdering test that justifies SimplifyCFG to do InstSimplify's/InstCombine's job.
llvm/test/CodeGen/AArch64/cmp-frameindex.ll will no longer have the frameindex comparison it's supposed to test, llvm/test/CodeGen/AArch64/large-stack-cmp.ll drops the comparison being tested, llvm/test/CodeGen/AArch64/machine-sink-kill-flags.ll no longer has an and to sink, llvm/test/CodeGen/AArch64/optimize-cond-branch.ll doesn't have any of the problematic instructions referenced in the comment anymore. That's the first four tests...