[PATCH] D63163: [GlobalISel][AArch64] Fold G_SUB into G_ICMP when it's safe to do so

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 16:11:29 PDT 2019


aemerson accepted this revision.
aemerson added a comment.
This revision is now accepted and ready to land.

LGTM with a further change.



================
Comment at: llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp:3066
+        changeICMPPredToAArch64CC(CmpInst::getInversePredicate(
+            (CmpInst::Predicate)I.getOperand(1).getPredicate()));
+    emitCSet(I.getOperand(0).getReg(), invCC, MIRBuilder);
----------------
I think this predicate inversion is always needed when using CSINC right? So it can be folded into the emitCSet() function which can take the predicate.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63163/new/

https://reviews.llvm.org/D63163





More information about the llvm-commits mailing list