File: fneg.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-6~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,418,812 kB
  • sloc: cpp: 5,290,827; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,900; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,892; xml: 953; cs: 573; fortran: 539
file content (102 lines) | stat: -rw-r--r-- 4,123 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck %s

; CHECK-LABEL: 'fneg_f32'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg float
define amdgpu_kernel void @fneg_f32(float addrspace(1)* %out, float addrspace(1)* %vaddr) {
  %vec = load float, float addrspace(1)* %vaddr
  %fadd = fadd float %vec, undef
  %fneg = fneg float %fadd
  store float %fneg, float addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v2f32'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <2 x float>
define amdgpu_kernel void @fneg_v2f32(<2 x float> addrspace(1)* %out, <2 x float> addrspace(1)* %vaddr) {
  %vec = load <2 x float>, <2 x float> addrspace(1)* %vaddr
  %fadd = fadd <2 x float> %vec, undef
  %fneg = fneg <2 x float> %fadd
  store <2 x float> %fneg, <2 x float> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v3f32'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <3 x float>
define amdgpu_kernel void @fneg_v3f32(<3 x float> addrspace(1)* %out, <3 x float> addrspace(1)* %vaddr) {
  %vec = load <3 x float>, <3 x float> addrspace(1)* %vaddr
  %fadd = fadd <3 x float> %vec, undef
  %fneg = fneg <3 x float> %fadd
  store <3 x float> %fneg, <3 x float> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v5f32'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <5 x float>
define amdgpu_kernel void @fneg_v5f32(<5 x float> addrspace(1)* %out, <5 x float> addrspace(1)* %vaddr) {
  %vec = load <5 x float>, <5 x float> addrspace(1)* %vaddr
  %fadd = fadd <5 x float> %vec, undef
  %fneg = fneg <5 x float> %fadd
  store <5 x float> %fneg, <5 x float> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_f64'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg double
define amdgpu_kernel void @fneg_f64(double addrspace(1)* %out, double addrspace(1)* %vaddr) {
  %vec = load double, double addrspace(1)* %vaddr
  %fadd = fadd double %vec, undef
  %fneg = fneg double %fadd
  store double %fneg, double addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v2f64'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <2 x double>
define amdgpu_kernel void @fneg_v2f64(<2 x double> addrspace(1)* %out, <2 x double> addrspace(1)* %vaddr) {
  %vec = load <2 x double>, <2 x double> addrspace(1)* %vaddr
  %fadd = fadd <2 x double> %vec, undef
  %fneg = fneg <2 x double> %fadd
  store <2 x double> %fneg, <2 x double> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v3f64'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <3 x double>
define amdgpu_kernel void @fneg_v3f64(<3 x double> addrspace(1)* %out, <3 x double> addrspace(1)* %vaddr) {
  %vec = load <3 x double>, <3 x double> addrspace(1)* %vaddr
  %fadd = fadd <3 x double> %vec, undef
  %fneg = fneg <3 x double> %fadd
  store <3 x double> %fneg, <3 x double> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_f16'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg half
define amdgpu_kernel void @fneg_f16(half addrspace(1)* %out, half addrspace(1)* %vaddr) {
  %vec = load half, half addrspace(1)* %vaddr
  %fadd = fadd half %vec, undef
  %fneg = fneg half %fadd
  store half %fneg, half addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v2f16'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <2 x half>
define amdgpu_kernel void @fneg_v2f16(<2 x half> addrspace(1)* %out, <2 x half> addrspace(1)* %vaddr) {
  %vec = load <2 x half>, <2 x half> addrspace(1)* %vaddr
  %fadd = fadd <2 x half> %vec, undef
  %fneg = fneg <2 x half> %fadd
  store <2 x half> %fneg, <2 x half> addrspace(1)* %out
  ret void
}

; CHECK-LABEL: 'fneg_v3f16'
; CHECK: estimated cost of 0 for instruction:   %fneg = fneg <3 x half>
define amdgpu_kernel void @fneg_v3f16(<3 x half> addrspace(1)* %out, <3 x half> addrspace(1)* %vaddr) {
  %vec = load <3 x half>, <3 x half> addrspace(1)* %vaddr
  %fadd = fadd <3 x half> %vec, undef
  %fneg = fneg <3 x half> %fadd
  store <3 x half> %fneg, <3 x half> addrspace(1)* %out
  ret void
}