Skip to content

Commit 9d6f74a

Browse files
kazutakahiratakrishna2803
authored andcommitted
[Scalar] Remove an unnecessary cast (NFC) (llvm#151849)
LoadType is already of Type *.
1 parent 350c950 commit 9d6f74a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct StoreToLoadForwardingCandidate {
117117
if (std::abs(StrideLoad) != 1)
118118
return false;
119119

120-
unsigned TypeByteSize = DL.getTypeAllocSize(const_cast<Type *>(LoadType));
120+
unsigned TypeByteSize = DL.getTypeAllocSize(LoadType);
121121

122122
auto *LoadPtrSCEV = cast<SCEVAddRecExpr>(PSE.getSCEV(LoadPtr));
123123
auto *StorePtrSCEV = cast<SCEVAddRecExpr>(PSE.getSCEV(StorePtr));

0 commit comments

Comments
 (0)