More code permutation to appease MSVC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 2 Mar 2016 02:15:42 +0000 (02:15 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 2 Mar 2016 02:15:42 +0000 (02:15 +0000)
llvm-svn: 262449

llvm/lib/Analysis/ScalarEvolution.cpp

index b841f92..5f8db62 100644 (file)
@@ -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);
 }