This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, i386] Support AES, F16C, BMI and BMI2 targets in multiversioning


On Wed, Dec 31, 2014 at 02:38:09PM +0100, Allan Sandfeld Jensen wrote:
> On Wednesday 31 December 2014, Jakub Jelinek wrote:
> > On Wed, Dec 31, 2014 at 01:28:47PM +0100, Allan Sandfeld Jensen wrote:
> > > I recently wanted to use multiversioning for BMI2 specific extensions
> > > PDEP/PEXT, and noticed it wasn't there. So I wrote this patch to add it,
> > > and also added AES, F16C and BMI1 for completeness.
> > 
> > AES nor F16C doesn't make any sense IMHO for multiversioning, you need
> > special intrinsics for that anyway and when you use them, the function will
> > fail to compile without those features.
> > Multiversioning only makes sense for ISA features the compiler uses for
> > normal C/C++ code without any intrinsics.
> > 
> I disagree. You just include the intrinsics and use them. Inside a function 
> with the right target rule they will work even if they don't outside. This 
> works even without multiversioning, e.g. just specific functions with specific 
> targets.

I don't understand.  Target attribute for aes or f16c of course makes sense,
but that is already supported.  But for multiversioning, you can't have
intrinsics vs. other code depending on what the function is multiversioned
for.  So, you either don't use them at all, then multiversioning on it
doesn't make sense, or you include them, and get errors because intrinsics
are used in a function that doesn't support aes or f16c.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]