This is the mail archive of the
mailing list for the GCC project.
Re: Fwd: x86 issue: unwelcome mmx instruction
- From: Ian Lance Taylor <iant at google dot com>
- To: Stuart Hastings <stuart at apple dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, rth at redhat dot com
- Date: 18 Aug 2006 18:10:29 -0700
- Subject: Re: Fwd: x86 issue: unwelcome mmx instruction
- References: <51AC518F-A8FF-41CD-8163-2CC6C834ED0B@apple.com> <01DECFC5-6875-4023-B254-C507F1747E3E@apple.com>
Stuart Hastings <email@example.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 <firstname.lastname@example.org>
> *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
The patch to change all three locations is preapproved. Please wait
at least until Monday to give Richard a chance to reply.