Skip to content

Commit 5aec561

Browse files
committed
[InstCombine] Fix comment typo
icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X != -1, not X != 0 && X == -1, which would go to X == -1 anyway.
1 parent 30a9d9d commit 5aec561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7078,7 +7078,7 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) {
70787078
// icmp eq X, (zext (icmp ne X, 0)) --> X == 0 || X == 1
70797079
// icmp ne X, (zext (icmp ne X, 0)) --> X != 0 && X != 1
70807080
// icmp eq X, (sext (icmp ne X, 0)) --> X == 0 || X == -1
7081-
// icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X == -1
7081+
// icmp ne X, (sext (icmp ne X, 0)) --> X != 0 && X != -1
70827082
return CreateRangeCheck();
70837083
}
70847084
} else if (IsSExt ? C->isAllOnes() : C->isOne()) {

0 commit comments

Comments
 (0)