[PATCH] D153936: [LV] Add tests for select-cmp reduction pattern. (NFC)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 12:47:54 PDT 2023


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/iv-select-cmp-no-wrap.ll:11
+for.body:                                         ; preds = %entry, %for.body
+  %i.010 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
+  %idx.09 = phi i64 [ %cond, %for.body ], [ %ii, %entry ]
----------------
Should we also have tests with different induction start values (constant and variable)? Would be good to adjust the name of the phis to make clearer what's the induction and what's the select reduction.

nit: personally I find it easier to read if the incoming value from the preheader comes first.


================
Comment at: llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll:27
+
+define i64 @select_icmp_const_2(ptr nocapture readonly %a, i64 %n) {
+; CHECK-LABEL: define i64 @select_icmp_const_2
----------------
What does `_const_2` stand for here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153936



More information about the llvm-commits mailing list