[llvm] 6ba73c4 - Speculative fix for windows builders after d4648eea

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 10:22:31 PDT 2021


Author: Philip Reames
Date: 2021-03-22T10:22:01-07:00
New Revision: 6ba73c474332071e4192ce5b932694d64f9e4f90

URL: https://github.com/llvm/llvm-project/commit/6ba73c474332071e4192ce5b932694d64f9e4f90
DIFF: https://github.com/llvm/llvm-project/commit/6ba73c474332071e4192ce5b932694d64f9e4f90.diff

LOG: Speculative fix for windows builders after d4648eea

Added: 
    

Modified: 
    llvm/lib/Analysis/ScalarEvolution.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 92294dc3e6c1b..69ed54653be0e 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5699,8 +5699,9 @@ getRangeForUnknownRecurrence(const SCEVUnknown *U) {
 
   // Compute total shift amount, being careful of overflow and bitwidths.
   auto MaxShiftAmt = KnownStep.getMaxValue();
+  APInt TCAP(BitWidth, TC-1, false);
   bool Overflow = false;
-  auto TotalShift = MaxShiftAmt.umul_ov(APInt(BitWidth, TC-1, false), Overflow);
+  auto TotalShift = MaxShiftAmt.umul_ov(TCAP, Overflow);
   if (Overflow)
     return CR;
 


        


More information about the llvm-commits mailing list