Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \ |
| 2 | ; RUN: grep {mov r0, #0} | wc -l | grep 1 |
| 3 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ |
| 4 | ; RUN: grep {flds.*\\\[} | wc -l | grep 1 |
| 5 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | \ |
| 6 | ; RUN: grep {fsts.*\\\[} | wc -l | grep 1 |
| 7 | |
| 8 | float %f1(float %a) { |
| 9 | ret float 0.000000e+00 |
| 10 | } |
| 11 | |
| 12 | float %f2(float* %v, float %u) { |
| 13 | %tmp = load float* %v |
| 14 | %tmp1 = add float %tmp, %u |
| 15 | ret float %tmp1 |
| 16 | } |
| 17 | |
| 18 | void %f3(float %a, float %b, float* %v) { |
| 19 | %tmp = add float %a, %b |
| 20 | store float %tmp, float* %v |
| 21 | ret void |
| 22 | } |