1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

[NFC][InstCombine] Fixup newly-added tests

llvm-svn: 372413
This commit is contained in:
Roman Lebedev 2019-09-20 17:43:46 +00:00
parent 00275eb9d2
commit f120f5204a
2 changed files with 8 additions and 8 deletions

View File

@ -171,7 +171,7 @@ define i1 @t7_commutativity1(i8 %base, i8 %offset) {
; 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, i8 %offset) {
%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, i8 %offset) {
; 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, i8 %offset) {
%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
}

View File

@ -102,14 +102,14 @@ define i1 @t5_commutativity1(i8 %base, i8 %offset) {
; 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, i8 %offset) {
; 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
}