[PATCH] D156124: LoopVectorize/iv-select-cmp: add test for wide trip count (NFC)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 06:50:36 PDT 2023


fhahn added a comment.

In D156124#4533942 <https://reviews.llvm.org/D156124#4533942>, @Mel-Chen wrote:

> Based on my response https://reviews.llvm.org/D150851#4531155, do you have any thoughts? 
> If you choose option 3, this patch can be landed. 
> If you choose option 1, this case can be cleaned up into three blocks: entry, for.body, and exit. 
> If you choose option 2, then this test case is not needed.

Regardless of the outcome, we should still have test coverage those cases to make sure whatever solution we end up with has test coverage for those cases.



================
Comment at: llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll:77
+  %cmp5 = icmp sgt i32 %n, 0
+  br i1 %cmp5, label %for.body.preheader, label %for.cond.cleanup
+
----------------
fhahn wrote:
> Is this needed?
I guess it's needed reading back the latest comments for D150851. Would be good to add a comment with an explanation and also add negative version of the test (i.e. where %n isn't guaranteed to be signed positive in i32).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156124



More information about the llvm-commits mailing list