summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-03-02 02:15:42 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-03-02 02:15:42 +0000
commit62a1c33929f1977c0e83d5fcc7412daf787a8235 (patch)
treeae66613011a4fd3153162f3ad4362ebe2d3976a9 /llvm/lib/Analysis/ScalarEvolution.cpp
parent9e5ebf145cf6cedc7538914fc9ee9daa961d2aa0 (diff)
downloadbcm5719-llvm-62a1c33929f1977c0e83d5fcc7412daf787a8235.tar.gz
bcm5719-llvm-62a1c33929f1977c0e83d5fcc7412daf787a8235.zip
More code permutation to appease MSVC
llvm-svn: 262449
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index b841f928448..5f8db62390d 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -4577,12 +4577,15 @@ ConstantRange ScalarEvolution::getRangeViaFactoring(const SCEV *Start,
// from deep in the call stack, and calling getSCEV (on a sext instruction,
// say) can end up caching a suboptimal value.
+ APInt TrueStart = *StartPattern.TrueValue + Offset;
+ APInt TrueStep = *StepPattern.TrueValue;
+ APInt FalseStart = *StartPattern.FalseValue + Offset;
+ APInt FalseStep = *StepPattern.FalseValue;
+
ConstantRange TrueRange = getRangeForAffineAR(
- getConstant(*StartPattern.TrueValue + Offset),
- getConstant(*StepPattern.TrueValue), MaxBECount, BitWidth);
+ getConstant(TrueStart), getConstant(TrueStep), MaxBECount, BitWidth);
ConstantRange FalseRange = getRangeForAffineAR(
- getConstant(*StartPattern.FalseValue + Offset),
- getConstant(*StepPattern.FalseValue), MaxBECount, BitWidth);
+ getConstant(FalseStart), getConstant(FalseStep), MaxBECount, BitWidth);
return TrueRange.unionWith(FalseRange);
}
OpenPOWER on IntegriCloud