summaryrefslogtreecommitdiff
path: root/gcc/combine.c
Commit message (Collapse)AuthorAgeFilesLines
* * defaults.h (CLZ_DEFINED_VALUE_AT_ZERO): New.rth2003-02-051-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | (CTZ_DEFINED_VALUE_AT_ZERO): New. * doc/rtl.texi, doc/tm.texi: Document them. * combine.c (nonzero_bits) [CLZ, CTZ]: Handle the definedness of the value at zero properly. * fold-const.c (tree_expr_nonnegative_p): Likewise. * simplify-rtx.c (simplify_unary_operation): Likewise. * config/alpha/alpha.h (CLZ_DEFINED_VALUE_AT_ZERO): New. (CTZ_DEFINED_VALUE_AT_ZERO): New. * config/arm/arm.c (TARGET_INIT_BUILTINS): Remove. (TARGET_EXPAND_BUILTIN): Remove. (def_builtin, arm_init_builtins, arm_expand_builtin): Remove. * config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO): New. (enum arm_builtins): Remove. * config/arm/arm.md (UNSPEC_CLZ): Remove. (clzsi2): Rename from clz; use clz instead of unspec. (ctzsi2): New. * config/arm/arm-protos.h: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62453 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-02-01 Richard Henderson <rth@redhat.com>rth2003-02-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * optabs.c (expand_unop): Use word_mode for outmode of bit scaners. * libgcc2.c (__ffsdi2, __clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2, __popcountdi2, __paritysi2 __paritydi2): Change return type to Wtype. * libgcc-std.ver (GCC_3.4): Fix inheritance. * config/i386/i386.md (ffssi2): Use nonimmediate_operand for expander input constraint. 2003-02-01 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de> * optabs.h (optab_index): Add OTI_clz, OTI_ctz, OTI_popcount and OTI_parity. (clz_optab, ctz_optab, popcount_optab, parity_optab): New. * optabs.c (widen_clz, expand_parity): New. (expand_unop): Handle clz and parity. Hardcode SImode as outmode for libcalls to clz, ctz, popcount, and parity. (init_optabs): Init clz_optab, ctz_optab, popcount_optab and parity_optab, and set up libfunc handlers. * libgcc2.c (__clzsi2, __clzdi2, __ctzsi2, __ctzdi2, __popcountsi2, __popcountdi2, __paritysi2 __paritydi2, __popcount_tab): New. * libgcc2.h: Declare them. * libgcc-std.ver (GCC_3.4): Add new functions from libgcc2.c. * genopinit.c (optabs): Add clz_optab, ctz_optab, popcount_optab and parity_optab. * builtin-types.def (BT_FN_INT_LONG, BT_FN_INT_LONGLONG): New. * builtins.def (BUILT_IN_CLZ, BUILT_IN_CTZ, BUILT_IN_POPCOUNT, BUILT_IN_PARITY, BUILT_IN_FFSL, BUILT_IN_CLZL, BUILT_IN_CTZL, BUILT_IN_POPCOUNTL, BUILT_IN_PARITYL, BUILT_IN_FFSLL, BUILT_IN_CLZLL, BUILT_IN_CTZLL, BUILT_IN_POPCOUNTLL, BUILT_IN_PARITYLL): New. * builtins.c (expand_builtin_unop): Rename from expand_builtin_ffs and add optab argument. (expand_builtin): Expand BUILT_IN_{FFS,CLZ,POPCOUNT,PARITY}*. * tree.def (CLZ_EXPR, CTZ_EXPR, POPCOUNT_EXPR, PARITY_EXPR): New. * expr.c (expand_expr): Handle them. * fold-const.c (tree_expr_nonnegative_p): Likewise. * rtl.def (CLZ, CTZ, POPCOUNT, PARITY): New. * reload1.c (eliminate_regs): Handle them. (elimination_effects): Likewise. * function.c (instantiate_virtual_regs_1): Likewise * genattrtab.c (check_attr_value): Likewise. * simplify-rtx.c (simplify_unary_operation): Likewise. * c-common.c (c_common_truthvalue_conversion): Handle POPCOUNT_EXPR. * combine.c (combine_simplify_rtx): Handle POPCOUNT and PARITY. (nonzero_bits): Handle CLZ, CTZ, POPCOUNT and PARITY. * config/alpha/alpha.md (clzdi2, ctzdi2, popcountdi2): New. * config/arm/arm.c (arm_init_builtins): Rename __builtin_clz to __builtin_arm_clz. * Makefile.in (LIB2FUNCS_1, LIB2FUNCS_2): Move... * mklibgcc.in (lib2funcs): ...here and merge. Add new members. * doc/extend.texi (Other Builtins): Add new builtins. * doc/md.texi (Standard Names): Add new patterns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62252 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (combine_simplify_rtx): Use reversed_comparison_code_parts.hubicka2003-02-011-7/+12
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62246 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (emit_prefetch_instructions): Do conversion at right place inhubicka2003-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTL chain. * combine.c (simplify_set): Reverse order of ragumetns to REG_CANNOT_CHANGE_MODE_P * df.c (df_def_record_1): Likewise. * recog.c (register_operand): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Update use of CANNOT_CHANGE_MODE_CLASS. * regclass.c (cannot_change_mode_set_regs, invalid_mode_change_p): Likewise. * reload.c (push_reload): Likewise. * alpha.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * ia64.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * mips.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * mips-protos.h (mips_cannot_change_mode_class): Update prototype. * mips.c (mips_cannot_change_mode_class): Update. * pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * s390.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * sh.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * sh-protos.h (sh_cannot_change_mode_class): Update prototype. * sh.c (sh_cannot_change_mode_class): Update. * i386.h (CANNOT_CHANGE_MODE_CLASS): New. * tm.texi (CANNOT_CHANGE_MODE_CLASS): Update documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62212 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (nonzero_bits): Fix check for negative divide operands.rsandifo2003-01-281-2/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62029 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (force_to_mode): Add cast to fix warning whenschwab2003-01-281-1/+2
| | | | | | | STORE_FLAG_VALUE is negative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61961 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c: Fix formatting.kazu2003-01-261-15/+16
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61862 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (simplify_comparison, case AND): Remove a redundantkazu2003-01-251-10/+6
| | | | | | | test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61787 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Fix comment formatting.kazu2003-01-181-1/+1
| | | | | | | | | | | | | | | * calls.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * gcov.c: Likewise. * haifa-sched.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * profile.c: Likewise. * system.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61478 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (make_compound_operation): Use SCALAR_INT_MODE_P,rth2003-01-101-1/+1
| | | | | | | not INTEGRAL_MODE_P when widening extensions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61178 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-33/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* Index: gcc/ChangeLoggeoffk2002-12-051-0/+57
| | | | | | | | | | | | | | | | | | | | 2002-12-02 Geoffrey Keating <geoffk@apple.com> * combine.c (combine_simplify_rtx): Add new canonicalizations. * doc/md.texi (Insn Canonicalizations): Document new canonicalizations for multiply/add combinations. * config/rs6000/rs6000.md: Add and modify floating add/multiply patterns to ensure they're used whenever they can be. Index: gcc/testsuite/ChangeLog 2002-12-02 Geoffrey Keating <geoffk@apple.com> * gcc.dg/ppc-fmadd-1.c: New file. * gcc.dg/ppc-fmadd-2.c: New file. * gcc.dg/ppc-fmadd-3.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59841 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (force_to_mode): Only replace with (not Y) if all bits in ↵jakub2002-11-201-2/+2
| | | | | | | | | | | fuller_mask (not just mask) are set in C. * gcc.c-torture/execute/20021118-3.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59295 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-11-04 Aldy Hernandez <aldyh@redhat.com>aldyh2002-11-041-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): New. * config/rs6000/rs6000.h (CLASS_CANNOT_CHANGE_MODE_P): Remove. (CLASS_CANNOT_CHANGE_MODE): Remove. (CANNOT_CHANGE_MODE_CLASS): New. * config/alpha/alpha.h: Same. * config/ia64/ia64.h: Same. * config/mips/mips.h: Same. * config/s390/s390.h: Same. * config/sh/sh.h: Same. * config/pa/pa64-regs.h: Same. * config/sh/sh-protos.h (sh_cannot_change_mode_class): Add prototype. * config/sh/sh.c (sh_cannot_change_mode_class): New. * config/mips/mips-protos.h (mips_cannot_change_mode_class): Add prototype. * config/mips/mips.c (mips_cannot_change_mode_class): New. * doc/tm.texi (Register Classes): Remove CLASS_CANNOT_CHANGE_MODE and CLASS_CANNOT_CHANGE_MODE_P. Document CANNOT_CHANGE_MODE_CLASS. * reload.c (push_reload): Use CANNOT_CHANGE_MODE_CLASS. (push_reload): Same. * simplify-rtx.c (simplify_subreg): Same. * reload1.c (choose_reload_regs): Same. * recog.c (register_operand): Same. * regrename.c (mode_change_ok): Change to use new CANNOT_CHANGE_MODE_CLASS infrastructure. * regclass.c (cannot_change_mode_set_regs): New. Declare subregs_of_mode. (regclass): Use subregs_of_mode. Remove references to reg_changes_mode. (init_reg_sets_1): Remove class_can_change_mode and reg_changes_mode code. (invalid_mode_change_p): New. (dump_regclass): Use invalid_mode_change_p instead of class_can_change_mode. (regclass): Same. (record_operand_costs): Do not set reg_changes_mode. * local-alloc.c (struct qty): Remove changes_mode field. (alloc_qty): Remove changes_mode initialization. (update_qty_class): Remove set of changes_mode. (find_free_reg): Use subregs_of_mode. * global.c (find_reg): Use subregs_of_mode info. * rtl.h (cannot_change_mode_set_regs): New prototype. (invalid_mode_change_p): Same. (REG_CANNOT_CHANGE_MODE_P): New macro. * flow.c (mark_used_regs): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. (life_analysis): Clear subregs_of_mode. * combine.c (subst): Pass class to CLASS_CANNOT_CHANGE_MODE_P. Remove use of CLASS_CANNOT_CHANGE_MODE. (simplify_set): Same. (gen_lowpart_for_combine): Calculate subregs_of_mode. Remove REG_CHANGES_MODE. * regs.h: Add extern for subregs_of_mode; Include hard-reg-set and basic-block. (REG_CHANGES_MODE): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58794 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c: Fix comment formatting.kazu2002-10-271-2/+2
| | | | | | | | | | | | | | | | * loop.c: Likewise. * real.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * reg-stack.c: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * reload.h: Likewise. * unroll.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58583 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (simplify_set): Treat MODE_CC registers like cc0.sayle2002-10-151-5/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58148 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (force_to_mode): Handle FLOAT_MODE destinationsrth2002-09-301-2/+10
| | | | | | | for CONST_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57634 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.def: Fix comment formatting.kazu2002-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.def: Likewise. * cfgcleanup.c: Likewise. * combine.c: Likewise. * gengtype.c: Likewise. * params.def: Likewise. * predict.def: Likewise. * rtl.def: Likewise. * stab.def: Likewise. * stor-layout.c: Likewise. * tree.def: Likewise. * config/darwin.c: Likewise. * config/darwin.h: Likewise. * config/dbxcoff.h: Likewise. * config/elfos.h: Likewise. * config/fp-bit.c: Likewise. * config/freebsd-spec.h: Likewise. * config/interix.h: Likewise. * config/libgloss.h: Likewise. * config/linux-aout.h: Likewise. * config/linux.h: Likewise. * config/lynx-ng.h: Likewise. * config/lynx.h: Likewise. * config/netbsd-aout.h: Likewise. * config/netbsd.h: Likewise. * config/netware.h: Likewise. * config/psos.h: Likewise. * config/ptx4.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57624 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (simplify_set): Don't call to force_to_mode if sizerth2002-09-261-1/+2
| | | | | | | of integer type is larger than HOST_BITS_PER_WIDE_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57549 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-221-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * alias.c: Likewise. * basic-block.h: Likewise. * c-aux-info.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-semantics.c: Likewise. * c-typeck.c: Likewise. * calls.c: Likewise. * cfganal.c: Likewise. * cfgloop.c: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * conflict.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.h: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * cppmacro.c: Likewise. * cse.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57398 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix v850 ICE.wilson2002-09-201-0/+6
| | | | | | | | * combine.c (try_combine): When split an instruction pair, where the first has a sign_extend src, verify that the src and dest modes match. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57371 138bc75d-0d04-0410-961f-82ee72b054a4
* fix subreg optimization bug introduced 2002-05-25wilson2002-09-191-1/+1
| | | | | | | | * combine.c (simplify_set): When optimizing a subreg src with a cc0 dest, use GET_MODE (src) for mask instead of inner_mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57323 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove creation of invalid subreg. PR 7705, 7339, 7720.dalej2002-09-191-0/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57315 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (try_combine): Handle the case that undobuf.other_insnsayle2002-09-081-2/+43
| | | | | | | | | | | has been turned into a return or unconditional jump, by inserting a BARRIER if necessary. (simplify_set): Test if a condition code setter has a constant comparison at compile time, if so convert this insn to a no-op move and update/simplify the condition code user (undobuf.other_insn). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56955 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (simplify_shift_const): Calculate rotate countrth2002-09-081-1/+8
| | | | | | | correctly for vector operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56928 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (make_compound_operation): Don't generate zero / signamylaar2002-09-041-1/+5
| | | | | | | extensions in floating point modes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56804 138bc75d-0d04-0410-961f-82ee72b054a4
* * machmode.h (SCALAR_INT_MODE_P): New macro to test forsje2002-08-191-4/+18
| | | | | | | | | | | | | | | | | | scaler integer mode (MODE_INT or MODE_PARTIAL_INT). * explow.c (trunc_int_for_mode): Abort when the mode is not a scaler integer mode. * combine.c (expand_compound_operation): Don't expand Vector or Complex modes into shifts. (expand_field_assignment): Don't do bitwise arithmatic and shifts on Vector or Complex modes. (simplify_comparison): Don't call trunc_int_for_mode for VOIDmode. * recog.c (general_operand): Likewise. (immediate_operand): Likewise. (nonmemory_operand): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56443 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-08-01 Toon Moene <toon@moene.indiv.nluug.nl>toon2002-08-011-2/+2
| | | | | | | | | | | * c-common.c (cb_register_builtins): Set __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only is given, and to 0 otherwise. * combine.c (simplify_if_then_else): HONOR_NANS implies FLOAT_MODE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55932 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-30 Toon Moene <toon@moene.indiv.nluug.nl>toon2002-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * flags.h: Declare flag_finite_math_only. Use it in definition of HONOR_NANS and HONOR_INFINITIES. * c-common.c (cb_register_builtins): Emit __FINITE_MATH_ONLY__ when flag_finite_math_only is set. * combine.c (simplify_if_then_else): If flag_finite_math_only is set, a == b has a definite value. * toplev.c: Initialize flag_finite_math_only. (set_flags_fast_math): Set it on -ffast-math. (flag_fast_math_set_p): Test it. doc: * invoke.texi: Document -ffinite-math-only. f: * com.c (ffe_init_options): Set flag_finite_math_only. * invoke.texi: Document -fno-finite-math-only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55887 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (try_combine): When converting a paradoxical subregamylaar2002-07-111-2/+13
| | | | | | | to an extension, take LOAD_EXTEND_OP into account. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55404 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/2454sayle2002-07-111-7/+9
| | | | | | | | * combine.c (nonzero_bits): LOAD_EXTEND_OP should only apply to SUBREGs of MEMs. (num_sign_bit_copies): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55386 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (gen_lowpart_for_combine): Handle vector modes.amylaar2002-07-101-8/+8
| | | | | | | Supply non-VOID mode to simplify_gen_subreg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55375 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (combine_simplify_rtx): Add an explicit castsayle2002-07-081-25/+40
| | | | | | | | | | | to avoid signed/unsigned comparison warning. (simplify_if_then_else): Likewise. (extended_count): Likewise. (simplify_shift_const): Likewise. (simplify_comparison): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55329 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (struct_undo): Change types of recorded substitutionssayle2002-07-031-8/+7
| | | | | | | | | | | | to be either "int" or "rtx", instead of "unsigned int" and "rtx". (do_SUBST_INT): Change types of the substitution from unsigned int to int, to avoid compilation warning from SUBST_INT's only caller. (make_extraction): Add cast to avoid compilation warning. (force_to_mode): Remove cast to avoid compilation warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55221 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (combine_simplify_rtx): Pass the mode of thelaw2002-06-281-1/+1
| | | | | | | | shift count, not the shift operation when trying to simplify a shift on a SHIFT_COUNT_TRUNCATED target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55085 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (make_extraction): Reapply to the argument of an ASHIFT.rsandifo2002-06-201-0/+15
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54846 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode.hubicka2002-06-201-3/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54839 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-06-05 David S. Miller <davem@redhat.com>davem2002-06-111-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete SEQUENCE rtl usage outside of reorg and ssa passes. * rtl.h (gen_sequence, emit_insns, emit_insns_before, emit_insns_before_scope, emit_insns_after, emit_insns_after_scope): Delete declaration. * ada/misc.c (insert_code_for): Use emit_insn* instead of emit_insns_foo. * config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE. (alpha_set_memflags): Fix comment. (set_frame_related_p): Use get_insns instead of gen_sequence. * config/alpha/alpha.md (setjmp receiver splitter): Avoid emitting no insns. * config/arm/arm.c (arm_finalize_pic): Use get_insns instead of gen_sequence. (arm_gen_load_multiple, arm_gen_store_multiple): Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr): Likewise. * config/ia64/ia64.c (spill_restore_mem): Likewise. * config/ia64/ia64.md (conditional move spliiter): Avoid emitting no insns. * config/m32r/m32r.c (gen_split_move_double): Use get_insns instead of gen_sequence. * config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise. (mips_expand_prologue, mips16_gp_pseudo_reg): Likewise. * config/sh/sh.c (sh_need_epilogue): Likewise. * config/sparc/sparc.md (current_function_calls_alloca, flat): New attributes. (setjmp pattern and split): Use them to avoid splitter which emits no RTL. * genattrtab.c (main): Emit include of function.h * config/stormy16/stormy16.c (xstormy16_split_cbranch): Use get_insns instead of gen_sequence. * config/cris/cris.c (cris_split_movdx): Likewise. * emit-rtl.c (emit_insns*): Kill. (try_split): Expect insn list instead of SEQUENCE. (make_jump_insn_raw, make_call_insn_raw): Fix comments. (emit_*insn*): Reimplement to work with INSN lists and PATTERNs. Make them abort if a SEQUENCE is given and RTL checking is enabled. (emit_*_scope): Don't forget to set scope on final insn. (gen_sequence): Move from here... * ssa.c (gen_sequence): To here as private function. * builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix comments. (expand_builtin_return, expand_builtin_mathfn): Likewise. (expand_builtin_strlen): Use get_insns instead of gen_sequence. (expand_builtin_saveregs): Use emit_insn_foo, fix comments. (expand_builtin_expect_jump): Use get_insns and fix comments. * calls.c (try_to_integrate): Use emit_insn_foo. (expand_call, emit_library_call_value_1): Likewise. * expr.c (emit_queue): Handle insn lists instead of SEQUENCE. (emit_move_insn_1): Use get_insns instead of gen_sequence. (expand_expr): Use emit_insn_foo. * cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo. * except.c (build_post_landing_pads): Likewise. * flow.c (attempt_auto_inc): Likewise. * stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label, expand_nl_goto_receivers, expand_decl_cleanup): Likewise. * function.c (fixup_var_refs_insn): Use get_insns instead of gen_sequence. (fixup_var_refs_1): Likewise and expect insn list from gen_foo. (fixup_memory_subreg): Use get_insns instead of gen_sequence. (fixup_stack_1, purge_addressof_1, expand_main_function, get_arg_pointer_save_area): Likewise. (optimize_bit_field, instantiate_virtual_regs_1, assign_parms, expand_function_end): Use emit_insn_foo. (record_insns, keep_stack_depressed): Work with insn list instead of SEQUENCE, fix comments. * ifcvt.c (noce_emit_store_flag, noce_try_store_flag, noce_try_store_flag_constants, noce_try_store_flag_inc, noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith, noce_try_minmax, noce_try_abs): Use emit_insn_foo. (noce_process_if_block): Use get_insns instead of gen_sequence. * optabs.c (add_equal_note): Work with insn list, fix comments. (expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo. (expand_unop, expand_complex_abs, expand_unop_insn, expand_no_conflict_block): Likewise. (gen_move_insn): Use get_insns instead of gen_sequence. (gen_cond_trap): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. (emit_initial_value_sets): Use emit_insn_foo. * reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise. (fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently now that RTL generators give insn lists. * sibcall.c (replace_call_placeholder): Use emit_insn_foo. * doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns instead of gen_sequence. (doloop_optimize): Work with insn lists instead of SEQUENCE rtl. * explow.c (emit_stack_save, emit_stack_restore): Use get_insns instead of gen_sequence. * loop.c (move_movables, emit_prefetch_instructions, gen_add_mult, check_dbra_loop, gen_load_of_final_value): Likewise. (loop_regs_update): Work with insn list instead of SEQUENCE rtl. (product_cheap_p): Likewise, and add commentary about RTL wastage here. * lcm.c (optimize_mode_switching): Use get_insns instead of gen_sequence. * profile.c (gen_edge_profiler): Likewise. * regmove.c (copy_src_to_dest): Likewise. * reg-stack.c (compensate_edge): Likewise and fix comment. * gcse.c (process_insert_insn): Likewise. (insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl. * jump.c (delete_prior_computation): Update comment. * genemit.c (gen_expand, gen_split, main): Use get_insns instead of gen_sequence, update comments to match. * recog.c (peephole2_optimize): Work with insn lists instead of SEQUENCE rtl. * sched-vis.c (print_pattern): Abort on SEQUENCE. * unroll.c (unroll_loop, find_splittable_givs, final_giv_value): Use get_insns instead of gen_sequence. (copy_loop_body): Likewise and don't emit dummy NOTE. * genrecog.c: Don't mention SEQUENCE rtl in comments. * combine.c (try_combine): Expect insn lists from split generator. * reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by hand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54497 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/6842jakub2002-06-101-1/+6
| | | | | | | | | | * combine.c (combine_simplify_rtx) [SUBREG]: Don't ICE if VOIDmode operand subreg cannot be simplified. * gcc.dg/20020531-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54462 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (init_emit): Add hard registers to regno_reg_rtx.law2002-06-081-3/+3
| | | | | | | | | | | | | | | | | * combine.c (move_deaths): Use regno_reg_rtx for hard regs rather than creating a new register. (distribute_notes): Likewise. * df.c (df_reg_use_gen): Likewise. (df_reg_clobber_gen): Likewise. (df_ref_record): Likewise. * expr.c (use_regs): Likewise. * flow.c (propagate_one_insn): Likewise. (mark_set_1): Likewise. (mark_used_reg): Likewise. * reload.c (emit_reload_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54358 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (emit_prefetch_instructions): Properly place the address computation.hubicka2002-06-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. (set_block_for_insn): Turn into macro. * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. * cfglayout.c (insn_scopes): Kill. (scope_to_insns_initialize): Do not use insn_scopes. (scope_to_insns_finalize): Likewise. (duplicate_insn_chain): Likewise. (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. * cfgrtl.c (basic_block_for_insn): Kill. (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. (create_basic_block_structure): Use reorder_insns. (compute_bb_for_insn): Do not use basic_block_for_insn. (merge_blocks_nomove): Likewise. (update_bb_for_insn): Likewise. (verify_flow_info): Likewise. (set_block_for_insn): Kill. * combine.c (try_combine): Update gen_rtx_INSN call. * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear scopes and BBs. (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. (emit_note_before, emit_note_after, emit_line_note_after, emit_note): Clear BB. (emit_insns_after): Simplify. (emit_copy_of_insn_after): Copy scope. * final.c (final_start_function): Lower scopes. * flow.c (check_function_return_warnings): Do not rely on deleted insn. * integrate.c (copy_insn_list): Cope scopes. * jump.c (duplicate_loop_exit_test): LIkewise; simplify. * loop.c (loop_optimize): Do not care block notes. * print-rtl.c (print_rtx): Print BB. * recog.c (apply_change_group): Simplify. * rtl.c (copy_rtx): Handle 'B'. * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. * rtl.h (Field accessors): Update indexes. * sched-ebb.c (schedule_ebbs): Do not lower notes. * sched-rgn.c (schedule_insns): Likewise. * toplev.c (rest_of_compilation): Lower notes. * unroll.c (unroll_loop): Do not care scoping notes. (copy_loop_body): Copy scopes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54188 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (last_basic_block): Defined as synonym forrakdver2002-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | n_basic_blocks. * cfganal.c (mark_dfs_back_edges, flow_reverse_top_sort_order_compute, flow_depth_first_order_compute, flow_preorder_transversal_compute, flow_dfs_compute_reverse_init): Replaced relevant occurences of n_basic_blocks with last_basic_block. * cfgbuild.c (make_edges): Likewise. * cfgloop.c (flow_loop_scan, flow_loops_find): Likewise. * cfgrtl.c (verify_flow_info, purge_all_dead_edges): Likewise. * combine.c (combine_instructions): Likewise. * df.c (df_alloc, df_analyse_1, df_analyse, iterative_dataflow_sbitmap, iterative_dataflow_bitmap): Likewise. * dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree, calc_idoms, idoms_to_doms): Likewise. * flow.c (update_life_info_in_dirty_blocks, free_basic_block_vars): Likewise. * gcse.c (gcse_main, alloc_gcse_mem, compute_local_properties, compute_hash_table, expr_reaches_here_p, one_classic_gcse_pass, one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p, one_pre_gcse_pass, compute_transpout, delete_null_pointer_checks_1, delete_null_pointer_checks, compute_code_hoist_vbeinout, hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass, compute_store_table, build_store_vectors): Likewise. * haifa-sched.c (sched_init): Likewise. * ifcvt.c (if_convert): Likewise. * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, pre_edge_lcm, compute_available, compute_nearerout, compute_rev_insert_delete, pre_edge_rev_lcm, optimize_mode_switching): Likewise. * predict.c (estimate_probability, process_note_prediction, note_prediction_to_br_prob): Likewise. * profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): Likewise. * recog.c (split_all_insns, peephole2_optimize): Likewise. * regrename.c (copyprop_hardreg_forward): Likewise. * resource.c (init_resource_info): Likewise. * sched-rgn.c (build_control_flow, find_rgns, compute_trg_info, init_regions, schedule_insns): Likewise. * ssa-ccp.c (ssa_const_prop): Likewise. * ssa-dce.c (ssa_eliminate_dead_code): Likewise. * ssa.c (compute_dominance_frontiers, compute_iterated_dominance_frontiers, convert_to_ssa): Likewise. * df.c (df_refs_unlink): Fix FOR_EACH_BB usage (in #if 0'ed code) * gcse.c (alloc_rd_mem, alloc_avail_expr_mem): Use n_blocks for vector sizes consistently. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53924 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (combine_instructions): Do not indent #if foraj2002-05-261-2/+2
| | | | | | | traditional C. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53891 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (simplify_set): Remove an unnecessary subreg.kazu2002-05-251-0/+24
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53873 138bc75d-0d04-0410-961f-82ee72b054a4
* * bb-reorder.c (make_reorder_chain, make_reorder_chain_1):rakdver2002-05-231-113/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FOR_EACH_BB macros to iterate over basic block chain. * cfg.c (clear_edges, clear_bb_flags, dump_flow_info, alloc_aux_for_blocks, clear_aux_for_blocks, alloc_aux_for_edges): Likewise. * cfganal.c (set_edge_can_fallthru_flag, flow_call_edges_add, find_unreachable_blocks, create_edge_list, verify_edge_list, remove_fake_edges, add_noreturn_fake_exit_edges, flow_preorder_transversal_compute, flow_dfs_compute_reverse_execute): Likewise. * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, find_sub_basic_blocks): Likewise. * cfgcleanup.c (try_optimize_cfg, delete_unreachable_blocks): Likewise. * cfglayout.c (record_effective_endpoints, cleanup_unconditional_jumps): Likewise. * cfgloop.c (flow_loops_cfg_dump, flow_loops_find): Likewise. * cfgrtl.c (compute_bb_for_insn, tidy_fallthru_edges, commit_edge_insertions, commit_edge_insertions_watch_calls, print_rtl_with_bb, verify_flow_info, purge_all_dead_edges): Likewise. * combine.c (combine_instructions, reg_dead_at_p): Likewise. * conflict.c (conflict_graph_compute): Likewise. * df.c (df_bitmaps_alloc, df_bitmaps_free, df_alloc, df_analyse_1, df_modified_p, df_refs_unlink, df_dump): Likewise. * dominance.c (calc_dfs_tree, calculate_dominance_info): Likewise. * final.c (compute_alignments): Likewise. * flow.c (update_life_info, update_life_info_in_dirty_blocks, delete_noop_moves, calculate_global_regs_live, allocate_bb_life_data, count_or_remove_death_notes): Likewise. * gcse.c (oprs_unchanged_p, record_last_reg_set_info, compute_hash_table, compute_kill_rd, compute_rd, compute_ae_kill, classic_gcse, compute_transp, cprop, compute_pre_data, compute_transpout, invalidate_nonnull_info, delete_null_pointer_checks_1, delete_null_pointer_checks, compute_code_hoist_vbeinout, hoist_code, compute_ld_motion_mems, compute_store_table, build_store_vectors, store_motion): Likewise. * global.c (global_conflicts, mark_elimination): Likewise. * graph.c (print_rtl_graph_with_bb): Likewise. * haifa-sched.c (sched_init): Likewise. * ifcvt.c (if_convert): Likewise. * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, compute_available, compute_nearerout, compute_rev_insert_delete, optimize_mode_switching): Likewise. * local-alloc.c (local_alloc, update_equiv_regs): Likewise. * predict.c (estimate_probability, note_prediction_to_br_prob, propagate_freq, counts_to_freqs, expensive_function_p, estimate_bb_frequencies): Likewise. * profile.c (instrument_edges, get_exec_counts, compute_branch_probabilities, compute_checksum, branch_prob, find_spanning_tree): Likewise. * recog.c (split_all_insns, peephole2_optimize): Likewise. * reg-stack.c (reg_to_stack, convert_regs_entry, convert_regs): Likewise. * regclass.c (scan_one_insn, regclass): Likewise. * regmove.c (mark_flags_life_zones, regmove_optimize, record_stack_memrefs): Likewise. * regrename.c (regrename_optimize, copyprop_hardreg_forward): Likewise. * reload1.c (reload, reload_combine, fixup_abnormal_edges): Likewise. * resource.c (find_basic_block): Likewise. * sched-ebb.c (schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, build_control_flow, find_single_block_region, find_rgns, schedule_insns) * sibcall.c (optimize_sibling_and_tail_recursive_call) * ssa-ccp.c (optimize_unexecutable_edges, ssa_ccp_df_delete_unreachable_insns): Likewise. * ssa-dce.c (ssa_eliminate_dead_code): Likewise. * ssa.c (find_evaluations, compute_dominance_frontiers_1, rename_block, convert_to_ssa, compute_conservative_reg_partition, compute_coalesced_reg_partition, rename_equivalent_regs, convert_from_ssa): Likewise. * config/ia64/ia64.c (emit_predicate_relation_info, process_epilogue, process_for_unwind_directive): Likewise. * df.c (FOR_ALL_BBS): Removed. * gcse.c (struct null_pointer_info): Type of current_block field changed. (struct reg_avail_info): Type of last_bb field changed. * config/ia64/ia64.c (block_num): Removed. (need_copy_state): Type changed. (last_block): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53804 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (force_to_mode): Use gen_int_mode.jakub2002-05-221-20/+1
| | | | | | | | | Don't clear CONST_INT bits outside of mode. * gcc.dg/20020517-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53750 138bc75d-0d04-0410-961f-82ee72b054a4
* * bb-reorder.c (make_reorder_chain_1): Modified.rakdver2002-05-211-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfganal.c (can_fallthru, flow_call_edges_add, flow_preorder_transversal_compute): Modified. * cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks, find_sub_basic_blocks): Modified. * cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Modified. * cfglayout.c (skip_insns_after_block, fixup_reorder_chain, fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Modified. * cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Modified. * combine.c (this_basic_block): Type changed to basic_block. (combine_instructions, set_nonzero_bits_and_sign_copies, try_combine, nonzero_bits, num_sign_bit_copies, get_last_value_validate, get_last_value, distribute_notes, distribute_links): Modified. * final.c (compute_alignments): Modified. * flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Modified. * function.c (thread_prologue_and_epilogue_insns): Modified. * gcse.c (compute_code_hoist_vbeinout): Modified. * global.c (build_insn_chain): Modified. * ifcvt.c (find_if_block, find_cond_trap): Modified. * predict.c (last_basic_block_p, note_prediction_to_br_prob): Modified. * regmove.c (regmove_optimize): Modified. * resource.c (find_basic_block): Modified. * sched-ebb.c (schedule_ebbs): Modified. * ssa-dce.c (find_control_dependence, find_pdom): Modified. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53695 138bc75d-0d04-0410-961f-82ee72b054a4
* Back out my previous patch; causes bootstrap problem for Ada (86 Linux)dalej2002-05-201-8/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53671 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert "Basic block renumbering removal", and two followup patches.rth2002-05-171-130/+131
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53537 138bc75d-0d04-0410-961f-82ee72b054a4
* Reenable combination of hard regs unless CLASS_LIKELY_SPILLED_P.dalej2002-05-161-6/+8
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53531 138bc75d-0d04-0410-961f-82ee72b054a4