llvm.org GIT mirror llvm / 8c3e847
Encode a cost of zero as a cost of 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27745 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
380380
381381 // CostSat - The cost of this operation saturated to two bits.
382382 unsigned CostSat = ShufTab[i].Cost;
383 if (CostSat > 3) CostSat = 3;
383 if (CostSat > 4) CostSat = 4;
384 if (CostSat == 0) CostSat = 1;
385 --CostSat; // Cost is now between 0-3.
384386
385387 unsigned OpNum = ShufTab[i].Op ? ShufTab[i].Op->OpNum : 0;
386388 assert(OpNum < 16 && "Too few bits to encode operation!");