File: load-typed-pointers.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 (43 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download | duplicates (2)
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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2022-2024 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================
; REQUIRES: regkeys

; RUN: igc_opt -dx10 -regkey EnableGenUpdateCB=1 -GenUpdateCB -dce -S < %s | FileCheck %s

; Requires a fix for windows
; COM: FileCheck %s --input-file=OCL_gencb.ll -check-prefix=GENCB
; ------------------------------------------------
; GenUpdateCB: Load
; ------------------------------------------------

; This checks are for separate CB module
; GENCB-LABEL: @CBEntry(
; GENCB-NEXT:  entry:
; GENCB-NEXT:    [[TMP0:%.*]] = alloca float
; GENCB-NEXT:    [[TMP1:%.*]] = load float, float addrspace(65538)* null
; GENCB-NEXT:    [[TMP2:%.*]] = fadd float [[TMP1]], [[TMP1]]
; GENCB-NEXT:    [[TMP3:%.*]] = fadd float [[TMP2]], 1.300000e+01
; GENCB-NEXT:    store float [[TMP3]], float* [[TMP0]]
; GENCB-NEXT:    ret void

; Current module checks

define void @test_update_cb(float %src1) {
; CHECK-LABEL: @test_update_cb(
; CHECK-NEXT:    [[TMP1:%.*]] = call float @llvm.genx.GenISA.RuntimeValue(i32 0)
; CHECK-NEXT:    call void @use.f32(float [[TMP1]])
; CHECK-NEXT:    ret void

  %1 = load float, float addrspace(65538)* null
  %2 = fadd float %1, %1
  %3 = fadd float %2, 13.0
  call void @use.f32(float %3)
  ret void
}

declare void @use.f32(float)