[LLVMdev] Target specific intrinsics

Villmow, Micah Micah.Villmow at amd.com
Tue Jun 29 12:53:00 PDT 2010


Thanks, I'll take a look at it.

Another question. 

Is there a way to make a 'generic' Intrinsic?

It seems that I can specify an intrinsic as either float, int or vector for generics, but I'd like a way to specify for any type.
I.e. something like this:
def int_AMDIL_cmov_logical : GCCBuiltin<"__amdil_cmov_logical">,
			Intrinsic<[llvm_any_ty], [LLVMMatchType<0>,
					LLVMMatchType<0>, LLVMMatchType<0>]>;

I don't really care what type the intrinsic is, as long as all arguments are of the same type. I've looked at the other backend TD files and really can't find a way of doing this without specifying three different versions.
It isn't too much work to add the three different types, just trying to not have to duplicate code if there is a way not to.

Thanks,
Micah

-----Original Message-----
From: Eli Friedman [mailto:eli.friedman at gmail.com] 
Sent: Tuesday, June 29, 2010 12:38 PM
To: Villmow, Micah
Cc: llvmdev at cs.uiuc.edu List
Subject: Re: [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






More information about the llvm-dev mailing list