blob: 7386b91ba1c645daa958830b5b8012a2aad3703e [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm -mattr=+vfp2 > %t
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep fadds %t
3; RUN: grep faddd %t
4; RUN: grep fmuls %t
5; RUN: grep fmuld %t
Chris Lattner65637182008-01-27 23:26:37 +00006; RUN: grep eor %t
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007; RUN: grep fnegd %t
8; RUN: grep fdivs %t
9; RUN: grep fdivd %t
10
Tanya Lattner246a1372008-02-17 20:02:20 +000011define float @f1(float %a, float %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000013 %tmp = fadd float %a, %b ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014 ret float %tmp
15}
16
Tanya Lattner246a1372008-02-17 20:02:20 +000017define double @f2(double %a, double %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000019 %tmp = fadd double %a, %b ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020 ret double %tmp
21}
22
Tanya Lattner246a1372008-02-17 20:02:20 +000023define float @f3(float %a, float %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000025 %tmp = fmul float %a, %b ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026 ret float %tmp
27}
28
Tanya Lattner246a1372008-02-17 20:02:20 +000029define double @f4(double %a, double %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000030entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000031 %tmp = fmul double %a, %b ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032 ret double %tmp
33}
34
Tanya Lattner246a1372008-02-17 20:02:20 +000035define float @f5(float %a, float %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000036entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000037 %tmp = fsub float %a, %b ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038 ret float %tmp
39}
40
Tanya Lattner246a1372008-02-17 20:02:20 +000041define double @f6(double %a, double %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000042entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000043 %tmp = fsub double %a, %b ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000044 ret double %tmp
45}
46
Tanya Lattner246a1372008-02-17 20:02:20 +000047define float @f7(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000048entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000049 %tmp1 = fsub float -0.000000e+00, %a ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000050 ret float %tmp1
51}
52
Tanya Lattner246a1372008-02-17 20:02:20 +000053define double @f8(double %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000054entry:
Dan Gohman7ce405e2009-06-04 22:49:04 +000055 %tmp1 = fsub double -0.000000e+00, %a ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000056 ret double %tmp1
57}
58
Tanya Lattner246a1372008-02-17 20:02:20 +000059define float @f9(float %a, float %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000060entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000061 %tmp1 = fdiv float %a, %b ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000062 ret float %tmp1
63}
64
Tanya Lattner246a1372008-02-17 20:02:20 +000065define double @f10(double %a, double %b) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000066entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000067 %tmp1 = fdiv double %a, %b ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000068 ret double %tmp1
69}
70
Tanya Lattner246a1372008-02-17 20:02:20 +000071define float @f11(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000072entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000073 %tmp1 = call float @fabsf( float %a ) ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000074 ret float %tmp1
75}
76
Tanya Lattner246a1372008-02-17 20:02:20 +000077declare float @fabsf(float)
Dan Gohmanf17a25c2007-07-18 16:29:46 +000078
Tanya Lattner246a1372008-02-17 20:02:20 +000079define double @f12(double %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000080entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000081 %tmp1 = call double @fabs( double %a ) ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000082 ret double %tmp1
83}
84
Tanya Lattner246a1372008-02-17 20:02:20 +000085declare double @fabs(double)