[llvm] r372413 - [NFC][InstCombine] Fixup newly-added tests
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 10:43:46 PDT 2019
Author: lebedevri
Date: Fri Sep 20 10:43:46 2019
New Revision: 372413
URL: http://llvm.org/viewvc/llvm-project?rev=372413&view=rev
Log:
[NFC][InstCombine] Fixup newly-added tests
Modified:
llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll
llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll
Modified: llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll?rev=372413&r1=372412&r2=372413&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-is-non-zero-and-no-underflow.ll Fri Sep 20 10:43:46 2019
@@ -171,7 +171,7 @@ define i1 @t7_commutativity1(i8 %base, i
; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE]], [[OFFSET:%.*]]
; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]])
; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0
-; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]]
+; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]]
; CHECK-NEXT: [[R:%.*]] = and i1 [[NOT_NULL]], [[NO_UNDERFLOW]]
; CHECK-NEXT: ret i1 [[R]]
;
@@ -181,7 +181,7 @@ define i1 @t7_commutativity1(i8 %base, i
%adjusted = add i8 %base, %offset
call void @use8(i8 %adjusted)
%not_null = icmp ne i8 %adjusted, 0
- %no_underflow = icmp uge i8 %base, %adjusted ; swapped
+ %no_underflow = icmp ugt i8 %base, %adjusted ; swapped
%r = and i1 %not_null, %no_underflow
ret i1 %r
}
@@ -192,7 +192,7 @@ define i1 @t7_commutativity3(i8 %base, i
; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE]], [[OFFSET:%.*]]
; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]])
; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0
-; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]]
+; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]]
; CHECK-NEXT: [[R:%.*]] = and i1 [[NO_UNDERFLOW]], [[NOT_NULL]]
; CHECK-NEXT: ret i1 [[R]]
;
@@ -202,7 +202,7 @@ define i1 @t7_commutativity3(i8 %base, i
%adjusted = add i8 %base, %offset
call void @use8(i8 %adjusted)
%not_null = icmp ne i8 %adjusted, 0
- %no_underflow = icmp uge i8 %base, %adjusted ; swapped
+ %no_underflow = icmp ugt i8 %base, %adjusted ; swapped
%r = and i1 %no_underflow, %not_null ; swapped
ret i1 %r
}
Modified: llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll?rev=372413&r1=372412&r2=372413&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/result-of-add-of-negative-or-zero-is-non-zero-and-no-underflow.ll Fri Sep 20 10:43:46 2019
@@ -102,14 +102,14 @@ define i1 @t5_commutativity1(i8 %base, i
; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE:%.*]], [[OFFSET:%.*]]
; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]])
; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0
-; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]]
+; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]]
; CHECK-NEXT: [[R:%.*]] = and i1 [[NOT_NULL]], [[NO_UNDERFLOW]]
; CHECK-NEXT: ret i1 [[R]]
;
%adjusted = add i8 %base, %offset
call void @use8(i8 %adjusted)
%not_null = icmp ne i8 %adjusted, 0
- %no_underflow = icmp ugt i8 %base, %adjusted ; swapped
+ %no_underflow = icmp uge i8 %base, %adjusted ; swapped
%r = and i1 %not_null, %no_underflow
ret i1 %r
}
@@ -118,14 +118,14 @@ define i1 @t6_commutativity3(i8 %base, i
; CHECK-NEXT: [[ADJUSTED:%.*]] = add i8 [[BASE:%.*]], [[OFFSET:%.*]]
; CHECK-NEXT: call void @use8(i8 [[ADJUSTED]])
; CHECK-NEXT: [[NOT_NULL:%.*]] = icmp ne i8 [[ADJUSTED]], 0
-; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ult i8 [[ADJUSTED]], [[BASE]]
+; CHECK-NEXT: [[NO_UNDERFLOW:%.*]] = icmp ule i8 [[ADJUSTED]], [[BASE]]
; CHECK-NEXT: [[R:%.*]] = and i1 [[NO_UNDERFLOW]], [[NOT_NULL]]
; CHECK-NEXT: ret i1 [[R]]
;
%adjusted = add i8 %base, %offset
call void @use8(i8 %adjusted)
%not_null = icmp ne i8 %adjusted, 0
- %no_underflow = icmp ugt i8 %base, %adjusted ; swapped
+ %no_underflow = icmp uge i8 %base, %adjusted ; swapped
%r = and i1 %no_underflow, %not_null ; swapped
ret i1 %r
}
More information about the llvm-commits
mailing list