diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-03-10 12:37:50 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-06 20:14:25 +0000 |
commit | 4c2d3b022a1d543dbbff75a0c53e8d3d7242216d (patch) | |
tree | 2cbf757a507afe2113432d167f1464c3d457674f /contrib/llvm-project/llvm/lib/Analysis/Loads.cpp | |
parent | 56727255ad47072ec2cc81b4ae728a099697b0e4 (diff) | |
parent | 8b885620ff1b22914b6fac738d7b2874d94e7543 (diff) | |
download | src-4c2d3b022a1d543dbbff75a0c53e8d3d7242216d.tar.gz src-4c2d3b022a1d543dbbff75a0c53e8d3d7242216d.zip |
Merge llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.1-0-gdba2a75e9c7e.
PR: 276104
MFC after: 1 month
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Analysis/Loads.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Analysis/Loads.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Analysis/Loads.cpp b/contrib/llvm-project/llvm/lib/Analysis/Loads.cpp index 6bf0d2f56eb4..5916d2ab48ec 100644 --- a/contrib/llvm-project/llvm/lib/Analysis/Loads.cpp +++ b/contrib/llvm-project/llvm/lib/Analysis/Loads.cpp @@ -364,7 +364,7 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, APInt &Size, if (Size.getBitWidth() > 64) return false; - const uint64_t LoadSize = Size.getZExtValue(); + const TypeSize LoadSize = TypeSize::getFixed(Size.getZExtValue()); // Otherwise, be a little bit aggressive by scanning the local block where we // want to check to see if the pointer is already being loaded or stored @@ -414,11 +414,11 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Align Alignment, APInt &Size, // Handle trivial cases. if (AccessedPtr == V && - LoadSize <= DL.getTypeStoreSize(AccessedTy)) + TypeSize::isKnownLE(LoadSize, DL.getTypeStoreSize(AccessedTy))) return true; if (AreEquivalentAddressValues(AccessedPtr->stripPointerCasts(), V) && - LoadSize <= DL.getTypeStoreSize(AccessedTy)) + TypeSize::isKnownLE(LoadSize, DL.getTypeStoreSize(AccessedTy))) return true; } return false; |