|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
1 | 2 | ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small < %s | FileCheck %s
|
2 | 3 | ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE
|
3 | 4 |
|
4 | 5 | ; Make sure fast isel uses rip-relative addressing for the small code model.
|
5 | 6 | define float @constpool_float(float %x) {
|
6 |
| -; CHECK-LABEL: constpool_float |
7 |
| -; CHECK: LCPI0_0(%rip) |
| 7 | +; CHECK-LABEL: constpool_float: |
| 8 | +; CHECK: ## BB#0: |
| 9 | +; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero |
| 10 | +; CHECK-NEXT: addss %xmm1, %xmm0 |
| 11 | +; CHECK-NEXT: retq |
| 12 | +; |
| 13 | +; LARGE-LABEL: constpool_float: |
| 14 | +; LARGE: ## BB#0: |
| 15 | +; LARGE-NEXT: movabsq $LCPI0_0, %rax |
| 16 | +; LARGE-NEXT: addss (%rax), %xmm0 |
| 17 | +; LARGE-NEXT: retq |
8 | 18 |
|
9 |
| -; LARGE-LABEL: constpool_float |
10 |
| -; LARGE: movabsq $LCPI0_0, %rax |
11 | 19 | %1 = fadd float %x, 16.50e+01
|
12 | 20 | ret float %1
|
13 | 21 | }
|
14 | 22 |
|
15 | 23 | define double @constpool_double(double %x) nounwind {
|
16 |
| -; CHECK-LABEL: constpool_double |
17 |
| -; CHECK: LCPI1_0(%rip) |
| 24 | +; CHECK-LABEL: constpool_double: |
| 25 | +; CHECK: ## BB#0: |
| 26 | +; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero |
| 27 | +; CHECK-NEXT: addsd %xmm1, %xmm0 |
| 28 | +; CHECK-NEXT: retq |
| 29 | +; |
| 30 | +; LARGE-LABEL: constpool_double: |
| 31 | +; LARGE: ## BB#0: |
| 32 | +; LARGE-NEXT: movabsq $LCPI1_0, %rax |
| 33 | +; LARGE-NEXT: addsd (%rax), %xmm0 |
| 34 | +; LARGE-NEXT: retq |
18 | 35 |
|
19 |
| -; LARGE-LABEL: constpool_double |
20 |
| -; LARGE: movabsq $LCPI1_0, %rax |
21 | 36 | %1 = fadd double %x, 8.500000e-01
|
22 | 37 | ret double %1
|
23 | 38 | }
|
0 commit comments