1. 28 Oct, 2015 10 commits
    • fold-const.c (negate_expr_p): Adjust the division case to properly avoid… · b851e3ee
      fold-const.c (negate_expr_p): Adjust the division case to properly avoid introducing undefined overflow.
      
      2015-10-28  Richard Biener  <rguenther@suse.de>
      
      	* fold-const.c (negate_expr_p): Adjust the division case to
      	properly avoid introducing undefined overflow.
      	(fold_negate_expr): Likewise.
      
      From-SVN: r229484
      Richard Biener committed
    • re PR middle-end/65962 (Missed vectorization of strided stores) · 056b0995
      2015-10-28  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/65962
      	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
      	Avoid creating loop carried dependences also for outer loops
      	of the loop a use to replace is in.
      
      	* gcc.dg/vect/vect-62.c: Adjust.
      
      From-SVN: r229481
      Richard Biener committed
    • common.opt (fchecking): New flag controlling flag_checking. · 6d27d749
      2015-10-28  Richard Biener  <rguenther@suse.de>
      
      	* common.opt (fchecking): New flag controlling flag_checking.
      	* passes.c (verify_curr_properties): Drop DEBUG_FUNCTION.
      	* timevar.c (timer::print): Adjust output.
      	* doc/invoke.texi (fchecking): Document.
      
      From-SVN: r229480
      Richard Biener committed
    • re PR middle-end/68067 (Wrong constant folding) · 254b22cc
      2015-10-28  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/68067
      	* fold-const.c (negate_expr_p): We cannot negate plus or minus
      	if overflow is not wrapping.  Likewise multiplication unless
      	one operand is constant and not power of two.
      	(fold_negate_expr): Adjust accordingly.
      
      	* gcc.dg/torture/pr68067-1.c: New testcase.
      	* gcc.dg/torture/pr68067-2.c: Likewise.
      
      From-SVN: r229479
      Richard Biener committed
    • rs6000: p8vector-builtin-8.c test requires int128 · af7ff91b
      For 32-bit targets p8vector_ok does not imply we have int128.
      
      
      2015-10-28  Segher Boessenkool  <segher@kernel.crashing.org>
      
      gcc/testsuite/
      	* gcc.target/powerpc/p8vector-builtin-8.c: Add "target int128".
      
      From-SVN: r229474
      Segher Boessenkool committed
    • rs6000: Fix tests for xvmadd and xvnmsub · c39f02ef
      The patterns involved can create vmadd resp. vnmsub instructions instead.
      This patch changes the testcases to allow those.
      
      
      2015-10-26  Segher Boessenkool  <segher@kernel.crashing.org>
      
      gcc/testsuite/
      	* gcc.target/powerpc/vsx-builtin-2.c: Allow vmadd and vnmsub as well
      	as xvmadd and xvnmsub.
      	* gcc.target/powerpc/vsx-vector-2.c: Allow vmadd as well as xvmadd.
      
      From-SVN: r229473
      Segher Boessenkool committed
    • omp-low.c (struct omp_context): Remove gwv_below, gwv_this fields. · e4834818
      	* omp-low.c (struct omp_context): Remove gwv_below, gwv_this
      	fields.
      	(is_oacc_parallel, is_oacc_kernels): New.
      	(enclosing_target_ctx): May return NULL.
      	(ctx_in_oacc_kernels_region): New.
      	(check_oacc_kernel_gwv): New.
      	(oacc_loop_or_target_p): Delete.
      	(scan_omp_for): Don't calculate gwv mask.  Check parallel clause
      	operands.  Strip reductions fro kernels.
      	(scan_omp_target): Don't calculate gwv mask.
      	(lower_oacc_head_mark, lower_oacc_loop_marker,
      	lower_oacc_head_tail): New.
      	(struct oacc_collapse): New.
      	(expand_oacc_collapse_init, expand_oacc_collapse_vars): New.
      	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
      	Remove OpenACC handling.
      	(expand_oacc_for): New.
      	(expand_omp_for): Call expand_oacc_for.
      	(lower_omp_for): Call lower_oacc_head_tail.
      
      From-SVN: r229472
      Nathan Sidwell committed
    • plugin-nvptx.c (nvptx_exec): Remove check on compute dimensions. · a1c1908b
      	* plugin/plugin-nvptx.c (nvptx_exec): Remove check on compute
      	dimensions.
      
      From-SVN: r229471
      Nathan Sidwell committed
    • [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE · b2b29377
      [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE
      gcc/lto/ChangeLog:
      2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
      	conditionals.
      	(lto_fixup_state): Likewise.
      	(do_whole_program_analysis): Use
      	symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
      	conditionals.
      
      gcc/ChangeLog:
      
      2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* attribs.c (check_attribute_tables): New function, broken out from...
      	(init_attributes): Use it.
      	* cfgcleanup.c (try_optimize_cfg): Use flag_checking, CHECKING_P
      	gcc_checking_assert and checking_* functions to eliminate
      	ENABLE_CHECKING conditionals.
      	* cfgexpand.c (expand_goto, expand_debug_expr): Likewise.
      	(pass_expand::execute): Likewise.
      	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
      	* cgraphunit.c (mark_functions_to_output): Likewise.
      	(cgraph_node::expand_thunk): Likewise.
      	(symbol_table::compile): Likewise.
      	* ddg.c (add_cross_iteration_register_deps): Likewise.
      	(create_ddg_all_sccs): Likewise.
      	* df-core.c (df_finish_pass, df_analyze): Likewise.
      	* diagnostic-core.h: Likewise.
      	* diagnostic.c (diagnostic_report_diagnostic): Likewise.
      	* dominance.c (calculate_dominance_info): Likewise.
      	* dwarf2out.c (add_AT_die_ref): Likewise.
      	(const_ok_for_output_1, mem_loc_descriptor): Likewise.
      	(loc_list_from_tree, gen_lexical_block_die): Likewise.
      	gen_type_die_with_usage, gen_type_die): Likewise.
      	(dwarf2out_decl): Likewise.
      	* emit-rtl.c (verify_rtx_sharing, reorder_insns_nobb): Likewise.
      	* except.c (duplicate_eh_regions): Likewise.
      	* fwprop.c (register_active_defs, update_df_init): Likewise.
      	(fwprop_init, fwprop_done): Likewise.
      	(update_uses): Likewise.
      	* ggc-page.c (ggc_grow): Likewise.
      	* gimplify.c (gimplify_body): Likewise.
      	(gimplify_hasher::equal): Likewise.
      	* graphite-isl-ast-to-gimple.c (graphite_verify): Likewise.
      	* graphite-scop-detection.c (canonicalize_loop_closed_ssa_form):
      	Likewise.
      	* graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Likewise.
      	(rewrite_cross_bb_scalar_deps_out_of_ssa): Likwise.
      	* hash-table.h (::find_empty_slot_for_expand): Likewise.
      	* ifcvt.c (if_convert): Likewise.
      	* ipa-cp.c (ipcp_propagate_stage): Likewise.
      	* ipa-devirt.c (type_in_anonymous_namespace_p): Likewise.
      	(odr_type_p, odr_types_equivalent_p): Likewise.
      	(add_type_duplicate, get_odr_type): Likewise.
      	* ipa-icf.c (sem_item_optimizer::execute): Likewise.
      	(sem_item_optimizer::subdivide_classes_by_equality): Likewise.
      	(sem_item_optimizer::verify_classes): Likewise.
      	(sem_item_optimizer::traverse_congruence_split): Likewise.
      	(sem_item_optimizer::checking_verify_classes): New.
      	* ipa-icf.h (sem_item_optimizer::checking_verify_classes): Add new
      	method.
      	* cfgrtl.c (commit_edge_insertions): Likewise.
      	(fixup_reorder_chain, cfg_layout_finalize): Likewise.
      	(rtl_flow_call_edges_add): Likewise.
      	* cgraph.c (symbol_table::create_edge): Likewise.
      	(cgraph_edge::redirect_call_stmt_to_callee): Likewise.
      	* cgraph.h (symtab_node): Likewise.
      	(symtab_node::checking_verify_symtab_nodes): Define.
      	(cgraph_node::checking_verify_cgraph_nodes): Define.
      	* cfghooks.h (checking_verify_flow_info): Define.
      	* cfgloop.h (checking_verify_loop_structure): Define.
      	* dominance.h (checking_verify_dominators): Define.
      	* et-forest.c: Fix comment.
      	* ipa-inline-analysis.c (compute_inline_parameters): Use flag_checking,
      	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
      	ENABLE_CHECKING conditionals.
      	* ipa-inline-transform.c (save_inline_function_body): Likewise.
      	* ipa-inline.c (inline_small_functions): Likewise.
      	(early_inliner): Likewise.
      	* ipa-inline.h (estimate_edge_growth): Likewise.
      	* ipa-visibility.c (function_and_variable_visibility): Likewise.
      	* ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
      	(ipa_single_use): Likewise.
      	* ira-int.h: Likewise.
      	* ira.c (ira): Likewise.
      	* loop-doloop.c (doloop_optimize_loops): Likewise.
      	* loop-init.c (loop_optimizer_init, fix_loop_structure): Likewise.
      	* loop-invariant.c (move_loop_invariants): Likewise.
      	* lra-assigns.c (lra_assign): Likewise.
      	* lra-constraints.c (lra_constraints): Likewise.
      	* lra-eliminations.c (lra_eliminate): Likewise.
      	* lra-int.h (struct lra_reg): Likewise.
      	* lra-lives.c (check_pseudos_live_through_calls): Likewise.
      	(lra_create_live_ranges_1): Likewise.
      	* lra-remat.c (create_remat_bb_data): Likewise.
      	* lra.c (lra_update_insn_recog_data, restore_scratches): Likewise.
      	(lra): Likewise.
      	(check_rtl): Always define. Remove incorrect guard around
      	extract_constrain_insn call.
      	* lto-cgraph.c (input_cgraph_1: Use flag_checking,
      	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
      	ENABLE_CHECKING conditionals.
      	* lto-streamer-out.c (DFS::DFS): Likewise.
      	(lto_output): Likewise.
      	* lto-streamer.c (lto_streamer_init): Likewise.
      	* omp-low.c (scan_omp_target, expand_omp_taskreg): Likewise.
      	expand_omp_target, execute_expand_omp): Likewise.
      	(lower_omp_target): Likewise.
      	* passes.c (execute_function_todo): Likewise.
      	(execute_todo, execute_one_pass): Likewise.
      	(verify_curr_properties): Always define.
      	* predict.c (tree_estimate_probability: Use flag_checking,
      	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
      	ENABLE_CHECKING conditionals.
      	(propagate_freq): Likewise.
      	* pretty-print.c (pp_format): Likewise.
      	* real.c (real_to_decimal_for_mode): Likewise.
      	* recog.c (split_all_insns): Likewise.
      	* regcprop.c (kill_value_one_regno): Likewise.
      	(copy_value): Likewise.
      	(validate_value_data): Define unconditionally.
      	* reload.c: Fix comment.
      	* timevar.c: Include options.h
      	* tree-ssa.h (checking_verify_ssa): Define.
      	* tree-ssa-loop-manip.h (checking_verify_loop_closed_ssa): Define.
      	* sched-deps.c (CHECK): Remove unused macro.
      	(add_or_update_dep_1, sd_add_dep: Use flag_checking, CHECKING_P
      	gcc_checking_assert and checking_* functions to eliminate
      	ENABLE_CHECKING conditionals.
      	* sel-sched-ir.c (free_regset_pool, tidy_control_flow): Likewise.
      	* sel-sched.c (struct moveop_static_params): Likewise.
      	(find_best_reg_for_expr, move_cond_jump): Likewise.
      	(move_op_orig_expr_not_found): Likewise.
      	(code_motion_process_successors, move_op): Likewise.
      	* ssa-iterators.h (first_readonly_imm_use): Likewise.
      	(next_readonly_imm_use): Likewise.
      	* store-motion.c (compute_store_table): Likewise.
      	* symbol-summary.h (function_summary::function_summary): Likewise.
      	* target.h (cumulative_args_t): Likewise.
      	(get_cumulative_args, pack_cumulative_args): Likewise.
      	* timevar.c: (timer::print): Likewise.
      	* trans-mem.c (ipa_tm_execute): Likewise.
      	* tree-cfg.c (move_stmt_op): Likewise.
      	(move_sese_region_to_fn): Likewise.
      	(gimple_flow_call_edges_add): Likewise.
      	* tree-cfgcleanup.c (cleanup_tree_cfg_noloop, repair_loop_structures):
      	Likewise.
      	* tree-eh.c (remove_unreachable_handlers): Likewise.
      	* tree-if-conv.c (pass_if_conversion::execute): Likewise.
      	* tree-inline.c (expand_call_inline, optimize_inline_calls): Likewise.
      	* tree-into-ssa.c (update_ssa): Likewise.
      	* tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
      	* tree-outof-ssa.c (eliminate_useless_phis, rewrite_trees): Likewise.
      	* tree-parloops.c (pass_parallelize_loops::execute): Likewise.
      	* tree-predcom.c (suitable_component_p): Likewise.
      	* tree-profile.c (gimple_gen_const_delta_profiler): Likewise.
      	* tree-ssa-alias.c (refs_may_alias_p_1): Likewise.
      	* tree-ssa-live.c (verify_live_on_entry): Likewise.
      	* tree-ssa-live.h (register_ssa_partition): Likewise.
      	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Likewise.
      	* tree-ssa-loop-manip.c (add_exit_phi): Likewise.
      	(tree_transform_and_unroll_loop): Likewise.
      	* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
      	* tree-ssa-operands.c (get_expr_operands): Likewise.
      	* tree-ssa-propagate.c (replace_exp_1): Likewise.
      	* tree-ssa-structalias.c (rewrite_constraints): Likewise.
      	* tree-ssa-ter.c (free_temp_expr_table): Likewise.
      	* tree-ssa-threadupdate.c (duplicate_thread_path): Likewise.
      	* tree-ssanames.c (release_ssa_name_fn): Likewise.
      	* tree-stdarg.c (expand_ifn_va_arg): Likewise.
      	* tree-vect-loop-manip.c
      	(slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
      	(slpeel_checking_verify_cfg_after_peeling): Likewise.
      	(vect_do_peeling_for_loop_bound): Likewise.
      	(vect_do_peeling_for_alignment): Likewise.
      	* tree-vrp.c (supports_overflow_infinity): Likewise.
      	(set_value_range): Likewise.
      	* tree.c (free_lang_data_in_cgraph): Likewise.
      	* value-prof.c (gimple_remove_histogram_value): Likewise.
      	(free_hist): Likewise.
      	* var-tracking.c (canonicalize_values_star): Likewise.
      	(compute_bb_dataflow, vt_find_locations, vt_emit_notes): Likewise.
      
      From-SVN: r229470
      Mikhail Maltsev committed
    • Daily bump. · 15517b4e
      From-SVN: r229469
      GCC Administrator committed
  2. 27 Oct, 2015 30 commits
    • internal-fn.def (IFN_GOACC_DIM_SIZE, [...]): New. · 9bd46bc9
      	* internal-fn.def (IFN_GOACC_DIM_SIZE, IFN_GOACC_DIM_POS,
      	IFN_GOACC_LOOP): New.
      	* internal-fn.h (enum ifn_unique_kind): Add IFN_UNIQUE_OACC_FORK,
      	IFN_UNIQUE_OACC_JOIN, IFN_UNIQUE_OACC_HEAD_MARK,
      	IFN_UNIQUE_OACC_TAIL_MARK.
      	(enum ifn_goacc_loop_kind): New.
      	* internal-fn.c (expand_UNIQUE): Add IFN_UNIQUE_OACC_FORK,
      	IFN_UNIQUE_OACC_JOIN cases.
      	(expand_GOACC_DIM_SIZE, expand_GOACC_DIM_POS): New.
      	(expand_GOACC_LOOP): New.
      	* target-insns.def (oacc_dim_pos, oacc_dim_size): New.
      	* omp-low.c: Include gimple-pretty-print.h.
      	(struct oacc_loop): New.
      	(enum oacc_loop_flags): New.
      	(oacc_thread_numbers): New.
      	(oacc_xform_loop): New.
      	(new_oacc_loop_raw, new_oacc_loop_outer, new_oacc_loop,
      	new_oacc_loop_routine, finish_oacc_loop, free_oacc_loop): New,
      	(dump_oacc_loop_part, dump_oacc_loop, debug_oacc_loop): New,
      	(oacc_loop_discover_walk, oacc_loop_sibling_nrevers,
      	oacc_loop_discovery): New.
      	(oacc_loop_xform_head_tail, oacc_loop_xform_loop,
      	oacc_loop_process): New.
      	(oacc_loop_fixed_partitions, oacc_loop_partition): New.
      	(execute_oacc_device_lower): Discover & process loops.  Process
      	internal fns.
      	* target.def (goacc.fork_join): Change sense of hook, clarify
      	documentation.
      	* doc/tm.texi: Regenerated.
      
      From-SVN: r229466
      Nathan Sidwell committed
    • target-insns.def (oacc_fork, oacc_join): Define. · 6e91acf8
      	* target-insns.def (oacc_fork, oacc_join): Define.
      	* target.def (goacc.validate_dims): Adjust doc to avoid warning.
      	(goacc.fork_join): New GOACC hook.
      	* targhooks.h (default_goacc_fork_join): Declare.
      	* omp-low.c (default_goacc_forkjoin): New.
      	* doc/tm.texi.in (TARGET_GOACC_FORK_JOIN): Add.
      	* doc/tm.texi: Regenerate.
      
      From-SVN: r229465
      Nathan Sidwell committed
    • omp-low.c (oacc_init_rediction_array): New. · 0956e359
      	* omp-low.c (oacc_init_rediction_array): New.
      	(oacc_initialize_reduction_data): Initialize array.
      
      From-SVN: r229464
      Nathan Sidwell committed
    • c-parser.c (c_parser_oacc_shape_clause): New. · 765dd391
      	gcc/c/
      	* c-parser.c (c_parser_oacc_shape_clause): New.
      	(c_parser_oacc_simple_clause): New.
      	(c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
      	(OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/loop-shape.c: New test.
      
      Co-Authored-By: Bernd Schmidt <bernds@redhat.com>
      Co-Authored-By: James Norris <jnorris@codesourcery.com>
      Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
      Co-Authored-By: Julian Brown <julian@codesourcery.com>
      Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
      
      From-SVN: r229461
      Cesar Philippidis committed
    • parser.c (cp_parser_omp_clause_name): Add auto, gang, seq, vector, worker. · 0d077441
      	gcc/cp/
      	* parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
      	vector, worker.
      	(cp_parser_oacc_simple_clause): New.
      	(cp_parser_oacc_shape_clause): New.
      	(cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
      	(OACC_LOOP_CLAUSE_MASK): Likewise.
      	* semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
      	worker. Unify the handling of teams, tasks and vector_length with
      	the other loop shape clauses.
      
      	gcc/testsuite/
      	* g++.dg/g++.dg/gomp/pr33372-1.C: Adjust diagnostic.
      	* gcc/testsuite/g++.dg/gomp/pr33372-3.C: Likewise.
      
      From-SVN: r229460
      Nathan Sidwell committed
    • internal-fn.c (expand_UNIQUE): New. · 8ab78162
      	* internal-fn.c (expand_UNIQUE): New.
      	* internal-fn.h (enum ifn_unique_kind): New.
      	* internal-fn.def (IFN_UNIQUE): New.
      	* target-insns.def (unique): Define.
      	* gimple.h (gimple_call_internal_unique_p): New.
      	* gimple.c (gimple_call_same_target_p): Check internal fn
      	uniqueness.
      	* tracer.c (ignore_bb_p): Check for IFN_UNIQUE call.
      	* tree-ssa-threadedge.c
      	(record_temporary_equivalences_from_stmts): Likewise.
      	* tree-cfg.c (gmple_call_initialize_ctrl_altering): Likewise.
      
      From-SVN: r229459
      Nathan Sidwell committed
    • re PR rtl-optimization/67609 (Generates wrong code for SSE2 _mm_load_pd) · a271b387
      PR rtl-opt/67609
      
      	* config/i386/i386.c (ix86_cannot_change_mode_class): Disallow
      	narrowing subregs on SSE and MMX registers.
      	* doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Clarify when subregs that
      	appear to be sub-words of multi-register pseudos must be rejected.
      	* doc/tm.texi: Regenerate.
      testsuite/
      	* gcc.target/i386/pr67609-2.c: New test.
      
      From-SVN: r229458
      Richard Henderson committed
    • [AArch64] PR 68102: Check that operand is REG before checking the REGNO in mov-immediate splitters · 7263fa9f
      	PR target/68102
      	* config/aarch64/aarch64.md (*movsi_aarch64): Check that
      	operands[0] is a reg before taking its REGNO in split condition.
      	(*movdi_aarch64): Likewise.
      
      	* gcc.target/aarch64/pr68102_1.c: New test.
      
      From-SVN: r229455
      Kyrylo Tkachov committed
    • [AArch64] Handle vector float modes properly in aarch64_output_simd_mov_immediate · 0d8e1702
      	* config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate):
      	Handle floating point inner modes properly.
      
      From-SVN: r229454
      Kyrylo Tkachov committed
    • re PR fortran/67933 (ICE for array of a derived type with allocatable class in derived type object) · b7ddd3f1
      2015-01-27  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/67933
      	* gfortran.dg/allocate_with_source_15.f03: New test
      
      From-SVN: r229452
      Paul Thomas committed
    • [PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++ · 33497fd2
      	gcc/fortran/
      	PR fortran/63865
      	* openmp.c (resolve_oacc_cache): Remove function.
      	(gfc_match_oacc_cache): Enable array sections.
      	(resolve_omp_clauses, gfc_resolve_oacc_directive): Change
      	accordingly.
      	* trans-openmp.c (gfc_trans_omp_clauses): Likewise.
      	gcc/testsuite/
      	PR fortran/63865
      	* gfortran.dg/goacc/coarray.f95: Expect the OpenACC cache
      	directive to work.
      	* gfortran.dg/goacc/loop-1.f95: Likewise.
      	* gfortran.dg/goacc/cache-1.f95: Likewise, and extend testing.
      	* gfortran.dg/goacc/cray.f95: Likewise.
      	* gfortran.dg/goacc/parameter.f95: Likewise.
      
      Co-Authored-By: James Norris <jnorris@codesourcery.com>
      
      From-SVN: r229448
      Thomas Schwinge committed
    • 2015-10-27 Alan Hayward <alan.hayward@arm.com> · d34b4814
      	* tree-vect-looop.c
      	(vectorizable_live_operation): Change iterator.
      
      From-SVN: r229447
      Alan Hayward committed
    • re PR fortran/68108 (erroneous error message 'scalar integer expression expected') · 54b96a2d
      2015-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/68108
      	* decl.c (char_len_param_value): Check for REF_ARRAY.
       
      2015-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/68108
      	* gfortran.dg/pr67805_2.f90: New test.
      
      From-SVN: r229446
      Steven G. Kargl committed
    • isl schedule tree · 5affe17f
      Use isl_schedule_node instead of isl_band_list for isl-0.15.
      Passes regtest and bootstrap for isl-0.15 and isl-0.12.2 on x86_64-linux.
      
      gcc/ChangeLog:
      
              * graphite-optimize-isl.c (get_schedule_for_node_st): New callback
                function to schedule based on isl_schedule_node.
              (get_schedule_map_st): New schedule optimizer based on isl_schedule_node.
              (scop_get_domains): New. Return the isl_union_set containing the domains of all the pbbs.
              (optimize_isl): Call the new function get_schedule_map_st for isl-0.15
      
      gcc/testsuite/ChangeLog:
      
              * gcc.dg/graphite/block-0.c: Changed to match pattern.
              * gcc.dg/graphite/interchange-1.c: Same.
              * gcc.dg/graphite/interchange-10.c: Same.
              * gcc.dg/graphite/interchange-11.c: Same.
              * gcc.dg/graphite/interchange-13.c: Same.
              * gcc.dg/graphite/interchange-3.c: Same.
              * gcc.dg/graphite/interchange-4.c: Same.
              * gcc.dg/graphite/interchange-7.c: Same.
              * gcc.dg/graphite/interchange-9.c: Same.
              * gcc.dg/graphite/uns-interchange-9.c: Same.
              * gfortran.dg/graphite/interchange-3.f90: Same.
      
      Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
      
      From-SVN: r229445
      Abderrazek Zaafrani committed
    • Properly handle -fno-plt in ix86_expand_call · 55015e59
      prepare_call_address in calls.c is the wrong place to handle -fno-plt.
      We shoudn't force function address into register and hope that load
      function address via GOT and indirect call via register will be folded
      into indirect call via GOT, which doesn't always happen.  Also non-PIC
      case can only be handled in backend.  Instead, backend should expand
      external function call into indirect call via GOT for -fno-plt.
      
      This patch reverts -fno-plt in prepare_call_address and handles it in
      ix86_expand_call.  Other backends may need similar changes to support
      -fno-plt.  Alternately, we can introduce a target hook to indicate
      whether an external function should be called via register for -fno-plt
      so that i386 backend can disable it in prepare_call_address.
      
      gcc/
      
      	PR target/67215
      	* calls.c (prepare_call_address): Don't handle -fno-plt here.
      	* config/i386/i386.c (ix86_expand_call): Generate indirect call
      	via GOT for -fno-plt.  Support indirect call via GOT for x32.
      	* config/i386/predicates.md (sibcall_memory_operand): Allow
      	GOT memory operand.
      
      gcc/testsuite/
      
      	PR target/67215
      	* gcc.target/i386/pr67215-1.c: New test.
      	* gcc.target/i386/pr67215-2.c: Likewise.
      	* gcc.target/i386/pr67215-3.c: Likewise.
      
      From-SVN: r229444
      H.J. Lu committed
    • re PR tree-optimization/68104 (ice in vect_update_misalignment_for_peel with -O3) · 23a37229
      2015-10-27  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/68104
      	* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Move
      	strided access check ...
      	(vect_compute_data_refs_alignment): ... here.
      
      	* gcc.dg/torture/pr68104.c: New testcase.
      
      From-SVN: r229440
      Richard Biener committed
    • config.gcc: Handle --enable-fdpic. · 1e44e857
      gcc/ChangeLog
      	* config.gcc: Handle --enable-fdpic.
      	* config/sh/constraints.md (Ccl): New constraint.
      	* config/sh/linux.h (SUBTARGET_LINK_EMUL_SUFFIX): Handle -mfdpic.
      	* config/sh/sh-c.c (sh_cpu_cpp_builtins): Add __FDPIC__ and
      	__SH_FDPIC__.
      	* config/sh/sh-mem.cc (expand_block_move): Support FDPIC for calls to
      	library functions.
      	* config/sh/sh-protos.h (function_symbol_result): New struct.
      	(function_symbol): Return function_symbol_result.
      	(sh_get_fdpic_reg_initial_val, sh_load_function_descriptor): New
      	declarations.
      	* config/sh/sh.c (TARGET_ASM_INTEGER, sh_assemble_integer): Implement
      	target hook.
      	(TARGET_CANNOT_FORCE_CONST_MEM, sh_cannot_force_const_mem_p): Likewise.
      	(sh_option_override): Force -fPIC if FDPIC is in effect.
      	(sh_asm_output_addr_const_extra): Add UNSPEC_GOTFUNCDESC and
      	UNSPEC_GOTOFFFUNCDESC cases.
      	(prepare_move_operands): Use FDPIC initial GOT register for
      	TLS-related GOT access; inhibit cross-section address offset constants
      	for FDPIC.
      	(sh_assemble_integer): New function.
      	(sh_cannot_copy_insn_p): Inhibit copying insns that are FDPIC
      	PC-relative call sites.
      	(expand_ashiftrt): Adapt invocation of function_symbol.
      	(sh_expand_prologue): Inhibit PC-relative GOT address load for FDPIC.
      	(nonpic_symbol_mentioned_p): Add cases for UNSPEC_GOTFUNCDESC and
      	UNSPEC_GOTOFFFUNCDESC.
      	(legitimize_pic_address): Resolve function symbols to function
      	descriptors for FDPIC.  Do not use GOT-relative addressing for local
      	data that may be read-only on FDPIC.
      	(sh_emit_storesi, sh_emit_storehi): New functions.
      	(sh_trampoline_init): Generate FDPIC trampolines.
      	(sh_function_ok_for_sibcall): Add TARGET_FDPIC check.
      	(sh_expand_sym_label2reg): Don't assume sibcalls are local.
      	(sh_output_mi_thunk): Generate FDPIC call.
      	(function_symbol): Return function_symbol_result.  For SFUNC_STATIC on
      	FDPIC, generate call site labels to use PC-relative addressing rather
      	than GOT-relative addressing.
      	(sh_conditional_register_usage): Make PIC register fixed and call used
      	when FDPIC is in effect.
      	(sh_legitimate_constant_p): Impose FDPIC constant constraints.
      	(sh_cannot_force_const_mem_p, sh_load_function_descriptor,
      	sh_get_fdpic_reg_initial_val): New functions.
      	* config/sh/sh.h (SUBTARGET_ASM_SPEC, SUBTARGET_LINK_EMUL_SUFFIX):
      	Handle -mfdpic.
      	(FDPIC_SELF_SPECS, SUBTARGET_DRIVER_SELF_SPECS,
      	PIC_OFFSET_TABLE_REG_CALL_CLOBBERED,
      	SH_OFFSETS_MUST_BE_WITHIN_SECTIONS_P): New macros.
      	(DRIVER_SELF_SPECS): Add SUBTARGET_DRIVER_SELF_SPECS and
      	FDPIC_SELF_SPECS.
      	(TRAMPOLINE_SIZE): Select trampoline size for FDPIC.
      	(ASM_PREFERRED_EH_DATA_FORMAT): Add EH format constraints for FDPIC.
      	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Handle FDPIC case.
      	* config/sh/sh.md (UNSPEC_GOTFUNCDESC, UNSPEC_GOTOFFFUNCDESC): New
      	constants.
      	(calli_fdpic, call_valuei_fdpic, sibcalli_fdpic, sibcalli_pcrel_fdpic,
      	sibcall_pcrel_fdpic, sibcall_valuei_fdpic, sibcall_valuei_pcrel_fdpic,
      	sibcall_value_pcrel_fdpic, sym2GOTFUNCDESC, symGOTFUNCDESC2reg,
      	sym2GOTOFFFUNCDESC, symGOTOFFFUNCDESC2reg): New patterns.
      	(udivsi3_i1, udivsi3_i4, udivsi3_i4_single, udivsi3,
      	*divsi_inv_call_combine, divsi3_i4, divsi3_i4_single, divsi3, ashlsi3,
      	ashlsi3_d_call, ashrsi3_n, lshrsi3, lshrsi3_d_call, calli, call_valuei,
      	call, call_value, sibcalli, sibcalli_pcrel, sibcall_pcrel, sibcall,
      	sibcall_valuei, sibcall_valuei_pcrel, sibcall_value_pcrel,
      	sibcall_value, GOTaddr2picreg, symGOT_load, symGOTOFF2reg,
      	block_move_real, block_lump_real, block_move_real_i4,
      	block_lump_real_i4): Add support for FDPIC calls.
      	(mulsi3, ic_invalidate_line, initialize_trampoline, call_pop,
      	call_value_pop): Adjust for new function_symbol signature.
      	* config/sh/sh.opt (-mfdpic): New option.
      	* doc/install.texi (Options specification): Document --enable-fdpic.
      	* doc/invoke.texi (SH Options): Document -mfdpic.
      
      include/ChangeLog:
      	* longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH.
      
      libitm/ChangeLog:
      	* config/sh/sjlj.S (_ITM_beginTransaction): Bypass PLT calling
      	GTM_begin_transaction for compatibility with FDPIC.
      
      Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
      Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
      Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com>
      Co-Authored-By: Rich Felker <dalias@libc.org>
      
      From-SVN: r229438
      Daniel Jacobowitz committed
    • tree-scalar-evolution.c: Handle LSHIFT by constant · 6f907165
      gcc/:
      
      	tree-scalar-evolution.c (interpret_rhs_expr): Handle some LSHIFT_EXPRs
      	as equivalent MULT_EXPRs.
      
      gcc/testsuite/:
      
      	gcc.dg/vect/vect-strided-shift.c: New.
      
      From-SVN: r229437
      Alan Lawrence committed
    • [ARM] PR target/67929 Tighten vfp3_const_double_for_bits checks · 85f5231d
      	PR target/67929
      	* config/arm/arm.c (vfp3_const_double_for_bits): Rewrite.
      	* config/arm/constraints.md (Dp): Update callsite.
      	* config/arm/predicates.md (const_double_vcvt_power_of_two): Likewise.
      
      	* gcc.target/arm/pr67929_1.c: New test.
      
      From-SVN: r229436
      Kyrylo Tkachov committed
    • Move ldexp, scalbn and scalbln folds to match.pd · 86c0733f
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_load_exponent): Rename to...
      	(fold_const_builtin_load_exponent): ...this and only handle
      	constant arguments.
      	(fold_builtin_2): Update accordingly.
      	* match.pd: Add rules previously handled by fold_builtin_load_exponent.
      
      gcc/testsuite/
      	* gcc.dg/torture/builtin-ldexp-1.c: Skip at -O9,
      
      From-SVN: r229434
      Richard Sandiford committed
    • Rename logb and significand folds · 83668c85
      fold_builtin_logb and fold_builtin_significand now only handle
      constant arguments, so this patch renames them to fold_const...,
      to match fold_const_builtin_pow.  The idea is to differentiate
      constant-only folds so that they can be moved to a const_binop-like
      function in future.
      
      The functions also had some unnecessary calls to STRIP_NOPS, which
      I think are left over from code that has already moved to match.pd.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_logb): Rename to...
      	(fold_const_builtin_logb): ...this and remove STRIP_NOPS call.
      	(fold_builtin_significand): Rename to...
      	(fold_const_builtin_significand): ...this and remove STRIP_NOPS call.
      	(fold_builtin_1): Update accordingly.
      
      From-SVN: r229433
      Richard Sandiford committed
    • Move fmin and fmax folds to match.pd · 0122e8e5
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_fmin_fmax): Delete.
      	(fold_builtin_2): Handle constant fmin and fmax arguments here.
      	* match.pd: Add rules previously handled by fold_builtin_fmin_fmax.
      
      From-SVN: r229432
      Richard Sandiford committed
    • [PATCH] [AArch64] Distinct costs for sign and zero extension · 783879e6
      gcc/
      
      	* config/aarch64/aarch64-protos.h (cpu_addrcost_table): Split member
      	for register extension into sign and zero register extension.
      	* config/aarch64/aarch64.c (generic_addrcost_table): Infer values
      	for sign and zero register extension.
      	(cortexa57_addrcost_table): Likewise.
      	(xgene1_addrcost_table): Likewise.
      
      From-SVN: r229431
      Evandro Menezes committed
    • Move min(max...) and max(min...) folds to match.pd · 4a334cba
      This handles both integer and floating-point arguments.  It's needed
      for the follow-on patch to move fmin and fmax to match.pd.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* fold-const.c (fold_minmax): Delete.
      	(fold_binary_loc): Don't call it.
      	* match.pd: Add rules previously handled by fold_minmax.
      
      From-SVN: r229430
      Richard Sandiford committed
    • [multiple changes] · 2f97d24c
      2015-10-27  Tristan Gingold  <gingold@adacore.com>
      
      	* bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
      	New variable.
      	(Gen_Adainit): Call Start_All_CPUs if the above
      	variable is set to true.
      
      2015-10-27  Emmanuel Briot  <briot@adacore.com>
      
      	* adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
      	subprogram.
      
      From-SVN: r229429
      Arnaud Charlet committed
    • Split constant handling out of fold_builtin_fma · 4e48e02b
      Just makes an upcoming patch a bit clearer.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_fma): Remove constant handling.
      	(fold_builtin_3): Handle constant fma arguments here.
      
      From-SVN: r229428
      Richard Sandiford committed
    • Remove constant handling from fold_builtin_{,f}abs · efc8f0d8
      fold_builtin_fabs and fold_builtin_abs had code to handle constant
      arguments, but this simply duplicated what the following fold_build1_loc
      would do for ABS_EXPR.
      
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_fabs): Remove constant handling.
      	(fold_builtin_abs): Likewise.
      
      From-SVN: r229427
      Richard Sandiford committed
    • namet.adb, namet.ads: Minor reformatting. · cd8d6792
      2015-10-27  Hristian Kirtchev  <kirtchev@adacore.com>
      
      	* namet.adb, namet.ads: Minor reformatting.
      
      From-SVN: r229426
      Hristian Kirtchev committed
    • Move copysign folds to match.pd · 461e4145
      Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
      
      gcc/
      	* builtins.c (fold_builtin_copysign): Delete.
      	(fold_builtin_2): Handle constant copysign arguments here.
      	* match.pd: Add rules previously handled by fold_builtin_copysign.
      
      From-SVN: r229425
      Richard Sandiford committed