On Wed, Oct 13, 2021 at 06:47:21PM -0500, Segher Boessenkool wrote: > On Wed, Oct 13, 2021 at 12:04:39PM -0500, Paul A. Clarke wrote: > > On Mon, Oct 11, 2021 at 07:11:13PM -0500, Segher Boessenkool wrote: > > > > - _mm_mul_epu32: vec_mule(v4su) uses vmuleuw. > > > > > > Did this fail on p7? If not, add a test that *does*? > > > > Do you mean fail if not for "dg-require-effective-target p8vector_hw"? > > We have that, in gcc/testsuite/gcc.target/powerpc/sse2-pmuludq-1.c. > > "Some compatibility implementations of x86 intrinsics include > Power intrinsics which require POWER8." > > Plus, everything this patch does. None of that would be needed if it > worked on p7!
The tests that are permitted to compile/link on P7, gated by dg directives, work on P7. > So things in this patch are either not needed (so add noise only, and > reduce functionality on older systems for no reason), or they do fix a > bug. It would be nice if we could have detected such bugs earlier. Most, if not all of the intrinsics tests were originally limited to P8 and up, 64bit, and little-endian. At your request, I have lowered many of those restrictions in areas that are capable of support. Such is the case here, to enable compiling and running as much as possible on P7. If you want a different approach, do let me know. > > > > gcc > > > > PR target/101893 > > > > > > This is a different bug (the vgbdd one)? > > > > PR 101893 is the same issue: things not being properly masked by > > #ifdefs. > > But PR101893 does not mention anything you touch here, and this patch > does not fix PR101893. The main purpose of bug tracking systems is the > tracking part! The error message in PR101893 is in smmintrin.h: | gcc/include/smmintrin.h:103:3: error: AltiVec argument passed to unprototyped function | | That line is | | __charmask = vec_gb (__charmask); smmintrin.h is changed by this patch, including `#ifdef _ARCH_PWR8` around the code which has vec_gb. PC