[InstCombine] move related tests together; NFC

llvm-svn: 313036
This commit is contained in:
Sanjay Patel 2017-09-12 15:29:28 +00:00
parent a26d3e834d
commit 2d4e6504af
4 changed files with 24 additions and 27 deletions

View File

@ -1,9 +1,19 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s
; PR15737
define i1 @t8(float %a, double %b) {
; CHECK-LABEL: @t8(
define i1 @PR1738(double %x, double %y) {
; CHECK-LABEL: @PR1738(
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord double %x, %y
; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp1 = fcmp ord double %x, 0.0
%cmp2 = fcmp ord double %y, 0.0
%and = and i1 %cmp1, %cmp2
ret i1 %and
}
define i1 @PR15737(float %a, double %b) {
; CHECK-LABEL: @PR15737(
; CHECK-NEXT: [[CMP:%.*]] = fcmp ord float %a, 0.000000e+00
; CHECK-NEXT: [[CMP1:%.*]] = fcmp ord double %b, 0.000000e+00
; CHECK-NEXT: [[AND:%.*]] = and i1 [[CMP]], [[CMP1]]

View File

@ -1,18 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s
; PR1738
define i1 @test1(double %X, double %Y) {
; CHECK-LABEL: @test1(
; CHECK-NEXT: [[TMP1:%.*]] = fcmp ord double %Y, %X
; CHECK-NEXT: ret i1 [[TMP1]]
;
%tmp9 = fcmp ord double %X, 0.000000e+00
%tmp13 = fcmp ord double %Y, 0.000000e+00
%bothcond = and i1 %tmp13, %tmp9
ret i1 %bothcond
}
define i1 @test2(i1 %X, i1 %Y) {
; CHECK-LABEL: @test2(
; CHECK-NEXT: [[B:%.*]] = and i1 %X, %Y

View File

@ -1,6 +1,17 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s
define i1 @PR1738(double %x, double %y) {
; CHECK-LABEL: @PR1738(
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %x, %y
; CHECK-NEXT: ret i1 [[TMP1]]
;
%cmp1 = fcmp uno double %x, 0.0
%cmp2 = fcmp uno double %y, 0.0
%or = or i1 %cmp1, %cmp2
ret i1 %or
}
define i1 @fcmp_uno_nonzero(float %x, float %y) {
; CHECK-LABEL: @fcmp_uno_nonzero(
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno float %x, %y

View File

@ -156,18 +156,6 @@ define <2 x i16> @test23vec(<2 x i16> %A) {
ret <2 x i16> %D
}
; PR1738
define i1 @test24(double %X, double %Y) {
; CHECK-LABEL: @test24(
; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno double %Y, %X
; CHECK-NEXT: ret i1 [[TMP1]]
;
%tmp9 = fcmp uno double %X, 0.000000e+00
%tmp13 = fcmp uno double %Y, 0.000000e+00
%bothcond = or i1 %tmp13, %tmp9
ret i1 %bothcond
}
; PR3266 & PR5276
define i1 @test25(i32 %A, i32 %B) {
; CHECK-LABEL: @test25(