Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 1 | ; Test moves between FPRs. |
| 2 | ; |
| 3 | ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s |
| 4 | |
| 5 | ; Test f32 moves. |
| 6 | define float @f1(float %a, float %b) { |
Stephen Lin | d24ab20 | 2013-07-14 06:24:09 +0000 | [diff] [blame] | 7 | ; CHECK-LABEL: f1: |
Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 8 | ; CHECK: ler %f0, %f2 |
| 9 | ret float %b |
| 10 | } |
| 11 | |
| 12 | ; Test f64 moves. |
| 13 | define double @f2(double %a, double %b) { |
Stephen Lin | d24ab20 | 2013-07-14 06:24:09 +0000 | [diff] [blame] | 14 | ; CHECK-LABEL: f2: |
Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 15 | ; CHECK: ldr %f0, %f2 |
| 16 | ret double %b |
| 17 | } |
| 18 | |
| 19 | ; Test f128 moves. Since f128s are passed by reference, we need to force |
| 20 | ; a copy by other means. |
| 21 | define void @f3(fp128 *%x) { |
Stephen Lin | d24ab20 | 2013-07-14 06:24:09 +0000 | [diff] [blame] | 22 | ; CHECK-LABEL: f3: |
Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 23 | ; CHECK: lxr |
| 24 | ; CHECK: axbr |
| 25 | %val = load volatile fp128 *%x |
| 26 | %sum = fadd fp128 %val, %val |
| 27 | store volatile fp128 %sum, fp128 *%x |
| 28 | store volatile fp128 %val, fp128 *%x |
| 29 | ret void |
| 30 | } |