File: sample.ll

package info (click to toggle)
intel-graphics-compiler2 2.22.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 107,676 kB
  • sloc: cpp: 809,645; lisp: 288,070; ansic: 16,397; python: 4,010; yacc: 2,588; lex: 1,666; pascal: 314; sh: 186; makefile: 38
file content (45 lines) | stat: -rw-r--r-- 3,233 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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2024 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; RUN: %opt_typed_ptrs %use_old_pass_manager% -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=XeLP \
; RUN: -GenXModule -GenXCategoryWrapper -GenXCisaBuilderPass -GenXFinalizer \
; RUN: -finalizer-opts="-dumpcommonisa -isaasmToConsole" < %s -o /dev/null | FileCheck %s
; RUN: %opt_opaque_ptrs %use_old_pass_manager% -march=genx64 -mtriple=spir64-unknown-unknown -mcpu=XeLP \
; RUN: -GenXModule -GenXCategoryWrapper -GenXCisaBuilderPass -GenXFinalizer \
; RUN: -finalizer-opts="-dumpcommonisa -isaasmToConsole" < %s -o /dev/null | FileCheck %s

declare <64 x float> @llvm.vc.internal.sample.bti.v64f32.v16i1.v16f32(<16 x i1>, i16, i8, i16, i32, i32, <64 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>, <16 x float>)

; CHECK-LABEL: .kernel "test"
; CHECK: .decl [[U:V[0-9]+]] v_type=G type=f num_elts=16 align=GRF
; CHECK: .decl [[V:V[0-9]+]] v_type=G type=f num_elts=16 align=GRF
; CHECK: .decl [[DST:V[0-9]+]] v_type=G type=f num_elts=64 align=GRF
; CHECK: .input [[U]] offset=64 size=64
; CHECK: .input [[V]] offset=128 size=64

define dllexport spir_kernel void @test(i32 %surf, i32 %sampler, <16 x float> %u, <16 x float> %v) #0 {
; CHECK: movs (M1, 1) [[BTI:T[0-9]+]](0) 0x7b:ud
; CHECK: movs (M1, 1) [[STI:S[0-9]+]](0) 0x5:ud
; CHECK: sample_3d.RGBA (M1, 16) 0x0:uw [[STI]] [[BTI]] [[DST]].0 %null.0 [[U]].0 [[V]].0
; CHECK: sample_lz.RGBA (M1, 16) 0x0:uw [[STI]] [[BTI]] [[DST]].0 %null.0 [[U]].0 [[V]].0
  %1 = call <64 x float> @llvm.vc.internal.sample.bti.v64f32.v16i1.v16f32(<16 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, i16 0, i8 15, i16 0, i32 123, i32 5, <64 x float> undef, <16 x float> %u, <16 x float> %v, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef)
  %2 = call <64 x float> @llvm.vc.internal.sample.bti.v64f32.v16i1.v16f32(<16 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, i16 24, i8 15, i16 0, i32 123, i32 5, <64 x float> %1, <16 x float> %u, <16 x float> %v, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef, <16 x float> undef)
  ret void
}

attributes #0 = { "CMGenxMain" "VC.Stack.Amount"="0" "target-cpu"="XeLP" }

!genx.kernels = !{!0}
!genx.kernel.internal = !{!5}

!0 = !{void (i32, i32, <16 x float>, <16 x float>)* @test, !"test", !1, i32 0, !2, !3, !4, i32 0}
!1 = !{i32 0, i32 0, i32 0, i32 0}
!2 = !{i32 32, i32 36, i32 64, i32 128}
!3 = !{i32 0, i32 0, i32 0, i32 0}
!4 = !{!"image2d_t read_write", !"", !""}
!5 = !{void (i32, i32, <16 x float>, <16 x float>)* @test, null, null, null, null}