[Bug rtl-optimization/33927] replace_read in dse.c could handle cases where GET_MODE_CLASS (read_mode) != GET_MODE_CLASS (store_mode) (and the size is the same)
rsandifo at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Mar 22 19:39:00 GMT 2008
------- Comment #3 from rsandifo at gcc dot gnu dot org 2008-03-22 19:38 -------
Subject: Bug 33927
Author: rsandifo
Date: Sat Mar 22 19:37:53 2008
New Revision: 133452
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133452
Log:
gcc/
PR rtl-optimization/33927
* Makefile.in (dse.o): Depend on $(TM_P_H).
* expr.h (extract_low_bits): Declare.
* expmed.c (extract_low_bits): New function.
* rtlhooks.c (gen_lowpart_general): Generalize SUBREG handling.
* dse.c: Include tm_p.h.
(find_shift_sequence): Remove the read_reg argument and return the
read value. Emit the instructions instead of returning them.
Iterate on new_mode rather than calculating it each time.
Check MODES_TIEABLE_P. Use simplify_gen_subreg to convert the
source to NEW_MODE and extract_low_bits to convert the shifted
value to READ_MODE.
(replace_read): Allow the load and store to have different mode
classes. Use extract_low_bits when SHIFT == 0. Create the shift
or extraction instructions before trying the replacement. Update
dump-file code accordingly, avoiding use of REGNO (store_info->rhs).
gcc/testsuite/
* gcc.target/mips/dse-1.c: Add checks for zeros.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/dse.c
trunk/gcc/expmed.c
trunk/gcc/expr.h
trunk/gcc/rtlhooks.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/mips/dse-1.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33927
More information about the Gcc-bugs
mailing list