File: sve-arith.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 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 (78 lines) | stat: -rw-r--r-- 4,167 bytes parent folder | download | duplicates (5)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -aarch64-sve-vector-bits-min=128 | FileCheck %s -D#VBITS=128

target triple = "aarch64-unknown-linux-gnu"

define void @scalable_sdiv() #0 {
; CHECK-LABEL: 'scalable_sdiv'
; CHECK-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %sdiv_nxv16i8 = sdiv <vscale x 16 x i8> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %sdiv_nxv8i16 = sdiv <vscale x 8 x i16> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %sdiv_nxv4i32 = sdiv <vscale x 4 x i32> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %sdiv_nxv2i64 = sdiv <vscale x 2 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
;
entry:
  %sdiv_nxv16i8 = sdiv <vscale x 16 x i8> undef, undef
  %sdiv_nxv8i16 = sdiv <vscale x 8 x i16> undef, undef
  %sdiv_nxv4i32 = sdiv <vscale x 4 x i32> undef, undef
  %sdiv_nxv2i64 = sdiv <vscale x 2 x i64> undef, undef

  ret void
}

define void @scalable_udiv() #0 {
; CHECK-LABEL: 'scalable_udiv'
; CHECK-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %udiv_nxv16i8 = udiv <vscale x 16 x i8> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %udiv_nxv8i16 = udiv <vscale x 8 x i16> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %udiv_nxv4i32 = udiv <vscale x 4 x i32> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %udiv_nxv2i64 = udiv <vscale x 2 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
;
entry:
  %udiv_nxv16i8 = udiv <vscale x 16 x i8> undef, undef
  %udiv_nxv8i16 = udiv <vscale x 8 x i16> undef, undef
  %udiv_nxv4i32 = udiv <vscale x 4 x i32> undef, undef
  %udiv_nxv2i64 = udiv <vscale x 2 x i64> undef, undef

  ret void
}

define void @scalable_mul() #0 {
; CHECK-LABEL: 'scalable_mul'
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %mul_nxv16i8 = mul <vscale x 16 x i8> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %mul_nxv8i16 = mul <vscale x 8 x i16> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %mul_nxv4i32 = mul <vscale x 4 x i32> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %mul_nxv2i64 = mul <vscale x 2 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %mul_nxv1i64 = mul <vscale x 1 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
;
entry:
  %mul_nxv16i8 = mul <vscale x 16 x i8> undef, undef
  %mul_nxv8i16 = mul <vscale x 8 x i16> undef, undef
  %mul_nxv4i32 = mul <vscale x 4 x i32> undef, undef
  %mul_nxv2i64 = mul <vscale x 2 x i64> undef, undef
  %mul_nxv1i64 = mul <vscale x 1 x i64> undef, undef

  ret void
}

define void @scalable_add() #0 {
; CHECK-LABEL: 'scalable_add'
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %add_nxv16i8 = add <vscale x 16 x i8> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %add_nxv8i16 = add <vscale x 8 x i16> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %add_nxv4i32 = add <vscale x 4 x i32> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %add_nxv2i64 = add <vscale x 2 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %add_nxv1i64 = add <vscale x 1 x i64> undef, undef
; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
;
entry:
  %add_nxv16i8 = add <vscale x 16 x i8> undef, undef
  %add_nxv8i16 = add <vscale x 8 x i16> undef, undef
  %add_nxv4i32 = add <vscale x 4 x i32> undef, undef
  %add_nxv2i64 = add <vscale x 2 x i64> undef, undef
  %add_nxv1i64 = add <vscale x 1 x i64> undef, undef

  ret void
}

attributes #0 = { "target-features"="+sve" }