RFR: 8301814: RISCV: Delete unused CountLoopEnd instruct with CmpX

Feilong Jiang fjiang at openjdk.org
Tue Feb 21 02:32:23 UTC 2023


On Mon, 20 Feb 2023 07:34:08 GMT, SUN Guoyun <duke at openjdk.org> wrote:

> CountLoopEnd only for T_int, therefore the following instructs in riscv.ad are useless and should be deleted.
> 
> CountedLoopEnd cmp (CmpL op1 op2)
> CountedLoopEnd cmp (CmpU op1 op2)
> CountedLoopEnd cmp (CmpP op1 op2)
> CountedLoopEnd cmp (CmpN op1 op2)
> CountedLoopEnd cmp (CmpF op1 op2)
> CountedLoopEnd cmp (CmpD op1 op2)
> 
> Please help review it.
> 
> Thanks.

Hi, did you run any tests on these changes? I agree with removing CmpP/CmpN/CmpF/CmpD instructs. But for CmpU, I have checked aarch64.ad, and it provides the U version of CountedLoopEnd, I think we should do some investigating into this:
https://github.com/openjdk/jdk/blob/43c71ddf923d442499449948f4bf8a7c79249af0/src/hotspot/cpu/aarch64/aarch64.ad#L16526-L16541

And I also found `LongCountedLoopEndNode` definition in `loopnode.hpp` but not used yet:
https://github.com/openjdk/jdk/blob/43c71ddf923d442499449948f4bf8a7c79249af0/src/hotspot/share/opto/loopnode.hpp#L356-L371

Maybe we could keep the Long version?

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

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


More information about the hotspot-compiler-dev mailing list