]> granicus.if.org Git - llvm/commitdiff
[InstCombine] move related tests together; NFC
authorSanjay Patel <spatel@rotateright.com>
Tue, 12 Sep 2017 15:29:28 +0000 (15:29 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 12 Sep 2017 15:29:28 +0000 (15:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313036 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/and-fcmp.ll
test/Transforms/InstCombine/and2.ll
test/Transforms/InstCombine/or-fcmp.ll
test/Transforms/InstCombine/or.ll

index 04c6a2a08e7230972f1a129205f60d70eff2f534..7119ac17a5595f14347c7ed3e3d878d50e832dc1 100644 (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]]
index 15772d158f624f171a74555a7f2a5dbdf6ef8d19..dde786c9b0098a3aa14788f20cd80d00e4315d8b 100644 (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
index 7b95f9dde0e9c19dccca86feb7af5a7f68707a37..1c10424e3bc4e4373d7893797bfbeeaf0501fc37 100644 (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
index 6a4ed05c399dd910bd9af79a9b173da59193d90e..644588526ca8fb2a9e525bb53dd41351c898f3b9 100644 (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(