[llvm] [LoopVectorize] LLVM fails to vectorise loops with multi-bool varables (PR #89226)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 07:03:04 PDT 2024


================
@@ -656,8 +711,10 @@ RecurrenceDescriptor::isAnyOfPattern(Loop *Loop, PHINode *OrigPhi,
   if (!Loop->isLoopInvariant(NonPhi))
     return InstDesc(false, I);
 
-  return InstDesc(I, isa<ICmpInst>(I->getOperand(0)) ? RecurKind::IAnyOf
-                                                     : RecurKind::FAnyOf);
+  return InstDesc(I,
+                  isa<ICmpInst>(I->getOperand(0)) ? RecurKind::IAnyOf
+                                                  : RecurKind::FAnyOf,
+                  nullptr, Cmp);
----------------
david-arm wrote:

With reference to my question above about why we need this extra `Cmp` parameter, I think if the RecurKind is IAnyOf or FAnyOf you should be able to get access to it by calling `getPatternInst`.

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


More information about the llvm-commits mailing list