[PATCH] D143283: [AArch64][SVE]: custom lower AVGFloor/AVGCeil.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 05:10:04 PST 2023


dmgreen added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/sve-hadd.ll:166
   %m = add nsw <vscale x 4 x i64> %s0s, %s1s
-  %s = lshr <vscale x 4 x i64> %m, shufflevector (<vscale x 4 x i64> insertelement (<vscale x 4 x i64> poison, i64 1, i32 0), <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer)
+  %s = ashr <vscale x 4 x i64> %m, shufflevector (<vscale x 4 x i64> insertelement (<vscale x 4 x i64> poison, i64 1, i32 0), <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer)
   %s2 = trunc <vscale x 4 x i64> %s to <vscale x 4 x i32>
----------------
hassnaa-arm wrote:
> dmgreen wrote:
> > Is there a lshr version of this one?  It would be good to have some that are "full width" and use lshr.
> > As instcombine will convert all the ashr to lshr it might be best to make sure there are tests for all the functions that were changed.
> Sorry, I don't understand what you mean by "full width" ?
I just meant a multiple of 128 - a <vscale x 4 x i32>. There appear to be `<vscale x 2 x ..>` tests for lshr, but we should have all the others sizes too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143283



More information about the llvm-commits mailing list