This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/18065] usual arithmetic conversion not applying correctly


------- Additional Comments From schlie at comcast dot net  2005-01-16 07:16 -------
Subject: Re:  usual arithmetic conversion not
 applying correctly

Wonder if this PR could still be considered a missed optimization, as the
present logic which determines if an / or % expression's operands may be
shortened, misses the case where if the lhs operand is a constant, it may
be verified as not being INT_MIN; as if it's not, then it's impossible for
the operation to overflow, i.e. INT_MIN / -1  => INT_MAX+1, therefore
may be shortened. As noted as being absent in it's comment on shortening:

  /* Although it would be tempting to shorten always here, that loses
     on some targets, since the modulo instruction is undefined if the
     quotient can't be represented in the computation mode.  We shorten
     only if unsigned or if dividing by something we know != -1.  */

> From: pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org>
> Subject: [Bug tree-optimization/18065] usual arithmetic conversion not
> applying correctly
> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>            Severity|normal                      |enhancement
>            Priority|P1                          |P3
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18065


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