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

Mel Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 03:29:26 PDT 2023


Mel-Chen added a comment.

In D157375#4591459 <https://reviews.llvm.org/D157375#4591459>, @fhahn wrote:

> I think it makes sense to have a test like this in any case to make sure it  is handled correctly.

Thanks for your reviewing.



================
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 ]
+
----------------
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.


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