RFR: 8353345: C2 asserts because maskShiftAmount modifies node without deleting the hash [v2]

Marc Chevalier mchevalier at openjdk.org
Wed Apr 2 17:20:35 UTC 2025


> First delete the hash, then `set_req`. This way, we avoid changing the node (a non-`this` node) without deleting the hash. This wrong ordering is not new from [JDK-8347459](https://bugs.openjdk.org/browse/JDK-8347459), but before that, only `this` was going through this function, so it was ok. But since, it is used with other nodes, hence the need to remove the hash.
> 
> Also, not do any of that outside IGVN, but requires to register nested shifts for IGVN in parsing not to miss them later.
> 
> Thanks,
> Marc

Marc Chevalier has updated the pull request incrementally with two additional commits since the last revision:

 - Fix spacing
 - Do not eagerly replace shift amounts in nested lshift

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24355/files
  - new: https://git.openjdk.org/jdk/pull/24355/files/6dcc6c15..d84b3d6d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24355&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24355&range=00-01

  Stats: 50 lines in 2 files changed: 21 ins; 1 del; 28 mod
  Patch: https://git.openjdk.org/jdk/pull/24355.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24355/head:pull/24355

PR: https://git.openjdk.org/jdk/pull/24355


More information about the hotspot-compiler-dev mailing list