* [Bug optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
@ 2004-03-31 3:34 ` pinskia at gcc dot gnu dot org
2004-03-31 5:40 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-31 3:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-31 03:34 -------
Confirmed, mine.
Here is a better example which causes there to be a reference to link_error (even in RTL):
void link_error (void);
void
foo (char *a)
{
char b = *a;
long c = b;
if (b & 1)
if (! (c & 1))
link_error();
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-31 03:34:14
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
2004-03-31 3:34 ` [Bug optimization/14792] " pinskia at gcc dot gnu dot org
@ 2004-03-31 5:40 ` pinskia at gcc dot gnu dot org
2004-03-31 5:43 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-31 5:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-31 05:40 -------
On PPC here is why this code is not optimial:
_foo:
lbz r4,0(r3)
extsb r0,r4 <--- extra extends byte
rlwinm r2,r0,0,31,31 <-- as this is just an and 1 (trust me)
cmpwi cr7,r2,0
beqlr- cr7
bnelr- cr7
b _link_error
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
2004-03-31 3:34 ` [Bug optimization/14792] " pinskia at gcc dot gnu dot org
2004-03-31 5:40 ` pinskia at gcc dot gnu dot org
@ 2004-03-31 5:43 ` pinskia at gcc dot gnu dot org
2004-05-24 18:13 ` [Bug tree-optimization/14792] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-31 5:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-31 05:43 -------
Related to, if I fix that case on PPC, it fixes this problem too.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |2962
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2004-03-31 5:43 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 18:13 ` pinskia at gcc dot gnu dot org
2004-05-25 14:32 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 18:13 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
` (3 preceding siblings ...)
2004-05-24 18:13 ` [Bug tree-optimization/14792] " pinskia at gcc dot gnu dot org
@ 2004-05-25 14:32 ` pinskia at gcc dot gnu dot org
2004-06-01 21:01 ` pinskia at gcc dot gnu dot org
2004-08-31 4:11 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-25 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-24 16:30 -------
For this to work, we have to fold ((int)b & 1) != 0 into b & 1 != 0. If this is done then the patch for
15459 can do its work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
` (4 preceding siblings ...)
2004-05-25 14:32 ` pinskia at gcc dot gnu dot org
@ 2004-06-01 21:01 ` pinskia at gcc dot gnu dot org
2004-08-31 4:11 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-01 21:01 -------
I should note that this shows up many times when compiling gcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14792] [tree-ssa] cast elimination opportunity involving an AND
2004-03-31 2:55 [Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND kazu at cs dot umass dot edu
` (5 preceding siblings ...)
2004-06-01 21:01 ` pinskia at gcc dot gnu dot org
@ 2004-08-31 4:11 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31 4:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-31 04:11 -------
I am not going to fix the fold problem.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15459
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14792
^ permalink raw reply [flat|nested] 8+ messages in thread