[PATCH] D88022: [ARM][LowOverheadLoops] Check VCMP operands have same def as the VPT before combining
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 02:29:52 PDT 2020
samparker added a comment.
Hey Sam, add a couple of tests please to catch when the defs are mismatched.
================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1335
+ MachineOperand Op2 = VCMP->getOperand(2);
+ MachineInstr *Op1Def = Op1.isReg() ? RDA->getUniqueReachingMIDef(VCMP, Op1.getReg()) : nullptr;
+ MachineInstr *Op2Def = Op2.isReg() ? RDA->getUniqueReachingMIDef(VCMP, Op2.getReg()) : nullptr;
----------------
You can use getMIOperand(VCMP, Op*) here, and the code can be reduced into a loop iterating over the operands of the VCMP.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88022/new/
https://reviews.llvm.org/D88022
More information about the llvm-commits
mailing list