RFR: 8332268: C2: Add missing optimizations for UDivI/L and UModI/L and unify the shared logic with the signed nodes [v15]

theoweidmannoracle duke at openjdk.org
Mon Dec 2 15:59:43 UTC 2024


On Mon, 2 Dec 2024 10:21:38 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Looks good to me otherwise. Nice tests!
>
> Ok. I'm not sure about the Template vs BasicType. Generally BasicType is what we have used so far, but I would say Templates are cleaner. Discussed it with @TobiHartmann , and he thinks Templates are fine too.
> 
> But you need to move the `make_...` to the corresponding file, so others can find it.
> 
> And I think the constants in the tests should be given as `1L << 42`, and not some long unreadable chain of digits ;)

@eme64 Without any template handling the signed/unsigned conversion is a bit tricky I think. get_con_as_long would, as far as I can tell, sign extend ints to longs, which changes the unsigned interpretation for values whose signed interpretation is negative. I think if a template is already used for this part, it makes sense to also use it for node creation.

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

PR Comment: https://git.openjdk.org/jdk/pull/22061#issuecomment-2511919238


More information about the hotspot-compiler-dev mailing list