Deleted Added
full compact
ScalarEvolutionNormalization.cpp (276479) ScalarEvolutionNormalization.cpp (280031)
1//===- ScalarEvolutionNormalization.cpp - See below -------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 112 unchanged lines hidden (view full) ---

121 case NormalizeAutodetect:
122 // Normalize this SCEV by subtracting the expression for the final step.
123 // We only allow affine AddRecs to be normalized, otherwise we would not
124 // be able to correctly denormalize.
125 // e.g. {1,+,3,+,2} == {-2,+,1,+,2} + {3,+,2}
126 // Normalized form: {-2,+,1,+,2}
127 // Denormalized form: {1,+,3,+,2}
128 //
1//===- ScalarEvolutionNormalization.cpp - See below -------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 112 unchanged lines hidden (view full) ---

121 case NormalizeAutodetect:
122 // Normalize this SCEV by subtracting the expression for the final step.
123 // We only allow affine AddRecs to be normalized, otherwise we would not
124 // be able to correctly denormalize.
125 // e.g. {1,+,3,+,2} == {-2,+,1,+,2} + {3,+,2}
126 // Normalized form: {-2,+,1,+,2}
127 // Denormalized form: {1,+,3,+,2}
128 //
129 // However, denormalization would use the a different step expression than
129 // However, denormalization would use a different step expression than
130 // normalization (see getPostIncExpr), generating the wrong final
131 // expression: {-2,+,1,+,2} + {1,+,2} => {-1,+,3,+,2}
132 if (AR->isAffine() &&
133 IVUseShouldUsePostIncValue(User, OperandValToReplace, L, &DT)) {
134 const SCEV *TransformedStep =
135 TransformSubExpr(AR->getStepRecurrence(SE),
136 User, OperandValToReplace);
137 Result = SE.getMinusSCEV(Result, TransformedStep);

--- 117 unchanged lines hidden ---
130 // normalization (see getPostIncExpr), generating the wrong final
131 // expression: {-2,+,1,+,2} + {1,+,2} => {-1,+,3,+,2}
132 if (AR->isAffine() &&
133 IVUseShouldUsePostIncValue(User, OperandValToReplace, L, &DT)) {
134 const SCEV *TransformedStep =
135 TransformSubExpr(AR->getStepRecurrence(SE),
136 User, OperandValToReplace);
137 Result = SE.getMinusSCEV(Result, TransformedStep);

--- 117 unchanged lines hidden ---