HomePhabricator

Fix ScalarEvolutionExpander step scaling bug

Description

Fix ScalarEvolutionExpander step scaling bug

The expandAddRecExprLiterally function incorrectly transforms
[Start + Step * X] into Step * [Start + X] instead of the correct
transform of [Step * X] + Start.

This caused https://github.com/JuliaLang/julia/issues/14704#issuecomment-174126219
due to what appeared to be sufficiently complicated loop interactions.

Patch by Jameson Nash (jameson@juliacomputing.com).

Reviewers: sanjoy
Differential Revision: http://reviews.llvm.org/D16505

Details

Committed
kfischerJul 12 2016, 6:28 PM
Differential Revision
D16505: ScalarEvolutionExpander step scaling bug
Parents
rL275238: Remove another unused variable from r275216
Branches
Unknown
Tags
Unknown