You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bool isStridedLoad(ArrayRef<Value *> PointerOps, Type *ScalarTy,
2245
2245
Align Alignment, int64_t Diff, size_t Sz) const;
2246
-
/// Given a set of pointers, check if they can be rearranged as follows (%s is
2247
-
/// a constant):
2246
+
2247
+
/// Return true if an array of scalar loads can be replaced with a strided
2248
+
/// load (with constant stride).
2249
+
///
2250
+
/// It is possible that the load gets "widened". Suppose that originally each load loads `k` bytes and `PointerOps` can be arranged as follows (`%s` is constant):
2248
2251
/// %b + 0 * %s + 0
2249
2252
/// %b + 0 * %s + 1
2250
2253
/// %b + 0 * %s + 2
2251
2254
/// ...
2252
-
/// %b + 0 * %s + w
2255
+
/// %b + 0 * %s + (w - 1)
2253
2256
///
2254
2257
/// %b + 1 * %s + 0
2255
2258
/// %b + 1 * %s + 1
2256
2259
/// %b + 1 * %s + 2
2257
2260
/// ...
2258
-
/// %b + 1 * %s + w
2261
+
/// %b + 1 * %s + (w - 1)
2262
+
/// ...
2263
+
///
2264
+
/// %b + (n - 1) * %s + 0
2265
+
/// %b + (n - 1) * %s + 1
2266
+
/// %b + (n - 1) * %s + 2
2259
2267
/// ...
2268
+
/// %b + (n - 1) * %s + (w - 1)
2260
2269
///
2261
-
/// If the pointers can be rearanged in the above pattern, it means that the
2262
-
/// memory can be accessed with a strided loads of width `w` and stride `%s`.
0 commit comments