Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 > %t |
Reid Spencer | eb1d74e | 2007-04-16 17:36:08 +0000 | [diff] [blame] | 2 | ; RUN: grep fadds %t |
| 3 | ; RUN: grep faddd %t |
| 4 | ; RUN: grep fmuls %t |
| 5 | ; RUN: grep fmuld %t |
Chris Lattner | 15c2351 | 2008-01-27 23:26:37 +0000 | [diff] [blame] | 6 | ; RUN: grep eor %t |
Reid Spencer | eb1d74e | 2007-04-16 17:36:08 +0000 | [diff] [blame] | 7 | ; RUN: grep fnegd %t |
| 8 | ; RUN: grep fdivs %t |
| 9 | ; RUN: grep fdivd %t |
Evan Cheng | 02b985c | 2007-01-19 09:20:23 +0000 | [diff] [blame] | 10 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 11 | define float @f1(float %a, float %b) { |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 12 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 13 | %tmp = fadd float %a, %b ; <float> [#uses=1] |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 14 | ret float %tmp |
| 15 | } |
| 16 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 17 | define double @f2(double %a, double %b) { |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 18 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 19 | %tmp = fadd double %a, %b ; <double> [#uses=1] |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 20 | ret double %tmp |
| 21 | } |
| 22 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 23 | define float @f3(float %a, float %b) { |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 24 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 25 | %tmp = fmul float %a, %b ; <float> [#uses=1] |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 26 | ret float %tmp |
| 27 | } |
| 28 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 29 | define double @f4(double %a, double %b) { |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 30 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 31 | %tmp = fmul double %a, %b ; <double> [#uses=1] |
Rafael Espindola | ff7e63c | 2006-10-09 19:15:17 +0000 | [diff] [blame] | 32 | ret double %tmp |
| 33 | } |
Rafael Espindola | 667c349 | 2006-10-10 19:35:01 +0000 | [diff] [blame] | 34 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 35 | define float @f5(float %a, float %b) { |
Rafael Espindola | 667c349 | 2006-10-10 19:35:01 +0000 | [diff] [blame] | 36 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 37 | %tmp = fsub float %a, %b ; <float> [#uses=1] |
Rafael Espindola | 667c349 | 2006-10-10 19:35:01 +0000 | [diff] [blame] | 38 | ret float %tmp |
| 39 | } |
| 40 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 41 | define double @f6(double %a, double %b) { |
Rafael Espindola | 667c349 | 2006-10-10 19:35:01 +0000 | [diff] [blame] | 42 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 43 | %tmp = fsub double %a, %b ; <double> [#uses=1] |
Rafael Espindola | 667c349 | 2006-10-10 19:35:01 +0000 | [diff] [blame] | 44 | ret double %tmp |
| 45 | } |
Rafael Espindola | 33d06bc | 2006-10-13 17:37:35 +0000 | [diff] [blame] | 46 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 47 | define float @f7(float %a) { |
Rafael Espindola | 33d06bc | 2006-10-13 17:37:35 +0000 | [diff] [blame] | 48 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 49 | %tmp1 = fsub float -0.000000e+00, %a ; <float> [#uses=1] |
Rafael Espindola | 33d06bc | 2006-10-13 17:37:35 +0000 | [diff] [blame] | 50 | ret float %tmp1 |
| 51 | } |
| 52 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 53 | define double @f8(double %a) { |
Rafael Espindola | 33d06bc | 2006-10-13 17:37:35 +0000 | [diff] [blame] | 54 | entry: |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 55 | %tmp1 = fsub double -0.000000e+00, %a ; <double> [#uses=1] |
Rafael Espindola | 33d06bc | 2006-10-13 17:37:35 +0000 | [diff] [blame] | 56 | ret double %tmp1 |
| 57 | } |
Rafael Espindola | a605be6 | 2006-10-16 21:50:04 +0000 | [diff] [blame] | 58 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 59 | define float @f9(float %a, float %b) { |
Rafael Espindola | a605be6 | 2006-10-16 21:50:04 +0000 | [diff] [blame] | 60 | entry: |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 61 | %tmp1 = fdiv float %a, %b ; <float> [#uses=1] |
Rafael Espindola | a605be6 | 2006-10-16 21:50:04 +0000 | [diff] [blame] | 62 | ret float %tmp1 |
| 63 | } |
| 64 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 65 | define double @f10(double %a, double %b) { |
Rafael Espindola | a605be6 | 2006-10-16 21:50:04 +0000 | [diff] [blame] | 66 | entry: |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 67 | %tmp1 = fdiv double %a, %b ; <double> [#uses=1] |
Rafael Espindola | a605be6 | 2006-10-16 21:50:04 +0000 | [diff] [blame] | 68 | ret double %tmp1 |
| 69 | } |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 70 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 71 | define float @f11(float %a) { |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 72 | entry: |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 73 | %tmp1 = call float @fabsf( float %a ) ; <float> [#uses=1] |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 74 | ret float %tmp1 |
| 75 | } |
| 76 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 77 | declare float @fabsf(float) |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 78 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 79 | define double @f12(double %a) { |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 80 | entry: |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 81 | %tmp1 = call double @fabs( double %a ) ; <double> [#uses=1] |
Rafael Espindola | c01c87c | 2006-10-17 20:33:13 +0000 | [diff] [blame] | 82 | ret double %tmp1 |
| 83 | } |
| 84 | |
Tanya Lattner | 6263f94 | 2008-02-17 20:02:20 +0000 | [diff] [blame] | 85 | declare double @fabs(double) |