Skip to content

Commit 31d6a70

Browse files
committed
Enable vector support for F2I on AArch64 and add unsigned FloatConvert cases.
1 parent 699611c commit 31d6a70

File tree

1 file changed

+13
-16
lines changed
  • compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/architecture/aarch64

1 file changed

+13
-16
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/architecture/aarch64/VectorAArch64.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -462,22 +462,19 @@ public static boolean isSupportedConversion(Stamp input, Stamp output) {
462462
}
463463

464464
public static boolean isSupportedConversion(FloatConvert op) {
465-
switch (op) {
466-
case D2L:
467-
case I2F:
468-
case D2F:
469-
case L2D:
470-
case F2D:
471-
return true;
472-
/* I think I have support for these two. TODO enable them */
473-
case D2I:
474-
case I2D:
475-
/* Don't see a good strategy for implementing these. */
476-
case F2L:
477-
case L2F:
478-
default:
479-
return false;
480-
}
465+
return switch (op) {
466+
/* floating-point convert narrow or long */
467+
case D2F, F2D -> true;
468+
/* same element size */
469+
case D2L, L2D, F2I, I2F -> true;
470+
/* unsigned conversions need testing */
471+
case D2UL, UL2D, F2UI, UI2F -> false;
472+
/* I think I have support for these. TODO enable them */
473+
case D2I, I2D, D2UI, UI2D -> false;
474+
/* Don't see a good strategy for implementing these. */
475+
case F2L, L2F, F2UL, UL2F -> false;
476+
default -> false;
477+
};
481478
}
482479
}
483480
}

0 commit comments

Comments
 (0)