Skip to content

Commit 2d7bb60

Browse files
committed
[InstCombine] improve description of not+shift transform; NFC
This was added recently with: e44a305
1 parent 3f4faa7 commit 2d7bb60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,8 +3896,8 @@ Instruction *InstCombinerImpl::foldNot(BinaryOperator &I) {
38963896
if (match(NotVal, m_AShr(m_Not(m_Value(X)), m_Value(Y))))
38973897
return BinaryOperator::CreateAShr(X, Y);
38983898

3899-
// Bit-hack form of a signbit test:
3900-
// iN ~X >>s (N-1) --> sext i1 (X > -1) to iN
3899+
// Bit-hack form of a signbit test for iN type:
3900+
// ~(X >>s (N - 1)) --> sext i1 (X > -1) to iN
39013901
unsigned FullShift = Ty->getScalarSizeInBits() - 1;
39023902
if (match(NotVal, m_OneUse(m_AShr(m_Value(X), m_SpecificInt(FullShift))))) {
39033903
Value *IsNotNeg = Builder.CreateIsNotNeg(X, "isnotneg");

0 commit comments

Comments
 (0)