projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
586d6a8
)
Encode a cost of zero as a cost of 1.
author
Chris Lattner
<sabre@nondot.org>
Mon, 17 Apr 2006 05:25:16 +0000
(
05:25
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 17 Apr 2006 05:25:16 +0000
(
05:25
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27745
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/PerfectShuffle/PerfectShuffle.cpp
patch
|
blob
|
history
diff --git
a/utils/PerfectShuffle/PerfectShuffle.cpp
b/utils/PerfectShuffle/PerfectShuffle.cpp
index c2abe9b6116f305d07e2f1a01f748549e80431ea..b19dd0d39ace4c34f7febb0e10bf40007dc3dda0 100644
(file)
--- a/
utils/PerfectShuffle/PerfectShuffle.cpp
+++ b/
utils/PerfectShuffle/PerfectShuffle.cpp
@@
-381,7
+381,9
@@
int main() {
// CostSat - The cost of this operation saturated to two bits.
unsigned CostSat = ShufTab[i].Cost;
- if (CostSat > 3) CostSat = 3;
+ if (CostSat > 4) CostSat = 4;
+ if (CostSat == 0) CostSat = 1;
+ --CostSat; // Cost is now between 0-3.
unsigned OpNum = ShufTab[i].Op ? ShufTab[i].Op->OpNum : 0;
assert(OpNum < 16 && "Too few bits to encode operation!");