RFR: 8349523: Unused runtime calls to drem/frem should be removed

Christian Hagedorn chagedorn at openjdk.org
Thu Feb 20 10:34:51 UTC 2025


On Wed, 19 Feb 2025 12:47:03 GMT, Marc Chevalier <duke at openjdk.org> wrote:

> Remove frem and drem macros nodes when the result is not used. These nodes have other outputs (like memory), which is not meaningful, but preventing them to be dropped so easily. This patch removes the useless frem/drem nodes, and by rewiring the inputs to the outputs.
> 
> Thanks,
> Marc

Scratch that - I think it's not well applicable since `ProjNode` is too general. Would have probably worked if we had a special projection node just for `drem/frem` but that would not be worth the trouble. I think it's better the way you have it inside `ModF/ModD`. This also saves a lot of checks.

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

PR Comment: https://git.openjdk.org/jdk/pull/23694#issuecomment-2671092747


More information about the hotspot-compiler-dev mailing list