Skip to content

Commit 53c41f9

Browse files
committed
[MemoryBuiltins] Use getAllOnesValue()
Split out from #80309.
1 parent f0f5afe commit 53c41f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Analysis/MemoryBuiltins.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ Value *llvm::lowerObjectSizeCall(
660660
if (!MustSucceed)
661661
return nullptr;
662662

663-
return ConstantInt::get(ResultType, MaxVal ? -1ULL : 0);
663+
return MaxVal ? Constant::getAllOnesValue(ResultType)
664+
: Constant::getNullValue(ResultType);
664665
}
665666

666667
STATISTIC(ObjectVisitorArgument,

0 commit comments

Comments
 (0)