In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible.
If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Just a couple of minor nits to add comments aiding readability. Other than that, LGTM.
lib/Target/PowerPC/PPCInstrInfo.cpp | ||
---|---|---|
1644 ↗ | (On Diff #107906) | // Ignore hint bits when checking for non-equality comparisons. |
1693 ↗ | (On Diff #107906) | Please add a note that the existing hint is propagated to the updated hint (or something along those lines). I think that it isn't immediately obvious to the reader what is happening here. |