Skip to content

Commit dfe5d30

Browse files
committed
Address review comments
1 parent 46a6366 commit dfe5d30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/Transforms/Utils/LowerMemIntrinsics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void expandMemSetAsLoop(MemSetInst *MemSet);
6161
/// Expand \p MemSetPattern as a loop. \p MemSet is not deleted.
6262
void expandMemSetPatternAsLoop(MemSetPatternInst *MemSet);
6363

64-
/// Expand an atomic \p MemCpy as a loop. \p AtomicMemCpy is not deleted.
64+
/// Expand \p AtomicMemCpy as a loop. \p AtomicMemCpy is not deleted.
6565
void expandAtomicMemCpyAsLoop(AnyMemCpyInst *AtomicMemCpy,
6666
const TargetTransformInfo &TTI,
6767
ScalarEvolution *SE);

llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,10 @@ static bool tryToShorten(Instruction *DeadI, int64_t &DeadStart,
670670
assert(DeadSize > ToRemoveSize && "Can't remove more than original size");
671671

672672
uint64_t NewSize = DeadSize - ToRemoveSize;
673-
if (auto *AMI = dyn_cast<AnyMemIntrinsic>(DeadI); AMI && AMI->isAtomic()) {
673+
if (DeadIntrinsic->isAtomic()) {
674674
// When shortening an atomic memory intrinsic, the newly shortened
675675
// length must remain an integer multiple of the element size.
676-
const uint32_t ElementSize = AMI->getElementSizeInBytes();
676+
const uint32_t ElementSize = DeadIntrinsic->getElementSizeInBytes();
677677
if (0 != NewSize % ElementSize)
678678
return false;
679679
}

0 commit comments

Comments
 (0)