Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 248c60f

Browse files
committed
[X86] Add avx command lines to fast-isel-constpool.ll to improve coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316829 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 0cced31 commit 248c60f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/CodeGen/X86/fast-isel-constpool.ll

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small < %s | FileCheck %s
33
; 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
46

57
; Make sure fast isel uses rip-relative addressing for the small code model.
68
define float @constpool_float(float %x) {
@@ -15,6 +17,18 @@ define float @constpool_float(float %x) {
1517
; LARGE-NEXT: movabsq $LCPI0_0, %rax
1618
; LARGE-NEXT: addss (%rax), %xmm0
1719
; LARGE-NEXT: retq
20+
;
21+
; AVX-LABEL: constpool_float:
22+
; AVX: ## BB#0:
23+
; AVX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
24+
; AVX-NEXT: vaddss %xmm1, %xmm0, %xmm0
25+
; AVX-NEXT: retq
26+
;
27+
; LARGE_AVX-LABEL: constpool_float:
28+
; LARGE_AVX: ## BB#0:
29+
; LARGE_AVX-NEXT: movabsq $LCPI0_0, %rax
30+
; LARGE_AVX-NEXT: vaddss (%rax), %xmm0, %xmm0
31+
; LARGE_AVX-NEXT: retq
1832

1933
%1 = fadd float %x, 16.50e+01
2034
ret float %1
@@ -32,6 +46,18 @@ define double @constpool_double(double %x) nounwind {
3246
; LARGE-NEXT: movabsq $LCPI1_0, %rax
3347
; LARGE-NEXT: addsd (%rax), %xmm0
3448
; LARGE-NEXT: retq
49+
;
50+
; AVX-LABEL: constpool_double:
51+
; AVX: ## BB#0:
52+
; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
53+
; AVX-NEXT: vaddsd %xmm1, %xmm0, %xmm0
54+
; AVX-NEXT: retq
55+
;
56+
; LARGE_AVX-LABEL: constpool_double:
57+
; LARGE_AVX: ## BB#0:
58+
; LARGE_AVX-NEXT: movabsq $LCPI1_0, %rax
59+
; LARGE_AVX-NEXT: vaddsd (%rax), %xmm0, %xmm0
60+
; LARGE_AVX-NEXT: retq
3561

3662
%1 = fadd double %x, 8.500000e-01
3763
ret double %1

0 commit comments

Comments
 (0)