Skip to content

Commit 9ccafc4

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent c12dfd5 commit 9ccafc4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,6 @@ bool HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
14601460
size_t Size = memtag::getAllocaSizeInBytes(*AI);
14611461
size_t AlignedSize = alignTo(Size, Mapping.getObjectAlignment());
14621462

1463-
Value *AICast = IRB.CreatePointerCast(AI, PtrTy);
1464-
14651463
auto HandleLifetime = [&](IntrinsicInst *II) {
14661464
// Set the lifetime intrinsic to cover the whole alloca. This reduces the
14671465
// set of assumptions we need to make about the lifetime. Without this we
@@ -1474,14 +1472,13 @@ bool HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
14741472
// one set of start / end in any execution (i.e. the ends are not
14751473
// reachable from each other), so this will not cause any problems.
14761474
II->setArgOperand(0, ConstantInt::get(Int64Ty, AlignedSize));
1477-
II->setArgOperand(1, AICast);
14781475
};
14791476
llvm::for_each(Info.LifetimeStart, HandleLifetime);
14801477
llvm::for_each(Info.LifetimeEnd, HandleLifetime);
14811478

1482-
AI->replaceUsesWithIf(Replacement, [AICast, AILong](const Use &U) {
1479+
AI->replaceUsesWithIf(Replacement, [AILong](const Use &U) {
14831480
auto *User = U.getUser();
1484-
return User != AILong && User != AICast && !isa<LifetimeIntrinsic>(User);
1481+
return User != AILong && !isa<LifetimeIntrinsic>(User);
14851482
});
14861483

14871484
memtag::annotateDebugRecords(Info, retagMask(N));

0 commit comments

Comments
 (0)