mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-09-27 11:49:04 +00:00
Merge d2b2e16c28
into 93820e3159
This commit is contained in:
commit
7ee3faa0b0
4 changed files with 12 additions and 1 deletions
Binary file not shown.
|
@ -842,4 +842,14 @@ typedef uint32_t ShflSyncResult __attribute__((ext_vector_type(2)));
|
|||
|
||||
return output.u32;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int FUNC(vprintf)(const char *format __attribute__((unused)), void *vlist __attribute__((unused)))
|
||||
{
|
||||
// TODO: replace calls to vprintf with a raising pass to printf when we have a mechanism
|
||||
// to write SSA passes
|
||||
// Use https://github.com/ROCm/llvm-project/blob/99a81d16b9d811cadd420190bed16981a0a57bc6/llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp#L426
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2853,6 +2853,7 @@ impl<'a> MethodEmitContext<'a> {
|
|||
|
||||
fn emit_trap(&mut self) -> Result<(), TranslateError> {
|
||||
self.emit_intrinsic(c"llvm.trap", None, None, vec![])?;
|
||||
unsafe { LLVMBuildUnreachable(self.builder) };
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ fn replace_with_ptx_impl<'input>(
|
|||
resolver: &mut GlobalStringIdentResolver2<'input>,
|
||||
fn_name: SpirvWord,
|
||||
) {
|
||||
let known_names = ["__assertfail"];
|
||||
let known_names = ["__assertfail", "vprintf"];
|
||||
if let Some(super::IdentEntry {
|
||||
name: Some(name), ..
|
||||
}) = resolver.ident_map.get_mut(&fn_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue