File: mul.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (132 lines) | stat: -rw-r--r-- 4,674 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64 < %s | FileCheck %s

; Verify the cost of (vector) multiply instructions.

target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"

define <2 x i8> @t1(<2 x i8> %a, <2 x i8> %b)  {
; CHECK-LABEL: 't1'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <2 x i8> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i8> %1
;
  %1 = mul <2 x i8> %a, %b
  ret <2 x i8> %1
}

define <4 x i8> @t2(<4 x i8> %a, <4 x i8> %b)  {
; CHECK-LABEL: 't2'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <4 x i8> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i8> %1
;
  %1 = mul <4 x i8> %a, %b
  ret <4 x i8> %1
}

define <8 x i8> @t3(<8 x i8> %a, <8 x i8> %b)  {
; CHECK-LABEL: 't3'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <8 x i8> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i8> %1
;
  %1 = mul <8 x i8> %a, %b
  ret <8 x i8> %1
}

define <16 x i8> @t4(<16 x i8> %a, <16 x i8> %b)  {
; CHECK-LABEL: 't4'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <16 x i8> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i8> %1
;
  %1 = mul <16 x i8> %a, %b
  ret <16 x i8> %1
}

define <32 x i8> @t5(<32 x i8> %a, <32 x i8> %b)  {
; CHECK-LABEL: 't5'
; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %1 = mul <32 x i8> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <32 x i8> %1
;
  %1 = mul <32 x i8> %a, %b
  ret <32 x i8> %1
}

define <2 x i16> @t6(<2 x i16> %a, <2 x i16> %b)  {
; CHECK-LABEL: 't6'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <2 x i16> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i16> %1
;
  %1 = mul <2 x i16> %a, %b
  ret <2 x i16> %1
}

define <4 x i16> @t7(<4 x i16> %a, <4 x i16> %b)  {
; CHECK-LABEL: 't7'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <4 x i16> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i16> %1
;
  %1 = mul <4 x i16> %a, %b
  ret <4 x i16> %1
}

define <8 x i16> @t8(<8 x i16> %a, <8 x i16> %b)  {
; CHECK-LABEL: 't8'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <8 x i16> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i16> %1
;
  %1 = mul <8 x i16> %a, %b
  ret <8 x i16> %1
}

define <16 x i16> @t9(<16 x i16> %a, <16 x i16> %b)  {
; CHECK-LABEL: 't9'
; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %1 = mul <16 x i16> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <16 x i16> %1
;
  %1 = mul <16 x i16> %a, %b
  ret <16 x i16> %1
}

define <2 x i32> @t10(<2 x i32> %a, <2 x i32> %b)  {
; CHECK-LABEL: 't10'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <2 x i32> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i32> %1
;
  %1 = mul <2 x i32> %a, %b
  ret <2 x i32> %1
}

define <4 x i32> @t11(<4 x i32> %a, <4 x i32> %b)  {
; CHECK-LABEL: 't11'
; CHECK-NEXT:  Cost Model: Found costs of 1 for: %1 = mul <4 x i32> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %1
;
  %1 = mul <4 x i32> %a, %b
  ret <4 x i32> %1
}

define <8 x i32> @t12(<8 x i32> %a, <8 x i32> %b)  {
; CHECK-LABEL: 't12'
; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %1 = mul <8 x i32> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i32> %1
;
  %1 = mul <8 x i32> %a, %b
  ret <8 x i32> %1
}

define <2 x i64> @t13(<2 x i64> %a, <2 x i64> %b)  {
; CHECK-LABEL: 't13'
; CHECK-NEXT:  Cost Model: Found costs of RThru:14 CodeSize:1 Lat:1 SizeLat:1 for: %1 = mul nsw <2 x i64> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %1
;
  %1 = mul nsw <2 x i64> %a, %b
  ret <2 x i64> %1
}

define <4 x i64> @t14(<4 x i64> %a, <4 x i64> %b)  {
; CHECK-LABEL: 't14'
; CHECK-NEXT:  Cost Model: Found costs of RThru:28 CodeSize:1 Lat:1 SizeLat:1 for: %1 = mul nsw <4 x i64> %a, %b
; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i64> %1
;
  %1 = mul nsw <4 x i64> %a, %b
  ret <4 x i64> %1
}