Open
Description
#include <cstdint>
uint32_t foo(uint32_t *A, int n) {
uint32_t sum = 0;
for (int i = 0; i < n * 32; i++)
sum += A[i];
return sum;
}
Output IR is attached. I believe what's happening here is that the smax
generated by SCEV expansion during IndVarSimplify interacts badly with SCEV checks in the loop vectorizer. I'm not quite sure though.