[PATCH] D83833: [GISel] Add new GISel combiners for G_SELECT

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 13:51:15 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1548-1549
+  assert(MI.getOpcode() == TargetOpcode::G_SELECT);
+  if (auto MaybeCstCmp =
+          getConstantVRegValWithLookThrough(MI.getOperand(1).getReg(), MRI)) {
+    OpIdx = MaybeCstCmp->Value ? 2 : 3;
----------------
I'm thinking there's no reason this needs to distinguish the undef and constant cases with D84165. However, that's making me second guess whether accepting G_IMPLICIT_DEF as an ordinary constant is a good idea if it can trigger the potentially poison case


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

https://reviews.llvm.org/D83833





More information about the llvm-commits mailing list