134
|
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
77
|
2 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small < %s | FileCheck %s
|
|
3 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE
|
134
|
4 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small -mattr=avx < %s | FileCheck %s --check-prefix=AVX
|
|
5 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large -mattr=avx < %s | FileCheck %s --check-prefix=LARGE_AVX
|
|
6 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small -mattr=avx512f < %s | FileCheck %s --check-prefix=AVX
|
|
7 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large -mattr=avx512f < %s | FileCheck %s --check-prefix=LARGE_AVX
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8
|
77
|
9 ; Make sure fast isel uses rip-relative addressing for the small code model.
|
|
10 define float @constpool_float(float %x) {
|
134
|
11 ; CHECK-LABEL: constpool_float:
|
|
12 ; CHECK: ## %bb.0:
|
|
13 ; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
14 ; CHECK-NEXT: addss %xmm1, %xmm0
|
|
15 ; CHECK-NEXT: retq
|
|
16 ;
|
|
17 ; LARGE-LABEL: constpool_float:
|
|
18 ; LARGE: ## %bb.0:
|
|
19 ; LARGE-NEXT: movabsq $LCPI0_0, %rax
|
|
20 ; LARGE-NEXT: addss (%rax), %xmm0
|
|
21 ; LARGE-NEXT: retq
|
|
22 ;
|
|
23 ; AVX-LABEL: constpool_float:
|
|
24 ; AVX: ## %bb.0:
|
|
25 ; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
|
26 ; AVX-NEXT: vaddss %xmm1, %xmm0, %xmm0
|
|
27 ; AVX-NEXT: retq
|
|
28 ;
|
|
29 ; LARGE_AVX-LABEL: constpool_float:
|
|
30 ; LARGE_AVX: ## %bb.0:
|
|
31 ; LARGE_AVX-NEXT: movabsq $LCPI0_0, %rax
|
|
32 ; LARGE_AVX-NEXT: vaddss (%rax), %xmm0, %xmm0
|
|
33 ; LARGE_AVX-NEXT: retq
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34
|
77
|
35 %1 = fadd float %x, 16.50e+01
|
|
36 ret float %1
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 }
|
77
|
38
|
|
39 define double @constpool_double(double %x) nounwind {
|
134
|
40 ; CHECK-LABEL: constpool_double:
|
|
41 ; CHECK: ## %bb.0:
|
|
42 ; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
|
|
43 ; CHECK-NEXT: addsd %xmm1, %xmm0
|
|
44 ; CHECK-NEXT: retq
|
|
45 ;
|
|
46 ; LARGE-LABEL: constpool_double:
|
|
47 ; LARGE: ## %bb.0:
|
|
48 ; LARGE-NEXT: movabsq $LCPI1_0, %rax
|
|
49 ; LARGE-NEXT: addsd (%rax), %xmm0
|
|
50 ; LARGE-NEXT: retq
|
|
51 ;
|
|
52 ; AVX-LABEL: constpool_double:
|
|
53 ; AVX: ## %bb.0:
|
|
54 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
|
|
55 ; AVX-NEXT: vaddsd %xmm1, %xmm0, %xmm0
|
|
56 ; AVX-NEXT: retq
|
|
57 ;
|
|
58 ; LARGE_AVX-LABEL: constpool_double:
|
|
59 ; LARGE_AVX: ## %bb.0:
|
|
60 ; LARGE_AVX-NEXT: movabsq $LCPI1_0, %rax
|
|
61 ; LARGE_AVX-NEXT: vaddsd (%rax), %xmm0, %xmm0
|
|
62 ; LARGE_AVX-NEXT: retq
|
77
|
63
|
|
64 %1 = fadd double %x, 8.500000e-01
|
|
65 ret double %1
|
|
66 }
|