[clang] [CIR][AArch64] Lower vfma_v, vfma_lane_v, and vfmas lane builtins (PR #204819)
Yair Ben Avraham via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 19:53:40 PDT 2026
================
@@ -27,6 +27,17 @@
// 2.6.1.9.3 Fused multiply-accumulate, vector quad forms
//===------------------------------------------------------===//
+// LLVM-LABEL: @test_vfma_f16(
+// CIR-LABEL: @vfma_f16(
+float16x4_t test_vfma_f16(float16x4_t a, float16x4_t b, float16x4_t c) {
+// CIR: cir.call_llvm_intrinsic "fma" %{{.*}}, %{{.*}}, %{{.*}} : (!cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>, !cir.vector<4 x !cir.f16>) -> !cir.vector<4 x !cir.f16>
+
+// LLVM-SAME: <4 x half> {{.*}} [[A:%.*]], <4 x half> {{.*}} [[B:%.*]], <4 x half> {{.*}} [[C:%.*]]) {{.*}} {
+// LLVM: [[FMA:%.*]] = call <4 x half> @llvm.fma.v4f16(<4 x half> [[B_CAST:%.*]], <4 x half> [[C_CAST:%.*]], <4 x half> [[A_CAST:%.*]])
----------------
yairbenavraham wrote:
Shall I use a stronger form, e.g.:
```
// LLVM: [[B_CAST:%.*]] = bitcast <8 x i8> [[B_BYTES]] to <4 x half>
// LLVM: call ... (<4 x half> [[B_CAST]], ...)
```
?
https://github.com/llvm/llvm-project/pull/204819
More information about the cfe-commits
mailing list