Skip to content

Commit 4160bec

Browse files
committed
refine comment
1 parent 1d0a139 commit 4160bec

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,10 +1530,8 @@ Instruction *InstCombinerImpl::visitSExt(SExtInst &Sext) {
15301530
// Try to extend the entire expression tree to the wide destination type.
15311531
bool shouldExtendExpression = true;
15321532
Value *Trunc = nullptr;
1533-
// Do not extend expression in the trunc + sext pattern when destination type
1534-
// is narrower than original (pre-trunc) type: modern architectures typically
1535-
// provide efficient sign-extend instruction, so preserving the sext is
1536-
// preferable here.
1533+
// It is not desirable to extend expression in the trunc + sext pattern when
1534+
// destination type is narrower than original (pre-trunc) type.
15371535
if (match(Src, m_Trunc(m_Value(Trunc))))
15381536
if (Trunc->getType()->getScalarSizeInBits() > DestBitSize)
15391537
shouldExtendExpression = false;

0 commit comments

Comments
 (0)