blob: 9427a8a57cdfbd8a627adb636af1f6591a70262e [file] [log] [blame]
Jim Grosbachf7947052012-07-09 18:34:21 +00001// REQUIRES: ppc32-registered-target
Chris Lattnerdd173942010-04-14 03:54:58 +00002// RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
3
Anton Yartsev05e35552010-08-16 16:22:12 +00004vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 };
Chris Lattner35b21b82010-06-27 01:06:27 +00005vector signed char vsc = { 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16 };
6vector unsigned char vuc = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
Anton Yartsev05e35552010-08-16 16:22:12 +00007vector bool short vbs = { 1, 0, 1, 0, 1, 0, 1, 0 };
Chris Lattner35b21b82010-06-27 01:06:27 +00008vector short vs = { -1, 2, -3, 4, -5, 6, -7, 8 };
9vector unsigned short vus = { 1, 2, 3, 4, 5, 6, 7, 8 };
Anton Yartsevf54dbfd2010-08-19 03:00:09 +000010vector pixel vp = { 1, 2, 3, 4, 5, 6, 7, 8 };
Anton Yartsev05e35552010-08-16 16:22:12 +000011vector bool int vbi = { 1, 0, 1, 0 };
Chris Lattner35b21b82010-06-27 01:06:27 +000012vector int vi = { -1, 2, -3, 4 };
13vector unsigned int vui = { 1, 2, 3, 4 };
14vector float vf = { -1.5, 2.5, -3.5, 4.5 };
Chris Lattnerdd173942010-04-14 03:54:58 +000015
Anton Yartsev05e35552010-08-16 16:22:12 +000016vector bool char res_vbc;
Chris Lattner35b21b82010-06-27 01:06:27 +000017vector signed char res_vsc;
18vector unsigned char res_vuc;
Anton Yartsev05e35552010-08-16 16:22:12 +000019vector bool short res_vbs;
Chris Lattner35b21b82010-06-27 01:06:27 +000020vector short res_vs;
21vector unsigned short res_vus;
Chris Lattner35b21b82010-06-27 01:06:27 +000022vector pixel res_vp;
Anton Yartsev05e35552010-08-16 16:22:12 +000023vector bool int res_vbi;
Chris Lattner35b21b82010-06-27 01:06:27 +000024vector int res_vi;
25vector unsigned int res_vui;
26vector float res_vf;
Chris Lattnerdd173942010-04-14 03:54:58 +000027
Chris Lattner35b21b82010-06-27 01:06:27 +000028signed char param_sc;
29unsigned char param_uc;
30short param_s;
31unsigned short param_us;
32int param_i;
33unsigned int param_ui;
34float param_f;
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000035
Anton Yartsev44270d62010-10-14 14:37:46 +000036int res_sc;
37int res_uc;
38int res_s;
39int res_us;
Chris Lattner35b21b82010-06-27 01:06:27 +000040int res_i;
Anton Yartsev44270d62010-10-14 14:37:46 +000041int res_ui;
42int res_f;
Chris Lattner35b21b82010-06-27 01:06:27 +000043
Anton Yartsev05e35552010-08-16 16:22:12 +000044// CHECK: define void @test1
45void test1() {
Chris Lattnerdd173942010-04-14 03:54:58 +000046
47 /* vec_abs */
Eli Friedmand4b9ee32011-05-06 18:04:18 +000048 vsc = vec_abs(vsc); // CHECK: sub <16 x i8> zeroinitializer
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000049 // CHECK: @llvm.ppc.altivec.vmaxsb
Chris Lattnerdd173942010-04-14 03:54:58 +000050
Eli Friedmand4b9ee32011-05-06 18:04:18 +000051 vs = vec_abs(vs); // CHECK: sub <8 x i16> zeroinitializer
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000052 // CHECK: @llvm.ppc.altivec.vmaxsh
Chris Lattnerdd173942010-04-14 03:54:58 +000053
Eli Friedmand4b9ee32011-05-06 18:04:18 +000054 vi = vec_abs(vi); // CHECK: sub <4 x i32> zeroinitializer
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000055 // CHECK: @llvm.ppc.altivec.vmaxsw
Chris Lattnerdd173942010-04-14 03:54:58 +000056
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000057 vf = vec_abs(vf); // CHECK: and <4 x i32>
Chris Lattnerdd173942010-04-14 03:54:58 +000058
59 /* vec_abs */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000060 vsc = vec_abss(vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
61 // CHECK: @llvm.ppc.altivec.vmaxsb
Chris Lattnerdd173942010-04-14 03:54:58 +000062
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000063 vs = vec_abss(vs); // CHECK: @llvm.ppc.altivec.vsubshs
64 // CHECK: @llvm.ppc.altivec.vmaxsh
Chris Lattnerdd173942010-04-14 03:54:58 +000065
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000066 vi = vec_abss(vi); // CHECK: @llvm.ppc.altivec.vsubsws
67 // CHECK: @llvm.ppc.altivec.vmaxsw
Chris Lattnerdd173942010-04-14 03:54:58 +000068
69 /* vec_add */
Eli Friedmand4b9ee32011-05-06 18:04:18 +000070 res_vsc = vec_add(vsc, vsc); // CHECK: add <16 x i8>
71 res_vsc = vec_add(vbc, vsc); // CHECK: add <16 x i8>
72 res_vsc = vec_add(vsc, vbc); // CHECK: add <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000073 res_vuc = vec_add(vuc, vuc); // CHECK: add <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +000074 res_vuc = vec_add(vbc, vuc); // CHECK: add <16 x i8>
75 res_vuc = vec_add(vuc, vbc); // CHECK: add <16 x i8>
Eli Friedmand4b9ee32011-05-06 18:04:18 +000076 res_vs = vec_add(vs, vs); // CHECK: add <8 x i16>
77 res_vs = vec_add(vbs, vs); // CHECK: add <8 x i16>
78 res_vs = vec_add(vs, vbs); // CHECK: add <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000079 res_vus = vec_add(vus, vus); // CHECK: add <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +000080 res_vus = vec_add(vbs, vus); // CHECK: add <8 x i16>
81 res_vus = vec_add(vus, vbs); // CHECK: add <8 x i16>
Eli Friedmand4b9ee32011-05-06 18:04:18 +000082 res_vi = vec_add(vi, vi); // CHECK: add <4 x i32>
83 res_vi = vec_add(vbi, vi); // CHECK: add <4 x i32>
84 res_vi = vec_add(vi, vbi); // CHECK: add <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000085 res_vui = vec_add(vui, vui); // CHECK: add <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +000086 res_vui = vec_add(vbi, vui); // CHECK: add <4 x i32>
87 res_vui = vec_add(vui, vbi); // CHECK: add <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +000088 res_vf = vec_add(vf, vf); // CHECK: fadd <4 x float>
Eli Friedmand4b9ee32011-05-06 18:04:18 +000089 res_vsc = vec_vaddubm(vsc, vsc); // CHECK: add <16 x i8>
90 res_vsc = vec_vaddubm(vbc, vsc); // CHECK: add <16 x i8>
91 res_vsc = vec_vaddubm(vsc, vbc); // CHECK: add <16 x i8>
Chris Lattnerdd173942010-04-14 03:54:58 +000092 res_vuc = vec_vaddubm(vuc, vuc); // CHECK: add <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +000093 res_vuc = vec_vaddubm(vbc, vuc); // CHECK: add <16 x i8>
94 res_vuc = vec_vaddubm(vuc, vbc); // CHECK: add <16 x i8>
Eli Friedmand4b9ee32011-05-06 18:04:18 +000095 res_vs = vec_vadduhm(vs, vs); // CHECK: add <8 x i16>
96 res_vs = vec_vadduhm(vbs, vs); // CHECK: add <8 x i16>
97 res_vs = vec_vadduhm(vs, vbs); // CHECK: add <8 x i16>
Chris Lattnerdd173942010-04-14 03:54:58 +000098 res_vus = vec_vadduhm(vus, vus); // CHECK: add <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +000099 res_vus = vec_vadduhm(vbs, vus); // CHECK: add <8 x i16>
100 res_vus = vec_vadduhm(vus, vbs); // CHECK: add <8 x i16>
Eli Friedmand4b9ee32011-05-06 18:04:18 +0000101 res_vi = vec_vadduwm(vi, vi); // CHECK: add <4 x i32>
102 res_vi = vec_vadduwm(vbi, vi); // CHECK: add <4 x i32>
103 res_vi = vec_vadduwm(vi, vbi); // CHECK: add <4 x i32>
Chris Lattnerdd173942010-04-14 03:54:58 +0000104 res_vui = vec_vadduwm(vui, vui); // CHECK: add <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000105 res_vui = vec_vadduwm(vbi, vui); // CHECK: add <4 x i32>
106 res_vui = vec_vadduwm(vui, vbi); // CHECK: add <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000107 res_vf = vec_vaddfp(vf, vf); // CHECK: fadd <4 x float>
Chris Lattnerdd173942010-04-14 03:54:58 +0000108
109 /* vec_addc */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000110 res_vui = vec_addc(vui, vui); // HECK: @llvm.ppc.altivec.vaddcuw
Chris Lattnerdd173942010-04-14 03:54:58 +0000111 res_vui = vec_vaddcuw(vui, vui); // HECK: @llvm.ppc.altivec.vaddcuw
112
113 /* vec_adds */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000114 res_vsc = vec_adds(vsc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
Anton Yartsev05e35552010-08-16 16:22:12 +0000115 res_vsc = vec_adds(vbc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
116 res_vsc = vec_adds(vsc, vbc); // CHECK: @llvm.ppc.altivec.vaddsbs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000117 res_vuc = vec_adds(vuc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
Anton Yartsev05e35552010-08-16 16:22:12 +0000118 res_vuc = vec_adds(vbc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
119 res_vuc = vec_adds(vuc, vbc); // CHECK: @llvm.ppc.altivec.vaddubs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000120 res_vs = vec_adds(vs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
Anton Yartsev05e35552010-08-16 16:22:12 +0000121 res_vs = vec_adds(vbs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
122 res_vs = vec_adds(vs, vbs); // CHECK: @llvm.ppc.altivec.vaddshs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000123 res_vus = vec_adds(vus, vus); // CHECK: @llvm.ppc.altivec.vadduhs
Anton Yartsev05e35552010-08-16 16:22:12 +0000124 res_vus = vec_adds(vbs, vus); // CHECK: @llvm.ppc.altivec.vadduhs
125 res_vus = vec_adds(vus, vbs); // CHECK: @llvm.ppc.altivec.vadduhs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000126 res_vi = vec_adds(vi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
Anton Yartsev05e35552010-08-16 16:22:12 +0000127 res_vi = vec_adds(vbi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
128 res_vi = vec_adds(vi, vbi); // CHECK: @llvm.ppc.altivec.vaddsws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000129 res_vui = vec_adds(vui, vui); // CHECK: @llvm.ppc.altivec.vadduws
Anton Yartsev05e35552010-08-16 16:22:12 +0000130 res_vui = vec_adds(vbi, vui); // CHECK: @llvm.ppc.altivec.vadduws
131 res_vui = vec_adds(vui, vbi); // CHECK: @llvm.ppc.altivec.vadduws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000132 res_vsc = vec_vaddsbs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
Anton Yartsev05e35552010-08-16 16:22:12 +0000133 res_vsc = vec_vaddsbs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
134 res_vsc = vec_vaddsbs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vaddsbs
Chris Lattnerdd173942010-04-14 03:54:58 +0000135 res_vuc = vec_vaddubs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
Anton Yartsev05e35552010-08-16 16:22:12 +0000136 res_vuc = vec_vaddubs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
137 res_vuc = vec_vaddubs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vaddubs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000138 res_vs = vec_vaddshs(vs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
Anton Yartsev05e35552010-08-16 16:22:12 +0000139 res_vs = vec_vaddshs(vbs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
140 res_vs = vec_vaddshs(vs, vbs); // CHECK: @llvm.ppc.altivec.vaddshs
Chris Lattnerdd173942010-04-14 03:54:58 +0000141 res_vus = vec_vadduhs(vus, vus); // CHECK: @llvm.ppc.altivec.vadduhs
Anton Yartsev05e35552010-08-16 16:22:12 +0000142 res_vus = vec_vadduhs(vbs, vus); // CHECK: @llvm.ppc.altivec.vadduhs
143 res_vus = vec_vadduhs(vus, vbs); // CHECK: @llvm.ppc.altivec.vadduhs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000144 res_vi = vec_vaddsws(vi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
Anton Yartsev05e35552010-08-16 16:22:12 +0000145 res_vi = vec_vaddsws(vbi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
146 res_vi = vec_vaddsws(vi, vbi); // CHECK: @llvm.ppc.altivec.vaddsws
Chris Lattnerdd173942010-04-14 03:54:58 +0000147 res_vui = vec_vadduws(vui, vui); // CHECK: @llvm.ppc.altivec.vadduws
Anton Yartsev05e35552010-08-16 16:22:12 +0000148 res_vui = vec_vadduws(vbi, vui); // CHECK: @llvm.ppc.altivec.vadduws
149 res_vui = vec_vadduws(vui, vbi); // CHECK: @llvm.ppc.altivec.vadduws
Chris Lattnerdd173942010-04-14 03:54:58 +0000150
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000151 /* vec_and */
152 res_vsc = vec_and(vsc, vsc); // CHECK: and <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +0000153 res_vsc = vec_and(vbc, vsc); // CHECK: and <16 x i8>
154 res_vsc = vec_and(vsc, vbc); // CHECK: and <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000155 res_vuc = vec_and(vuc, vuc); // CHECK: and <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +0000156 res_vuc = vec_and(vbc, vuc); // CHECK: and <16 x i8>
157 res_vuc = vec_and(vuc, vbc); // CHECK: and <16 x i8>
158 res_vbc = vec_and(vbc, vbc); // CHECK: and <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000159 res_vs = vec_and(vs, vs); // CHECK: and <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +0000160 res_vs = vec_and(vbs, vs); // CHECK: and <8 x i16>
161 res_vs = vec_and(vs, vbs); // CHECK: and <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000162 res_vus = vec_and(vus, vus); // CHECK: and <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +0000163 res_vus = vec_and(vbs, vus); // CHECK: and <8 x i16>
164 res_vus = vec_and(vus, vbs); // CHECK: and <8 x i16>
165 res_vbs = vec_and(vbs, vbs); // CHECK: and <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000166 res_vi = vec_and(vi, vi); // CHECK: and <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000167 res_vi = vec_and(vbi, vi); // CHECK: and <4 x i32>
168 res_vi = vec_and(vi, vbi); // CHECK: and <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000169 res_vui = vec_and(vui, vui); // CHECK: and <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000170 res_vui = vec_and(vbi, vui); // CHECK: and <4 x i32>
171 res_vui = vec_and(vui, vbi); // CHECK: and <4 x i32>
172 res_vbi = vec_and(vbi, vbi); // CHECK: and <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000173 res_vsc = vec_vand(vsc, vsc); // CHECK: and <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +0000174 res_vsc = vec_vand(vbc, vsc); // CHECK: and <16 x i8>
175 res_vsc = vec_vand(vsc, vbc); // CHECK: and <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000176 res_vuc = vec_vand(vuc, vuc); // CHECK: and <16 x i8>
Anton Yartsev05e35552010-08-16 16:22:12 +0000177 res_vuc = vec_vand(vbc, vuc); // CHECK: and <16 x i8>
178 res_vuc = vec_vand(vuc, vbc); // CHECK: and <16 x i8>
179 res_vbc = vec_vand(vbc, vbc); // CHECK: and <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000180 res_vs = vec_vand(vs, vs); // CHECK: and <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +0000181 res_vs = vec_vand(vbs, vs); // CHECK: and <8 x i16>
182 res_vs = vec_vand(vs, vbs); // CHECK: and <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000183 res_vus = vec_vand(vus, vus); // CHECK: and <8 x i16>
Anton Yartsev05e35552010-08-16 16:22:12 +0000184 res_vus = vec_vand(vbs, vus); // CHECK: and <8 x i16>
185 res_vus = vec_vand(vus, vbs); // CHECK: and <8 x i16>
186 res_vbs = vec_vand(vbs, vbs); // CHECK: and <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000187 res_vi = vec_vand(vi, vi); // CHECK: and <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000188 res_vi = vec_vand(vbi, vi); // CHECK: and <4 x i32>
189 res_vi = vec_vand(vi, vbi); // CHECK: and <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000190 res_vui = vec_vand(vui, vui); // CHECK: and <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000191 res_vui = vec_vand(vbi, vui); // CHECK: and <4 x i32>
192 res_vui = vec_vand(vui, vbi); // CHECK: and <4 x i32>
193 res_vbi = vec_vand(vbi, vbi); // CHECK: and <4 x i32>
Chris Lattnerdd173942010-04-14 03:54:58 +0000194
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000195 /* vec_andc */
196 res_vsc = vec_andc(vsc, vsc); // CHECK: xor <16 x i8>
197 // CHECK: and <16 x i8>
198
Anton Yartsev05e35552010-08-16 16:22:12 +0000199 res_vsc = vec_andc(vbc, vsc); // CHECK: xor <16 x i8>
200 // CHECK: and <16 x i8>
201
202 res_vsc = vec_andc(vsc, vbc); // CHECK: xor <16 x i8>
203 // CHECK: and <16 x i8>
204
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000205 res_vuc = vec_andc(vuc, vuc); // CHECK: xor <16 x i8>
206 // CHECK: and <16 x i8>
207
Anton Yartsev05e35552010-08-16 16:22:12 +0000208 res_vuc = vec_andc(vbc, vuc); // CHECK: xor <16 x i8>
209 // CHECK: and <16 x i8>
210
211 res_vuc = vec_andc(vuc, vbc); // CHECK: xor <16 x i8>
212 // CHECK: and <16 x i8>
213
214 res_vbc = vec_andc(vbc, vbc); // CHECK: xor <16 x i8>
215 // CHECK: and <16 x i8>
216
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000217 res_vs = vec_andc(vs, vs); // CHECK: xor <8 x i16>
218 // CHECK: and <8 x i16>
219
Anton Yartsev05e35552010-08-16 16:22:12 +0000220 res_vs = vec_andc(vbs, vs); // CHECK: xor <8 x i16>
221 // CHECK: and <8 x i16>
222
223 res_vs = vec_andc(vs, vbs); // CHECK: xor <8 x i16>
224 // CHECK: and <8 x i16>
225
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000226 res_vus = vec_andc(vus, vus); // CHECK: xor <8 x i16>
227 // CHECK: and <8 x i16>
228
Anton Yartsev05e35552010-08-16 16:22:12 +0000229 res_vus = vec_andc(vbs, vus); // CHECK: xor <8 x i16>
230 // CHECK: and <8 x i16>
231
232 res_vus = vec_andc(vus, vbs); // CHECK: xor <8 x i16>
233 // CHECK: and <8 x i16>
234
235 res_vbs = vec_andc(vbs, vbs); // CHECK: xor <8 x i16>
236 // CHECK: and <8 x i16>
237
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000238 res_vi = vec_andc(vi, vi); // CHECK: xor <4 x i32>
239 // CHECK: and <4 x i32>
240
Anton Yartsev05e35552010-08-16 16:22:12 +0000241 res_vi = vec_andc(vbi, vi); // CHECK: xor <4 x i32>
242 // CHECK: and <4 x i32>
243
244 res_vi = vec_andc(vi, vbi); // CHECK: xor <4 x i32>
245 // CHECK: and <4 x i32>
246
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000247 res_vui = vec_andc(vui, vui); // CHECK: xor <4 x i32>
248 // CHECK: and <4 x i32>
249
Anton Yartsev05e35552010-08-16 16:22:12 +0000250 res_vui = vec_andc(vbi, vui); // CHECK: xor <4 x i32>
251 // CHECK: and <4 x i32>
252
253 res_vui = vec_andc(vui, vbi); // CHECK: xor <4 x i32>
254 // CHECK: and <4 x i32>
255
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000256 res_vf = vec_andc(vf, vf); // CHECK: xor <4 x i32>
257 // CHECK: and <4 x i32>
258
Anton Yartsev05e35552010-08-16 16:22:12 +0000259 res_vf = vec_andc(vbi, vf); // CHECK: xor <4 x i32>
260 // CHECK: and <4 x i32>
261
262 res_vf = vec_andc(vf, vbi); // CHECK: xor <4 x i32>
263 // CHECK: and <4 x i32>
264
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000265 res_vsc = vec_vandc(vsc, vsc); // CHECK: xor <16 x i8>
266 // CHECK: and <16 x i8>
267
Anton Yartsev05e35552010-08-16 16:22:12 +0000268 res_vsc = vec_vandc(vbc, vsc); // CHECK: xor <16 x i8>
269 // CHECK: and <16 x i8>
270
271 res_vsc = vec_vandc(vsc, vbc); // CHECK: xor <16 x i8>
272 // CHECK: and <16 x i8>
273
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000274 res_vuc = vec_vandc(vuc, vuc); // CHECK: xor <16 x i8>
275 // CHECK: and <16 x i8>
276
Anton Yartsev05e35552010-08-16 16:22:12 +0000277 res_vuc = vec_vandc(vbc, vuc); // CHECK: xor <16 x i8>
278 // CHECK: and <16 x i8>
279
280 res_vuc = vec_vandc(vuc, vbc); // CHECK: xor <16 x i8>
281 // CHECK: and <16 x i8>
282
283 res_vbc = vec_vandc(vbc, vbc); // CHECK: xor <16 x i8>
284 // CHECK: and <16 x i8>
285
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000286 res_vs = vec_vandc(vs, vs); // CHECK: xor <8 x i16>
287 // CHECK: and <8 x i16>
288
Anton Yartsev05e35552010-08-16 16:22:12 +0000289 res_vs = vec_vandc(vbs, vs); // CHECK: xor <8 x i16>
290 // CHECK: and <8 x i16>
291
292 res_vs = vec_vandc(vs, vbs); // CHECK: xor <8 x i16>
293 // CHECK: and <8 x i16>
294
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000295 res_vus = vec_vandc(vus, vus); // CHECK: xor <8 x i16>
296 // CHECK: and <8 x i16>
297
Anton Yartsev05e35552010-08-16 16:22:12 +0000298 res_vus = vec_vandc(vbs, vus); // CHECK: xor <8 x i16>
299 // CHECK: and <8 x i16>
300
301 res_vus = vec_vandc(vus, vbs); // CHECK: xor <8 x i16>
302 // CHECK: and <8 x i16>
303
304 res_vbs = vec_vandc(vbs, vbs); // CHECK: xor <8 x i16>
305 // CHECK: and <8 x i16>
306
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000307 res_vi = vec_vandc(vi, vi); // CHECK: xor <4 x i32>
308 // CHECK: and <4 x i32>
309
Anton Yartsev05e35552010-08-16 16:22:12 +0000310 res_vi = vec_vandc(vbi, vi); // CHECK: xor <4 x i32>
311 // CHECK: and <4 x i32>
312
313 res_vi = vec_vandc(vi, vbi); // CHECK: xor <4 x i32>
314 // CHECK: and <4 x i32>
315
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000316 res_vui = vec_vandc(vui, vui); // CHECK: xor <4 x i32>
317 // CHECK: and <4 x i32>
318
Anton Yartsev05e35552010-08-16 16:22:12 +0000319 res_vui = vec_vandc(vbi, vui); // CHECK: xor <4 x i32>
320 // CHECK: and <4 x i32>
321
322 res_vui = vec_vandc(vui, vbi); // CHECK: xor <4 x i32>
323 // CHECK: and <4 x i32>
324
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000325 res_vf = vec_vandc(vf, vf); // CHECK: xor <4 x i32>
326 // CHECK: and <4 x i32>
Anton Yartsev05e35552010-08-16 16:22:12 +0000327
328 res_vf = vec_vandc(vbi, vf); // CHECK: xor <4 x i32>
329 // CHECK: and <4 x i32>
330
331 res_vf = vec_vandc(vf, vbi); // CHECK: xor <4 x i32>
332 // CHECK: and <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000333
Chris Lattner35b21b82010-06-27 01:06:27 +0000334}
Chris Lattnerdd173942010-04-14 03:54:58 +0000335
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000336// CHECK: define void @test2
337void test2() {
Chris Lattnerdd173942010-04-14 03:54:58 +0000338 /* vec_avg */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000339 res_vsc = vec_avg(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000340 res_vuc = vec_avg(vuc, vuc); // CHECK: @llvm.ppc.altivec.vavgub
341 res_vs = vec_avg(vs, vs); // CHECK: @llvm.ppc.altivec.vavgsh
342 res_vus = vec_avg(vus, vus); // CHECK: @llvm.ppc.altivec.vavguh
343 res_vi = vec_avg(vi, vi); // CHECK: @llvm.ppc.altivec.vavgsw
344 res_vui = vec_avg(vui, vui); // CHECK: @llvm.ppc.altivec.vavguw
345 res_vsc = vec_vavgsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb
346 res_vuc = vec_vavgub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vavgub
Chris Lattnerdd173942010-04-14 03:54:58 +0000347 res_vs = vec_vavgsh(vs, vs); // CHECK: @llvm.ppc.altivec.vavgsh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000348 res_vus = vec_vavguh(vus, vus); // CHECK: @llvm.ppc.altivec.vavguh
Chris Lattnerdd173942010-04-14 03:54:58 +0000349 res_vi = vec_vavgsw(vi, vi); // CHECK: @llvm.ppc.altivec.vavgsw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000350 res_vui = vec_vavguw(vui, vui); // CHECK: @llvm.ppc.altivec.vavguw
Chris Lattnerdd173942010-04-14 03:54:58 +0000351
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000352 /* vec_ceil */
353 res_vf = vec_ceil(vf); // CHECK: @llvm.ppc.altivec.vrfip
354 res_vf = vec_vrfip(vf); // CHECK: @llvm.ppc.altivec.vrfip
Chris Lattnerdd173942010-04-14 03:54:58 +0000355
356 /* vec_cmpb */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000357 res_vi = vec_cmpb(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp
Chris Lattnerdd173942010-04-14 03:54:58 +0000358 res_vi = vec_vcmpbfp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp
359
360 /* vec_cmpeq */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000361 res_vbc = vec_cmpeq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb
362 res_vbc = vec_cmpeq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb
363 res_vbs = vec_cmpeq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh
364 res_vbs = vec_cmpeq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh
365 res_vbi = vec_cmpeq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw
366 res_vbi = vec_cmpeq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw
367 res_vbi = vec_cmpeq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp
Chris Lattnerdd173942010-04-14 03:54:58 +0000368
369 /* vec_cmpge */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000370 res_vbi = vec_cmpge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
371 res_vbi = vec_vcmpgefp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
Chris Lattner35b21b82010-06-27 01:06:27 +0000372}
373
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000374// CHECK: define void @test5
375void test5() {
Chris Lattner35b21b82010-06-27 01:06:27 +0000376
Chris Lattnerdd173942010-04-14 03:54:58 +0000377 /* vec_cmpgt */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000378 res_vbc = vec_cmpgt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
379 res_vbc = vec_cmpgt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
380 res_vbs = vec_cmpgt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
381 res_vbs = vec_cmpgt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
382 res_vbi = vec_cmpgt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
383 res_vbi = vec_cmpgt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
384 res_vbi = vec_cmpgt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
385 res_vbc = vec_vcmpgtsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
386 res_vbc = vec_vcmpgtub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
387 res_vbs = vec_vcmpgtsh(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
388 res_vbs = vec_vcmpgtuh(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
389 res_vbi = vec_vcmpgtsw(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
390 res_vbi = vec_vcmpgtuw(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
391 res_vbi = vec_vcmpgtfp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
Chris Lattnerdd173942010-04-14 03:54:58 +0000392
393 /* vec_cmple */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000394 res_vbi = vec_cmple(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
Chris Lattner35b21b82010-06-27 01:06:27 +0000395}
Chris Lattnerdd173942010-04-14 03:54:58 +0000396
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000397// CHECK: define void @test6
398void test6() {
Chris Lattnerdd173942010-04-14 03:54:58 +0000399 /* vec_cmplt */
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000400 res_vbc = vec_cmplt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
401 res_vbc = vec_cmplt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
402 res_vbs = vec_cmplt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
403 res_vbs = vec_cmplt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
404 res_vbi = vec_cmplt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
405 res_vbi = vec_cmplt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
406 res_vbi = vec_cmplt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000407
408 /* vec_ctf */
409 res_vf = vec_ctf(vi, param_i); // CHECK: @llvm.ppc.altivec.vcfsx
410 res_vf = vec_ctf(vui, 0); // CHECK: @llvm.ppc.altivec.vcfux
411 res_vf = vec_vcfsx(vi, 0); // CHECK: @llvm.ppc.altivec.vcfsx
412 res_vf = vec_vcfux(vui, 0); // CHECK: @llvm.ppc.altivec.vcfux
413
414 /* vec_cts */
415 res_vi = vec_cts(vf, 0); // CHECK: @llvm.ppc.altivec.vctsxs
416 res_vi = vec_vctsxs(vf, 0); // CHECK: @llvm.ppc.altivec.vctsxs
417
418 /* vec_ctu */
419 res_vui = vec_ctu(vf, 0); // CHECK: @llvm.ppc.altivec.vctuxs
420 res_vui = vec_vctuxs(vf, 0); // CHECK: @llvm.ppc.altivec.vctuxs
421
422 /* vec_dss */
423 vec_dss(param_i); // CHECK: @llvm.ppc.altivec.dss
424
425 /* vec_dssall */
426 vec_dssall(); // CHECK: @llvm.ppc.altivec.dssall
427
428 /* vec_dst */
429 vec_dst(&vsc, 0, 0); // CHECK: @llvm.ppc.altivec.dst
430
431 /* vec_dstst */
432 vec_dstst(&vs, 0, 0); // CHECK: @llvm.ppc.altivec.dstst
433
434 /* vec_dststt */
435 vec_dststt(&param_i, 0, 0); // CHECK: @llvm.ppc.altivec.dststt
436
437 /* vec_dstt */
438 vec_dstt(&vf, 0, 0); // CHECK: @llvm.ppc.altivec.dstt
439
440 /* vec_expte */
441 res_vf = vec_expte(vf); // CHECK: @llvm.ppc.altivec.vexptefp
442 res_vf = vec_vexptefp(vf); // CHECK: @llvm.ppc.altivec.vexptefp
443
444 /* vec_floor */
445 res_vf = vec_floor(vf); // CHECK: @llvm.ppc.altivec.vrfim
446 res_vf = vec_vrfim(vf); // CHECK: @llvm.ppc.altivec.vrfim
447
448 /* vec_ld */
449 res_vsc = vec_ld(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
450 res_vsc = vec_ld(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
451 res_vuc = vec_ld(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
452 res_vuc = vec_ld(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000453 res_vbc = vec_ld(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000454 res_vs = vec_ld(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
455 res_vs = vec_ld(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
456 res_vus = vec_ld(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
457 res_vus = vec_ld(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000458 res_vbs = vec_ld(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
459 res_vp = vec_ld(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000460 res_vi = vec_ld(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
461 res_vi = vec_ld(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
462 res_vui = vec_ld(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
463 res_vui = vec_ld(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000464 res_vbi = vec_ld(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000465 res_vf = vec_ld(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
466 res_vf = vec_ld(0, &param_f); // CHECK: @llvm.ppc.altivec.lvx
467 res_vsc = vec_lvx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
468 res_vsc = vec_lvx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
469 res_vuc = vec_lvx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
470 res_vuc = vec_lvx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000471 res_vbc = vec_lvx(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000472 res_vs = vec_lvx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
473 res_vs = vec_lvx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
474 res_vus = vec_lvx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
475 res_vus = vec_lvx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000476 res_vbs = vec_lvx(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
477 res_vp = vec_lvx(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000478 res_vi = vec_lvx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
479 res_vi = vec_lvx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
480 res_vui = vec_lvx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
481 res_vui = vec_lvx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000482 res_vbi = vec_lvx(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000483 res_vf = vec_lvx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
484 res_vf = vec_lvx(0, &param_f); // CHECK: @llvm.ppc.altivec.lvx
485
486 /* vec_lde */
Anton Yartsev3521c492013-03-10 16:25:43 +0000487 res_vsc = vec_lde(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvebx
488 res_vuc = vec_lde(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvebx
489 res_vs = vec_lde(0, &param_s); // CHECK: @llvm.ppc.altivec.lvehx
490 res_vus = vec_lde(0, &param_us); // CHECK: @llvm.ppc.altivec.lvehx
491 res_vi = vec_lde(0, &param_i); // CHECK: @llvm.ppc.altivec.lvewx
492 res_vui = vec_lde(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvewx
493 res_vf = vec_lde(0, &param_f); // CHECK: @llvm.ppc.altivec.lvewx
494 res_vsc = vec_lvebx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvebx
495 res_vuc = vec_lvebx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvebx
496 res_vs = vec_lvehx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvehx
497 res_vus = vec_lvehx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvehx
498 res_vi = vec_lvewx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvewx
499 res_vui = vec_lvewx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvewx
500 res_vf = vec_lvewx(0, &param_f); // CHECK: @llvm.ppc.altivec.lvewx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000501
502 /* vec_ldl */
503 res_vsc = vec_ldl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
504 res_vsc = vec_ldl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
505 res_vuc = vec_ldl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
506 res_vuc = vec_ldl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000507 res_vbc = vec_ldl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000508 res_vs = vec_ldl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
509 res_vs = vec_ldl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
510 res_vus = vec_ldl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
511 res_vus = vec_ldl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000512 res_vbs = vec_ldl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
513 res_vp = vec_ldl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000514 res_vi = vec_ldl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
515 res_vi = vec_ldl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
516 res_vui = vec_ldl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
517 res_vui = vec_ldl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000518 res_vbi = vec_ldl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000519 res_vf = vec_ldl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
520 res_vf = vec_ldl(0, &param_f); // CHECK: @llvm.ppc.altivec.lvxl
521 res_vsc = vec_lvxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
522 res_vsc = vec_lvxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
523 res_vuc = vec_lvxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000524 res_vbc = vec_lvxl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000525 res_vuc = vec_lvxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
526 res_vs = vec_lvxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
527 res_vs = vec_lvxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
528 res_vus = vec_lvxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
529 res_vus = vec_lvxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000530 res_vbs = vec_lvxl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
531 res_vp = vec_lvxl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000532 res_vi = vec_lvxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
533 res_vi = vec_lvxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
534 res_vui = vec_lvxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
535 res_vui = vec_lvxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000536 res_vbi = vec_lvxl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000537 res_vf = vec_lvxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
538 res_vf = vec_lvxl(0, &param_f); // CHECK: @llvm.ppc.altivec.lvxl
539
540 /* vec_loge */
541 res_vf = vec_loge(vf); // CHECK: @llvm.ppc.altivec.vlogefp
542 res_vf = vec_vlogefp(vf); // CHECK: @llvm.ppc.altivec.vlogefp
543
544 /* vec_lvsl */
545 res_vuc = vec_lvsl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvsl
546
547 /* vec_lvsr */
548 res_vuc = vec_lvsr(0, &param_i); // CHECK: @llvm.ppc.altivec.lvsr
549
550 /* vec_madd */
551 res_vf =vec_madd(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vmaddfp
552 res_vf = vec_vmaddfp(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vmaddfp
553
554 /* vec_madds */
555 res_vs = vec_madds(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhaddshs
556 res_vs = vec_vmhaddshs(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhaddshs
Chris Lattnerdd173942010-04-14 03:54:58 +0000557
558 /* vec_max */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000559 res_vsc = vec_max(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000560 res_vsc = vec_max(vbc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
561 res_vsc = vec_max(vsc, vbc); // CHECK: @llvm.ppc.altivec.vmaxsb
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000562 res_vuc = vec_max(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000563 res_vuc = vec_max(vbc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
564 res_vuc = vec_max(vuc, vbc); // CHECK: @llvm.ppc.altivec.vmaxub
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000565 res_vs = vec_max(vs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000566 res_vs = vec_max(vbs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
567 res_vs = vec_max(vs, vbs); // CHECK: @llvm.ppc.altivec.vmaxsh
Chris Lattnerdd173942010-04-14 03:54:58 +0000568 res_vus = vec_max(vus, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000569 res_vus = vec_max(vbs, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
570 res_vus = vec_max(vus, vbs); // CHECK: @llvm.ppc.altivec.vmaxuh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000571 res_vi = vec_max(vi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000572 res_vi = vec_max(vbi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
573 res_vi = vec_max(vi, vbi); // CHECK: @llvm.ppc.altivec.vmaxsw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000574 res_vui = vec_max(vui, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000575 res_vui = vec_max(vbi, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
576 res_vui = vec_max(vui, vbi); // CHECK: @llvm.ppc.altivec.vmaxuw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000577 res_vf = vec_max(vf, vf); // CHECK: @llvm.ppc.altivec.vmaxfp
578 res_vsc = vec_vmaxsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000579 res_vsc = vec_vmaxsb(vbc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
580 res_vsc = vec_vmaxsb(vsc, vbc); // CHECK: @llvm.ppc.altivec.vmaxsb
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000581 res_vuc = vec_vmaxub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000582 res_vuc = vec_vmaxub(vbc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
583 res_vuc = vec_vmaxub(vuc, vbc); // CHECK: @llvm.ppc.altivec.vmaxub
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000584 res_vs = vec_vmaxsh(vs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000585 res_vs = vec_vmaxsh(vbs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
586 res_vs = vec_vmaxsh(vs, vbs); // CHECK: @llvm.ppc.altivec.vmaxsh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000587 res_vus = vec_vmaxuh(vus, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000588 res_vus = vec_vmaxuh(vbs, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
589 res_vus = vec_vmaxuh(vus, vbs); // CHECK: @llvm.ppc.altivec.vmaxuh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000590 res_vi = vec_vmaxsw(vi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000591 res_vi = vec_vmaxsw(vbi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
592 res_vi = vec_vmaxsw(vi, vbi); // CHECK: @llvm.ppc.altivec.vmaxsw
Chris Lattnerdd173942010-04-14 03:54:58 +0000593 res_vui = vec_vmaxuw(vui, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000594 res_vui = vec_vmaxuw(vbi, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
595 res_vui = vec_vmaxuw(vui, vbi); // CHECK: @llvm.ppc.altivec.vmaxuw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000596 res_vf = vec_vmaxfp(vf, vf); // CHECK: @llvm.ppc.altivec.vmaxfp
597
598 /* vec_mergeh */
599 res_vsc = vec_mergeh(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
600 res_vuc = vec_mergeh(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000601 res_vbc = vec_mergeh(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000602 res_vs = vec_mergeh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000603 res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000604 res_vus = vec_mergeh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000605 res_vbs = vec_mergeh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000606 res_vi = vec_mergeh(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
607 res_vui = vec_mergeh(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000608 res_vbi = vec_mergeh(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000609 res_vf = vec_mergeh(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
610 res_vsc = vec_vmrghb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
611 res_vuc = vec_vmrghb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000612 res_vbc = vec_vmrghb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000613 res_vs = vec_vmrghh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000614 res_vp = vec_vmrghh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000615 res_vus = vec_vmrghh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000616 res_vbs = vec_vmrghh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000617 res_vi = vec_vmrghw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
618 res_vui = vec_vmrghw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000619 res_vbi = vec_vmrghw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000620 res_vf = vec_vmrghw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
621
622 /* vec_mergel */
623 res_vsc = vec_mergel(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
624 res_vuc = vec_mergel(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000625 res_vbc = vec_mergel(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000626 res_vs = vec_mergel(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000627 res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000628 res_vus = vec_mergel(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000629 res_vbs = vec_mergel(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000630 res_vi = vec_mergel(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
631 res_vui = vec_mergel(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000632 res_vbi = vec_mergel(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000633 res_vf = vec_mergel(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
634 res_vsc = vec_vmrglb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
635 res_vuc = vec_vmrglb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000636 res_vbc = vec_vmrglb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000637 res_vs = vec_vmrglh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000638 res_vp = vec_vmrglh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000639 res_vus = vec_vmrglh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000640 res_vbs = vec_vmrglh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000641 res_vi = vec_vmrglw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
642 res_vui = vec_vmrglw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000643 res_vbi = vec_vmrglw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000644 res_vf = vec_vmrglw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
Chris Lattnerdd173942010-04-14 03:54:58 +0000645
646 /* vec_mfvscr */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000647 vus = vec_mfvscr(); // CHECK: @llvm.ppc.altivec.mfvscr
Chris Lattnerdd173942010-04-14 03:54:58 +0000648
649 /* vec_min */
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000650 res_vsc = vec_min(vsc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000651 res_vsc = vec_min(vbc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
652 res_vsc = vec_min(vsc, vbc); // CHECK: @llvm.ppc.altivec.vminsb
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000653 res_vuc = vec_min(vuc, vuc); // CHECK: @llvm.ppc.altivec.vminub
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000654 res_vuc = vec_min(vbc, vuc); // CHECK: @llvm.ppc.altivec.vminub
655 res_vuc = vec_min(vuc, vbc); // CHECK: @llvm.ppc.altivec.vminub
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000656 res_vs = vec_min(vs, vs); // CHECK: @llvm.ppc.altivec.vminsh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000657 res_vs = vec_min(vbs, vs); // CHECK: @llvm.ppc.altivec.vminsh
658 res_vs = vec_min(vs, vbs); // CHECK: @llvm.ppc.altivec.vminsh
Chris Lattnerdd173942010-04-14 03:54:58 +0000659 res_vus = vec_min(vus, vus); // CHECK: @llvm.ppc.altivec.vminuh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000660 res_vus = vec_min(vbs, vus); // CHECK: @llvm.ppc.altivec.vminuh
661 res_vus = vec_min(vus, vbs); // CHECK: @llvm.ppc.altivec.vminuh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000662 res_vi = vec_min(vi, vi); // CHECK: @llvm.ppc.altivec.vminsw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000663 res_vi = vec_min(vbi, vi); // CHECK: @llvm.ppc.altivec.vminsw
664 res_vi = vec_min(vi, vbi); // CHECK: @llvm.ppc.altivec.vminsw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000665 res_vui = vec_min(vui, vui); // CHECK: @llvm.ppc.altivec.vminuw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000666 res_vui = vec_min(vbi, vui); // CHECK: @llvm.ppc.altivec.vminuw
667 res_vui = vec_min(vui, vbi); // CHECK: @llvm.ppc.altivec.vminuw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000668 res_vf = vec_min(vf, vf); // CHECK: @llvm.ppc.altivec.vminfp
669 res_vsc = vec_vminsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000670 res_vsc = vec_vminsb(vbc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
671 res_vsc = vec_vminsb(vsc, vbc); // CHECK: @llvm.ppc.altivec.vminsb
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000672 res_vuc = vec_vminub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vminub
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000673 res_vuc = vec_vminub(vbc, vuc); // CHECK: @llvm.ppc.altivec.vminub
674 res_vuc = vec_vminub(vuc, vbc); // CHECK: @llvm.ppc.altivec.vminub
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000675 res_vs = vec_vminsh(vs, vs); // CHECK: @llvm.ppc.altivec.vminsh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000676 res_vs = vec_vminsh(vbs, vs); // CHECK: @llvm.ppc.altivec.vminsh
677 res_vs = vec_vminsh(vs, vbs); // CHECK: @llvm.ppc.altivec.vminsh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000678 res_vus = vec_vminuh(vus, vus); // CHECK: @llvm.ppc.altivec.vminuh
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000679 res_vus = vec_vminuh(vbs, vus); // CHECK: @llvm.ppc.altivec.vminuh
680 res_vus = vec_vminuh(vus, vbs); // CHECK: @llvm.ppc.altivec.vminuh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000681 res_vi = vec_vminsw(vi, vi); // CHECK: @llvm.ppc.altivec.vminsw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000682 res_vi = vec_vminsw(vbi, vi); // CHECK: @llvm.ppc.altivec.vminsw
683 res_vi = vec_vminsw(vi, vbi); // CHECK: @llvm.ppc.altivec.vminsw
Chris Lattnerdd173942010-04-14 03:54:58 +0000684 res_vui = vec_vminuw(vui, vui); // CHECK: @llvm.ppc.altivec.vminuw
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000685 res_vui = vec_vminuw(vbi, vui); // CHECK: @llvm.ppc.altivec.vminuw
686 res_vui = vec_vminuw(vui, vbi); // CHECK: @llvm.ppc.altivec.vminuw
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000687 res_vf = vec_vminfp(vf, vf); // CHECK: @llvm.ppc.altivec.vminfp
688
689 /* vec_mladd */
690 res_vus = vec_mladd(vus, vus, vus); // CHECK: mul <8 x i16>
691 // CHECK: add <8 x i16>
692
Eli Friedmand4b9ee32011-05-06 18:04:18 +0000693 res_vs = vec_mladd(vus, vs, vs); // CHECK: mul <8 x i16>
694 // CHECK: add <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000695
Eli Friedmand4b9ee32011-05-06 18:04:18 +0000696 res_vs = vec_mladd(vs, vus, vus); // CHECK: mul <8 x i16>
697 // CHECK: add <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000698
Eli Friedmand4b9ee32011-05-06 18:04:18 +0000699 res_vs = vec_mladd(vs, vs, vs); // CHECK: mul <8 x i16>
700 // CHECK: add <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000701
702 /* vec_mradds */
703 res_vs = vec_mradds(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhraddshs
704 res_vs = vec_vmhraddshs(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhraddshs
705
706 /* vec_msum */
707 res_vi = vec_msum(vsc, vuc, vi); // CHECK: @llvm.ppc.altivec.vmsummbm
708 res_vui = vec_msum(vuc, vuc, vui); // CHECK: @llvm.ppc.altivec.vmsumubm
709 res_vi = vec_msum(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshm
710 res_vui = vec_msum(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhm
711 res_vi = vec_vmsummbm(vsc, vuc, vi); // CHECK: @llvm.ppc.altivec.vmsummbm
712 res_vui = vec_vmsumubm(vuc, vuc, vui); // CHECK: @llvm.ppc.altivec.vmsumubm
713 res_vi = vec_vmsumshm(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshm
714 res_vui = vec_vmsumuhm(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhm
715
716 /* vec_msums */
717 res_vi = vec_msums(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshs
718 res_vui = vec_msums(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhs
719 res_vi = vec_vmsumshs(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshs
720 res_vui = vec_vmsumuhs(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhs
Chris Lattnerdd173942010-04-14 03:54:58 +0000721
722 /* vec_mtvscr */
Chris Lattnerab866b42010-04-14 20:35:39 +0000723 vec_mtvscr(vsc); // CHECK: @llvm.ppc.altivec.mtvscr
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000724 vec_mtvscr(vuc); // CHECK: @llvm.ppc.altivec.mtvscr
725 vec_mtvscr(vbc); // CHECK: @llvm.ppc.altivec.mtvscr
726 vec_mtvscr(vs); // CHECK: @llvm.ppc.altivec.mtvscr
727 vec_mtvscr(vus); // CHECK: @llvm.ppc.altivec.mtvscr
728 vec_mtvscr(vbs); // CHECK: @llvm.ppc.altivec.mtvscr
729 vec_mtvscr(vp); // CHECK: @llvm.ppc.altivec.mtvscr
730 vec_mtvscr(vi); // CHECK: @llvm.ppc.altivec.mtvscr
731 vec_mtvscr(vui); // CHECK: @llvm.ppc.altivec.mtvscr
732 vec_mtvscr(vbi); // CHECK: @llvm.ppc.altivec.mtvscr
Chris Lattnerdd173942010-04-14 03:54:58 +0000733
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000734 /* vec_mule */
735 res_vs = vec_mule(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulesb
736 res_vus = vec_mule(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuleub
737 res_vi = vec_mule(vs, vs); // CHECK: @llvm.ppc.altivec.vmulesh
738 res_vui = vec_mule(vus, vus); // CHECK: @llvm.ppc.altivec.vmuleuh
739 res_vs = vec_vmulesb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulesb
740 res_vus = vec_vmuleub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuleub
741 res_vi = vec_vmulesh(vs, vs); // CHECK: @llvm.ppc.altivec.vmulesh
742 res_vui = vec_vmuleuh(vus, vus); // CHECK: @llvm.ppc.altivec.vmuleuh
Chris Lattnerdd173942010-04-14 03:54:58 +0000743
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000744 /* vec_mulo */
745 res_vs = vec_mulo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulosb
746 res_vus = vec_mulo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuloub
747 res_vi = vec_mulo(vs, vs); // CHECK: @llvm.ppc.altivec.vmulosh
748 res_vui = vec_mulo(vus, vus); // CHECK: @llvm.ppc.altivec.vmulouh
749 res_vs = vec_vmulosb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulosb
750 res_vus = vec_vmuloub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuloub
751 res_vi = vec_vmulosh(vs, vs); // CHECK: @llvm.ppc.altivec.vmulosh
752 res_vui = vec_vmulouh(vus, vus); // CHECK: @llvm.ppc.altivec.vmulouh
753
754 /* vec_nmsub */
755 res_vf = vec_nmsub(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vnmsubfp
756 res_vf = vec_vnmsubfp(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vnmsubfp
757
758 /* vec_nor */
759 res_vsc = vec_nor(vsc, vsc); // CHECK: or <16 x i8>
760 // CHECK: xor <16 x i8>
761
762 res_vuc = vec_nor(vuc, vuc); // CHECK: or <16 x i8>
763 // CHECK: xor <16 x i8>
764
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000765 res_vuc = vec_nor(vbc, vbc); // CHECK: or <16 x i8>
766 // CHECK: xor <16 x i8>
767
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000768 res_vs = vec_nor(vs, vs); // CHECK: or <8 x i16>
769 // CHECK: xor <8 x i16>
770
771 res_vus = vec_nor(vus, vus); // CHECK: or <8 x i16>
772 // CHECK: xor <8 x i16>
773
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000774 res_vus = vec_nor(vbs, vbs); // CHECK: or <8 x i16>
775 // CHECK: xor <8 x i16>
776
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000777 res_vi = vec_nor(vi, vi); // CHECK: or <4 x i32>
778 // CHECK: xor <4 x i32>
779
780 res_vui = vec_nor(vui, vui); // CHECK: or <4 x i32>
781 // CHECK: xor <4 x i32>
782
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000783 res_vui = vec_nor(vbi, vbi); // CHECK: or <4 x i32>
784 // CHECK: xor <4 x i32>
785
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000786 res_vf = vec_nor(vf, vf); // CHECK: or <4 x i32>
787 // CHECK: xor <4 x i32>
788
789 res_vsc = vec_vnor(vsc, vsc); // CHECK: or <16 x i8>
790 // CHECK: xor <16 x i8>
791
792 res_vuc = vec_vnor(vuc, vuc); // CHECK: or <16 x i8>
793 // CHECK: xor <16 x i8>
794
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000795 res_vuc = vec_vnor(vbc, vbc); // CHECK: or <16 x i8>
796 // CHECK: xor <16 x i8>
797
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000798 res_vs = vec_vnor(vs, vs); // CHECK: or <8 x i16>
799 // CHECK: xor <8 x i16>
800
801 res_vus = vec_vnor(vus, vus); // CHECK: or <8 x i16>
802 // CHECK: xor <8 x i16>
803
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000804 res_vus = vec_vnor(vbs, vbs); // CHECK: or <8 x i16>
805 // CHECK: xor <8 x i16>
806
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000807 res_vi = vec_vnor(vi, vi); // CHECK: or <4 x i32>
808 // CHECK: xor <4 x i32>
809
810 res_vui = vec_vnor(vui, vui); // CHECK: or <4 x i32>
811 // CHECK: xor <4 x i32>
812
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000813 res_vui = vec_vnor(vbi, vbi); // CHECK: or <4 x i32>
814 // CHECK: xor <4 x i32>
815
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000816 res_vf = vec_vnor(vf, vf); // CHECK: or <4 x i32>
817 // CHECK: xor <4 x i32>
818
819 /* vec_or */
820 res_vsc = vec_or(vsc, vsc); // CHECK: or <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000821 res_vsc = vec_or(vbc, vsc); // CHECK: or <16 x i8>
822 res_vsc = vec_or(vsc, vbc); // CHECK: or <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000823 res_vuc = vec_or(vuc, vuc); // CHECK: or <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000824 res_vuc = vec_or(vbc, vuc); // CHECK: or <16 x i8>
825 res_vuc = vec_or(vuc, vbc); // CHECK: or <16 x i8>
826 res_vbc = vec_or(vbc, vbc); // CHECK: or <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000827 res_vs = vec_or(vs, vs); // CHECK: or <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000828 res_vs = vec_or(vbs, vs); // CHECK: or <8 x i16>
829 res_vs = vec_or(vs, vbs); // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000830 res_vus = vec_or(vus, vus); // CHECK: or <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000831 res_vus = vec_or(vbs, vus); // CHECK: or <8 x i16>
832 res_vus = vec_or(vus, vbs); // CHECK: or <8 x i16>
833 res_vbs = vec_or(vbs, vbs); // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000834 res_vi = vec_or(vi, vi); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000835 res_vi = vec_or(vbi, vi); // CHECK: or <4 x i32>
836 res_vi = vec_or(vi, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000837 res_vui = vec_or(vui, vui); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000838 res_vui = vec_or(vbi, vui); // CHECK: or <4 x i32>
839 res_vui = vec_or(vui, vbi); // CHECK: or <4 x i32>
840 res_vbi = vec_or(vbi, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000841 res_vf = vec_or(vf, vf); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000842 res_vf = vec_or(vbi, vf); // CHECK: or <4 x i32>
843 res_vf = vec_or(vf, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000844 res_vsc = vec_vor(vsc, vsc); // CHECK: or <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000845 res_vsc = vec_vor(vbc, vsc); // CHECK: or <16 x i8>
846 res_vsc = vec_vor(vsc, vbc); // CHECK: or <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000847 res_vuc = vec_vor(vuc, vuc); // CHECK: or <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000848 res_vuc = vec_vor(vbc, vuc); // CHECK: or <16 x i8>
849 res_vuc = vec_vor(vuc, vbc); // CHECK: or <16 x i8>
850 res_vbc = vec_vor(vbc, vbc); // CHECK: or <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000851 res_vs = vec_vor(vs, vs); // CHECK: or <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000852 res_vs = vec_vor(vbs, vs); // CHECK: or <8 x i16>
853 res_vs = vec_vor(vs, vbs); // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000854 res_vus = vec_vor(vus, vus); // CHECK: or <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000855 res_vus = vec_vor(vbs, vus); // CHECK: or <8 x i16>
856 res_vus = vec_vor(vus, vbs); // CHECK: or <8 x i16>
857 res_vbs = vec_vor(vbs, vbs); // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000858 res_vi = vec_vor(vi, vi); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000859 res_vi = vec_vor(vbi, vi); // CHECK: or <4 x i32>
860 res_vi = vec_vor(vi, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000861 res_vui = vec_vor(vui, vui); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000862 res_vui = vec_vor(vbi, vui); // CHECK: or <4 x i32>
863 res_vui = vec_vor(vui, vbi); // CHECK: or <4 x i32>
864 res_vbi = vec_vor(vbi, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000865 res_vf = vec_vor(vf, vf); // CHECK: or <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000866 res_vf = vec_vor(vbi, vf); // CHECK: or <4 x i32>
867 res_vf = vec_vor(vf, vbi); // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000868
869 /* vec_pack */
870 res_vsc = vec_pack(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
871 res_vuc = vec_pack(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000872 res_vbc = vec_pack(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000873 res_vs = vec_pack(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
874 res_vus = vec_pack(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000875 res_vbs = vec_pack(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000876 res_vsc = vec_vpkuhum(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
877 res_vuc = vec_vpkuhum(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000878 res_vbc = vec_vpkuhum(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000879 res_vs = vec_vpkuwum(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
880 res_vus = vec_vpkuwum(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000881 res_vbs = vec_vpkuwum(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000882
883 /* vec_packpx */
884 res_vp = vec_packpx(vui, vui); // CHECK: @llvm.ppc.altivec.vpkpx
885 res_vp = vec_vpkpx(vui, vui); // CHECK: @llvm.ppc.altivec.vpkpx
886
887 /* vec_packs */
888 res_vsc = vec_packs(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshss
889 res_vuc = vec_packs(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
890 res_vs = vec_packs(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswss
891 res_vus = vec_packs(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
892 res_vsc = vec_vpkshss(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshss
893 res_vuc = vec_vpkuhus(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
894 res_vs = vec_vpkswss(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswss
895 res_vus = vec_vpkuwus(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
896
897 /* vec_packsu */
898 res_vuc = vec_packsu(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshus
899 res_vuc = vec_packsu(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
900 res_vus = vec_packsu(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswus
901 res_vus = vec_packsu(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
902 res_vuc = vec_vpkshus(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshus
903 res_vuc = vec_vpkshus(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
904 res_vus = vec_vpkswus(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswus
905 res_vus = vec_vpkswus(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
906
907 /* vec_perm */
908 res_vsc = vec_perm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
909 res_vuc = vec_perm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000910 res_vbc = vec_perm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000911 res_vs = vec_perm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
912 res_vus = vec_perm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000913 res_vbs = vec_perm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
914 res_vp = vec_perm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000915 res_vi = vec_perm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
916 res_vui = vec_perm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000917 res_vbi = vec_perm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000918 res_vf = vec_perm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
919 res_vsc = vec_vperm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
920 res_vuc = vec_vperm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000921 res_vbc = vec_vperm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000922 res_vs = vec_vperm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
923 res_vus = vec_vperm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000924 res_vbs = vec_vperm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
925 res_vp = vec_vperm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000926 res_vi = vec_vperm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
927 res_vui = vec_vperm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +0000928 res_vbi = vec_vperm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000929 res_vf = vec_vperm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
930
931 /* vec_re */
932 res_vf = vec_re(vf); // CHECK: @llvm.ppc.altivec.vrefp
933 res_vf = vec_vrefp(vf); // CHECK: @llvm.ppc.altivec.vrefp
934
935 /* vec_rl */
936 res_vsc = vec_rl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
937 res_vuc = vec_rl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
938 res_vs = vec_rl(vs, vus); // CHECK: @llvm.ppc.altivec.vrlh
939 res_vus = vec_rl(vus, vus); // CHECK: @llvm.ppc.altivec.vrlh
940 res_vi = vec_rl(vi, vui); // CHECK: @llvm.ppc.altivec.vrlw
941 res_vui = vec_rl(vui, vui); // CHECK: @llvm.ppc.altivec.vrlw
942 res_vsc = vec_vrlb(vsc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
943 res_vuc = vec_vrlb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
944 res_vs = vec_vrlh(vs, vus); // CHECK: @llvm.ppc.altivec.vrlh
945 res_vus = vec_vrlh(vus, vus); // CHECK: @llvm.ppc.altivec.vrlh
946 res_vi = vec_vrlw(vi, vui); // CHECK: @llvm.ppc.altivec.vrlw
947 res_vui = vec_vrlw(vui, vui); // CHECK: @llvm.ppc.altivec.vrlw
948
949 /* vec_round */
950 res_vf = vec_round(vf); // CHECK: @llvm.ppc.altivec.vrfin
951 res_vf = vec_vrfin(vf); // CHECK: @llvm.ppc.altivec.vrfin
952
953 /* vec_rsqrte */
954 res_vf = vec_rsqrte(vf); // CHECK: @llvm.ppc.altivec.vrsqrtefp
955 res_vf = vec_vrsqrtefp(vf); // CHECK: @llvm.ppc.altivec.vrsqrtefp
956
957 /* vec_sel */
958 res_vsc = vec_sel(vsc, vsc, vuc); // CHECK: xor <16 x i8>
959 // CHECK: and <16 x i8>
960 // CHECK: and <16 x i8>
961 // CHECK: or <16 x i8>
962
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000963 res_vsc = vec_sel(vsc, vsc, vbc); // CHECK: xor <16 x i8>
964 // CHECK: and <16 x i8>
965 // CHECK: and <16 x i8>
966 // CHECK: or <16 x i8>
967
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000968 res_vuc = vec_sel(vuc, vuc, vuc); // CHECK: xor <16 x i8>
969 // CHECK: and <16 x i8>
970 // CHECK: and <16 x i8>
971 // CHECK: or <16 x i8>
972
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000973 res_vuc = vec_sel(vuc, vuc, vbc); // CHECK: xor <16 x i8>
974 // CHECK: and <16 x i8>
975 // CHECK: and <16 x i8>
976 // CHECK: or <16 x i8>
977
978 res_vbc = vec_sel(vbc, vbc, vuc); // CHECK: xor <16 x i8>
979 // CHECK: and <16 x i8>
980 // CHECK: and <16 x i8>
981 // CHECK: or <16 x i8>
982
983 res_vbc = vec_sel(vbc, vbc, vbc); // CHECK: xor <16 x i8>
984 // CHECK: and <16 x i8>
985 // CHECK: and <16 x i8>
986 // CHECK: or <16 x i8>
987
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000988 res_vs = vec_sel(vs, vs, vus); // CHECK: xor <8 x i16>
989 // CHECK: and <8 x i16>
990 // CHECK: and <8 x i16>
991 // CHECK: or <8 x i16>
992
Anton Yartseva2fc0f52010-08-19 03:21:36 +0000993 res_vs = vec_sel(vs, vs, vbs); // CHECK: xor <8 x i16>
994 // CHECK: and <8 x i16>
995 // CHECK: and <8 x i16>
996 // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +0000997
998 res_vus = vec_sel(vus, vus, vus); // CHECK: xor <8 x i16>
999 // CHECK: and <8 x i16>
1000 // CHECK: and <8 x i16>
1001 // CHECK: or <8 x i16>
1002
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001003 res_vus = vec_sel(vus, vus, vbs); // CHECK: xor <8 x i16>
1004 // CHECK: and <8 x i16>
1005 // CHECK: and <8 x i16>
1006 // CHECK: or <8 x i16>
1007
1008 res_vbs = vec_sel(vbs, vbs, vus); // CHECK: xor <8 x i16>
1009 // CHECK: and <8 x i16>
1010 // CHECK: and <8 x i16>
1011 // CHECK: or <8 x i16>
1012
1013 res_vbs = vec_sel(vbs, vbs, vbs); // CHECK: xor <8 x i16>
1014 // CHECK: and <8 x i16>
1015 // CHECK: and <8 x i16>
1016 // CHECK: or <8 x i16>
1017
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001018 res_vi = vec_sel(vi, vi, vui); // CHECK: xor <4 x i32>
1019 // CHECK: and <4 x i32>
1020 // CHECK: and <4 x i32>
1021 // CHECK: or <4 x i32>
1022
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001023 res_vi = vec_sel(vi, vi, vbi); // CHECK: xor <4 x i32>
1024 // CHECK: and <4 x i32>
1025 // CHECK: and <4 x i32>
1026 // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001027
1028 res_vui = vec_sel(vui, vui, vui); // CHECK: xor <4 x i32>
1029 // CHECK: and <4 x i32>
1030 // CHECK: and <4 x i32>
1031 // CHECK: or <4 x i32>
1032
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001033 res_vui = vec_sel(vui, vui, vbi); // CHECK: xor <4 x i32>
1034 // CHECK: and <4 x i32>
1035 // CHECK: and <4 x i32>
1036 // CHECK: or <4 x i32>
1037
1038 res_vbi = vec_sel(vbi, vbi, vui); // CHECK: xor <4 x i32>
1039 // CHECK: and <4 x i32>
1040 // CHECK: and <4 x i32>
1041 // CHECK: or <4 x i32>
1042
1043 res_vbi = vec_sel(vbi, vbi, vbi); // CHECK: xor <4 x i32>
1044 // CHECK: and <4 x i32>
1045 // CHECK: and <4 x i32>
1046 // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001047
1048 res_vf = vec_sel(vf, vf, vui); // CHECK: xor <4 x i32>
1049 // CHECK: and <4 x i32>
1050 // CHECK: and <4 x i32>
1051 // CHECK: or <4 x i32>
1052
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001053 res_vf = vec_sel(vf, vf, vbi); // CHECK: xor <4 x i32>
1054 // CHECK: and <4 x i32>
1055 // CHECK: and <4 x i32>
1056 // CHECK: or <4 x i32>
1057
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001058 res_vsc = vec_vsel(vsc, vsc, vuc); // CHECK: xor <16 x i8>
1059 // CHECK: and <16 x i8>
1060 // CHECK: and <16 x i8>
1061 // CHECK: or <16 x i8>
1062
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001063 res_vsc = vec_vsel(vsc, vsc, vbc); // CHECK: xor <16 x i8>
1064 // CHECK: and <16 x i8>
1065 // CHECK: and <16 x i8>
1066 // CHECK: or <16 x i8>
1067
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001068 res_vuc = vec_vsel(vuc, vuc, vuc); // CHECK: xor <16 x i8>
1069 // CHECK: and <16 x i8>
1070 // CHECK: and <16 x i8>
1071 // CHECK: or <16 x i8>
1072
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001073 res_vuc = vec_vsel(vuc, vuc, vbc); // CHECK: xor <16 x i8>
1074 // CHECK: and <16 x i8>
1075 // CHECK: and <16 x i8>
1076 // CHECK: or <16 x i8>
1077
1078 res_vbc = vec_vsel(vbc, vbc, vuc); // CHECK: xor <16 x i8>
1079 // CHECK: and <16 x i8>
1080 // CHECK: and <16 x i8>
1081 // CHECK: or <16 x i8>
1082
1083 res_vbc = vec_vsel(vbc, vbc, vbc); // CHECK: xor <16 x i8>
1084 // CHECK: and <16 x i8>
1085 // CHECK: and <16 x i8>
1086 // CHECK: or <16 x i8>
1087
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001088 res_vs = vec_vsel(vs, vs, vus); // CHECK: xor <8 x i16>
1089 // CHECK: and <8 x i16>
1090 // CHECK: and <8 x i16>
1091 // CHECK: or <8 x i16>
1092
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001093 res_vs = vec_vsel(vs, vs, vbs); // CHECK: xor <8 x i16>
1094 // CHECK: and <8 x i16>
1095 // CHECK: and <8 x i16>
1096 // CHECK: or <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001097
1098 res_vus = vec_vsel(vus, vus, vus); // CHECK: xor <8 x i16>
1099 // CHECK: and <8 x i16>
1100 // CHECK: and <8 x i16>
1101 // CHECK: or <8 x i16>
1102
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001103 res_vus = vec_vsel(vus, vus, vbs); // CHECK: xor <8 x i16>
1104 // CHECK: and <8 x i16>
1105 // CHECK: and <8 x i16>
1106 // CHECK: or <8 x i16>
1107
1108 res_vbs = vec_vsel(vbs, vbs, vus); // CHECK: xor <8 x i16>
1109 // CHECK: and <8 x i16>
1110 // CHECK: and <8 x i16>
1111 // CHECK: or <8 x i16>
1112
1113 res_vbs = vec_vsel(vbs, vbs, vbs); // CHECK: xor <8 x i16>
1114 // CHECK: and <8 x i16>
1115 // CHECK: and <8 x i16>
1116 // CHECK: or <8 x i16>
1117
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001118 res_vi = vec_vsel(vi, vi, vui); // CHECK: xor <4 x i32>
1119 // CHECK: and <4 x i32>
1120 // CHECK: and <4 x i32>
1121 // CHECK: or <4 x i32>
1122
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001123 res_vi = vec_vsel(vi, vi, vbi); // CHECK: xor <4 x i32>
1124 // CHECK: and <4 x i32>
1125 // CHECK: and <4 x i32>
1126 // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001127
1128 res_vui = vec_vsel(vui, vui, vui); // CHECK: xor <4 x i32>
1129 // CHECK: and <4 x i32>
1130 // CHECK: and <4 x i32>
1131 // CHECK: or <4 x i32>
1132
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001133 res_vui = vec_vsel(vui, vui, vbi); // CHECK: xor <4 x i32>
1134 // CHECK: and <4 x i32>
1135 // CHECK: and <4 x i32>
1136 // CHECK: or <4 x i32>
1137
1138 res_vbi = vec_vsel(vbi, vbi, vui); // CHECK: xor <4 x i32>
1139 // CHECK: and <4 x i32>
1140 // CHECK: and <4 x i32>
1141 // CHECK: or <4 x i32>
1142
1143 res_vbi = vec_vsel(vbi, vbi, vbi); // CHECK: xor <4 x i32>
1144 // CHECK: and <4 x i32>
1145 // CHECK: and <4 x i32>
1146 // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001147
1148 res_vf = vec_vsel(vf, vf, vui); // CHECK: xor <4 x i32>
1149 // CHECK: and <4 x i32>
1150 // CHECK: and <4 x i32>
1151 // CHECK: or <4 x i32>
1152
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001153 res_vf = vec_vsel(vf, vf, vbi); // CHECK: xor <4 x i32>
1154 // CHECK: and <4 x i32>
1155 // CHECK: and <4 x i32>
1156 // CHECK: or <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001157
1158 /* vec_sl */
1159 res_vsc = vec_sl(vsc, vuc); // CHECK: shl <16 x i8>
1160 res_vuc = vec_sl(vuc, vuc); // CHECK: shl <16 x i8>
1161 res_vs = vec_sl(vs, vus); // CHECK: shl <8 x i16>
1162 res_vus = vec_sl(vus, vus); // CHECK: shl <8 x i16>
1163 res_vi = vec_sl(vi, vui); // CHECK: shl <4 x i32>
1164 res_vui = vec_sl(vui, vui); // CHECK: shl <4 x i32>
1165 res_vsc = vec_vslb(vsc, vuc); // CHECK: shl <16 x i8>
1166 res_vuc = vec_vslb(vuc, vuc); // CHECK: shl <16 x i8>
1167 res_vs = vec_vslh(vs, vus); // CHECK: shl <8 x i16>
1168 res_vus = vec_vslh(vus, vus); // CHECK: shl <8 x i16>
1169 res_vi = vec_vslw(vi, vui); // CHECK: shl <4 x i32>
1170 res_vui = vec_vslw(vui, vui); // CHECK: shl <4 x i32>
1171
1172 /* vec_sld */
1173 res_vsc = vec_sld(vsc, vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
1174 res_vuc = vec_sld(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
1175 res_vs = vec_sld(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
1176 res_vus = vec_sld(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001177 res_vp = vec_sld(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001178 res_vi = vec_sld(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
1179 res_vui = vec_sld(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
1180 res_vf = vec_sld(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
1181 res_vsc = vec_vsldoi(vsc, vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
1182 res_vuc = vec_vsldoi(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
1183 res_vs = vec_vsldoi(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
1184 res_vus = vec_vsldoi(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001185 res_vp = vec_vsldoi(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001186 res_vi = vec_vsldoi(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
1187 res_vui = vec_vsldoi(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
1188 res_vf = vec_vsldoi(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
1189
1190 /* vec_sll */
1191 res_vsc = vec_sll(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1192 res_vsc = vec_sll(vsc, vus); // CHECK: @llvm.ppc.altivec.vsl
1193 res_vsc = vec_sll(vsc, vui); // CHECK: @llvm.ppc.altivec.vsl
1194 res_vuc = vec_sll(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1195 res_vuc = vec_sll(vuc, vus); // CHECK: @llvm.ppc.altivec.vsl
1196 res_vuc = vec_sll(vuc, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001197 res_vbc = vec_sll(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1198 res_vbc = vec_sll(vbc, vus); // CHECK: @llvm.ppc.altivec.vsl
1199 res_vbc = vec_sll(vbc, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001200 res_vs = vec_sll(vs, vuc); // CHECK: @llvm.ppc.altivec.vsl
1201 res_vs = vec_sll(vs, vus); // CHECK: @llvm.ppc.altivec.vsl
1202 res_vs = vec_sll(vs, vui); // CHECK: @llvm.ppc.altivec.vsl
1203 res_vus = vec_sll(vus, vuc); // CHECK: @llvm.ppc.altivec.vsl
1204 res_vus = vec_sll(vus, vus); // CHECK: @llvm.ppc.altivec.vsl
1205 res_vus = vec_sll(vus, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001206 res_vbs = vec_sll(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsl
1207 res_vbs = vec_sll(vbs, vus); // CHECK: @llvm.ppc.altivec.vsl
1208 res_vbs = vec_sll(vbs, vui); // CHECK: @llvm.ppc.altivec.vsl
1209 res_vp = vec_sll(vp, vuc); // CHECK: @llvm.ppc.altivec.vsl
1210 res_vp = vec_sll(vp, vus); // CHECK: @llvm.ppc.altivec.vsl
1211 res_vp = vec_sll(vp, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001212 res_vi = vec_sll(vi, vuc); // CHECK: @llvm.ppc.altivec.vsl
1213 res_vi = vec_sll(vi, vus); // CHECK: @llvm.ppc.altivec.vsl
1214 res_vi = vec_sll(vi, vui); // CHECK: @llvm.ppc.altivec.vsl
1215 res_vui = vec_sll(vui, vuc); // CHECK: @llvm.ppc.altivec.vsl
1216 res_vui = vec_sll(vui, vus); // CHECK: @llvm.ppc.altivec.vsl
1217 res_vui = vec_sll(vui, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001218 res_vbi = vec_sll(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsl
1219 res_vbi = vec_sll(vbi, vus); // CHECK: @llvm.ppc.altivec.vsl
1220 res_vbi = vec_sll(vbi, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001221 res_vsc = vec_vsl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1222 res_vsc = vec_vsl(vsc, vus); // CHECK: @llvm.ppc.altivec.vsl
1223 res_vsc = vec_vsl(vsc, vui); // CHECK: @llvm.ppc.altivec.vsl
1224 res_vuc = vec_vsl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1225 res_vuc = vec_vsl(vuc, vus); // CHECK: @llvm.ppc.altivec.vsl
1226 res_vuc = vec_vsl(vuc, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001227 res_vbc = vec_vsl(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsl
1228 res_vbc = vec_vsl(vbc, vus); // CHECK: @llvm.ppc.altivec.vsl
1229 res_vbc = vec_vsl(vbc, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001230 res_vs = vec_vsl(vs, vuc); // CHECK: @llvm.ppc.altivec.vsl
1231 res_vs = vec_vsl(vs, vus); // CHECK: @llvm.ppc.altivec.vsl
1232 res_vs = vec_vsl(vs, vui); // CHECK: @llvm.ppc.altivec.vsl
1233 res_vus = vec_vsl(vus, vuc); // CHECK: @llvm.ppc.altivec.vsl
1234 res_vus = vec_vsl(vus, vus); // CHECK: @llvm.ppc.altivec.vsl
1235 res_vus = vec_vsl(vus, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001236 res_vbs = vec_vsl(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsl
1237 res_vbs = vec_vsl(vbs, vus); // CHECK: @llvm.ppc.altivec.vsl
1238 res_vbs = vec_vsl(vbs, vui); // CHECK: @llvm.ppc.altivec.vsl
1239 res_vp = vec_vsl(vp, vuc); // CHECK: @llvm.ppc.altivec.vsl
1240 res_vp = vec_vsl(vp, vus); // CHECK: @llvm.ppc.altivec.vsl
1241 res_vp = vec_vsl(vp, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001242 res_vi = vec_vsl(vi, vuc); // CHECK: @llvm.ppc.altivec.vsl
1243 res_vi = vec_vsl(vi, vus); // CHECK: @llvm.ppc.altivec.vsl
1244 res_vi = vec_vsl(vi, vui); // CHECK: @llvm.ppc.altivec.vsl
1245 res_vui = vec_vsl(vui, vuc); // CHECK: @llvm.ppc.altivec.vsl
1246 res_vui = vec_vsl(vui, vus); // CHECK: @llvm.ppc.altivec.vsl
1247 res_vui = vec_vsl(vui, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001248 res_vbi = vec_vsl(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsl
1249 res_vbi = vec_vsl(vbi, vus); // CHECK: @llvm.ppc.altivec.vsl
1250 res_vbi = vec_vsl(vbi, vui); // CHECK: @llvm.ppc.altivec.vsl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001251
1252 /* vec_slo */
1253 res_vsc = vec_slo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vslo
1254 res_vsc = vec_slo(vsc, vuc); // CHECK: @llvm.ppc.altivec.vslo
1255 res_vuc = vec_slo(vuc, vsc); // CHECK: @llvm.ppc.altivec.vslo
1256 res_vuc = vec_slo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vslo
1257 res_vs = vec_slo(vs, vsc); // CHECK: @llvm.ppc.altivec.vslo
1258 res_vs = vec_slo(vs, vuc); // CHECK: @llvm.ppc.altivec.vslo
1259 res_vus = vec_slo(vus, vsc); // CHECK: @llvm.ppc.altivec.vslo
1260 res_vus = vec_slo(vus, vuc); // CHECK: @llvm.ppc.altivec.vslo
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001261 res_vp = vec_slo(vp, vsc); // CHECK: @llvm.ppc.altivec.vslo
1262 res_vp = vec_slo(vp, vuc); // CHECK: @llvm.ppc.altivec.vslo
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001263 res_vi = vec_slo(vi, vsc); // CHECK: @llvm.ppc.altivec.vslo
1264 res_vi = vec_slo(vi, vuc); // CHECK: @llvm.ppc.altivec.vslo
1265 res_vui = vec_slo(vui, vsc); // CHECK: @llvm.ppc.altivec.vslo
1266 res_vui = vec_slo(vui, vuc); // CHECK: @llvm.ppc.altivec.vslo
1267 res_vf = vec_slo(vf, vsc); // CHECK: @llvm.ppc.altivec.vslo
1268 res_vf = vec_slo(vf, vuc); // CHECK: @llvm.ppc.altivec.vslo
1269 res_vsc = vec_vslo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vslo
1270 res_vsc = vec_vslo(vsc, vuc); // CHECK: @llvm.ppc.altivec.vslo
1271 res_vuc = vec_vslo(vuc, vsc); // CHECK: @llvm.ppc.altivec.vslo
1272 res_vuc = vec_vslo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vslo
1273 res_vs = vec_vslo(vs, vsc); // CHECK: @llvm.ppc.altivec.vslo
1274 res_vs = vec_vslo(vs, vuc); // CHECK: @llvm.ppc.altivec.vslo
1275 res_vus = vec_vslo(vus, vsc); // CHECK: @llvm.ppc.altivec.vslo
1276 res_vus = vec_vslo(vus, vuc); // CHECK: @llvm.ppc.altivec.vslo
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001277 res_vp = vec_vslo(vp, vsc); // CHECK: @llvm.ppc.altivec.vslo
1278 res_vp = vec_vslo(vp, vuc); // CHECK: @llvm.ppc.altivec.vslo
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001279 res_vi = vec_vslo(vi, vsc); // CHECK: @llvm.ppc.altivec.vslo
1280 res_vi = vec_vslo(vi, vuc); // CHECK: @llvm.ppc.altivec.vslo
1281 res_vui = vec_vslo(vui, vsc); // CHECK: @llvm.ppc.altivec.vslo
1282 res_vui = vec_vslo(vui, vuc); // CHECK: @llvm.ppc.altivec.vslo
1283 res_vf = vec_vslo(vf, vsc); // CHECK: @llvm.ppc.altivec.vslo
1284 res_vf = vec_vslo(vf, vuc); // CHECK: @llvm.ppc.altivec.vslo
1285
1286 /* vec_splat */
1287 res_vsc = vec_splat(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
1288 res_vuc = vec_splat(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001289 res_vbc = vec_splat(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001290 res_vs = vec_splat(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
1291 res_vus = vec_splat(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001292 res_vbs = vec_splat(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
1293 res_vp = vec_splat(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001294 res_vi = vec_splat(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
1295 res_vui = vec_splat(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001296 res_vbi = vec_splat(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001297 res_vf = vec_splat(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
1298 res_vsc = vec_vspltb(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
1299 res_vuc = vec_vspltb(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001300 res_vbc = vec_vspltb(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001301 res_vs = vec_vsplth(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
1302 res_vus = vec_vsplth(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001303 res_vbs = vec_vsplth(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
1304 res_vp = vec_vsplth(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001305 res_vi = vec_vspltw(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
1306 res_vui = vec_vspltw(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Yartsevf54dbfd2010-08-19 03:00:09 +00001307 res_vbi = vec_vspltw(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001308 res_vf = vec_vspltw(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
1309
1310 /* vec_splat_s8 */
1311 res_vsc = vec_splat_s8(0x09); // TODO: add check
1312 res_vsc = vec_vspltisb(0x09); // TODO: add check
1313
1314 /* vec_splat_s16 */
1315 res_vs = vec_splat_s16(0x09); // TODO: add check
1316 res_vs = vec_vspltish(0x09); // TODO: add check
1317
1318 /* vec_splat_s32 */
1319 res_vi = vec_splat_s32(0x09); // TODO: add check
1320 res_vi = vec_vspltisw(0x09); // TODO: add check
1321
1322 /* vec_splat_u8 */
1323 res_vuc = vec_splat_u8(0x09); // TODO: add check
1324
1325 /* vec_splat_u16 */
1326 res_vus = vec_splat_u16(0x09); // TODO: add check
1327
1328 /* vec_splat_u32 */
1329 res_vui = vec_splat_u32(0x09); // TODO: add check
1330
1331 /* vec_sr */
1332 res_vsc = vec_sr(vsc, vuc); // CHECK: shr <16 x i8>
1333 res_vuc = vec_sr(vuc, vuc); // CHECK: shr <16 x i8>
1334 res_vs = vec_sr(vs, vus); // CHECK: shr <8 x i16>
1335 res_vus = vec_sr(vus, vus); // CHECK: shr <8 x i16>
1336 res_vi = vec_sr(vi, vui); // CHECK: shr <4 x i32>
1337 res_vui = vec_sr(vui, vui); // CHECK: shr <4 x i32>
1338 res_vsc = vec_vsrb(vsc, vuc); // CHECK: shr <16 x i8>
1339 res_vuc = vec_vsrb(vuc, vuc); // CHECK: shr <16 x i8>
1340 res_vs = vec_vsrh(vs, vus); // CHECK: shr <8 x i16>
1341 res_vus = vec_vsrh(vus, vus); // CHECK: shr <8 x i16>
1342 res_vi = vec_vsrw(vi, vui); // CHECK: shr <4 x i32>
1343 res_vui = vec_vsrw(vui, vui); // CHECK: shr <4 x i32>
1344
1345 /* vec_sra */
1346 res_vsc = vec_sra(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
1347 res_vuc = vec_sra(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
1348 res_vs = vec_sra(vs, vus); // CHECK: @llvm.ppc.altivec.vsrah
1349 res_vus = vec_sra(vus, vus); // CHECK: @llvm.ppc.altivec.vsrah
1350 res_vi = vec_sra(vi, vui); // CHECK: @llvm.ppc.altivec.vsraw
1351 res_vui = vec_sra(vui, vui); // CHECK: @llvm.ppc.altivec.vsraw
1352 res_vsc = vec_vsrab(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
1353 res_vuc = vec_vsrab(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
1354 res_vs = vec_vsrah(vs, vus); // CHECK: @llvm.ppc.altivec.vsrah
1355 res_vus = vec_vsrah(vus, vus); // CHECK: @llvm.ppc.altivec.vsrah
1356 res_vi = vec_vsraw(vi, vui); // CHECK: @llvm.ppc.altivec.vsraw
1357 res_vui = vec_vsraw(vui, vui); // CHECK: @llvm.ppc.altivec.vsraw
1358
1359 /* vec_srl */
1360 res_vsc = vec_srl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1361 res_vsc = vec_srl(vsc, vus); // CHECK: @llvm.ppc.altivec.vsr
1362 res_vsc = vec_srl(vsc, vui); // CHECK: @llvm.ppc.altivec.vsr
1363 res_vuc = vec_srl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1364 res_vuc = vec_srl(vuc, vus); // CHECK: @llvm.ppc.altivec.vsr
1365 res_vuc = vec_srl(vuc, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001366 res_vbc = vec_srl(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1367 res_vbc = vec_srl(vbc, vus); // CHECK: @llvm.ppc.altivec.vsr
1368 res_vbc = vec_srl(vbc, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001369 res_vs = vec_srl(vs, vuc); // CHECK: @llvm.ppc.altivec.vsr
1370 res_vs = vec_srl(vs, vus); // CHECK: @llvm.ppc.altivec.vsr
1371 res_vs = vec_srl(vs, vui); // CHECK: @llvm.ppc.altivec.vsr
1372 res_vus = vec_srl(vus, vuc); // CHECK: @llvm.ppc.altivec.vsr
1373 res_vus = vec_srl(vus, vus); // CHECK: @llvm.ppc.altivec.vsr
1374 res_vus = vec_srl(vus, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001375 res_vbs = vec_srl(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsr
1376 res_vbs = vec_srl(vbs, vus); // CHECK: @llvm.ppc.altivec.vsr
1377 res_vbs = vec_srl(vbs, vui); // CHECK: @llvm.ppc.altivec.vsr
1378 res_vp = vec_srl(vp, vuc); // CHECK: @llvm.ppc.altivec.vsr
1379 res_vp = vec_srl(vp, vus); // CHECK: @llvm.ppc.altivec.vsr
1380 res_vp = vec_srl(vp, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001381 res_vi = vec_srl(vi, vuc); // CHECK: @llvm.ppc.altivec.vsr
1382 res_vi = vec_srl(vi, vus); // CHECK: @llvm.ppc.altivec.vsr
1383 res_vi = vec_srl(vi, vui); // CHECK: @llvm.ppc.altivec.vsr
1384 res_vui = vec_srl(vui, vuc); // CHECK: @llvm.ppc.altivec.vsr
1385 res_vui = vec_srl(vui, vus); // CHECK: @llvm.ppc.altivec.vsr
1386 res_vui = vec_srl(vui, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001387 res_vbi = vec_srl(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsr
1388 res_vbi = vec_srl(vbi, vus); // CHECK: @llvm.ppc.altivec.vsr
1389 res_vbi = vec_srl(vbi, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001390 res_vsc = vec_vsr(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1391 res_vsc = vec_vsr(vsc, vus); // CHECK: @llvm.ppc.altivec.vsr
1392 res_vsc = vec_vsr(vsc, vui); // CHECK: @llvm.ppc.altivec.vsr
1393 res_vuc = vec_vsr(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1394 res_vuc = vec_vsr(vuc, vus); // CHECK: @llvm.ppc.altivec.vsr
1395 res_vuc = vec_vsr(vuc, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001396 res_vbc = vec_vsr(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsr
1397 res_vbc = vec_vsr(vbc, vus); // CHECK: @llvm.ppc.altivec.vsr
1398 res_vbc = vec_vsr(vbc, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001399 res_vs = vec_vsr(vs, vuc); // CHECK: @llvm.ppc.altivec.vsr
1400 res_vs = vec_vsr(vs, vus); // CHECK: @llvm.ppc.altivec.vsr
1401 res_vs = vec_vsr(vs, vui); // CHECK: @llvm.ppc.altivec.vsr
1402 res_vus = vec_vsr(vus, vuc); // CHECK: @llvm.ppc.altivec.vsr
1403 res_vus = vec_vsr(vus, vus); // CHECK: @llvm.ppc.altivec.vsr
1404 res_vus = vec_vsr(vus, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001405 res_vbs = vec_vsr(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsr
1406 res_vbs = vec_vsr(vbs, vus); // CHECK: @llvm.ppc.altivec.vsr
1407 res_vbs = vec_vsr(vbs, vui); // CHECK: @llvm.ppc.altivec.vsr
1408 res_vp = vec_vsr(vp, vuc); // CHECK: @llvm.ppc.altivec.vsr
1409 res_vp = vec_vsr(vp, vus); // CHECK: @llvm.ppc.altivec.vsr
1410 res_vp = vec_vsr(vp, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001411 res_vi = vec_vsr(vi, vuc); // CHECK: @llvm.ppc.altivec.vsr
1412 res_vi = vec_vsr(vi, vus); // CHECK: @llvm.ppc.altivec.vsr
1413 res_vi = vec_vsr(vi, vui); // CHECK: @llvm.ppc.altivec.vsr
1414 res_vui = vec_vsr(vui, vuc); // CHECK: @llvm.ppc.altivec.vsr
1415 res_vui = vec_vsr(vui, vus); // CHECK: @llvm.ppc.altivec.vsr
1416 res_vui = vec_vsr(vui, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001417 res_vbi = vec_vsr(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsr
1418 res_vbi = vec_vsr(vbi, vus); // CHECK: @llvm.ppc.altivec.vsr
1419 res_vbi = vec_vsr(vbi, vui); // CHECK: @llvm.ppc.altivec.vsr
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001420
1421 /* vec_sro */
1422 res_vsc = vec_sro(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsro
1423 res_vsc = vec_sro(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsro
1424 res_vuc = vec_sro(vuc, vsc); // CHECK: @llvm.ppc.altivec.vsro
1425 res_vuc = vec_sro(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsro
1426 res_vs = vec_sro(vs, vsc); // CHECK: @llvm.ppc.altivec.vsro
1427 res_vs = vec_sro(vs, vuc); // CHECK: @llvm.ppc.altivec.vsro
1428 res_vus = vec_sro(vus, vsc); // CHECK: @llvm.ppc.altivec.vsro
1429 res_vus = vec_sro(vus, vuc); // CHECK: @llvm.ppc.altivec.vsro
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001430 res_vp = vec_sro(vp, vsc); // CHECK: @llvm.ppc.altivec.vsro
1431 res_vp = vec_sro(vp, vuc); // CHECK: @llvm.ppc.altivec.vsro
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001432 res_vi = vec_sro(vi, vsc); // CHECK: @llvm.ppc.altivec.vsro
1433 res_vi = vec_sro(vi, vuc); // CHECK: @llvm.ppc.altivec.vsro
1434 res_vui = vec_sro(vui, vsc); // CHECK: @llvm.ppc.altivec.vsro
1435 res_vui = vec_sro(vui, vuc); // CHECK: @llvm.ppc.altivec.vsro
1436 res_vf = vec_sro(vf, vsc); // CHECK: @llvm.ppc.altivec.vsro
1437 res_vf = vec_sro(vf, vuc); // CHECK: @llvm.ppc.altivec.vsro
1438 res_vsc = vec_vsro(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsro
1439 res_vsc = vec_vsro(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsro
1440 res_vuc = vec_vsro(vuc, vsc); // CHECK: @llvm.ppc.altivec.vsro
1441 res_vuc = vec_vsro(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsro
1442 res_vs = vec_vsro(vs, vsc); // CHECK: @llvm.ppc.altivec.vsro
1443 res_vs = vec_vsro(vs, vuc); // CHECK: @llvm.ppc.altivec.vsro
1444 res_vus = vec_vsro(vus, vsc); // CHECK: @llvm.ppc.altivec.vsro
1445 res_vus = vec_vsro(vus, vuc); // CHECK: @llvm.ppc.altivec.vsro
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001446 res_vp = vec_vsro(vp, vsc); // CHECK: @llvm.ppc.altivec.vsro
1447 res_vp = vec_vsro(vp, vuc); // CHECK: @llvm.ppc.altivec.vsro
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001448 res_vi = vec_vsro(vi, vsc); // CHECK: @llvm.ppc.altivec.vsro
1449 res_vi = vec_vsro(vi, vuc); // CHECK: @llvm.ppc.altivec.vsro
1450 res_vui = vec_vsro(vui, vsc); // CHECK: @llvm.ppc.altivec.vsro
1451 res_vui = vec_vsro(vui, vuc); // CHECK: @llvm.ppc.altivec.vsro
1452 res_vf = vec_vsro(vf, vsc); // CHECK: @llvm.ppc.altivec.vsro
1453 res_vf = vec_vsro(vf, vuc); // CHECK: @llvm.ppc.altivec.vsro
1454
1455 /* vec_st */
1456 vec_st(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvx
1457 vec_st(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvx
1458 vec_st(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvx
1459 vec_st(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001460 vec_st(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
1461 vec_st(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
1462 vec_st(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001463 vec_st(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvx
1464 vec_st(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1465 vec_st(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvx
1466 vec_st(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001467 vec_st(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1468 vec_st(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
1469 vec_st(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvx
1470 vec_st(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1471 vec_st(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
1472 vec_st(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001473 vec_st(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvx
1474 vec_st(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
1475 vec_st(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvx
1476 vec_st(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001477 vec_st(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
1478 vec_st(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
1479 vec_st(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001480 vec_st(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvx
1481 vec_st(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvx
1482 vec_stvx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvx
1483 vec_stvx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvx
1484 vec_stvx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvx
1485 vec_stvx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001486 vec_stvx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
1487 vec_stvx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
1488 vec_stvx(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001489 vec_stvx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvx
1490 vec_stvx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1491 vec_stvx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvx
1492 vec_stvx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001493 vec_stvx(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1494 vec_stvx(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
1495 vec_stvx(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvx
1496 vec_stvx(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
1497 vec_stvx(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
1498 vec_stvx(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001499 vec_stvx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvx
1500 vec_stvx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
1501 vec_stvx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvx
1502 vec_stvx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001503 vec_stvx(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
1504 vec_stvx(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
1505 vec_stvx(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001506 vec_stvx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvx
1507 vec_stvx(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvx
1508
1509 /* vec_ste */
1510 vec_ste(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
1511 vec_ste(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001512 vec_ste(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
1513 vec_ste(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001514 vec_ste(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1515 vec_ste(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001516 vec_ste(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1517 vec_ste(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
1518 vec_ste(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1519 vec_ste(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001520 vec_ste(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
1521 vec_ste(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001522 vec_ste(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
1523 vec_ste(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001524 vec_ste(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvewx
1525 vec_stvebx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
1526 vec_stvebx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001527 vec_stvebx(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
1528 vec_stvebx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001529 vec_stvehx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1530 vec_stvehx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001531 vec_stvehx(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1532 vec_stvehx(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
1533 vec_stvehx(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
1534 vec_stvehx(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001535 vec_stvewx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
1536 vec_stvewx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001537 vec_stvewx(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
1538 vec_stvewx(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001539 vec_stvewx(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvewx
1540
1541 /* vec_stl */
1542 vec_stl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvxl
1543 vec_stl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
1544 vec_stl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvxl
1545 vec_stl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001546 vec_stl(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
1547 vec_stl(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
1548 vec_stl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001549 vec_stl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvxl
1550 vec_stl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1551 vec_stl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvxl
1552 vec_stl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001553 vec_stl(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1554 vec_stl(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
1555 vec_stl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvxl
1556 vec_stl(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1557 vec_stl(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
1558 vec_stl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001559 vec_stl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvxl
1560 vec_stl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
1561 vec_stl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvxl
1562 vec_stl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001563 vec_stl(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
1564 vec_stl(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
1565 vec_stl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001566 vec_stl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvxl
1567 vec_stl(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvxl
1568 vec_stvxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvxl
1569 vec_stvxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
1570 vec_stvxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvxl
1571 vec_stvxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001572 vec_stvxl(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
1573 vec_stvxl(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
1574 vec_stvxl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001575 vec_stvxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvxl
1576 vec_stvxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1577 vec_stvxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvxl
1578 vec_stvxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001579 vec_stvxl(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1580 vec_stvxl(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
1581 vec_stvxl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvxl
1582 vec_stvxl(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
1583 vec_stvxl(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
1584 vec_stvxl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001585 vec_stvxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvxl
1586 vec_stvxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
1587 vec_stvxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvxl
1588 vec_stvxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001589 vec_stvxl(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
1590 vec_stvxl(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
1591 vec_stvxl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvxl
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001592 vec_stvxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvxl
1593 vec_stvxl(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvxl
1594
1595 /* vec_sub */
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001596 res_vsc = vec_sub(vsc, vsc); // CHECK: sub <16 x i8>
1597 res_vsc = vec_sub(vbc, vsc); // CHECK: sub <16 x i8>
1598 res_vsc = vec_sub(vsc, vbc); // CHECK: sub <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001599 res_vuc = vec_sub(vuc, vuc); // CHECK: sub <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001600 res_vuc = vec_sub(vbc, vuc); // CHECK: sub <16 x i8>
1601 res_vuc = vec_sub(vuc, vbc); // CHECK: sub <16 x i8>
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001602 res_vs = vec_sub(vs, vs); // CHECK: sub <8 x i16>
1603 res_vs = vec_sub(vbs, vs); // CHECK: sub <8 x i16>
1604 res_vs = vec_sub(vs, vbs); // CHECK: sub <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001605 res_vus = vec_sub(vus, vus); // CHECK: sub <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001606 res_vus = vec_sub(vbs, vus); // CHECK: sub <8 x i16>
1607 res_vus = vec_sub(vus, vbs); // CHECK: sub <8 x i16>
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001608 res_vi = vec_sub(vi, vi); // CHECK: sub <4 x i32>
1609 res_vi = vec_sub(vbi, vi); // CHECK: sub <4 x i32>
1610 res_vi = vec_sub(vi, vbi); // CHECK: sub <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001611 res_vui = vec_sub(vui, vui); // CHECK: sub <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001612 res_vui = vec_sub(vbi, vui); // CHECK: sub <4 x i32>
1613 res_vui = vec_sub(vui, vbi); // CHECK: sub <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001614 res_vf = vec_sub(vf, vf); // CHECK: fsub <4 x float>
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001615 res_vsc = vec_vsububm(vsc, vsc); // CHECK: sub <16 x i8>
1616 res_vsc = vec_vsububm(vbc, vsc); // CHECK: sub <16 x i8>
1617 res_vsc = vec_vsububm(vsc, vbc); // CHECK: sub <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001618 res_vuc = vec_vsububm(vuc, vuc); // CHECK: sub <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001619 res_vuc = vec_vsububm(vbc, vuc); // CHECK: sub <16 x i8>
1620 res_vuc = vec_vsububm(vuc, vbc); // CHECK: sub <16 x i8>
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001621 res_vs = vec_vsubuhm(vs, vs); // CHECK: sub <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001622 res_vs = vec_vsubuhm(vbs, vus); // CHECK: sub <8 x i16>
1623 res_vs = vec_vsubuhm(vus, vbs); // CHECK: sub <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001624 res_vus = vec_vsubuhm(vus, vus); // CHECK: sub <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001625 res_vus = vec_vsubuhm(vbs, vus); // CHECK: sub <8 x i16>
1626 res_vus = vec_vsubuhm(vus, vbs); // CHECK: sub <8 x i16>
Eli Friedmand4b9ee32011-05-06 18:04:18 +00001627 res_vi = vec_vsubuwm(vi, vi); // CHECK: sub <4 x i32>
1628 res_vi = vec_vsubuwm(vbi, vi); // CHECK: sub <4 x i32>
1629 res_vi = vec_vsubuwm(vi, vbi); // CHECK: sub <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001630 res_vui = vec_vsubuwm(vui, vui); // CHECK: sub <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001631 res_vui = vec_vsubuwm(vbi, vui); // CHECK: sub <4 x i32>
1632 res_vui = vec_vsubuwm(vui, vbi); // CHECK: sub <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001633 res_vf = vec_vsubfp(vf, vf); // CHECK: fsub <4 x float>
1634
1635 /* vec_subc */
1636 res_vui = vec_subc(vui, vui); // CHECK: @llvm.ppc.altivec.vsubcuw
1637 res_vui = vec_vsubcuw(vui, vui); // CHECK: @llvm.ppc.altivec.vsubcuw
1638
1639 /* vec_subs */
1640 res_vsc = vec_subs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001641 res_vsc = vec_subs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
1642 res_vsc = vec_subs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vsubsbs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001643 res_vuc = vec_subs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001644 res_vuc = vec_subs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
1645 res_vuc = vec_subs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vsububs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001646 res_vs = vec_subs(vs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001647 res_vs = vec_subs(vbs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
1648 res_vs = vec_subs(vs, vbs); // CHECK: @llvm.ppc.altivec.vsubshs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001649 res_vus = vec_subs(vus, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001650 res_vus = vec_subs(vbs, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
1651 res_vus = vec_subs(vus, vbs); // CHECK: @llvm.ppc.altivec.vsubuhs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001652 res_vi = vec_subs(vi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001653 res_vi = vec_subs(vbi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
1654 res_vi = vec_subs(vi, vbi); // CHECK: @llvm.ppc.altivec.vsubsws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001655 res_vui = vec_subs(vui, vui); // CHECK: @llvm.ppc.altivec.vsubuws
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001656 res_vui = vec_subs(vbi, vui); // CHECK: @llvm.ppc.altivec.vsubuws
1657 res_vui = vec_subs(vui, vbi); // CHECK: @llvm.ppc.altivec.vsubuws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001658 res_vsc = vec_vsubsbs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001659 res_vsc = vec_vsubsbs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
1660 res_vsc = vec_vsubsbs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vsubsbs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001661 res_vuc = vec_vsububs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001662 res_vuc = vec_vsububs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
1663 res_vuc = vec_vsububs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vsububs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001664 res_vs = vec_vsubshs(vs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001665 res_vs = vec_vsubshs(vbs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
1666 res_vs = vec_vsubshs(vs, vbs); // CHECK: @llvm.ppc.altivec.vsubshs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001667 res_vus = vec_vsubuhs(vus, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001668 res_vus = vec_vsubuhs(vbs, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
1669 res_vus = vec_vsubuhs(vus, vbs); // CHECK: @llvm.ppc.altivec.vsubuhs
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001670 res_vi = vec_vsubsws(vi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001671 res_vi = vec_vsubsws(vbi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
1672 res_vi = vec_vsubsws(vi, vbi); // CHECK: @llvm.ppc.altivec.vsubsws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001673 res_vui = vec_vsubuws(vui, vui); // CHECK: @llvm.ppc.altivec.vsubuws
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001674 res_vui = vec_vsubuws(vbi, vui); // CHECK: @llvm.ppc.altivec.vsubuws
1675 res_vui = vec_vsubuws(vui, vbi); // CHECK: @llvm.ppc.altivec.vsubuws
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001676
1677 /* vec_sum4s */
1678 res_vi = vec_sum4s(vsc, vi); // CHECK: @llvm.ppc.altivec.vsum4sbs
1679 res_vui = vec_sum4s(vuc, vui); // CHECK: @llvm.ppc.altivec.vsum4ubs
1680 res_vi = vec_sum4s(vs, vi); // CHECK: @llvm.ppc.altivec.vsum4shs
1681 res_vi = vec_vsum4sbs(vsc, vi); // CHECK: @llvm.ppc.altivec.vsum4sbs
1682 res_vui = vec_vsum4ubs(vuc, vui); // CHECK: @llvm.ppc.altivec.vsum4ubs
1683 res_vi = vec_vsum4shs(vs, vi); // CHECK: @llvm.ppc.altivec.vsum4shs
1684
1685 /* vec_sum2s */
1686 res_vi = vec_sum2s(vi, vi); // CHECK: @llvm.ppc.altivec.vsum2sws
1687 res_vi = vec_vsum2sws(vi, vi); // CHECK: @llvm.ppc.altivec.vsum2sws
1688
1689 /* vec_sums */
1690 res_vi = vec_sums(vi, vi); // CHECK: @llvm.ppc.altivec.vsumsws
1691 res_vi = vec_vsumsws(vi, vi); // CHECK: @llvm.ppc.altivec.vsumsws
1692
1693 /* vec_trunc */
1694 res_vf = vec_trunc(vf); // CHECK: @llvm.ppc.altivec.vrfiz
1695 res_vf = vec_vrfiz(vf); // CHECK: @llvm.ppc.altivec.vrfiz
1696
1697 /* vec_unpackh */
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001698 res_vs = vec_unpackh(vsc); // CHECK: @llvm.ppc.altivec.vupkhsb
1699 res_vbs = vec_unpackh(vbc); // CHECK: @llvm.ppc.altivec.vupkhsb
1700 res_vi = vec_unpackh(vs); // CHECK: @llvm.ppc.altivec.vupkhsh
1701 res_vbi = vec_unpackh(vbs); // CHECK: @llvm.ppc.altivec.vupkhsh
1702 res_vui = vec_unpackh(vp); // CHECK: @llvm.ppc.altivec.vupkhsh
1703 res_vs = vec_vupkhsb(vsc); // CHECK: @llvm.ppc.altivec.vupkhsb
1704 res_vbs = vec_vupkhsb(vbc); // CHECK: @llvm.ppc.altivec.vupkhsb
1705 res_vi = vec_vupkhsh(vs); // CHECK: @llvm.ppc.altivec.vupkhsh
1706 res_vbi = vec_vupkhsh(vbs); // CHECK: @llvm.ppc.altivec.vupkhsh
1707 res_vui = vec_vupkhsh(vp); // CHECK: @llvm.ppc.altivec.vupkhsh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001708
1709 /* vec_unpackl */
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001710 res_vs = vec_unpackl(vsc); // CHECK: @llvm.ppc.altivec.vupklsb
1711 res_vbs = vec_unpackl(vbc); // CHECK: @llvm.ppc.altivec.vupklsb
1712 res_vi = vec_unpackl(vs); // CHECK: @llvm.ppc.altivec.vupklsh
1713 res_vbi = vec_unpackl(vbs); // CHECK: @llvm.ppc.altivec.vupklsh
1714 res_vui = vec_unpackl(vp); // CHECK: @llvm.ppc.altivec.vupklsh
1715 res_vs = vec_vupklsb(vsc); // CHECK: @llvm.ppc.altivec.vupklsb
1716 res_vbs = vec_vupklsb(vbc); // CHECK: @llvm.ppc.altivec.vupklsb
1717 res_vi = vec_vupklsh(vs); // CHECK: @llvm.ppc.altivec.vupklsh
1718 res_vbi = vec_vupklsh(vbs); // CHECK: @llvm.ppc.altivec.vupklsh
1719 res_vui = vec_vupklsh(vp); // CHECK: @llvm.ppc.altivec.vupklsh
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001720
1721 /* vec_xor */
1722 res_vsc = vec_xor(vsc, vsc); // CHECK: xor <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001723 res_vsc = vec_xor(vbc, vsc); // CHECK: xor <16 x i8>
1724 res_vsc = vec_xor(vsc, vbc); // CHECK: xor <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001725 res_vuc = vec_xor(vuc, vuc); // CHECK: xor <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001726 res_vuc = vec_xor(vbc, vuc); // CHECK: xor <16 x i8>
1727 res_vuc = vec_xor(vuc, vbc); // CHECK: xor <16 x i8>
1728 res_vbc = vec_xor(vbc, vbc); // CHECK: xor <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001729 res_vs = vec_xor(vs, vs); // CHECK: xor <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001730 res_vs = vec_xor(vbs, vs); // CHECK: xor <8 x i16>
1731 res_vs = vec_xor(vs, vbs); // CHECK: xor <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001732 res_vus = vec_xor(vus, vus); // CHECK: xor <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001733 res_vus = vec_xor(vbs, vus); // CHECK: xor <8 x i16>
1734 res_vus = vec_xor(vus, vbs); // CHECK: xor <8 x i16>
1735 res_vbs = vec_xor(vbs, vbs); // CHECK: xor <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001736 res_vi = vec_xor(vi, vi); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001737 res_vi = vec_xor(vbi, vi); // CHECK: xor <4 x i32>
1738 res_vi = vec_xor(vi, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001739 res_vui = vec_xor(vui, vui); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001740 res_vui = vec_xor(vbi, vui); // CHECK: xor <4 x i32>
1741 res_vui = vec_xor(vui, vbi); // CHECK: xor <4 x i32>
1742 res_vbi = vec_xor(vbi, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001743 res_vf = vec_xor(vf, vf); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001744 res_vf = vec_xor(vbi, vf); // CHECK: xor <4 x i32>
1745 res_vf = vec_xor(vf, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001746 res_vsc = vec_vxor(vsc, vsc); // CHECK: xor <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001747 res_vsc = vec_vxor(vbc, vsc); // CHECK: xor <16 x i8>
1748 res_vsc = vec_vxor(vsc, vbc); // CHECK: xor <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001749 res_vuc = vec_vxor(vuc, vuc); // CHECK: xor <16 x i8>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001750 res_vuc = vec_vxor(vbc, vuc); // CHECK: xor <16 x i8>
1751 res_vuc = vec_vxor(vuc, vbc); // CHECK: xor <16 x i8>
1752 res_vbc = vec_vxor(vbc, vbc); // CHECK: xor <16 x i8>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001753 res_vs = vec_vxor(vs, vs); // CHECK: xor <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001754 res_vs = vec_vxor(vbs, vs); // CHECK: xor <8 x i16>
1755 res_vs = vec_vxor(vs, vbs); // CHECK: xor <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001756 res_vus = vec_vxor(vus, vus); // CHECK: xor <8 x i16>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001757 res_vus = vec_vxor(vbs, vus); // CHECK: xor <8 x i16>
1758 res_vus = vec_vxor(vus, vbs); // CHECK: xor <8 x i16>
1759 res_vbs = vec_vxor(vbs, vbs); // CHECK: xor <8 x i16>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001760 res_vi = vec_vxor(vi, vi); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001761 res_vi = vec_vxor(vbi, vi); // CHECK: xor <4 x i32>
1762 res_vi = vec_vxor(vi, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001763 res_vui = vec_vxor(vui, vui); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001764 res_vui = vec_vxor(vbi, vui); // CHECK: xor <4 x i32>
1765 res_vui = vec_vxor(vui, vbi); // CHECK: xor <4 x i32>
1766 res_vbi = vec_vxor(vbi, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001767 res_vf = vec_vxor(vf, vf); // CHECK: xor <4 x i32>
Anton Yartseva2fc0f52010-08-19 03:21:36 +00001768 res_vf = vec_vxor(vbi, vf); // CHECK: xor <4 x i32>
1769 res_vf = vec_vxor(vf, vbi); // CHECK: xor <4 x i32>
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00001770
Anton Yartsev44270d62010-10-14 14:37:46 +00001771 /* ------------------------------ extensions -------------------------------------- */
1772
1773 /* vec_extract */
1774 res_sc = vec_extract(vsc, param_i); // CHECK: extractelement <16 x i8>
1775 res_uc = vec_extract(vuc, param_i); // CHECK: extractelement <16 x i8>
1776 res_s = vec_extract(vs, param_i); // CHECK: extractelement <8 x i16>
1777 res_us = vec_extract(vus, param_i); // CHECK: extractelement <8 x i16>
1778 res_i = vec_extract(vi, param_i); // CHECK: extractelement <4 x i32>
1779 res_ui = vec_extract(vui, param_i); // CHECK: extractelement <4 x i32>
1780 res_f = vec_extract(vf, param_i); // CHECK: extractelement <4 x float>
1781
1782 /* vec_insert */
1783 res_vsc = vec_insert(param_sc, vsc, param_i); // CHECK: insertelement <16 x i8>
1784 res_vuc = vec_insert(param_uc, vuc, param_i); // CHECK: insertelement <16 x i8>
1785 res_vs = vec_insert(param_s, vs, param_i); // CHECK: insertelement <8 x i16>
1786 res_vus = vec_insert(param_us, vus, param_i); // CHECK: insertelement <8 x i16>
1787 res_vi = vec_insert(param_i, vi, param_i); // CHECK: insertelement <4 x i32>
1788 res_vui = vec_insert(param_ui, vui, param_i); // CHECK: insertelement <4 x i32>
1789 res_vf = vec_insert(param_f, vf, param_i); // CHECK: insertelement <4 x float>
1790
1791 /* vec_lvlx */
1792 res_vsc = vec_lvlx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001793 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001794 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001795 // CHECK: @llvm.ppc.altivec.vperm
1796
1797 res_vsc = vec_lvlx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001798 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001799 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001800 // CHECK: @llvm.ppc.altivec.vperm
1801
1802 res_vuc = vec_lvlx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001803 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001804 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001805 // CHECK: @llvm.ppc.altivec.vperm
1806
1807 res_vuc = vec_lvlx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001808 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001809 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001810 // CHECK: @llvm.ppc.altivec.vperm
1811
1812 res_vbc = vec_lvlx(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
1813 // CHECK: store <16 x i8> zeroinitializer
1814 // CHECK: @llvm.ppc.altivec.lvsl
1815 // CHECK: @llvm.ppc.altivec.vperm
1816
1817 res_vs = vec_lvlx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001818 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001819 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001820 // CHECK: @llvm.ppc.altivec.vperm
1821
1822 res_vs = vec_lvlx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001823 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001824 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001825 // CHECK: @llvm.ppc.altivec.vperm
1826
1827 res_vus = vec_lvlx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001828 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001829 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001830 // CHECK: @llvm.ppc.altivec.vperm
1831
1832 res_vus = vec_lvlx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001833 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001834 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001835 // CHECK: @llvm.ppc.altivec.vperm
1836
1837 res_vbs = vec_lvlx(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
1838 // CHECK: store <8 x i16> zeroinitializer
1839 // CHECK: @llvm.ppc.altivec.lvsl
1840 // CHECK: @llvm.ppc.altivec.vperm
1841
1842 res_vp = vec_lvlx(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
1843 // CHECK: store <8 x i16> zeroinitializer
1844 // CHECK: @llvm.ppc.altivec.lvsl
1845 // CHECK: @llvm.ppc.altivec.vperm
1846
1847 res_vi = vec_lvlx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001848 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001849 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001850 // CHECK: @llvm.ppc.altivec.vperm
1851
1852 res_vi = vec_lvlx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001853 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001854 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001855 // CHECK: @llvm.ppc.altivec.vperm
1856
1857 res_vui = vec_lvlx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001858 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001859 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001860 // CHECK: @llvm.ppc.altivec.vperm
1861
1862 res_vui = vec_lvlx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001863 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001864 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001865 // CHECK: @llvm.ppc.altivec.vperm
1866
1867 res_vbi = vec_lvlx(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
1868 // CHECK: store <4 x i32> zeroinitializer
1869 // CHECK: @llvm.ppc.altivec.lvsl
1870 // CHECK: @llvm.ppc.altivec.vperm
1871
1872 res_vf = vec_lvlx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001873 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001874 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001875 // CHECK: @llvm.ppc.altivec.vperm
1876
1877 /* vec_lvlxl */
1878 res_vsc = vec_lvlxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001879 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001880 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001881 // CHECK: @llvm.ppc.altivec.vperm
1882
1883 res_vsc = vec_lvlxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001884 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001885 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001886 // CHECK: @llvm.ppc.altivec.vperm
1887
1888 res_vuc = vec_lvlxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001889 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001890 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001891 // CHECK: @llvm.ppc.altivec.vperm
1892
1893 res_vuc = vec_lvlxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001894 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001895 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001896 // CHECK: @llvm.ppc.altivec.vperm
1897
1898 res_vbc = vec_lvlxl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
1899 // CHECK: store <16 x i8> zeroinitializer
1900 // CHECK: @llvm.ppc.altivec.lvsl
1901 // CHECK: @llvm.ppc.altivec.vperm
1902
1903 res_vs = vec_lvlxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001904 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001905 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001906 // CHECK: @llvm.ppc.altivec.vperm
1907
1908 res_vs = vec_lvlxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001909 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001910 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001911 // CHECK: @llvm.ppc.altivec.vperm
1912
1913 res_vus = vec_lvlxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001914 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001915 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001916 // CHECK: @llvm.ppc.altivec.vperm
1917
1918 res_vus = vec_lvlxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001919 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001920 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001921 // CHECK: @llvm.ppc.altivec.vperm
1922
1923 res_vbs = vec_lvlxl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
1924 // CHECK: store <8 x i16> zeroinitializer
1925 // CHECK: @llvm.ppc.altivec.lvsl
1926 // CHECK: @llvm.ppc.altivec.vperm
1927
1928 res_vp = vec_lvlxl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
1929 // CHECK: store <8 x i16> zeroinitializer
1930 // CHECK: @llvm.ppc.altivec.lvsl
1931 // CHECK: @llvm.ppc.altivec.vperm
1932
1933 res_vi = vec_lvlxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001934 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001935 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001936 // CHECK: @llvm.ppc.altivec.vperm
1937
1938 res_vi = vec_lvlxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001939 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001940 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001941 // CHECK: @llvm.ppc.altivec.vperm
1942
1943 res_vui = vec_lvlxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001944 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001945 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001946 // CHECK: @llvm.ppc.altivec.vperm
1947
1948 res_vui = vec_lvlxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001949 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001950 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001951 // CHECK: @llvm.ppc.altivec.vperm
1952
1953 res_vbi = vec_lvlxl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
1954 // CHECK: store <4 x i32> zeroinitializer
1955 // CHECK: @llvm.ppc.altivec.lvsl
1956 // CHECK: @llvm.ppc.altivec.vperm
1957
1958 res_vf = vec_lvlxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00001959 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001960 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001961 // CHECK: @llvm.ppc.altivec.vperm
1962
1963 /* vec_lvrx */
Anton Yartsevd06fea82011-03-27 09:32:40 +00001964 res_vsc = vec_lvrx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001965 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001966 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001967 // CHECK: @llvm.ppc.altivec.vperm
1968
Anton Yartsevd06fea82011-03-27 09:32:40 +00001969 res_vsc = vec_lvrx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001970 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001971 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001972 // CHECK: @llvm.ppc.altivec.vperm
1973
Anton Yartsevd06fea82011-03-27 09:32:40 +00001974 res_vuc = vec_lvrx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001975 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001976 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001977 // CHECK: @llvm.ppc.altivec.vperm
1978
Anton Yartsevd06fea82011-03-27 09:32:40 +00001979 res_vuc = vec_lvrx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001980 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001981 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001982 // CHECK: @llvm.ppc.altivec.vperm
1983
1984 res_vbc = vec_lvrx(0, &vbc); // CHECK: store <16 x i8> zeroinitializer
1985 // CHECK: @llvm.ppc.altivec.lvx
1986 // CHECK: @llvm.ppc.altivec.lvsl
1987 // CHECK: @llvm.ppc.altivec.vperm
1988
Anton Yartsevd06fea82011-03-27 09:32:40 +00001989 res_vs = vec_lvrx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001990 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001991 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001992 // CHECK: @llvm.ppc.altivec.vperm
1993
Anton Yartsevd06fea82011-03-27 09:32:40 +00001994 res_vs = vec_lvrx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00001995 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00001996 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00001997 // CHECK: @llvm.ppc.altivec.vperm
1998
Anton Yartsevd06fea82011-03-27 09:32:40 +00001999 res_vus = vec_lvrx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002000 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002001 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002002 // CHECK: @llvm.ppc.altivec.vperm
2003
Anton Yartsevd06fea82011-03-27 09:32:40 +00002004 res_vus = vec_lvrx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002005 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002006 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002007 // CHECK: @llvm.ppc.altivec.vperm
2008
2009 res_vbs = vec_lvrx(0, &vbs); // CHECK: store <8 x i16> zeroinitializer
2010 // CHECK: @llvm.ppc.altivec.lvx
2011 // CHECK: @llvm.ppc.altivec.lvsl
2012 // CHECK: @llvm.ppc.altivec.vperm
2013
2014 res_vp = vec_lvrx(0, &vp); // CHECK: store <8 x i16> zeroinitializer
2015 // CHECK: @llvm.ppc.altivec.lvx
2016 // CHECK: @llvm.ppc.altivec.lvsl
2017 // CHECK: @llvm.ppc.altivec.vperm
2018
Anton Yartsevd06fea82011-03-27 09:32:40 +00002019 res_vi = vec_lvrx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002020 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002021 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002022 // CHECK: @llvm.ppc.altivec.vperm
2023
Anton Yartsevd06fea82011-03-27 09:32:40 +00002024 res_vi = vec_lvrx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002025 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002026 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002027 // CHECK: @llvm.ppc.altivec.vperm
2028
Anton Yartsevd06fea82011-03-27 09:32:40 +00002029 res_vui = vec_lvrx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002030 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002031 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002032 // CHECK: @llvm.ppc.altivec.vperm
2033
Anton Yartsevd06fea82011-03-27 09:32:40 +00002034 res_vui = vec_lvrx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002035 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002036 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002037 // CHECK: @llvm.ppc.altivec.vperm
2038
2039 res_vbi = vec_lvrx(0, &vbi); // CHECK: store <4 x i32> zeroinitializer
2040 // CHECK: @llvm.ppc.altivec.lvx
2041 // CHECK: @llvm.ppc.altivec.lvsl
2042 // CHECK: @llvm.ppc.altivec.vperm
2043
Anton Yartsevd06fea82011-03-27 09:32:40 +00002044 res_vf = vec_lvrx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002045 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002046 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002047 // CHECK: @llvm.ppc.altivec.vperm
2048
2049 /* vec_lvrxl */
Anton Yartsevd06fea82011-03-27 09:32:40 +00002050 res_vsc = vec_lvrxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002051 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002052 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002053 // CHECK: @llvm.ppc.altivec.vperm
2054
Anton Yartsevd06fea82011-03-27 09:32:40 +00002055 res_vsc = vec_lvrxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002056 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002057 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002058 // CHECK: @llvm.ppc.altivec.vperm
2059
Anton Yartsevd06fea82011-03-27 09:32:40 +00002060 res_vuc = vec_lvrxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002061 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002062 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002063 // CHECK: @llvm.ppc.altivec.vperm
2064
Anton Yartsevd06fea82011-03-27 09:32:40 +00002065 res_vuc = vec_lvrxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002066 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002067 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002068 // CHECK: @llvm.ppc.altivec.vperm
2069
2070 res_vbc = vec_lvrxl(0, &vbc); // CHECK: store <16 x i8> zeroinitializer
2071 // CHECK: @llvm.ppc.altivec.lvxl
2072 // CHECK: @llvm.ppc.altivec.lvsl
2073 // CHECK: @llvm.ppc.altivec.vperm
2074
Anton Yartsevd06fea82011-03-27 09:32:40 +00002075 res_vs = vec_lvrxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002076 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002077 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002078 // CHECK: @llvm.ppc.altivec.vperm
2079
Anton Yartsevd06fea82011-03-27 09:32:40 +00002080 res_vs = vec_lvrxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002081 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002082 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002083 // CHECK: @llvm.ppc.altivec.vperm
2084
Anton Yartsevd06fea82011-03-27 09:32:40 +00002085 res_vus = vec_lvrxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002086 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002087 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002088 // CHECK: @llvm.ppc.altivec.vperm
2089
Anton Yartsevd06fea82011-03-27 09:32:40 +00002090 res_vus = vec_lvrxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002091 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002092 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002093 // CHECK: @llvm.ppc.altivec.vperm
2094
2095 res_vbs = vec_lvrxl(0, &vbs); // CHECK: store <8 x i16> zeroinitializer
2096 // CHECK: @llvm.ppc.altivec.lvxl
2097 // CHECK: @llvm.ppc.altivec.lvsl
2098 // CHECK: @llvm.ppc.altivec.vperm
2099
2100 res_vp = vec_lvrxl(0, &vp); // CHECK: store <8 x i16> zeroinitializer
2101 // CHECK: @llvm.ppc.altivec.lvxl
2102 // CHECK: @llvm.ppc.altivec.lvsl
2103 // CHECK: @llvm.ppc.altivec.vperm
2104
Anton Yartsevd06fea82011-03-27 09:32:40 +00002105 res_vi = vec_lvrxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002106 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002107 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002108 // CHECK: @llvm.ppc.altivec.vperm
2109
Anton Yartsevd06fea82011-03-27 09:32:40 +00002110 res_vi = vec_lvrxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002111 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002112 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002113 // CHECK: @llvm.ppc.altivec.vperm
2114
Anton Yartsevd06fea82011-03-27 09:32:40 +00002115 res_vui = vec_lvrxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002116 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002117 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002118 // CHECK: @llvm.ppc.altivec.vperm
2119
Anton Yartsevd06fea82011-03-27 09:32:40 +00002120 res_vui = vec_lvrxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002121 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002122 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002123 // CHECK: @llvm.ppc.altivec.vperm
2124
2125 res_vbi = vec_lvrxl(0, &vbi); // CHECK: store <4 x i32> zeroinitializer
2126 // CHECK: @llvm.ppc.altivec.lvxl
2127 // CHECK: @llvm.ppc.altivec.lvsl
2128 // CHECK: @llvm.ppc.altivec.vperm
2129
Anton Yartsevd06fea82011-03-27 09:32:40 +00002130 res_vf = vec_lvrxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
Anton Yartsev44270d62010-10-14 14:37:46 +00002131 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002132 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002133 // CHECK: @llvm.ppc.altivec.vperm
2134
2135 /* vec_stvlx */
Anton Yartsevd06fea82011-03-27 09:32:40 +00002136 vec_stvlx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002137 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002138 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002139 // CHECK: @llvm.ppc.altivec.vperm
2140 // CHECK: @llvm.ppc.altivec.lvsr
2141 // CHECK: @llvm.ppc.altivec.vperm
2142 // CHECK: @llvm.ppc.altivec.stvx
2143
Anton Yartsevd06fea82011-03-27 09:32:40 +00002144 vec_stvlx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002145 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002146 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002147 // CHECK: @llvm.ppc.altivec.vperm
2148 // CHECK: @llvm.ppc.altivec.lvsr
2149 // CHECK: @llvm.ppc.altivec.vperm
2150 // CHECK: @llvm.ppc.altivec.stvx
2151
Anton Yartsevd06fea82011-03-27 09:32:40 +00002152 vec_stvlx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002153 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002154 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002155 // CHECK: @llvm.ppc.altivec.vperm
2156 // CHECK: @llvm.ppc.altivec.lvsr
2157 // CHECK: @llvm.ppc.altivec.vperm
2158 // CHECK: @llvm.ppc.altivec.stvx
2159
Anton Yartsevd06fea82011-03-27 09:32:40 +00002160 vec_stvlx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002161 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002162 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002163 // CHECK: @llvm.ppc.altivec.vperm
2164 // CHECK: @llvm.ppc.altivec.lvsr
2165 // CHECK: @llvm.ppc.altivec.vperm
2166 // CHECK: @llvm.ppc.altivec.stvx
2167
2168 vec_stvlx(vbc, 0, &vbc); // CHECK: store <16 x i8> zeroinitializer
2169 // CHECK: @llvm.ppc.altivec.lvx
2170 // CHECK: @llvm.ppc.altivec.lvsl
2171 // CHECK: @llvm.ppc.altivec.vperm
2172 // CHECK: @llvm.ppc.altivec.lvsr
2173 // CHECK: @llvm.ppc.altivec.vperm
2174 // CHECK: @llvm.ppc.altivec.stvx
2175
Anton Yartsevd06fea82011-03-27 09:32:40 +00002176 vec_stvlx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002177 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002178 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002179 // CHECK: @llvm.ppc.altivec.vperm
2180 // CHECK: @llvm.ppc.altivec.lvsr
2181 // CHECK: @llvm.ppc.altivec.vperm
2182 // CHECK: @llvm.ppc.altivec.stvx
2183
Anton Yartsevd06fea82011-03-27 09:32:40 +00002184 vec_stvlx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002185 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002186 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002187 // CHECK: @llvm.ppc.altivec.vperm
2188 // CHECK: @llvm.ppc.altivec.lvsr
2189 // CHECK: @llvm.ppc.altivec.vperm
2190 // CHECK: @llvm.ppc.altivec.stvx
2191
Anton Yartsevd06fea82011-03-27 09:32:40 +00002192 vec_stvlx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002193 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002194 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002195 // CHECK: @llvm.ppc.altivec.vperm
2196 // CHECK: @llvm.ppc.altivec.lvsr
2197 // CHECK: @llvm.ppc.altivec.vperm
2198 // CHECK: @llvm.ppc.altivec.stvx
2199
Anton Yartsevd06fea82011-03-27 09:32:40 +00002200 vec_stvlx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002201 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002202 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002203 // CHECK: @llvm.ppc.altivec.vperm
2204 // CHECK: @llvm.ppc.altivec.lvsr
2205 // CHECK: @llvm.ppc.altivec.vperm
2206 // CHECK: @llvm.ppc.altivec.stvx
2207
2208 vec_stvlx(vbs, 0, &vbs); // CHECK: store <8 x i16> zeroinitializer
2209 // CHECK: @llvm.ppc.altivec.lvx
2210 // CHECK: @llvm.ppc.altivec.lvsl
2211 // CHECK: @llvm.ppc.altivec.vperm
2212 // CHECK: @llvm.ppc.altivec.lvsr
2213 // CHECK: @llvm.ppc.altivec.vperm
2214 // CHECK: @llvm.ppc.altivec.stvx
2215
2216 vec_stvlx(vp, 0, &vp); // CHECK: store <8 x i16> zeroinitializer
2217 // CHECK: @llvm.ppc.altivec.lvx
2218 // CHECK: @llvm.ppc.altivec.lvsl
2219 // CHECK: @llvm.ppc.altivec.vperm
2220 // CHECK: @llvm.ppc.altivec.lvsr
2221 // CHECK: @llvm.ppc.altivec.vperm
2222 // CHECK: @llvm.ppc.altivec.stvx
2223
Anton Yartsevd06fea82011-03-27 09:32:40 +00002224 vec_stvlx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002225 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002226 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002227 // CHECK: @llvm.ppc.altivec.vperm
2228 // CHECK: @llvm.ppc.altivec.lvsr
2229 // CHECK: @llvm.ppc.altivec.vperm
2230 // CHECK: @llvm.ppc.altivec.stvx
2231
Anton Yartsevd06fea82011-03-27 09:32:40 +00002232 vec_stvlx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002233 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002234 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002235 // CHECK: @llvm.ppc.altivec.vperm
2236 // CHECK: @llvm.ppc.altivec.lvsr
2237 // CHECK: @llvm.ppc.altivec.vperm
2238 // CHECK: @llvm.ppc.altivec.stvx
2239
Anton Yartsevd06fea82011-03-27 09:32:40 +00002240 vec_stvlx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002241 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002242 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002243 // CHECK: @llvm.ppc.altivec.vperm
2244 // CHECK: @llvm.ppc.altivec.lvsr
2245 // CHECK: @llvm.ppc.altivec.vperm
2246 // CHECK: @llvm.ppc.altivec.stvx
2247
Anton Yartsevd06fea82011-03-27 09:32:40 +00002248 vec_stvlx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002249 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002250 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002251 // CHECK: @llvm.ppc.altivec.vperm
2252 // CHECK: @llvm.ppc.altivec.lvsr
2253 // CHECK: @llvm.ppc.altivec.vperm
2254 // CHECK: @llvm.ppc.altivec.stvx
2255
2256 vec_stvlx(vbi, 0, &vbi); // CHECK: store <4 x i32> zeroinitializer
2257 // CHECK: @llvm.ppc.altivec.lvx
2258 // CHECK: @llvm.ppc.altivec.lvsl
2259 // CHECK: @llvm.ppc.altivec.vperm
2260 // CHECK: @llvm.ppc.altivec.lvsr
2261 // CHECK: @llvm.ppc.altivec.vperm
2262 // CHECK: @llvm.ppc.altivec.stvx
2263
Anton Yartsevd06fea82011-03-27 09:32:40 +00002264 vec_stvlx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002265 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002266 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002267 // CHECK: @llvm.ppc.altivec.vperm
2268 // CHECK: @llvm.ppc.altivec.lvsr
2269 // CHECK: @llvm.ppc.altivec.vperm
2270 // CHECK: @llvm.ppc.altivec.stvx
2271
2272 /* vec_stvlxl */
Anton Yartsevd06fea82011-03-27 09:32:40 +00002273 vec_stvlxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002274 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002275 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002276 // CHECK: @llvm.ppc.altivec.vperm
2277 // CHECK: @llvm.ppc.altivec.lvsr
2278 // CHECK: @llvm.ppc.altivec.vperm
2279 // CHECK: @llvm.ppc.altivec.stvxl
2280
Anton Yartsevd06fea82011-03-27 09:32:40 +00002281 vec_stvlxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002282 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002283 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002284 // CHECK: @llvm.ppc.altivec.vperm
2285 // CHECK: @llvm.ppc.altivec.lvsr
2286 // CHECK: @llvm.ppc.altivec.vperm
2287 // CHECK: @llvm.ppc.altivec.stvxl
2288
Anton Yartsevd06fea82011-03-27 09:32:40 +00002289 vec_stvlxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002290 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002291 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002292 // CHECK: @llvm.ppc.altivec.vperm
2293 // CHECK: @llvm.ppc.altivec.lvsr
2294 // CHECK: @llvm.ppc.altivec.vperm
2295 // CHECK: @llvm.ppc.altivec.stvxl
2296
Anton Yartsevd06fea82011-03-27 09:32:40 +00002297 vec_stvlxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002298 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002299 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002300 // CHECK: @llvm.ppc.altivec.vperm
2301 // CHECK: @llvm.ppc.altivec.lvsr
2302 // CHECK: @llvm.ppc.altivec.vperm
2303 // CHECK: @llvm.ppc.altivec.stvxl
2304
2305 vec_stvlxl(vbc, 0, &vbc); // CHECK: store <16 x i8> zeroinitializer
2306 // CHECK: @llvm.ppc.altivec.lvx
2307 // CHECK: @llvm.ppc.altivec.lvsl
2308 // CHECK: @llvm.ppc.altivec.vperm
2309 // CHECK: @llvm.ppc.altivec.lvsr
2310 // CHECK: @llvm.ppc.altivec.vperm
2311 // CHECK: @llvm.ppc.altivec.stvxl
2312
Anton Yartsevd06fea82011-03-27 09:32:40 +00002313 vec_stvlxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002314 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002315 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002316 // CHECK: @llvm.ppc.altivec.vperm
2317 // CHECK: @llvm.ppc.altivec.lvsr
2318 // CHECK: @llvm.ppc.altivec.vperm
2319 // CHECK: @llvm.ppc.altivec.stvxl
2320
Anton Yartsevd06fea82011-03-27 09:32:40 +00002321 vec_stvlxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002322 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002323 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002324 // CHECK: @llvm.ppc.altivec.vperm
2325 // CHECK: @llvm.ppc.altivec.lvsr
2326 // CHECK: @llvm.ppc.altivec.vperm
2327 // CHECK: @llvm.ppc.altivec.stvxl
2328
Anton Yartsevd06fea82011-03-27 09:32:40 +00002329 vec_stvlxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002330 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002331 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002332 // CHECK: @llvm.ppc.altivec.vperm
2333 // CHECK: @llvm.ppc.altivec.lvsr
2334 // CHECK: @llvm.ppc.altivec.vperm
2335 // CHECK: @llvm.ppc.altivec.stvxl
2336
Anton Yartsevd06fea82011-03-27 09:32:40 +00002337 vec_stvlxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002338 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002339 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002340 // CHECK: @llvm.ppc.altivec.vperm
2341 // CHECK: @llvm.ppc.altivec.lvsr
2342 // CHECK: @llvm.ppc.altivec.vperm
2343 // CHECK: @llvm.ppc.altivec.stvxl
2344
2345 vec_stvlxl(vbs, 0, &vbs); // CHECK: store <8 x i16> zeroinitializer
2346 // CHECK: @llvm.ppc.altivec.lvx
2347 // CHECK: @llvm.ppc.altivec.lvsl
2348 // CHECK: @llvm.ppc.altivec.vperm
2349 // CHECK: @llvm.ppc.altivec.lvsr
2350 // CHECK: @llvm.ppc.altivec.vperm
2351 // CHECK: @llvm.ppc.altivec.stvxl
2352
2353 vec_stvlxl(vp, 0, &vp); // CHECK: store <8 x i16> zeroinitializer
2354 // CHECK: @llvm.ppc.altivec.lvx
2355 // CHECK: @llvm.ppc.altivec.lvsl
2356 // CHECK: @llvm.ppc.altivec.vperm
2357 // CHECK: @llvm.ppc.altivec.lvsr
2358 // CHECK: @llvm.ppc.altivec.vperm
2359 // CHECK: @llvm.ppc.altivec.stvxl
2360
Anton Yartsevd06fea82011-03-27 09:32:40 +00002361 vec_stvlxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002362 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002363 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002364 // CHECK: @llvm.ppc.altivec.vperm
2365 // CHECK: @llvm.ppc.altivec.lvsr
2366 // CHECK: @llvm.ppc.altivec.vperm
2367 // CHECK: @llvm.ppc.altivec.stvxl
2368
Anton Yartsevd06fea82011-03-27 09:32:40 +00002369 vec_stvlxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002370 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002371 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002372 // CHECK: @llvm.ppc.altivec.vperm
2373 // CHECK: @llvm.ppc.altivec.lvsr
2374 // CHECK: @llvm.ppc.altivec.vperm
2375 // CHECK: @llvm.ppc.altivec.stvxl
2376
Anton Yartsevd06fea82011-03-27 09:32:40 +00002377 vec_stvlxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002378 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002379 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002380 // CHECK: @llvm.ppc.altivec.vperm
2381 // CHECK: @llvm.ppc.altivec.lvsr
2382 // CHECK: @llvm.ppc.altivec.vperm
2383 // CHECK: @llvm.ppc.altivec.stvxl
2384
Anton Yartsevd06fea82011-03-27 09:32:40 +00002385 vec_stvlxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002386 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002387 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002388 // CHECK: @llvm.ppc.altivec.vperm
2389 // CHECK: @llvm.ppc.altivec.lvsr
2390 // CHECK: @llvm.ppc.altivec.vperm
2391 // CHECK: @llvm.ppc.altivec.stvxl
2392
2393 vec_stvlxl(vbi, 0, &vbi); // CHECK: store <4 x i32> zeroinitializer
2394 // CHECK: @llvm.ppc.altivec.lvx
2395 // CHECK: @llvm.ppc.altivec.lvsl
2396 // CHECK: @llvm.ppc.altivec.vperm
2397 // CHECK: @llvm.ppc.altivec.lvsr
2398 // CHECK: @llvm.ppc.altivec.vperm
2399 // CHECK: @llvm.ppc.altivec.stvxl
2400
Anton Yartsevd06fea82011-03-27 09:32:40 +00002401 vec_stvlxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002402 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002403 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002404 // CHECK: @llvm.ppc.altivec.vperm
2405 // CHECK: @llvm.ppc.altivec.lvsr
2406 // CHECK: @llvm.ppc.altivec.vperm
2407 // CHECK: @llvm.ppc.altivec.stvxl
2408
2409 /* vec_stvrx */
2410 vec_stvrx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002411 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002412 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002413 // CHECK: @llvm.ppc.altivec.vperm
2414 // CHECK: @llvm.ppc.altivec.lvsr
2415 // CHECK: @llvm.ppc.altivec.vperm
2416 // CHECK: @llvm.ppc.altivec.stvx
2417
2418 vec_stvrx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002419 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002420 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002421 // CHECK: @llvm.ppc.altivec.vperm
2422 // CHECK: @llvm.ppc.altivec.lvsr
2423 // CHECK: @llvm.ppc.altivec.vperm
2424 // CHECK: @llvm.ppc.altivec.stvx
2425
2426 vec_stvrx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002427 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002428 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002429 // CHECK: @llvm.ppc.altivec.vperm
2430 // CHECK: @llvm.ppc.altivec.lvsr
2431 // CHECK: @llvm.ppc.altivec.vperm
2432 // CHECK: @llvm.ppc.altivec.stvx
2433
2434 vec_stvrx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002435 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002436 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002437 // CHECK: @llvm.ppc.altivec.vperm
2438 // CHECK: @llvm.ppc.altivec.lvsr
2439 // CHECK: @llvm.ppc.altivec.vperm
2440 // CHECK: @llvm.ppc.altivec.stvx
2441
2442 vec_stvrx(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
2443 // CHECK: store <16 x i8> zeroinitializer
2444 // CHECK: @llvm.ppc.altivec.lvsl
2445 // CHECK: @llvm.ppc.altivec.vperm
2446 // CHECK: @llvm.ppc.altivec.lvsr
2447 // CHECK: @llvm.ppc.altivec.vperm
2448 // CHECK: @llvm.ppc.altivec.stvx
2449
2450 vec_stvrx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002451 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002452 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002453 // CHECK: @llvm.ppc.altivec.vperm
2454 // CHECK: @llvm.ppc.altivec.lvsr
2455 // CHECK: @llvm.ppc.altivec.vperm
2456 // CHECK: @llvm.ppc.altivec.stvx
2457
2458 vec_stvrx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002459 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002460 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002461 // CHECK: @llvm.ppc.altivec.vperm
2462 // CHECK: @llvm.ppc.altivec.lvsr
2463 // CHECK: @llvm.ppc.altivec.vperm
2464 // CHECK: @llvm.ppc.altivec.stvx
2465
2466 vec_stvrx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002467 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002468 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002469 // CHECK: @llvm.ppc.altivec.vperm
2470 // CHECK: @llvm.ppc.altivec.lvsr
2471 // CHECK: @llvm.ppc.altivec.vperm
2472 // CHECK: @llvm.ppc.altivec.stvx
2473
2474 vec_stvrx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002475 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002476 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002477 // CHECK: @llvm.ppc.altivec.vperm
2478 // CHECK: @llvm.ppc.altivec.lvsr
2479 // CHECK: @llvm.ppc.altivec.vperm
2480 // CHECK: @llvm.ppc.altivec.stvx
2481
2482 vec_stvrx(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
2483 // CHECK: store <8 x i16> zeroinitializer
2484 // CHECK: @llvm.ppc.altivec.lvsl
2485 // CHECK: @llvm.ppc.altivec.vperm
2486 // CHECK: @llvm.ppc.altivec.lvsr
2487 // CHECK: @llvm.ppc.altivec.vperm
2488 // CHECK: @llvm.ppc.altivec.stvx
2489
2490 vec_stvrx(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.lvx
2491 // CHECK: store <8 x i16> zeroinitializer
2492 // CHECK: @llvm.ppc.altivec.lvsl
2493 // CHECK: @llvm.ppc.altivec.vperm
2494 // CHECK: @llvm.ppc.altivec.lvsr
2495 // CHECK: @llvm.ppc.altivec.vperm
2496 // CHECK: @llvm.ppc.altivec.stvx
2497
2498 vec_stvrx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002499 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002500 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002501 // CHECK: @llvm.ppc.altivec.vperm
2502 // CHECK: @llvm.ppc.altivec.lvsr
2503 // CHECK: @llvm.ppc.altivec.vperm
2504 // CHECK: @llvm.ppc.altivec.stvx
2505
2506 vec_stvrx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002507 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002508 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002509 // CHECK: @llvm.ppc.altivec.vperm
2510 // CHECK: @llvm.ppc.altivec.lvsr
2511 // CHECK: @llvm.ppc.altivec.vperm
2512 // CHECK: @llvm.ppc.altivec.stvx
2513
2514 vec_stvrx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002515 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002516 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002517 // CHECK: @llvm.ppc.altivec.vperm
2518 // CHECK: @llvm.ppc.altivec.lvsr
2519 // CHECK: @llvm.ppc.altivec.vperm
2520 // CHECK: @llvm.ppc.altivec.stvx
2521
2522 vec_stvrx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002523 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002524 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002525 // CHECK: @llvm.ppc.altivec.vperm
2526 // CHECK: @llvm.ppc.altivec.lvsr
2527 // CHECK: @llvm.ppc.altivec.vperm
2528 // CHECK: @llvm.ppc.altivec.stvx
2529
2530 vec_stvrx(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
2531 // CHECK: store <4 x i32> zeroinitializer
2532 // CHECK: @llvm.ppc.altivec.lvsl
2533 // CHECK: @llvm.ppc.altivec.vperm
2534 // CHECK: @llvm.ppc.altivec.lvsr
2535 // CHECK: @llvm.ppc.altivec.vperm
2536 // CHECK: @llvm.ppc.altivec.stvx
2537
2538 vec_stvrx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002539 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002540 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002541 // CHECK: @llvm.ppc.altivec.vperm
2542 // CHECK: @llvm.ppc.altivec.lvsr
2543 // CHECK: @llvm.ppc.altivec.vperm
2544 // CHECK: @llvm.ppc.altivec.stvx
2545
2546 /* vec_stvrxl */
2547 vec_stvrxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002548 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002549 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002550 // CHECK: @llvm.ppc.altivec.vperm
2551 // CHECK: @llvm.ppc.altivec.lvsr
2552 // CHECK: @llvm.ppc.altivec.vperm
2553 // CHECK: @llvm.ppc.altivec.stvxl
2554
2555 vec_stvrxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002556 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002557 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002558 // CHECK: @llvm.ppc.altivec.vperm
2559 // CHECK: @llvm.ppc.altivec.lvsr
2560 // CHECK: @llvm.ppc.altivec.vperm
2561 // CHECK: @llvm.ppc.altivec.stvxl
2562
2563 vec_stvrxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002564 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002565 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002566 // CHECK: @llvm.ppc.altivec.vperm
2567 // CHECK: @llvm.ppc.altivec.lvsr
2568 // CHECK: @llvm.ppc.altivec.vperm
2569 // CHECK: @llvm.ppc.altivec.stvxl
2570
2571 vec_stvrxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002572 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002573 // CHECK: store <16 x i8> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002574 // CHECK: @llvm.ppc.altivec.vperm
2575 // CHECK: @llvm.ppc.altivec.lvsr
2576 // CHECK: @llvm.ppc.altivec.vperm
2577 // CHECK: @llvm.ppc.altivec.stvxl
2578
2579 vec_stvrxl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
2580 // CHECK: store <16 x i8> zeroinitializer
2581 // CHECK: @llvm.ppc.altivec.lvsl
2582 // CHECK: @llvm.ppc.altivec.vperm
2583 // CHECK: @llvm.ppc.altivec.lvsr
2584 // CHECK: @llvm.ppc.altivec.vperm
2585 // CHECK: @llvm.ppc.altivec.stvxl
2586
2587 vec_stvrxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002588 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002589 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002590 // CHECK: @llvm.ppc.altivec.vperm
2591 // CHECK: @llvm.ppc.altivec.lvsr
2592 // CHECK: @llvm.ppc.altivec.vperm
2593 // CHECK: @llvm.ppc.altivec.stvxl
2594
2595 vec_stvrxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002596 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002597 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002598 // CHECK: @llvm.ppc.altivec.vperm
2599 // CHECK: @llvm.ppc.altivec.lvsr
2600 // CHECK: @llvm.ppc.altivec.vperm
2601 // CHECK: @llvm.ppc.altivec.stvxl
2602
2603 vec_stvrxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002604 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002605 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002606 // CHECK: @llvm.ppc.altivec.vperm
2607 // CHECK: @llvm.ppc.altivec.lvsr
2608 // CHECK: @llvm.ppc.altivec.vperm
2609 // CHECK: @llvm.ppc.altivec.stvxl
2610
2611 vec_stvrxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002612 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002613 // CHECK: store <8 x i16> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002614 // CHECK: @llvm.ppc.altivec.vperm
2615 // CHECK: @llvm.ppc.altivec.lvsr
2616 // CHECK: @llvm.ppc.altivec.vperm
2617 // CHECK: @llvm.ppc.altivec.stvxl
2618
2619 vec_stvrxl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
2620 // CHECK: store <8 x i16> zeroinitializer
2621 // CHECK: @llvm.ppc.altivec.lvsl
2622 // CHECK: @llvm.ppc.altivec.vperm
2623 // CHECK: @llvm.ppc.altivec.lvsr
2624 // CHECK: @llvm.ppc.altivec.vperm
2625 // CHECK: @llvm.ppc.altivec.stvxl
2626
2627 vec_stvrxl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.lvx
2628 // CHECK: store <8 x i16> zeroinitializer
2629 // CHECK: @llvm.ppc.altivec.lvsl
2630 // CHECK: @llvm.ppc.altivec.vperm
2631 // CHECK: @llvm.ppc.altivec.lvsr
2632 // CHECK: @llvm.ppc.altivec.vperm
2633 // CHECK: @llvm.ppc.altivec.stvxl
2634
2635 vec_stvrxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002636 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002637 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002638 // CHECK: @llvm.ppc.altivec.vperm
2639 // CHECK: @llvm.ppc.altivec.lvsr
2640 // CHECK: @llvm.ppc.altivec.vperm
2641 // CHECK: @llvm.ppc.altivec.stvxl
2642
2643 vec_stvrxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002644 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002645 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002646 // CHECK: @llvm.ppc.altivec.vperm
2647 // CHECK: @llvm.ppc.altivec.lvsr
2648 // CHECK: @llvm.ppc.altivec.vperm
2649 // CHECK: @llvm.ppc.altivec.stvxl
2650
2651 vec_stvrxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002652 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002653 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002654 // CHECK: @llvm.ppc.altivec.vperm
2655 // CHECK: @llvm.ppc.altivec.lvsr
2656 // CHECK: @llvm.ppc.altivec.vperm
2657 // CHECK: @llvm.ppc.altivec.stvxl
2658
2659 vec_stvrxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002660 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002661 // CHECK: store <4 x i32> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002662 // CHECK: @llvm.ppc.altivec.vperm
2663 // CHECK: @llvm.ppc.altivec.lvsr
2664 // CHECK: @llvm.ppc.altivec.vperm
2665 // CHECK: @llvm.ppc.altivec.stvxl
2666
2667 vec_stvrxl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
2668 // CHECK: store <4 x i32> zeroinitializer
2669 // CHECK: @llvm.ppc.altivec.lvsl
2670 // CHECK: @llvm.ppc.altivec.vperm
2671 // CHECK: @llvm.ppc.altivec.lvsr
2672 // CHECK: @llvm.ppc.altivec.vperm
2673 // CHECK: @llvm.ppc.altivec.stvxl
2674
2675 vec_stvrxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
Anton Yartsev44270d62010-10-14 14:37:46 +00002676 // CHECK: @llvm.ppc.altivec.lvsl
Anton Yartsevd06fea82011-03-27 09:32:40 +00002677 // CHECK: store <4 x float> zeroinitializer
Anton Yartsev44270d62010-10-14 14:37:46 +00002678 // CHECK: @llvm.ppc.altivec.vperm
2679 // CHECK: @llvm.ppc.altivec.lvsr
2680 // CHECK: @llvm.ppc.altivec.vperm
2681 // CHECK: @llvm.ppc.altivec.stvxl
2682
2683 /* vec_promote */
2684 res_vsc = vec_promote(param_sc, 0); // CHECK: store <16 x i8> zeroinitializer
2685 // CHECK: insertelement <16 x i8>
2686
2687 res_vuc = vec_promote(param_uc, 0); // CHECK: store <16 x i8> zeroinitializer
2688 // CHECK: insertelement <16 x i8>
2689
2690 res_vs = vec_promote(param_s, 0); // CHECK: store <8 x i16> zeroinitializer
2691 // CHECK: insertelement <8 x i16>
2692
2693 res_vus = vec_promote(param_us, 0); // CHECK: store <8 x i16> zeroinitializer
2694 // CHECK: insertelement <8 x i16>
2695
2696 res_vi = vec_promote(param_i, 0); // CHECK: store <4 x i32> zeroinitializer
2697 // CHECK: insertelement <4 x i32>
2698
2699 res_vui = vec_promote(param_ui, 0); // CHECK: store <4 x i32> zeroinitializer
2700 // CHECK: insertelement <4 x i32>
2701
2702 res_vf = vec_promote(param_f, 0); // CHECK: store <4 x float> zeroinitializer
2703 // CHECK: insertelement <4 x float>
2704
2705 /* vec_splats */
2706 res_vsc = vec_splats(param_sc); // CHECK: insertelement <16 x i8>
2707
2708 res_vuc = vec_splats(param_uc); // CHECK: insertelement <16 x i8>
2709
2710 res_vs = vec_splats(param_s); // CHECK: insertelement <8 x i16>
2711
2712 res_vus = vec_splats(param_us); // CHECK: insertelement <8 x i16>
2713
2714 res_vi = vec_splats(param_i); // CHECK: insertelement <4 x i32>
2715
2716 res_vui = vec_splats(param_ui); // CHECK: insertelement <4 x i32>
2717
2718 res_vf = vec_splats(param_f); // CHECK: insertelement <4 x float>
2719
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00002720 /* ------------------------------ predicates -------------------------------------- */
Chris Lattnerdd173942010-04-14 03:54:58 +00002721
Anton Yartsev44270d62010-10-14 14:37:46 +00002722 /* vec_all_eq */
Chris Lattnerab866b42010-04-14 20:35:39 +00002723 res_i = vec_all_eq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002724 res_i = vec_all_eq(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002725 res_i = vec_all_eq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002726 res_i = vec_all_eq(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2727 res_i = vec_all_eq(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2728 res_i = vec_all_eq(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2729 res_i = vec_all_eq(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002730 res_i = vec_all_eq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002731 res_i = vec_all_eq(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002732 res_i = vec_all_eq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002733 res_i = vec_all_eq(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2734 res_i = vec_all_eq(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2735 res_i = vec_all_eq(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2736 res_i = vec_all_eq(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2737 res_i = vec_all_eq(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002738 res_i = vec_all_eq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002739 res_i = vec_all_eq(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002740 res_i = vec_all_eq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002741 res_i = vec_all_eq(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2742 res_i = vec_all_eq(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2743 res_i = vec_all_eq(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2744 res_i = vec_all_eq(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002745 res_i = vec_all_eq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
2746
2747 /* vec_all_ge */
Chris Lattnerab866b42010-04-14 20:35:39 +00002748 res_i = vec_all_ge(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002749 res_i = vec_all_ge(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002750 res_i = vec_all_ge(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002751 res_i = vec_all_ge(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2752 res_i = vec_all_ge(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2753 res_i = vec_all_ge(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2754 res_i = vec_all_ge(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002755 res_i = vec_all_ge(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002756 res_i = vec_all_ge(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002757 res_i = vec_all_ge(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002758 res_i = vec_all_ge(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2759 res_i = vec_all_ge(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2760 res_i = vec_all_ge(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2761 res_i = vec_all_ge(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002762 res_i = vec_all_ge(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002763 res_i = vec_all_ge(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002764 res_i = vec_all_ge(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002765 res_i = vec_all_ge(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2766 res_i = vec_all_ge(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2767 res_i = vec_all_ge(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2768 res_i = vec_all_ge(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00002769 res_i = vec_all_ge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002770
2771 /* vec_all_gt */
Chris Lattnerab866b42010-04-14 20:35:39 +00002772 res_i = vec_all_gt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002773 res_i = vec_all_gt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002774 res_i = vec_all_gt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002775 res_i = vec_all_gt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2776 res_i = vec_all_gt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2777 res_i = vec_all_gt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2778 res_i = vec_all_gt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002779 res_i = vec_all_gt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002780 res_i = vec_all_gt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002781 res_i = vec_all_gt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002782 res_i = vec_all_gt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2783 res_i = vec_all_gt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2784 res_i = vec_all_gt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2785 res_i = vec_all_gt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002786 res_i = vec_all_gt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002787 res_i = vec_all_gt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002788 res_i = vec_all_gt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002789 res_i = vec_all_gt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2790 res_i = vec_all_gt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2791 res_i = vec_all_gt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2792 res_i = vec_all_gt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002793 res_i = vec_all_gt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
2794
2795 /* vec_all_in */
2796 res_i = vec_all_in(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp.p
2797
2798 /* vec_all_le */
Chris Lattnerab866b42010-04-14 20:35:39 +00002799 res_i = vec_all_le(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002800 res_i = vec_all_le(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002801 res_i = vec_all_le(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002802 res_i = vec_all_le(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2803 res_i = vec_all_le(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2804 res_i = vec_all_le(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2805 res_i = vec_all_le(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002806 res_i = vec_all_le(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002807 res_i = vec_all_le(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002808 res_i = vec_all_le(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002809 res_i = vec_all_le(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2810 res_i = vec_all_le(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2811 res_i = vec_all_le(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2812 res_i = vec_all_le(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002813 res_i = vec_all_le(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002814 res_i = vec_all_le(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002815 res_i = vec_all_le(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002816 res_i = vec_all_le(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2817 res_i = vec_all_le(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2818 res_i = vec_all_le(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2819 res_i = vec_all_le(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00002820 res_i = vec_all_le(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002821
Anton Yartseva4f235b2010-08-19 11:57:49 +00002822 /* vec_all_lt */
2823 res_i = vec_all_lt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
2824 res_i = vec_all_lt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
2825 res_i = vec_all_lt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2826 res_i = vec_all_lt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2827 res_i = vec_all_lt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2828 res_i = vec_all_lt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2829 res_i = vec_all_lt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2830 res_i = vec_all_lt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
2831 res_i = vec_all_lt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
2832 res_i = vec_all_lt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2833 res_i = vec_all_lt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2834 res_i = vec_all_lt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2835 res_i = vec_all_lt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2836 res_i = vec_all_lt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2837 res_i = vec_all_lt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
2838 res_i = vec_all_lt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
2839 res_i = vec_all_lt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2840 res_i = vec_all_lt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2841 res_i = vec_all_lt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2842 res_i = vec_all_lt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2843 res_i = vec_all_lt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2844 res_i = vec_all_lt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
2845
Chris Lattnerdd173942010-04-14 03:54:58 +00002846 /* vec_all_nan */
2847 res_i = vec_all_nan(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
2848
2849 /* vec_all_ne */
Chris Lattnerab866b42010-04-14 20:35:39 +00002850 res_i = vec_all_ne(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002851 res_i = vec_all_ne(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002852 res_i = vec_all_ne(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002853 res_i = vec_all_ne(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2854 res_i = vec_all_ne(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2855 res_i = vec_all_ne(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2856 res_i = vec_all_ne(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002857 res_i = vec_all_ne(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002858 res_i = vec_all_ne(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002859 res_i = vec_all_ne(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002860 res_i = vec_all_ne(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2861 res_i = vec_all_ne(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2862 res_i = vec_all_ne(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2863 res_i = vec_all_ne(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2864 res_i = vec_all_ne(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002865 res_i = vec_all_ne(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002866 res_i = vec_all_ne(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002867 res_i = vec_all_ne(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002868 res_i = vec_all_ne(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2869 res_i = vec_all_ne(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2870 res_i = vec_all_ne(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2871 res_i = vec_all_ne(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002872 res_i = vec_all_ne(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
2873
2874 /* vec_all_nge */
2875 res_i = vec_all_nge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
2876
2877 /* vec_all_ngt */
2878 res_i = vec_all_ngt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
2879
2880 /* vec_all_nle */
2881 res_i = vec_all_nle(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
2882
2883 /* vec_all_nlt */
2884 res_i = vec_all_nlt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
2885
2886 /* vec_all_numeric */
2887 res_i = vec_all_numeric(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
2888
2889 /* vec_any_eq */
Chris Lattnerab866b42010-04-14 20:35:39 +00002890 res_i = vec_any_eq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002891 res_i = vec_any_eq(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002892 res_i = vec_any_eq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002893 res_i = vec_any_eq(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2894 res_i = vec_any_eq(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2895 res_i = vec_any_eq(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
2896 res_i = vec_any_eq(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002897 res_i = vec_any_eq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002898 res_i = vec_any_eq(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002899 res_i = vec_any_eq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002900 res_i = vec_any_eq(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2901 res_i = vec_any_eq(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2902 res_i = vec_any_eq(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2903 res_i = vec_any_eq(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
2904 res_i = vec_any_eq(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002905 res_i = vec_any_eq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002906 res_i = vec_any_eq(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002907 res_i = vec_any_eq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002908 res_i = vec_any_eq(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2909 res_i = vec_any_eq(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2910 res_i = vec_any_eq(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
2911 res_i = vec_any_eq(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002912 res_i = vec_any_eq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
2913
2914 /* vec_any_ge */
Chris Lattnerab866b42010-04-14 20:35:39 +00002915 res_i = vec_any_ge(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002916 res_i = vec_any_ge(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002917 res_i = vec_any_ge(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002918 res_i = vec_any_ge(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2919 res_i = vec_any_ge(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2920 res_i = vec_any_ge(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2921 res_i = vec_any_ge(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002922 res_i = vec_any_ge(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002923 res_i = vec_any_ge(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002924 res_i = vec_any_ge(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002925 res_i = vec_any_ge(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2926 res_i = vec_any_ge(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2927 res_i = vec_any_ge(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2928 res_i = vec_any_ge(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002929 res_i = vec_any_ge(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002930 res_i = vec_any_ge(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002931 res_i = vec_any_ge(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002932 res_i = vec_any_ge(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2933 res_i = vec_any_ge(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2934 res_i = vec_any_ge(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2935 res_i = vec_any_ge(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00002936 res_i = vec_any_ge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002937
2938 /* vec_any_gt */
Chris Lattnerab866b42010-04-14 20:35:39 +00002939 res_i = vec_any_gt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002940 res_i = vec_any_gt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002941 res_i = vec_any_gt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002942 res_i = vec_any_gt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2943 res_i = vec_any_gt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2944 res_i = vec_any_gt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2945 res_i = vec_any_gt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002946 res_i = vec_any_gt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002947 res_i = vec_any_gt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002948 res_i = vec_any_gt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002949 res_i = vec_any_gt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2950 res_i = vec_any_gt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2951 res_i = vec_any_gt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2952 res_i = vec_any_gt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002953 res_i = vec_any_gt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002954 res_i = vec_any_gt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002955 res_i = vec_any_gt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002956 res_i = vec_any_gt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2957 res_i = vec_any_gt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2958 res_i = vec_any_gt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2959 res_i = vec_any_gt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002960 res_i = vec_any_gt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
2961
2962 /* vec_any_le */
Chris Lattnerab866b42010-04-14 20:35:39 +00002963 res_i = vec_any_le(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002964 res_i = vec_any_le(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002965 res_i = vec_any_le(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002966 res_i = vec_any_le(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2967 res_i = vec_any_le(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2968 res_i = vec_any_le(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2969 res_i = vec_any_le(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002970 res_i = vec_any_le(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002971 res_i = vec_any_le(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002972 res_i = vec_any_le(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002973 res_i = vec_any_le(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2974 res_i = vec_any_le(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2975 res_i = vec_any_le(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2976 res_i = vec_any_le(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002977 res_i = vec_any_le(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002978 res_i = vec_any_le(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002979 res_i = vec_any_le(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002980 res_i = vec_any_le(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2981 res_i = vec_any_le(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2982 res_i = vec_any_le(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
2983 res_i = vec_any_le(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Korobeynikov4d3a7b02010-06-19 09:47:18 +00002984 res_i = vec_any_le(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002985
2986 /* vec_any_lt */
Chris Lattnerab866b42010-04-14 20:35:39 +00002987 res_i = vec_any_lt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002988 res_i = vec_any_lt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002989 res_i = vec_any_lt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002990 res_i = vec_any_lt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2991 res_i = vec_any_lt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2992 res_i = vec_any_lt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
2993 res_i = vec_any_lt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002994 res_i = vec_any_lt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002995 res_i = vec_any_lt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00002996 res_i = vec_any_lt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00002997 res_i = vec_any_lt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2998 res_i = vec_any_lt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
2999 res_i = vec_any_lt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
3000 res_i = vec_any_lt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003001 res_i = vec_any_lt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003002 res_i = vec_any_lt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003003 res_i = vec_any_lt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003004 res_i = vec_any_lt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
3005 res_i = vec_any_lt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
3006 res_i = vec_any_lt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
3007 res_i = vec_any_lt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003008 res_i = vec_any_lt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
3009
3010 /* vec_any_nan */
3011 res_i = vec_any_nan(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
3012
3013 /* vec_any_ne */
Chris Lattnerab866b42010-04-14 20:35:39 +00003014 res_i = vec_any_ne(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003015 res_i = vec_any_ne(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003016 res_i = vec_any_ne(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003017 res_i = vec_any_ne(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
3018 res_i = vec_any_ne(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
3019 res_i = vec_any_ne(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
3020 res_i = vec_any_ne(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003021 res_i = vec_any_ne(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003022 res_i = vec_any_ne(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003023 res_i = vec_any_ne(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003024 res_i = vec_any_ne(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
3025 res_i = vec_any_ne(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
3026 res_i = vec_any_ne(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
3027 res_i = vec_any_ne(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
3028 res_i = vec_any_ne(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003029 res_i = vec_any_ne(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003030 res_i = vec_any_ne(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003031 res_i = vec_any_ne(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Anton Yartseva4f235b2010-08-19 11:57:49 +00003032 res_i = vec_any_ne(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
3033 res_i = vec_any_ne(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
3034 res_i = vec_any_ne(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
3035 res_i = vec_any_ne(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003036 res_i = vec_any_ne(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
3037
3038 /* vec_any_nge */
3039 res_i = vec_any_nge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
3040
3041 /* vec_any_ngt */
3042 res_i = vec_any_ngt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
3043
3044 /* vec_any_nle */
3045 res_i = vec_any_nle(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
3046
3047 /* vec_any_nlt */
3048 res_i = vec_any_nlt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
3049
3050 /* vec_any_numeric */
3051 res_i = vec_any_numeric(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
3052
3053 /* vec_any_out */
3054 res_i = vec_any_out(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp.p
Chris Lattnerdd173942010-04-14 03:54:58 +00003055}
Anton Yartsevaa4fe052010-11-18 03:19:30 +00003056
Anton Yartsevd06fea82011-03-27 09:32:40 +00003057/* ------------------------------ Relational Operators ------------------------------ */
Anton Yartsevaa4fe052010-11-18 03:19:30 +00003058// CHECK: define void @test7
3059void test7() {
3060 vector signed char vsc1 = (vector signed char)(-1);
3061 vector signed char vsc2 = (vector signed char)(-2);
3062 res_i = (vsc1 == vsc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
3063 res_i = (vsc1 != vsc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
3064 res_i = (vsc1 < vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
3065 res_i = (vsc1 > vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
3066 res_i = (vsc1 <= vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
3067 res_i = (vsc1 >= vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
3068 vector unsigned char vuc1 = (vector unsigned char)(1);
3069 vector unsigned char vuc2 = (vector unsigned char)(2);
3070 res_i = (vuc1 == vuc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
3071 res_i = (vuc1 != vuc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
3072 res_i = (vuc1 < vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
3073 res_i = (vuc1 > vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
3074 res_i = (vuc1 <= vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
3075 res_i = (vuc1 >= vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
3076 vector short vs1 = (vector short)(-1);
3077 vector short vs2 = (vector short)(-2);
3078 res_i = (vs1 == vs2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
3079 res_i = (vs1 != vs2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
3080 res_i = (vs1 < vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
3081 res_i = (vs1 > vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
3082 res_i = (vs1 <= vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
3083 res_i = (vs1 >= vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
3084 vector unsigned short vus1 = (vector unsigned short)(1);
3085 vector unsigned short vus2 = (vector unsigned short)(2);
3086 res_i = (vus1 == vus2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
3087 res_i = (vus1 != vus2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
3088 res_i = (vus1 < vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
3089 res_i = (vus1 > vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
3090 res_i = (vus1 <= vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
3091 res_i = (vus1 >= vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
3092 vector int vi1 = (vector int)(-1);
3093 vector int vi2 = (vector int)(-2);
3094 res_i = (vi1 == vi2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
3095 res_i = (vi1 != vi2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
3096 res_i = (vi1 < vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
3097 res_i = (vi1 > vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
3098 res_i = (vi1 <= vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
3099 res_i = (vi1 >= vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
3100 vector unsigned int vui1 = (vector unsigned int)(1);
3101 vector unsigned int vui2 = (vector unsigned int)(2);
3102 res_i = (vui1 == vui2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
3103 res_i = (vui1 != vui2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
3104 res_i = (vui1 < vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
3105 res_i = (vui1 > vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
3106 res_i = (vui1 <= vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
3107 res_i = (vui1 >= vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
3108 vector float vf1 = (vector float)(1.0);
3109 vector float vf2 = (vector float)(2.0);
3110 res_i = (vf1 == vf2); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 2
3111 res_i = (vf1 != vf2); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 0
3112 res_i = (vf1 < vf2); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
3113 res_i = (vf1 > vf2); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
3114 res_i = (vf1 <= vf2); // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
3115 res_i = (vf1 >= vf2); // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
3116}