@@ -1459,8 +1459,6 @@ void HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
1459
1459
size_t Size = memtag::getAllocaSizeInBytes (*AI);
1460
1460
size_t AlignedSize = alignTo (Size, Mapping.getObjectAlignment ());
1461
1461
1462
- Value *AICast = IRB.CreatePointerCast (AI, PtrTy);
1463
-
1464
1462
auto HandleLifetime = [&](IntrinsicInst *II) {
1465
1463
// Set the lifetime intrinsic to cover the whole alloca. This reduces the
1466
1464
// set of assumptions we need to make about the lifetime. Without this we
@@ -1473,14 +1471,13 @@ void HWAddressSanitizer::instrumentStack(memtag::StackInfo &SInfo,
1473
1471
// one set of start / end in any execution (i.e. the ends are not
1474
1472
// reachable from each other), so this will not cause any problems.
1475
1473
II->setArgOperand (0 , ConstantInt::get (Int64Ty, AlignedSize));
1476
- II->setArgOperand (1 , AICast);
1477
1474
};
1478
1475
llvm::for_each (Info.LifetimeStart , HandleLifetime);
1479
1476
llvm::for_each (Info.LifetimeEnd , HandleLifetime);
1480
1477
1481
- AI->replaceUsesWithIf (Replacement, [AICast, AILong](const Use &U) {
1478
+ AI->replaceUsesWithIf (Replacement, [AILong](const Use &U) {
1482
1479
auto *User = U.getUser ();
1483
- return User != AILong && User != AICast && !isa<LifetimeIntrinsic>(User);
1480
+ return User != AILong && !isa<LifetimeIntrinsic>(User);
1484
1481
});
1485
1482
1486
1483
memtag::annotateDebugRecords (Info, retagMask (N));
0 commit comments