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
#include<cstdint>uint32_tfoo(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.
Use SCEV to check if the minimum iteration check (TC < Step) is known to
be false.
This is a first step towards addressing
llvm#111098. To catch
the exact case from the issue, we need to do extra work to make sure the
wrap flags on the shl are preserved and used by SCEV.
Basic support would be added with #111310. But there is extra work needed to preserve wrap flags on the mul/shl + using them from SCEV when computing the trip count expression
Use SCEV to check if the minimum iteration check (TC < Step) is known to
be false.
This is a first step towards addressing
#111098. To catch the exact
case from the issue, we need to do extra work to make sure the wrap
flags on the shl are preserved and used by SCEV.
Note that skeleton creation will be gradually moved to VPlan and this
simplification should be done as VPlan transform eventually. The current
plan is to move skeleton creation to VPlan starting from parts closest
to the parts already created by VPlan, starting with induction resume
value creation (started with
#110577), then memory and SCEV
checks and finally minimum iteration checks.
PR: #111310
Compiler Explorer
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.output.ll.txt
The text was updated successfully, but these errors were encountered: