8238690: C2: Handle vector shifts by constant and non-constant scalar uniformly

Reviewed-by: thartmann, sviswanathan
This commit is contained in:
Vladimir Ivanov 2020-02-11 14:55:43 +03:00
parent 0d84fe9872
commit 74e68b4092
8 changed files with 71 additions and 69 deletions

View file

@ -467,7 +467,7 @@ VectorNode* VectorNode::scalar2vector(Node* s, uint vlen, const Type* opd_t) {
}
VectorNode* VectorNode::shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt) {
assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
assert(VectorNode::is_shift(shift), "sanity");
// Match shift count type with shift vector type.
const TypeVect* vt = TypeVect::make(bt, vlen);
switch (shift->Opcode()) {
@ -506,7 +506,7 @@ bool VectorNode::is_vector_shift(int opc) {
}
}
bool VectorNode::is_shift_count(int opc) {
bool VectorNode::is_vector_shift_count(int opc) {
assert(opc > _last_machine_leaf && opc < _last_opcode, "invalid opcode");
switch (opc) {
case Op_RShiftCntV: