https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26270
Alan Modra changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-02-13 23:59 ---
(In reply to comment #1)
> f1 in the following is optimized to f2
> but f3 isn't seen as equivalent to f4
These are because fold is not recalled on the full expression a < CST0 && a +
CST1 < CST0.
Confirmed.
--
--- Comment #1 from amodra at bigpond dot net dot au 2006-02-13 23:53
---
f1 in the following is optimized to f2
int
f1 (unsigned long offset)
{
return offset < 0x100 && offset + 4 < 0x100;
}
int
f2 (unsigned long offset)
{
return offset < 0xfc;
}
but f3 isn't seen as equivalent