[llvm] [InstCombine] Fix comment typo (NFC) (PR #141105)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 10:19:33 PDT 2025
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/141105
>From 2c7aa3c4320087f94cc653b4375d3319a74bbd16 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Thu, 22 May 2025 13:18:40 -0400
Subject: [PATCH] [InstCombine] Fix comment typo (NFC)
icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X != -1, not X != 0 && X == -1, which would go to X == -1 anyway.
---
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 00b0f05f18f03..bdc7a49700cfc 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -7078,7 +7078,7 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) {
// icmp eq X, (zext (icmp ne X, 0)) --> X == 0 || X == 1
// icmp ne X, (zext (icmp ne X, 0)) --> X != 0 && X != 1
// icmp eq X, (sext (icmp ne X, 0)) --> X == 0 || X == -1
- // icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X == -1
+ // icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X != -1
return CreateRangeCheck();
}
} else if (IsSExt ? C->isAllOnes() : C->isOne()) {
More information about the llvm-commits
mailing list