The test cases for selecting increasing integer induction variable.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/LoopVectorize/iv-select-cmp-no-wrap.ll | ||
---|---|---|
12 | 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. | |
llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll | ||
28 | What does _const_2 stand for here? |
llvm/test/Transforms/LoopVectorize/iv-select-cmp-no-wrap.ll | ||
---|---|---|
12 | Sure. I will add a new test case into iv-select-cmp.ll, and it will be a negative case for D150851. | |
llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll | ||
28 | There is no special meaning. _const is only used to indicate that the value is compared to a constant, and _2 is just a serial number indicating they are similar tests. The difference between const_2 and const_1 is %cond = select i1 %cmp2, i64 %idx.09, i64 %i.010, while the difference between const_3 and const_1 is %idx.09 = phi i64 [ %cond, %for.body ], [ %ii, %entry ]. |
LGTM
llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll | ||
---|---|---|
164 | Perhaps select_icmp_min_valid_iv_start ? |
LGTM, thanks!
llvm/test/Transforms/LoopVectorize/iv-select-cmp.ll | ||
---|---|---|
36 | nit: can also drop .010 and .09 from the value names | |
50 | nit: would select_icmp_const_3-> select_icmp_const_3_variable_rdx_start be more descriptive? | |
116 | nit: ii better named rdx.start or something like that nit: would @select_icmp -> @select_icmp_variable_rdx_start be more descriptive? |
Changes:
- Drop the suffix of variable name
- Replace select_icmp_const_3 with select_icmp_const_3_variable_rdx_start
- Replace %ii with %rdx.start
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.