[llvm] [VPlan] Handle AnyOf Or reduction via ComputeReductionResult. (PR #191049)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 00:01:58 PDT 2026
================
@@ -1140,7 +1140,7 @@ define i32 @test_foldable_reduction(i64 %N) {
; CHECK: [[MIDDLE_BLOCK]]:
; CHECK-NEXT: [[TMP2:%.*]] = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> [[VEC_PHI]])
; CHECK-NEXT: [[TMP3:%.*]] = call i1 @llvm.vector.reduce.or.v4i1(<4 x i1> splat (i1 true))
-; CHECK-NEXT: [[TMP4:%.*]] = freeze i1 [[TMP3]]
+; CHECK-NEXT: [[TMP4:%.*]] = freeze i1 true
----------------
ayalz wrote:
Nice that OR of true's is now known to be true. Better apply this and subsequent foldings on scalar VPlan0/1.
https://github.com/llvm/llvm-project/pull/191049
More information about the llvm-commits
mailing list