The existing code would add the operands in the wrong order, and eventually crash because the SCEV expression doesn't exactly match the parameter SCEV expression in SCEVAffinator::visit. (SCEV doesn't sort the operands to getMulExpr in general.)
Details
Diff Detail
Event Timeline
Hi Eli,
thank you for catching this. The patch looks good, just two minor comments below.
Best,
Tobias
test/ScopInfo/scop-affine-parameter-ordering.ll | ||
---|---|---|
1 | You could drop -polly-code-generator=isl here. It should not affect (or be needed) for this test case. | |
7 | To make sure we do not loose test coverage over time, it might be good to use '-analyze' and to also check that we construct the right scop. ; CHECK: Stmt_for_body8_us_us95_i |
You could drop -polly-code-generator=isl here. It should not affect (or be needed) for this test case.