https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
Wilco changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
--- Comment #7 from Wilco ---
Author: wilco
Date: Tue Nov 7 12:23:38 2017
New Revision: 254496
URL: https://gcc.gnu.org/viewcvs?rev=254496=gcc=rev
Log:
PR80131: Simplification of 1U << (31 - x)
Currently the code A << (B - C) is not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
wilco at gcc dot gnu.org changed:
What|Removed |Added
CC||wilco at gcc dot gnu.org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
--- Comment #5 from joseph at codesourcery dot com ---
And even with unsigned c, a shift by (30 - 0xU) is perfectly valid
in C; that shift count evaluates to 31U. Whereas a shift by 0xU
is not valid C.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
--- Comment #4 from Segher Boessenkool ---
Yeah, good point. Of course c is unsigned in the example, but we should
handle signed as well (and that info is lost in RTL anyway).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
--- Comment #3 from joseph at codesourcery dot com ---
On Tue, 21 Mar 2017, segher at gcc dot gnu.org wrote:
> If we have d = a << (b - c); and a << b does not truncate in the
> original mode, write it as d := (a << b) >> c; instead (and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
Segher Boessenkool changed:
What|Removed |Added
CC||segher at gcc dot gnu.org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80131
ktkachov at gcc dot gnu.org changed:
What|Removed |Added
Keywords||missed-optimization