[PATCH] D38941: [PowerPC] Use record-form instruction for Less-or-Equal -1 and Greater-or-Equal 1
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 12:52:24 PDT 2017
sfertile added inline comments.
================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:1740-1743
bool Success = false;
if (!equalityOnly && MRI->hasOneUse(CRReg)) {
MachineInstr *UseMI = &*MRI->use_instr_begin(CRReg);
if (UseMI->getOpcode() == PPC::BCC) {
----------------
It seems to me this would be cleaner if we get rid of the 'Success' variable and convert the 2 ifs to check the opposite conditions and early return on failure.
================
Comment at: test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll:83
+
+; This test cconfirms record-form instructions are emitted for comparison
+; against a non-zero value.
----------------
cconfirms --> confirms
https://reviews.llvm.org/D38941
More information about the llvm-commits
mailing list