Issue |
134524
|
Summary |
Use bfcvt instruction on Arm to convert to __bf16
|
Labels |
new issue
|
Assignees |
|
Reporter |
DesWurstes
|
Documentation for `bfcvt`: https://developer.arm.com/documentation/ddi0602/2025-03/SVE-Instructions/BFCVT--Single-precision-down-convert-to-BFloat16-format--predicated--
This code when compiled with `-march=armv9-a+fp16 -O3` could use the instruction for better performance:
```c
void convert2(float * __restrict a, __bf16 * __restrict x) {
x[0] = (__bf16)a[0];
x[1] = (__bf16)a[1];
x[2] = (__bf16)a[2];
x[3] = (__bf16)a[3];
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs