Skip to content

Commit b0bd8bd

Browse files
committed
[AtomicExpand] Use getSigned() for negative value
1 parent 748e7af commit b0bd8bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/AtomicExpandPass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,8 @@ static PartwordMaskValues createMaskInstrs(IRBuilderBase &Builder,
853853
if (AddrAlign < MinWordSize) {
854854
PMV.AlignedAddr = Builder.CreateIntrinsic(
855855
Intrinsic::ptrmask, {PtrTy, IntTy},
856-
{Addr, ConstantInt::get(IntTy, ~(uint64_t)(MinWordSize - 1))}, nullptr,
857-
"AlignedAddr");
856+
{Addr, ConstantInt::getSigned(IntTy, ~(uint64_t)(MinWordSize - 1))},
857+
nullptr, "AlignedAddr");
858858

859859
Value *AddrInt = Builder.CreatePtrToInt(Addr, IntTy);
860860
PtrLSB = Builder.CreateAnd(AddrInt, MinWordSize - 1, "PtrLSB");

0 commit comments

Comments
 (0)