[llvm] r262449 - More code permutation to appease MSVC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 18:15:42 PST 2016


Author: sanjoy
Date: Tue Mar  1 20:15:42 2016
New Revision: 262449

URL: http://llvm.org/viewvc/llvm-project?rev=262449&view=rev
Log:
More code permutation to appease MSVC

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=262449&r1=262448&r2=262449&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Mar  1 20:15:42 2016
@@ -4577,12 +4577,15 @@ ConstantRange ScalarEvolution::getRangeV
   // 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);
 }




More information about the llvm-commits mailing list