Mercurial > hg > truffle
comparison src/share/vm/opto/superword.cpp @ 6617:4b0d6fd74911
7192964: assert(false) failed: bad AD file
Summary: Shifts with loop variant counts "a[i]=1<<b[i];" should not be vectorized since hw does not support it.
Reviewed-by: twisti
author | kvn |
---|---|
date | Tue, 21 Aug 2012 14:50:02 -0700 |
parents | 006050192a5a |
children | 5af51c882207 |
comparison
equal
deleted
inserted
replaced
6616:7a302948f5a4 | 6617:4b0d6fd74911 |
---|---|
1053 | 1053 |
1054 //------------------------------implemented--------------------------- | 1054 //------------------------------implemented--------------------------- |
1055 // Can code be generated for pack p? | 1055 // Can code be generated for pack p? |
1056 bool SuperWord::implemented(Node_List* p) { | 1056 bool SuperWord::implemented(Node_List* p) { |
1057 Node* p0 = p->at(0); | 1057 Node* p0 = p->at(0); |
1058 if (VectorNode::is_shift(p0) && in_bb(p0->in(2))) { | |
1059 return false; // vector shift count should be loop's invariant. | |
1060 } | |
1058 return VectorNode::implemented(p0->Opcode(), p->size(), velt_basic_type(p0)); | 1061 return VectorNode::implemented(p0->Opcode(), p->size(), velt_basic_type(p0)); |
1059 } | 1062 } |
1060 | 1063 |
1061 //------------------------------profitable--------------------------- | 1064 //------------------------------profitable--------------------------- |
1062 // For pack p, are all operands and all uses (with in the block) vector? | 1065 // For pack p, are all operands and all uses (with in the block) vector? |
1402 } | 1405 } |
1403 } | 1406 } |
1404 | 1407 |
1405 if (same_opd) { | 1408 if (same_opd) { |
1406 if (opd->is_Vector() || opd->is_LoadVector()) { | 1409 if (opd->is_Vector() || opd->is_LoadVector()) { |
1410 assert(((opd_idx != 2) || !VectorNode::is_shift(p0)), "shift's count can't be vector"); | |
1407 return opd; // input is matching vector | 1411 return opd; // input is matching vector |
1408 } | 1412 } |
1409 if ((opd_idx == 2) && VectorNode::is_shift(p0)) { | 1413 if ((opd_idx == 2) && VectorNode::is_shift(p0)) { |
1410 // No vector is needed for shift count. | 1414 // No vector is needed for shift count. |
1411 // Vector instructions do not mask shift count, do it here. | 1415 // Vector instructions do not mask shift count, do it here. |