]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/X86/GlobalISel/legalize-sub-v128.mir
Vendor import of llvm trunk r303571:
[FreeBSD/FreeBSD.git] / test / CodeGen / X86 / GlobalISel / legalize-sub-v128.mir
1 # RUN: llc -mtriple=x86_64-linux-gnu -mattr=+sse2 -global-isel -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=SSE2
2
3 --- |
4   define void @test_sub_v16i8() {
5     %ret = sub <16 x i8> undef, undef
6     ret void
7   }
8
9   define void @test_sub_v8i16() {
10     %ret = sub <8 x i16> undef, undef
11     ret void
12   }
13
14   define void @test_sub_v4i32() {
15     %ret = sub <4 x i32> undef, undef
16     ret void
17   }
18
19   define void @test_sub_v2i64() {
20     %ret = sub <2 x i64> undef, undef
21     ret void
22   }
23 ...
24 ---
25 name:            test_sub_v16i8
26 # ALL-LABEL: name:  test_sub_v16i8
27 alignment:       4
28 legalized:       false
29 regBankSelected: false
30 registers:
31   - { id: 0, class: _ }
32   - { id: 1, class: _ }
33   - { id: 2, class: _ }
34 # ALL:          %0(<16 x s8>) = IMPLICIT_DEF
35 # ALL-NEXT:     %1(<16 x s8>) = IMPLICIT_DEF
36 # ALL-NEXT:     %2(<16 x s8>) = G_SUB %0, %1
37 # ALL-NEXT:     RET 0
38 body:             |
39   bb.1 (%ir-block.0):
40     liveins: %xmm0, %xmm1
41
42     %0(<16 x s8>) = IMPLICIT_DEF
43     %1(<16 x s8>) = IMPLICIT_DEF
44     %2(<16 x s8>) = G_SUB %0, %1
45     RET 0
46
47 ...
48 ---
49 name:            test_sub_v8i16
50 # ALL-LABEL: name:  test_sub_v8i16
51 alignment:       4
52 legalized:       false
53 regBankSelected: false
54 registers:
55   - { id: 0, class: _ }
56   - { id: 1, class: _ }
57   - { id: 2, class: _ }
58 # ALL:          %0(<8 x s16>) = IMPLICIT_DEF
59 # ALL-NEXT:     %1(<8 x s16>) = IMPLICIT_DEF
60 # ALL-NEXT:     %2(<8 x s16>) = G_SUB %0, %1
61 # ALL-NEXT:     RET 0
62 body:             |
63   bb.1 (%ir-block.0):
64     liveins: %xmm0, %xmm1
65
66     %0(<8 x s16>) = IMPLICIT_DEF
67     %1(<8 x s16>) = IMPLICIT_DEF
68     %2(<8 x s16>) = G_SUB %0, %1
69     RET 0
70
71 ...
72 ---
73 name:            test_sub_v4i32
74 # ALL-LABEL: name:  test_sub_v4i32
75 alignment:       4
76 legalized:       false
77 regBankSelected: false
78 registers:
79   - { id: 0, class: _ }
80   - { id: 1, class: _ }
81   - { id: 2, class: _ }
82 # ALL:          %0(<4 x s32>) = IMPLICIT_DEF
83 # ALL-NEXT:     %1(<4 x s32>) = IMPLICIT_DEF
84 # ALL-NEXT:     %2(<4 x s32>) = G_SUB %0, %1
85 # ALL-NEXT:     RET 0
86 body:             |
87   bb.1 (%ir-block.0):
88     liveins: %xmm0, %xmm1
89
90     %0(<4 x s32>) = IMPLICIT_DEF
91     %1(<4 x s32>) = IMPLICIT_DEF
92     %2(<4 x s32>) = G_SUB %0, %1
93     RET 0
94
95 ...
96 ---
97 name:            test_sub_v2i64
98 # ALL-LABEL: name:  test_sub_v2i64
99 alignment:       4
100 legalized:       false
101 regBankSelected: false
102 registers:
103   - { id: 0, class: _ }
104   - { id: 1, class: _ }
105   - { id: 2, class: _ }
106 # ALL:          %0(<2 x s64>) = IMPLICIT_DEF
107 # ALL-NEXT:     %1(<2 x s64>) = IMPLICIT_DEF
108 # ALL-NEXT:     %2(<2 x s64>) = G_SUB %0, %1
109 # ALL-NEXT:     RET 0
110 body:             |
111   bb.1 (%ir-block.0):
112     liveins: %xmm0, %xmm1
113
114     %0(<2 x s64>) = IMPLICIT_DEF
115     %1(<2 x s64>) = IMPLICIT_DEF
116     %2(<2 x s64>) = G_SUB %0, %1
117     RET 0
118
119 ...