This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, i386] Support AES, F16C, BMI and BMI2 targets in multiversioning
- From: Allan Sandfeld Jensen <linux at carewolf dot com>
- To: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 31 Dec 2014 14:38:09 +0100
- Subject: Re: [Patch, i386] Support AES, F16C, BMI and BMI2 targets in multiversioning
- Authentication-results: sourceware.org; auth=none
- References: <201412311328 dot 48412 dot linux at carewolf dot com> <20141231131542 dot GV1667 at tucnak dot redhat dot com>
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.
`Allan