diff options
author | Nikita Popov <npopov@redhat.com> | 2024-08-13 14:53:54 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2024-08-13 15:04:23 +0200 |
commit | 53c41f95db3ab3f4a5d4562fd76f7f4115c52bad (patch) | |
tree | 2473b0d54f895d4c47a8b9e3869235aee916fe67 /llvm/lib/Analysis/MemoryBuiltins.cpp | |
parent | f0f5afe9685c2085a4ca51eeb40262f1def61377 (diff) | |
download | llvm-53c41f95db3ab3f4a5d4562fd76f7f4115c52bad.zip llvm-53c41f95db3ab3f4a5d4562fd76f7f4115c52bad.tar.gz llvm-53c41f95db3ab3f4a5d4562fd76f7f4115c52bad.tar.bz2 |
[MemoryBuiltins] Use getAllOnesValue()
Split out from https://github.com/llvm/llvm-project/pull/80309.
Diffstat (limited to 'llvm/lib/Analysis/MemoryBuiltins.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryBuiltins.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp index 53ed60f..e1abf5e 100644 --- a/llvm/lib/Analysis/MemoryBuiltins.cpp +++ b/llvm/lib/Analysis/MemoryBuiltins.cpp @@ -660,7 +660,8 @@ Value *llvm::lowerObjectSizeCall( if (!MustSucceed) return nullptr; - return ConstantInt::get(ResultType, MaxVal ? -1ULL : 0); + return MaxVal ? Constant::getAllOnesValue(ResultType) + : Constant::getNullValue(ResultType); } STATISTIC(ObjectVisitorArgument, |