[PATCH] D70812: [Aarch64][SVE] Add DAG combine rules for gather loads and sext/zext

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 05:53:50 PST 2019


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9948
+                                 TargetLowering::DAGCombinerInfo &DCI,
+                                 const AArch64Subtarget *Subtarget) {
   SelectionDAG &DAG = DCI.DAG;
----------------
`AArch64Subtarget *Subtarget` isn't used by `performSVEAndCombine`, so you can remove this change.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11932
+
+  if ((SignExtSrcVT != GLD1SrcMemVT) || !Src.hasOneUse())
+    return SDValue();
----------------
The condition `Src.hasOneUse()` is not in the SVEAndCombine, so you probably want to add one there as well.
Also please make sure both cases have a unit test.


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

https://reviews.llvm.org/D70812





More information about the llvm-commits mailing list