blob: 568a6c41a0dde7d1e28e7094fe8e2b54e3098e31 [file] [log] [blame]
Tanya Lattner6263f942008-02-17 20:02:20 +00001; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 > %t
Reid Spencereb1d74e2007-04-16 17:36:08 +00002; RUN: grep fadds %t
3; RUN: grep faddd %t
4; RUN: grep fmuls %t
5; RUN: grep fmuld %t
Chris Lattner15c23512008-01-27 23:26:37 +00006; RUN: grep eor %t
Reid Spencereb1d74e2007-04-16 17:36:08 +00007; RUN: grep fnegd %t
8; RUN: grep fdivs %t
9; RUN: grep fdivd %t
Evan Cheng02b985c2007-01-19 09:20:23 +000010
Tanya Lattner6263f942008-02-17 20:02:20 +000011define float @f1(float %a, float %b) {
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000012entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000013 %tmp = fadd float %a, %b ; <float> [#uses=1]
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000014 ret float %tmp
15}
16
Tanya Lattner6263f942008-02-17 20:02:20 +000017define double @f2(double %a, double %b) {
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000018entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000019 %tmp = fadd double %a, %b ; <double> [#uses=1]
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000020 ret double %tmp
21}
22
Tanya Lattner6263f942008-02-17 20:02:20 +000023define float @f3(float %a, float %b) {
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000024entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000025 %tmp = fmul float %a, %b ; <float> [#uses=1]
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000026 ret float %tmp
27}
28
Tanya Lattner6263f942008-02-17 20:02:20 +000029define double @f4(double %a, double %b) {
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000030entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000031 %tmp = fmul double %a, %b ; <double> [#uses=1]
Rafael Espindolaff7e63c2006-10-09 19:15:17 +000032 ret double %tmp
33}
Rafael Espindola667c3492006-10-10 19:35:01 +000034
Tanya Lattner6263f942008-02-17 20:02:20 +000035define float @f5(float %a, float %b) {
Rafael Espindola667c3492006-10-10 19:35:01 +000036entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000037 %tmp = fsub float %a, %b ; <float> [#uses=1]
Rafael Espindola667c3492006-10-10 19:35:01 +000038 ret float %tmp
39}
40
Tanya Lattner6263f942008-02-17 20:02:20 +000041define double @f6(double %a, double %b) {
Rafael Espindola667c3492006-10-10 19:35:01 +000042entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000043 %tmp = fsub double %a, %b ; <double> [#uses=1]
Rafael Espindola667c3492006-10-10 19:35:01 +000044 ret double %tmp
45}
Rafael Espindola33d06bc2006-10-13 17:37:35 +000046
Tanya Lattner6263f942008-02-17 20:02:20 +000047define float @f7(float %a) {
Rafael Espindola33d06bc2006-10-13 17:37:35 +000048entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000049 %tmp1 = fsub float -0.000000e+00, %a ; <float> [#uses=1]
Rafael Espindola33d06bc2006-10-13 17:37:35 +000050 ret float %tmp1
51}
52
Tanya Lattner6263f942008-02-17 20:02:20 +000053define double @f8(double %a) {
Rafael Espindola33d06bc2006-10-13 17:37:35 +000054entry:
Dan Gohmanae3a0be2009-06-04 22:49:04 +000055 %tmp1 = fsub double -0.000000e+00, %a ; <double> [#uses=1]
Rafael Espindola33d06bc2006-10-13 17:37:35 +000056 ret double %tmp1
57}
Rafael Espindolaa605be62006-10-16 21:50:04 +000058
Tanya Lattner6263f942008-02-17 20:02:20 +000059define float @f9(float %a, float %b) {
Rafael Espindolaa605be62006-10-16 21:50:04 +000060entry:
Tanya Lattner6263f942008-02-17 20:02:20 +000061 %tmp1 = fdiv float %a, %b ; <float> [#uses=1]
Rafael Espindolaa605be62006-10-16 21:50:04 +000062 ret float %tmp1
63}
64
Tanya Lattner6263f942008-02-17 20:02:20 +000065define double @f10(double %a, double %b) {
Rafael Espindolaa605be62006-10-16 21:50:04 +000066entry:
Tanya Lattner6263f942008-02-17 20:02:20 +000067 %tmp1 = fdiv double %a, %b ; <double> [#uses=1]
Rafael Espindolaa605be62006-10-16 21:50:04 +000068 ret double %tmp1
69}
Rafael Espindolac01c87c2006-10-17 20:33:13 +000070
Tanya Lattner6263f942008-02-17 20:02:20 +000071define float @f11(float %a) {
Rafael Espindolac01c87c2006-10-17 20:33:13 +000072entry:
Tanya Lattner6263f942008-02-17 20:02:20 +000073 %tmp1 = call float @fabsf( float %a ) ; <float> [#uses=1]
Rafael Espindolac01c87c2006-10-17 20:33:13 +000074 ret float %tmp1
75}
76
Tanya Lattner6263f942008-02-17 20:02:20 +000077declare float @fabsf(float)
Rafael Espindolac01c87c2006-10-17 20:33:13 +000078
Tanya Lattner6263f942008-02-17 20:02:20 +000079define double @f12(double %a) {
Rafael Espindolac01c87c2006-10-17 20:33:13 +000080entry:
Tanya Lattner6263f942008-02-17 20:02:20 +000081 %tmp1 = call double @fabs( double %a ) ; <double> [#uses=1]
Rafael Espindolac01c87c2006-10-17 20:33:13 +000082 ret double %tmp1
83}
84
Tanya Lattner6263f942008-02-17 20:02:20 +000085declare double @fabs(double)