7192964: assert(false) failed: bad AD file
Shifts with loop variant counts "a[i]=1<<b[i];" should not be vectorized since hw does not support it. Reviewed-by: twisti
This commit is contained in:
parent
a14e902e92
commit
ef4102148a
@ -1055,6 +1055,9 @@ void SuperWord::filter_packs() {
|
||||
// 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 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
|
||||
|
||||
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)) {
|
||||
|
@ -180,9 +180,9 @@ bool VectorNode::is_shift(Node* n) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if input is loop invarient vector.
|
||||
// Check if input is loop invariant vector.
|
||||
bool VectorNode::is_invariant_vector(Node* n) {
|
||||
// Only Replicate vector nodes are loop invarient for now.
|
||||
// Only Replicate vector nodes are loop invariant for now.
|
||||
switch (n->Opcode()) {
|
||||
case Op_ReplicateB:
|
||||
case Op_ReplicateS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user