[llvm-dev] There is an error “use of unknown builtin” (original) (raw)

沈天豪 via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 12 22:48:41 PDT 2018


Thank you for your suggesttion. I have already written the defined as following:

BUILTIN(__builtin_x86_max_qb, "iii", "")

在 2018-09-13 01:49:19,"Friedman, Eli" <efriedma at codeaurora.org> 写道:

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 the intrinsics.

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/20180913/de5bbfad/attachment.html>



More information about the llvm-dev mailing list