Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/X86/fast-isel-constpool.ll @ 134:3a76565eade5 LLVM5.0.1
update 5.0.1
author | mir3636 |
---|---|
date | Sat, 17 Feb 2018 09:57:20 +0900 |
parents | 54457678186b |
children |
comparison
equal
deleted
inserted
replaced
133:c60214abe0e8 | 134:3a76565eade5 |
---|---|
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | |
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=small < %s | FileCheck %s |
2 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE | 3 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE |
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 | |
3 | 8 |
4 ; Make sure fast isel uses rip-relative addressing for the small code model. | 9 ; Make sure fast isel uses rip-relative addressing for the small code model. |
5 define float @constpool_float(float %x) { | 10 define float @constpool_float(float %x) { |
6 ; CHECK-LABEL: constpool_float | 11 ; CHECK-LABEL: constpool_float: |
7 ; CHECK: LCPI0_0(%rip) | 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 | |
8 | 34 |
9 ; LARGE-LABEL: constpool_float | |
10 ; LARGE: movabsq $LCPI0_0, %rax | |
11 %1 = fadd float %x, 16.50e+01 | 35 %1 = fadd float %x, 16.50e+01 |
12 ret float %1 | 36 ret float %1 |
13 } | 37 } |
14 | 38 |
15 define double @constpool_double(double %x) nounwind { | 39 define double @constpool_double(double %x) nounwind { |
16 ; CHECK-LABEL: constpool_double | 40 ; CHECK-LABEL: constpool_double: |
17 ; CHECK: LCPI1_0(%rip) | 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 | |
18 | 63 |
19 ; LARGE-LABEL: constpool_double | |
20 ; LARGE: movabsq $LCPI1_0, %rax | |
21 %1 = fadd double %x, 8.500000e-01 | 64 %1 = fadd double %x, 8.500000e-01 |
22 ret double %1 | 65 ret double %1 |
23 } | 66 } |