1; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small < %s | FileCheck %s
2; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE
3
4; Make sure fast isel uses rip-relative addressing for the small code model.
5define float @constpool_float(float %x) {
6; CHECK-LABEL: constpool_float
7; CHECK:       LCPI0_0(%rip)
8
9; LARGE-LABEL: constpool_float
10; LARGE:       movabsq  $LCPI0_0, %rax
11  %1 = fadd float %x, 16.50e+01
12  ret float %1
13}
14
15define double @constpool_double(double %x) nounwind {
16; CHECK-LABEL: constpool_double
17; CHECK:       LCPI1_0(%rip)
18
19; LARGE-LABEL: constpool_double
20; LARGE:       movabsq  $LCPI1_0, %rax
21  %1 = fadd double %x, 8.500000e-01
22  ret double %1
23}
24