[PATCH] D70841: [ARM][MVE] Sink vector shift operand

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 30 05:37:18 PST 2019


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMInstrMVE.td:4072
+
+def splat32_negated : PatFrag<(ops node:$val),
+                              (sub (ARMvmovImm 0), (ARMvdup node:$val))>;
----------------
I think all of this should be happening in a DAG combine, to give the negate a chance to fold into something else.

It's generally not a good idea to create multiple outputs in a tablegen pattern. Ideally thy should be one/multi inputs to one output, with the other optimisations happening in dag combine to allow extra folding to happen.

I guess ideally this would happen much earlier, like in instcombine to allow all that folding goodness. Not sure how to make that happen sensibly though.


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

https://reviews.llvm.org/D70841





More information about the llvm-commits mailing list