llvm-project
87afb37e - [ScalarEvolution] howManyLessThans infer stride isPositive from guard (#214014)

Commit
56 days ago
[ScalarEvolution] howManyLessThans infer stride isPositive from guard (#214014) Infer Stride is positive from loop guard. This enables SCEV to compute symbolic-max backedge-taken count for multi-exit loops. Motivating example: void example(int *p, int n, int stride, int bound) { if (stride <= 0) __builtin_trap(); // dominating guard => stride > 0 for (int i = 0; i < n; i += stride) { if (i > bound) __builtin_trap(); // per-iteration bounds check (2nd exit) p[i] = 0; } }
Author
Parents
Loading