File: ldraw-merging-dx12.ll

package info (click to toggle)
intel-graphics-compiler2 2.16.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 106,644 kB
  • sloc: cpp: 805,640; lisp: 287,672; ansic: 16,414; python: 3,952; yacc: 2,588; lex: 1,666; pascal: 313; sh: 186; makefile: 35
file content (40 lines) | stat: -rw-r--r-- 1,448 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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2024 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================

; REQUIRES: llvm-14-plus
; RUN: igc_opt --opaque-pointers %s -S -o - --dx12 --inputcs --igc-constant-coalescing -dce | FileCheck %s

define void @test_ldraw_merge() {
entry:
  %a = call i16 @llvm.genx.GenISA.DCL.SystemValue.i16(i32 7)
  %src = sext i16 %a to i32
  %0 = inttoptr i32 %src to ptr addrspace(2555909)
  %1 = call fast float @llvm.genx.GenISA.ldraw.indexed.f32.p2555909(ptr addrspace(2555909) %0, i32 %src, i32 4, i1 false)
  %2 = add i32 %src, 4
  %3 = call fast float @llvm.genx.GenISA.ldraw.indexed.f32.p2555909(ptr addrspace(2555909) %0, i32 %2, i32 4, i1 false)
; CHECK: %2 = call <2 x float> @llvm.genx.GenISA.ldrawvector.indexed.v2f32.p2555909(ptr addrspace(2555909) %0, i32 %1, i32 4, i1 false)
  call void @use.f32(float %1)
  call void @use.f32(float %3)
  ret void
}

declare void @use.f32(float)

declare i16 @llvm.genx.GenISA.DCL.SystemValue.i16(i32)

; Function Attrs: argmemonly nounwind readonly
declare float @llvm.genx.GenISA.ldraw.indexed.f32.p2555909(ptr addrspace(2555909), i32, i32, i1) #0

attributes #0 = { argmemonly nounwind readonly }

!igc.functions = !{!0}

!0 = !{ptr @test_ldraw_merge, !1}
!1 = !{!2, !3}
!2 = !{!"function_type", i32 0}
!3 = !{!"implicit_arg_desc"}