Record widening decisions for memory operations within the planned recipes, and use the recorded decisions in code-gen rather than querying the cost model.
Details
Diff Detail
Unit Tests
Event Timeline
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
2920 | Update above comment? A gather/scatter will be created iff the stride is not consecutive, going either forward or reverse. This includes non-unit strided accesses, which may be part of interleave groups, and non strided accesses. | |
2927 | Above comment, assert, and artificial use of ConsecutiveStride are now redundant; cleanup? | |
llvm/lib/Transforms/Vectorize/VPlan.h | ||
1534 | assert that Reverse implies Consecutive? Another alternative may be to designate one recipe for Gather/Scatter with arbitrary non-unit strides, and a separate possibly derived recipe for Consecutive/VectorMemoryInstructions, with a Reverse indicator? | |
1543 | ditto | |
1576 | are consecutive and in reverse order |
Update above comment? A gather/scatter will be created iff the stride is not consecutive, going either forward or reverse. This includes non-unit strided accesses, which may be part of interleave groups, and non strided accesses.