RFR: 8342095: Add autovectorizer support for subword vector casts [v15]
Emanuel Peter
epeter at openjdk.org
Wed Jan 28 13:26:48 UTC 2026
On Wed, 28 Jan 2026 04:27:31 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:
>> @jaskarth Something is going a bit strange with my testing script. Could you merge with latest master, maybe that helps?
>
> Thanks for the ping @eme64, I've merged from master.
@jaskarth I'm seing a first failure on `-XX:UseAVX=0`.
- `compiler/loopopts/superword/TestReductions.java#vanilla`
- `compiler/loopopts/superword/TestReductions.java#force-vectorization`
For both, about `30` tests have IR failures.
One example:
Failed IR Rules (30) of Methods (30)
------------------------------------
1) Method "private static byte compiler.loopopts.superword.TestReductions.byteAndBig()" - [Failed IR rules: 1]:
* @IR rule 1: "@compiler.lib.ir_framework.IR(phase={DEFAULT}, applyIfPlatformAnd={}, applyIfCPUFeatureOr={"sse4.1", "true", "asimd", "true"}, counts={"_#V#LOAD_VECTOR_B#_", "_ at min(max_int, max_byte)", "> 0", "_#AND_REDUCTION_V#_", "> 0", "_#V#AND_VI#_", "> 0"}, applyIfPlatform={}, failOn={}, applyIfPlatformOr={}, applyIfOr={}, applyIfCPUFeatureAnd={}, applyIf={"AutoVectorizationOverrideProfitability", "> 0"}, applyIfCPUFeature={}, applyIfAnd={}, applyIfNot={})"
> Phase "PrintIdeal":
- counts: Graph contains wrong number of nodes:
* Constraint 1: "(\\d+(\\s){2}(LoadVector.*)+(\\s){2}===.*vector[A-Za-z]<B,4>)"
- Failed comparison: [found] 0 > 0 [given]
- No nodes matched!
* Constraint 2: "(\\d+(\\s){2}(AndReductionV.*)+(\\s){2}===.*)"
- Failed comparison: [found] 0 > 0 [given]
- No nodes matched!
* Constraint 3: "(\\d+(\\s){2}(AndV.*)+(\\s){2}===.*vector[A-Za-z]<I,4>)"
- Failed comparison: [found] 0 > 0 [given]
- No nodes matched!
This should be easy to reproduce on any `x64` machine with the `-XX:UseAVX=0` flag. Maybe some instruction is not implemented for vectorization, and you need to require at least `avx` instead of `sse4.1`?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23413#issuecomment-3811292013
More information about the hotspot-compiler-dev
mailing list