File: assert_fail.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 (35 lines) | stat: -rw-r--r-- 1,703 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
;=========================== begin_copyright_notice ============================
;
; Copyright (C) 2023 Intel Corporation
;
; SPDX-License-Identifier: MIT
;
;============================ end_copyright_notice =============================
;
; RUN: not %opt %use_old_pass_manager% -GenXTranslateSPIRVBuiltins \
; RUN: -vc-spirv-builtins-bif-path=%VC_SPIRV_OCL_BIF% -march=genx64 \
; RUN: -mtriple=spir64-unknown-unknown -mcpu=XeHPC -S %s 2>&1 | FileCheck %s
; ------------------------------------------------
; GenXTranslateSPIRVBuiltins
; ------------------------------------------------

; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn
declare spir_func i64 @_Z33__spirv_BuiltInGlobalInvocationIdi(i32) #2

; CHECK: LLVM ERROR: GenXTranslateSPIRVBuiltins failed for: <  call spir_func void @__devicelib_assert_fail
; CHECK: Unexpected function argument #9 type: i32, expected: i64

; Function Attrs: noinline nounwind
define spir_func void @__assert_fail(i16 addrspace(4)* %0, [11 x i8] addrspace(4)* %1, i32 %2, [56 x i8] addrspace(4)* %3) {
  %5 = call spir_func i64 @_Z33__spirv_BuiltInGlobalInvocationIdi(i32 0) #3
  call spir_func void @__devicelib_assert_fail(i16 addrspace(4)* %0, [11 x i8] addrspace(4)* %1, i32 %2, [56 x i8] addrspace(4)* %3, i64 %5, i64 %5, i64 %5, i64 %5, i64 %5, i32 %2) #1
  ret void
}

; Function Attrs: noinline nounwind
define spir_func void @__devicelib_assert_fail(i16 addrspace(4)* %0, [11 x i8] addrspace(4)* %1, i32 %2, [56 x i8] addrspace(4)* %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i32 %9) #1 {
  ret void
}

attributes #2 = { mustprogress nofree nosync nounwind readnone willreturn }
attributes #3 = { nounwind readnone willreturn }