Skip to content

Commit a29ed04

Browse files
authored
IndVarSimplify: strip redundant getDataLayout (NFC) (#125546)
DataLayout is already available as a member variable.
1 parent 16c6c48 commit a29ed04

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,6 @@ bool IndVarSimplify::canonicalizeExitCondition(Loop *L) {
14601460
if (!match(LHS, m_ZExt(m_Value(LHSOp))) || !ICmp->isSigned())
14611461
continue;
14621462

1463-
const DataLayout &DL = ExitingBB->getDataLayout();
14641463
const unsigned InnerBitWidth = DL.getTypeSizeInBits(LHSOp->getType());
14651464
const unsigned OuterBitWidth = DL.getTypeSizeInBits(RHS->getType());
14661465
auto FullCR = ConstantRange::getFull(InnerBitWidth);
@@ -1536,8 +1535,6 @@ bool IndVarSimplify::canonicalizeExitCondition(Loop *L) {
15361535
DeadInsts.push_back(LHS);
15371536
};
15381537

1539-
1540-
const DataLayout &DL = ExitingBB->getDataLayout();
15411538
const unsigned InnerBitWidth = DL.getTypeSizeInBits(LHSOp->getType());
15421539
const unsigned OuterBitWidth = DL.getTypeSizeInBits(RHS->getType());
15431540
auto FullCR = ConstantRange::getFull(InnerBitWidth);

0 commit comments

Comments
 (0)