RFR: 8341781: Improve Min/Max node identities [v2]

Emanuel Peter epeter at openjdk.org
Thu Oct 31 15:40:34 UTC 2024


On Thu, 31 Oct 2024 15:37:03 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Ah, I was meaning that with `applyIfPlatformOr = {"x64", "true", "aarch64", "true", "riscv64", "true"}` we would still need at least `applyIfCPUFeature = {"avx", true"}` because on x86 we only make Min/MaxF and Min/MaxD with AVX. But that applyIfCPUFeature will check for AVX on aarch64 and riscv64 as well, but will fail because it's not available for those platforms. That's why I suggested the workaround of checking the other CPU features, to make the test at least run on the other platforms. It'd be nice to be able to express platform and CPU feature combinations like with `@requires`, but the use-case here is pretty niche.
>
> First: yes, I'm fine with just using CPU features - it will IR test it on fewer platforms than maybe desired, but that is ok, I think.
> 
> I guess the issue with `@IR` is that it only allows `AND` or `OR` clauses ... and not the more complicated mix of `&` and `|` from `@requires`. But in theory, you can just have multiple `@IR` rules (that simulates the OR):
> - One for `x64` (applyIfPlatform) and `avx` (applyIfCPUFeature)
> - One IR rule for each of: `aarch64` and `riscv64` (applyIfPlatform)
> 
> But again, I'm ok with only checking for CPU features... it is more simple.

@chhagedorn you may be interested in this conversation as well ;)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21439#discussion_r1824691185


More information about the hotspot-compiler-dev mailing list