On Tue, 26 May 2026 21:44:56 GMT, Paul Sandoz <[email protected]> wrote:
> This is looking good. There are two related issues: > > 1. [JDK-8381809](https://bugs.openjdk.org/browse/JDK-8381809) Template > Framework Library: add Float16Vector type > 2. [JDK-8373574](https://bugs.openjdk.org/browse/JDK-8373574) AArch64: 'bad > AD file' in couple of FP16 vectorAPI tests > > I think it reasonable that this PR is not blocked by 1 and we can follow up > after its integration. What about 2? Hi @PaulSandoz , As per the following comment fix for JDK-8373574 is included in this patch. https://github.com/openjdk/jdk/pull/28002#issuecomment-3661203155 > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16Vector.java > line 825: > >> 823: switch (opc_) { >> 824: case VECTOR_OP_NEG: return (v0, m) -> >> 825: v0.uOp(m, (i, a) -> (float) -a); > > I think we need to use `Float16.negate` as per the comments in the > implementation of that method: > > public static Float16 negate(Float16 f16) { > // Negate sign bit only. Per IEEE 754-2019 section 5.5.1, > // negate is a bit-level operation and not a logical > // operation. Therefore, in this case do _not_ use the float > // unary minus as an implementation as that is not guaranteed > // to flip the sign bit of a NaN. > return shortBitsToFloat16((short)(f16.value ^ SIGN_BIT_MASK)); > } > > > We would also need to update tests, specifically the `scalar_neg` method to > call `Float16.negate`. Addressed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28002#issuecomment-4551955327 PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r3308865940
