Bill Wendling | c61b506 | 2010-10-12 22:08:41 +0000 | [diff] [blame] | 1 | ;RUN: llc -mtriple=armv7-apple-darwin -mcpu=cortex-a8 -mattr=-neonfp -show-mc-encoding < %s | FileCheck %s |
| 2 | |
| 3 | |
| 4 | ; FIXME: Once the ARM integrated assembler is up and going, these sorts of tests |
| 5 | ; should run on .s source files rather than using llc to generate the |
| 6 | ; assembly. |
| 7 | |
| 8 | |
Bill Wendling | 34c2b09 | 2010-10-12 22:55:35 +0000 | [diff] [blame^] | 9 | define double @f1(double %a, double %b) nounwind readnone { |
Bill Wendling | c61b506 | 2010-10-12 22:08:41 +0000 | [diff] [blame] | 10 | entry: |
| 11 | ; CHECK: f1 |
Bill Wendling | 34c2b09 | 2010-10-12 22:55:35 +0000 | [diff] [blame^] | 12 | ; CHECK: vadd.f64 d16, d17, d16 @ encoding: [0xa0,0x0b,0x71,0xee] |
| 13 | %add = fadd double %a, %b |
| 14 | ret double %add |
| 15 | } |
| 16 | |
| 17 | define float @f2(float %a, float %b) nounwind readnone { |
| 18 | entry: |
| 19 | ; CHECK: f2 |
Bill Wendling | c61b506 | 2010-10-12 22:08:41 +0000 | [diff] [blame] | 20 | ; CHECK: vadd.f32 s0, s1, s0 @ encoding: [0x80,0x0a,0x30,0xee] |
| 21 | %add = fadd float %a, %b |
| 22 | ret float %add |
| 23 | } |
| 24 | |
Bill Wendling | 34c2b09 | 2010-10-12 22:55:35 +0000 | [diff] [blame^] | 25 | define double @f3(double %a, double %b) nounwind readnone { |
Bill Wendling | c61b506 | 2010-10-12 22:08:41 +0000 | [diff] [blame] | 26 | entry: |
Bill Wendling | 34c2b09 | 2010-10-12 22:55:35 +0000 | [diff] [blame^] | 27 | ; CHECK: f3 |
| 28 | ; CHECK: vsub.f64 d16, d17, d16 @ encoding: [0xe0,0x0b,0x71,0xee] |
| 29 | %sub = fsub double %a, %b |
| 30 | ret double %sub |
| 31 | } |
| 32 | |
| 33 | define float @f4(float %a, float %b) nounwind readnone { |
| 34 | entry: |
| 35 | ; CHECK: f4 |
| 36 | ; CHECK: vsub.f32 s0, s1, s0 @ encoding: [0xc0,0x0a,0x30,0xee] |
| 37 | %sub = fsub float %a, %b |
| 38 | ret float %sub |
| 39 | } |
| 40 | |
| 41 | define i1 @f5(double %a, double %b) nounwind readnone { |
| 42 | entry: |
| 43 | ; CHECK: f5 |
| 44 | ; CHECK: vcmpe.f64 d17, d16 @ encoding: [0xe0,0x1b,0xf4,0xee] |
| 45 | %cmp = fcmp oeq double %a, %b |
| 46 | ret i1 %cmp |
| 47 | } |
| 48 | |
| 49 | define i1 @f6(float %a, float %b) nounwind readnone { |
| 50 | entry: |
| 51 | ; CHECK: f6 |
| 52 | ; CHECK: vcmpe.f32 s1, s0 @ encoding: [0xc0,0x0a,0xf4,0xee] |
| 53 | %cmp = fcmp oeq float %a, %b |
| 54 | ret i1 %cmp |
Bill Wendling | c61b506 | 2010-10-12 22:08:41 +0000 | [diff] [blame] | 55 | } |