[PATCH] D106932: [AArch64][SVE][InstCombine] Move last{a,b} before binop if one operand is a splat value

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 3 07:54:42 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-opts-lasta-lastb.ll:276-346
+define i8 @lastb_binop_RHS_splat_add(<vscale x 16 x i1> %pg, i8 %scalar, <vscale x 16 x i8> %vector) #0 {
+; OPT-LABEL: @lastb_binop_RHS_splat_add(
+; OPT-NEXT:    %1 = call i8 @llvm.aarch64.sve.lastb.nxv16i8(<vscale x 16 x i1> %pg, <vscale x 16 x i8> %vector)
+; OPT-NEXT:    %binop1 = add i8 %1, %scalar
+; OPT-NEXT:    ret i8 %binop1
+  %splat_insert = insertelement <vscale x 16 x i8> poison, i8 %scalar, i32 0
+  %splat = shufflevector <vscale x 16 x i8> %splat_insert, <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer
----------------
paulwalker-arm wrote:
> Given you have div and div tests with and without flags, do these add/fadd tests testing anything new? If not then there's not much point keeping them.
Given you have div and fdiv tests with and without flags, do these add/fadd tests testing anything new? If not then there's not much point keeping them.


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

https://reviews.llvm.org/D106932



More information about the llvm-commits mailing list