[PATCH] D119469: [AArch64] Turn truncating buildvectors into truncates

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 01:24:09 PST 2022


david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9269
+// concats and truncate nodes.
+static SDValue ReconstructTruncateFromBuildVector(SDValue V, SelectionDAG &DAG) {
+  if (V.getValueType() != MVT::v16i8)
----------------
Hi @dmgreen, this feels a bit *too* specific to a particular optimisation. For example, there is a test in CodeGen/AArch64/neon-extracttruncate.ll called `@extract_2_v4i32` that could also benefit from something like this. Also, some of the code in here looks very similar to what ReconstructShuffle attempts to do, which also looks at BUILD_VECTORS that are constructed from extractelement operations. Would it be better to simply extend ReconstructShuffle to cover this case?


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

https://reviews.llvm.org/D119469



More information about the llvm-commits mailing list