HomePhabricator

Fix ScalarEvolutionExpander step scaling bug

Authored by loladiro on Jul 12 2016, 6:28 PM.

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

llvm-svn: 275239

Details

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