[llvm] r313036 - [InstCombine] move related tests together; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 12 08:29:28 PDT 2017
Author: spatel
Date: Tue Sep 12 08:29:28 2017
New Revision: 313036
URL: http://llvm.org/viewvc/llvm-project?rev=313036&view=rev
Log:
[InstCombine] move related tests together; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll
llvm/trunk/test/Transforms/InstCombine/and2.ll
llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll
llvm/trunk/test/Transforms/InstCombine/or.ll
Modified: llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll?rev=313036&r1=313035&r2=313036&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Tue Sep 12 08:29:28 2017
@@ -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]]
Modified: llvm/trunk/test/Transforms/InstCombine/and2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/and2.ll?rev=313036&r1=313035&r2=313036&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/and2.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/and2.ll Tue Sep 12 08:29:28 2017
@@ -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
Modified: llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll?rev=313036&r1=313035&r2=313036&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll Tue Sep 12 08:29:28 2017
@@ -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
Modified: llvm/trunk/test/Transforms/InstCombine/or.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/or.ll?rev=313036&r1=313035&r2=313036&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/or.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/or.ll Tue Sep 12 08:29:28 2017
@@ -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(
More information about the llvm-commits
mailing list