[llvm] [AArch64] Match indexed forms of fmul/fmla/fmls (PR #144892)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 06:18:27 PDT 2025


================
@@ -0,0 +1,363 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=aarch64-linux-gnu < %s | FileCheck %s
+
+define void @fmul_indexed_f16_256b(ptr %a, ptr %b, ptr %c) #0 {
+; CHECK-LABEL: fmul_indexed_f16_256b:
+; CHECK:       // %bb.0:
+; CHECK-NEXT:    ldr z0, [x0]
+; CHECK-NEXT:    fmul z0.h, z0.h, z0.h[2]
+; CHECK-NEXT:    str z0, [x2]
+; CHECK-NEXT:    ret
+  %ld.a = load <16 x half>, ptr %a
+  %ld.b = load <16 x half>, ptr %b
+  %splat.lanes = shufflevector <16 x half> %ld.a, <16 x half> poison, <16 x i32> <i32  2, i32  2, i32  2, i32  2, i32  2, i32  2, i32  2, i32  2,
----------------
paulwalker-arm wrote:

Should the shuffle be using `%ld.b` or `%b ` removed from the function?

https://github.com/llvm/llvm-project/pull/144892


More information about the llvm-commits mailing list