diff options
author | Adam Nemet <nemet@gcc.gnu.org> | 2009-07-09 05:32:21 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-07-09 05:32:21 +0000 |
commit | 3f36bac24bce8dff4633e0238c94487f8d3d82ae (patch) | |
tree | fa860a534f9dd2bcd83ddd57eb70f6554a21c2e4 /gcc | |
parent | ae30c1fa3d408d80ddae53efa00586ed45277120 (diff) | |
download | gcc-3f36bac24bce8dff4633e0238c94487f8d3d82ae.zip gcc-3f36bac24bce8dff4633e0238c94487f8d3d82ae.tar.gz gcc-3f36bac24bce8dff4633e0238c94487f8d3d82ae.tar.bz2 |
combine.c (make_extraction): Check TRULY_NOOP_TRUNCATION before creating LHS paradoxical subregs.
* combine.c (make_extraction): Check TRULY_NOOP_TRUNCATION before
creating LHS paradoxical subregs. Fix surrounding returns to
use NULL_RTX rather than 0.
From-SVN: r149401
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 24 | ||||
-rw-r--r-- | gcc/combine.c | 17 |
2 files changed, 27 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6fefd14..4007a66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-08 Adam Nemet <anemet@caviumnetworks.com> + + * combine.c (make_extraction): Check TRULY_NOOP_TRUNCATION before + creating LHS paradoxical subregs. Fix surrounding returns to + use NULL_RTX rather than 0. + 2009-07-08 DJ Delorie <dj@redhat.com> * config/mep/mep.c: (mep_option_can_inline_p): New. @@ -36,9 +42,9 @@ * optabs.h (optab_libfunc): Ditto. * tree.h (tree_expr_nonzero_warnv_p): Ditto. * tree-flow.h (vect_can_force_dr_alignment_p, - get_vectype_for_scalar_type): Ditto. + get_vectype_for_scalar_type): Ditto. (vectorize_loops): Move prototype to ... - * tree-vectorizer.h: ... here. Also, adjust comment. + * tree-vectorizer.h: ... here. Also, adjust comment. (vect_set_verbosity_level): Remove duplicate prototype. * tree-ssa-loop.c: Include tree-vectorizer.h. * Makefile.in (tree-ssa-loop.o): Depend on tree-vectorizer.h. @@ -57,7 +63,7 @@ * config/mep/intrinsics.md: Regenerated. * config/mep/mep.c (mep_interrupt_saved_reg): Save IVC2 control registers when asm() or calls are detected. - + 2009-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/31246 @@ -66,7 +72,7 @@ * gimple (gimple_build_call_from_tree): Likewise. * tree-cfg.c (remove_useless_stmts_warn_notreached): Check no_warning flag before warning. - + 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org> * tree.c (set_expr_locus): Remove. @@ -152,7 +158,7 @@ * config/mep/intrinsics.md: Regenerate. * config/mep/intrinsics.h: Regenerate. * config/mep/mep-intrin.h: Regenerate. - + 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org> * c-lex.c: Replace %H by an explicit location. Update all calls. @@ -248,7 +254,7 @@ PR target/40587 * ira.c (build_insn_chain): Use DF_LR_OUT instead of df_get_live_out. - + 2009-07-03 Richard Guenther <rguenther@suse.de> PR tree-optimization/40640 @@ -363,16 +369,16 @@ * config/mep/intrinsics.md: Regenerate. * config/mep/intrinsics.h: Regenerate. * config/mep/mep-intrin.h: Regenerate. - + 2009-07-01 Anthony Green <green@moxielogic.com> * config/moxie/moxie.c (moxie_expand_prologue): Use dec instruction when possible. (moxie_expand_prologue): Ditto. Also, save an instruction and - some complexity by popping off of $r12 instead of $sp. + some complexity by popping off of $r12 instead of $sp. * config/moxie/moxie.md (movsi_pop): Don't assume $sp. Take two operands. - + 2009-07-01 Richard Henderson <rth@redhat.com> PR bootstrap/40347 diff --git a/gcc/combine.c b/gcc/combine.c index a4f0d66..a781484 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6692,18 +6692,25 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, inner = adjust_address_nv (inner, wanted_inner_mode, offset); } - /* If INNER is not memory, we can always get it into the proper mode. If we - are changing its mode, POS must be a constant and smaller than the size - of the new mode. */ + /* If INNER is not memory, get it into the proper mode. If we are changing + its mode, POS must be a constant and smaller than the size of the new + mode. */ else if (!MEM_P (inner)) { + /* On the LHS, don't create paradoxical subregs implicitely truncating + the register unless TRULY_NOOP_TRUNCATION. */ + if (in_dest + && !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (GET_MODE (inner)), + GET_MODE_BITSIZE (wanted_inner_mode))) + return NULL_RTX; + if (GET_MODE (inner) != wanted_inner_mode && (pos_rtx != 0 || orig_pos + len > GET_MODE_BITSIZE (wanted_inner_mode))) - return 0; + return NULL_RTX; if (orig_pos < 0) - return 0; + return NULL_RTX; inner = force_to_mode (inner, wanted_inner_mode, pos_rtx |