[PATCH] D64160: [ARM] Favour PL/MI over GE/LT when possible
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 14:01:25 PDT 2019
efriedma added a comment.
I wrote a very similar patch at one point, but I didn't submit it because I couldn't demonstrate any significant benefit. Then again, I only tested it with Thumb1; maybe it's more useful for Thumb2?
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:4086
+ // simpler for other passes (like the peephole optimiser) to deal with.
+ if (ConstantSDNode *RHSC = dyn_cast<ConstantSDNode>(RHS.getNode())) {
+ if (RHSC->getZExtValue() == 0) {
----------------
isNullConstant
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:4730
+ if (cast<ConstantSDNode>(ARMcc)->getZExtValue() == ARMCC::PL)
+ ARMcc = DAG.getConstant(ARMCC::GE, dl, MVT::i32);
return getCMOV(dl, VT, FalseVal, TrueVal, ARMcc, CCR, Cmp, DAG);
----------------
Do you not need to check for ARMCC::MI here? Or do we avoid that somehow?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64160/new/
https://reviews.llvm.org/D64160
More information about the llvm-commits
mailing list