[InstCombine] improve description of not+shift transform; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 25 Jan 2023 20:10:41 +0000 (15:10 -0500)
committerSanjay Patel <spatel@rotateright.com>
Thu, 26 Jan 2023 13:58:45 +0000 (08:58 -0500)
This was added recently with:
e44a305690add9f75

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

index 97a001b..9f1de3c 100644 (file)
@@ -3896,8 +3896,8 @@ Instruction *InstCombinerImpl::foldNot(BinaryOperator &I) {
     if (match(NotVal, m_AShr(m_Not(m_Value(X)), m_Value(Y))))
       return BinaryOperator::CreateAShr(X, Y);
 
-    // Bit-hack form of a signbit test:
-    // iN ~X >>s (N-1) --> sext i1 (X > -1) to iN
+    // Bit-hack form of a signbit test for iN type:
+    // ~(X >>s (N - 1)) --> sext i1 (X > -1) to iN
     unsigned FullShift = Ty->getScalarSizeInBits() - 1;
     if (match(NotVal, m_OneUse(m_AShr(m_Value(X), m_SpecificInt(FullShift))))) {
       Value *IsNotNeg = Builder.CreateIsNotNeg(X, "isnotneg");