[llvm] [VectorCombine] Fold vector.reduce.OP(F(X)) == 0 -> OP(X) == 0 (PR #173069)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 11 03:35:55 PST 2026


================
@@ -3806,6 +3807,192 @@ bool VectorCombine::foldCastFromReductions(Instruction &I) {
   return true;
 }
 
+/// Match a non-zero and non-poison integer or a vector with all non-zero and
+/// non-poison elements.
+static cst_pred_ty<is_non_zero_int, /*AllowPoison=*/false>
----------------
dtcxzyw wrote:

https://alive2.llvm.org/ce/z/-7uRdA Undefined values can be ignored.

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


More information about the llvm-commits mailing list