[PATCH] D99032: GlobalISel: Add FoldBinOpIntoSelect combine

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 18:23:22 PST 2022


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

I think this looks fine



================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3094
+  // binary operator, not replace a binop with a select.
+  if (Select->getOpcode() != TargetOpcode::G_SELECT || !MRI.hasOneNonDBGUse(LHS)) {
+    OtherOperandReg = LHS;
----------------
can pull out `Select->getOpcode()` into a variable


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

https://reviews.llvm.org/D99032



More information about the llvm-commits mailing list