RFR: 8373343: C2: verify AddP base input only set for heap addresses

Dean Long dlong at openjdk.org
Wed Dec 17 02:51:51 UTC 2025


On Mon, 15 Dec 2025 14:00:38 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> src/hotspot/share/opto/macro.cpp line 1211:
>> 
>>> 1209: 
>>> 1210: Node* PhaseMacroExpand::make_store(Node* ctl, Node* mem, Node* base, int offset, Node* value, BasicType bt) {
>>> 1211:   Node* adr = basic_plus_adr(top(), base, offset);
>> 
>> Doesn't this cause an assert if make_load or make_store is used with a heap oop?  Isn't that a problem for code like PhaseMacroExpand::initialize_object() that calls make_store() with an object?
>
> `make_load`/`make_store` happen to be only called for non oop accesses. I could rename then to `make_raw_load`/`make_raw_store` to avoid any confusion. What do you think?

Yes, I like make_raw_load/make_raw_store or even make_load_raw/make_store_raw.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28769#discussion_r2625404927


More information about the hotspot-compiler-dev mailing list