[Bug c/27007] Missed optimization of comparison with 'limited range'

2008-12-06 Thread rguenth at gcc dot gnu dot org
--- Comment #10 from rguenth at gcc dot gnu dot org 2008-12-06 11:05 --- Yep. Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|N

[Bug c/27007] Missed optimization of comparison with 'limited range'

2008-12-06 Thread tkoenig at gcc dot gnu dot org
--- Comment #9 from tkoenig at gcc dot gnu dot org 2008-12-06 10:51 --- This is now fixed: $ cat foo.c int foo(unsigned char x) { return (x+1) != 0; } $ gcc -O3 -fdump-tree-optimized -S foo.c $ cat foo.s .file "foo.c" .text .p2align 4,,15 .globl foo

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-05-04 Thread pinskia at gcc dot gnu dot org
--- Comment #8 from pinskia at gcc dot gnu dot org 2006-05-04 17:24 --- (In reply to comment #7) > For the tree-vrp.c part of this, perhaps VR_VARYING should be deprecated? How can something inside the compiler be deprecated? That is all internal and nobody sees it? -- http://gcc

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-05-04 Thread trt at acm dot org
--- Comment #7 from trt at acm dot org 2006-05-04 17:21 --- For the tree-vrp.c part of this, perhaps VR_VARYING should be deprecated? I notice there is a single place (set_value_range_to_varying) which assigns VR_VARYING but a couple dozen places that check it. If instead a type-based

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-04 Thread rguenth at gcc dot gnu dot org
--- Comment #6 from rguenth at gcc dot gnu dot org 2006-04-04 09:09 --- Confirmed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCON

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread jsm28 at gcc dot gnu dot org
--- Comment #5 from jsm28 at gcc dot gnu dot org 2006-04-03 19:51 --- Bug should not have been closed, reopening. -- jsm28 at gcc dot gnu dot org changed: What|Removed |Added -

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread dberlin at dberlin dot org
--- Comment #4 from dberlin at gcc dot gnu dot org 2006-04-03 19:44 --- Subject: Re: Missed optimization of comparison with 'limited range' On Mon, 2006-04-03 at 19:22 +, trt at acm dot org wrote: > > --- Comment #3 from trt at acm dot org 2006-04-03 19:22 --- > S

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread trt at acm dot org
--- Comment #3 from trt at acm dot org 2006-04-03 19:22 --- Since x is unsigned char, default promotions apply and x+1 will be a signed integer in the range 1..256 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27007

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread joseph at codesourcery dot com
--- Comment #2 from joseph at codesourcery dot com 2006-04-03 19:22 --- Subject: Re: Missed optimization of comparison with 'limited range' On Mon, 3 Apr 2006, pinskia at gcc dot gnu dot org wrote: > x+1 can wrap so try x be UINT_MAX. Wrong. The test uses *unsigned char*. In the n

[Bug c/27007] Missed optimization of comparison with 'limited range'

2006-04-03 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-04-03 18:59 --- x+1 can wrap so try x be UINT_MAX. In fact x != -1 is valid for unsigned as -1 is casted to unsigned and you get UINT_MAX :). -- pinskia at gcc dot gnu dot org changed: What|Removed