Lines Matching refs:ShufTab
96 /// ShufTab - This is the actual shuffle table that we are trying to generate.
98 static ShuffleVal ShufTab[65536];
148 if (ShufTab[Op].Arg0 == 0x0123)
150 else if (ShufTab[Op].Arg0 == 0x4567)
162 std::cerr << " = " << ShufTab[ThisOp].Op->getName() << "(";
164 if (ShufTab[ShufTab[ThisOp].Arg0].Cost == 0) {
165 std::cerr << getZeroCostOpName(ShufTab[ThisOp].Arg0);
166 PrintMask(ShufTab[ThisOp].Arg0, std::cerr);
170 if (Vals[i] == ShufTab[ThisOp].Arg0) {
176 if (!ShufTab[Vals[ValNo]].Op->isOnlyLHSOperator()) {
178 if (ShufTab[ShufTab[ThisOp].Arg1].Cost == 0) {
179 std::cerr << getZeroCostOpName(ShufTab[ThisOp].Arg1);
180 PrintMask(ShufTab[ThisOp].Arg1, std::cerr);
184 if (Vals[i] == ShufTab[ThisOp].Arg1) {
196 Count += ShufTab[i].Cost < 100;
202 if (ShufTab[Elt].Cost == 0) return;
209 unsigned Arg0 = ShufTab[Elt].Arg0, Arg1 = ShufTab[Elt].Arg1;
210 if (ShufTab[Arg0].Cost)
212 if (Arg0 != Arg1 && ShufTab[Arg1].Cost)
221 ShufTab[0x0123].Cost = 0;
222 ShufTab[0x0123].Op = 0;
223 ShufTab[0x0123].Arg0 = 0x0123;
224 ShufTab[0x4567].Cost = 0;
225 ShufTab[0x4567].Op = 0;
226 ShufTab[0x4567].Arg0 = 0x4567;
241 unsigned MaxCost = ShufTab[0].Cost;
244 if (ShufTab[i].Cost > MaxCost)
245 MaxCost = ShufTab[i].Cost;
275 unsigned MinCost = ShufTab[i].Cost;
280 if (ShufTab[NewElt].Cost < MinCost) {
281 MinCost = ShufTab[NewElt].Cost;
289 ShufTab[i] = ShufTab[MinVal];
296 if (ShufTab[LHS].Cost > 1000) continue;
300 if (ShufTab[LHS].Cost + 1 >= MaxCost)
309 unsigned Cost = ShufTab[LHS].Cost + Op->getCost();
310 if (Cost < ShufTab[ResultMask].Cost) {
311 ShufTab[ResultMask].Cost = Cost;
312 ShufTab[ResultMask].Op = Op;
313 ShufTab[ResultMask].Arg0 = LHS;
314 ShufTab[ResultMask].Arg1 = LHS;
324 if (ShufTab[RHS].Cost > 1000) continue;
328 if (ShufTab[RHS].Cost + 1 >= MaxCost)
335 if (ShufTab[ResultMask].Cost <= OpCount ||
336 ShufTab[ResultMask].Cost <= ShufTab[LHS].Cost ||
337 ShufTab[ResultMask].Cost <= ShufTab[RHS].Cost)
348 if (Cost < ShufTab[ResultMask].Cost) {
349 ShufTab[ResultMask].Cost = Cost;
350 ShufTab[ResultMask].Op = Op;
351 ShufTab[ResultMask].Arg0 = LHS;
352 ShufTab[ResultMask].Arg1 = RHS;
368 if (ShufTab[i].Cost > 9)
371 ++CostArray[ShufTab[i].Cost];
389 unsigned CostSat = ShufTab[i].Cost;
394 unsigned OpNum = ShufTab[i].Op ? ShufTab[i].Op->OpNum : 0;
397 unsigned LHS = getCompressedMask(ShufTab[i].Arg0);
398 unsigned RHS = getCompressedMask(ShufTab[i].Arg1);
406 std::cout << ": Cost " << ShufTab[i].Cost;
407 std::cout << " " << (ShufTab[i].Op ? ShufTab[i].Op->getName() : "copy");
409 if (ShufTab[ShufTab[i].Arg0].Cost == 0) {
410 std::cout << getZeroCostOpName(ShufTab[i].Arg0);
412 PrintMask(ShufTab[i].Arg0, std::cout);
415 if (ShufTab[i].Op && !ShufTab[i].Op->isOnlyLHSOperator()) {
417 if (ShufTab[ShufTab[i].Arg1].Cost == 0) {
418 std::cout << getZeroCostOpName(ShufTab[i].Arg1);
420 PrintMask(ShufTab[i].Arg1, std::cout);
431 if (ShufTab[i].Cost < 1000) {
433 std::cerr << " - Cost " << ShufTab[i].Cost << " - ";