Displaying 20 results from an estimated 40 matches for "llvmmatchtype".
2009 Apr 15
3
[LLVMdev] Tablegen question
...te, called from
IntrinsicEmitter::EmitGenerator, here
for (unsigned j = 0; j != N; ++j) {
OS << " ArgTys.push_back(";
EmitTypeGenerate(OS, ParamTys[j], ArgNo);
OS << ");\n";
}
I'm hitting this assertion:
if (ArgType->isSubClassOf("LLVMMatchType")) {
unsigned Number = ArgType->getValueAsInt("Number");
assert(Number < ArgNo && "Invalid matching number!");
Where both Number and ArgNo are 1.
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]...
2009 Apr 15
0
[LLVMdev] Tablegen question
...r::EmitGenerator, here
> for (unsigned j = 0; j != N; ++j) {
> OS << " ArgTys.push_back(";
> EmitTypeGenerate(OS, ParamTys[j], ArgNo);
> OS << ");\n";
> }
> I'm hitting this assertion:
> if (ArgType->isSubClassOf("LLVMMatchType")) {
> unsigned Number = ArgType->getValueAsInt("Number");
> assert(Number < ArgNo && "Invalid matching number!");
>
> Where both Number and ArgNo are 1.
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:l...
2009 Apr 15
2
[LLVMdev] Tablegen question
I have this intrinsic definition for llvm.
def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty],
[llvm_anyfloat_ty, LLVMMatchType<0>]>;
Can someone explain what LLVMMatchType does and how to specify it to
match the first argument and not the return value?
I've tried LLVMMatchType<1> but it fails in IntrinsicEmitter.cpp
Thanks,
-------------- next part --------------
An HTML attachment was s...
2009 Apr 15
3
[LLVMdev] Tablegen question
Oops. That was premature. I think your original question was on the
right track. TableGen distinguishes between known and "overloaded"
types (like "llvm_anyfloat_ty" in your example). The overloaded types
are numbered separately, and the argument to LLVMMatchType is an index
into these overloaded types, ignoring the known types. So, in your
case, the first argument is the first overloaded type, so you should
use LLVMMatchType<0> to refer to it.
On Apr 15, 2009, at 10:31 AM, Bob Wilson wrote:
> That's a bug. I'm working on a fix......
2009 Apr 15
0
[LLVMdev] Tablegen question
On Apr 15, 2009, at 9:29 AM, Villmow, Micah wrote:
> I have this intrinsic definition for llvm.
> def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty],
> [llvm_anyfloat_ty, LLVMMatchType<0>]>;
>
>
> Can someone explain what LLVMMatchType does and how to specify it
> to match the first argument and not the return value?
>
> I’ve tried LLVMMatchType<1> but it fails in IntrinsicEmitter.cpp
Can you give some more info about how LLVMMatchType<1>...
2009 Apr 15
0
[LLVMdev] Tablegen question
...l_math_fdistance: //
llvm.opencl.math.fdistance
ResultTy = Type::FloatTy;
ArgTys.push_back(Tys[0]);
ArgTys.push_back(Tys[0]);
break;
This is the intrinsic definition:
def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty],
[llvm_anyfloat_ty, LLVMMatchType<0>]>;
The problem comes when I try to use the intrinsic. It gives me the
following error:
GPRV2F32:f32:$src1 MACRO_DISTANCE_FAST_v2f32: (set GPRF32:f32:$dst,
(intrinsic_w_chain:f32 84:iPTR, GPRV2F32:v2f32:$src0,
GPRV2F32:f32:$src1))
TableGen.exe: In MACRO_DISTANCE_FAST_v2f32: Type infer...
2009 Apr 15
1
[LLVMdev] Tablegen question
...math.fdistance
> ResultTy = Type::FloatTy;
> ArgTys.push_back(Tys[0]);
> ArgTys.push_back(Tys[0]);
> break;
>
> This is the intrinsic definition:
> def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty],
> [llvm_anyfloat_ty, LLVMMatchType<0>]>;
>
> The problem comes when I try to use the intrinsic. It gives me the
> following error:
> GPRV2F32:f32:$src1 MACRO_DISTANCE_FAST_v2f32: (set GPRF32:f32:$dst,
> (intrinsic_w_chain:f32 84:iPTR, GPRV2F32:v2f32:$src0,
> GPRV2F32:f32:$src1))
> TableGen.exe: In MAC...
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-...
2011 Nov 19
1
[LLVMdev] llvm_anyint_ty clarification
..., .s32, .s64 };
The presence of multiple types requires llvm.ptx.max
to be overloaded for i16, i32 and i64.
So I think that the right way to define the intrinsic would be
(as in the attached max_not_working.patch file):
def int_ptx_max : Intrinsic<[llvm_anyint_ty],
[LLVMMatchType<0>, LLVMMatchType<0>],
[Commutative]>;
The problem is that the builtin is not recognised in the following test case:
define ptx_device i16 @max_16(i16 %a, i16 %b) {
entry:
%d = call i16 @llvm.ptx.max(i16 %a, i16 %b)
ret i16 %d
}
declare i16 @llvm.ptx...
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...
2010 Jun 29
2
[LLVMdev] Target specific intrinsics
I'm working on intrinsics for my backend and require intrinsic overloading. Is this supported? If so, are there any examples?
Thanks,
Micah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100629/04db85ea/attachment.html>
2010 Jun 29
0
[LLVMdev] Target specific intrinsics
On Tue, Jun 29, 2010 at 12:16 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> I'm working on intrinsics for my backend and require intrinsic overloading.
> Is this supported? If so, are there any examples?
Some of the ARM NEON intrinsics are overloaded.
-Eli
2011 Jun 17
2
[LLVMdev] RFC: Integer saturation intrinsics
On Jun 17, 2011, at 3:42 PM, Eli Friedman wrote:
> 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 semant...
2011 Nov 22
2
[LLVMdev] PTX builtin functions.
Alberto,
The AMDIL backend solves your problem with intrinsic overloading this way:
def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
Where TernaryIntFloat is defined as:
class TernaryIntFloat :
Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
LLVMMatchType<0>, LLVMMatchType<0>], []>;
This allows us to write a multi-def for int_AMDIL_mad like so:
defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
Where TernaryIntrinsicFloat is defined as:
multiclass TernaryIntrinsicFloat<ILOpCode op...
2011 Nov 23
2
[LLVMdev] PTX builtin functions.
...kend solves your problem with intrinsic overloading this
way:
> > def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
> >
> > Where TernaryIntFloat is defined as:
> > class TernaryIntFloat :
> > Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
> > LLVMMatchType<0>, LLVMMatchType<0>], []>;
> >
> > This allows us to write a multi-def for int_AMDIL_mad like so:
> > defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
> >
> > Where TernaryIntrinsicFloat is de...
2011 Nov 23
0
[LLVMdev] PTX builtin functions.
...erto,
> The AMDIL backend solves your problem with intrinsic overloading this way:
> def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
>
> Where TernaryIntFloat is defined as:
> class TernaryIntFloat :
> Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
> LLVMMatchType<0>, LLVMMatchType<0>], []>;
>
> This allows us to write a multi-def for int_AMDIL_mad like so:
> defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
>
> Where TernaryIntrinsicFloat is defined as:
> multiclass Tern...
2011 Dec 08
3
[LLVMdev] PTX builtin functions.
...; > > way:
>> > > def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
>> > >
>> > > Where TernaryIntFloat is defined as:
>> > > class TernaryIntFloat :
>> > > Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
>> > > LLVMMatchType<0>, LLVMMatchType<0>], []>;
>> > >
>> > > This allows us to write a multi-def for int_AMDIL_mad like so:
>> > > defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
>> > >...
2011 Nov 23
0
[LLVMdev] PTX builtin functions.
...with intrinsic overloading
this way:
> > > def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
> > >
> > > Where TernaryIntFloat is defined as:
> > > class TernaryIntFloat :
> > > Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
> > > LLVMMatchType<0>, LLVMMatchType<0>], []>;
> > >
> > > This allows us to write a multi-def for int_AMDIL_mad like so:
> > > defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
> > >
> > > Whe...
2011 Dec 04
2
[LLVMdev] PTX builtin functions.
...; > > way:
>> > > def int_AMDIL_mad : GCCBuiltin<"__amdil_mad">, TernaryIntFloat;
>> > >
>> > > Where TernaryIntFloat is defined as:
>> > > class TernaryIntFloat :
>> > > Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>,
>> > > LLVMMatchType<0>, LLVMMatchType<0>], []>;
>> > >
>> > > This allows us to write a multi-def for int_AMDIL_mad like so:
>> > > defm MAD : TernaryIntrinsicFloat<IL_OP_MAD, int_AMDIL_mad>;
>> > >...
2011 Oct 06
2
[LLVMdev] A potential bug
...i32 %tmp15, i32 %tmp16, i32 %tmp18, i32
%tmp20)
...
It is compiled by clang 2.9. This BB is an end block in a function.
Intrinsic function llvm.guard.load.p0i32 is defined as follows:
let Properties = [IntrNoMem, NoCapture<0>] in {
def int_guard_load : Intrinsic<[llvm_anyptr_ty], [LLVMMatchType<0>]>
}
Thanks a lot.
Bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111006/894fd8b5/attachment.html>