Skip to content
Permalink
Browse files
8277843: [Vector API] scalar2vector generates incorrect type info for…
… mask operations if Op_MaskAll is unavailable

Co-authored-by: Jatin Bhateja <jbhateja@openjdk.org>
Reviewed-by: thartmann, jbhateja
  • Loading branch information
DamonFool and Jatin Bhateja committed Nov 30, 2021
1 parent 3ee26c6 commit ceae380d3a3fcef5678e3073e25eb37ca0a24c46
Showing 1 changed file with 3 additions and 3 deletions.
@@ -596,13 +596,13 @@ VectorNode* VectorNode::make(int opc, Node* n1, Node* n2, Node* n3, uint vlen, B
// Scalar promotion
VectorNode* VectorNode::scalar2vector(Node* s, uint vlen, const Type* opd_t, bool is_mask) {
BasicType bt = opd_t->array_element_basic_type();
const TypeVect* vt = opd_t->singleton() ? TypeVect::make(opd_t, vlen, is_mask)
: TypeVect::make(bt, vlen, is_mask);

if (is_mask && Matcher::match_rule_supported_vector(Op_MaskAll, vlen, bt)) {
const TypeVect* vt = TypeVect::make(opd_t, vlen, true);
return new MaskAllNode(s, vt);
}

const TypeVect* vt = opd_t->singleton() ? TypeVect::make(opd_t, vlen)
: TypeVect::make(bt, vlen);
switch (bt) {
case T_BOOLEAN:
case T_BYTE:

1 comment on commit ceae380

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on ceae380 Nov 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.