Skip to content

Commit 76686ed

Browse files
nikicakiramenai
authored andcommitted
[MemoryBuiltins] Use getAllOnesValue()
Split out from llvm/llvm-project#80309.
1 parent d607f58 commit 76686ed

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
@@ -675,7 +675,8 @@ Value *llvm::lowerObjectSizeCall(
675675
if (!MustSucceed)
676676
return nullptr;
677677

678-
return ConstantInt::get(ResultType, MaxVal ? -1ULL : 0);
678+
return MaxVal ? Constant::getAllOnesValue(ResultType)
679+
: Constant::getNullValue(ResultType);
679680
}
680681

681682
STATISTIC(ObjectVisitorArgument,

0 commit comments

Comments
 (0)