[llvm] r244914 - [ARM] Rejig vmax tests a bit
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 10:28:16 PDT 2015
Author: jamesm
Date: Thu Aug 13 12:28:16 2015
New Revision: 244914
URL: http://llvm.org/viewvc/llvm-project?rev=244914&view=rev
Log:
[ARM] Rejig vmax tests a bit
They rely on global fast-math options, but soon ISel will rely only on fast-math flags on the instructions themselves. Rip the fast checks out into their own file so we can mark their instructions as fast.
Added:
llvm/trunk/test/CodeGen/ARM/vminmaxnm-safe.ll
- copied, changed from r244913, llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll
Modified:
llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll
Copied: llvm/trunk/test/CodeGen/ARM/vminmaxnm-safe.ll (from r244913, llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/vminmaxnm-safe.ll?p2=llvm/trunk/test/CodeGen/ARM/vminmaxnm-safe.ll&p1=llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll&r1=244913&r2=244914&rev=244914&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/vminmaxnm-safe.ll Thu Aug 13 12:28:16 2015
@@ -1,6 +1,4 @@
; RUN: llc < %s -mtriple armv8 -mattr=+neon,+fp-armv8 | FileCheck %s
-; RUN: llc < %s -mtriple armv8 -mattr=+neon,+fp-armv8 \
-; RUN: -enable-no-nans-fp-math -enable-unsafe-fp-math | FileCheck %s --check-prefix=CHECK-FAST
; vectors
@@ -43,9 +41,6 @@ define <2 x float> @vminnmd(<2 x float>*
; scalars
define float @fp-armv8_vminnm_o(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_o":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_o":
; CHECK-NOT: vminnm.f32
%cmp = fcmp olt float %a, %b
@@ -54,9 +49,6 @@ define float @fp-armv8_vminnm_o(float %a
}
define double @fp-armv8_vminnm_ole(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_ole":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_ole":
; CHECK-NOT: vminnm.f64
%cmp = fcmp ole double %a, %b
@@ -65,9 +57,6 @@ define double @fp-armv8_vminnm_ole(doubl
}
define float @fp-armv8_vminnm_o_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_o_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_o_rev":
; CHECK-NOT: vminnm.f32
%cmp = fcmp ogt float %a, %b
@@ -76,9 +65,6 @@ define float @fp-armv8_vminnm_o_rev(floa
}
define double @fp-armv8_vminnm_oge_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_oge_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_oge_rev":
; CHECK-NOT: vminnm.f64
%cmp = fcmp oge double %a, %b
@@ -87,9 +73,6 @@ define double @fp-armv8_vminnm_oge_rev(d
}
define float @fp-armv8_vminnm_u(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_u":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_u":
; CHECK-NOT: vminnm.f32
%cmp = fcmp ult float %a, %b
@@ -98,9 +81,6 @@ define float @fp-armv8_vminnm_u(float %a
}
define float @fp-armv8_vminnm_ule(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_ule":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_ule":
; CHECK-NOT: vminnm.f32
%cmp = fcmp ule float %a, %b
@@ -109,9 +89,6 @@ define float @fp-armv8_vminnm_ule(float
}
define float @fp-armv8_vminnm_u_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_u_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_u_rev":
; CHECK-NOT: vminnm.f32
%cmp = fcmp ugt float %a, %b
@@ -120,9 +97,6 @@ define float @fp-armv8_vminnm_u_rev(floa
}
define double @fp-armv8_vminnm_uge_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_uge_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_uge_rev":
; CHECK-NOT: vminnm.f64
%cmp = fcmp uge double %a, %b
@@ -131,9 +105,6 @@ define double @fp-armv8_vminnm_uge_rev(d
}
define float @fp-armv8_vmaxnm_o(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_o":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_o":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp ogt float %a, %b
@@ -142,9 +113,6 @@ define float @fp-armv8_vmaxnm_o(float %a
}
define float @fp-armv8_vmaxnm_oge(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_oge":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_oge":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp oge float %a, %b
@@ -153,9 +121,6 @@ define float @fp-armv8_vmaxnm_oge(float
}
define float @fp-armv8_vmaxnm_o_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_o_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_o_rev":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp olt float %a, %b
@@ -164,9 +129,6 @@ define float @fp-armv8_vmaxnm_o_rev(floa
}
define float @fp-armv8_vmaxnm_ole_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_ole_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_ole_rev":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp ole float %a, %b
@@ -175,9 +137,6 @@ define float @fp-armv8_vmaxnm_ole_rev(fl
}
define float @fp-armv8_vmaxnm_u(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_u":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_u":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp ugt float %a, %b
@@ -186,9 +145,6 @@ define float @fp-armv8_vmaxnm_u(float %a
}
define float @fp-armv8_vmaxnm_uge(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_uge":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_uge":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp uge float %a, %b
@@ -197,9 +153,6 @@ define float @fp-armv8_vmaxnm_uge(float
}
define float @fp-armv8_vmaxnm_u_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_u_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_u_rev":
; CHECK-NOT: vmaxnm.f32
%cmp = fcmp ult float %a, %b
@@ -208,9 +161,6 @@ define float @fp-armv8_vmaxnm_u_rev(floa
}
define double @fp-armv8_vmaxnm_ule_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_ule_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f64
; CHECK-LABEL: "fp-armv8_vmaxnm_ule_rev":
; CHECK-NOT: vmaxnm.f64
%cmp = fcmp ule double %a, %b
@@ -221,9 +171,6 @@ define double @fp-armv8_vmaxnm_ule_rev(d
; known non-NaNs
define float @fp-armv8_vminnm_NNNo(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNo":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNo":
; CHECK: vminnm.f32
; CHECK-NOT: vminnm.f32
@@ -235,9 +182,6 @@ define float @fp-armv8_vminnm_NNNo(float
}
define double @fp-armv8_vminnm_NNNole(double %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNole":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNole":
; CHECK: vminnm.f64
; CHECK-NOT: vminnm.f64
@@ -249,9 +193,6 @@ define double @fp-armv8_vminnm_NNNole(do
}
define float @fp-armv8_vminnm_NNNo_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNo_rev":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNo_rev":
; CHECK: vminnm.f32
; CHECK-NOT: vminnm.f32
@@ -263,9 +204,6 @@ define float @fp-armv8_vminnm_NNNo_rev(f
}
define double @fp-armv8_vminnm_NNNoge_rev(double %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNoge_rev":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNoge_rev":
; CHECK: vminnm.f64
; CHECK-NOT: vminnm.f64
@@ -277,9 +215,6 @@ define double @fp-armv8_vminnm_NNNoge_re
}
define float @fp-armv8_vminnm_NNNu(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNu":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNu":
; CHECK: vminnm.f32
; CHECK-NOT: vminnm.f32
@@ -291,9 +226,6 @@ define float @fp-armv8_vminnm_NNNu(float
}
define float @fp-armv8_vminnm_NNNule(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNule":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNule":
; CHECK: vminnm.f32
; CHECK-NOT: vminnm.f32
@@ -305,9 +237,6 @@ define float @fp-armv8_vminnm_NNNule(flo
}
define float @fp-armv8_vminnm_NNNu_rev(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNu_rev":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNu_rev":
; CHECK: vminnm.f32
; CHECK-NOT: vminnm.f32
@@ -319,9 +248,6 @@ define float @fp-armv8_vminnm_NNNu_rev(f
}
define double @fp-armv8_vminnm_NNNuge_rev(double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNuge_rev":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNuge_rev":
; CHECK: vminnm.f64
; CHECK-NOT: vminnm.f64
@@ -333,9 +259,6 @@ define double @fp-armv8_vminnm_NNNuge_re
}
define float @fp-armv8_vmaxnm_NNNo(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNo":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNo":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -347,9 +270,6 @@ define float @fp-armv8_vmaxnm_NNNo(float
}
define float @fp-armv8_vmaxnm_NNNoge(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNoge":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNoge":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -361,9 +281,6 @@ define float @fp-armv8_vmaxnm_NNNoge(flo
}
define float @fp-armv8_vmaxnm_NNNo_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNo_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNo_rev":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -375,9 +292,6 @@ define float @fp-armv8_vmaxnm_NNNo_rev(f
}
define float @fp-armv8_vmaxnm_NNNole_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNole_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNole_rev":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -389,9 +303,6 @@ define float @fp-armv8_vmaxnm_NNNole_rev
}
define float @fp-armv8_vmaxnm_NNNu(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNu":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNu":
; CHECK: vmaxnm.f32
; CHEC-NOT: vmaxnm.f32
@@ -403,9 +314,6 @@ define float @fp-armv8_vmaxnm_NNNu(float
}
define float @fp-armv8_vmaxnm_NNNuge(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNuge":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNuge":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -417,9 +325,6 @@ define float @fp-armv8_vmaxnm_NNNuge(flo
}
define float @fp-armv8_vmaxnm_NNNu_rev(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNu_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNu_rev":
; CHECK: vmaxnm.f32
; CHECK-NOT: vmaxnm.f32
@@ -431,9 +336,6 @@ define float @fp-armv8_vmaxnm_NNNu_rev(f
}
define double @fp-armv8_vmaxnm_NNNule_rev( double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNule_rev":
-; CHECK-FAST: vmaxnm.f64
-; CHECK-FAST: vmaxnm.f64
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNule_rev":
; CHECK: vmaxnm.f64
; CHECK-NOT: vmaxnm.f64
@@ -445,14 +347,10 @@ define double @fp-armv8_vmaxnm_NNNule_re
}
define float @fp-armv8_vminmaxnm_0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_0":
; CHECK-NOT: vminnm.f32
; CHECK: vmaxnm.f32
- %cmp1 = fcmp olt float %a, 0.
+ %cmp1 = fcmp ult float %a, 0.
%cond1 = select i1 %cmp1, float %a, float 0.
%cmp2 = fcmp ogt float %cond1, 0.
%cond2 = select i1 %cmp2, float %cond1, float 0.
@@ -460,46 +358,34 @@ define float @fp-armv8_vminmaxnm_0(float
}
define float @fp-armv8_vminmaxnm_neg0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_neg0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_neg0":
; CHECK: vminnm.f32
; CHECK-NOT: vmaxnm.f32
%cmp1 = fcmp olt float %a, -0.
%cond1 = select i1 %cmp1, float %a, float -0.
- %cmp2 = fcmp ogt float %cond1, -0.
+ %cmp2 = fcmp ugt float %cond1, -0.
%cond2 = select i1 %cmp2, float %cond1, float -0.
ret float %cond2
}
define float @fp-armv8_vminmaxnm_e_0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_e_0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_e_0":
; CHECK-NOT: vminnm.f32
; CHECK: vmaxnm.f32
- %cmp1 = fcmp ule float 0., %a
+ %cmp1 = fcmp nsz ole float 0., %a
%cond1 = select i1 %cmp1, float 0., float %a
- %cmp2 = fcmp uge float 0., %cond1
+ %cmp2 = fcmp nsz uge float 0., %cond1
%cond2 = select i1 %cmp2, float 0., float %cond1
ret float %cond2
}
define float @fp-armv8_vminmaxnm_e_neg0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_e_neg0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_e_neg0":
; CHECK: vminnm.f32
; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp ule float -0., %a
+ %cmp1 = fcmp nsz ule float -0., %a
%cond1 = select i1 %cmp1, float -0., float %a
- %cmp2 = fcmp uge float -0., %cond1
+ %cmp2 = fcmp nsz oge float -0., %cond1
%cond2 = select i1 %cmp2, float -0., float %cond1
ret float %cond2
}
Modified: llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll?rev=244914&r1=244913&r2=244914&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/vminmaxnm.ll Thu Aug 13 12:28:16 2015
@@ -1,219 +1,147 @@
-; RUN: llc < %s -mtriple armv8 -mattr=+neon,+fp-armv8 | FileCheck %s
-; RUN: llc < %s -mtriple armv8 -mattr=+neon,+fp-armv8 \
-; RUN: -enable-no-nans-fp-math -enable-unsafe-fp-math | FileCheck %s --check-prefix=CHECK-FAST
-
-; vectors
-
-define <4 x float> @vmaxnmq(<4 x float>* %A, <4 x float>* %B) nounwind {
-; CHECK-LABEL: vmaxnmq:
-; CHECK: vmaxnm.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
- %tmp1 = load <4 x float>, <4 x float>* %A
- %tmp2 = load <4 x float>, <4 x float>* %B
- %tmp3 = call <4 x float> @llvm.arm.neon.vmaxnm.v4f32(<4 x float> %tmp1, <4 x float> %tmp2)
- ret <4 x float> %tmp3
-}
-
-define <2 x float> @vmaxnmd(<2 x float>* %A, <2 x float>* %B) nounwind {
-; CHECK-LABEL: vmaxnmd:
-; CHECK: vmaxnm.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
- %tmp1 = load <2 x float>, <2 x float>* %A
- %tmp2 = load <2 x float>, <2 x float>* %B
- %tmp3 = call <2 x float> @llvm.arm.neon.vmaxnm.v2f32(<2 x float> %tmp1, <2 x float> %tmp2)
- ret <2 x float> %tmp3
-}
-
-define <4 x float> @vminnmq(<4 x float>* %A, <4 x float>* %B) nounwind {
-; CHECK-LABEL: vminnmq:
-; CHECK: vminnm.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
- %tmp1 = load <4 x float>, <4 x float>* %A
- %tmp2 = load <4 x float>, <4 x float>* %B
- %tmp3 = call <4 x float> @llvm.arm.neon.vminnm.v4f32(<4 x float> %tmp1, <4 x float> %tmp2)
- ret <4 x float> %tmp3
-}
-
-define <2 x float> @vminnmd(<2 x float>* %A, <2 x float>* %B) nounwind {
-; CHECK-LABEL: vminnmd:
-; CHECK: vminnm.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
- %tmp1 = load <2 x float>, <2 x float>* %A
- %tmp2 = load <2 x float>, <2 x float>* %B
- %tmp3 = call <2 x float> @llvm.arm.neon.vminnm.v2f32(<2 x float> %tmp1, <2 x float> %tmp2)
- ret <2 x float> %tmp3
-}
+; RUN: llc < %s -mtriple armv8 -mattr=+neon,+fp-armv8 -enable-unsafe-fp-math -enable-no-nans-fp-math | FileCheck %s
; scalars
define float @fp-armv8_vminnm_o(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_o":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_o":
-; CHECK-NOT: vminnm.f32
- %cmp = fcmp olt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
+ %cmp = fcmp fast olt float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define double @fp-armv8_vminnm_ole(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_ole":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_ole":
-; CHECK-NOT: vminnm.f64
- %cmp = fcmp ole double %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f64
+ %cmp = fcmp fast ole double %a, %b
%cond = select i1 %cmp, double %a, double %b
ret double %cond
}
define float @fp-armv8_vminnm_o_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_o_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_o_rev":
-; CHECK-NOT: vminnm.f32
- %cmp = fcmp ogt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
+ %cmp = fcmp fast ogt float %a, %b
%cond = select i1 %cmp, float %b, float %a
ret float %cond
}
define double @fp-armv8_vminnm_oge_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_oge_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_oge_rev":
-; CHECK-NOT: vminnm.f64
- %cmp = fcmp oge double %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f64
+ %cmp = fcmp fast oge double %a, %b
%cond = select i1 %cmp, double %b, double %a
ret double %cond
}
define float @fp-armv8_vminnm_u(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_u":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_u":
-; CHECK-NOT: vminnm.f32
- %cmp = fcmp ult float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
+ %cmp = fcmp fast ult float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vminnm_ule(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_ule":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_ule":
-; CHECK-NOT: vminnm.f32
- %cmp = fcmp ule float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
+ %cmp = fcmp fast ule float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vminnm_u_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_u_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_u_rev":
-; CHECK-NOT: vminnm.f32
- %cmp = fcmp ugt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
+ %cmp = fcmp fast ugt float %a, %b
%cond = select i1 %cmp, float %b, float %a
ret float %cond
}
define double @fp-armv8_vminnm_uge_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_uge_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_uge_rev":
-; CHECK-NOT: vminnm.f64
- %cmp = fcmp uge double %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f64
+ %cmp = fcmp fast uge double %a, %b
%cond = select i1 %cmp, double %b, double %a
ret double %cond
}
define float @fp-armv8_vmaxnm_o(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_o":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_o":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp ogt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast ogt float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vmaxnm_oge(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_oge":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_oge":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp oge float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast oge float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vmaxnm_o_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_o_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_o_rev":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp olt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast olt float %a, %b
%cond = select i1 %cmp, float %b, float %a
ret float %cond
}
define float @fp-armv8_vmaxnm_ole_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_ole_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_ole_rev":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp ole float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast ole float %a, %b
%cond = select i1 %cmp, float %b, float %a
ret float %cond
}
define float @fp-armv8_vmaxnm_u(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_u":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_u":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp ugt float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast ugt float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vmaxnm_uge(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_uge":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_uge":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp uge float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast uge float %a, %b
%cond = select i1 %cmp, float %a, float %b
ret float %cond
}
define float @fp-armv8_vmaxnm_u_rev(float %a, float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_u_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_u_rev":
-; CHECK-NOT: vmaxnm.f32
- %cmp = fcmp ult float %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f32
+ %cmp = fcmp fast ult float %a, %b
%cond = select i1 %cmp, float %b, float %a
ret float %cond
}
define double @fp-armv8_vmaxnm_ule_rev(double %a, double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_ule_rev":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vmaxnm.f64
; CHECK-LABEL: "fp-armv8_vmaxnm_ule_rev":
-; CHECK-NOT: vmaxnm.f64
- %cmp = fcmp ule double %a, %b
+; CHECK-NOT: vcmp
+; CHECK: vmaxnm.f64
+ %cmp = fcmp fast ule double %a, %b
%cond = select i1 %cmp, double %b, double %a
ret double %cond
}
@@ -221,285 +149,225 @@ define double @fp-armv8_vmaxnm_ule_rev(d
; known non-NaNs
define float @fp-armv8_vminnm_NNNo(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNo":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNo":
; CHECK: vminnm.f32
-; CHECK-NOT: vminnm.f32
- %cmp1 = fcmp olt float %a, 12.
+; CHECK: vminnm.f32
+ %cmp1 = fcmp fast olt float %a, 12.
%cond1 = select i1 %cmp1, float %a, float 12.
- %cmp2 = fcmp olt float 34., %cond1
+ %cmp2 = fcmp fast olt float 34., %cond1
%cond2 = select i1 %cmp2, float 34., float %cond1
ret float %cond2
}
define double @fp-armv8_vminnm_NNNole(double %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNole":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNole":
; CHECK: vminnm.f64
-; CHECK-NOT: vminnm.f64
- %cmp1 = fcmp ole double %a, 34.
+; CHECK: vminnm.f64
+ %cmp1 = fcmp fast ole double %a, 34.
%cond1 = select i1 %cmp1, double %a, double 34.
- %cmp2 = fcmp ole double 56., %cond1
+ %cmp2 = fcmp fast ole double 56., %cond1
%cond2 = select i1 %cmp2, double 56., double %cond1
ret double %cond2
}
define float @fp-armv8_vminnm_NNNo_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNo_rev":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNo_rev":
; CHECK: vminnm.f32
-; CHECK-NOT: vminnm.f32
- %cmp1 = fcmp ogt float %a, 56.
+; CHECK: vminnm.f32
+ %cmp1 = fcmp fast ogt float %a, 56.
%cond1 = select i1 %cmp1, float 56., float %a
- %cmp2 = fcmp ogt float 78., %cond1
+ %cmp2 = fcmp fast ogt float 78., %cond1
%cond2 = select i1 %cmp2, float %cond1, float 78.
ret float %cond2
}
define double @fp-armv8_vminnm_NNNoge_rev(double %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNoge_rev":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNoge_rev":
; CHECK: vminnm.f64
-; CHECK-NOT: vminnm.f64
- %cmp1 = fcmp oge double %a, 78.
+; CHECK: vminnm.f64
+ %cmp1 = fcmp fast oge double %a, 78.
%cond1 = select i1 %cmp1, double 78., double %a
- %cmp2 = fcmp oge double 90., %cond1
+ %cmp2 = fcmp fast oge double 90., %cond1
%cond2 = select i1 %cmp2, double %cond1, double 90.
ret double %cond2
}
define float @fp-armv8_vminnm_NNNu(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNu":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNu":
; CHECK: vminnm.f32
-; CHECK-NOT: vminnm.f32
- %cmp1 = fcmp ult float 12., %b
+; CHECK: vminnm.f32
+ %cmp1 = fcmp fast ult float 12., %b
%cond1 = select i1 %cmp1, float 12., float %b
- %cmp2 = fcmp ult float %cond1, 34.
+ %cmp2 = fcmp fast ult float %cond1, 34.
%cond2 = select i1 %cmp2, float %cond1, float 34.
ret float %cond2
}
define float @fp-armv8_vminnm_NNNule(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNule":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNule":
; CHECK: vminnm.f32
-; CHECK-NOT: vminnm.f32
- %cmp1 = fcmp ule float 34., %b
+; CHECK: vminnm.f32
+ %cmp1 = fcmp fast ule float 34., %b
%cond1 = select i1 %cmp1, float 34., float %b
- %cmp2 = fcmp ule float %cond1, 56.
+ %cmp2 = fcmp fast ule float %cond1, 56.
%cond2 = select i1 %cmp2, float %cond1, float 56.
ret float %cond2
}
define float @fp-armv8_vminnm_NNNu_rev(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNu_rev":
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vminnm.f32
; CHECK-LABEL: "fp-armv8_vminnm_NNNu_rev":
; CHECK: vminnm.f32
-; CHECK-NOT: vminnm.f32
- %cmp1 = fcmp ugt float 56., %b
+; CHECK: vminnm.f32
+ %cmp1 = fcmp fast ugt float 56., %b
%cond1 = select i1 %cmp1, float %b, float 56.
- %cmp2 = fcmp ugt float %cond1, 78.
+ %cmp2 = fcmp fast ugt float %cond1, 78.
%cond2 = select i1 %cmp2, float 78., float %cond1
ret float %cond2
}
define double @fp-armv8_vminnm_NNNuge_rev(double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vminnm_NNNuge_rev":
-; CHECK-FAST: vminnm.f64
-; CHECK-FAST: vminnm.f64
; CHECK-LABEL: "fp-armv8_vminnm_NNNuge_rev":
; CHECK: vminnm.f64
-; CHECK-NOT: vminnm.f64
- %cmp1 = fcmp uge double 78., %b
+; CHECK: vminnm.f64
+ %cmp1 = fcmp fast uge double 78., %b
%cond1 = select i1 %cmp1, double %b, double 78.
- %cmp2 = fcmp uge double %cond1, 90.
+ %cmp2 = fcmp fast uge double %cond1, 90.
%cond2 = select i1 %cmp2, double 90., double %cond1
ret double %cond2
}
define float @fp-armv8_vmaxnm_NNNo(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNo":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNo":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp ogt float %a, 12.
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast ogt float %a, 12.
%cond1 = select i1 %cmp1, float %a, float 12.
- %cmp2 = fcmp ogt float 34., %cond1
+ %cmp2 = fcmp fast ogt float 34., %cond1
%cond2 = select i1 %cmp2, float 34., float %cond1
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNoge(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNoge":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNoge":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp oge float %a, 34.
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast oge float %a, 34.
%cond1 = select i1 %cmp1, float %a, float 34.
- %cmp2 = fcmp oge float 56., %cond1
+ %cmp2 = fcmp fast oge float 56., %cond1
%cond2 = select i1 %cmp2, float 56., float %cond1
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNo_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNo_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNo_rev":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp olt float %a, 56.
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast olt float %a, 56.
%cond1 = select i1 %cmp1, float 56., float %a
- %cmp2 = fcmp olt float 78., %cond1
+ %cmp2 = fcmp fast olt float 78., %cond1
%cond2 = select i1 %cmp2, float %cond1, float 78.
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNole_rev(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNole_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNole_rev":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp ole float %a, 78.
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast ole float %a, 78.
%cond1 = select i1 %cmp1, float 78., float %a
- %cmp2 = fcmp ole float 90., %cond1
+ %cmp2 = fcmp fast ole float 90., %cond1
%cond2 = select i1 %cmp2, float %cond1, float 90.
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNu(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNu":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNu":
; CHECK: vmaxnm.f32
-; CHEC-NOT: vmaxnm.f32
- %cmp1 = fcmp ugt float 12., %b
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast ugt float 12., %b
%cond1 = select i1 %cmp1, float 12., float %b
- %cmp2 = fcmp ugt float %cond1, 34.
+ %cmp2 = fcmp fast ugt float %cond1, 34.
%cond2 = select i1 %cmp2, float %cond1, float 34.
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNuge(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNuge":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNuge":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp uge float 34., %b
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast uge float 34., %b
%cond1 = select i1 %cmp1, float 34., float %b
- %cmp2 = fcmp uge float %cond1, 56.
+ %cmp2 = fcmp fast uge float %cond1, 56.
%cond2 = select i1 %cmp2, float %cond1, float 56.
ret float %cond2
}
define float @fp-armv8_vmaxnm_NNNu_rev(float %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNu_rev":
-; CHECK-FAST: vmaxnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNu_rev":
; CHECK: vmaxnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp ult float 56., %b
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast ult float 56., %b
%cond1 = select i1 %cmp1, float %b, float 56.
- %cmp2 = fcmp ult float %cond1, 78.
+ %cmp2 = fcmp fast ult float %cond1, 78.
%cond2 = select i1 %cmp2, float 78., float %cond1
ret float %cond2
}
define double @fp-armv8_vmaxnm_NNNule_rev( double %b) {
-; CHECK-FAST-LABEL: "fp-armv8_vmaxnm_NNNule_rev":
-; CHECK-FAST: vmaxnm.f64
-; CHECK-FAST: vmaxnm.f64
; CHECK-LABEL: "fp-armv8_vmaxnm_NNNule_rev":
; CHECK: vmaxnm.f64
-; CHECK-NOT: vmaxnm.f64
- %cmp1 = fcmp ule double 78., %b
+; CHECK: vmaxnm.f64
+ %cmp1 = fcmp fast ule double 78., %b
%cond1 = select i1 %cmp1, double %b, double 78.
- %cmp2 = fcmp ule double %cond1, 90.
+ %cmp2 = fcmp fast ule double %cond1, 90.
%cond2 = select i1 %cmp2, double 90., double %cond1
ret double %cond2
}
define float @fp-armv8_vminmaxnm_0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_0":
-; CHECK-NOT: vminnm.f32
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
; CHECK: vmaxnm.f32
- %cmp1 = fcmp olt float %a, 0.
+ %cmp1 = fcmp fast olt float %a, 0.
%cond1 = select i1 %cmp1, float %a, float 0.
- %cmp2 = fcmp ogt float %cond1, 0.
+ %cmp2 = fcmp fast ogt float %cond1, 0.
%cond2 = select i1 %cmp2, float %cond1, float 0.
ret float %cond2
}
define float @fp-armv8_vminmaxnm_neg0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_neg0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_neg0":
+; CHECK-NOT: vcmp
; CHECK: vminnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp olt float %a, -0.
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast olt float %a, -0.
%cond1 = select i1 %cmp1, float %a, float -0.
- %cmp2 = fcmp ogt float %cond1, -0.
+ %cmp2 = fcmp fast ogt float %cond1, -0.
%cond2 = select i1 %cmp2, float %cond1, float -0.
ret float %cond2
}
define float @fp-armv8_vminmaxnm_e_0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_e_0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_e_0":
-; CHECK-NOT: vminnm.f32
+; CHECK-NOT: vcmp
+; CHECK: vminnm.f32
; CHECK: vmaxnm.f32
- %cmp1 = fcmp ule float 0., %a
+ %cmp1 = fcmp fast ule float 0., %a
%cond1 = select i1 %cmp1, float 0., float %a
- %cmp2 = fcmp uge float 0., %cond1
+ %cmp2 = fcmp fast uge float 0., %cond1
%cond2 = select i1 %cmp2, float 0., float %cond1
ret float %cond2
}
define float @fp-armv8_vminmaxnm_e_neg0(float %a) {
-; CHECK-FAST-LABEL: "fp-armv8_vminmaxnm_e_neg0":
-; CHECK-FAST-NOT: vcmp
-; CHECK-FAST: vminnm.f32
-; CHECK-FAST: vmaxnm.f32
; CHECK-LABEL: "fp-armv8_vminmaxnm_e_neg0":
+; CHECK-NOT: vcmp
; CHECK: vminnm.f32
-; CHECK-NOT: vmaxnm.f32
- %cmp1 = fcmp ule float -0., %a
+; CHECK: vmaxnm.f32
+ %cmp1 = fcmp fast ule float -0., %a
%cond1 = select i1 %cmp1, float -0., float %a
- %cmp2 = fcmp uge float -0., %cond1
+ %cmp2 = fcmp fast oge float -0., %cond1
%cond2 = select i1 %cmp2, float -0., float %cond1
ret float %cond2
}
More information about the llvm-commits
mailing list