[PATCH] D157375: [LV] Pre-commit test case for AnyOf reduction , NFC

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 18:25:00 PDT 2023


michaelmaitland added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/anyof-msg.ll:4
+
+; CHECK: Found a float conditional select reduction PHI. PHI. %1 = phi i32 [ %a, %entry ], [ %3, %for.body ]
+
----------------
Mel-Chen wrote:
> fhahn wrote:
> > What's the reason for checking the debug output instead of the generated IR?
> This case was directly copied from `Transforms/LoopVectorize/select-cmp.ll`, where the generated IR was already checked. However, I found that the execution path for identifying reductions is incorrect. It should print out "an integer conditional select reduction PHI" instead of "a float conditional select reduction PHI". I believe this case should not be recognized as an AnyOf reduction pattern, but I hope more people can confirm this. 
> From an implementation perspective, the issue to be confirmed is whether AnyOf recurrence pattern should only include select instruction or if it can also include cmp instruction.
Is the code generated incorrect in Transforms/LoopVectorize/select-cmp.ll due to considering it a `float conditional select reduction`? If so, writing a fix and updating that test file may suffice and make this test redundant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157375/new/

https://reviews.llvm.org/D157375



More information about the llvm-commits mailing list