[llvm] [InstCombine] Fold vector.reduce.op(vector.reverse(X)) -> vector.reduce.op(X) (PR #91743)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 09:36:32 PDT 2024


================
@@ -3364,6 +3421,12 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
       //   zext(vector_reduce_{and,or}(<n x i1>))
       Value *Arg = II->getArgOperand(0);
       Value *Vect;
+
+      if (Value *NewOp = simplifyReductionOperand(Arg, true)) {
----------------
goldsteinn wrote:

Nit: Here and above, style is `/*CanReorderLanes=*/true`

https://github.com/llvm/llvm-project/pull/91743


More information about the llvm-commits mailing list