| Issue |
203159
|
| Summary |
ARM `vcvt1_bf16_mf8_fpm` can't be used without `bf16` target feature
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
dsharlet
|
Reproducer: https://godbolt.org/z/7xE9ExYs3
Reproduced here:
```
#include <arm_neon.h>
uint16x8_t fp8_to_bf16(mfloat8x8_t x) {
fpm_t fpm = __arm_fpm_init();
fpm = __arm_set_fpm_src1_format(fpm, __ARM_FPM_E4M3);
return vcvt1_bf16_mf8_fpm(x, fpm);
}
uint16x8_t fp8_to_bf16_no_lax_vector_conversions(mfloat8x8_t x) {
fpm_t fpm = __arm_fpm_init();
fpm = __arm_set_fpm_src1_format(fpm, __ARM_FPM_E4M3);
return vreinterpretq_u16_bf16(vcvt1_bf16_mf8_fpm(x, fpm));
}
```
If this is compiled with `-march=armv8.2-a+fp8+bf16`, both functions are OK. If this is compiled with `-march=armv8.2-a+fp8`, the second function fails because `vreinterpretq_u16_bf16` requires the `bf16` feature.
This seems silly, because it basically means that if you want to enable `-fno-lax-vector-conversions`, you can't use `bf16` fp8 conversions, even though it's very reasonable to use bf16 data without the `bf16` target feature.
I understand that in practice, hardware that supports `fp8` almost certainly also supports `bf16`, but this still seems like a bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs