Return whether Ptr is consecutive when vectorizing AccessTy.
Declared in <llvm/Transforms/Vectorize/LoopVectorizationLegality.h>
int
isConsecutivePtr(
Type* AccessTy,
Value* Ptr) const;
This happens when the last index of the GEP is the induction variable, or that the pointer itself is an induction variable. This check allows us to vectorize A[idx]into a wide load/store. Returns: 0 - Stride is unknown or non-consecutive. 1 - Address is consecutive. -1 - Address is consecutive, and decreasing. NOTE: This method must only be used before modifying the original scalar loop. Do not use after invoking 'createVectorizedLoopSkeleton' (PR34965).
0 if the stride is unknown or non-consecutive, 1 if consecutive and increasing, or -1 if consecutive and decreasing.
| Name | Description |
|---|---|
| AccessTy | Element type of the memory access through Ptr. |
| Ptr | Pointer value to test for consecutive access. |