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()


 > 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.  However these are
conceptually logical boolean variables so if you want to fix this
there are a few more.  A quick grep reveals this:

 > config/i386/i386.c:7582:  if ((reload_in_progress | reload_completed) == 0
 > config/m68hc11/m68hc11.c:700:      && (reload_completed | reload_in_progress))
 > config/m68hc11/m68hc11.c:5349:  return COSTS_N_INSNS (1) + (reload_completed | reload_in_progress);
 > config/m68hc11/m68hc11.c:5351:  return COSTS_N_INSNS (2) + (reload_completed | reload_in_progress);
 > config/m68hc11/m68hc11.c:5381:    return COSTS_N_INSNS (1) + (reload_completed | reload_in_progress);
 > config/v850/v850.c:2298:  if (reload_completed | reload_in_progress)
 > config/xtensa/xtensa.c:1280:  if (!(reload_in_progress | reload_completed)
 > config/arm/predicates.md:110:        "offsettable_address_p (reload_completed | reload_in_progress,
 > config/iq2000/iq2000.md:665:  "reload_in_progress | reload_completed"
 > config/iq2000/iq2000.md:692:      rtx tem = ((reload_in_progress | reload_completed)
 > config/iq2000/iq2000.md:701:  if ((reload_in_progress | reload_completed) == 0
 > config/iq2000/iq2000.md:719:      rtx tem = ((reload_in_progress | reload_completed)
 > config/iq2000/iq2000.md:755:  if ((reload_in_progress | reload_completed) == 0
 > config/iq2000/iq2000.md:794:  if ((reload_in_progress | reload_completed) == 0
 > config/m68hc11/m68hc11.md:858:  if (TARGET_M6811 && (reload_in_progress | reload_completed) == 0)
 > config/m68hc11/m68hc11.md:998:  if (TARGET_M6811 && (reload_in_progress | reload_completed) == 0)
 > config/xtensa/xtensa.md:957:      && !(reload_in_progress | reload_completed)


I also happened across this oddity from
arm.c:arm_comp_type_attributes():

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. :-/


 >   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)
         ^^^^^^^^^^^^^^^^^

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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