[libcxx] [mlir] [flang] [llvm] [clang] [clang-tools-extra] [LV] Improve AnyOf reduction codegen. (PR #78304)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 03:22:29 PST 2024


================
@@ -9142,7 +9178,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
     // then extend the loop exit value to enable InstCombine to evaluate the
     // entire expression in the smaller type.
     Type *PhiTy = PhiR->getStartValue()->getLiveInIRValue()->getType();
-    if (MinVF.isVector() && PhiTy != RdxDesc.getRecurrenceType()) {
+    if (MinVF.isVector() && PhiTy != RdxDesc.getRecurrenceType() &&
+        !RecurrenceDescriptor::isAnyOfRecurrenceKind(
+            RdxDesc.getRecurrenceKind())) {
----------------
ayalz wrote:

Would be it better to truncate AnyOf reductions to smaller type (boolean) here instead of above?

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


More information about the cfe-commits mailing list