[PATCH] D66295: [ARM] Sink add/mul(shufflevector(insertelement(...), ...), ...) for MVE instruction selection

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 07:36:04 PDT 2019


samparker added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14317
+
+  if (Subtarget->hasMVEIntegerOps()) {
+    int Op = 0;
----------------
Hoist this condition and exit early if we don't have MVE.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14329
+    }
+    Instruction *Shuffle = dyn_cast<Instruction>(I->getOperand(Op));
+    // All uses of the shuffle should be sunk to avoid duplicating it across gpr and vector registers
----------------
just cast is fine.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:14332
+    for (Use &U : Shuffle->uses()) {
+      Instruction* Insn = dyn_cast<Instruction>(U.getUser());
+      if (!IsSinker(Insn, U.getOperandNo()))
----------------
cast is fine.


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

https://reviews.llvm.org/D66295





More information about the llvm-commits mailing list