mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
[AtomicExpand] Use getSigned() for negative value
This commit is contained in:
@@ -853,8 +853,8 @@ static PartwordMaskValues createMaskInstrs(IRBuilderBase &Builder,
|
||||
if (AddrAlign < MinWordSize) {
|
||||
PMV.AlignedAddr = Builder.CreateIntrinsic(
|
||||
Intrinsic::ptrmask, {PtrTy, IntTy},
|
||||
{Addr, ConstantInt::get(IntTy, ~(uint64_t)(MinWordSize - 1))}, nullptr,
|
||||
"AlignedAddr");
|
||||
{Addr, ConstantInt::getSigned(IntTy, ~(uint64_t)(MinWordSize - 1))},
|
||||
nullptr, "AlignedAddr");
|
||||
|
||||
Value *AddrInt = Builder.CreatePtrToInt(Addr, IntTy);
|
||||
PtrLSB = Builder.CreateAnd(AddrInt, MinWordSize - 1, "PtrLSB");
|
||||
|
||||
Reference in New Issue
Block a user