Skip to content

Commit

Permalink
[MemoryBuiltins] Use getAllOnesValue()
Browse files Browse the repository at this point in the history
Split out from #80309.
  • Loading branch information
nikic committed Aug 13, 2024
1 parent f0f5afe commit 53c41f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Analysis/MemoryBuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 53c41f9

Please sign in to comment.