[PATCH] D97731: [AArch64][GlobalISel] Lower G_BUILD_VECTOR -> G_DUP

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 21:50:36 PST 2021


aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp:474
   MachineInstr *MI = MRI.getVRegDef(Reg);
-  auto Cst = getBuildVectorConstantSplat(*MI, MRI);
-  if (!Cst)
+  if (MI->getOpcode() == AArch64::G_DUP) {
+    auto VRegAndVal =
----------------
I think we should this be a helper class and live in some AArch64 specific utils somewhere. We should programmatically have a single query to test for a splat operation.


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

https://reviews.llvm.org/D97731



More information about the llvm-commits mailing list