Skip to content
Commit ccc3e373 authored by Zinovy Nis's avatar Zinovy Nis
Browse files

[BUG][INDVAR] Fix for PR21014: wrong SCEV operands commuting for non-commutative instructions

My commit rL216160 introduced a bug PR21014: IndVars widens code 'for (i = ; i < ...; i++) arr[ CONST - i]' into 'for (i = ; i < ...; i++) arr[ i - CONST]'
thus inverting index expression. This patch fixes it. 
Thanks to Jörg Sonnenberger for pointing.

Differential Revision: http://reviews.llvm.org/D5576

llvm-svn: 218867
parent 09c8f6f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment