1 ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \
2 ; RUN: -verify-machineinstrs -stop-after=finalize-isel < %s | \
3 ; RUN: FileCheck --check-prefixes=POWR8,VSX %s
4 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr7 \
5 ; RUN: -verify-machineinstrs -mattr=-vsx -stop-after=finalize-isel \
6 ; RUN: < %s | FileCheck %s --check-prefixes=NOVSX,NOP8V
7 ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr7 \
8 ; RUN: -verify-machineinstrs -mattr=vsx -stop-after=finalize-isel \
9 ; RUN: < %s | FileCheck %s --check-prefixes=VSX,NOP8V
11 define float @vssr(float %a, float %b, float %c, float %d, float %e) {
13 %add = fadd float %a, %b
14 %add1 = fadd float %add, %c
15 %add2 = fadd float %add1, %d
16 %add3 = fadd float %add2, %e
20 ; POWR8-LABEL: name: vssr
21 ; POWR8: - { id: 0, class: vssrc, preferred-register: '' }
22 ; POWR8: - { id: 1, class: vssrc, preferred-register: '' }
23 ; POWR8: - { id: 2, class: vssrc, preferred-register: '' }
24 ; POWR8: - { id: 3, class: vssrc, preferred-register: '' }
25 ; POWR8: - { id: 4, class: vssrc, preferred-register: '' }
26 ; POWR8: - { id: 5, class: vssrc, preferred-register: '' }
27 ; POWR8: - { id: 6, class: vssrc, preferred-register: '' }
28 ; POWR8: - { id: 7, class: vssrc, preferred-register: '' }
29 ; POWR8: - { id: 8, class: vssrc, preferred-register: '' }
30 ; POWR8: %4:vssrc = COPY $f5
31 ; POWR8: %3:vssrc = COPY $f4
32 ; POWR8: %2:vssrc = COPY $f3
33 ; POWR8: %1:vssrc = COPY $f2
34 ; POWR8: %0:vssrc = COPY $f1
35 ; POWR8: %5:vssrc = nofpexcept XSADDSP %0, %1
36 ; POWR8: %6:vssrc = nofpexcept XSADDSP killed %5, %2
37 ; POWR8: %7:vssrc = nofpexcept XSADDSP killed %6, %3
38 ; POWR8: %8:vssrc = nofpexcept XSADDSP killed %7, %4
39 ; POWR8: $f1 = COPY %8
41 ; NOP8V-LABEL: name: vssr
43 ; NOP8V: - { id: 0, class: f4rc, preferred-register: '' }
44 ; NOP8V: - { id: 1, class: f4rc, preferred-register: '' }
45 ; NOP8V: - { id: 2, class: f4rc, preferred-register: '' }
46 ; NOP8V: - { id: 3, class: f4rc, preferred-register: '' }
47 ; NOP8V: - { id: 4, class: f4rc, preferred-register: '' }
48 ; NOP8V: - { id: 5, class: f4rc, preferred-register: '' }
49 ; NOP8V: - { id: 6, class: f4rc, preferred-register: '' }
50 ; NOP8V: - { id: 7, class: f4rc, preferred-register: '' }
51 ; NOP8V: - { id: 8, class: f4rc, preferred-register: '' }
52 ; NOP8V: %4:f4rc = COPY $f5
53 ; NOP8V: %3:f4rc = COPY $f4
54 ; NOP8V: %2:f4rc = COPY $f3
55 ; NOP8V: %1:f4rc = COPY $f2
56 ; NOP8V: %0:f4rc = COPY $f1
57 ; NOP8V: %5:f4rc = nofpexcept FADDS %0, %1, implicit $rm
58 ; NOP8V: %6:f4rc = nofpexcept FADDS killed %5, %2, implicit $rm
59 ; NOP8V: %7:f4rc = nofpexcept FADDS killed %6, %3, implicit $rm
60 ; NOP8V: %8:f4rc = nofpexcept FADDS killed %7, %4, implicit $rm
61 ; NOP8V: $f1 = COPY %8
63 define double @vsfr(double %a, double %b, double %c, double %d, double %e) {
65 %add = fadd double %a, %b
66 %add1 = fadd double %add, %c
67 %add2 = fadd double %add1, %d
68 %add3 = fadd double %add2, %e
74 ; VSX: - { id: 0, class: vsfrc, preferred-register: '' }
75 ; VSX: - { id: 1, class: vsfrc, preferred-register: '' }
76 ; VSX: - { id: 2, class: vsfrc, preferred-register: '' }
77 ; VSX: - { id: 3, class: vsfrc, preferred-register: '' }
78 ; VSX: - { id: 4, class: vsfrc, preferred-register: '' }
79 ; VSX: - { id: 5, class: vsfrc, preferred-register: '' }
80 ; VSX: - { id: 6, class: vsfrc, preferred-register: '' }
81 ; VSX: - { id: 7, class: vsfrc, preferred-register: '' }
82 ; VSX: - { id: 8, class: vsfrc, preferred-register: '' }
83 ; VSX: %4:vsfrc = COPY $f5
84 ; VSX: %3:vsfrc = COPY $f4
85 ; VSX: %2:vsfrc = COPY $f3
86 ; VSX: %1:vsfrc = COPY $f2
87 ; VSX: %0:vsfrc = COPY $f1
88 ; VSX: %5:vsfrc = nofpexcept XSADDDP %0, %1, implicit $rm
89 ; VSX: %6:vsfrc = nofpexcept XSADDDP killed %5, %2, implicit $rm
90 ; VSX: %7:vsfrc = nofpexcept XSADDDP killed %6, %3, implicit $rm
91 ; VSX: %8:vsfrc = nofpexcept XSADDDP killed %7, %4, implicit $rm
96 ; NOVSX: - { id: 0, class: f8rc, preferred-register: '' }
97 ; NOVSX: - { id: 1, class: f8rc, preferred-register: '' }
98 ; NOVSX: - { id: 2, class: f8rc, preferred-register: '' }
99 ; NOVSX: - { id: 3, class: f8rc, preferred-register: '' }
100 ; NOVSX: - { id: 4, class: f8rc, preferred-register: '' }
101 ; NOVSX: - { id: 5, class: f8rc, preferred-register: '' }
102 ; NOVSX: - { id: 6, class: f8rc, preferred-register: '' }
103 ; NOVSX: - { id: 7, class: f8rc, preferred-register: '' }
104 ; NOVSX: - { id: 8, class: f8rc, preferred-register: '' }
105 ; NOVSX: %4:f8rc = COPY $f5
106 ; NOVSX: %3:f8rc = COPY $f4
107 ; NOVSX: %2:f8rc = COPY $f3
108 ; NOVSX: %1:f8rc = COPY $f2
109 ; NOVSX: %0:f8rc = COPY $f1
110 ; NOVSX: %5:f8rc = nofpexcept FADD %0, %1, implicit $rm
111 ; NOVSX: %6:f8rc = nofpexcept FADD killed %5, %2, implicit $rm
112 ; NOVSX: %7:f8rc = nofpexcept FADD killed %6, %3, implicit $rm
113 ; NOVSX: %8:f8rc = nofpexcept FADD killed %7, %4, implicit $rm
114 ; NOVSX: $f1 = COPY %8