search for: llvm_i32_ty

Displaying 20 results from an estimated 54 matches for "llvm_i32_ty".

2015 Mar 09
2
[LLVMdev] LLVM Backend DAGToDAGISel INTRINSIC
I am currently working on DAGToDAGISel class for MIPS and am trying to figure out a way to use INTRINSIC_W_CHAIN for an intrinsic which can return a value. My intrinsic is defined as: Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_i32_ty,llvm_i32_ty,llvm_i32_ty],[IntrReadWriteArgMem]>; i.e. it has four arguments and one return value In DAGToDAGISel when I try to pass it with four arguments and a return register it fails the assertion `ResNo < NumValues && "Illegal result number!"...
2008 May 07
2
[LLVMdev] Creation of Intrinsics with Pointer Return Types
...set of instructions being replaced by them.<br>In the process I created a "migrate_begin" variable argument intrinsic which handles the incoming data dependenices to these set of instructions.<br>Entry in the Intrinsics.td file:<br>def int_migrate_begin : Intrinsic<[llvm_i32_ty,llvm_vararg_ty],[IntrWriteMem],"llvm.migrate_begin">;<br> <br>I want to replace the instructions from this set , having outgoing data dependencies, with " migrate_end " intrinsic instructions.<br>I created two migrate_end intrinsics with return types anyin...
2008 May 07
0
[LLVMdev] Creation of Intrinsics with Pointer Return Types
...t of instructions being replaced by them. > In the process I created a "migrate_begin" variable argument > intrinsic which handles the incoming data dependenices to these set > of instructions. > Entry in the Intrinsics.td file: > def int_migrate_begin : Intrinsic<[llvm_i32_ty,llvm_vararg_ty], > [IntrWriteMem],"llvm.migrate_begin">; > > I want to replace the instructions from this set , having outgoing > data dependencies, with " migrate_end " intrinsic instructions. > I created two migrate_end intrinsics with return types anyint(...
2015 Dec 01
2
LICM doesn't work for IntrReadMem intrinsic function
Hi, All, Suppose I define one memory read only intrinsic function "foo" in Intrinsics.td like this def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadMem]>; Suppose I have the following IR, which means the intrinsic function "foo" is called 10 times in a loop. Since the parameters of function "foo" are invariant and the function "foo" is defined as "IntrReadMem"....
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. I add ,(To make sure the Sched is ri...
2018 Sep 17
2
error about adding an trinsics
...s 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: add a sdnode max_qb, In /lib/Target/X86/X86SelLowering.cpp: case X86ISD::max_qb: return "X86ISD::max_qb"; In /lib/Target/X86/X86InstrInfo.td: def X86max_qb_flag : SDNode<"X86ISD...
2018 Sep 06
2
Adding an trinsics in x86
...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 according to the add function. In sr...
2012 Jan 20
2
[LLVMdev] Tablegen: How to define a Pattern with multiple result instructions
Hi, I'm trying to create a Pattern that looks something like this: def my_inst : Instruction < let OutOperandList = (outs REG:$dst); let InOperandList = (ins imm:$src); let Uses = [R0]; > def int_my_intrinsic : Intrinsic < [llvm_float_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [] >; def : Pattern < (int_my_intrinsic imm:$a, imm:$b, imm:$c), [(set R0, (MOV_IMM imm:$a)), (my_inst (my_inst $b), $c)] >; When I try to run this through tablegen, I get this error: "Cannot handle instructions producing instructions with temporar...
2015 Oct 22
2
add intrinsic function support for customized backend
Hi, All, I want to add one intrinsic function for my particular backend. Let's say the intrinsic function is named "foo" which takes two i32 inputs and has one i32 output. First, I add this line "def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadArgMem]>;" in /include/llvm/IR/Intrinsics.td. Then, in my target/InstrInfo.td, I'm supposed to add one pattern to match this intrinsic function. However, I don't understand how LLVM can tell the difference between this intrinsic function call...
2015 Dec 01
2
LICM doesn't work for IntrReadMem intrinsic function
...c 1, 2015, at 9:30 AM, Xiangyang Guo via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Hi, All, > > > > Suppose I define one memory read only intrinsic function "foo" in > Intrinsics.td like this > > > > def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], > [IntrReadMem]>; > > > > Suppose I have the following IR, which means the intrinsic function > "foo" is called 10 times in a loop. Since the parameters of function "foo" > are invariant and the function "foo" is de...
2014 Jul 23
2
[LLVMdev] LowerINTRINSIC_W_CHAIN in X86
Yeah. I agree that "Chain operand is needed if the intrinsic is reading / writing memory.”, Just don’t know where and how to set it up. like intrinsic “int_x86_xtest: “ def int_x86_xtest : GCCBuiltin<"__builtin_ia32_xtest">, Intrinsic<[llvm_i32_ty], [], []>; “ "def X86xtest: SDNode<"X86ISD::XTEST", SDTypeProfile<1, 0, [SDTCisVT<0, i32>]>, [SDNPHasChain, SDNPSideEffect]>; “ let Defs = [EFLAGS] in def XTEST : I<0x01, MRM_D6, (outs), (ins), "xtest", [(set EFLA...
2011 Jun 17
5
[LLVMdev] RFC: Integer saturation intrinsics
Hi all, I'm proposing integer saturation intrinsics. def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; The first operand is the integer value being saturated, and second is the saturation bit position. For scalar integer types, the semantics are: int_ssat: x < -(1 << (bit-1)) ? -(1 << (bi...
2014 Jul 18
2
[LLVMdev] how to define INTRINSIC_W_CHAIN
sure! class TEST_INTINSIC_FM< string asmstr> : Intrinsic <llvm_i32_ty], [llvm_i32_ty, llvm_ptr_ty], [IntrReadWriteArgMem], !strconcat(“llvm.test”, asmstr),”.float”) >; tks On Jul 18, 2014, at 4:06 PM, Tom Stellard <tom at stellard.net> wrote: > On Fri, Jul 18, 2014 at 03:19:47PM -0400, kewuzhang wrote: >> en! >> >> my test is : %r1...
2015 Oct 22
2
add intrinsic function support for customized backend
...de) but can be converted into pseudo-instruction > instead (at least for the X86 backend). Then, there's many ways to handle > pseudo-instructions inside a backend. > > I will take the X86 backend as an example. > > First, your intrinsics: > > def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], > [IntrReadArgMem]>; > > It will be converted into DAG nodes. Then, you can handle it manually > inside the code or using TableGen mechanism. For the latter, you should > define a pseudo-instruction that match your > intrinsic-translated-into-dag-n...
2010 May 27
1
[LLVMdev] builtin naming
Hi Sorry ...I know I should be mailing to the clang list but I am waiting for my subscription. My question is on how to name my builtin in source if i have a intrinsic definition like def int_mytarget_get_id : : Intrinsic<[llvm_i32_ty], [llvm_i32_ty]>; I tried __builtin_mytarget_get_id and clang still didnt generate my intrinsic. thanks shrey
2016 Mar 21
1
define intrinsic function with pointer-typed parameter
Hi, If I define a intrinsic function with pointer-typed parameter, for example, def llvm_foo_ptr_ty : LLVMPointerType<llvm_i16_ty>; def int_foo_get : Intrinsic<[llvm_foo_ptr_ty], [llvm_foo_ptr_ty, llvm_i32_ty], [IntrReadArgMem]>; How to lower it for the backend? I'm not sure what kind of register (i16 or i32 or i32) is needed in this case? If the parameter is LLVMPointerType<llvm_i32_ty> instead of LLVMPointerType<llvm_i16_ty>, will this make difference for the backend? Suppose my ba...
2017 Jan 27
2
Preserving Call to Intrinsic function
...ed the result from the first call into a new set of registers. Is there is a way to force LLVM to generate two explicit calls to a builtin function. The builtin takes in an integer type, and also returns back an integer type: def int_XX : GCCBuiltin<"__builtin_XX">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty]>; Is there some flag that I'm missing? Your help will be really appreciated. Best Regards, Kumail Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170127/4335399b/attachment.htm...
2011 Jun 17
0
[LLVMdev] RFC: Integer saturation intrinsics
On Fri, Jun 17, 2011 at 3:08 PM, Evan Cheng <evan.cheng at apple.com> wrote: > Hi all, > > I'm proposing integer saturation intrinsics. > > def int_ssat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > def int_usat : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i32_ty]>; > > The first operand is the integer value being saturated, and second is the saturation bit position. > > For scalar integer types, the semantics are: > > int_ssat: x < -(1 <...
2018 Nov 14
2
Fw: How to define an instruction
...@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/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], [Commutative]>; } 2. In llvm//tools/clang/include/clang/Basic/BuiltinsX86.def: BUILTIN(__builtin_x86_max_qb, "iii", "") 3.In llvm/lib/Target/X86/X86ISelLowering.h: max_qb, 4.In llvm/lib/Target/X86/X86IntrinsicsInfo.h:(IntrinsicsWithoutChain) X...
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...defines intrinsics that are used by all hw codegen targets. > +// > +//===----------------------------------------------------------------------===// > + > +let TargetPrefix = "AMDGPU", isTarget = 1 in { > + > + def int_AMDGPU_load_const : Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; > + def int_AMDGPU_load_imm : Intrinsic<[llvm_v4f32_ty], [llvm_i32_ty], [IntrNoMem]>; > + def int_AMDGPU_reserve_reg : Intrinsic<[], [llvm_i32_ty], [IntrNoMem]>; > + def int_AMDGPU_store_output : Intrinsic<[], [llvm_float_ty, llvm_i32_ty], [IntrNoMem]&g...