[llvm-dev] There is an error “use of unknown builtin”

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 12 10:49:19 PDT 2018


On 9/12/2018 6:36 AM, 沈天豪 via llvm-dev wrote:
> Hello,everyone.
> I am very embarrassed to ask such a simple question.
> I want to add an intrinsics(named max_qb) in x86 backend.
> In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics (GCCBuiltin)|.|
> In clang( BuiltinsX86.def ), I add a |BUILTIN.|
> And in x86 backend , I change :
> the X86InstrInfo.td to add def X86max_qb_flag ,
> X86InstrArithmetic.td to add define of instruction ,
> X86ISelLowering.cpp to add SDnode.
> It's succeed when LLVM compilates.But there is an error “use of 
> unknown builtin '__builtin_x86_max_qb' ”,when I test theintrinsics.

All clang builtins are required to have a C language signature defined 
in clang; for x86, look in include/clang/Basic/BuiltinsX86.def .

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180912/5332a7b6/attachment.html>


More information about the llvm-dev mailing list