search for: __builtin_x86_max_qb

Displaying 6 results from an estimated 6 matches for "__builtin_x86_max_qb".

2018 Sep 17
2
error about adding an trinsics
...,every one. This problem has been bothering me for several days.I really hope that you can help me. I want to add an trinsics in X86. This trinsics can compare two numbers and return the larger. There are the changes I do as fllowing. In /tools/clang/include/clang/Basic/BuiltinsX86.def : BUILTIN(__builtin_x86_max_qb, "iii", "") In include/llvm/IR/IntrinsicsX86.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; } In /lib/Target/X86/X86SelLowering.h:...
2018 Sep 06
2
Adding an trinsics in x86
...question may be fundamental but difficult to me. I want to add an trinsics in x86 and make the following changes.I want that max_qb can find the max of two Integers and return it. In src/include/llvm/IR/Intrinsics.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; } In src//tools/clang/include/clang/Basic/BuiltinsX86.def TARGET_BUILTIN(__builtin_x86_max_qb, "V2iV2iV2i", "ncV:64:", "") //I don't know the meaning of these parameters, just write...
2018 Nov 07
2
how to add a instruction
Hi,every one. I' in trouble again. I want add a new intrinsic mapping a new instruction. I add the int_x86_max_qb as fllowing: def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>; BUILTIN(__builtin_x86_max_qb, "iii", "") I define the intrinsic as Pseudo instruction,it succeed. But when mapping a new instruction.I don't know how to do. In x86InstrArithmetic.td....
2018 Sep 12
2
There is an error “use of unknown builtin”
...ang( 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. I do not know what I should do.I have been stranded here for 2 days. Grate for any suggestions. Thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180912/c24c5902...
2018 Nov 14
2
Fw: How to define an instruction
...nation, my instruction should also be multiplication.But it doesn't work.(my instruction can be compiled but can't run) .why can't it run? I think, it's no different with "IMUL32rr ". Here is the result : test.c shows as following:(the main content ) int a,b; a=1;b=1; a=a=__builtin_x86_max_qb (a,b); (the main content ) test.ll shows as following: %0 = load i32, i32* %a, align 4 %1 = load i32, i32* %b, align 4 %2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2) store i32 %2, i32* %a, align 4 when lli test.ll ,it goes wrong. Here is my all code: 1. In llvm/include/llvm/IR/Intrinsi...
2018 Nov 14
2
Fw: How to define an instruction
...nation, my instruction should also be multiplication.But it doesn't work.(my instruction can be compiled but can't run) .why can't it run? I think, it's no different with "IMUL32rr ". Here is the result : test.c shows as following:(the main content ) int a,b; a=1;b=1; a=a=__builtin_x86_max_qb (a,b); (the main content ) test.ll shows as following: %0 = load i32, i32* %a, align 4 %1 = load i32, i32* %b, align 4 %2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2) store i32 %2, i32* %a, align 4 when lli test.ll ,it goes wrong. Here is my all code: 1. In llvm/include/llvm/IR/Intrinsi...