[PATCH] D128642: [AArch64][SVE] Use SVE for VLS fcopysign for wide vectors

David Truby via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 16:36:52 PDT 2022


DavidTruby added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3597
+
+  if (!isTypeLegal(N->getValueType(0)))
+    return DAG.UnrollVectorOp(N, N->getValueType(0).getVectorNumElements());
----------------
paulwalker-arm wrote:
> By this point we know the result type is legal because results are legalised before operands.  What's important here is the result type remains legal after splitting the operands.  Given the result and first operands have the same type this means ensuring the types of `LHSLo` and `LHSHi` are legal after splitting.
> 
> There's a function `GetSplitDestVTs` which returns the types expected from splitting.  I mention this because I think it's better to query the expected types are legal before performing the actual splitting. 
Ah ok I think I was considering this wrong, I thought that the result type of the concat (which is the result type of the original FCOPYSIGN) needed to be legal for us to do the transform

If that's already legal, is there a problem? Is there a case where splitting an already legal vector in two would make a vector illegal? (genuine question I'm not sure when this would pop up)

Or do we need RHSLo to be legal? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128642



More information about the llvm-commits mailing list