-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPIRVToOCL20] Fix __spirv_ocl_printf translation assert error
When SPIRVToOCL20Pass is used in OCL CPU backend to translate SPV-IR builtin to OCL builtin, __spirv_ocl_printf call has bigger number of arguments than its parameters.
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; REQUIRES: pass-plugin | ||
; UNSUPPORTED: target={{.*windows.*}} | ||
|
||
; RUN: opt %load_spirv_lib -passes=spirv-to-ocl20 %s -S -o - | FileCheck %s | ||
|
||
target triple = "spir64-unknown-unknown" | ||
|
||
declare spir_func i32 @_Z18__spirv_ocl_printfPU3AS2Kcz(ptr addrspace(2), ...) | ||
|
||
define spir_func void @__asan_set_shadow_dynamic_local() { | ||
; CHECK: call spir_func i32 (ptr addrspace(2), ...) @printf(ptr addrspace(2) null, i32 0, i32 0) | ||
%call = call spir_func i32 (ptr addrspace(2), ...) @_Z18__spirv_ocl_printfPU3AS2Kcz(ptr addrspace(2) null, i32 0, i32 0) | ||
ret void | ||
} |