RFR: 8264104: Eliminate unnecessary vector mask conversion during VectorUnbox for floating point VectorMask [v3]

Xiaohong Gong xgong at openjdk.java.net
Mon Apr 12 07:58:07 UTC 2021

On Mon, 12 Apr 2021 07:02:38 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/hotspot/share/opto/vectornode.hpp line 1247:
>>> 1245:     assert(type2aelembytes(in_vt->element_basic_type()) == type2aelembytes(vt->element_basic_type()), "element size must match");
>>> 1246:   }
>>> 1247: 
>> FTR there's a way to avoid platform-specific changes (in AD files) if we don't envision any non-trivial conversions to be supported: just disable matching of the node by overriding `Node::ideal_reg()`:
>> virtual uint ideal_reg() const { return 0; } // not matched in the AD file
> Good idea, I will try this way. Thanks!

I met the bad AD file issue when I remove the changes in AD files and overriding `Node::ideal_reg()`. I guess if a node is not used as an input of other node, this can work well? For the `VectorMaskCastNode`, it must be an input for some other nodes. If just disable the matching of this node, how does its usage find the right input code?


PR: https://git.openjdk.java.net/jdk/pull/3238

More information about the hotspot-compiler-dev mailing list