Sorry, for misunderstanding I've introduced with error in my comment. Your inputs are fixed. Since they don't touch sources, just testsuite, I am posting only tesuite/ChangeLog updated entry.
tesuite/ChangeLog entry: 2011-07-27 Kirill Yukhin <kirill.yuk...@intel.com> * gcc.target/i386/i386.exp (check_effective_target_lzcnt): New. * gcc.target/i386/lzcnt-1.c: New test. * gcc.target/i386/lzcnt-2.c: Likewise. * gcc.target/i386/lzcnt-2a.c: Likewise. * gcc.target/i386/lzcnt-3.c: New test. * gcc.target/i386/lzcnt-4.c: Likewise. * gcc.target/i386/lzcnt-4a.c: Likewise. * gcc.target/i386/lzcnt-5.c: Likewise. * gcc.target/i386/lzcnt-6.c: Likewise. * gcc.target/i386/lzcnt-6a.c: Likewise. * gcc.target/i386/lzcnt-check.h: New driver to run LZCNT-* tests only if HW available. * gcc.target/i386/sse-12.c: Added -mlzcnt switch. * gcc.target/i386/sse-13.c: Likewise. * gcc.target/i386/sse-14.c: Likewise. * g++.dg/other/i386-2.C: Likewise. * g++.dg/other/i386-3.C: Likewise. Patch attached. Changes were bootstrapped and make-check-ed (lzcnt ones under simulator). Is it OK for now? Thanks, K On Wed, Jul 27, 2011 at 11:22 AM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Wed, Jul 27, 2011 at 9:05 AM, Kirill Yukhin <kirill.yuk...@gmail.com> > wrote: >> Thanks for inputs! I'll do it today. >> >> Just ine point. >> How AVX is connected to LZCNT features? >> AVX requires OS support since it has wider registers etc. >> LZCNT need no support from OS side, so from my point of view it is >> redundant to check in lzcnt-check.h presence of AVX support from OS >> side. >> Or I get you wrong? > > Ah, I see. I got distracted by the wrong comment in your patch: > > +# Return 1 if the target supports running AVX executables, 0 otherwise. > + > +proc check_effective_target_lzcnt_runtime { } { > + if { [check_effective_target_lzcnt] > + && [check_lzcnt_hw_available] } { > + return 1 > + } > + return 0 > +} > > (I will add avx-os-support.h myself later today). > > Uros. >
lzcnt-2.gcc.patch
Description: Binary data