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]: Fix recent i386 testsuite failures


On 4/3/07, Richard Henderson <rth@redhat.com> wrote:

On Tue, Apr 03, 2007 at 03:18:48PM +0200, Uros Bizjak wrote:
> Attached patch fixes i386 testsuite failures [1], introduced by [2].
> Functions with immediate arguments have to be implemented as macros,
> otherwise "shift must be an immediate" error is generated.

I get the feeling that this is a bug in our inline expander.
We shouldn't be -fkeep-inline-functions w/ __always_inline__.

No, the problem is that at -O0 constant propagation is not run and sse shift functions doesn't get constant parameters, even if they are specified in source.

This is the problem why g++.dg/other/i386-1.C fails so often.

Attached patch is a follow-up to latest ?mmintrin.h cleanups. This
patch provide macros when we are not optimizing (when __OPTIMIZE__ is
not defined). This overrides problems with constant propagation, while
still provides inlined functions for optimized builds. The tests were
adjusted to test both, optimized and non-optimized compilations. There
is no need to check macros for pedantic errors, as only functions are
of interest, so -O was added to these tests.

BTW: g++.dg/other/i386-1.C was also changed to run on i686 and x86_64 targets.

Patch was bootstrapped on i686-pc-linux-gnu, regression tested for all
default languages. The patch fixes g++.dg/other/i386-1.C and is
committed to mainline.

2007-05-21 Uros Bizjak <ubizjak@gmail.com>

	* config/i386/tmmintrin.h (_mm_alignr_epi8): Provide macro
	implementation if __OPTIMIZE__ is not defined.
	(_mm_alignr_pi8): Ditto.
	* config/i386/ammintrin.h (_mm_extracti_si64): Ditto.
	(_mm_inserti_si64): Ditto.
	* config/i386/emmintrin.h (_mm_shuffle_pd): Ditto.
	(_mm_slli_epi16): Ditto.
       (_mm_slli_epi32): Ditto.
       (_mm_slli_epi64): Ditto.
	(_mm_srai_epi16): Ditto.
	(_mm_srai_epi32): Ditto.
	(_mm_srli_si128): Ditto.
	(_mm_slli_si128): Ditto.
	(_mm_srli_epi16): Ditto.
       (_mm_srli_epi32): Ditto.
       (_mm_srli_epi64): Ditto.
	(_mm_extract_epi16): Ditto.
	(_mm_insert_epi16): Ditto.
	(_mm_shufflehi_epi16): Ditto.
	(_mm_shufflelo_epi16): Ditto.
	(_mm_shuffle_epi32): Ditto.
       * config/i386/xmmintrin.h (_mm_extract_pi16): Ditto.
       (_m_pextrw): Ditto.
       (_mm_insert_pi16): Ditto.
       (_m_pinsrw): Ditto.
       (_mm_shuffle_pi16): Ditto.
       (_m_pshufw): Ditto.
       (_mm_shufle_ps): Ditto.
       (_mm_prefetch): Ditto.

testsuite/ChangeLog:

2007-05-21 Uros Bizjak <ubizjak@gmail.com>

	* gcc.target/i386/sse-14.c: Remove all intrinsic redefines.
	* gcc.target/i386/sse-12: Add -O to compile options.
	* g++.dg/other/i386-2.C: Use "-march=k8 -m3dnow -mssse3
	-msse4a" instead of "-msse3".  Include only ammintrin.h, tmmintrin.h
	and mm3dnow.h.  Add -O to compile options.

Uros.

Attachment: i386-intrin-3.diff
Description: Binary data


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