[llvm] da94a2b - [InstSimplify] Correct icmp_lshr test to use ult instead of slt
Matt Devereau via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 01:51:37 PST 2023
Author: Matt Devereau
Date: 2023-02-20T09:51:11Z
New Revision: da94a2b62a01ed49d4e97c0d21f95243217b1cae
URL: https://github.com/llvm/llvm-project/commit/da94a2b62a01ed49d4e97c0d21f95243217b1cae
DIFF: https://github.com/llvm/llvm-project/commit/da94a2b62a01ed49d4e97c0d21f95243217b1cae.diff
LOG: [InstSimplify] Correct icmp_lshr test to use ult instead of slt
Added:
Modified:
llvm/test/Transforms/InstSimplify/compare.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index 844b732f54ad..260d34519e11 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -2877,13 +2877,13 @@ define i1 @neg_icmp_lshr_known_non_zero_ult_no_nuw(i8 %x) {
; CHECK-NEXT: [[OR:%.*]] = or i8 [[X:%.*]], 1
; CHECK-NEXT: [[X1:%.*]] = shl i8 [[OR]], 1
; CHECK-NEXT: [[X2:%.*]] = shl i8 [[OR]], 2
-; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[X1]], [[X2]]
+; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[X1]], [[X2]]
; CHECK-NEXT: ret i1 [[CMP]]
;
%or = or i8 %x, 1
%x1 = shl i8 %or, 1
%x2 = shl i8 %or, 2
- %cmp = icmp slt i8 %x1, %x2
+ %cmp = icmp ult i8 %x1, %x2
ret i1 %cmp
}
More information about the llvm-commits
mailing list