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