aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2011-10-06fold-const.c (fold_ternary_loc): Also fold non-constant vector CONSTRUCTORs.Richard Biener1-22/+8
2011-10-06 Richard Guenther <rguenther@suse.de> * fold-const.c (fold_ternary_loc): Also fold non-constant vector CONSTRUCTORs. Make more efficient. * tree-ssa-dom.c (cprop_operand): Don't handle virtual operands. (cprop_into_stmt): Don't propagate into virtual operands. (optimize_stmt): Really dump original statement. From-SVN: r179598
2011-10-06fold-const.c (fold_ternary_loc): Also fold non-constant vector CONSTRUCTORs.Richard Guenther2-16/+17
2011-10-06 Richard Guenther <rguenther@suse.de> * fold-const.c (fold_ternary_loc): Also fold non-constant vector CONSTRUCTORs. Make more efficient. * tree-ssa-dom.c (cprop_operand): Don't handle virtual operands. (cprop_into_stmt): Don't propagate into virtual operands. (optimize_stmt): Really dump original statement. From-SVN: r179597
2011-10-06* config/rx/rx.md (smin3): Revert previous delta.Nick Clifton2-5/+9
From-SVN: r179596
2011-10-06re PR tree-optimization/38884 (missed FRE with __real and __imag)Richard Guenther5-2/+108
2011-10-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/38884 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle partial reads from aggregate SSA names. * gcc.dg/tree-ssa/ssa-fre-34.c: New testcase. * gcc.dg/tree-ssa/ssa-fre-35.c: Likewise. From-SVN: r179593
2011-10-06tree-vect-patterns.c (vect_pattern_recog_1): Add stmts_to_replace argument...Jakub Jelinek2-10/+21
* tree-vect-patterns.c (vect_pattern_recog_1): Add stmts_to_replace argument, truncate it at the beginning instead of allocating there and freeing at the end. (vect_pattern_recog): Allocate stmts_to_replace here and free at end, pass its address to vect_pattern_recog_1. From-SVN: r179592
2011-10-05Add support for lzd and popc instructions on sparc.David S. Miller9-18/+170
gcc/ * config/sparc/sparc.opt (POPC): New option. * doc/invoke.texi: Document it. * config/sparc/sparc.c (sparc_option_override): Enable MASK_POPC by default on Niagara-2 and later. * config/sparc/sparc.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. * config/sparc/sparc.md (SIDI): New mode iterator. (ffsdi2): Delete commented out pattern and comments. (popcount<mode>2, clz<mode>2): New expanders. (*popcount<mode>_sp64, popcountsi_v8plus, popcountdi_v8plus, *clzdi_sp64, clzdi_v8plus, *clzsi_sp64, clzsi_v8plus): New insns. gcc/testsuite/ * gcc.target/sparc/lzd.c: New test. * gcc.target/sparc/popc.c: New test. From-SVN: r179591
2011-10-06Fixes the spacing in ChangeLog entry.Artjoms Sinkarovs1-3/+4
From-SVN: r179589
2011-10-06Fix bconstp-3.c failure in PR50607.Artjoms Sinkarovs3-75/+97
From-SVN: r179588
2011-10-06Daily bump.GCC Administrator1-1/+1
From-SVN: r179586
2011-10-05strlenopt-21.c (dg-options): Remove -fdump-tree-optimized.Uros Bizjak4-1/+9
* gcc.dg/strlenopt-21.c (dg-options): Remove -fdump-tree-optimized. * gcc.dg/ipa/inline-5.c: Cleanup inline ipa dump. * g++.dg/other/final1.C: Cleanup original tree dump. From-SVN: r179579
2011-10-05function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap if ↵Bernd Schmidt2-0/+6
profiling after the prologue. * function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap if profiling after the prologue. From-SVN: r179577
2011-10-05* ChangeLog: Update my previous entry.Uros Bizjak1-1/+4
From-SVN: r179574
2011-10-05vect.exp (VEC_CFLAGS): Append "-fdump-tree-veclower2".Uros Bizjak4-8/+8
* gcc.dg/vect/vect.exp (VEC_CFLAGS): Append "-fdump-tree-veclower2". * gcc.dg/vect/vec-scal-opt.c: Scan and cleanup veclower2 tree dump. * gcc.dg/vect/vec-scal-opt1.c: Ditto. * gcc.dg/vect/vec-scal-opt2.c: Ditto. From-SVN: r179573
2011-10-05re PR tree-optimization/50613 (ICE: tree check: expected ssa_name, have ↵Jakub Jelinek4-4/+40
addr_expr in find_equal_ptrs, at tree-ssa-strlen.c:712 with -foptimize-strlen -fno-tree-ccp) PR tree-optimization/50613 * tree-ssa-strlen.c (find_equal_ptrs): If CASE_CONVERT operand is ADDR_EXPR, fallthru into ADDR_EXPR handling, and if it is neither that not SSA_NAME, give up. * gcc.dg/pr50613.c: New test. From-SVN: r179567
2011-10-05Fix vect-shuffle-* test cases.Richard Henderson9-214/+482
From-SVN: r179566
2011-10-05vect.exp (VEC_CFLAGS): Move initialization after DEFAULT_VECTFLAGS ↵Uros Bizjak2-3/+8
initialization. * gcc.dg/vect/vect.exp (VEC_CFLAGS): Move initialization after DEFAULT_VECTFLAGS initialization. From-SVN: r179565
2011-10-05i386: Rewrite ix86_expand_vshuffle.Richard Henderson4-111/+109
1: Handle TARGET_XOP. 2: Reduce code duplication. 3: Use ASHIFT instead of MULT for scaling. 4: Fix errors in building convert-to-v16qi indicies. 5: Handle v2di without sse4.1. From-SVN: r179564
2011-10-05Fix lower_vec_shuffle.Richard Henderson2-174/+104
1: It can never fail. 2: It should mask the input indicies. From-SVN: r179563
2011-10-05i386.c (distance_non_agu_define): Simplify calculation of "found".Uros Bizjak2-30/+31
* config/i386/i386.c (distance_non_agu_define): Simplify calculation of "found". Simplify return value calculation. (distance_agu_use): Ditto. From-SVN: r179561
2011-10-05re PR bootstrap/50621 (Bootstrap failure)Bernd Schmidt3-3/+17
PR bootstrap/50621 * config/i386/i386.c (ix86_add_cfa_restore_note): Omit notes only if the function was not shrink-wrapped. (ix86_expand_epilogue): Ensure queued cfa_adjust notes are attached to an insn. * function.c (thread_prologue_and_epilogue_insns): Make sure the shrink_wrapped flag is set even if there is no dump file. From-SVN: r179560
2011-10-05rx.opt (mpid): Define.DJ Delorie9-41/+412
* config/rx/rx.opt (mpid): Define. * config/rx/t-rx (MULTILIB_OPTIONS): Add -mpid (MULTILIB_DIRNAMES): Add pid. * config/rx/rx.c (rx_gp_base_regnum_val, rx_pid_base_regnum_val) (rx_num_interrupt_regs): New variable. (rx_gp_base_regnum): New function. Returns the number of the small data area register. (rx_pid_base_regnum): New function. Returns the number of the pid base register. (rx_decl_for_addr): New function. Returns the symbolic part of a MEM. (rx_pid_data_operand): New function. Returns whether an object is in the position independent data area. (rx_legitimize_address): New function. Puts undecided PID objects in the PID data area. (rx_is_legitimate_address): Add support for PID operands. (rx_print_operand_address): Likewise. (rx_print_operand): Likewise. (rx_maybe_pidify_operand): New function. Determine if an operand is suitable for PID addressing. (rx_gen_move_template): Add PID support. (rx_conditional_register_usage): Likewise. (rx_option_override): Initialise rx_num_interrupt_regs. (rx_is_legitimate_constant): Add support for PID constants. (TARGET_LEGITIMIZE_ADDRESS): Define. * config/rx/constraints.md (Rpid): Define. (Rpda): Define. * config/rx/rx.md (UNSPEC_PID_ADDR): Define. (tablejump): Add PID support. (mov<>): Likewise. (mov<>_internal): Likewise. (addsi3): Convert to an expander. Add PID support. (pid_addr): New pattern. * config/rx/rx.h (CPP_SPEC): Define. (ASM_SPEC): Pass -mpid and -mint-register on to assembler. (CASE_VECTOR_PC_RELATIVE): Define. (JUMP_TABLES_IN_TEXT_SECTION): Enable for PID mode. * config/rx/rx-protos.h (rx_maybe_pidify_operand): Prototype. * doc/invoke.texi (RX Options): Document -mpid command line option. Co-Authored-By: Nick Clifton <nickc@redhat.com> From-SVN: r179558
2011-10-05re PR tree-optimization/38885 (missed FRE with BIT_FIELD_REF and vectors)Richard Guenther4-2/+81
2011-10-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/38885 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle partial reads from constants. * gcc.dg/tree-ssa/ssa-fre-33.c: New testcase. From-SVN: r179556
2011-10-05invoke.texi (-fshrink-wrap): Document.Bernd Schmidt11-147/+705
* doc/invoke.texi (-fshrink-wrap): Document. * opts.c (default_options_table): Add it. * common.opt (fshrink-wrap): Add. * function.c (emit_return_into_block): Remove useless declaration. (record_hard_reg_uses_1, record_hard_reg_uses, frame_required_for_rtx, requires_stack_frame_p, gen_return_pattern): New static functions. (emit_return_into_block): New arg simple_p. All callers changed. Use gen_return_pattern. (thread_prologue_and_epilogue_insns): Implement shrink-wrapping. * config/i386/i386.md (return): Expand into a simple_return. (simple_return): New expander): (simple_return_internal, simple_return_internal_long, simple_return_pop_internal_long, simple_return_indirect_internal): Renamed from return_internal, return_internal_long, return_pop_internal_long and return_indirect_internal; changed to use simple_return. * config/i386/i386.c (ix86_expand_epilogue): Adjust to expand simple returns. (ix86_pad_returns): Likewise. * function.h (struct rtl_data): Add member shrink_wrapped. * cfgcleanup.c (outgoing_edges_match): If shrink-wrapped, edges that are not jumps or sibcalls can't be compared. * gcc.target/i386/sw-1.c: New test. From-SVN: r179553
2011-10-05tree-ssa-sccvn.c (vn_get_expr_for): Handle CONSTRUCTOR of vector type.Richard Guenther2-5/+31
2011-10-05 Richard Guenther <rguenther@suse.de> * tree-ssa-sccvn.c (vn_get_expr_for): Handle CONSTRUCTOR of vector type. (simplify_unary_expression): Handle BIT_FIELD_REFs. (try_to_simplify): Handle BIT_FIELD_REFs. From-SVN: r179549
2011-10-05avx256-unaligned-load-3.c (dg-options): Add -mtune=generic.Uros Bizjak3-2/+8
* gcc.target/i386/avx256-unaligned-load-3.c (dg-options): Add -mtune=generic. * gcc.target/i386/avx256-unaligned-store-3.c (dg-options): Ditto. From-SVN: r179548
2011-10-05avr-protos.h (avr_out_addto_sp): New prototype.Georg-Johann Lay4-143/+61
* config/avr/avr-protos.h (avr_out_addto_sp): New prototype. * config/avr/avr.c (avr_out_addto_sp): New function. (adjust_insn_length): Handle ADJUST_LEN_ADDTO_SP. * config/avr/avr.md (adjust_len): Add "addto_sp". (*movhi_sp): Remove insn. (*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): Merge to *addhi3_sp_R. From-SVN: r179544
2011-10-05gimple-fold.c (gimple_fold_stmt_to_constant_1): For ternary ops with an ↵Richard Guenther3-9/+32
embedded expression valueize and fold that as well. 2011-10-05 Richard Guenther <rguenther@suse.de> * gimple-fold.c (gimple_fold_stmt_to_constant_1): For ternary ops with an embedded expression valueize and fold that as well. * tree-ssa-sccvn.c (try_to_simplify): Also allow SSA name results from gimple_fold_stmt_to_constant_1. From-SVN: r179543
2011-10-05rx.md (tablejump): Add missing label.Nick Clifton2-9/+17
* config/rx/rx.md (tablejump): Add missing label. (adddi3_internal): Mark operand 0 as early-clobbered. (smaxsi3): Revert previous delta. (adc_internal): Fix whitespace in generated asm. (adc_flags): Likewise. From-SVN: r179542
2011-10-05expmed.c (expand_mult_highpart_optab): Replace optab_handler with the new ↵Andreas Krebbel2-2/+7
widening_optab_handler. 2011-10-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * expmed.c (expand_mult_highpart_optab): Replace optab_handler with the new widening_optab_handler. From-SVN: r179541
2011-10-05re PR middle-end/50609 (FAIL: gcc.c-torture/execute/pr23135.c compilation, ↵Richard Guenther2-2/+13
-O2 -flto (ICE)) 2011-10-05 Richard Guenther <rguenther@suse.de> PR tree-optimization/50609 * gimple-fold.c (fold_array_ctor_reference): Also handle vector typed constructors. (fold_ctor_reference): Dispatch to fold_array_ctor_reference for vector typed constructors. From-SVN: r179540
2011-10-05i386.c (ix86_emit_binop): New static function.Uros Bizjak2-62/+51
* config/i386/i386.c (ix86_emit_binop): New static function. (ix86_split_lea_for_addr): Use ix86_emit_binop to emit add and shl instructions. (x86_output_mi_thunk): Use ix86_emit_binop to emit add instructions. From-SVN: r179537
2011-10-05builtin-complex-1.c: Use dg-add-options ieee.Uros Bizjak3-27/+29
* gcc.dg/torture/builtin-complex-1.c: Use dg-add-options ieee. From-SVN: r179536
2011-10-04Add support for more sparc VIS 3.0 instructions.David S. Miller10-26/+542
gcc/ * config/sparc/sparc.md (UNSPEC_FHADD, UNSPEC_FHSUB, UNSPEC_XMUL): New unspecs. (muldi3_v8plus): Use output_v8plus_mult. (*naddsf3, *nadddf3, *nmulsf3, *nmuldf3, *nmuldf3_extend): New VIS 3.0 combiner patterns. (fhaddsf_vis, fhadddf_vis, fhsubsf_vis, fhsubdf_vis, fnhaddsf_vis, fnhaddf_vis, umulxhi_vis, *umulxhi_sp64, umulxhi_v8plus, xmulx_vis, *xmulx_sp64, xmulx_v8plus, xmulxhi_vis, *xmulxhi_sp64, xmulxhi_v8plus): New VIS 3.0 builtins patterns. * config/sparc/sparc.c (sparc_vis_init_builtins): Emit new builtins. (output_v8plus_mult): New function. * config/sparc/sparc-protos.h: Declare it. * config/sparc/visintrin.h (__vis_fhadds, __vis_fhaddd, __vis_fhsubs, __vis_fhsubd, __vis_fnhadds, __vis_fnhaddd, __vis_umulxhi, __vis_xmulx, __vis_xmulxhi): New intrinsics. * doc/extend.texi: Document new builtins. gcc/testsuite/ * gcc.target/sparc/fhalve.c: New test. * gcc.target/sparc/fnegop.c: New test. * gcc.target/sparc/xmul.c: New test. From-SVN: r179535
2011-10-05Daily bump.GCC Administrator1-1/+1
From-SVN: r179534
2011-10-04Fix global var initialized to function call with calls as arguments.Ian Lance Taylor1-0/+5
From-SVN: r179529
2011-10-04c-typeck.c (c_build_vec_shuffle_expr): Fix uninitialized variable.Richard Henderson2-7/+11
* c-typeck.c (c_build_vec_shuffle_expr): Fix uninitialized variable. Avoid save_expr unless two_arguments. From-SVN: r179525
2011-10-04re PR fortran/35831 ([F95] Shape mismatch check missing for dummy procedure ↵Janus Weil4-1/+123
argument) 2011-10-04 Janus Weil <janus@gcc.gnu.org> PR fortran/35831 * interface.c (check_dummy_characteristics): Check the array shape. 2011-10-04 Janus Weil <janus@gcc.gnu.org> PR fortran/35831 * gfortran.dg/dummy_procedure_6.f90: New. From-SVN: r179520
2011-10-04mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to _REENTRANT.Ozkan Sezer3-3/+9
2011-10-04 Ozkan Sezer <sezeroz@gmail.com> * config/i386/mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to _REENTRANT. * config/i386/mingw32.h (CPP_SPEC): Likewise. From-SVN: r179511
2011-10-04Small -m{cpu,tune}=native fix under Linux/Sparc.David S. Miller2-1/+6
* config/sparc/driver-sparc.c (cpu_names): Fix string for supersparc under Linux. From-SVN: r179510
2011-10-04re PR middle-end/50604 (verify_gimple failed: type mismatch in binary ↵Jakub Jelinek5-4/+43
expression) PR tree-optimization/50604 * builtins.c (fold_builtin_strcpy, fold_builtin_stpcpy, fold_builtin_strncpy, fold_builtin_stxcpy_chk): Ensure last argument to memcpy has size_type_node type instead of ssizetype. * tree-ssa-strlen.c (handle_builtin_memcpy): Use size_type_node instead of TREE_TYPE (len) as type for newlen. * gcc.dg/pr50604.c: New test. From-SVN: r179508
2011-10-04Maintain order of LTO sectionsAndi Kleen4-36/+78
Currently when reading in LTO sections from ld -r files they can get randomly reordered based on hash tables and random IDs. This causes reordering later when the final code is generated and also makes crashes harder to reproduce. This patch maintains explicit lists based on the input order and uses those lists to preserve that order when starting the rest of the LTO passes. This is the first step to working -fno-toplevel-reorder for LTO. But this needs more changes because the LTO partitioner can still reorder. This add two lists: one for the section and another one for the file_decl_datas. This is needed because the sections are walked twice through different data structures. In addition some code becomes slightly cleaner because we don't need to pass state through abstract callbacks anymore, but can just use direct type safe calls. gcc/lto/: 2011-10-02 Andi Kleen <ak@linux.intel.com> * lto-object.c (lto_obj_add_section_data): Add list. (lto_obj_add_section): Fill in list. (ltoobj_build_section_table): Pass through list. * lto.c (file_data_list): Declare. (create_subid_section_table): Pass arguments directly. Fill in list of file_datas. (lwstate): Delete. (lto_create_files_from_ids): Pass in direct arguments. Don't maintain list. (lto_file_read): Use explicit section and file data lists. (lto_read_all_file_options): Pass in section_list. * lto.h (lto_obj_build_section_table): Add list. (lto_section_slot): Add next. (lto_section_list): Declare. From-SVN: r179505
2011-10-04Don't XFAIL gcc.dg/graphite/interchange-14.c (PR tree-optimization/49662)Rainer Orth4-3/+10
From-SVN: r179503
2011-10-04re PR tree-optimization/50522 (C++ std::valarray vectorization missed ↵Jakub Jelinek2-4/+7
optimization) PR tree-optimization/50522 * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test TYPE_RESTRICT. (ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base unconditionally. From-SVN: r179502
2011-10-04fold-const.c (fold_unary_loc): Don't optimize POINTER_PLUS_EXPR casted to ↵Jakub Jelinek5-0/+44
TYPE_RESTRICT pointer by casting the... * fold-const.c (fold_unary_loc): Don't optimize POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by casting the inner pointer if it isn't TYPE_RESTRICT. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't through casts from non-TYPE_RESTRICT pointer to TYPE_RESTRICT pointer. * gcc.dg/tree-ssa/restrict-4.c: New test. From-SVN: r179500
2011-10-04config.gcc (i[34567]86-*-elf*, [...]): Use i386/t-crtstuff.Joseph Myers2-2/+7
* config.gcc (i[34567]86-*-elf*, x86_64-*-elf*): Use i386/t-crtstuff. From-SVN: r179498
2011-10-04vector-compare-1.c: Fix trailing white spaces.Artjoms Sinkarovs2-10/+16
2011-10-04 Artem Shinkarov <artyom.shinkaroff@gmail.com> * gcc.c-torture/execute/vector-compare-1.c: Fix trailing white spaces. (main): Use __typeof to get result type of comparison. From-SVN: r179497
2011-10-04lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.Jan Hubicka5-5/+43
* lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter. * lto-streamer-in.c (lto_input_toplevel_asms): Stream in order. * lto-streamer-out.c (lto_output_toplevel_asms): Stream out order. * lto-cgraph.c (order_base): New static var. (lto_output_node): Stream in order. (lto_output_varpool_node): Stream out order. (input_node): Stream in order. (input_varpool_node): Stream out order. (input_cgraph_1): Initialize order base; update call of lto_input_toplevel_asms. From-SVN: r179496
2011-10-04re PR target/50566 ([avr]: Add support for better logging similar to -mdeb)Georg-Johann Lay4-45/+103
PR target/50566 * config/avr/avr-protos.h (avr_legitimize_reload_address): New prototype. * config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Copy worker code from here... * config/avr/avr.c (avr_legitimize_reload_address) ...to this new function. Log if avr_log.legitimize_reload_address. From-SVN: r179494
2011-10-04* config/sparc/sparc.c (sparc_fold_builtin): Use a sequence of tests.Eric Botcazou2-18/+21
From-SVN: r179493
2011-10-04longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local variables.Andreas Krebbel2-12/+18
2011-10-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local variables. Fix second operand of DR. Swap inputs for sdiv_qrnnd. From-SVN: r179491