[Bug middle-end/35307] New: Missing Simplication for div op

2008-02-22 Thread xinliangli at gmail dot com
The following rule is good to have: int i, i, k; i/j/k ===> i/(j*k) -- Summary: Missing Simplication for div op Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end

[Bug middle-end/35308] New: Straight line strength reduction

2008-02-22 Thread xinliangli at gmail dot com
Seems to be a missing functionality int a[100]; int g; void foo(int i) { a[i] = i*g; i++; a[i] = i*g; i++; a[i] = i*g; } Both array address computation and RHS mpy operations can be strength reduced. -- Summary: Straight line strength reduction P

[Bug middle-end/35303] Code hoisting optimization at tree level

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-23 05:22 --- *** This bug has been marked as a duplicate of 23286 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added --

[Bug tree-optimization/23286] missed fully redundant expression

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #14 from pinskia at gcc dot gnu dot org 2008-02-23 05:22 --- *** Bug 35303 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added -

[Bug middle-end/35309] New: Late struct expansion leads to missing PRE

2008-02-22 Thread xinliangli at gmail dot com
// Example: the load of structs at return is partially redundant struct A { int a; int b; int c; int d; } ag, ag2,ag3; struct A foo(int n) { if (n) { ag2 = ag; } return ag; } // Gcc generated assembly code: foo: .LFB2: testl %edi, %edi je .L2

[Bug middle-end/35310] New: Late struct expansion -- missing PRE (2)

2008-02-22 Thread xinliangli at gmail dot com
union U { struct A { int a; int b; }aa; long long ll; }; struct B{ union U u1; union U u2; } bg; struct B bg; struct B bar(); int foo (int n) { if (n) { bg = bar(); } return bg.u1.ll + bg.u2.ll; }; // Two union fields loads are partially redund

[Bug middle-end/35308] Straight line strength reduction

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-23 05:27 --- Sometimes doing the strength reduction actually increases the code size. Think on targets which have auto increments. *** This bug has been marked as a duplicate of 22586 *** -- pinskia at gcc dot gnu dot org c

[Bug tree-optimization/22586] GVN-PRE could do strength reduction

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-02-23 05:27 --- *** Bug 35308 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug middle-end/35286] Missing PRE for globals

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-02-23 05:29 --- I think this is a dup of bug 23455. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35286

[Bug rtl-optimization/35309] Late struct expansion leads to missing PRE

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-23 05:34 --- GCSE should take care of this. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug middle-end/35304] Missing store sinking (code size optimization) at tree level

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-23 05:39 --- > should be (at least with -Os) And normal -O2. This is a dup of bug 25553 for the reasons why this should be done even at -O2. *** This bug has been marked as a duplicate of 25553 *** -- pinskia at gcc dot gn

[Bug tree-optimization/25553] Missed removal of load

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2008-02-23 05:39 --- *** Bug 35304 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug middle-end/35292] Missing Const Prop -- union fields

2008-02-22 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-02-23 05:50 --- More than just constant prop, see PR 25972 for more info on what else it can be done with union in the same way. Actually I think MEM_REF will make it worse and will not help. In fact I still think MEM_REF is a bad

[Bug middle-end/35308] Straight line strength reduction

2008-02-22 Thread xinliangli at gmail dot com
--- Comment #2 from xinliangli at gmail dot com 2008-02-23 06:55 --- (In reply to comment #1) > Sometimes doing the strength reduction actually increases the code size. > Think > on targets which have auto increments. > > *** This bug has been marked as a duplicate of 22586 *** > It

<    1   2