[PATCH] D84550: [AArch64][GlobalISe] Fold G_AND and G_LSHR into ubfm

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 11:10:17 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:1710-1718
+  // Look for %lshr = G_LSHR %something, %constant.
+  MachineInstr *Lshr = getOpcodeDef(TargetOpcode::G_LSHR, LHS, MRI);
+  if (!Lshr)
+    return false;
+
+  auto MaybeLshrImm =
+      getConstantVRegValWithLookThrough(Lshr->getOperand(2).getReg(), MRI);
----------------
Why not use mi_match?


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

https://reviews.llvm.org/D84550





More information about the llvm-commits mailing list