From 31a9beff7f1689c538a8ebafecc0fa27d8dcb1cd Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 14 Feb 2003 15:29:50 -0800 Subject: [PATCH] re PR rtl-optimization/7702 (gcc-3.2 optimization problem on a DEC alpha under OSF1) PR optimization/7702 * reload1.c (reload_cse_simplify_set): Honor CLASS_CANNOT_CHANGE_MODE_P. From-SVN: r62922 --- gcc/ChangeLog | 78 +++++++++++++++++++++++++++------------------------ gcc/reload1.c | 9 +++++- 2 files changed, 50 insertions(+), 37 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b3ae10ab0a1..799530225822 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-02-14 Falk Hueffner + + PR optimization/7702 + * reload1.c (reload_cse_simplify_set): Honor + CLASS_CANNOT_CHANGE_MODE_P. + 2003-02-13 John David Anglin * inclhack.def (hpux_long_double): Tighten select and add bypass @@ -45,7 +51,7 @@ as a SET pattern. 2003-02-10 Eric Botcazou - Christian Ehrhardt + Christian Ehrhardt PR c/7741 * c-decl.c (duplicate_decls): Discard the initializer of the @@ -63,7 +69,7 @@ * pa.md (jump): Likewise. 2003-02-06 Eric Botcazou - Richard Henderson + Richard Henderson PR c/9530 * config/i386/i386.h (FUNCTION_OK_FOR_SIBCALL): Forbid sibcalls @@ -116,43 +122,43 @@ 2002-09-16 Richard Henderson - * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE - as well as OFFSET for BITPOS. + * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE + as well as OFFSET for BITPOS. 2002-09-08 Jan Hubicka - * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref - handling. + * emit-rtl.c (set_mem_attributes_minus_bitpos): Fix array_ref + handling. 2002-07-29 Richard Henderson - * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from - set_mem_attributes and add BITPOS argument. Subtract it from - OFFSET when same is adjusted. - (set_mem_attributes): New wrapper function. - * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; - remove offset adjustment hack. - * expr.h (set_mem_attributes_minus_bitpos): Declare. + * emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from + set_mem_attributes and add BITPOS argument. Subtract it from + OFFSET when same is adjusted. + (set_mem_attributes): New wrapper function. + * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; + remove offset adjustment hack. + * expr.h (set_mem_attributes_minus_bitpos): Declare. 2002-07-25 Richard Henderson - * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos - in ARRAY_REF of DECL_P case. + * emit-rtl.c (set_mem_attributes): Fix size and alignment thinkos + in ARRAY_REF of DECL_P case. 2002-07-21 Richard Henderson - * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL - when flag_argument_noalias == 2. - * alias.c (nonoverlapping_memrefs_p): Handle that. - * print-rtl.c (print_mem_expr): Likewise. + * emit-rtl.c (set_mem_attributes): Preserve indirection of PARM_DECL + when flag_argument_noalias == 2. + * alias.c (nonoverlapping_memrefs_p): Handle that. + * print-rtl.c (print_mem_expr): Likewise. 2002-06-03 Dan Nicolaescu - * alias.c (nonoverlapping_memrefs_p): Fix off by one error. + * alias.c (nonoverlapping_memrefs_p): Fix off by one error. 2003-02-03 Steve Ellcey - * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. + * config/pa/pa64-hpux.h (INIT_ENVIRONMENT): New. 2003-02-01 Jakub Jelinek @@ -174,13 +180,13 @@ * config/m68k/m68k.md (tablejump+2): Don't sign extend an address register. - * config/m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/coff.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/mot3300.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise. - * config/m68k/pbb.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/apollo68.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/coff.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/mot3300.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise. + * config/m68k/pbb.h (ASM_RETURN_CASE_JUMP): Likewise. 2003-01-30 Ralf Corsepius @@ -267,8 +273,8 @@ 2003-01-27 Richard Earnshaw - * function.c (purge_addressof_1): After pushing anaddressed register - onto the stack, simplify the result. + * function.c (purge_addressof_1): After pushing anaddressed register + onto the stack, simplify the result. 2003-01-25 Eric Botcazou @@ -285,7 +291,7 @@ of *both* the file name and the fix name. 2003-01-25 Eric Botcazou - Christian Ehrhardt + Christian Ehrhardt PR optimization/9279 @@ -412,7 +418,7 @@ binary compatibility. 2003-01-07 Benjamin Kosnik - Sunil Davasam + Sunil Davasam PR libstdc++/9076 * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, @@ -732,12 +738,12 @@ Sat Nov 16 02:54:29 CET 2002 Jan Hubicka 2002-11-04 Aldy Hernandez - Backport patch to fix PR c/8451. + Backport patch to fix PR c/8451. - 2002-04-25 Richard Henderson + 2002-04-25 Richard Henderson - * expmed.c (extract_bit_field): Fall through to generic code rather - than aborting on subreg special case. + * expmed.c (extract_bit_field): Fall through to generic code rather + than aborting on subreg special case. 2002-11-01 Mark Mitchell diff --git a/gcc/reload1.c b/gcc/reload1.c index 5928a6806661..a37a050fd970 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -8277,7 +8277,14 @@ reload_cse_simplify_set (set, insn) { #ifdef LOAD_EXTEND_OP if (GET_MODE_BITSIZE (GET_MODE (SET_DEST (set))) < BITS_PER_WORD - && extend_op != NIL) + && extend_op != NIL +#ifdef CLASS_CANNOT_CHANGE_MODE + && !(REGNO_REG_CLASS (REGNO (SET_DEST (set))) + == CLASS_CANNOT_CHANGE_MODE + && CLASS_CANNOT_CHANGE_MODE_P (GET_MODE (SET_DEST (set)), + word_mode)) +#endif + ) { rtx wide_dest = gen_rtx_REG (word_mode, REGNO (SET_DEST (set))); ORIGINAL_REGNO (wide_dest) = ORIGINAL_REGNO (SET_DEST (set)); -- 2.47.2