RFR: 8265956: JVM crashes when matching LShiftVB Node [v3]
Wang Huang
whuang at openjdk.java.net
Sat May 8 06:46:13 UTC 2021
On Sat, 8 May 2021 03:52:58 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Wang Huang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix bugs
>
> src/hotspot/share/opto/vectorIntrinsics.cpp line 372:
>
>> 370: } else if (step_val->get_con() > 1) {
>> 371: Node* cnt = gvn().makecon(TypeInt::make(log2i_exact(step_val->get_con())));
>> 372: Node* shift_cnt = gvn().transform(new LShiftCntVNode(cnt, vt));
>
> Use "vector_shift_count"? It will mask the shift count before generating the `LShiftCntVNode`.
`vector_shift_count` which calls `VectorNode::shift_count` does not contain `Op_LShiftB`:
```c++
VectorNode* VectorNode::shift_count(int opc, Node* cnt, uint vlen, BasicType bt) {
// Match shift count type with shift vector type.
const TypeVect* vt = TypeVect::make(bt, vlen);
switch (opc) {
case Op_LShiftI:
case Op_LShiftL:
return new LShiftCntVNode(cnt, vt);
case Op_RShiftI:
case Op_RShiftL:
case Op_URShiftB:
case Op_URShiftS:
case Op_URShiftI:
case Op_URShiftL:
return new RShiftCntVNode(cnt, vt);
default:
fatal("Missed vector creation for '%s'", NodeClassNames[opc]);
return NULL;
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/3747
More information about the hotspot-compiler-dev
mailing list