File: sve-vecreduce-dot.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (54 lines) | stat: -rw-r--r-- 2,141 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=aarch64 -mattr=+sve,+dotprod < %s | FileCheck %s

define i32 @test(<vscale x 32 x i8> %bin.rdx, <vscale x 32 x i8> %bin.rdx2)  {
; CHECK-LABEL: test:
; CHECK:       // %bb.0:
; CHECK-NEXT:    sunpklo z4.h, z2.b
; CHECK-NEXT:    sunpklo z5.h, z0.b
; CHECK-NEXT:    sunpkhi z0.h, z0.b
; CHECK-NEXT:    sunpkhi z2.h, z2.b
; CHECK-NEXT:    sunpklo z6.h, z1.b
; CHECK-NEXT:    sunpkhi z1.h, z1.b
; CHECK-NEXT:    sunpklo z7.h, z3.b
; CHECK-NEXT:    sunpkhi z3.h, z3.b
; CHECK-NEXT:    ptrue p0.s
; CHECK-NEXT:    sunpkhi z24.s, z5.h
; CHECK-NEXT:    sunpklo z5.s, z5.h
; CHECK-NEXT:    sunpklo z25.s, z4.h
; CHECK-NEXT:    sunpklo z26.s, z0.h
; CHECK-NEXT:    sunpkhi z4.s, z4.h
; CHECK-NEXT:    sunpklo z27.s, z2.h
; CHECK-NEXT:    sunpkhi z0.s, z0.h
; CHECK-NEXT:    sunpkhi z2.s, z2.h
; CHECK-NEXT:    sunpklo z28.s, z6.h
; CHECK-NEXT:    sunpkhi z6.s, z6.h
; CHECK-NEXT:    mul z5.s, p0/m, z5.s, z25.s
; CHECK-NEXT:    sunpkhi z25.s, z1.h
; CHECK-NEXT:    sunpklo z1.s, z1.h
; CHECK-NEXT:    mul z26.s, p0/m, z26.s, z27.s
; CHECK-NEXT:    mul z4.s, p0/m, z4.s, z24.s
; CHECK-NEXT:    sunpkhi z24.s, z3.h
; CHECK-NEXT:    mul z0.s, p0/m, z0.s, z2.s
; CHECK-NEXT:    sunpkhi z2.s, z7.h
; CHECK-NEXT:    sunpklo z7.s, z7.h
; CHECK-NEXT:    sunpklo z3.s, z3.h
; CHECK-NEXT:    mla z0.s, p0/m, z25.s, z24.s
; CHECK-NEXT:    mad z2.s, p0/m, z6.s, z4.s
; CHECK-NEXT:    mad z1.s, p0/m, z3.s, z26.s
; CHECK-NEXT:    movprfx z3, z5
; CHECK-NEXT:    mla z3.s, p0/m, z28.s, z7.s
; CHECK-NEXT:    add z0.s, z2.s, z0.s
; CHECK-NEXT:    add z1.s, z3.s, z1.s
; CHECK-NEXT:    add z0.s, z1.s, z0.s
; CHECK-NEXT:    uaddv d0, p0, z0.s
; CHECK-NEXT:    fmov x0, d0
; CHECK-NEXT:    // kill: def $w0 killed $w0 killed $x0
; CHECK-NEXT:    ret
  %a = sext <vscale x 32 x i8> %bin.rdx to <vscale x 32 x i32>
  %b = sext <vscale x 32 x i8> %bin.rdx2 to <vscale x 32 x i32>
  %c = mul <vscale x 32 x i32> %a, %b
  %r = call i32 @llvm.vector.reduce.add.nxv32i32(<vscale x 32 x i32> %c)
  ret i32 %r
}
declare i32 @llvm.vector.reduce.add.nxv32i32(<vscale x 32 x i32> )