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: Fwd: x86 issue: unwelcome mmx instruction


Stuart Hastings <stuart@apple.com> writes:

> This x86-specific testcase provokes an MMX instruction in the absence
> of any MMX builtins (grep the assembly for "%mm").  The trivial patch
> "fixes" the problem, but the original code very deliberately checked
> TARGET_SSE, and I don't understand why.

It seems to me that we could support V2SImode and V2SFmode in SSE
registers, but currently we don't.  And even if we did we don't have a
way to express a preference as to which one we want.  Perhaps Richard
was thinking of that.  Or perhaps he will simply remember.

> Index: gcc.fsf.nommx/gcc/config/i386/i386.c
> ===================================================================
> --- gcc.fsf.nommx/gcc/config/i386/i386.c        (revision 115741)
> +++ gcc.fsf.nommx/gcc/config/i386/i386.c        (working copy)
> @@ -17926,7 +17926,7 @@
>       {
>       case V2SImode:
>       case V2SFmode:
> -      if (!mmx_ok && !TARGET_SSE)
> +      if (!mmx_ok)
>          return false;
>         /* FALLTHRU */

Essentially the same code is in ix86_expand_vector_init_one_nonzero
and ix86_expand_vector_init_general.  It seems extremely likely that
all three should be changed.  Could you please test that?  You don't
have to write test cases for the other two functions, although it
would probably not be too difficult (or else it could never happen and
the test is redundant anyhow).

> 2006-08-18  Stuart Hastings  <stuart@apple.com>
> 
> 	*config/i386/i386.c (ix86_expand_vector_init_duplicate):
> Remove  TARGET_SSE check.
> 	* testsuite/gcc.target/i386/20060725-1.c: New.
> 
> O.K. for trunk?

Please fix the ChangeLog spacing.  And of course the testsuite entry
goes in testsuite/ChangeLog.  Please mention PR 24073 in the ChangeLog
entry.

The patch to change all three locations is preapproved.  Please wait
at least until Monday to give Richard a chance to reply.

Thanks.

Ian


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