Lines Matching full:4
4 define <4 x i8> @splat_binop_non_splat_x(<4 x i8> %x, <4 x i8> %y) {
6 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> poison, <4 x i32> <i32 0, i32 2, i32 poison, i32 poison>
7 ; CHECK-NEXT: call void @use(<4 x i8> [[XSPLAT]])
8 ; CHECK-NEXT: [[B:%.*]] = add <4 x i8> [[XSPLAT]], [[Y:%.*]]
9 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i8> [[B]], <4 x i8> poison, <4 x i32> zeroinitializer
10 ; CHECK-NEXT: ret <4 x i8> [[BSPLAT]]
12 %xsplat = shufflevector <4 x i8> %x, <4 x i8> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
13 call void @use(<4 x i8> %xsplat)
14 %b = add <4 x i8> %xsplat, %y
15 %bsplat = shufflevector <4 x i8> %b, <4 x i8> poison, <4 x i32> zeroinitializer
16 ret <4 x i8> %bsplat
19 define <4 x i8> @non_splat_binop_splat_x(<4 x i8> %x, <4 x i8> %y) {
21 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> poison, <4 x i32> zeroinitializer
22 ; CHECK-NEXT: call void @use(<4 x i8> [[XSPLAT]])
23 ; CHECK-NEXT: [[B:%.*]] = sub <4 x i8> [[XSPLAT]], [[Y:%.*]]
24 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i8> [[B]], <4 x i8> poison, <4 x i32> <i32 0, i32 2, i32 poison, i32 poison>
25 ; CHECK-NEXT: ret <4 x i8> [[BSPLAT]]
27 %xsplat = shufflevector <4 x i8> %x, <4 x i8> poison, <4 x i32> zeroinitializer
28 call void @use(<4 x i8> %xsplat)
29 %b = sub <4 x i8> %xsplat, %y
30 %bsplat = shufflevector <4 x i8> %b, <4 x i8> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
31 ret <4 x i8> %bsplat
34 define <4 x i32> @splat_binop_splat_changes_x_length(<8 x i32> %x, <4 x i32> %y) {
36 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <8 x i32> [[X:%.*]], <8 x i32> poison, <4 x i32> zeroinitializer
37 ; CHECK-NEXT: call void @use(<4 x i32> [[XSPLAT]])
38 ; CHECK-NEXT: [[B:%.*]] = mul <4 x i32> [[XSPLAT]], [[Y:%.*]]
39 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i32> [[B]], <4 x i32> poison, <4 x i32> zeroinitializer
40 ; CHECK-NEXT: ret <4 x i32> [[BSPLAT]]
42 %xsplat = shufflevector <8 x i32> %x, <8 x i32> poison, <4 x i32> zeroinitializer
43 call void @use(<4 x i32> %xsplat)
44 %b = mul <4 x i32> %xsplat, %y
45 %bsplat = shufflevector <4 x i32> %b, <4 x i32> poison, <4 x i32> zeroinitializer
46 ret <4 x i32> %bsplat
49 define <4 x i8> @splat_binop_splat_x(<4 x i8> %x, <4 x i8> %y) {
51 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> poison, <4 x i32> zeroinitializer
52 ; CHECK-NEXT: call void @use(<4 x i8> [[XSPLAT]])
53 ; CHECK-NEXT: [[TMP1:%.*]] = add nsw <4 x i8> [[X]], [[Y:%.*]]
54 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i8> [[TMP1]], <4 x i8> poison, <4 x i32> zeroinitializer
55 ; CHECK-NEXT: ret <4 x i8> [[BSPLAT]]
57 %xsplat = shufflevector <4 x i8> %x, <4 x i8> poison, <4 x i32> zeroinitializer
58 call void @use(<4 x i8> %xsplat)
59 %b = add nsw <4 x i8> %xsplat, %y
60 %bsplat = shufflevector <4 x i8> %b, <4 x i8> poison, <4 x i32> zeroinitializer
61 ret <4 x i8> %bsplat
64 define <4 x i8> @splat_binop_splat_y(<4 x i8> %x, <4 x i8> %y) {
66 ; CHECK-NEXT: [[YSPLAT:%.*]] = shufflevector <4 x i8> [[Y:%.*]], <4 x i8> poison, <4 x i32> zeroinitializer
67 ; CHECK-NEXT: call void @use(<4 x i8> [[YSPLAT]])
68 ; CHECK-NEXT: [[TMP1:%.*]] = sub <4 x i8> [[X:%.*]], [[Y]]
69 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i8> [[TMP1]], <4 x i8> poison, <4 x i32> <i32 poison, i32 0, i32 0, i32 0>
70 ; CHECK-NEXT: ret <4 x i8> [[BSPLAT]]
72 %ysplat = shufflevector <4 x i8> %y, <4 x i8> poison, <4 x i32> zeroinitializer
73 call void @use(<4 x i8> %ysplat)
74 %b = sub <4 x i8> %x, %ysplat
75 %bsplat = shufflevector <4 x i8> %b, <4 x i8> poison, <4 x i32><i32 poison, i32 0, i32 0, i32 0>
76 ret <4 x i8> %bsplat
79 define <4 x i8> @splat_binop_splat_x_splat_y(<4 x i8> %x, <4 x i8> %y) {
81 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <4 x i8> [[X:%.*]], <4 x i8> poison, <4 x i32> zeroinitializer
82 ; CHECK-NEXT: call void @use(<4 x i8> [[XSPLAT]])
83 ; CHECK-NEXT: [[YSPLAT:%.*]] = shufflevector <4 x i8> [[Y:%.*]], <4 x i8> poison, <4 x i32> zeroinitializer
84 ; CHECK-NEXT: call void @use(<4 x i8> [[YSPLAT]])
85 ; CHECK-NEXT: [[TMP1:%.*]] = mul nuw <4 x i8> [[X]], [[Y]]
86 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x i8> [[TMP1]], <4 x i8> poison, <4 x i32> zeroinitializer
87 ; CHECK-NEXT: ret <4 x i8> [[BSPLAT]]
89 %xsplat = shufflevector <4 x i8> %x, <4 x i8> poison, <4 x i32> zeroinitializer
90 call void @use(<4 x i8> %xsplat)
91 %ysplat = shufflevector <4 x i8> %y, <4 x i8> poison, <4 x i32> zeroinitializer
92 call void @use(<4 x i8> %ysplat)
93 %b = mul nuw <4 x i8> %xsplat, %ysplat
94 %bsplat = shufflevector <4 x i8> %b, <4 x i8> poison, <4 x i32> zeroinitializer
95 ret <4 x i8> %bsplat
98 define <4 x float> @splat_binop_splat_x_splat_y_fmath_flags(<4 x float> %x, <4 x float> %y) {
100 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <4 x float> [[X:%.*]], <4 x float> poison, <4 x i32> zeroinitializer
101 ; CHECK-NEXT: call void @use(<4 x float> [[XSPLAT]])
102 ; CHECK-NEXT: [[YSPLAT:%.*]] = shufflevector <4 x float> [[Y:%.*]], <4 x float> poison, <4 x i32> zeroinitializer
103 ; CHECK-NEXT: call void @use(<4 x float> [[YSPLAT]])
104 ; CHECK-NEXT: [[TMP1:%.*]] = fmul fast <4 x float> [[X]], [[Y]]
105 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <4 x float> [[TMP1]], <4 x float> poison, <4 x i32> zeroinitializer
106 ; CHECK-NEXT: ret <4 x float> [[BSPLAT]]
108 %xsplat = shufflevector <4 x float> %x, <4 x float> poison, <4 x i32> zeroinitializer
109 call void @use(<4 x float> %xsplat)
110 %ysplat = shufflevector <4 x float> %y, <4 x float> poison, <4 x i32> zeroinitializer
111 call void @use(<4 x float> %ysplat)
112 %b = fmul fast <4 x float> %xsplat, %ysplat
113 %bsplat = shufflevector <4 x float> %b, <4 x float> poison, <4 x i32> zeroinitializer
114 ret <4 x float> %bsplat
117 define <vscale x 4 x i32> @vscale_splat_udiv_splat_x(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
119 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[X:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
120 ; CHECK-NEXT: [[B:%.*]] = udiv <vscale x 4 x i32> [[XSPLAT]], [[Y:%.*]]
121 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[B]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
122 ; CHECK-NEXT: ret <vscale x 4 x i32> [[BSPLAT]]
124 %xsplat = shufflevector <vscale x 4 x i32> %x, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
125 %b = udiv <vscale x 4 x i32> %xsplat, %y
126 %bsplat = shufflevector <vscale x 4 x i32> %b, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
127 ret <vscale x 4 x i32> %bsplat
130 define <vscale x 4 x i32> @vscale_splat_urem_splat_x(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
132 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[X:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
133 ; CHECK-NEXT: [[B:%.*]] = urem <vscale x 4 x i32> [[XSPLAT]], [[Y:%.*]]
134 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[B]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
135 ; CHECK-NEXT: ret <vscale x 4 x i32> [[BSPLAT]]
137 %xsplat = shufflevector <vscale x 4 x i32> %x, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
138 %b = urem <vscale x 4 x i32> %xsplat, %y
139 %bsplat = shufflevector <vscale x 4 x i32> %b, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
140 ret <vscale x 4 x i32> %bsplat
143 define <vscale x 4 x i32> @vscale_splat_binop_splat_y(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
145 ; CHECK-NEXT: [[YSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[Y:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
146 ; CHECK-NEXT: [[B:%.*]] = sdiv <vscale x 4 x i32> [[X:%.*]], [[YSPLAT]]
147 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[B]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
148 ; CHECK-NEXT: ret <vscale x 4 x i32> [[BSPLAT]]
150 %ysplat = shufflevector <vscale x 4 x i32> %y, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
151 %b = sdiv <vscale x 4 x i32> %x, %ysplat
152 %bsplat = shufflevector <vscale x 4 x i32> %b, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
153 ret <vscale x 4 x i32> %bsplat
156 define <vscale x 4 x i32> @vscale_splat_binop_splat_x_splat_y(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
158 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <vscale x 4 x i32> [[X:%.*]], [[Y:%.*]]
159 ; CHECK-NEXT: [[B:%.*]] = shufflevector <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
160 ; CHECK-NEXT: ret <vscale x 4 x i32> [[B]]
162 %xsplat = shufflevector <vscale x 4 x i32> %x, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
163 %ysplat = shufflevector <vscale x 4 x i32> %y, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
164 %b = ashr <vscale x 4 x i32> %xsplat, %ysplat
165 %bsplat = shufflevector <vscale x 4 x i32> %b, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
166 ret <vscale x 4 x i32> %bsplat
169 define <vscale x 4 x i32> @vscale_splat_binop_splat_x_splat_y_calls(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y) {
171 ; CHECK-NEXT: [[XSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[X:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
172 ; CHECK-NEXT: call void @use_v(<vscale x 4 x i32> [[XSPLAT]])
173 ; CHECK-NEXT: [[YSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[Y:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
174 ; CHECK-NEXT: call void @use_v(<vscale x 4 x i32> [[YSPLAT]])
175 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <vscale x 4 x i32> [[X]], [[Y]]
176 ; CHECK-NEXT: [[BSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[TMP1]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
177 ; CHECK-NEXT: ret <vscale x 4 x i32> [[BSPLAT]]
179 %xsplat = shufflevector <vscale x 4 x i32> %x, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
180 call void @use_v(<vscale x 4 x i32> %xsplat)
181 %ysplat = shufflevector <vscale x 4 x i32> %y, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
182 call void @use_v(<vscale x 4 x i32> %ysplat)
183 %b = lshr <vscale x 4 x i32> %xsplat, %ysplat
184 %bsplat = shufflevector <vscale x 4 x i32> %b, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
185 ret <vscale x 4 x i32> %bsplat
221 declare void @use(<4 x i8>)
222 declare void @use_v(<vscale x 4 x i32>)