|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
1 | 2 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=ALL --check-prefix=SSE
|
2 | 3 | ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=ALL --check-prefix=AVX
|
3 | 4 | ;
|
|
21 | 22 | ; ///
|
22 | 23 |
|
23 | 24 | define double @single_to_double_rr(float %x) {
|
24 |
| -; ALL-LABEL: single_to_double_rr: |
25 |
| -; SSE-NOT: vcvtss2sd |
26 |
| -; AVX: vcvtss2sd %xmm0, %xmm0, %xmm0 |
27 |
| -; ALL: ret |
| 25 | +; SSE-LABEL: single_to_double_rr: |
| 26 | +; SSE: # BB#0: # %entry |
| 27 | +; SSE-NEXT: cvtss2sd %xmm0, %xmm0 |
| 28 | +; SSE-NEXT: retq |
| 29 | +; |
| 30 | +; AVX-LABEL: single_to_double_rr: |
| 31 | +; AVX: # BB#0: # %entry |
| 32 | +; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0 |
| 33 | +; AVX-NEXT: retq |
28 | 34 | entry:
|
29 | 35 | %conv = fpext float %x to double
|
30 | 36 | ret double %conv
|
31 | 37 | }
|
32 | 38 |
|
33 | 39 | define float @double_to_single_rr(double %x) {
|
34 |
| -; ALL-LABEL: double_to_single_rr: |
35 |
| -; SSE-NOT: vcvtsd2ss |
36 |
| -; AVX: vcvtsd2ss %xmm0, %xmm0, %xmm0 |
37 |
| -; ALL: ret |
| 40 | +; SSE-LABEL: double_to_single_rr: |
| 41 | +; SSE: # BB#0: # %entry |
| 42 | +; SSE-NEXT: cvtsd2ss %xmm0, %xmm0 |
| 43 | +; SSE-NEXT: retq |
| 44 | +; |
| 45 | +; AVX-LABEL: double_to_single_rr: |
| 46 | +; AVX: # BB#0: # %entry |
| 47 | +; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0 |
| 48 | +; AVX-NEXT: retq |
38 | 49 | entry:
|
39 | 50 | %conv = fptrunc double %x to float
|
40 | 51 | ret float %conv
|
41 | 52 | }
|
42 | 53 |
|
43 | 54 | define double @single_to_double_rm(float* %x) {
|
44 |
| -; ALL-LABEL: single_to_double_rm: |
45 |
| -; SSE: cvtss2sd (%rdi), %xmm0 |
46 |
| -; AVX: vmovss (%rdi), %xmm0 |
47 |
| -; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0 |
48 |
| -; ALL-NEXT: ret |
| 55 | +; SSE-LABEL: single_to_double_rm: |
| 56 | +; SSE: # BB#0: # %entry |
| 57 | +; SSE-NEXT: cvtss2sd (%rdi), %xmm0 |
| 58 | +; SSE-NEXT: retq |
| 59 | +; |
| 60 | +; AVX-LABEL: single_to_double_rm: |
| 61 | +; AVX: # BB#0: # %entry |
| 62 | +; AVX-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero |
| 63 | +; AVX-NEXT: vcvtss2sd %xmm0, %xmm0, %xmm0 |
| 64 | +; AVX-NEXT: retq |
49 | 65 | entry:
|
50 | 66 | %0 = load float, float* %x, align 4
|
51 | 67 | %conv = fpext float %0 to double
|
52 | 68 | ret double %conv
|
53 | 69 | }
|
54 | 70 |
|
55 | 71 | define float @double_to_single_rm(double* %x) {
|
56 |
| -; ALL-LABEL: double_to_single_rm: |
57 |
| -; SSE: cvtsd2ss (%rdi), %xmm0 |
58 |
| -; AVX: vmovsd (%rdi), %xmm0 |
59 |
| -; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0 |
60 |
| -; ALL-NEXT: ret |
| 72 | +; SSE-LABEL: double_to_single_rm: |
| 73 | +; SSE: # BB#0: # %entry |
| 74 | +; SSE-NEXT: cvtsd2ss (%rdi), %xmm0 |
| 75 | +; SSE-NEXT: retq |
| 76 | +; |
| 77 | +; AVX-LABEL: double_to_single_rm: |
| 78 | +; AVX: # BB#0: # %entry |
| 79 | +; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero |
| 80 | +; AVX-NEXT: vcvtsd2ss %xmm0, %xmm0, %xmm0 |
| 81 | +; AVX-NEXT: retq |
61 | 82 | entry:
|
62 | 83 | %0 = load double, double* %x, align 8
|
63 | 84 | %conv = fptrunc double %0 to float
|
|
0 commit comments