RFR: 8263164: assert(_base >= VectorA && _base <= VectorZ) failed: Not a Vector while calling StoreVectorNode::memory_size()

Jie Fu jiefu at openjdk.java.net
Wed Mar 10 01:32:05 UTC 2021


On Wed, 10 Mar 2021 00:41:44 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> What I mean is IGVN should replace nodes which have TOP input with TOP and remove them from graph as dead nodes.
> `Value()` methods do replacement after checking node's inputs for TOP. And `Ideal()` method should check for TOP and immediately return to avoid unneeded transformations (or guard transformation code with `!= TOP` check) and let `Value()` do replacement with TOP.
> 
> In case of memory nodes `MemNode::Ideal_common()` do such checks (but only for ctrl, mem and adr inputs):
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/memnode.cpp#L286
> 
> To my surprise `StoreNode::Ideal()` does not check `in(MemNode::ValueIn)` input for TOP at all. May be because in normal case we don't do much for `in(MemNode::ValueIn)` when processing Store nodes and eventually `StoreNode::Value()` will replace node with TOP.
> 
> Yes, your fix works for `Vector` nodes. But as you saw normal `Store` nodes also can have TOP value input and we do useless transformations until StoreNode::Value() calls. I think the better fix is to check ` in(MemNode::ValueIn)` for TOP in `StoreNode::Ideal()`.
> 
> And we need to test it hard because it is very old code.

Thanks @vnkozlov for your kind explanation.
I'll try to fix it in `StoreNode::Ideal()` and test it as much as we can.
Thanks.

-------------

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


More information about the hotspot-compiler-dev mailing list