[llvm-branch-commits] [llvm] 5f5b687 - Fix warning introduced by 47eff645d8e873ba531014751c1c06a716a367e9

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 28 10:54:55 PST 2022


Author: David Sherwood
Date: 2022-02-28T10:51:43-08:00
New Revision: 5f5b687460c3b1660e7a8a034ddfc5807fe41a8c

URL: https://github.com/llvm/llvm-project/commit/5f5b687460c3b1660e7a8a034ddfc5807fe41a8c
DIFF: https://github.com/llvm/llvm-project/commit/5f5b687460c3b1660e7a8a034ddfc5807fe41a8c.diff

LOG: Fix warning introduced by 47eff645d8e873ba531014751c1c06a716a367e9

(cherry picked from commit dc0657277f2ff53f4e3ab01d856bcc576867ba9e)

Added: 
    

Modified: 
    llvm/lib/Analysis/ConstantFolding.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index c0a9304b6257..f6b955162fa5 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -599,7 +599,7 @@ Constant *FoldReinterpretLoadFromConst(Constant *C, Type *LoadTy,
     return nullptr;
 
   // If we're not accessing anything in this constant, the result is undefined.
-  if (Offset >= InitializerSize.getFixedValue())
+  if (Offset >= (int64_t)InitializerSize.getFixedValue())
     return UndefValue::get(IntType);
 
   unsigned char RawBytes[32] = {0};


        


More information about the llvm-branch-commits mailing list