Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/AArch64/sme2-intrinsics-fp-dots.ll
- This file was added.
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | |||||
; RUN: llc -verify-machineinstrs < %s | FileCheck %s | |||||
target triple="aarch64-linux-gnu" | |||||
; == Multi, single (16-bit float) == | |||||
define void @fdot_single_za32_f16_vg1x2(i32 %slice, <vscale x 16 x i8> %unused, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2) #0 { | |||||
; CHECK-LABEL: fdot_single_za32_f16_vg1x2: | |||||
kmclaughlin: Is the `%unused` argument needed for these tests, since they don't require the multi-vector… | |||||
A very apposite question! So I did this deliberately because follow-on patches such as D142478 will add the other multi-multi and multi-indexed variants of the dot instructions where the register does have to be a multiple. I wanted to be consistent by adding the %unused parameter for all variants, and I also thought it helps to highlight the difference between them. david-arm: A very apposite question! So I did this deliberately because follow-on patches such as D142478… | |||||
; CHECK: // %bb.0: | |||||
; CHECK-NEXT: mov w8, w0 | |||||
; CHECK-NEXT: // kill: def $z2 killed $z2 killed $z1_z2 def $z1_z2 | |||||
; CHECK-NEXT: // kill: def $z1 killed $z1 killed $z1_z2 def $z1_z2 | |||||
; CHECK-NEXT: fdot za.s[w8, 0, vgx2], { z1.h, z2.h }, z3.h | |||||
; CHECK-NEXT: fdot za.s[w8, 7, vgx2], { z1.h, z2.h }, z3.h | |||||
; CHECK-NEXT: ret | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8f16(i32 %slice, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2) | |||||
%slice2 = add i32 %slice, 7 | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8f16(i32 %slice2, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2) | |||||
ret void | |||||
} | |||||
define void @fdot_single_za32_f16_vg1x4(i32 %slice, <vscale x 16 x i8> %unused, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2, <vscale x 8 x half> %zn3, <vscale x 8 x half> %zn4) #0 { | |||||
; CHECK-LABEL: fdot_single_za32_f16_vg1x4: | |||||
; CHECK: // %bb.0: | |||||
; CHECK-NEXT: // kill: def $z4 killed $z4 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: mov w8, w0 | |||||
; CHECK-NEXT: // kill: def $z3 killed $z3 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: // kill: def $z2 killed $z2 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: // kill: def $z1 killed $z1 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: fdot za.s[w8, 0, vgx4], { z1.h - z4.h }, z5.h | |||||
; CHECK-NEXT: fdot za.s[w8, 7, vgx4], { z1.h - z4.h }, z5.h | |||||
; CHECK-NEXT: ret | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8f16(i32 %slice, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2, <vscale x 8 x half> %zn3, <vscale x 8 x half> %zn4) | |||||
%slice2 = add i32 %slice, 7 | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8f16(i32 %slice2, <vscale x 8 x half> %zn0, <vscale x 8 x half> %zn1, <vscale x 8 x half> %zn2, <vscale x 8 x half> %zn3, <vscale x 8 x half> %zn4) | |||||
ret void | |||||
} | |||||
; == Multi, single (16-bit bfloat) == | |||||
define void @bfdot_single_za32_bf16_vg1x2(i32 %slice, <vscale x 16 x i8> %unused, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2) #0 { | |||||
; CHECK-LABEL: bfdot_single_za32_bf16_vg1x2: | |||||
; CHECK: // %bb.0: | |||||
; CHECK-NEXT: mov w8, w0 | |||||
; CHECK-NEXT: // kill: def $z2 killed $z2 killed $z1_z2 def $z1_z2 | |||||
; CHECK-NEXT: // kill: def $z1 killed $z1 killed $z1_z2 def $z1_z2 | |||||
; CHECK-NEXT: bfdot za.s[w8, 0, vgx2], { z1.h, z2.h }, z3.h | |||||
; CHECK-NEXT: bfdot za.s[w8, 7, vgx2], { z1.h, z2.h }, z3.h | |||||
; CHECK-NEXT: ret | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8bf16(i32 %slice, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2) | |||||
%slice2 = add i32 %slice, 7 | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8bf16(i32 %slice2, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2) | |||||
ret void | |||||
} | |||||
define void @bfdot_single_za32_bf16_vg1x4(i32 %slice, <vscale x 16 x i8> %unused, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2, <vscale x 8 x bfloat> %zn3, <vscale x 8 x bfloat> %zn4) #0 { | |||||
; CHECK-LABEL: bfdot_single_za32_bf16_vg1x4: | |||||
; CHECK: // %bb.0: | |||||
; CHECK-NEXT: // kill: def $z4 killed $z4 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: mov w8, w0 | |||||
; CHECK-NEXT: // kill: def $z3 killed $z3 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: // kill: def $z2 killed $z2 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: // kill: def $z1 killed $z1 killed $z1_z2_z3_z4 def $z1_z2_z3_z4 | |||||
; CHECK-NEXT: bfdot za.s[w8, 0, vgx4], { z1.h - z4.h }, z5.h | |||||
; CHECK-NEXT: bfdot za.s[w8, 7, vgx4], { z1.h - z4.h }, z5.h | |||||
; CHECK-NEXT: ret | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8bf16(i32 %slice, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2, <vscale x 8 x bfloat> %zn3, <vscale x 8 x bfloat> %zn4) | |||||
%slice2 = add i32 %slice, 7 | |||||
call void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8bf16(i32 %slice2, <vscale x 8 x bfloat> %zn0, <vscale x 8 x bfloat> %zn1, <vscale x 8 x bfloat> %zn2, <vscale x 8 x bfloat> %zn3, <vscale x 8 x bfloat> %zn4) | |||||
ret void | |||||
} | |||||
attributes #0 = { nounwind "target-features"="+sme2" } | |||||
; == Multi, single (16-bit float) | |||||
declare void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8f16(i32, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>) | |||||
declare void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8f16(i32, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>) | |||||
; == Multi, single (16-bit bfloat) | |||||
declare void @llvm.aarch64.sme.fdot.single.za32.vg1x2.nxv8bf16(i32, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>) | |||||
declare void @llvm.aarch64.sme.fdot.single.za32.vg1x4.nxv8bf16(i32, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>, <vscale x 8 x bfloat>) |
Is the %unused argument needed for these tests, since they don't require the multi-vector lists to start at multiples of 2 or 4?