[PATCH] D83764: DAG: Try scalarizing when expanding saturating add/sub

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 07:55:29 PDT 2020


dmgreen added a comment.

Tests sound fine to me. They are mostly the "don't crash" kind of tests, we don't have native codegen for.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7327
 
+  // FIXME: Should really try to split the vector in case it's legal on a
+  // subvector.
----------------
Would this ever happen? Having the operation legal on a smaller vector width, without it being legal in the higher size?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:7329
+  // subvector.
+  if (VT.isVector() && !isOperationLegalOrCustom(ISD::VSELECT, VT))
+    return DAG.UnrollVectorOp(Node);
----------------
64bit VSelect could actually be fine on MVE. Other operations like add and settcc would actually be more trouble.
Should we at least be testing for something like !isOperationLegalOrCustom(OverflowOp, VT) too?


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

https://reviews.llvm.org/D83764





More information about the llvm-commits mailing list