[PATCH] D123494: [VectorCombine] Find and remove shuffles from commutative reductions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 04:03:07 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/test/Transforms/VectorCombine/AArch64/vecreduce-shuffle.ll:20
+; CHECK-NEXT:    [[X:%.*]] = shufflevector <4 x i32> [[A:%.*]], <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
 ; CHECK-NEXT:    [[R:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[X]])
 ; CHECK-NEXT:    ret i32 [[R]]
----------------
What about we start with a much simpler combine in InstSimplify/Combine that just removes a permute it is feeds a commutative reduction?


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

https://reviews.llvm.org/D123494



More information about the llvm-commits mailing list