[PATCH] D88259: [SVE] Lower fixed length VECREDUCE_[SMAX|SMIN] to Scalable

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 18:21:52 PDT 2020


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16004
   if (ResVT != ScalarOp.getValueType())
-    Res = DAG.getNode(ISD::TRUNCATE, DL, ScalarOp.getValueType(), Res);
+    Res = DAG.getAnyExtOrTrunc(Res, DL, ScalarOp.getValueType());
 
----------------
paulwalker-arm wrote:
> I don't think an any extent is correct here as I'd expect SMINV to return a signed result and UMINV an unsigned one.
Please ignore my previous comment, I can see from the node's description is says `However, the reduction is performed using the vector element type and the value in the top bits is unspecified` so an any extent is exactly right.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88259



More information about the llvm-commits mailing list