Skip some intrinsic

This commit is contained in:
Dmitry Stogov 2023-10-12 08:18:18 +03:00
parent 4fce67fcb7
commit 1fbb2ac2ed

View File

@ -393,10 +393,13 @@ static ir_ref llvm2ir_intrinsic(ir_ctx *ctx, LLVMValueRef insn, LLVMTypeRef ftyp
if (STR_START(name, name_len, "llvm.lifetime.")) {
/* skip */
return IR_NULL;
} else if (STR_START(name, name_len, "llvm.dbg.")) {
/* skip */
return IR_NULL;
} else if (STR_EQUAL(name, name_len, "llvm.assume")) {
/* skip */
return IR_NULL;
} else if (STR_START(name, name_len, "llvm.smax.")) {
IR_ASSERT(count == 2);
type = llvm2ir_type(LLVMGetReturnType(ftype));
@ -599,7 +602,9 @@ static void llvm2ir_call(ir_ctx *ctx, LLVMValueRef insn)
if (STR_START(name, name_len, "llvm.")) {
ref = llvm2ir_intrinsic(ctx, insn, ftype, count, name, name_len);
if (ref) {
if (ref != IR_NULL) {
ir_addrtab_add(ctx->binding, (uintptr_t)insn, ref);
}
return;
}
}