File: maxnum.ll

package info (click to toggle)
intel-graphics-compiler 1.0.17791.18-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 102,312 kB
  • sloc: cpp: 935,343; lisp: 286,143; ansic: 16,196; python: 3,279; yacc: 2,487; lex: 1,642; pascal: 300; sh: 174; makefile: 27
file content (61 lines) | stat: -rw-r--r-- 2,305 bytes parent folder | download
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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2023 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; COM: ;;;;;;;;;; RUNNERS ;;;;;;;;;;

; RUN: %opt %use_old_pass_manager% -GenXModule -GenXCategoryWrapper -GenXCisaBuilderPass -GenXFinalizer \
; RUN: -march=genx64 -mtriple=spir64-unknown-unknown -finalizer-opts="-dumpcommonisa -isaasmToConsole" -mcpu=Gen9 < %s | FileCheck %s

; COM: ;;;;;;;;;; CHECKERS ;;;;;;;;;;

; Gen9 VISA check
; CHECK: .decl [[A:V[0-9]+]] v_type=G type=f num_elts=8
; CHECK: .decl [[B:V[0-9]+]] v_type=G type=f num_elts=8
; CHECK: oword_ld (2) T{{[0-9]}} 0x0:ud [[A:[A-z0-9]*]].0
; CHECK: oword_ld (2) T{{[0-9]}} 0x20:ud [[B:[A-z0-9]*]].0
; CHECK: max (M1, 8) [[RES:[A-z0-9]*]](0,0)<1> [[A]](0,0)<1;1,0> [[B]](0,0)<1;1,0>
; CHECK: oword_st (2) T{{[0-9]}} 0x0:ud [[RES]].0

; COM: ;;;;;;;;;; KERNEL ;;;;;;;;;;

declare <8 x float> @llvm.genx.oword.ld.v8f32(i32, i32, i32) #0
declare void @llvm.genx.oword.st.v8f32(i32, i32, <8 x float>) #0

declare <8 x float> @llvm.maxnum.v8f32(<8 x float>, <8 x float>)

; Function Attrs: noinline nounwind
define dllexport spir_kernel void @the_test(i32 %0, i32 %1) local_unnamed_addr #1 {
  %a = tail call <8 x float> @llvm.genx.oword.ld.v8f32(i32 0, i32 %0, i32 0) #2
  %b = tail call <8 x float> @llvm.genx.oword.ld.v8f32(i32 0, i32 %0, i32 32) #2
  %res = call <8 x float> @llvm.maxnum.v8f32(<8 x float> %a, <8 x float> %b)
  tail call void @llvm.genx.oword.st.v8f32(i32 %1, i32 0, <8 x float> %res) #2
  ret void
}

attributes #0 = { "target-cpu"="Gen9" }
attributes #1 = { noinline nounwind "CMGenxMain" "VC.Stack.Amount"="0" "target-cpu"="Gen9" }
attributes #2 = { nounwind }

!spirv.Source = !{!0}
!opencl.spir.version = !{!1}
!opencl.ocl.version = !{!0}
!opencl.used.extensions = !{!2}
!opencl.used.optional.core.features = !{!2}
!spirv.Generator = !{!3}
!genx.kernels = !{!4}
!genx.kernel.internal = !{!8}

!0 = !{i32 0, i32 0}
!1 = !{i32 1, i32 2}
!2 = !{}
!3 = !{i16 6, i16 14}
!4 = !{void (i32, i32)* @the_test, !"the_test", !5, i32 0, !6, !0, !7, i32 0}
!5 = !{i32 2, i32 2}
!6 = !{i32 64, i32 68}
!7 = !{!"buffer_t", !"buffer_t"}
!8 = !{void (i32, i32)* @the_test, null, null, null, null}