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: [Trivial patch, i386]: fix ix86_expand_vector_move()


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

>  > 2005-01-05 Uros Bizjak <uros@kss-loka.si>
>  > 
>  >    * config/i386/i386.c (ix86_expand_vector_move):
>  >    Fix condition of constant to memory move.
>
> It probably doesn't matter from a correctness standpoint because these
> two variables are only ever set to zero or one.

It doesn't even matter if they were set to something different, as long as
the result is only tested against zero.

> Note, the function lookup_attribute() returns a tree.  I'm surprised
> -Werror hasn't caught the int=ptr thing, but perhaps arm is only
> checked in a cross config which doesn't activate -Werror. :-/

Note "!= NULL" below.

>  >   int l1, l2, s1, s2;
>      ^^^
>  >   [...]
>  >   /* Check for mismatched call attributes.  */
>  >   l1 = lookup_attribute ("long_call", TYPE_ATTRIBUTES (type1)) != NULL;
>  >   l2 = lookup_attribute ("long_call", TYPE_ATTRIBUTES (type2)) != NULL;
>  >   s1 = lookup_attribute ("short_call", TYPE_ATTRIBUTES (type1)) != NULL;
>  >   s2 = lookup_attribute ("short_call", TYPE_ATTRIBUTES (type2)) != NULL;
>  > 
>  >   /* Only bother to check if an attribute is defined.  */
>  >   if (l1 | l2 | s1 | s2)
>          ^^^^^^^^^^^^^^^^^

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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