Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/superword.cpp Tue Aug 21 10:48:50 2012 -0700 +++ b/src/share/vm/opto/superword.cpp Tue Aug 21 14:50:02 2012 -0700 @@ -1055,6 +1055,9 @@ // Can code be generated for pack p? bool SuperWord::implemented(Node_List* p) { Node* p0 = p->at(0); + if (VectorNode::is_shift(p0) && in_bb(p0->in(2))) { + return false; // vector shift count should be loop's invariant. + } return VectorNode::implemented(p0->Opcode(), p->size(), velt_basic_type(p0)); } @@ -1404,6 +1407,7 @@ if (same_opd) { if (opd->is_Vector() || opd->is_LoadVector()) { + assert(((opd_idx != 2) || !VectorNode::is_shift(p0)), "shift's count can't be vector"); return opd; // input is matching vector } if ((opd_idx == 2) && VectorNode::is_shift(p0)) {