* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
@ 2009-08-16 2:41 ` amodra at bigpond dot net dot au
2009-08-16 2:45 ` amodra at bigpond dot net dot au
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-16 2:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from amodra at bigpond dot net dot au 2009-08-16 02:41 -------
Created an attachment (id=18372)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18372&action=view)
block sha1 source
blk_SHA1Block takes all its input from unsigned ints and only writes to
unsigned ints, thus all zero_extends in the body of this function are redundant
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |amodra at bigpond dot net
|dot org |dot au
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
2009-08-16 2:41 ` [Bug target/41081] " amodra at bigpond dot net dot au
@ 2009-08-16 2:45 ` amodra at bigpond dot net dot au
2009-08-16 3:05 ` amodra at bigpond dot net dot au
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-16 2:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from amodra at bigpond dot net dot au 2009-08-16 02:45 -------
Created an attachment (id=18373)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18373&action=view)
Cure the zero_extends on rotate output
This patch teaches gcc that the powerpc rotate/shift unit appropriately zero or
sign extends to the full register width, at least for the most common case of
SImode operations.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
2009-08-16 2:41 ` [Bug target/41081] " amodra at bigpond dot net dot au
2009-08-16 2:45 ` amodra at bigpond dot net dot au
@ 2009-08-16 3:05 ` amodra at bigpond dot net dot au
2009-08-16 3:07 ` amodra at bigpond dot net dot au
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-16 3:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from amodra at bigpond dot net dot au 2009-08-16 03:05 -------
Created an attachment (id=18374)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18374&action=view)
aims to teach gcc that rotate/shift insn input register's high bits are ignored
This patch is aimed at the "79 other redundant clrldi", removing 59 cases on
rotate/shift input. I'm not particularly happy with it due to hack for
LOAD_EXTEND_OP zero_extends. Before I discovered that particular problem,
fwprop seemed a natural place to teach gcc about insn inputs. If we don't
leave those zero_extends alone, some rotate insns will take their input
directly from the load, while other insns still need the zero_extend. This
prevents combine from removing the zero_extend on loads.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (2 preceding siblings ...)
2009-08-16 3:05 ` amodra at bigpond dot net dot au
@ 2009-08-16 3:07 ` amodra at bigpond dot net dot au
2009-08-16 9:50 ` steven at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-16 3:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from amodra at bigpond dot net dot au 2009-08-16 03:07 -------
Please ignore the RS6000_ALT_REG_ALLOC_ORDER hunk in rs6000-2.diff. I forgot
to edit that out..
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (3 preceding siblings ...)
2009-08-16 3:07 ` amodra at bigpond dot net dot au
@ 2009-08-16 9:50 ` steven at gcc dot gnu dot org
2009-08-23 2:57 ` amodra at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-08-16 9:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from steven at gcc dot gnu dot org 2009-08-16 09:50 -------
If you are going to submit these patches, can you please make
EXTEND_INPUT_REG_OP a target hook instead of a macro?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (4 preceding siblings ...)
2009-08-16 9:50 ` steven at gcc dot gnu dot org
@ 2009-08-23 2:57 ` amodra at gcc dot gnu dot org
2009-08-23 3:49 ` amodra at bigpond dot net dot au
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gcc dot gnu dot org @ 2009-08-23 2:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from amodra at gcc dot gnu dot org 2009-08-23 02:57 -------
Subject: Bug 41081
Author: amodra
Date: Sun Aug 23 02:57:26 2009
New Revision: 151022
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151022
Log:
PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fwprop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (5 preceding siblings ...)
2009-08-23 2:57 ` amodra at gcc dot gnu dot org
@ 2009-08-23 3:49 ` amodra at bigpond dot net dot au
2009-08-23 3:53 ` amodra at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-23 3:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from amodra at bigpond dot net dot au 2009-08-23 03:49 -------
.
--
amodra at bigpond dot net dot au changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (6 preceding siblings ...)
2009-08-23 3:49 ` amodra at bigpond dot net dot au
@ 2009-08-23 3:53 ` amodra at gcc dot gnu dot org
2009-08-23 19:55 ` hjl dot tools at gmail dot com
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gcc dot gnu dot org @ 2009-08-23 3:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from amodra at gcc dot gnu dot org 2009-08-23 03:53 -------
Subject: Bug 41081
Author: amodra
Date: Sun Aug 23 03:53:02 2009
New Revision: 151025
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151025
Log:
PR target/41081
* config/rs6000/rs6000.md (rotlsi3_64, ashlsi3_64, lshrsi3_64,
ashrsi3_64): New.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (7 preceding siblings ...)
2009-08-23 3:53 ` amodra at gcc dot gnu dot org
@ 2009-08-23 19:55 ` hjl dot tools at gmail dot com
2009-08-24 2:39 ` amodra at bigpond dot net dot au
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-08-23 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hjl dot tools at gmail dot com 2009-08-23 19:55 -------
Is it possible to extend this to address another zero extend bug, PR 17387?
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl dot tools at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (8 preceding siblings ...)
2009-08-23 19:55 ` hjl dot tools at gmail dot com
@ 2009-08-24 2:39 ` amodra at bigpond dot net dot au
2009-08-30 6:10 ` amodra at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at bigpond dot net dot au @ 2009-08-24 2:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from amodra at bigpond dot net dot au 2009-08-24 02:38 -------
No, that looks like a different problem. It affects powerpc64 too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (9 preceding siblings ...)
2009-08-24 2:39 ` amodra at bigpond dot net dot au
@ 2009-08-30 6:10 ` amodra at gcc dot gnu dot org
2009-10-02 17:12 ` bergner at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gcc dot gnu dot org @ 2009-08-30 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from amodra at gcc dot gnu dot org 2009-08-30 06:09 -------
Subject: Bug 41081
Author: amodra
Date: Sun Aug 30 06:09:42 2009
New Revision: 151221
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151221
Log:
PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fwprop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (10 preceding siblings ...)
2009-08-30 6:10 ` amodra at gcc dot gnu dot org
@ 2009-10-02 17:12 ` bergner at gcc dot gnu dot org
2009-10-03 1:39 ` bergner at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bergner at gcc dot gnu dot org @ 2009-10-02 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from bergner at gcc dot gnu dot org 2009-10-02 17:12 -------
Subject: Bug 41081
Author: bergner
Date: Fri Oct 2 17:12:31 2009
New Revision: 152411
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152411
Log:
Backport from mainline:
2009-08-23 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* config/rs6000/rs6000.md (rotlsi3_64, ashlsi3_64, lshrsi3_64,
ashrsi3_64): New.
Backport from 4.3 branch:
2009-09-25 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.md (load_toc_v4_PIC_3c): Correct POWER
form of instruction.
2009-09-23 Alan Modra <amodra@bigpond.net.au>
PR target/40473
* config/rs6000/rs6000.c (rs6000_output_function_prologue): Don't
call final to emit non-scheduled prologue, instead insert at entry.
Modified:
branches/ibm/gcc-4_3-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_3-branch/gcc/config/rs6000/rs6000.c
branches/ibm/gcc-4_3-branch/gcc/config/rs6000/rs6000.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (11 preceding siblings ...)
2009-10-02 17:12 ` bergner at gcc dot gnu dot org
@ 2009-10-03 1:39 ` bergner at gcc dot gnu dot org
2010-04-28 22:53 ` bergner at gcc dot gnu dot org
2010-04-29 14:35 ` bergner at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: bergner at gcc dot gnu dot org @ 2009-10-03 1:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from bergner at gcc dot gnu dot org 2009-10-03 01:39 -------
Subject: Bug 41081
Author: bergner
Date: Sat Oct 3 01:39:14 2009
New Revision: 152430
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152430
Log:
Backport from mainline.
2009-08-30 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.
2009-08-23 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.
2009-05-08 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/33928
PR 26854
* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
process_uses, build_single_def_use_links): New.
(update_df): Update use_def_ref.
(forward_propagate_into): Use get_def_for_use instead of use-def
chains.
(fwprop_init): Call build_single_def_use_links and let it initialize
dataflow.
(fwprop_done): Free use_def_ref.
(fwprop_addr): Eliminate duplicate call to df_set_flags.
* df-problems.c (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
(df_rd_bb_local_compute_process_def): Update head comment.
(df_chain_create_bb): Use the new RD simulation functions.
* df.h (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
* opts.c (decode_options): Enable fwprop at -O1.
* doc/invoke.texi (-fforward-propagate): Document this.
Modified:
branches/ibm/gcc-4_3-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_3-branch/gcc/REVISION
branches/ibm/gcc-4_3-branch/gcc/df-problems.c
branches/ibm/gcc-4_3-branch/gcc/df.h
branches/ibm/gcc-4_3-branch/gcc/doc/invoke.texi
branches/ibm/gcc-4_3-branch/gcc/fwprop.c
branches/ibm/gcc-4_3-branch/gcc/opts.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (12 preceding siblings ...)
2009-10-03 1:39 ` bergner at gcc dot gnu dot org
@ 2010-04-28 22:53 ` bergner at gcc dot gnu dot org
2010-04-29 14:35 ` bergner at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: bergner at gcc dot gnu dot org @ 2010-04-28 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from bergner at gcc dot gnu dot org 2010-04-28 22:53 -------
Subject: Bug 41081
Author: bergner
Date: Wed Apr 28 22:52:57 2010
New Revision: 158846
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158846
Log:
Backport from mainline:
2009-08-23 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* config/rs6000/rs6000.md (rotlsi3_64, ashlsi3_64, lshrsi3_64,
ashrsi3_64): New.
Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/config/rs6000/rs6000.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41081] redundant ZERO_EXTENDs
2009-08-16 2:37 [Bug target/41081] New: redundant ZERO_EXTENDs amodra at bigpond dot net dot au
` (13 preceding siblings ...)
2010-04-28 22:53 ` bergner at gcc dot gnu dot org
@ 2010-04-29 14:35 ` bergner at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: bergner at gcc dot gnu dot org @ 2010-04-29 14:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from bergner at gcc dot gnu dot org 2010-04-29 14:34 -------
Subject: Bug 41081
Author: bergner
Date: Thu Apr 29 14:34:35 2010
New Revision: 158902
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158902
Log:
Backport from mainline.
2009-08-30 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.
2009-08-23 Alan Modra <amodra@bigpond.net.au>
PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.
2009-05-08 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/33928
PR 26854
* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
process_uses, build_single_def_use_links): New.
(update_df): Update use_def_ref.
(forward_propagate_into): Use get_def_for_use instead of use-def
chains.
(fwprop_init): Call build_single_def_use_links and let it initialize
dataflow.
(fwprop_done): Free use_def_ref.
(fwprop_addr): Eliminate duplicate call to df_set_flags.
* df-problems.c (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
(df_rd_bb_local_compute_process_def): Update head comment.
(df_chain_create_bb): Use the new RD simulation functions.
* df.h (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
* opts.c (decode_options): Enable fwprop at -O1.
* doc/invoke.texi (-fforward-propagate): Document this.
Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/df-problems.c
branches/ibm/gcc-4_4-branch/gcc/df.h
branches/ibm/gcc-4_4-branch/gcc/doc/invoke.texi
branches/ibm/gcc-4_4-branch/gcc/fwprop.c
branches/ibm/gcc-4_4-branch/gcc/opts.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41081
^ permalink raw reply [flat|nested] 16+ messages in thread