* [Bug tree-optimization/38405] Regression (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
@ 2008-12-04 17:46 ` ldoolitt at recycle dot lbl dot gov
2008-12-04 20:37 ` hjl dot tools at gmail dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ldoolitt at recycle dot lbl dot gov @ 2008-12-04 17:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ldoolitt at recycle dot lbl dot gov 2008-12-04 17:45 -------
Created an attachment (id=16827)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16827&action=view)
test case source (preprocessed)
Test case source in "how to reproduce" got chopped. Sorry. Here it is in the
form of an attachment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] Regression (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
2008-12-04 17:46 ` [Bug tree-optimization/38405] " ldoolitt at recycle dot lbl dot gov
@ 2008-12-04 20:37 ` hjl dot tools at gmail dot com
2008-12-04 20:39 ` [Bug tree-optimization/38405] [4.4 Regression] " hjl dot tools at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-04 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hjl dot tools at gmail dot com 2008-12-04 20:35 -------
It is caused by revision 140288:
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01925.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
2008-12-04 17:46 ` [Bug tree-optimization/38405] " ldoolitt at recycle dot lbl dot gov
2008-12-04 20:37 ` hjl dot tools at gmail dot com
@ 2008-12-04 20:39 ` hjl dot tools at gmail dot com
2008-12-05 9:08 ` bonzini at gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-04 20:39 UTC (permalink / raw)
To: gcc-bugs
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl dot tools at gmail dot
| |com
Summary|Regression (silent failure) |[4.4 Regression] (silent
|handling bitfield in ternary|failure) handling bitfield
| |in ternary
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-12-04 20:39 ` [Bug tree-optimization/38405] [4.4 Regression] " hjl dot tools at gmail dot com
@ 2008-12-05 9:08 ` bonzini at gnu dot org
2008-12-05 11:25 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2008-12-05 9:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from bonzini at gnu dot org 2008-12-05 09:02 -------
I'll look at it in a couple of days. In the meanwhile, could you please attach
the dumps of vrp and the pass just before it?
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bonzini at gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-12-05 09:02:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-12-05 9:08 ` bonzini at gnu dot org
@ 2008-12-05 11:25 ` rguenth at gcc dot gnu dot org
2008-12-05 15:44 ` bonzini at gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-05 11:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-12-05 11:23 -------
The error is likely
Folding statement: D.1241_5 = D.1242_4 != 0;
Folded into: D.1241_5 = (int) D.1242_4;
which is wrong for
<unnamed-signed:1> D.1242;
because it sign-extends.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.3.2
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-12-05 11:25 ` rguenth at gcc dot gnu dot org
@ 2008-12-05 15:44 ` bonzini at gnu dot org
2008-12-07 16:18 ` hjl dot tools at gmail dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bonzini at gnu dot org @ 2008-12-05 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from bonzini at gnu dot org 2008-12-05 15:42 -------
Subject: Re: [4.4 Regression] (silent failure)
handling bitfield in ternary
> Folding statement: D.1241_5 = D.1242_4 != 0;
> Folded into: D.1241_5 = (int) D.1242_4;
>
> which is wrong for
>
> <unnamed-signed:1> D.1242;
>
> because it sign-extends.
So it's probably in fold-const.c and latent in 4.3 too...
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-12-05 15:44 ` bonzini at gnu dot org
@ 2008-12-07 16:18 ` hjl dot tools at gmail dot com
2008-12-07 16:31 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-07 16:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl dot tools at gmail dot com 2008-12-07 16:17 -------
This bug disappeared between revision 142341 and revision 142508.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-12-07 16:18 ` hjl dot tools at gmail dot com
@ 2008-12-07 16:31 ` rguenth at gcc dot gnu dot org
2008-12-07 16:45 ` hjl at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-07 16:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2008-12-07 16:29 -------
Maybe it's just gone latent ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-12-07 16:31 ` rguenth at gcc dot gnu dot org
@ 2008-12-07 16:45 ` hjl at gcc dot gnu dot org
2008-12-07 17:20 ` hjl dot tools at gmail dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl at gcc dot gnu dot org @ 2008-12-07 16:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hjl at gcc dot gnu dot org 2008-12-07 16:44 -------
Subject: Bug 38405
Author: hjl
Date: Sun Dec 7 16:43:15 2008
New Revision: 142538
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142538
Log:
2008-12-07 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/38405
* gcc.dg/torture/pr38405.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr38405.c
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-12-07 16:45 ` hjl at gcc dot gnu dot org
@ 2008-12-07 17:20 ` hjl dot tools at gmail dot com
2008-12-07 17:41 ` hjl dot tools at gmail dot com
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-07 17:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from hjl dot tools at gmail dot com 2008-12-07 17:17 -------
It is fixed by revision 142483:
http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00341.html
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-12-07 17:20 ` hjl dot tools at gmail dot com
@ 2008-12-07 17:41 ` hjl dot tools at gmail dot com
2008-12-07 18:55 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2008-12-07 17:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from hjl dot tools at gmail dot com 2008-12-07 17:39 -------
Oops. It is revision 142484:
http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00340.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (10 preceding siblings ...)
2008-12-07 17:41 ` hjl dot tools at gmail dot com
@ 2008-12-07 18:55 ` rguenth at gcc dot gnu dot org
2008-12-07 19:23 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-07 18:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2008-12-07 18:52 -------
We now get
D.1254 = BIT_FIELD_REF <*rfp, 8, 0>;
D.1255 = D.1254 & 1;
D.1253 = D.1255 != 0;
which causes missed optimizations. Jakub - can you disable the bit-field-ref
folding for single tests like this?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (11 preceding siblings ...)
2008-12-07 18:55 ` rguenth at gcc dot gnu dot org
@ 2008-12-07 19:23 ` rguenth at gcc dot gnu dot org
2008-12-07 20:35 ` rguenth at gcc dot gnu dot org
2008-12-07 20:36 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-07 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2008-12-07 19:20 -------
It's not fixed. Jakub just made it latent. I am testing a real fix.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (12 preceding siblings ...)
2008-12-07 19:23 ` rguenth at gcc dot gnu dot org
@ 2008-12-07 20:35 ` rguenth at gcc dot gnu dot org
2008-12-07 20:36 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-07 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2008-12-07 20:34 -------
Subject: Bug 38405
Author: rguenth
Date: Sun Dec 7 20:33:07 2008
New Revision: 142539
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142539
Log:
2008-12-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38405
* tree-vrp.c (simplify_truth_ops_using_ranges): Make sure to
not sign-extend truth values.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/38405] [4.4 Regression] (silent failure) handling bitfield in ternary
2008-12-04 17:37 [Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary gcc-bugzilla at gcc dot gnu dot org
` (13 preceding siblings ...)
2008-12-07 20:35 ` rguenth at gcc dot gnu dot org
@ 2008-12-07 20:36 ` rguenth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-07 20:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2008-12-07 20:33 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38405
^ permalink raw reply [flat|nested] 16+ messages in thread