2016-12-30 Sandra Loosemore * doc/cppopts.texi: Reorder table entries to put the most commonly-used options first and debug options last. 2016-12-30 Uros Bizjak * config/i386/i386.md (*testqi_ext_3): Merge insn pattern and corresponding splitter to define_insn_and_split. Use wi::shifted_mask helper function to calculate mask. 2016-12-30 Uros Bizjak * config/i386/predicates.md (ext_register_operand): Do not reject registers without upper parts here. * config/i386/i386.md (extv): Copy registers without upper parts in operand 1 to a pseudo. (extzv): Ditto. (insv): Ditto. 2016-12-30 Gerald Pfeifer * doc/standards.texi (Standards): Remove broken reference to objc.toodarkpark.net and avoid list with now just one item. 2016-12-29 Uros Bizjak PR target/78904 * config/i386/i386.md (*extvqi): Remove insn pattern. (divmodqi4): Update expander to generate QImode zero-extract from AH. 2016-12-29 Michael Meissner * config/rs6000/rs6000.c (altivec_expand_builtin): Fix typos in error messages. 2016-12-29 Gerald Pfeifer * doc/extend.texi (Cilk Plus Builtins): cilkplus.org now uses https by default. * doc/passes.texi (Cilk Plus Transformation): Ditto. * doc/generic.texi (Statements for C++): Ditto, and use @uref. 2016-12-28 Uros Bizjak PR target/78904 * config/i386/constraints.md (Bn): New special memory constraint. * config/i386/predicates.md (norex_memory_operand): New predicate. * config/i386/i386.md (*extzvqi_mem_rex64): New insn pattern and corresponding peephole2 pattern. 2016-12-27 Sandra Loosemore * doc/cppdiropts.texi, doc/cppwarnopts.texi: New files, split from... * doc/cppopts.texi: .... here. * doc/cpp.texi (Invocation): Adjust includes. * doc/invoke.texi (Option Summary): Add missing preprocesor-related options. Adjust sorting and formatting. (Warning Options): Include cppwarnopts.texi. (Preprocessor Options): Add pointers and list the specific preprocessor options from cppopts.texi first instead of last. (Directory Options): Move/merge documentation of -I, -iquote, and -I- to cppdiropts.texi. Include that file here. 2016-12-27 Michael Meissner * config/rs6000/predicates.md (const_0_to_12_operand): Rename predicate and change test from 0..11 to 0..12 to match the semantics of the word extract/insert instructions. Change all callers. (const_0_to_11_operand): Likewise. * config/rs6000/rs6000.c (altivec_expand_builtin): Likewise. * config/rs6000/vsx.md (vextract4b): Likewise. (vextract4b_internal): Likewise. (vinsert4b): Likewise. (vinsert4b_internal): Likewise. (vinsert4b_di): Likewise. (vinsert4b_di_internal): Likewise. * config/rs6000/rs6000.md (zero_extendsi2): Fix offset used in xxextractuw to zero extend the word in the vector registers. (lfiwzx): Likewise. 2016-12-27 Uros Bizjak * config/i386/i386.c (ix86_secondary_reload): Require QImode intermediate for QImode mask register spill only for !TARGET_AVX512DQ. Always use true_regnum to determine operand regno. 2016-12-27 Sandra Loosemore * doc/cppopts.texi: Delete redundant documentation for -x. Move -fno-show-column documentation to... * doc/invoke.texi (Diagnostic Message Formatting Options): ...here. Update the option summary. 2016-12-27 Uros Bizjak * config/i386/i386.md (VI_512): Remove. (vcond): Use VI_AVX512BW mode iterator instead of VI_512. (vcondu): Ditto. 2016-12-27 Jakub Jelinek PR translation/78922 * config/i386/stringop.opt: Remove. 2016-12-27 Uros Bizjak PR target/78904 * config/i386/constraints.md (Bc): New special memory constraint. * config/i386/i386.md (*cmpqi_ext_1, *extvqi, *extzvqi): Use Bc constraint with nonimmediate_operand to allow constant memory operands. (*cmpqi_ext_3, insv_1, addqi_ext_1, *testqi_ext_1, andqi_ext_1) (*qi_ext_1, *xorqi_ext_1_cc): Use Bc constraint with general_operand to allow constant memory operands. 2016-12-27 Alexander Ivchenko * c-family/c.opt (flag_chkp_flexible_struct_trailing_arrays): Add new option. (fchkp-narrow-to-innermost-array): Fix typo. * doc/cpp.texi (flag_chkp_flexible_struct_trailing_arrays): Ditto. * tree-chkp.c (chkp_may_narrow_to_field ): Forbid narrowing when flag_chkp_flexible_struct_trailing_arrays is used and the field is the last array field in the structure. 2016-12-27 Uros Bizjak * config/i386/i386.md (andqi_ext_1): Use general_operand predicate for operand 2. 2016-12-27 Uros Bizjak PR target/78904 * config/i386/i386.md (*cmpqi_ext_1, *extvqi, *extzvqi): Use nonimmediate_operand instead of nonimmediate_x64nomem_operand. (*cmpqi_ext_3, insv_1, addqi_ext_1, *testqi_ext_1, andqi_ext_1) (*qi_ext_1, *xorqi_ext_1_cc): Use general_operand instead of general_x64nomem_operand. * config/i386/predicates.md (nonimmediate_x64nomem_operand): Remove. (general_x64nomem_operand): Ditto. 2016-12-26 Uros Bizjak PR target/78904 * config/i386/i386.md (addqi_ext_1): Canonicalize insn pattern w.r.t. zero_extract RTXes. (*addqi_ext_2): Ditto. (testqi_ext_ccno_0): Canonicalize expander w.r.t. zero_extract RTXes. (testqi_ext_1_ccno): Rename from testqi_ext_ccno_0. (*testqi_ext_0): Merge with *testqi_ext_1. (*testqi_ext_1): Canonicalize insn pattern w.r.t. zero_extract RTXes. Update corresponding splitter. (*testqi_ext_2): Canonicalize insn pattern w.r.t. zero_extract RTXes. (*andqi_ext_0): Merge with *andqi_ext_1. (andqi_ext_1): Canonicalize insn pattern w.r.t. zero_extract RTXes. Rename from *andqi_ext_1. Update corresponding splitter and peephole2 patterns. (*andqi_ext_1_cc): Rename from *andqi_ext_0_cc. (*andqi_ext_2): Canonicalize insn pattern w.r.t. zero_extract RTXes. (*qi_ext_0): Merge with *andqi_ext_1. (*qi_ext_1): Canonicalize insn pattern w.r.t. zero_extract RTXes. Update corresponding splitter. (*qi_ext_2): Canonicalize insn pattern w.r.t. zero_extract RTXes. (xorqi_cc_ext_1): Canonicalize expander w.r.t. zero_extract RTXes. (xorqi_ext_1_cc): Rename from xorqi_cc_ext_1. (*xorqi_cc_ext_1): Canonicalize insn pattern w.r.t. zero_extract RTXes. Update corresponding splitter. (*xorqi_ext_1_cc): Rename from *xorqi_cc_ext_1. (isinfxf2): Update calls to renamed expanders. (isinf2): Ditto. * config/i386/i386.c (ix86_expand_fp_compare): Ditto. (ix86_emit_fp_unordered_jump): Ditto. (ix86_emit_i387_round): Ditto. 2016-12-26 Eric Botcazou * doc/invoke.texi (SPARC options): Add missing documentation for -mlra. * doc/cpp.texi (Invocation): Remove space in command. 2016-12-25 Sandra Loosemore * doc/cpp.texi (Invocation): Revise to indicate that GCC driver options are only documented in the GCC manual. * doc/cppopts.texi: Delete documentation of GCC driver options -o, -Wall, -Wtraditional, -Werror, -Wsystem-headers, -w, -pedantic, -pedantic-errors, -std=, -ansi, --help, --target-help, -v, -version. Update -Wcomment, -Wtrigraphs, -Wundef, -Wexpansion-to-defined, -Wno-endif-labels, -traditional, -traditional-cpp, -trigraphs to merge text previously in GCC manual. * doc/invoke.texi (Option Summary): Move -trigraphs, -traditional, and -traditional-cpp from C dialect options to preprocessor options. (C Dialect Options): Likewise. (Warning Options): Delete documentation of -Wcomment, -Wtrigraphs, -Wexpansion-to-defined, -Wundef, and -Wno-endif-labels. 2016-12-24 Richard Sandiford * tree-core.h (tree_base): Document the meaning of public_flag for SSA names. * tree.h (SSA_NAME_IS_VIRTUAL_OPERAND): New macro. (SET_SSA_NAME_VAR_OR_IDENTIFIER): Record whether the variable is a virtual operand. * gimple-expr.h (virtual_operand_p): Use SSA_NAME_IS_VIRTUAL_OPERAND. 2016-12-22 Prathamesh Kulkarni * tree-pretty-print.c (dump_generic_node): Change dump format for REALPART_EXPR and IMAGPART_EXPR with TDF_GIMPLE. 2016-12-22 Andreas Krebbel * varasm.c (build_constant_desc): Use the alignment of the var decl instead of the original expression. 2016-12-22 Dominik Vogt * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define __S390_ARCH_LEVEL__. 2016-12-22 Martin Liska PR tree-optimization/78886 * tree-ssa-strlen.c (handle_builtin_malloc): Return when LHS is equal to NULL. 2016-12-22 Jakub Jelinek PR bootstrap/78817 * vec.h (vec::safe_grow_cleared): Revert 2016-12-15 change. 2016-12-21 Vladimir Makarov PR rtl-optimization/78580 * ira-costs.c (find_costs_and_classes): Make regno_aclass translated into an allocno class. 2016-12-21 Jakub Jelinek PR bootstrap/78817 * tree-pass.h (make_pass_post_ipa_warn): Declare. * builtins.c (validate_arglist): Adjust get_nonnull_args call. Check for NULL pointer argument to nonnull arg here. (validate_arg): Revert 2016-12-14 changes. * calls.h (get_nonnull_args): Remove declaration. * tree-ssa-ccp.c: Include diagnostic-core.h. (pass_data_post_ipa_warn): New variable. (pass_post_ipa_warn): New class. (pass_post_ipa_warn::execute): New method. (make_pass_post_ipa_warn): New function. * tree.h (get_nonnull_args): Declare. * tree.c (get_nonnull_args): New function. * calls.c (maybe_warn_null_arg): Removed. (maybe_warn_null_arg): Removed. (initialize_argument_information): Revert 2016-12-14 changes. * passes.def: Add pass_post_ipa_warn after first ccp after IPA. 2016-12-21 Pat Haugen PR rtl-optimization/11488 * common/config/rs6000/rs6000-common.c (rs6000_option_optimization_table): Enable -fsched-pressure. * config/rs6000/rs6000.c (TARGET_COMPUTE_PRESSURE_CLASSES): Define target hook. (rs6000_option_override_internal): Set default -fsched-pressure algorithm. (rs6000_compute_pressure_classes): Implement target hook. 2016-12-21 Bill Seurer PR sanitizer/65479 * config/rs6000/rs6000.c (rs6000_option_override_internal): Add -fasynchronous-unwind-tables option when -fsanitize=address is specified. 2016-12-21 Bernd Schmidt PR target/71321 * config/i386/i386.md (lea_general_2b, lea_general_3b): New patterns. * config/i386/predicates.md (const123_operand): New. 2016-12-21 Jakub Jelinek Martin Liska PR driver/78863 * gcc.c (driver::build_option_suggestions): Do not add -fsanitize=all as a suggestion candidate. 2016-12-21 Alexander Monakov PR target/78831 * config/nvptx/nvptx.c (init_softstack_frame): Remove assert. Compute crtl->is_leaf only if unset. Adjust comment. 2016-12-21 Andrew Pinski * match.pd (max:c @0 (plus@2 @0 INTEGER_CST@1)): New Pattern. (min:c @0 (plus@2 @0 INTEGER_CST@1)) : New Pattern. 2016-12-20 James Greenhalgh * common.opt (excess_precision): Tag as SetByCombined. * opts.c (set_fast_math_flags): Also set flag_excess_precision_cmdline. (fast_math_flags_set_p): Also check flag_excess_precision_cmdline. * doc/invoke.texi (-fexcess-precision): Drop text saying the option has no effect under -ffast-math, make it clear that -ffast-math will cause -fexcess-precision=fast by default even for standards compliant modes. (-ffast-math): Document that this sets -fexcess-precision=fast. 2016-12-20 Richard Biener * passes.c (execute_one_pass): Handle going out of SSA w/o hitting pass_startwith. Handle skipping property providers. 2016-12-20 Kyrylo Tkachov PR target/78694 * config/arm/arm.c (dump_minipool): Copy mp->value before emitting it in the minipool to avoid invalid RTL sharing. 2016-12-19 Aaron Sawdey * config/rs6000/rs6000-protos.h (expand_strn_compare): Declare. * config/rs6000/rs6000.md (UNSPEC_CMPB): New unspec. (cmpb3): pattern for generating cmpb. (cmpstrnsi): pattern to expand strncmp (). * config/rs6000/rs6000.opt (mstring-compare-inline-limit): Add a new target option for controlling how much code inline expansion of strncmp() will be allowed to generate. * config/rs6000/rs6000.c (expand_strncmp_align_check): generate code for runtime page crossing check of strncmp () args. (expand_strn_compare): Function to do builtin expansion of strncmp (). 2016-12-19 David Malcolm * print-rtl-function.c (print_rtx_function): Update example in comment to reflect current format. 2016-12-19 Uros Bizjak * config/i386/i386.md (*popcounthi2_1): New insn_and_split pattern. 2016-12-19 Sandra Loosemore * doc/cpp.texi: Clean up anachronistic C99 references and remove discussion of very old GCC versions. (Differences from previous versions): Delete entire section. 2016-12-19 Will Schmidt * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for early expansion of vector multiply and subtract builtins. 2016-12-19 David Malcolm * print-rtl.c (rtx_writer::print_rtx_operand_code_r): For non-virtual pseudos in compact mode, wrap the regno in '<' and '>' rather than using a '%' prefix. * rtl-tests.c (selftest::test_dumping_regs): Update for above change. 2016-12-19 Dominik Vogt PR target/78748 * config/s390/s390.md ("*andc_split_"): Allow memory destination only if it coincides with operand 2. 2016-12-19 Dominik Vogt * combine.c (change_zero_ext): Skip generation of redundant AND. 2016-12-19 Krister Walfridsson * config/netbsd.h (LINK_EH_SPEC): Define. 2016-12-18 Eric Botcazou * lra-constraints.c (process_address): Add forward declaration. (simplify_operand_subreg): In the MEM case, if the adjusted memory reference is not sufficient aligned and the address was invalid, reload the address before reloading the original memory reference. Fix long lines and add a final return for the sake of clarity. 2016-12-17 Jakub Jelinek PR sanitizer/78832 * sanopt.c (sanitize_asan_mark_unpoison): Remove next variable, use continue if gsi_next should be skipped. (sanitize_asan_mark_poison): Remove prev variable, use continue if gsi_prev should be skipped. When removing ASAN_MARK, do gsi_prev first and gsi_remove on a previously made copy of the iterator. 2016-12-17 Andrew Senkevich * config/i386/avx512bwintrin.h: Add new k-mask intrinsics. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512fintrin.h: Ditto. * config/i386/i386-builtin.def (__builtin_ia32_kaddqi, __builtin_ia32_kaddhi, __builtin_ia32_kaddsi, __builtin_ia32_kadddi): New. * config/i386/sse.md (kadd): New. 2016-12-17 Uros Bizjak * config/i386/i386.md (*tzcnt_1): Merge *tzcnt_1_falsedep_1 and *tzcnt_1 to define_insn_and_split pattern. Adjust split condition to split after epilogue_completed. (ctz2): Remove expander. (ctz2): Merge *ctz2_falsedep_1 and *ctz2 to define_insn_and_split pattern. Adjust split condition to split after epilogue_completed. (clz2_lznct): Remove expander. (clz2_lzcnt): Merge *clz2_lzcnt_falsedep_1 and *clz2 to define_insn_and_split pattern. Adjust split condition to split after epilogue_completed. (_): Remove expander. (_): Merge *__falsedep_1 and *_ to define_insn_and_split pattern. Adjust split condition to split after epilogue_completed. (_hi): New insn pattern. (popcount2): Remove expander. (popcount2): Merge *popcount2_falsedep_1 and *popcount2 to define_insn_and_split pattern. Adjust split condition to split after epilogue_completed. (popcounthi2): New insn pattern. 2016-12-16 Kelvin Nilsen * config/rs6000/altivec.md (UNSPEC_CMPRB): New unspec value. (UNSPEC_CMPRB2): New unspec value. (UNSPEC_CMPEQB): New unspec value. (cmprb): New expansion. (*cmprb_internal): New insn. (*setb_internal): New insn. (cmprb2): New expansion. (*cmprb2_internal): New insn. (cmpeqb): New expansion. (*cmpeqb_internal): New insn. * config/rs6000/rs6000-builtin.def (BU_P9_2): New macro. (BU_P9_64BIT_2): Likewise. (BU_P9_OVERLOAD_2): Likewise. (CMPRB): Add byte-in-range built-in function. (CMBRB2): Add byte-in-either-range built-in function. (CMPEQB): Add byte-in-set built-in function. (CMPRB): Add overload support for byte-in-range function. (CMPRB2): Add overload support for byte-in-either-range function. (CMPEQB): Add overload support for byte-in-set built-in function. * config/rs6000/rs6000-c.c (P9_BUILTIN_CMPRB): Macro expansion to define argument types for new builtin. (P9_BUILTIN_CMPRB2): Likewise. (P9_BUILTIN_CMPEQB): Likewise. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rearrange the order of presentation for certain built-in functions (scalar_extract_exp, scalar_extract_sig, scalar_insert_exp) (scalar_cmp_exp_gt, scalar_cmp_exp_lt, scalar_cmp_exp_eq) (scalar_cmp_exp_unordered, scalar_test_data_class) (scalar_test_neg) to improve locality and flow. Document the new __builtin_scalar_byte_in_set, __builtin_scalar_byte_in_range, and __builtin_scalar_byte_in_either_range functions. 2016-12-16 Kyrylo Tkachov * config/aarch64/aarch64.md: New define_split above bswap2. 2016-12-16 Kyrylo Tkachov * config/aarch64/aarch64.md: New define_split above insv. 2016-12-16 Jakub Jelinek PR c/78408 * tree-ssa-ccp.c: Include tree-dfa.h. (optimize_memcpy): New function. (pass_fold_builtins::execute): Use it. Remove useless conditional break after BUILT_IN_VA_*. 2016-12-16 Marek Polacek PR tree-optimization/78819 * tree-vrp.c (find_switch_asserts): Return if the insertion limit is 0. Don't register an assertion if the default case shares a label with another case. 2016-12-16 Wilco Dijkstra * config/arm/arm.md (subsi3_carryin): Add Thumb-2 RSC #0. (arm_negdi2) Rename to negdi2_insn, allow on Thumb-2. * config/arm/thumb2.md (thumb2_negdi2): Remove pattern. 2016-12-16 Wilco Dijkstra * config/arm/arm.c (thumb_core_reg_alloc_order): Swap R12 and R14. 2016-12-16 Claudiu Zissulescu * config/arc/arc.md (call_prof): Remove. (call_value_prof): Likewise. (sibcall_prof): Likewise. (sibcall_value_prof): Likewise. 2016-12-16 Claudiu Zissulescu * config/arc/arc.h (LINK_SPEC): Tidy up. (ENDFILE_SPEC): Likewise. (LIB_SPEC): Likewise. (STARTFILE_SPEC): Include gcrt0 when profiling. (FUNCTION_PROFILER): Use __mcount. * config/arc/arc.opt (mucb-mcount): Remove. * doc/invoke.texi (ARC): Remove mucb-mcount doc. * arc/arc-protos.h (arc_profile_call): Remove. * config/arc/arc.c (write_profile_sections): Likewise. (arc_profile_call): Likewise. (unspec_prof_hash): Likewise. (unspec_prof_htab_eq): Likewise. (arc_legitimate_constant_p): Remove UNSPEC_PROF. (arc_reorg): Remove call to write_profile_sections. * config/arc/arc.md (call): Remove call to arc_profile_call. (call_value): Likewise. (sibcall): Likewise. (sibcall_value): Likewise. (define_constants): Remove UNSPEC_PROF. 2016-12-16 Claudiu Zissulescu * config/arc/arc.md (mulsidi_600): Change to insn_and_split, generate new mul64 insn for core multiplication work. (umulsidi_600): Likewise, but use mulu64 insn. (mul64): New pattern, content taken from old mulsidi_600 insn pattern. (mulu64): Likewise, but using umulsidi_600. (mulsidi3): Remove move to destination, this is now handled by mulsidi_600 insn_and_split. (umulsidi3): Likewise, but using umulsidi_600. 2016-12-16 Richard Biener PR c++/71694 * langhooks-def.h (lhd_unit_size_without_reusable_padding): Declare. (LANG_HOOKS_UNIT_SIZE_WITHOUT_REUSABLE_PADDING): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks_for_types): Add unit_size_without_reusable_padding. * langhooks.c (lhd_unit_size_without_reusable_padding): New. * stor-layout.c (finish_bitfield_representative): Use unit_size_without_reusable_padding langhook to decide on the last representatives size. 2016-12-16 Richard Biener PR middle-end/71632 * expr.c (expand_cond_expr_using_cmove): Bail out early if we end up recursing via TER. 2016-12-15 Martin Sebor PR bootstrap/78817 * vec.h (vec::safe_grow_cleared): Assert a pointer is non-null. 2016-12-15 Andrew Senkevich * config/i386/avx512bwintrin.h: Add new k-mask intrinsics. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512fintrin.h: Ditto. * config/i386/i386-builtin.def (__builtin_ia32_kmovb, __builtin_ia32_kmovd, __builtin_ia32_kmovq): New. (__builtin_ia32_kmov16): Rename to __builtin_ia32_kmovw. * config/i386/sse.md (kmov): New. 2016-12-15 Uros Bizjak * config/i386/i386.md (ffs2): Generate CCCmode flags register for TARGET_BMI. (ffssi2_no_cmove): Ditto. (*tzcnt_1_falsedep_1): New insn_and_split pattern. (*tzcnt_1_falsedep): New insn pattern. (LT_ZCNT): New mode iterator. (lt_zcnt): New mode attribute. (lt_zcnt_type): New mode attribute. (_): Macroize expander from bmi_tzcnt_ and lzcnt_ using LT_ZCNT mode iterator. (*__falsedep_1): Macroize insn from *bmi_tzcnt__falsedep_1 and *lzcnt__falsedep_1 using LT_ZCNT mode iterator. (*__falsedep): Macroize insn from *bmi_tzcnt__falsedep and *lzcnt__falsedep using LT_ZCNT mode iterator. (*_): Macroize insn from *bmi_tzcnt_ and *lzcnt_ using LT_ZCNT mode iterator. * config/i386/i386-builtin.def (__builtin_ia32_tzcnt_u16) (__builtin_ia32_tzcnt_u32, __builtin_ia32_tzcnt_u64, __builtin_ctzs): Update for rename. 2016-12-15 Jakub Jelinek * ipa-cp.c (class ipcp_bits_lattice): Formatting fixes. (print_ipcp_constant_value): Likewise. (ipcp_cloning_candidate_p): Likewise. (ipcp_bits_lattice::get_value_and_mask): Likewise. (ipcp_bits_lattice::meet_with_1): Likewise. (ipcp_bits_lattice::meet_with): Likewise. (initialize_node_lattices): Likewise. (ipcp_lattice::add_value): Likewise. (propagate_vals_accross_pass_through): Renamed to ... (propagate_vals_across_pass_through): ... this function. (propagate_vals_accross_ancestor): Renamed to ... (propagate_vals_across_ancestor): ... this. (propagate_scalar_accross_jump_function): Renamed to ... (propagate_scalar_across_jump_function): ... this. Adjust calls to above functions. (propagate_context_accross_jump_function): Renamed to ... (propagate_context_across_jump_function): ... this. (propagate_bits_accross_jump_function): Renamed to ... (propagate_bits_accross_jump_function): ... this. Formatting fixes. (propagate_vr_accross_jump_function): Renamed to ... (propagate_vr_across_jump_function): ... this. (merge_agg_lats_step): Formatting fixes. (propagate_constants_accross_call): Renamed to ... (propagate_constants_across_call): ... this. Adjust calls to above functions. (ipa_get_indirect_edge_target_1): Formatting fixes. (gather_context_independent_values): Likewise. (estimate_local_effects): Likewise. (add_all_node_vals_to_toposort): Likewise. (propagate_constants_topo): Adjust calls to above functions. (get_replacement_map): Formatting fixes. (dump_profile_updates): Likewise. (update_profiling_info): Likewise. (update_specialized_profile): Likewise. (create_specialized_node): Likewise. (find_more_contexts_for_caller_subset): Likewise. (decide_whether_version_node): Likewise. (identify_dead_nodes): Likewise. (ipcp_decision_stage): Likewise. (ipcp_store_bits_results): Likewise. (ipcp_store_vr_results): Likewise. (ipcp_driver): Likewise. 2016-12-15 David Malcolm PR preprocessor/78680 PR preprocessor/78811 * input.c (struct selftest::lexer_test): Add field m_implicitly_expect_EOF. (selftest::lexer_error_sink): New class. (selftest::lexer_error_sink::s_singleton): New global. (selftest::lexer_test::lexer_test): Initialize new field "m_implicitly_expect_EOF". (selftest::lexer_test::~lexer_test): Conditionalize the check for the EOF token on the new field. (selftest::test_lexer_string_locations_raw_string_unterminated): New function. (selftest::input_c_tests): Call the new test. 2016-12-15 Wilco Dijkstra * config/arm/arm.h (TARGET_BACKTRACE): Use crtl->is_leaf. * config/arm/arm.c (arm_option_check_internal): Improve comment. (thumb_force_lr_save): Use crtl->is_leaf. (arm_get_frame_offsets): Remove comment. Use crtl->is_leaf. (thumb_far_jump_used_p): Remove comment. (arm_frame_pointer_required): Use crtl->is_leaf. 2016-12-15 Jakub Jelinek * doc/extend.texi: Clean up @xref{...} uses. * doc/invoke.texi: Likewise. 2016-12-15 Richard Earnshaw * arm-fpus.def: Add CNAME field to all FPU definitions. * genopt.sh: Use explicit enumeration tags for FPU entries. * arm-tables.opt: Regenerated. * arm.opt (mfpu): Provide initial value. * arm-opts.h (enum fpu_type): Build the enumeration from the list of available FPUs. Add 'auto' entry on the end. * arm.c (arm_configure_build_target): Only do explicit configuration of the FPU features if the selected FPU is not 'auto'. (arm_option_override): Adjust initialization of arm_fpu_index. Emit an error if we have a hard float ABI request, but the processor does not support floating-point. (arm_option_print): Handle -mfpu=auto. (arm_valid_target_attribute_rec): Don't permit fpu=auto in pragmas or function attributes. (arm_identify_fpu_from_isa): Handle effective soft-float when the FPU is automatically detected. * arm-cores.def (arm1136jf-s): Add feature ISA_FP_DBL. (arm1176jzf-s): Likewise. (mpcore): Likewise. (arm1156t2f-s): Likewise. 2016-12-15 Richard Earnshaw * arm-fpus.def (ARM_FPU): Remove features field from all definitions. * arm.h (arm_fpu_feature_set): Delete typedef. (FPU_FL_NONE): Delete. (FPU_FL_NEON): Delete. (FPU_FL_FP16): Delete. (FPU_FL_CRYPTO): Delete. (FPU_FL_DBL): Delete. (FPU_FL_D32): Delete. (FPU_FL_VFPv2): Delete. (FPU_FL_VFPv3): Delete. (FPU_FL_VFPv4): Delete. (FPU_FL_VFPv5): Delete. (FPU_FL_AMRv8): Delete. (FPU_VFPv2): Delete. (FPU_VFPv3): Delete. (FPU_VFPv4): Delete. (FPU_VFPv5): Delete. (FPU_ARMv8): Delete. (FPU_DBL): Delete. (FPU_D32): Delete. (FPU_NEON): Delete. (FPU_CRYPTO): Delete. (FPU_FP16): Delete. (arm_fpu_desc): Delete features field. * arm.c (all_fpus): Don't initialize feature field. 2016-12-15 Richard Earnshaw * arm.c (arm_can_inline_p): Use ISA features for determining inlinability. 2016-12-15 Richard Earnshaw * arm-protos.h (arm_configure_build_target): Change second argument to cl_target_options. * arm.c (arm_configure_build_target): Likewise. (arm_option_restore): Update accordingly. (arm_option_override): Create the target_option_default_node before calling arm_configure_build_target. Use it in call of latter. Resynchronize after all other overrides have been calculated. (arm_valid_target_attribute_tree): Use the target options for reconfiguration. Resynchronize after performing override checks. * arm-c.c (arm_pragma_target_parse): Use target optiosn from cur_tree to reconfigure the build target. 2016-12-15 Richard Earnshaw * arm.h (TARGET_VFPD32): Use arm_active_target. (TARGET_VFP3): Likewise. (TARGET_VFP5): Likewise. (TARGET_VFP_SINGLE): Likewise. (TARGET_VFP_DOUBLE): Likewise. (TARGET_NEON_FP16): Likewise. (TARGET_FP16): Likewise. (TARGET_FMA): Likewise. (TARGET_FPU_ARMV8): Likewise. (TARGET_CRYPTO): Likewise. (TARGET_NEON): Likewise. (TARGET_FPU_FEATURES): Delete. * arm.c (arm_option_check_internal): Check for iwmmxt conflict with Neon using arm_active_target. 2016-12-15 Richard Earnshaw * arm.h (TARGET_FPU_NAME): Delete. * arm.c (arm_identify_fpu_from_isa): New function. (arm_declare_function_name): Use it to get the name for the FPU. 2016-12-15 Richard Earnshaw * arm-protos.h: Include sbitmap.h (arm_configure_build_target): Make public. * arm.c (arm_configure_build_target): Now not static. (arm_valid_target_attribute_rec): Move internal option check to... (arm_valid_target_attribute_tree0: ... here. Also reconfingure the active target. (arm_override_options_after_change): Call arm_configure_build_target. (isa_all_fpubits): Renamed from isa_fpubits. (arm_option_restore): New function. (TARGET_OPTION_RESTORE): Register it. (arm_configure_build_target): Initialize the FPU capability bits in the isa. (arm_option_override): Move the code that forces the setting of the FPU option before the call to arm_configure_build_target. * arm.opt (march): Mark as Save. (mcpu, mtune): Likewise. * arm-c.c (arm_pragma_target_parse): Reconfigure the build target after pragmas change the target options. 2016-12-15 Richard Earnshaw * arm-isa.h (isa_feature): Add bits for VFPv4, FPv5, fp16conv, fP_dbl, fp_d32 and fp_crypto. (ISA_ALL_FPU): Add all the new bits. (ISA_VFPv2, ISA_VFPv3, ISA_VFPv4, ISA_FPv5): New macros. (ISA_FP_ARMv8, ISA_FP_DBL, ISA_FP_D32, ISA_NEON, ISA_CRYPTO): Likewise. * arm-fpus.def: Add ISA features to all FPUs. * arm.h: (arm_fpu_desc): Add new field for ISA bits. * arm.c (all_fpus): Initialize it. * arm-tables.opt: Regenerated. 2016-12-15 Richard Earnshaw * arm.h (FPU_FL_VFPv2) New feature bit. (FPU_FL_VFPv3, FPU_FL_VFPv4, FPU_FL_VFPv5, FPU_FL_ARMv8): Likewise. (FPU_VFPv2, FPU_VFPv3, FPU_VFPv4, FPU_VFPv5, FPU_ARMv8): New helper macros. (FPU_DBL, FPU_D32, FPU_NEON, FPU_CRYPTO, FPU_FP16): Likewise. (TARGET_FPU_REV): Delete. (TARGET_VFP3): Use feature bits. (TARGET_VFP5): Likewise. (TARGET_FMA): Likewise. (TARGET_FPU_ARMV8): Likewise. (struct arm_fpu_desc): Delete rev field. * arm-fpus.def: Delete REV entry, use new feature bits and macros. * arm.c (all_fpus): Delete rev field. 2016-12-15 Richard Earnshaw * arm.h (vfp_reg_type): Delete. (TARGET_FPU_REGS): Delete. (arm_fpu_desc): Delete regs field. (FPU_FL_NONE, FPU_FL_NEON, FPU_FL_FP16, FPU_FL_CRYPTO): Use unsigned values. (FPU_FL_DBL, FPU_FL_D32): Define. (TARGET_VFPD32): Use feature test. (TARGET_VFP_SINGLE): Likewise. (TARGET_VFP_DOUBLE): Likewise. * arm-fpus.def: Update all entries for new feature bits. * arm.c (all_fpus): Update initializer macro. (arm_can_inline_p): Remove test on fpu regs. 2016-12-15 Richard Earnshaw * arm.h (arm_fp_model): Delete. 2016-12-15 Richard Earnshaw * arm-cores.def: Remove FLAGS field from all core definitions. * arm-arches.def: Likewise. * arm-opts.h (enum processor_type): Remove FLAGS parameter from ARM_CORES macro. (arm_arch_core_flags): Likewise, plus ARM_ARCH macro. * arm-protos.h (FL_*): Delete. (arm_feature_set): Delete. (ARM_FSET_*): Delete. * arm.c (struct processors): Delete flags field. (all_cores): Delete FLAGS parameter from macro, don't initialize flags. (all architectures): Likewise. 2016-12-15 Richard Earnshaw * arm-opts.h (struct arm_arch_core_flag): Add new field ISA. Initialize it. (arm_arch_core_flag): Delete flags field. (arm_arch_core_flags): Don't initialize flags field. * common/config/arm/arm-common.c (check_isa_bits_for): New function. (arm_target_thumb_only): Use new isa bits arrays. 2016-12-15 Richard Earnshaw * arm-protos.h (insn_flags): Delete declaration. (arm_arch7ve): Declare. * arm.c (insn_flags): Delete. (arm_arch7ve): New variable. (arm_selected_cpu): Delete. (arm_option_check_internal): Use new ISA bitmap. (arm_option_override_internal): Likewise. (arm_configure_build_target): Declare arm_selected_cpu locally. (arm_option_override): Use new ISA bitmap. Initialize arm_arch7ve. Rearrange variable intialization by general function. * arm.h (TARGET_HAVE_LPAE): Use arm_arch7ve. 2016-12-15 Richard Earnshaw * arm-builtins.c: Include sbitmap.h. (def_mbuiltin): Change first parameter to a flag bit. Use it to test available features in the current target. (struct builtin_description): Change type of feature field. (IWMMXT_BUILTIN): Use the isa_features types. (IWMMXT2_BUILTIN): Likewise. (IWMMXT_BUILTIN2): Likewise. (IWMMXT2_BUILTIN2): Likewise. (CRC32_BUILTIN): Likewise. (CRYPTO_BUILTIN): Likewise. (iwmmx_builtin): Likewise. (iwmmx2_builtin): Likewise. (arm_iwmmxt_builtin): Check for specific feature bits. 2016-12-15 Richard Earnshaw * arm-isa.h (enum isa_feature): Add isa_quirk_cm3_ldrd. (ISA_ALL_QUIRKS): New macro. * arm-cores.def (cortex-m3): Add isa_quirk_cm3_ldrd to isa feature list. * arm.c (isa_quirkbits): New feature-list bitmap. (arm_configure_build_target): Ignore quirk bits when comparing an architecture feature list with a CPU feature list. (arm_option_override): Initialize_isa_quirkbits. If the user has not specified -m[no-]fix-cortex-m3-ldrd, automatically enable the feature if isa_quirk_cm3_ldrd appears in the isa feature list. 2016-12-15 Richard Earnshaw * arm.c (arm_option_override): Use arm_active_target as source of information for arm_base_arch and arm_arch_name. * (arm_file_start): Use arm_active_target for core name. 2016-12-15 Richard Earnshaw * arm.c (arm_selected_tune): Delete static variable. (arm_selected_arch): Likewise. (arm_configure_build_target): Declare local versions of arm_selected target and arm_selected_arch. Initialize more fields in target data structure. (arm_option_override): Use arm_active_target instead of arm_selected_tune and arm_selected_arch. (asm_file_start): Use arm_active_target. 2016-12-15 Richard Earnshaw * arm-protos.h (arm_build_target): New structure. (arm_active_target): Declare it. * arm.c (arm_active_target): New variable. (bitmap_popcount): New function. (feature_count): Delete. (arm_initialize_isa): New function. isa_fpubits): New variable. (arm_configure_build_target): New function. (arm_option_override): Initialize isa_fpubits and arm_active_target.isa. Use arm_configure_build_target. 2016-12-15 Richard Earnshaw * arm-isa.h: New file. * arm-protos.h: Include it. * arm-arches.def: Add new ISA field to all entries. Drop bogus armv8.1-a+crc architecture. * arm-cores.def: Similarly. Group ARMv8 cores by profile. * arm-opts.h (enum processor_type): Adjust for new field. * arm.c (struct processors): New field 'isa_bits'. (all_cores, all_architectures): Initialize new field. * arm-tables.opt: Regenerated. * arm-tune.md: Regenerated. 2016-12-15 Richard Earnshaw * arm-arches.def (ARM_ARCH): Add extra field TUNE_FLAGS, move tuning properties from architectural FLAGS field. * arm-cores.def (ARM_CORE): Likewise. * arm-protos.h (TF_LDSCHED, TF_WBUF, TF_CO_PROC): New macros. (TF_SMALLMUL, TF_STRONG, TF_SCALE, TF_NOMODE32): New macros. (FL_LDSCHED, FL_STRONG, FL_WBUF, FL_SMALLMUL): Delete. (FL_TUNE): Remove deleted elements. (tune_flags): Convert type to unsigned int. * arm.c (struct processors): Add new field tune_flags. (all_cores, all_arches): Initialize it. (arm_option_override): Adapt uses of tune_flags. Use tune_flags for deciding when we should have slow multiply operations. 2016-12-14 Martin Sebor PR middle-end/78519 * gimple-ssa-sprintf.c (format_string): Handle null pointers. (format_directive): Diagnose null pointer arguments. (pass_sprintf_length::handle_gimple_call): Diagnose null destination pointers. Correct location of null format string in diagnostics. 2016-12-14 David Malcolm * Makefile.in (SELFTEST_FLAGS): Add path argument to -fself-test. (s-selftest): Add dependency on the selftests data directory. * common.opt (fself-test): Rename to... (fself-test=): ...this, documenting the meaning of the argument. * selftest-run-tests.c (along): Likewise. * selftest-run-tests.c: Include "options.h". (selftest::run_tests): Initialize selftest::path_to_selftest_files from flag_self_test. * selftest.c (selftest::path_to_selftest_files): New global. (selftest::locate_file): New function. (selftest::test_locate_file): New function. (selftest_c_tests): Likewise. (selftest::selftest_c_tests): Call test_locate_file. * selftest.h (selftest::locate_file): New decl. (selftest::path_to_selftest_files): New decl. 2016-12-14 Andrew Pinski * config/aarch64/aarch64-cores.def: Add -1 as the variant to all of the cores. (thunderx): Update to include LSE by default. (thunderxt88p1): New core. (thunderxt88): New core. (thunderxt81): New core. (thunderxt83): New core. * config/aarch64/driver-aarch64.c (struct aarch64_core_data): Add variant field. (ALL_VARIANTS): New define. (AARCH64_CORE): Support VARIANT operand. (cpu_data): Likewise. (host_detect_local_cpu): Parse variant field of /proc/cpuinfo. Combine the arch and single core case and support variant searching. * common/config/aarch64/aarch64-common.c (AARCH64_CORE): Add VARIANT operand. * config/aarch64/aarch64-opts.h (AARCH64_CORE): Likewise. * config/aarch64/aarch64.c (AARCH64_CORE): Likewise. * config/aarch64/aarch64.h (AARCH64_CORE): Likewise. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi (AARCH64/mtune): Document thunderxt88, thunderxt88p1, thunderxt81, thunderxt83 as available options. 2016-12-14 Martin Jambor * omp-offload.c: Fix coding style. * omp-expand.c: Likewise. * omp-general.c: Likewise. * omp-grid.c: Likewise. * omp-low.c: Fix coding style of parts touched by the previous splitting patch. 2016-12-14 Martin Jambor * omp-general.h: New file. * omp-general.c: New file. * omp-expand.h: Likewise. * omp-expand.c: Likewise. * omp-offload.h: Likewise. * omp-offload.c: Likewise. * omp-grid.c: Likewise. * omp-grid.c: Likewise. * omp-low.h: Include omp-general.h and omp-grid.h. Removed includes of params.h, symbol-summary.h, lto-section-names.h, cilk.h, tree-eh.h, ipa-prop.h, tree-cfgcleanup.h, cfgloop.h, except.h, expr.h, stmt.h, varasm.h, calls.h, explow.h, dojump.h, flags.h, tree-into-ssa.h, tree-cfg.h, cfganal.h, alias.h, emit-rtl.h, optabs.h, expmed.h, alloc-pool.h, cfghooks.h, rtl.h and memmodel.h. (omp_find_combined_for): Declare. (find_omp_clause): Renamed to omp_find_clause and moved to omp-general.h. (free_omp_regions): Renamed to omp_free_regions and moved to omp-expand.h. (replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved to omp-general.h. (set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to omp-general.h. (build_oacc_routine_dims): Renamed to oacc_build_routine_dims and moved to omp-general.h. (get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to omp-general.h. (oacc_fn_attrib_kernels_p): Moved to omp-general.h. (get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to omp-general.c. (omp_expand_local): Moved to omp-expand.h. (make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to omp-expand.h. (omp_finish_file): Moved to omp-offload.h. (default_goacc_validate_dims): Renamed to oacc_default_goacc_validate_dims and moved to omp-offload.h. (offload_funcs, offload_vars): Moved to omp-offload.h. * omp-low.c: Include omp-general.h, omp-offload.h and omp-grid.h. (omp_region): Moved to omp-expand.c. (omp_for_data_loop): Moved to omp-general.h. (omp_for_data): Likewise. (oacc_loop): Moved to omp-offload.c. (oacc_loop_flags): Moved to omp-general.h. (offload_funcs, offload_vars): Moved to omp-offload.c. (root_omp_region): Moved to omp-expand.c. (omp_any_child_fn_dumped): Likewise. (find_omp_clause): Renamed to omp_find_clause and moved to omp-general.c. (is_combined_parallel): Moved to omp-expand.c. (is_reference): Renamed to omp_is_reference and and moved to omp-general.c. (adjust_for_condition): Renamed to omp_adjust_for_condition and moved to omp-general.c. (get_omp_for_step_from_incr): Renamed to omp_get_for_step_from_incr and moved to omp-general.c. (extract_omp_for_data): Renamed to omp_extract_for_data and moved to omp-general.c. (workshare_safe_to_combine_p): Moved to omp-expand.c. (omp_adjust_chunk_size): Likewise. (get_ws_args_for): Likewise. (get_base_type): Removed. (dump_omp_region): Moved to omp-expand.c. (debug_omp_region): Likewise. (debug_all_omp_regions): Likewise. (new_omp_region): Likewise. (free_omp_region_1): Likewise. (free_omp_regions): Renamed to omp_free_regions and moved to omp-expand.c. (find_combined_for): Renamed to omp_find_combined_for, made global. (build_omp_barrier): Renamed to omp_build_barrier and moved to omp-general.c. (omp_max_vf): Moved to omp-general.c. (omp_max_simt_vf): Likewise. (gimple_build_cond_empty): Moved to omp-expand.c. (parallel_needs_hsa_kernel_p): Likewise. (expand_omp_build_assign): Moved declaration to omp-expand.c. (expand_parallel_call): Moved to omp-expand.c. (expand_cilk_for_call): Likewise. (expand_task_call): Likewise. (vec2chain): Likewise. (remove_exit_barrier): Likewise. (remove_exit_barriers): Likewise. (optimize_omp_library_calls): Likewise. (expand_omp_regimplify_p): Likewise. (expand_omp_build_assign): Likewise. (expand_omp_taskreg): Likewise. (oacc_collapse): Likewise. (expand_oacc_collapse_init): Likewise. (expand_oacc_collapse_vars): Likewise. (expand_omp_for_init_counts): Likewise. (expand_omp_for_init_vars): Likewise. (extract_omp_for_update_vars): Likewise. (expand_omp_ordered_source): Likewise. (expand_omp_ordered_sink): Likewise. (expand_omp_ordered_source_sink): Likewise. (expand_omp_for_ordered_loops): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (find_phi_with_arg_on_edge): Likewise. (expand_omp_for_static_chunk): Likewise. (expand_cilk_for): Likewise. (expand_omp_simd): Likewise. (expand_omp_taskloop_for_outer): Likewise. (expand_omp_taskloop_for_inner): Likewise. (expand_oacc_for): Likewise. (expand_omp_for): Likewise. (expand_omp_sections): Likewise. (expand_omp_single): Likewise. (expand_omp_synch): Likewise. (expand_omp_atomic_load): Likewise. (expand_omp_atomic_store): Likewise. (expand_omp_atomic_fetch_op): Likewise. (expand_omp_atomic_pipeline): Likewise. (expand_omp_atomic_mutex): Likewise. (expand_omp_atomic): Likewise. (oacc_launch_pack): and moved to omp-general.c, made public. (OACC_FN_ATTRIB): Likewise. (replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved to omp-general.c. (set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to omp-general.c. (build_oacc_routine_dims): Renamed to oacc_build_routine_dims and moved to omp-general.c. (get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to omp-general.c. (oacc_fn_attrib_kernels_p): Moved to omp-general.c. (oacc_fn_attrib_level): Moved to omp-offload.c. (get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to omp-general.c. (get_oacc_ifn_dim_arg): Renamed to oacc_get_ifn_dim_arg and moved to omp-general.c. (mark_loops_in_oacc_kernels_region): Moved to omp-expand.c. (grid_launch_attributes_trees): Likewise. (grid_attr_trees): Likewise. (grid_create_kernel_launch_attr_types): Likewise. (grid_insert_store_range_dim): Likewise. (grid_get_kernel_launch_attributes): Likewise. (get_target_argument_identifier_1): Likewise. (get_target_argument_identifier): Likewise. (get_target_argument_value): Likewise. (push_target_argument_according_to_value): Likewise. (get_target_arguments): Likewise. (expand_omp_target): Likewise. (grid_expand_omp_for_loop): Moved to omp-grid.c. (grid_arg_decl_map): Likewise. (grid_remap_kernel_arg_accesses): Likewise. (grid_expand_target_grid_body): Likewise. (expand_omp): Renamed to omp_expand and moved to omp-expand.c. (build_omp_regions_1): Moved to omp-expand.c. (build_omp_regions_root): Likewise. (omp_expand_local): Likewise. (build_omp_regions): Likewise. (execute_expand_omp): Likewise. (pass_data_expand_omp): Likewise. (pass_expand_omp): Likewise. (make_pass_expand_omp): Likewise. (pass_data_expand_omp_ssa): Likewise. (pass_expand_omp_ssa): Likewise. (make_pass_expand_omp_ssa): Likewise. (grid_lastprivate_predicate): Renamed to omp_grid_lastprivate_predicate and moved to omp-grid.c, made public. (grid_prop): Moved to omp-grid.c. (GRID_MISSED_MSG_PREFIX): Likewise. (grid_safe_assignment_p): Likewise. (grid_seq_only_contains_local_assignments): Likewise. (grid_find_single_omp_among_assignments_1): Likewise. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Likewise. (grid_parallel_clauses_gridifiable): Likewise. (grid_inner_loop_gridifiable_p): Likewise. (grid_dist_follows_simple_pattern): Likewise. (grid_gfor_follows_tiling_pattern): Likewise. (grid_call_permissible_in_distribute_p): Likewise. (grid_handle_call_in_distribute): Likewise. (grid_dist_follows_tiling_pattern): Likewise. (grid_target_follows_gridifiable_pattern): Likewise. (grid_remap_prebody_decls): Likewise. (grid_var_segment): Likewise. (grid_mark_variable_segment): Likewise. (grid_copy_leading_local_assignments): Likewise. (grid_process_grid_body): Likewise. (grid_eliminate_combined_simd_part): Likewise. (grid_mark_tiling_loops): Likewise. (grid_mark_tiling_parallels_and_loops): Likewise. (grid_process_kernel_body_copy): Likewise. (grid_attempt_target_gridification): Likewise. (grid_gridify_all_targets_stmt): Likewise. (grid_gridify_all_targets): Renamed to omp_grid_gridify_all_targets and moved to omp-grid.c, made public. (make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to omp-expand.c. (add_decls_addresses_to_decl_constructor): Moved to omp-offload.c. (omp_finish_file): Likewise. (oacc_thread_numbers): Likewise. (oacc_xform_loop): Likewise. (oacc_default_dims, oacc_min_dims): Likewise. (oacc_parse_default_dims): Likewise. (oacc_validate_dims): Likewise. (new_oacc_loop_raw): Likewise. (new_oacc_loop_outer): Likewise. (new_oacc_loop): Likewise. (new_oacc_loop_routine): Likewise. (finish_oacc_loop): Likewise. (free_oacc_loop): Likewise. (dump_oacc_loop_part): Likewise. (dump_oacc_loop): Likewise. (debug_oacc_loop): Likewise. (oacc_loop_discover_walk): Likewise. (oacc_loop_sibling_nreverse): Likewise. (oacc_loop_discovery): Likewise. (oacc_loop_xform_head_tail): Likewise. (oacc_loop_xform_loop): Likewise. (oacc_loop_process): Likewise. (oacc_loop_fixed_partitions): Likewise. (oacc_loop_auto_partitions): Likewise. (oacc_loop_partition): Likewise. (default_goacc_fork_join): Likewise. (default_goacc_reduction): Likewise. (execute_oacc_device_lower): Likewise. (default_goacc_validate_dims): Likewise. (default_goacc_dim_limit): Likewise. (pass_data_oacc_device_lower): Likewise. (pass_oacc_device_lower): Likewise. (make_pass_oacc_device_lower): Likewise. (execute_omp_device_lower): Likewise. (pass_data_omp_device_lower): Likewise. (pass_omp_device_lower): Likewise. (make_pass_omp_device_lower): Likewise. (pass_data_omp_target_link): Likewise. (pass_omp_target_link): Likewise. (find_link_var_op): Likewise. (pass_omp_target_link::execute): Likewise. (make_pass_omp_target_link): Likewise. * Makefile.in (OBJS): Added omp-offload.o, omp-expand.o, omp-general.o and omp-grid.o. (GTFILES): Added omp-offload.h, omp-offload.c and omp-expand.c, removed omp-low.h. * gimple-fold.c: Include omp-general.h instead of omp-low.h. (fold_internal_goacc_dim): Adjusted calls to get_oacc_ifn_dim_arg and get_oacc_fn_dim_size to use their new names. * gimplify.c: Include omp-low.h. (omp_notice_variable): Adjust the call to get_oacc_fn_attrib to use its new name. (gimplify_omp_task): Adjusted calls to find_omp_clause to use its new name. (gimplify_omp_for): Likewise. * lto-cgraph.c: Include omp-offload.h instead of omp-low.h. * toplev.c: Include omp-offload.h instead of omp-low.h. * tree-cfg.c: Include omp-general.h instead of omp-low.h. Also include omp-expand.h. (make_edges_bb): Adjusted the call to make_gimple_omp_edges to use its new name. (make_edges): Adjust the call to free_omp_regions to use its new name. * tree-parloops.c: Include omp-general.h. (create_parallel_loop): Adjusted the call to set_oacc_fn_attrib to use its new name. (parallelize_loops): Adjusted the call to get_oacc_fn_attrib to use its new name. * tree-ssa-loop.c: Include omp-general.h instead of omp-low.h. (gate_oacc_kernels): Adjusted the call to get_oacc_fn_attrib to use its new name. * tree-vrp.c: Include omp-general.h instead of omp-low.h. (extract_range_basic): Adjusted calls to get_oacc_ifn_dim_arg and get_oacc_fn_dim_size to use their new names. * varpool.c: Include omp-offload.h instead of omp-low.h. * gengtype.c (open_base_files): Replace omp-low.h with omp-offload.h in ifiles. * config/nvptx/nvptx.c: Include omp-general.c. (nvptx_expand_call): Adjusted the call to get_oacc_fn_attrib to use its new name. (nvptx_reorg): Likewise. (nvptx_record_offload_symbol): Likewise. 2016-12-14 Martin Sebor PR middle-end/78786 * gimple-ssa-sprintf.c (target_dir_max): New macro. (get_mpfr_format_length): New function. (format_integer): Use HOST_WIDE_INT instead of int. (format_floating_max): Same. (format_floating): Call get_mpfr_format_length. (format_directive): Use target_dir_max. 2016-12-14 Jakub Jelinek PR target/78791 * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_STV_TEMP. * config/i386/i386.c (dimode_scalar_chain::make_vector_copies, dimode_scalar_chain::convert_reg): Use SLOT_STV_TEMP instead of SLOT_TEMP. 2016-12-14 Uros Bizjak PR target/59874 * config/i386/i386-builtin.def: Add __builtin_clzs and __builtin_ctzs. (ix86_fold_builtin): Handle IX86_BUILTIN_CTZS and IX86_BUILTIN_CLZS. * config/i386/i386.md (*ctzhi2): New insn_and_split pattern. (*clzhi2): Ditto. 2016-12-14 Jakub Jelinek PR debug/77844 * valtrack.c: Include rtl-iter.h. (struct rtx_subst_pair): Add insn field. (propagate_for_debug_subst): If pair->to contains at least 2 regs, create a DEBUG_INSN with a debug temp before pair->insn and replace from with the debug temp instead of pair->to. (propagate_for_debug): Initialize p.insn. * combine.c (insn_uid_check): New inline function. (INSN_COST, LOG_LINKS): Use it instead of INSN_UID. (find_single_use, combine_instructions, cant_combine_insn_p, try_combine): Use NONDEBUG_INSN_P instead of INSN_P. 2016-12-14 Martin Sebor PR c/17308 * builtin-attrs.def (ATTR_NONNULL_1_1, ATTR_NONNULL_1_2): Defined. (ATTR_NONNULL_1_3, ATTR_NONNULL_1_4, ATTR_NONNULL_1_5): Same. (ATTR_NOTHROW_NONNULL_1_1, ATTR_NOTHROW_NONNULL_1_2): Same. (ATTR_NOTHROW_NONNULL_1_3, ATTR_NOTHROW_NONNULL_1_4): Same. (ATTR_NOTHROW_NONNULL_1_5): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_1_2): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_2_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_2_3): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_3_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_3_4): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_4_0): Same. (ATTR_NONNULL_1_FORMAT_PRINTF_4_5): Same. * builtins.c (validate_arg): Add argument. Treat null pointers passed to nonnull arguments as invalid. (validate_arglist): Same. * builtins.def (fprintf, fprintf_unlocked): Add nonnull attribute. (printf, printf_unlocked, sprintf. vfprintf, vsprintf): Same. (__sprintf_chk, __vsprintf_chk, __fprintf_chk, __vfprintf_chk): Same. * calls.c (get_nonnull_ags, maybe_warn_null_arg): New functions. (initialize_argument_information): Diagnose null pointers passed to arguments declared nonnull. * calls.h (get_nonnull_args): Declared. 2016-12-14 Michael Meissner * config/rs6000/rs6000.c (rs6000_split_vec_extract_var): On ISA 3.0/power9, add support to use the VEXTU{B,H,W}{L,R}X extract instructions. * config/rs6000/vsx.md (VSr2): Add IEEE 128-bit floating point type constraint registers. (VSr3): Likewise. (FL_CONV): New mode iterator for binary floating types that have a direct conversion from 64-bit integer to floating point. (vsx_extract__p9): Add support for the ISA 3.0/power9 VEXTU{B,H,W}{L,R}X extract instructions. (vsx_extract__p9 splitter): Add splitter to load up the extract byte position into the GPR if we are using the VEXTU{B,H,W}{L,R}X extract instructions. (vsx_extract__di_p9): Support extracts to GPRs. (vsx_extract__store_p9): Support extracting to GPRs so that we can use reg+offset address instructions. (vsx_extract__var): Support extracts to GPRs. (vsx_extract___var): New combiner insn to combine vector extracts with zero_extend. (vsx_ext__fl_): Optimize extracting a small integer vector element and converting it to a floating point type. (vsx_ext__ufl_): Likewise. (UNSPEC_XXEXTRACTUW): New unspec. (UNSPEC_XXINSERTW): Likewise. (vextract4b): Add support for the vec_vextract4b built-in function. (vextract4b_internal): Likewise. (vinsert4b): Add support for the vec_insert4b built-in function. Include both a version that inserts element 1 from a V4SI object and one that inserts a DI object. (vinsert4b_internal): Likewise. (vinsert4b_di): Likewise. (vinsert4b_di_internal): Likewise. * config/rs6000/predicates.md (const_0_to_11_operand): New predicate, match 0..11. * config/rs6000/rs6000-builtin.def (BU_P9V_VSX_3): Set built-in type to ternary, not binary. (BU_P9V_64BIT_VSX_3): Likewise. (P9V_BUILTIN_VEXTRACT4B): Add support for vec_vinsert4b and vec_extract4b non-overloaded built-in functions. (P9V_BUILTIN_VINSERT4B): Likewise. (P9V_BUILTIN_VINSERT4B_DI): Likewise. (P9V_BUILTIN_VEC_VEXTULX): Move to section that adds 2 operand ISA 3.0 built-in functions. (P9V_BUILTIN_VEC_VEXTURX): Likewise. (P9V_BUILTIN_VEC_VEXTRACT4B): Add support for overloaded vec_insert4b and vec_extract4 built-in functions. (P9V_BUILTIN_VEC_VINSERT4B): Likewise. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded support for vec_vinsert4b and vec_extract4b. * config/rs6000/rs6000.c (altivec_expand_builtin): Add checks for the vec_insert4b and vec_extract4b byte number being a constant in the range 0..11. * config/rs6000/altivec.h (vec_vinsert4b): Support vec_vinsert4b and vec_extract4b built-in functions. * doc/extend.doc (PowerPC VSX built-in functions): Document vec_insert4b and vec_extract4b. 2016-12-14 Martin Liska * gimple-pretty-print.c (dump_probability): New function. (dump_edge_probability): Use the function. (dump_gimple_label): Likewise. (dump_gimple_bb_header): Likewise. 2016-12-14 Prathamesh Kulkarni Jakub Jelinek * tree-ssa-strlen.c (fold_strstr_to_memcmp): New function. (strlen_optimize_stmt): Call fold_strstr_to_memcmp. 2016-12-14 Eric Botcazou * lra-constraints.c (process_address_1): Do not attempt to decompose addresses for MEMs that satisfy fixed-form constraints. 2016-12-14 Richard Biener PR tree-optimization/78788 * tree-vrp.c (set_value_range): Allow [-INF(OVF), +INF(OVF)]. (set_and_canonicalize_value_range): Do not drop the above to VARYING. 2016-12-13 Bill Schmidt * config/rs6000/rs600.c (rs6000_builtin_vectorization_cost): Adjust unaligned load cost. 2016-12-13 Uros Bizjak PR target/78794 * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain): Calculate additional gain for andnot for targets without BMI. 2016-12-13 Carl Love * config/rs6000/rs6000-c.c: Add built-in support for vector float vec_pack (vector double, vector double) vector double vec_sld (vector double, vector double) * config/rs6000/rs6000.c: Add icode check for vsldoi_v2df to allow 4-bit unsigned literal. * config/rs6000/rs6000-builtin.def: Add definition for VSLDOI_2DF * doc/extend.texi: Update the built-in documentation file for the new powerpc vec_pack and vec_sld built-ins. 2016-12-13 Martin Liska * sanopt.c (sanopt_optimize_walker): Set contains_asan_mark. (sanopt_optimize): Add new argument. (sanitize_asan_mark_unpoison): New function. (maybe_contains_asan_check): Likewise. (sanitize_asan_mark_poison): Likewise. (pass_sanopt::execute): Call the new functions. 2016-12-13 Martin Liska PR tree-optimization/78428 * expr.c (store_constructor_field): Add new arguments to the function. (store_constructor): Set up bitregion_end and add gcc_unreachable to fields that have either non-constant size or (and) offset. 2016-12-13 Marek Polacek * tree-data-ref.c (compute_overlap_steps_for_affine_univar): Change parameters' type from int to HOST_WIDE_INT. (compute_overlap_steps_for_affine_1_2): Change parameters' type from int to HOST_WIDE_INT. (build_classic_dist_vector_1): Likewise. (add_multivariate_self_dist): Likewise. 2016-12-13 Michael Matz PR tree-optimization/78725 * tree-ssa-loop-split.c (split_at_bb_p): Check for overflow and at correct use point. 2016-12-13 Martin Liska * asan.c (asan_expand_mark_ifn): Use renamed BUILT_IN_ASAN_{UN}CLOBBER_N to BUILT_IN_ASAN_{UN}POISON_STACK_MEMORY. * sanitizer.def: Likewise. 2016-12-13 James Greenhalgh * doc/extend.texi (Half-Precision): Update to document current compiler behaviour. 2016-12-13 James Greenhalgh * doc/extend.texi (Floating Types): Document availability of _Float16 on ARM/AArch64. 2016-12-13 Richard Biener PR tree-optimization/78699 * tree-vect-data-refs.c (vect_analyze_group_access_1): Limit group size. 2016-12-13 Richard Biener PR middle-end/78742 * tree.c (cst_and_fits_in_hwi): Look if the actual value fits. * tree-object-size.c (compute_builtin_object_size): Use tree_fits_shwi_p. * tree-data-ref.c (initialize_matrix_A): Remove excess assert. 2016-12-13 Martin Liska * asan.c (asan_mark_poison_p): Remove. (asan_mark_p): New function. (transform_statements): Use the function. (asan_expand_mark_ifn): Do not use masked enum. * asan.h (enum asan_mark_flags): Declare it via a macro. * gimple-pretty-print.c (dump_gimple_call_args): Dump first argument of ASAN_MARK. * gimplify.c (build_asan_poison_call_expr): Use new enum values. (asan_poison_variable): Likewise. 2016-12-13 Jakub Jelinek PR ipa/77905 * ipa-pure-const.c (cdtor_p): Return true for DECL_STATIC_{CON,DE}STRUCTOR even when it is DECL_LOOPING_CONST_OR_PURE_P. 2016-12-12 Jakub Jelinek PR tree-optimization/78777 * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge, insert_initializers): Use stmt_ends_bb_p instead of is_ctrl_stmt. PR other/78766 * opt-functions.awk (opt_args): Use [{] instead of { in regexps. Formatting fix. 2016-12-12 Martin Sebor PR middle-end/78622 PR middle-end78606 * gimple-ssa-sprintf.c (min_bytes_remaining): Use res.knownrange rather than res.bounded. (get_width_and_precision): Set precision to -1 when negative. (adjust_range_for_overflow): New function. (format_integer): Correct the handling of the space, plus, and pound flags, and the special case of zero precision. Always set res.bounded to true unless either precision or width is specified and unknown. Call adjust_range_for_overflow. Avoid use zero as the shortest value when precision is specified but unknown. (format_directive): Remove vestigial quoting. Always inform of argument value or range when it's available. (add_bytes): Correct the computation of boundrange used to decide whether a warning is of a "maybe" or "defnitely" kind. 2016-12-12 Dominik Vogt * combine.c (change_zero_ext): Handle mode expanding zero_extracts. 2016-12-12 Uros Bizjak PR target/78738 * config/i386/i386.h (X87_ENABLE_ARITH): Also enable for flag_unsafe_math_optimizations. (X87_ENABLE_FLOAT): Ditto. 2016-12-12 Marek Polacek PR middle-end/78716 * gimplify.c (gimplify_va_arg_expr): Don't require ADDR_EXPR for Case 1; check POINTER_TYPE_P instead. 2016-12-12 Bernd Schmidt PR rtl-optimization/78669 * ira.c (combine_and_move_insns): When deleting an insn, clear the replace flag for all used regs in that insn. 2016-12-12 Thomas Preud'homme * config/arm/arm-opts.h: Move struct arm_arch_core_flag and arm_arch_core_flags to ... * common/config/arm/arm-common.c: There. 2016-12-12 Eric Botcazou * config/sparc/constraints.md (T): Use special memory constraint. (U): Minor tweak. (W): Add TARGET_ARCH64 test. * config/sparc/sparc.md (*movdi_insn_sp32): Replace 'W' with 'T'. (*movdf_insn_sp32): Likewise. (*mov_insn_sp32): Likewise. Replace 'e' with 'f' in conjunction with offsettable memory references. 2016-12-11 Sandra Loosemore * config/nios2/nios2.c (nios2_emit_move_sequence): Call copy_rtx to avoid shared structure error. 2016-12-11 Bill Schmidt PR target/78695 * config/rs6000/rs6000.c (find_alignment_op): Discard from consideration any artificial definition. 2016-12-11 Iain Sandoe * configure.ac (CROSS directory tests): Remove the assumption that Darwin hosts contain suitable target sysroots in "/". * configure: Regenerate. 2016-12-11 Iain Sandoe PR rtl-optimization/71496 * config/rs6000/darwin.md (load_macho_picbase_si): Mark as non- copyable. (load_macho_picbase_di, reload_macho_picbase_si, reload_macho_picbase_di): Likewise. 2012-12-11 John David Anglin * config/pa/pa.c (pa_callee_copies): New function. * config/pa/pa.opt (mcaller-copies): New option. * doc/invoke.texi (mcaller-copies): Document option. 2016-12-11 Uros Bizjak PR target/70799 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p) : Consider all constant shifts. Add FIXME comment. (dimode_scalar_chain::compute_convert_gain): Reduce gain for constant shifts larger or equal than 32. 2016-12-11 Roger Pau MonnĂ© * config/i386/x86-64.h: Append --32 to the assembler options when -m16 is used on non-glibc systems as well. 2016-12-10 Allan Sandfeld Jensen PR target/70118 * config/i386/mmintrin.h (__m64_u): New type * config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64): Make the allowed unaligned memory access explicit. 2016-12-10 Krister Walfridsson * config.gcc (i386-*-netbsd*): Make i486 the default arch on NetBSD. Generally use cpu generic. 2016-12-10 Jakub Jelinek Marc Glisse PR tree-optimization/78720 * match.pd (A < 0 ? C : 0): Only optimize for signed A. If shift is negative, sign extend to @1's type and than AND with C. 2016-12-10 Jakub Jelinek PR fortran/78758 * tree-object-size.c (compute_object_offset) : Handle non-zero low bound or non-standard element sizes. PR sanitizer/78708 * lto-streamer-in.c (input_function): In addition to debug stmts without -g, remove IFN_*SAN_* calls if corresponding flag_sanitize bit is not enabled. 2016-12-09 Bill Schmidt * config/rs6000/rs6000-passes.def: New file. * config/rs6000/rs6000-protos.h: Declare make_pass_analyze_swaps. * config/rs6000/rs6000.c (rs6000_option_override): Remove registration of machine-specific passes. (pass_analyze_swaps::clone): New function. * config/rs6000/t-rs6000: Define PASSES_EXTRA. 2016-12-09 Kugan Vivekanandarajah PR ipa/78721 * ipa-cp.c (propagate_vr_accross_jump_function): Call drop_tree_overflow after fold_convert. 2016-12-09 Jakub Jelinek PR target/72742 * config/rs6000/rs6000.md (*and3_imm_mask_dot, *and3_imm_mask_dot2): Add rs6000_is_valid_and_mask to insn condition. 2016-12-09 Segher Boessenkool PR target/78683 * config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE. Return 2. (CTZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE. Return 2. Handle TARGET_POPCNTD the same as TARGET_CTZ. * config/rs6000/rs6000.md (ctz2): Reimplement. (ffs2): Reimplement. 2016-12-09 Andre Vieira PR rtl-optimization/78255 * gcc/postreload.c (reload_cse_simplify): Do not CSE a function if NO_FUNCTION_CSE is true. 2016-12-09 Cesar Philippidis PR ipa/78027 * ipa-icf.c (sem_function::parse): Don't process functions with oacc decl attributes, as they may be OpenACC routines. 2016-12-09 David Malcolm * rtl.h (get_mem_attrs): Add "const" qualifier to returned pointer. 2016-12-09 Nathan Sidwell PR C++/78550 * convert.c (convert_to_integer_1): Maybe fold conversions to integral types with fewer bits than its mode. 2016-12-09 Martin Liska * tree-pretty-print.c (pretty_print_string): Escape non-printable chars in strings. 2016-12-09 Jakub Jelinek PR tree-optimization/78726 * tree-ssa-reassoc.c (make_new_ssa_for_def): Add OPCODE and OP argument. For lhs uses in debug stmts, don't replace lhs with new_lhs, but with a debug temp set to new_lhs opcode op. (make_new_ssa_for_all_defs): Add OPCODE argument, pass OPCODE and OP down to make_new_ssa_for_def. (zero_one_operation): Call make_new_ssa_for_all_defs even when stmts_to_fix is empty, if *def has not changed yet. Pass OPCODE to make_new_ssa_for_all_defs. 2016-12-08 Martin Sebor PR c/78284 * builtin-attrs.def (ATTR_ALLOC_SIZE, ATTR_RETURNS_NONNULL): New identifier tree nodes. (ATTR_ALLOCA_SIZE_1_NOTHROW_LEAF_LIST): New attribute list. (ATTR_MALLOC_SIZE_1_NOTHROW_LIST): Same. (ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST): Same. (ATTR_MALLOC_SIZE_1_2_NOTHROW_LEAF_LIST): Same. (ATTR_ALLOC_SIZE_2_NOTHROW_LEAF_LIST): Same. * builtins.c (expand_builtin_alloca): Call maybe_warn_alloc_args_overflow. * builtins.def (aligned_alloc, calloc, malloc, realloc): Add attribute alloc_size. (alloca): Add attribute alloc_size and returns_nonnull. * calls.h (maybe_warn_alloc_args_overflow): Declare. * calls.c (alloc_max_size, operand_signed_p): New functions. (maybe_warn_alloc_args_overflow): Define. (initialize_argument_information): Diagnose overflow in functions declared with attaribute alloc_size. * doc/invoke.texi (Warning Options): Document -Walloc-zero and -Walloc-size-larger-than. 2016-12-08 Vladimir Makarov PR rtl-optimization/78671 * lra-assign.c (find_hard_regno_for_1): Check prohibited regs for an allocno class. 2016-12-08 Uros Bizjak * config/i386/i386.h (HARD_REGNO_NREGS): Use GENERAL_REGNO_P. (HARD_REGNO_NREGS_HAS_PADDING): Ditto. Simplify macro. 2015-12-08 Wilco Dijkstra PR target/78733 * config/aarch64/aarch64.c (aarch64_classify_address): Set load_store_pair_p for TImode and TFmode. 2016-12-08 David Malcolm * emit-rtl.c (gen_reg_rtx): Move regno_pointer_align and regno_reg_rtx resizing logic to... (emit_status::ensure_regno_capacity): ...this new method, and ensure that the buffers are large enough. (init_emit): Allocate regno_reg_rtx using ggc_cleared_vec_alloc rather than ggc_vec_alloc. * function.h (emit_status::ensure_regno_capacity): New method. 2016-12-08 Dmitry Vyukov * opts.c (finish_options): Enable -fsanitize-address-use-after-scope only if -fsanitize=address is enabled (not -fsanitize=kernel-address). * doc/invoke.texi (-fsanitize=kernel-address): Don't say that it enables -fsanitize-address-use-after-scope. 2016-12-08 Bin Cheng PR middle-end/78684 * tree-vect-loop-manip.c (create_intersect_range_checks_index): Check sign bit for index step of data reference. 2016-12-08 Naveen H.S * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Handle SYMBOL_SMALL_TLSGD for ILP32. * config/aarch64/aarch64.md : tlsgd_small modified into tlsgd_small_ to support SImode and DImode. *tlsgd_small modified into *tlsgd_small_ to support SImode and DImode. 2016-12-08 Andrew Pinski * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Access the lower part of RTX appropriately. 2016-12-07 David Malcolm * genpreds.c (write_tm_constrs_h): Update for renaming of rtx_reader_ptr to md_reader_ptr. (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * read-md.c (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert from an rtx_reader * to a md_reader *. (rtx_reader::set_md_ptr_loc): Rename to... (md_reader::set_md_ptr_loc): ...this. (rtx_reader::get_md_ptr_loc): Rename to... (md_reader::get_md_ptr_loc): ...this. (rtx_reader::copy_md_ptr_loc): Rename to... (md_reader::copy_md_ptr_loc): ...this. (rtx_reader::fprint_md_ptr_loc): Rename to... (md_reader::fprint_md_ptr_loc): ...this. (rtx_reader::print_md_ptr_loc): Rename to... (md_reader::print_md_ptr_loc): ...this. (rtx_reader::join_c_conditions): Rename to... (md_reader::join_c_conditions): ...this. (rtx_reader::fprint_c_condition): ...this. (rtx_reader::print_c_condition): Rename to... (md_reader::print_c_condition): ...this. (fatal_with_file_and_line): Update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::require_char): Rename to... (md_reader::require_char): ...this. (rtx_reader::require_char_ws): Rename to... (md_reader::require_char_ws): ...this. (rtx_reader::require_word_ws): Rename to... (md_reader::require_word_ws): ...this. (rtx_reader::read_char): Rename to... (md_reader::read_char): ...this. (rtx_reader::unread_char): Rename to... (md_reader::unread_char): ...this. (rtx_reader::peek_char): Rename to... (md_reader::peek_char): ...this. (rtx_reader::read_name): Rename to... (md_reader::read_name): ...this. (rtx_reader::read_escape): Rename to... (md_reader::read_escape): ...this. (rtx_reader::read_quoted_string): Rename to... (md_reader::read_quoted_string): ...this. (rtx_reader::read_braced_string): Rename to... (md_reader::read_braced_string): ...this. (rtx_reader::read_string): Rename to... (md_reader::read_string): ...this. (rtx_reader::read_skip_construct): Rename to... (md_reader::read_skip_construct): ...this. (rtx_reader::handle_constants): Rename to... (md_reader::handle_constants): ...this. (rtx_reader::traverse_md_constants): Rename to... (md_reader::traverse_md_constants): ...this. (rtx_reader::handle_enum): Rename to... (md_reader::handle_enum): ...this. (rtx_reader::lookup_enum_type): Rename to... (md_reader::lookup_enum_type): ...this. (rtx_reader::traverse_enum_types): Rename to... (md_reader::traverse_enum_types): ...this. (rtx_reader::rtx_reader): Rename to... (md_reader::md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::~rtx_reader): Rename to... (md_reader::~md_reader): ...this, and update for renaming of rtx_reader_ptr to md_reader_ptr. (rtx_reader::handle_include): Rename to... (md_reader::handle_include): ...this. (rtx_reader::handle_file): Rename to... (md_reader::handle_file): ...this. (rtx_reader::handle_toplevel_file): Rename to... (md_reader::handle_toplevel_file): ...this. (rtx_reader::get_current_location): Rename to... (md_reader::get_current_location): ...this. (rtx_reader::add_include_path): Rename to... (md_reader::add_include_path): ...this. (rtx_reader::read_md_files): Rename to... (md_reader::read_md_files): ...this. * read-md.h (class rtx_reader): Split into... (class md_reader): ...new class. (rtx_reader_ptr): Rename to... (md_reader_ptr): ...this, and convert to a md_reader *. (class noop_reader): Update base class to be md_reader. (class rtx_reader): Reintroduce as a subclass of md_reader. (rtx_reader_ptr): Reintroduce as a rtx_reader *. (read_char): Update for renaming of rtx_reader_ptr to md_reader_ptr. (unread_char): Likewise. * read-rtl.c (rtx_reader_ptr): New global. (rtx_reader::apply_iterator_to_string): Rename to... (md_reader::apply_iterator_to_string): ...this. (rtx_reader::copy_rtx_for_iterators): Rename to... (md_reader::copy_rtx_for_iterators): ...this. (rtx_reader::read_conditions): Rename to... (md_reader::read_conditions): ...this. (rtx_reader::record_potential_iterator_use): Rename to... (md_reader::record_potential_iterator_use): ...this. (rtx_reader::read_mapping): Rename to... (md_reader::read_mapping): ...this. (rtx_reader::read_rtx): Use rtx_reader_ptr when calling read_rtx_code. (rtx_reader::read_rtx_operand): Use get_string_obstack rather than directly accessing m_string_obstack. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. 2016-12-07 Martin Sebor PR middle-end/77784 PR middle-end/78149 PR middle-end/78138 * builtins.c (expand_builtin_strcat, expand_builtin_strncat): New functions. (compute_dest_size, get_size_range, check_sizes, check_strncat_sizes) (check_memop_sizes): Same. (expand_builtin_memcpy): Call check memop_sizes. (expand_builtin_mempcpy): Same. (expand_builtin_memset): Same, (expand_builtin_bzero): Same. (expand_builtin_memory_chk): Call check_sizes. (expand_builtin_strcpy): Same. (expand_builtin_strncpy): Same. (maybe_emit_sprintf_chk_warning): Same. (expand_builtin): Handle strcat and strncat. (fini_object_sizes): Reset pointers. (compute_object_size): New function. * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid issuing warnings also issued during built-in expansion. * doc/invoke.texi (Warning Options): Document -Wstringop-overflow. 2016-12-07 Michael Meissner PR target/72717 * config/rs6000/rs6000.c (rs6000_expand_vector_init): If the V2DImode elements are SUBREG's convert the result into DImode rather than failing in emit_move_insn. 2016-12-07 Jakub Jelinek * builtins.c (fold_builtin_strstr): Removed. (fold_builtin_2): Don't call fold_builtin_strstr. * gimple-fold.c (gimple_fold_builtin_strchr): Check is_strrchr earlier in the strrchr (x, 0) -> strchr (x, 0) optimization. (gimple_fold_builtin_strstr): New function. (gimple_fold_builtin): Call it. * fold-const-call.c (fold_const_call): Handle CFN_BUILT_IN_STRSTR. PR c++/78692 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Set lhs var to lhs of new_stmt right before noreturn handling rather than to lhs of e->call_stmt early. 2016-12-07 David Malcolm * read-md.c (rtx_reader::require_char): New method. (require_char_ws): Convert from function to... (rtx_reader::require_char_ws): ...method. (rtx_reader::require_word_ws): New method. * read-md.h (rtx_reader::require_char): New method decl. (require_char_ws): Remove global decl in favor of... (rtx_reader::require_char_ws): ...new method decl. (rtx_reader::require_word_ws): New method decl. (rtx_reader::peek_char): New method decl. 2016-12-07 Thomas Preud'homme PR rtl-optimization/78617 * lra-remat.c (do_remat): Initialize live_hard_regs from live in registers, also setting hard registers mapped to pseudo registers. 2016-12-07 David Malcolm * cfgexpand.c (pass_expand::execute): Move stack initializations to rtl_data::init_stack_alignment and call it. * emit-rtl.c (rtl_data::init_stack_alignment): New method. * emit-rtl.h (rtl_data::init_stack_alignment): New method. 2016-12-07 Wilco Dijkstra * gcc/ira.c (ira_setup_eliminable_regset): Initialize crtl->is_leaf. (ira): Move initialization of crtl->is_leaf earlier. 2016-12-07 Wilco Dijkstra * config/aarch64/aarch64.md (movti_aarch64): Change Ump to m. (movtf_aarch64): Likewise. * config/aarch64/aarch64.c (aarch64_classify_address): Use correct intersection of offsets. (aarch64_legitimize_address_displacement): Use 9-bit signed offsets. (aarch64_legitimize_address): Use 9-bit signed offsets for TI/TF mode. Use 7-bit signed scaled mode for modes > 16 bytes. 2016-12-07 James Greenhalgh PR rtl-optimization/78561 * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p) Use constant_pool_empty_p in place of get_pool_size_upper_bound. (rs6000_stack_info): Likewise. (rs6000_emit_prologue): Likewise. (rs6000_elf_declare_function_name): Likewise. (rs6000_set_up_by_prologue): Likewise. (rs6000_can_eliminate): Likewise. * output.h (get_pool_size_upper_bound): Delete. (constant_pool_empty_p): New. * varasm.c (get_pool_size_upper_bound): Delete (constant_pool_empty_p): New. 2016-12-07 Bin Cheng PR tree-optimization/78691 * match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)): Require integral type for the outer expression. 2016-12-07 Naveen H.S * config/aarch64/aarch64.c (aarch64_builtin_support_vector_misalignment): New. (TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT): Define. 2016-12-06 David Malcolm PR bootstrap/78705 * config/i386/i386.c (ix86_test_dumping_memory_blockage): Conditionalize the string comparison on Pmode == DImode. 2016-12-06 Tom de Vries PR tree-optimization/67955 * tree-ssa-alias.c (same_addr_size_stores_p): New function. (stmt_kills_ref_p): Use it. 2016-12-06 Eric Botcazou PR middle-end/78700 * calls.c (expand_call): Move back call to prepare_call_address. 2016-12-06 Michael Meissner PR target/78658 * config/rs6000/rs6000.md (zero_extendqi2): Use ^ instead of ?* constraints for the ISA 3.0 patterns, so the register allocator is more likely to allocate QImode/HImode to vector registers for conversion to floating point unless a reload is needed. (zero_extendhi2): Likewise. (float2_internal): Properly deal with the first alternative which is converting QImode/HImode to floating point and the QImode/HImode value is in a vector register, and does not allocate the second pseudo register. Remove zero extending into traditional floating point registers, since the instruction used only works on traditional altivec registers. (floatuns2_internal): Likewise. 2016-12-06 David Malcolm * config/i386/i386.c: Include print-rtl.h. (selftest::ix86_test_dumping_memory_blockage): New function. (selftest::ix86_run_selftests): Call it. * print-rtl-function.c (print_rtx_function): Create an rtx_reuse_manager and use it. * print-rtl.c: Include "rtl-iter.h". (rtx_writer::rtx_writer): Add reuse_manager param. (rtx_reuse_manager::rtx_reuse_manager): New ctor. (uses_rtx_reuse_p): New function. (rtx_reuse_manager::preprocess): New function. (rtx_reuse_manager::has_reuse_id): New function. (rtx_reuse_manager::seen_def_p): New function. (rtx_reuse_manager::set_seen_def): New function. (rtx_writer::print_rtx): If "in_rtx" has a reuse ID, print it as a prefix the first time in_rtx is seen, and print reuse_rtx subsequently. (print_inline_rtx): Supply NULL for new reuse_manager param. (debug_rtx): Likewise. (print_rtl): Likewise. (print_rtl_single): Likewise. (rtx_writer::print_rtl_single_with_indent): Likewise. * print-rtl.h: Include bitmap.h when building for host. (rtx_writer::rtx_writer): Add reuse_manager param. (rtx_writer::m_rtx_reuse_manager): New field. (class rtx_reuse_manager): New class. * rtl-tests.c (selftest::assert_rtl_dump_eq): Add reuse_manager param and use it when constructing rtx_writer. (selftest::test_dumping_rtx_reuse): New function. (selftest::rtl_tests_c_tests): Call it. * selftest-rtl.h (class rtx_reuse_manager): New forward decl. (selftest::assert_rtl_dump_eq): Add reuse_manager param. (ASSERT_RTL_DUMP_EQ): Supply NULL for reuse_manager param. (ASSERT_RTL_DUMP_EQ_WITH_REUSE): New macro. 2016-12-06 Vladimir Makarov PR target/77761 * lra-lives.c (process_bb_lives): Update biggest mode for implicitly used hard reg. 2016-12-06 Uros Bizjak * config/i386/predicates.md (general_gr_operand): New predicate. * config/i386/i386.md (TImode and DImode push_operand splitter): Use general_gr_operand. Macroize using DWI mode macro. (TImode and DImode nonimmediate_operand splitter): Use nonimmediate_gr_operand and general_gr_operand. Macroize using DWI mode macro. (TF/XF/DFmode push_operand splitter): Use general_gr_operand. (TFmode nonimmediate_operand splitter): Use nonimmediate_gr_operand and general_gr_operand. (XFmode nonimmediate_operand splitter): Ditto. (DFmode nonimmediate_operand splitter): Ditto. * config/i386/mmx.md (MMXMODE nonimmediate_operand splitter): Ditto. 2016-12-06 Kyrylo Tkachov * config/arm/arm-cores.def (cortex-m23, cortex-m33): Move into alphabetical order with respect to other ARMv8 processors. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. 2016-12-06 Robert Suchanek * config/mips/mips.c (mips_expand_builtin_insn): Check input ranges of literal integer arguments. 2016-12-06 Aldy Hernandez PR middle-end/78548 * tree-ssa-uninit.c (simplify_preds_4): Call release() instead of destroy_predicate_vecs. (uninit_uses_cannot_happen): Make uninit_preds a scalar. 2016-12-06 Aldy Hernandez PR middle-end/78566 * tree-ssa-uninit.c (can_one_predicate_be_invalidated_p): Change argument type to a pred_chain. (can_chain_union_be_invalidated_p): Use pred_chain instead of a worklist. (flatten_out_predicate_chains): Remove. (uninit_uses_cannot_happen): Rename from uninit_ops_invalidate_phi_use. Change logic so that we are checking that the PHI use will invalidate _ALL_ possibly uninitialized operands. (is_use_properly_guarded): Rename call to uninit_ops_invalidate_phi_use into uninit_uses_cannot_happen. 2016-12-06 Tamar Christina * gcc/config/aarch64/arm_neon.h (vreinterpretq_p8_p128, vreinterpretq_p16_p128): Added. (vreinterpret_p64_p16, vreinterpretq_p64_p128): Likewise. (vreinterpretq_p64_p16, vreinterpretq_p128_p8): Likewise. (vreinterpretq_p128_p16, vreinterpretq_p128_f16): Likewise. (vreinterpretq_p128_f32, vreinterpretq_p128_p64): Likewise. (vreinterpretq_p128_s64, vreinterpretq_p128_u64): Likewise. (vreinterpretq_p128_s8, vreinterpretq_p128_s16): Likewise. (vreinterpretq_p128_s32, vreinterpretq_p128_u8): Likewise. (vreinterpretq_p128_u16, vreinterpretq_p128_u32): Likewise. (vreinterpretq_f16_p128, vreinterpretq_f32_p128): Likewise. (vreinterpretq_s64_p128, vreinterpretq_u64_p128): Likewise. (vreinterpretq_s8_p128, vreinterpretq_s16_p128): Likewise. (vreinterpretq_s32_p128, vreinterpretq_u8_p128): Likewise. (vreinterpretq_u16_p128, vreinterpretq_u32_p128): Likewise. 2016-12-06 Jakub Jelinek PR c++/71537 * fold-const.c (fold_comparison): Assume CONSTANT_CLASS_P (base0) plus offset is non-zero. For maybe_nonzero_address decl base0, require indirect_base0. PR c++/71537 * fold-const-call.c (fold_const_call_1): Remove memchr handling here. (fold_const_call) : Formatting improvements. (fold_const_call) : Likewise. If s2 is 0 and arguments have no side-effects, return 0. (fold_const_call): Handle CFN_BUILT_IN_MEMCHR. PR c++/71537 * fold-const-call.c (fold_const_call): Handle CFN_BUILT_IN_{INDEX,STRCHR,RINDEX,STRRCHR}. PR tree-optimization/78675 * tree-vect-loop.c (vectorizable_live_operation): For VECTOR_BOOLEAN_TYPE_P vectype use integral type with bitsize precision instead of TREE_TYPE (vectype) for the BIT_FIELD_REF. 2016-12-06 Eric Botcazou PR middle-end/78642 * emit-rtl.c (verify_rtx_sharing) : Relax condition. (copy_rtx_if_shared_1) : Likewise. (copy_insn_1) : Likewise. 2016-12-05 Michael Meissner PR target/78688 * config/rs6000/rs6000.h (FUNCTION_VALUE_REGNO_P): Use IN_RANGE instead of ((N) >= (X) && (N) <= (Y-X)) to silence warnings about comparing signed to unsigned values. (FUNCTION_ARG_REGNO_P): Likewise. 2016-12-05 Bill Schmidt Stefan Freudenberger PR tree-optimization/78646 * gimple-ssa-strength-reduction.c (replace_ref): The pointer addition used for the memory base expression should have the type of the candidate. 2016-12-05 Waldemar Brodkorb PR target/71721 * config.gcc (*-*-uclinux*): Enable posix threads. 2016-12-05 Andrew Senkevich * config/i386/avx512bwintrin.h: Add new k-mask intrinsics. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512fintrin.h: Ditto. * config/i386/i386-builtin-types.def (UCHAR_FTYPE_UQI_UQI_PUCHAR, UCHAR_FTYPE_UHI_UHI_PUCHAR, UCHAR_FTYPE_USI_USI_PUCHAR, UCHAR_FTYPE_UDI_UDI_PUCHAR, UCHAR_FTYPE_UQI_UQI, UCHAR_FTYPE_UHI_UHI, UCHAR_FTYPE_USI_USI, UCHAR_FTYPE_UDI_UDI, UQI_FTYPE_UQI_INT, UHI_FTYPE_UHI_INT, USI_FTYPE_USI_INT, UDI_FTYPE_UDI_INT, UQI_FTYPE_UQI, USI_FTYPE_USI, UDI_FTYPE_UDI, UQI_FTYPE_UQI_UQI): New function types. * config/i386/i386-builtin.def (__builtin_ia32_knotqi, __builtin_ia32_knotsi, __builtin_ia32_knotdi, __builtin_ia32_korqi, __builtin_ia32_korsi, __builtin_ia32_kordi, __builtin_ia32_kxnorqi, __builtin_ia32_kxnorsi, __builtin_ia32_kxnordi, __builtin_ia32_kxorqi, __builtin_ia32_kxorsi, __builtin_ia32_kxordi, __builtin_ia32_kandqi, __builtin_ia32_kandsi, __builtin_ia32_kanddi, __builtin_ia32_kandnqi, __builtin_ia32_kandnsi, __builtin_ia32_kandndi): New. * config/i386/i386.c (ix86_expand_args_builtin): Handle new types. 2016-12-05 Segher Boessenkool * combine.c: Revert r243162. 2016-12-05 Paolo Bonzini * match.pd: Simplify X ? C : 0 where C is a power of 2 and X tests a single bit. 2016-12-05 Nathan Sidwell * diagnostic.c (diagnostic_check_max_errors): New, broken out of ... (diagnostic_action_after_output): ... here. (diagnostic_report_diagnostic): Call it for non-notes. * diagnostic.h (struct diagnostic_context): Make max_errors signed int. (diagnostic_check_max_errors): Declare. 2016-12-05 Cupertino Miranda * config/arc/arc.h (STARTFILE_SPEC): Use default linux specs. (ENDFILE_SPEC): Likewise. 2016-12-05 Claudiu Zissulescu * config/arc/arc-protos.h (insn_is_tls_gd_dispatch): Remove. * config/arc/arc.c (arc_unspec_offset): New function. (arc_finalize_pic): Change. (arc_emit_call_tls_get_addr): Likewise. (arc_legitimize_tls_address): Likewise. (arc_legitimize_pic_address): Likewise. (insn_is_tls_gd_dispatch): Remove. * config/arc/arc.h (INSN_REFERENCES_ARE_DELAYED): Change. * config/arc/arc.md (ls_gd_load): Remove unused pattern. (tls_gd_dispatch): Likewise. 2016-12-05 Andre Vieira * config/arm/arm.c (TARGET_ASM_INIT_SECTIONS): Fix wrong undef location. 2016-12-05 Eric Botcazou * config/sparc/sparc-protos.h (sparc_splitdi_legitimate): Rename to... (sparc_split_reg_mem_legitimate): ...this. (sparc_split_reg_mem): Declare. (sparc_split_mem_reg): Likewise. (sparc_split_regreg_legitimate): Rename to... (sparc_split_reg_reg_legitimate): ...this. * config/sparc/sparc.c (sparc_splitdi_legitimate): Rename to... (sparc_split_reg_mem_legitimate): ...this. (sparc_split_reg_mem): New function. (sparc_split_mem_reg): Likewise. (sparc_split_regreg_legitimate): Rename to... (sparc_split_reg_reg_legitimate): ...this. (sparc_split_reg_reg): New function. * config/sparc/sparc.md (lra): Remove "none" value. (enabled): Adjust to above change. (*movdi_insn_sp32): Remove new (r,T) alternative and reorder others. (DImode splitters): Adjust to above renamings and use new functions. (*movdf_insn_sp32): Remove new (r,T) alternative and reorder others. (DFmode splitters): Adjust to above renamings and use new functions. (*mov_insn_sp64): Replace C with Z constraint and use W constraint in conjunction with e. (*mov_insn_sp32): Remove new (r,T) alternative, add (o,Y) alternative and reorder others. (VM64:mode splitters): Adjust to above renamings and use new functions. 2016-12-04 Martin Sebor PR c/78668 * builtin-attrs.def (ATTR_ALLOC_SIZE, ATTR_RETURNS_NONNULL): New identifier tree nodes. (ATTR_ALLOCA_SIZE_1_NOTHROW_LEAF_LIST): New attribute list. (ATTR_MALLOC_SIZE_1_NOTHROW_LIST): Same. (ATTR_MALLOC_SIZE_1_NOTHROW_LEAF_LIST): Same. (ATTR_MALLOC_SIZE_1_2_NOTHROW_LEAF_LIST): Same. (ATTR_ALLOC_SIZE_2_NOTHROW_LEAF_LIST): Same. * builtins.def (aligned_alloc, calloc, malloc, realloc): Add attribute alloc_size. (alloca): Add attribute alloc_size and returns_nonnull. 2016-12-04 Uros Bizjak PR target/70322 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Handle NEG. (dimode_scalar_chain::compute_convert_gain): Ditto. (dimode_scalar_chain::convert_insn): Ditto. 2016-12-03 Eric Botcazou * lra-constraints.c (emit_spill_move): Use gen_lowpart_SUBREG in all cases to build a lowpart SUBREG. 2016-12-03 Eric Botcazou David S. Miller * config/sparc/constraints.md (U): Adjust comment. * config/sparc/sparc.md (lra): New attribute. (enabled): For base instructions, if the lra attribute is set, return 1 if it is in keeping with TARGET_LRA. (*movdi_insn_sp32): Add lra attribute for alternatives mentioning U constraint and duplicate them with U replaced by r. (*movdf_insn_sp32): Likewise. (*mov_insn_sp32): Likewise. (*movtf_insn_sp32): Remove alternatives mentioning U constraint. 2016-12-02 Jeff Law * config/arm/arm.c (arm_handle_cmse_nonsecure_call): Remove unused variable main_variant. 2016-12-02 Michael Meissner * config.gcc (powerpc*-*-linux*): Set gnu-indirect-function by default on PowerPC linux systems. 2016-12-02 Segher Boessenkool PR rtl-optimization/78638 * simplify-rtx.c (simplify_truncation): M2 is not mode, it is GET_MODE (op). Fix this. 2016-12-02 David Malcolm PR bootstrap/78616 * selftest.c (selftest::assert_strndup_eq): Rename to... (selftest::assert_xstrndup_eq): ...this, and remove call to strndup. (selftest::test_strndup): Rename to... (selftest::test_xstrndup): ...this, updating for above renaming. (selftest::test_libiberty): Update for renaming. 2016-12-02 Michael Meissner PR target/78639 * config/rs6000/rs6000.md (movdi_internal64): Fix typo in subversion id 242679 that causes the wrong store instruction to be generated if a DImode is in an Altivec register using REG+REG addressing. 2016-12-02 Uros Bizjak PR target/70322 * config/i386/i386.md (*andndi3_doubleword): Add non-BMI alternative and corresponding post-reload splitter. 2016-12-02 Kyrylo Tkachov * config/aarch64/aarch64.h (machine_function): Add reg_is_wrapped_separately field. * config/aarch64/aarch64.md (LAST_SAVED_REGNUM): Define new constant. * config/aarch64/aarch64.c (emit_set_insn): Change return type to rtx_insn *. (aarch64_save_callee_saves): Don't save registers that are wrapped separately. (aarch64_restore_callee_saves): Don't restore registers that are wrapped separately. (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p): Move earlier in the file. (aarch64_get_separate_components): New function. (aarch64_get_next_set_bit): Likewise. (aarch64_components_for_bb): Likewise. (aarch64_disqualify_components): Likewise. (aarch64_emit_prologue_components): Likewise. (aarch64_emit_epilogue_components): Likewise. (aarch64_set_handled_components): Likewise. (aarch64_process_components): Likewise. (TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS, TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB, TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS, TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS, TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS, TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS): Define. 2016-12-02 Martin Jambor * passes.def: Move pass_rebuild_cgraph_edges to the end of pass_build_ssa_passes. 2016-12-02 Uros Bizjak * config/alpha/alpha.md (exception_receiver): Copy alpha_gp_ave_rtx return value. 2016-12-02 Tadek Kijkowski * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection for several include directories that may be relative to sysroot. * config/i386/x-mingw32 (gplus_includedir): Define. (gplus_tool_includedir, gplus_backward_include_dir): Likewise. (native_system_includedir): Likewise. * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not override if TARGET_SYSTEM_ROOT is defined. (NATIVE_SYSTEM_HEADER_DIR): Likewise. 2016-12-02 Jakub Jelinek PR target/70322 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Handle NOT. (dimode_scalar_chain::compute_convert_gain): Likewise. (dimode_scalar_chain::convert_insn): Likewise. * config/i386/i386.md (*one_cmpldi2_doubleword): New define_insn_and_split. (one_cmpl2): Use SWIM1248x iterator instead of SWIM. PR target/78614 * rtl.c (copy_rtx): Don't clear used flag here. (shallow_copy_rtx_stat): Clear used flag here unless code the rtx is shareable. * simplify-rtx.c (simplify_replace_fn_rtx): When copying rtx with 'E' in format, copy all vectors. * emit-rtl.c (copy_insn_1): Don't clear used flag here. * valtrack.c (cleanup_auto_inc_dec): Likewise. * config/rs6000/rs6000.c (rs6000_frame_related): Likewise. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm-builtins.c (arm_builtins): Define ARM_BUILTIN_CMSE_NONSECURE_CALLER. (bdesc_2arg): Add line for cmse_nonsecure_caller. (arm_init_builtins): Handle cmse_nonsecure_caller. (arm_expand_builtin): Likewise. * config/arm/arm_cmse.h (cmse_nonsecure_caller): New. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (detect_cmse_nonsecure_call): New. (cmse_nonsecure_call_clear_caller_saved): New. (arm_reorg): Use cmse_nonsecure_call_clear_caller_saved. (arm_function_ok_for_sibcall): Disable sibcalls for cmse_nonsecure_call. * config/arm/arm-protos.h (detect_cmse_nonsecure_call): New. * config/arm/arm.md (call): Handle cmse_nonsecure_entry. (call_value): Likewise. (nonsecure_call_internal): New. (nonsecure_call_value_internal): New. * config/arm/thumb1.md (*nonsecure_call_reg_thumb1_v5): New. (*nonsecure_call_value_reg_thumb1_v5): New. * config/arm/thumb2.md (*nonsecure_call_reg_thumb2): New. (*nonsecure_call_value_reg_thumb2): New. * config/arm/unspecs.md (UNSPEC_NONSECURE_MEM): New. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (gimplify.h): New include. (arm_handle_cmse_nonsecure_call): New. (arm_attribute_table): Added cmse_nonsecure_call. (arm_comp_type_attributes): Deny compatibility of function types with without the cmse_nonsecure_call attribute. * doc/extend.texi (ARM ARMv8-M Security Extensions): New attribute. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (output_return_instruction): Clear registers. (thumb2_expand_return): Likewise. (thumb1_expand_epilogue): Likewise. (thumb_exit): Likewise. (arm_expand_epilogue): Likewise. (cmse_nonsecure_entry_clear_before_return): New. (comp_not_to_clear_mask_str_un): New. (compute_not_to_clear_mask): New. * config/arm/thumb1.md (*epilogue_insns): Change length attribute. * config/arm/thumb2.md (*thumb2_return): Disable for cmse_nonsecure_entry functions. (*thumb2_cmse_entry_return): Duplicate thumb2_return pattern for cmse_nonsecure_entry functions. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (use_return_insn): Change to return with bxns when cmse_nonsecure_entry. (output_return_instruction): Likewise. (arm_output_function_prologue): Likewise. (thumb_pop): Likewise. (thumb_exit): Likewise. (thumb2_expand_return): Assert that entry functions always have simple returns. (arm_expand_epilogue): Handle entry functions. (arm_function_ok_for_sibcall): Disable sibcall for entry functions. (arm_asm_declare_function_name): New. * config/arm/arm-protos.h (arm_asm_declare_function_name): New. * config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME): Redefine to use arm_asm_declare_function_name. 2016-12-02 Andre Vieira Thomas Preud'homme * config/arm/arm.c (arm_handle_cmse_nonsecure_entry): New. (arm_attribute_table): Added cmse_nonsecure_entry (arm_compute_func_type): Handle cmse_nonsecure_entry. (cmse_func_args_or_return_in_stack): New. (arm_handle_cmse_nonsecure_entry): New. * config/arm/arm.h (ARM_FT_CMSE_ENTRY): New macro define. (IS_CMSE_ENTRY): Likewise. * doc/extend.texi (ARM ARMv8-M Security Extensions): New attribute. 2016-12-02 Andre Vieira Thomas Preud'homme * config.gcc (extra_headers): Added arm_cmse.h. * config/arm/arm-arches.def (ARM_ARCH): (armv8-m): Add FL2_CMSE. (armv8-m.main): Likewise. (armv8-m.main+dsp): Likewise. * config/arm/arm-c.c (arm_cpu_builtins): Added __ARM_FEATURE_CMSE macro. * config/arm/arm-flags.h: Define FL2_CMSE. * config/arm.c (arm_arch_cmse): New. (arm_option_override): New error for unsupported cmse target. * config/arm/arm.h (arm_arch_cmse): New. * config/arm/arm.opt (mcmse): New. * config/arm/arm_cmse.h: New file. * doc/invoke.texi (ARM Options): Add -mcmse. * doc/sourcebuild.texi (arm_cmse_ok): Add new effective target. * doc/extend.texi: Add ARMv8-M Security Extensions entry. 2016-12-02 Georg-Johann Lay * config/avr/avr.c: Fix coding rule glitches. 2016-12-02 Martin Jambor * hsa.c (hsa_callable_function_p): Return false for artificial functions. 2016-12-02 James Greenhalgh PR rtl-optimization/78561 * varasm.c (recompute_pool_offsets): New. (output_constant_pool): Call it. 2016-12-02 James Greenhalgh PR rtl-optimization/78561 * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p) Rename get_pool_size to get_pool_size_upper_bound. (rs6000_stack_info): Likewise. (rs6000_emit_prologue): Likewise. (rs6000_elf_declare_function_name): Likewise. (rs6000_set_up_by_prologue): Likewise. (rs6000_can_eliminate): Likewise, reformat spaces to tabs. * output.h (get_pool_size): Rename to... (get_pool_size_upper_bound): ...This. * varasm.c (get_pool_size): Rename to... (get_pool_size_upper_bound): ...This. 2016-12-02 Bin Cheng * match.pd: Add new pattern: (cond (cmp (convert? x) c1) (op x c2) c3) -> (op (minmax x c1) c2). 2016-12-02 Nathan Sidwell * diagnostic.c (diagnostic_report_diagnostic): Remove extraneous braces. 2016-12-02 Aldy Hernandez PR middle-end/78328 * gimple-ssa-warn-alloca.c (alloca_call_type): Handle VR_ANTI_RANGE. 2016-12-02 Andreas Krebbel * config/s390/s390.c (s390_save_gprs_to_fprs): Fix RTL sharing problem. 2016-12-02 Georg-Johann Lay * config/avr/avr-arch.h (avr_mcu_t) [n_flash]: Remove field. * config/avr/avr-devices.c (AVR_MCU): Remove N_FLASH macro argument. * config/avr/avr-mcus.def (AVR_MCU): Remove initializer for n_flash. * config/avr/avr.c (avr_set_core_architecture) [avr_n_flash]: Use avr_mcu_types.flash_size to compute default value. * config/avr/gen-avr-mmcu-specs.c (print_mcu) [cc1_n_flash]: Use mcu->flash_size to compute value for spec. 2016-12-02 Georg-Johann Lay * doc/invoke.texi (AVR Options) [-mabsdata]: Point to absdata. * doc/extend.texi (AVR Variable Attributes) [progmem]: Hint about linker description to avoid progmem altogether. [absdata]: Point to -mabsdata option. 2016-12-02 Jakub Jelinek PR rtl-optimization/78547 * emit-rtl.c (unshare_all_rtl): Make sure DECL_RTL and DECL_INCOMING_RTL is not shared. * config/i386/i386.c (convert_scalars_to_vectors): If any insns have been converted, adjust all parameter's DEC_RTL and DECL_INCOMING_RTL back from V1TImode to TImode if the parameters have TImode. PR rtl-optimization/78575 * config/i386/i386.c (timode_scalar_chain::fix_debug_reg_uses): Use DF infrastructure to wrap all V1TImode reg uses into TImode subreg if not already wrapped in a subreg. Make sure df_insn_rescan does not affect further iterations. 2016-12-02 Martin Liska PR ipa/78555 * sreal.c (sreal::to_int): Make absolute value before shifting. (sreal::operator/): Likewise. (sreal_verify_negative_division): New test. (void sreal_c_tests): Call the new test. * sreal.h (sreal::normalize_up): Use new SREAL_ABS and SREAL_SIGN macros. (sreal::normalize_down): Likewise. 2016-12-02 Dominik Vogt * combine.c (combine_simplify_rtx): Suppress replacement of "(and (reg) (const_int bit))" with "if_then_else". 2016-12-02 Dominik Vogt PR target/77822 * config/s390/s390.md ("extzv") ("*extzv") ("*extzvdi_lshiftrt") ("*_ior_and_sr_ze") ("*extract1bitdi") ("*insv", "*insv_rnsbg_noshift") ("*insv_rnsbg_srl", "*insv_mem_reg") ("*insvdi_mem_reghigh", "*insvdi_reg_imm"): Use EXTRACT_ARGS_IN_RANGE to validate the arguments of zero_extract and sign_extract. 2016-12-02 Dominik Vogt PR target/77822 * rtl.h (EXTRACT_ARGS_IN_RANGE): New. 2016-12-02 Andreas Krebbel * gcc/config/s390/s390.c (s390_builtin_vectorization_cost): New function. (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Define target macro. 2016-12-02 Andreas Krebbel * config/s390/vector.md (vec_halfhalf): New mode iterator. ("vec_pack_trunc_", "vec_pack_ssat_") ("vec_pack_usat_", "vec_unpacks_hi_v16qi") ("vec_unpacks_low_v16qi", "vec_unpacku_hi_v16qi") ("vec_unpacku_low_v16qi", "vec_unpacks_hi_v8hi") ("vec_unpacks_lo_v8hi", "vec_unpacku_hi_v8hi") ("vec_unpacku_lo_v8hi", "vec_unpacks_hi_v4si") ("vec_unpacks_lo_v4si", "vec_unpacku_hi_v4si") ("vec_unpacku_lo_v4si"): New pattern definitions. * config/s390/vx-builtins.md: Move VI_HW_HSD mode iterator to vector.md. 2016-12-02 Andreas Krebbel * config/s390/s390-protos.h (s390_reverse_condition): New prototype. * config/s390/s390.c (s390_canonicalize_comparison): Fold compares of CC mode values. (s390_reverse_condition): New function. * config/s390/s390.h (REVERSE_CC_MODE, REVERSE_CONDITION): Define target macros. 2016-12-02 Andreas Krebbel * config/s390/s390-modes.def (CCVEQANY, CCVH, CCVHANY, CCVHU) (CCVHUANY): Remove modes. (CCVIH, CCVIHU, CCVIALL, CCVIANY, CCVFALL, CCVFANY): Add modes and documentation. * config/s390/s390.c (s390_match_ccmode_set): Rename cc modes. (s390_expand_vec_compare_scalar): Pick one of the cc consumer modes. (s390_branch_condition_mask): Adjust to use the new cc consumer modes. The new modes allow for proper reversal in the middle-end. (s390_expand_vec_compare_cc): Determine the proper cc producer and consumer modes for a comparison. * config/s390/s390.md: Rename CCVH to CCVIH and CCVHU to CCVIHU throughout the file. * config/s390/vx-builtins.md: Likewise. 2016-12-02 Maxim Ostapenko * asan.c (asan_global_struct): Refactor. (create_odr_indicator): New function. (asan_needs_odr_indicator_p): Likewise. (is_odr_indicator): Likewise. (asan_add_global): Introduce odr_indicator_ptr. Pass it into global's constructor. (asan_protect_global): Do not protect odr indicators. 2016-12-01 Jeff Law * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts_at_dest): Avoid temporary propagation of operands if there are no operands. 2016-12-02 Jakub Jelinek PR tree-optimization/78586 * gimple-ssa-sprintf.c (format_integer): Don't handle NOP_EXPR, CONVERT_EXPR or COMPONENT_REF here. Formatting fix. For SSA_NAME_DEF_STMT with NOP_EXPR only change argtype if the rhs1's type is INTEGER_TYPE or POINTER_TYPE. 2016-12-01 Kelvin Nilsen PR target/78577 * config/rs6000/vsx.md (vextuhlx): Revise mode of operand 2. (vextuhrx): Likewise. (vextuwlx): Likewise. (vextuwrx): Likewise. 2016-12-01 David Malcolm * dwarf2out.c (dwarf2out_c_finalize): Reset early_dwarf and early_dwarf_finished. 2016-12-01 Eric Botcazou David S. Miller * config/sparc/sparc.opt (mlra): New target option. * config/sparc/sparc.c (TARGET_LRA_P): Define to... (sparc_lra_p): ...this. New function. (D_MODES, DF_MODES): Add missing cast. * config/sparc/sparc.md (*movsi_lo_sum, *movsi_high): Do not provide these insns when flag_pic. (sethi_di_medlow, losum_di_medlow, seth44, setm44, setl44, sethh, setlm, sethm, setlo, embmedany_sethi, embmedany_losum, embmedany_brsum, embmedany_textuhi, embmedany_texthi, embmedany_textulo, embmedany_textlo): Likewise. (sethi_di_medlow_embmedany_pic): Provide it only with flag_pic. 2016-12-01 David Edelsohn PR debug/66419 PR c++/78235 * dbxout.c (dbxout_type_fields): Skip TEMPLATE_DECLs. 2016-12-01 Richard Biener Prathamesh Kulkarni * vec.h (vec::quick_grow_cleared): Guard call to memset if len-oldlen != 0. (vec::safe_grow_cleared): Likewise. 2016-12-01 Uros Bizjak * config/i386/i386.md (*andndi3_doubleword): Depend on TARGET_SSE2. 2016-12-01 Georg-Johann Lay * config/avr/avr.c: Fix coding rule glitches. 2016-12-01 Markus Trippelsdorf PR tree-optimization/78598 * tree-ssa-loop-prefetch.c (ddown): Cast to signed to avoid overflows. 2016-12-01 Markus Trippelsdorf PR rtl-optimization/78596 * combine.c (simplify_comparison): Cast to unsigned to avoid left shifting of negative value. 2016-12-01 Matthias Klose * doc/install.texi: Don't use pkg-config to check for bdw-gc. 2016-12-01 Richard Biener * tree-ssa-alias.c (indirect_refs_may_alias_p): Do not treat arrays with same type as objects that cannot overlap. 2016-12-01 Georg-Johann Lay * config/avr/avr.c (avr_print_operand): Use SYMBOL_REF_P if possible. (avr_handle_addr_attribute, avr_asm_output_aligned_decl_common) (avr_asm_asm_output_aligned_bss, avr_addr_space_convert): Dito. 2016-12-01 Jakub Jelinek PR debug/78587 * dwarf2out.c (loc_descr_plus_const): For negative offset use uint_loc_descriptor instead of int_loc_descriptor and perform negation in unsigned HOST_WIDE_INT type. (scompare_loc_descriptor): Shift UINTVAL left instead of INTVAL. PR target/78614 * config/rs6000/rs6000.c (rs6000_frame_related): Call set_used_flags (pat) before any simplifications. Clear used flag on PARALLEL copy. Don't guard add_reg_note call. Call copy_rtx_if_shared on pat before storing it into REG_FRAME_RELATED_EXPR. 2016-12-01 Alan Modra * gcc/config/rs6000/rs6000.c (insn_is_swappable_p): Properly look inside UNSPEC_VSX_XXSPLTW vec. 2016-12-01 Segher Boessenkool PR rtl-optimization/78607 * combine.c (try_combine): Emit a barrier after a unconditional trap. 2016-11-30 Michael Meissner PR target/78602 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): If the element is not a constant or in a register, force it to a register. PR target/78560 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Force value that will be set to a vector element to be in a register. * config/rs6000/vsx.md (vsx_set__p9): Fix thinko that used the wrong multiplier to convert the element number to a byte offset. 2016-11-30 Vladimir Makarov PR tree-optimization/77856 * lra-constraints.c (inherit_in_ebb): Check original regno for invalid invariant regs too. Set only clobbered hard regs for the invalid invariant regs. 2016-11-30 Pitchumani Sivanupandi Commit files forgotten in r242966. * config/avr/avr-arch.h (avr_mcu_t) [flash_size]: New member. * config/avr/avr-devices.c (avr_mcu_types): Add flash size info. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Remove hard-coded prefix check to find wrap-around value, instead use MCU flash size. For 8k flash devices, update link_pmem_wrap spec string to add --pmem-wrap-around=8k. * config/avr/specs.h (LINK_RELAX_SPEC): Move link_pmem_wrap from here... (LINK_SPEC): ...to here. 2016-11-30 David Malcolm PR c/78498 * selftest.c (selftest::assert_strndup_eq): New function. (selftest::test_strndup): New function. (selftest::test_libiberty): New function. (selftest::selftest_c_tests): Call test_libiberty. 2016-11-30 Segher Boessenkool PR rtl-optimization/78610 * ira.c (combine_and_move_insns): Don't substitute into TRAP_IF instructions. 2016-11-30 Bin Cheng PR tree-optimization/78574 * tree-ssa-loop-ivopts.c (find_deriving_biv_for_expr): Skip loop header PHI that doesn't define biv. 2016-11-30 Jakub Jelinek * emit-rtl.c (verify_insn_sharing): Call verify_rtx_sharing instead of reset_used_flags. * config/i386/i386.c (dimode_scalar_chain::convert_op): Avoid sharing the SUBREG rtx between move and following insn. * ira.c (ira_update_equiv_info_by_shuffle_insn): Use copy_rtx for REG_EQUIV argument. 2016-11-30 Thomas Preud'homme * config/arm/t-rmprofile: Add mappings for Cortex-M23 and Cortex-M33. 2016-11-30 Markus Trippelsdorf PR ipa/78555 * real.c (real_hash): Add cast to avoid left shifting of negative values. 2016-11-30 Kyrylo Tkachov PR target/78362 * config/aarch64/aarch64.md (add3): Extract inner expression from a subreg in operands[1] and don't call REGNO on a non-reg expression when deciding to force operands[2] into a reg. 2016-11-30 Claudiu Zissulescu Andrew Burgess * config/arc/arc-protos.h (arc_store_addr_hazard_p): Declare. * config/arc/arc.c (arc_store_addr_hazard_p): New function. (workaround_arc_anomaly): Call arc_store_addr_hazard_p for ARC700. * config/arc/arc700.md: Add define_bypass for store/load. 2016-11-30 Martin Liska * cgraph.c (symbol_table::initialize): Initialize ipa_clones_dump_file. (cgraph_node::remove): Report to ipa_clones_dump_file. * cgraph.h: Add new argument (suffix) to cloning methods. * cgraphclones.c (dump_callgraph_transformation): New function. (cgraph_node::create_clone): New argument. (cgraph_node::create_virtual_clone): Likewise. (cgraph_node::create_version_clone): Likewise. * dumpfile.c: Add .ipa-clones dump file. * dumpfile.h (enum tree_dump_index): Add TDI_clones * ipa-inline-transform.c (clone_inlined_nodes): Report operation to dump_callgraph_transformation. 2016-11-30 Martin Liska PR sanitizer/78541 * asan.c (asan_expand_mark_ifn): Properly select a VAR_DECL from FRAME.* component reference. 2016-11-30 Segher Boessenkool PR rtl-optimization/78583 * simplify-rtx.c (simplify_truncation): Add check missing from the previous commit. 2016-11-30 Segher Boessenkool PR rtl-optimization/78590 * combine.c (change_zero_ext): Transform zero_extend of subregs only if the subreg_reg is a scalar integer mode. 2016-11-30 Jakub Jelinek PR tree-optimization/78586 * gimple-ssa-sprintf.c (format_integer): Use TYPE_MAX_VALUE or TYPE_MIN_VALUE or build_all_ones_cst instead of folding LSHIFT_EXPR. Don't build_int_cst min/max twice. Formatting fix. 2016-11-30 Markus Trippelsdorf PR rtl-optimization/78588 * combine.c (if_then_else_cond): Also guard against BLKmode. * rtlanal.c (num_sign_bit_copies1): Add assert. 2016-11-29 Jeff Law * common/config/arc/arc-common.c (arc_handle_option): Remove unused variables. * lra-constraints.c (check_and_process_move): Constrain the range of DCLASS and SCLASS to avoid false positive out of bounds array index warning. 2016-11-29 David Malcolm * doc/install.texi (--with-target-bdw-gc): Remove stray '@'. 2016-11-29 David Malcolm PR preprocessor/78569 * input.c (get_substring_ranges_for_loc): Fail gracefully if line directives were present. 2016-11-30 Matthias Klose * doc/install.texi: Document configure options --enable-objc-gc and --with-target-bdw-gc. 2016-11-29 Michael Meissner PR target/78594 * config/rs6000/rs6000.md (mov_internal, QHI iterator): Add 'x' to stxsix print pattern, so that QImode and HImode values residing in traditional altivec registers can be stored correctly. 2016-11-29 Max Filippov PR target/78603 * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero overhead loop start between a call and its CALL_ARG_LOCATION note. 2016-11-29 Waldemar Brodkorb * config/bfin/linux.h (CPP_SPEC): Define. 2016-11-29 Martin Sebor PR tree-optimization/78512 * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Remove. * config/rs6000/linux.h: Same. * config/rs6000/linux64.h: Same. * config/sol2.h: Same. * config/sol2.c (solaris_printf_pointer_format): Remove. * doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Remove. * doc/tm.texi: Regenerate. * gimple-ssa-sprintf.c (format_pointer): Rempove. (pass_sprintf_length::compute_format_length): Return bool. (pass_sprintf_length::handle_gimple_call): Adjust. * target.def (printf_pointer_format): Remove. * targhooks.c (default_printf_pointer_format): Remove. (linux_printf_pointer_format): Same. * targhooks.h (default_printf_pointer_format): Remove. (linux_printf_pointer_format, solaris_printf_pointer_format): Same. 2016-11-29 Uros Bizjak * config/i386/sse.md (UNSPEC_MASKOP): Move from i386.md. (mshift): Ditto. (SWI1248_AVX512BWDQ): Ditto. (SWI1248_AVX512BW): Ditto. (k): Ditto. (kandn): Ditto. (kxnor): Ditto. (knot): Ditto. (*k): Ditto. (kortestzhi, kortestchi): Ditto. (kunpckhi, kunpcksi, kunpckdi): Ditto. 2016-11-29 Andrew Pinski * tree-vrp.c (simplify_stmt_using_ranges): Use boolean_type_node for the EQ_EXPR. 2016-11-29 Chen Gang PR target/71331 * config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount. (tilegx_can_use_return_insn_p): Clean up code. 2016-11-29 Pitchumani Sivanupandi * config/avr/avr-mcu.def: (avr_mcu_types): Add flash size info. 2016-11-29 David Malcolm PR c++/72774 PR c++/72786 PR c++/77922 PR c++/78313 * spellcheck.c (selftest::test_find_closest_string): Verify that we don't offer the goal string as a suggestion. * spellcheck.h (best_match::get_best_meaningful_candidate): Don't offer the goal string as a suggestion. 2016-11-29 Claudiu Zissulescu * config/arc/arc.c (arc_override_options): Avoid selection of compact casesi for ARCv2. 2016-11-29 Richard Biener * tree-cfg.c (lower_phi_internal_fn): Do not look for further PHIs after a regular stmt. (stmt_starts_bb_p): PHIs not preceeded by a PHI or a label start a new BB. 2016-11-29 Martin Liska PR gcov-profile/78582 * tree-profile.c (gimple_gen_time_profiler): Make one extra BB to prevent PHI argument clash. 2016-11-29 Claudiu Zissulescu * config/arc/arc.opt (marclinux): Fix typo. (marclinux_prof): Likewise. 2016-11-29 Jiong Wang * target.def (stack_protect_runtime_enabled_p): New. * function.c (expand_function_end): Guard stack_protect_epilogue with targetm.stack_protect_runtime_enabled_p. * cfgexpand.c (pass_expand::execute): Likewise. * calls.c (expand_call): Likewise. * doc/tm.texi.in (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P): Add it. * doc/tm.texi: Regenerate. 2016-11-29 Richard Biener PR middle-end/78546 * match.pd: Add CST1 - (CST2 - A) -> CST3 + A missing case. 2016-11-29 Janus Weil * doc/contrib.texi: Add a few missing gfortran contributors. 2016-11-29 Segher Boessenkool * combine.c (change_zero_ext): Also handle extends from a subreg to a mode bigger than that of the operand of the subreg. 2016-11-29 Segher Boessenkool PR target/77687 * config/rs6000/rs6000.c (rs6000_emit_stack_reset): Emit the stack_restore_tie insn instead of stack_tie, for the SVR4 and SPE ABIs. * config/rs6000/rs6000.md (stack_restore_tie): New define_insn. 2016-11-28 Segher Boessenkool * shrink-wrap.c (init_separate_shrink_wrap): Do not clear head_components and tail_components. (spread_components): New algorithm. (emit_common_tails_for_components): Clear head_components and tail_components. (insert_prologue_epilogue_for_components): Write extra output to the dump file for sibcalls and abnormal exits. 2016-11-28 Segher Boessenkool PR rtl-optimization/78342 * combine.c: Include "cfghooks.h". (try_combine): If we create an unconditional trap, break the basic block in two just after it, and remove the edge between; also, set the *new_direct_jump_p flag so that cleanup_cfg is run. 2016-11-28 Segher Boessenkool * simplify-rtx.c (simplify_truncation): Handle truncate of zero_extract and sign_extract. 2016-11-28 Uros Bizjak * config/i386/i386.md (*and_1): Merge insn pattern from *andsi_1 and *andhi_1 using SWI24 mode iterator. Use multi-line output template string. (*anddi_1): Use multi-line output template string. (*andqi_1): Ditto. 2016-11-28 Jakub Jelinek PR middle-end/78540 * rtl.h (remove_reg_equal_equiv_notes): Return bool instead of void. * rtlanal.c (remove_reg_equal_equiv_notes): Return true if any note has been removed. * postreload.c (reload_combine_recognize_pattern): If remove_reg_equal_equiv_notes returns true, call df_notes_rescan. 2016-11-28 Martin Sebor PR middle-end/78520 * gimple-ssa-sprintf.c (target_max_value): Remove. (target_int_max, target_size_max): Use TYPE_MAX_VALUE. (get_width_and_precision): New function. (format_integer, format_floating, get_string_length, format_string): Correct handling of width and precision with unknown value. (format_directive): Add warning. (pass_sprintf_length::compute_format_length): Allow for precision to consist of a sole period with no asterisk or digits after it. 2016-11-28 Jakub Jelinek PR rtl-optimization/78546 * simplify-rtx.c (neg_const_int): When negating most negative number in mode wider than HOST_BITS_PER_WIDE_INT, use simplify_const_unary_operation to produce CONST_DOUBLE or CONST_WIDE_INT. (simplify_plus_minus): Handle the case where neg_const_int doesn't return a CONST_INT. 2016-11-28 Markus Trippelsdorf PR target/78556 * config/rs6000/rs6000.c (vspltis_constant): Add casts to avoid left shifting of negative values. 2016-11-28 Jakub Jelinek PR fortran/78298 * tree-nested.c (convert_local_reference_stmt): After adding shared (FRAME.NN) clause to omp parallel, task or target, add it also to all outer omp parallel, task or target constructs. 2016-11-28 Uros Bizjak * config/i386/i386.md (UNSPEC_KMASKOP): New. (UNSPEC_KMOV): Remove. (kmovw): Expand to plain HImode move. (k): Rename from *k. Use register_operand predicates. Tag pattern with UNSPEC_KMASKOP. Remove corresponding clobber-removing splitter. (*anddi_1): Remove mask register alternatives. (*andsi_1): Ditto. (*andhi_1): Ditto. (*andqi_1): Ditto. (*_1): Ditto. (*qi_1): Ditto. (kandn): Use SWI1248_AVX512BW mode iterator. Remove general register alternatives. Tag pattern with UNSPEC_KMASKOP. Remove corresponding splitter to operation with general registers. (*andn): Rename from *bmi_andn_. (*andn): New pattern. (*kxnor): Remove general register alternatives. Tag pattern with UNSPEC_KMASKOP. Remove corresponding splitter to operation with general registers. (knot): New insn pattern. (*one_cmpl2_1): Remove mask register alternatives. (one_cmplqi2_1): Ditto. (*k): Rename from *k3. Tag pattern with UNSPEC_KMASKOP. Add mode attribute. * config/i386/predicates.md (mask_reg_operand): Remove predicate. * config/i386/sse.md (vec_unpacks_hi_hi): Update pattern to generate kmaskop shift. (vec_unpacks_hi_): Ditto. * config/i386/i386-builtin.def (__builtin_ia32_kandhi): Use CODE_FOR_kandhi. (__builtin_ia32_knothi): Use CODE_FOR_knothi. (__builtin_ia32_korhi): Use CODE_FOR_kiorhi. (__builtin_ia32_kxorhi): Use CODE_FOR_kxorhi. 2016-11-28 Richard Biener * tree-vrp.c (vrp_visit_assignment_or_call): Handle simplifications to SSA names via extract_range_from_ssa_name if allowed. 2016-11-28 Richard Biener PR tree-optimization/78542 * tree-ssa-ccp.c (evaluate_stmt): Only valueize simplification if allowed. 2016-11-28 Paolo Bonzini * combine.c (simplify_if_then_else): Simplify IF_THEN_ELSE that isolates a single bit, even if the condition involves subregs. 2016-11-28 Tamar Christina * config/aarch64/aarch64-simd-builtins.def (BSL_P): Added di and v2di mode. * config/aarch64/arm_neon.h (vsriq_n_p64, vsri_n_p64): Added poly type. (vextq_p64, vext_p64): Likewise. (vceq_p64, vbslq_p64, vbsl_p64): Likewise. 2016-11-28 Tamar Christina * config/aarch64/aarch64-builtins.c (TYPES_SETREGP): Added poly type. (TYPES_GETREGP): Likewise. (TYPES_SHIFTINSERTP): Likewise. (TYPES_COMBINEP): Likewise. (TYPES_STORE1P): Likewise. * config/aarch64/aarch64-simd-builtins.def (combine): Added poly generator. (get_dregoi): Likewise. (get_dregci): Likewise. (get_dregxi): Likewise. (ssli_n): Likewise. (ld1): Likewise. (st1): Likewise. * config/aarch64/arm_neon.h (poly64x1x2_t, poly64x1x3_t): New. (poly64x1x4_t, poly64x2x2_t): Likewise. (poly64x2x3_t, poly64x2x4_t): Likewise. (poly64x1_t): Likewise. (vcreate_p64, vcombine_p64): Likewise. (vdup_n_p64, vdupq_n_p64): Likewise. (vld2_p64, vld2q_p64): Likewise. (vld3_p64, vld3q_p64): Likewise. (vld4_p64, vld4q_p64): Likewise. (vld2_dup_p64, vld3_dup_p64): Likewise. (vld4_dup_p64, vsli_n_p64): Likewise. (vsliq_n_p64, vst1_p64): Likewise. (vst1q_p64, vst2_p64): Likewise. (vst3_p64, vst4_p64): Likewise. (__aarch64_vdup_lane_p64, __aarch64_vdup_laneq_p64): Likewise. (__aarch64_vdupq_lane_p64, __aarch64_vdupq_laneq_p64): Likewise. (vget_lane_p64, vgetq_lane_p64): Likewise. (vreinterpret_p8_p64, vreinterpretq_p8_p64): Likewise. (vreinterpret_p16_p64, vreinterpretq_p16_p64): Likewise. (vreinterpret_p64_f16, vreinterpret_p64_f64): Likewise. (vreinterpret_p64_s8, vreinterpret_p64_s16): Likewise. (vreinterpret_p64_s32, vreinterpret_p64_s64): Likewise. (vreinterpret_p64_f32, vreinterpret_p64_u8): Likewise. (vreinterpret_p64_u16, vreinterpret_p64_u32): Likewise. (vreinterpret_p64_u64, vreinterpret_p64_p8): Likewise. (vreinterpretq_p64_f64, vreinterpretq_p64_s8): Likewise. (vreinterpretq_p64_s16, vreinterpretq_p64_s32): Likewise. (vreinterpretq_p64_s64, vreinterpretq_p64_f16): Likewise. (vreinterpretq_p64_f32, vreinterpretq_p64_u8): Likewise. (vreinterpretq_p64_u16, vreinterpretq_p64_u32): Likewise. (vreinterpretq_p64_u64, vreinterpretq_p64_p8): Likewise. (vreinterpret_f16_p64, vreinterpretq_f16_p64): Likewise. (vreinterpret_f32_p64, vreinterpretq_f32_p64): Likewise. (vreinterpret_f64_p64, vreinterpretq_f64_p64): Likewise. (vreinterpret_s64_p64, vreinterpretq_s64_p64): Likewise. (vreinterpret_u64_p64, vreinterpretq_u64_p64): Likewise. (vreinterpret_s8_p64, vreinterpretq_s8_p64): Likewise. (vreinterpret_s16_p64, vreinterpret_s32_p64): Likewise. (vreinterpretq_s32_p64, vreinterpret_u8_p64): Likewise. (vreinterpret_u16_p64, vreinterpretq_u16_p64): Likewise. (vreinterpret_u32_p64, vreinterpretq_u32_p64): Likewise. (vset_lane_p64, vsetq_lane_p64): Likewise. (vget_low_p64, vget_high_p64): Likewise. (vcombine_p64, vst2_lane_p64): Likewise. (vst3_lane_p64, vst4_lane_p64): Likewise. (vst2q_lane_p64, vst3q_lane_p64): Likewise. (vst4q_lane_p64, vget_lane_p64): Likewise. (vget_laneq_p64, vset_lane_p64): Likewise. (vset_laneq_p64, vcopy_lane_p64): Likewise. (vcopy_laneq_p64, vdup_n_p64): Likewise. (vdupq_n_p64, vdup_lane_p64): Likewise. (vdup_laneq_p64, vld1_p64): Likewise. (vld1q_p64, vld1_dup_p64): Likewise. (vld1q_dup_p64, vld1q_dup_p64): Likewise. (vmov_n_p64, vmovq_n_p64): Likewise. (vst3q_p64, vst4q_p64): Likewise. (vld1_lane_p64, vld1q_lane_p64): Likewise. (vst1_lane_p64, vst1q_lane_p64): Likewise. (vcopy_laneq_p64, vcopyq_laneq_p64): Likewise. (vdupq_laneq_p64): Likewise. 2016-11-28 Tamar Christina * config/arm/arm_neon.h (vget_lane_p64): New. 2016-11-28 Iain Sandoe PR target/71767 * configure.ac (with_ld64): Use portable method to extract the major part of the version number. * configure: Regenerated. 2016-11-28 Jakub Jelinek * gimple-ssa-sprintf.c (build_intmax_type_nodes): Look at UINTMAX_TYPE rather than SIZE_TYPE. Add gcc_unreachable if intmax_t couldn't be determined. (format_integer): Make {,u}intmax_type_node no longer static, initialize them only when needed. For z and t use signed_or_unsigned_type_for instead of assuming size_t and ptrdiff_t have the same precision. PR lto/78211 * ipa-icf.h (sem_item_optimizer): Add m_classes_vec member. * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Initialize it. (sem_item_optimizer::~sem_item_optimizer): Traverse m_classes_vec vector instead of traversing m_classes hash table. Release m_classes_vec. (sem_item_optimizer::read_section, sem_item_optimizer::add_class): Formatting fixes. (sem_item_optimizer::get_group_by_hash): When inserting a new group, add it also to m_classes_vec vector. (sem_item_optimizer::remove_symtab_node, sem_item_optimizer::build_hash_based_classes, sem_item_optimizer::parse_nonsingleton_classes): Formatting fixes. (sem_item_optimizer::subdivide_classes_by_equality, sem_item_optimizer::subdivide_classes_by_sensitive_refs, sem_item_optimizer::verify_classes): Traverse m_classes_vec vector instead of traversing m_classes hash table. Formatting fixes. (sem_item_optimizer::traverse_congruence_split, sem_item_optimizer::do_congruence_step_for_index, sem_item_optimizer::do_congruence_step): Formatting fixes. (sem_item_optimizer::process_cong_reduction): Traverse m_classes_vec vector instead of traversing m_classes hash table. (sem_item_optimizer::dump_cong_classes): Likewise. Formatting fixes. (sem_item_optimizer::merge_classes): Traverse m_classes_vec vector instead of traversing m_classes hash table. 2016-11-28 Georg-Johann Lay * config/avr/avr.c (out_movhi_r_mr) [REG_X + PLUS]: Only SBIW if X is not unused after. 2016-11-28 Bernd Schmidt PR rtl-optimization/78120 * rtlanal.c (insn_rtx_cost): Revert previous change. 2016-11-28 Georg-Johann Lay PR 41076 * config/avr/avr.md (SPLIT34): New mode iterator. (bitop): New code iterator. (*iorhi3.ashift8-*). New insn-and-split patterns. (*movhi): Post-reload split reg = 0. [!MOVW]: Post-reload split reg = reg. (*mov) [SI,SF,PSI,SQ,USQ,SA,USA]: Post-reload split reg = reg. (andhi3, andpsi3, andsi3): Post-reload split reg-reg operations. (iorhi3, iorpsi3, iorsi3): Same. (xorhi3, xorpsi3, xorsi3): Same. * config/avr/avr.c (avr_rtx_costs_1) [IOR && HImode]: Adjust rtx costs to *iorhi3.ashift8-* patterns. 2016-11-27 Iain Sandoe Rainer Orth PR target/67710 * config.in: Regenerate * config/darwin-driver.c (darwin_driver_init): Emit a version string for the assembler. * config/darwin.h(ASM_MMACOSX_VERSION_MIN_SPEC): New, new tests. * config/darwin.opt(asm_macosx_version_min): New. * config/i386/darwin.h: Handle ASM_MMACOSX_VERSION_MIN_SPEC. * configure: Regenerate * configure.ac: Check for mmacosx-version-min handling. 2016-11-27 Iain Sandoe PR target/57438 * config/i386/i386.c (ix86_code_end): Note that we emitted code where the function might otherwise appear empty for picbase thunks. (ix86_output_function_epilogue): If we find a zero-sized function assume that reaching it is UB and trap. If we find a trailing label append a nop. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): If we find a zero-sized function assume that reaching it is UB and trap. If we find a trailing label, append a nop. 2016-11-27 Iain Sandoe PR target/71767 * config/darwin-sections.def (picbase_thunk_section): New. * config/darwin.c (darwin_init_sections): Set up picbase thunk section. (darwin_rodata_section, darwin_objc2_section, machopic_select_section, darwin_asm_declare_constant_name, darwin_emit_weak_or_comdat, darwin_function_section): Don’t use coalesced with newer linkers. (darwin_override_options): Decide on usage of coalesed sections on the basis of the target linker version. * config/darwin.h (MIN_LD64_NO_COAL_SECTS): New. * config/darwin.opt (mtarget-linker): New. * config/i386/i386.c (ix86_code_end): Do not force the thunks into a coalesced section, instead use a thunks section. 2016-11-27 Iain Sandoe PR target/71767 * configure.ac (with-ld64): New var, set for Darwin, set on detection of ld64, gcc_cv_ld64_export_dynamic: New, New test. * config/darwin.h: Use LD64_HAS_DYNAMIC export. DEF_LD64: New, define. * config/darwin10.h(DEF_LD64): Update for this target version. * config/darwin12.h(LINK_GCC_C_SEQUENCE_SPEC): Remove rdynamic test. (DEF_LD64): Update for this target version. * configure: Regenerated. * config.in: Regenerated. 2016-11-27 Iain Sandoe PR target/71767 * config/darwin.c (imachopic_indirection_name): Make data section indirections linker-visible. * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Make local constant labels linker-visible. 2016-11-26 Prathamesh Kulkarni * tree.c (build_common_tree_nodes): Initialize ptrdiff_type_node. (free_lang_data): Remove assignment to ptrdiff_type_node. 2016-11-25 Jakub Jelinek PR rtl-optimization/78526 * simplify-rtx.c (simplify_immed_subreg): Don't use wi::extract_uhwi beyond val's precision. PR rtl-optimization/78527 * combine.c (make_compound_operation_int): Ignore LSHIFTRT with out of bounds shift count. 2016-11-25 Martin Liska PR web/71666 * doc/invoke.texi (-fprofile-use): Fix reference to a section where -fprofile-generate is documented. 2016-11-25 Martin Liska PR gcov-profile/78086 * coverage.c (build_init_ctor): Don't use priority {cd}tors if not supported by a target. Set priority to 100 if possible. (build_gcov_exit_decl): Likewise. 2016-11-25 Richard Biener PR ipa/78515 * ipa-prop.c (compute_complex_assign_jump_func): Properly identify unary, binary and single RHSs. * tree.def (BIT_INSERT_EXPR): Adjust tree code name. 2016-11-25 Bin Cheng PR middle-end/78507 PR middle-end/78510 PR middle-end/78517 * match.pd ((cond (cmp (convert1? @1) @3) (convert2? @1) @2)): Use cmp directly, rather than cmp_code. Initialize code to ERROR_MARK and set it to result code if transformation is valid. Use code EQ directly in last simplification case. 2016-11-25 Richard Biener * gimple-fold.c (fold_stmt_1): Check may_propagate_copy before valueizing return stmts. 2016-11-24 Richard Biener PR tree-optimization/78343 * passes.def: Add CD-DCE pass after loop splitting. * tree-ssa-dce.c (find_obviously_necessary_stmts): Move SCEV init/finalize ... (perform_tree_ssa_dce): ... here. Deal with being executed inside the loop pipeline in aggressive mode. 2016-11-25 Thomas Preud'homme * tree-ssa-math-opts.c (struct symbolic_number): Improve comment. 2016-11-25 Thomas Preud'homme PR tree-optimization/77673 * tree-ssa-math-opts.c (struct symbolic_number): Add new src field. (init_symbolic_number): Initialize src field from src parameter. (perform_symbolic_merge): Select most dominated statement as the source statement. Set src field of resulting n structure from the input src with the lowest address. (find_bswap_or_nop): Rename source_stmt into ins_stmt. (bswap_replace): Rename src_stmt into ins_stmt. Initially get source of load from src field rather than insertion statement. Cancel optimization if statement analyzed is not dominated by the insertion statement. (pass_optimize_bswap::execute): Rename src_stmt to ins_stmt. Compute dominance information. 2016-11-25 Eric Botcazou PR ada/67205 * config/mips/mips.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define. 2016-11-25 Martin Jambor PR tree-optimization/70965 * passes.def (pass_build_ssa_passes): Add pass_rebuild_cgraph_edges. 2016-11-24 James Greenahlgh PR target/78509 * config/i386/i386.c (i386_excess_precision): Do not return FLT_EVAL_METHOD_UNPREDICTABLE when "type" is EXCESS_PRECISION_TYPE_STANDARD. * target.def (excess_precision): Document that targets should not return FLT_EVAL_METHOD_UNPREDICTABLE when "type" is EXCESS_PRECISION_TYPE_STANDARD or EXCESS_PRECISION_TYPE_FAST. Fix typo in first sentence. * doc/tm.texi: Regenerate. 2016-11-25 Richard Biener PR tree-optimization/78396 * tree-vectorizer.c (vectorize_loops): When the if-converted body contains masked loads or stores do not attempt to basic-block-vectorize it. 2016-11-25 Richard Sandiford Alan Hayward David Sherwood * function.h (spill_slot_alignment): Declare. * function.c (spill_slot_alignment): New function. * lra-spills.c (slot): Add align and size fields. (assign_mem_slot): Use them in the call to assign_stack_local. (add_pseudo_to_slot): Update the fields. (assign_stack_slot_num_and_sort_pseudos): Initialise the fields. 2016-11-25 Richard Sandiford Alan Hayward David Sherwood * stor-layout.c (layout_type): Allow the caller to set the mode of a float type. Only choose one here if the mode is still VOIDmode. * tree.c (build_common_tree_nodes): Set the type mode of decimal floats before calling layout_type. * config/rs6000/rs6000.c (rs6000_init_builtins): Likewise. 2016-11-25 Richard Sandiford * tree-tailcall.c (find_tail_calls): Allow calls to reference local variables if all references are known to be direct. 2016-11-25 Jakub Jelinek Prathamesh Kulkarni PR middle-end/78501 * tree-vrp.c (extract_range_basic): Check for ptrdiff_type_node to be non null and it's precision matches precision of lhs's type. 2016-11-24 Martin Sebor PR tree-optimization/78476 * gimple-ssa-sprintf.c (struct pass_sprintf_length::call_info): Add a member. (handle_gimple_call): Adjust signature. (try_substitute_return_value): Remove calls to bounded functions with zero buffer size whose result is known. (pass_sprintf_length::execute): Adjust call to handle_gimple_call. 2016-11-24 Rainer Orth * varasm.c (assemble_start_function): Wrap align_log definition in ASM_OUTPUT_MAX_SKIP_ALIGN. 2016-11-24 Uros Bizjak * config/i386/i386.md (wide AND insn to QImode splitter): Use explicit mode macros. (wide OR insn to QImode splitter): Ditto. 2016-11-24 Vladimir Makarov PR rtl-optimization/77541 * lra-constraints.c (struct input_reload): Add field match_p. (get_reload_reg): Check modes of input reloads to generate unique value reload pseudo. (match_reload): Add input reload pseudo for the current insn. 2016-11-24 James Greenhalgh * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Update __FLT_EVAL_METHOD__ and __FLT_EVAL_METHOD_C99__ when we switch architecture levels. * config/aarch64/aarch64.c (aarch64_promoted_type): Only promote the aarch64_fp16_type_node, not all HFmode types. (aarch64_libgcc_floating_mode_supported_p): Support HFmode. (aarch64_scalar_mode_supported_p): Likewise. (aarch64_excess_precision): New. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define. (TARGET_SCALAR_MODE_SUPPORTED_P): Likewise. (TARGET_C_EXCESS_PRECISION): Likewise. 2016-11-24 James Greenhalgh * config/aarch64/aarch64-c.c (aarch64_scalar_mode_supported_p): New. (TARGET_SCALAR_MODE_SUPPORTED_P): Define. 2016-11-24 James Greenhalgh * config/aarch64/aarch64.md (sihf2): Convert to expand. (dihf2): Likewise. (aarch64_fp16_hf2): New. 2016-11-24 Alexander Monakov PR target/67822 * config/nvptx/mkoffload.c (main): Allow -fopenmp. 2016-11-24 Eric Botcazou * common/config/sparc/sparc-common.c (sparc_option_optimization_table): Enable REE at -O2 and higher. * config/sparc/sparc.c (sparc_option_override): Disable it by default in 32-bit mode. 2016-11-24 Kyrylo Tkachov PR target/48863 PR inline-asm/70184 * tree-ssa-ter.c (temp_expr_table): Add reg_vars_cnt field. (new_temp_expr_table): Initialise reg_vars_cnt. (free_temp_expr_table): Release reg_vars_cnt. (process_replaceable): Add reg_vars_cnt argument, set reg_vars_cnt field of TAB. (find_replaceable_in_bb): Use the above to record register variable write occurrences and cancel replacement across them. 2016-11-24 Eric Botcazou PR rtl-optimization/78437 * ree.c (get_uses): New function. (combine_reaching_defs): When a copy is needed, return false if any reaching use of the source register reads it in a mode larger than the mode it is set in and WORD_REGISTER_OPERATIONS is true. 2016-11-24 Martin Liska * gimple-pretty-print.c (dump_edge_probability): New function. (dump_gimple_switch): Dump label edge probabilities. (dump_gimple_cond): Likewise. (dump_gimple_label): Dump (dump_gimple_bb_header): Dump basic block frequency. (pp_cfg_jump): Replace e->dest argument with e. (dump_implicit_edges): Likewise. * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use gimple_bb (at) instead of at->bb. 2016-11-24 Bernd Schmidt * common.opt (flimit-function-alignment): New. * doc/invoke.texi (-flimit-function-alignment): Document. * emit-rtl.h (struct rtl_data): Add max_insn_address field. * final.c (shorten_branches): Set it. * varasm.c (assemble_start_function): Limit alignment if requested. 2016-11-24 Richard Biener PR tree-optimization/71595 * cfgloopmanip.h (remove_path): Add irred_invalidated and loop_closed_ssa_invalidated parameters, defaulted to NULL. * cfgloopmanip.c (remove_path): Likewise, pass them along to called functions. Only fix irred flags if the caller didn't request state. * tree-ssa-loop-ivcanon.c (unloop_loops): Use add_bb_to_loop. (unloop_loops): Pass irred_invalidated and loop_closed_ssa_invalidated to remove_path. 2016-11-24 Bernd Schmidt PR rtl-optimization/78120 * ifcvt.c (noce_conversion_profitable_p): Check original cost in all cases, and additionally test against max_seq_cost for speed optimization. (noce_process_if_block): Compute an estimate for the original cost when optimizing for speed, using the minimum of then and else block costs. PR rtl-optimization/78120 * rtlanal.c (insn_rtx_cost): Use set_rtx_cost. PR rtl-optimization/78120 * config/i386/i386.c (ix86_rtx_costs): Fully handle SETs. 2016-11-24 Bin Cheng * match.pd: Refine type conversion in result expr for below pattern: (cond (cmp (convert1? x) c1) (convert2? x) c2) -> (minmax (x c)). 2016-11-24 Eric Botcazou PR middle-end/78429 * tree.h (wi::fits_to_boolean_p): New predicate. (wi::fits_to_tree_p): Use it for boolean types. * tree.c (int_fits_type_p): Likewise. 2016-11-24 Martin Liska * print-tree.c (struct bucket): Remove. (print_node): Add new argument which drives whether a tree node is printed briefly or not. (debug_tree): Replace a custom hash table with hash_set. * print-tree.h (print_node): Add the argument. 2016-11-24 Chung-Lin Tang * config/nios2/nios2.c (nios2_init_libfuncs): Add ATTRIBUTE_UNUSED. 2016-11-23 Peter Bergner PR target/78458 * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return MODE if it is at least NREGS wide. 2016-11-23 Joseph Myers * config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p): For TARGET_E500_DOUBLE. handle TDmode, TImode and PTImode the same as TFmode, IFmode and KFmode. 2016-11-23 Joseph Myers * config/rs6000/spe.md (*frob__ti_8): New insn pattern. 2016-11-23 Segher Boessenkool * combine.c (change_zero_ext): Only change the mode of a hard register destination if can_change_dest_mode holds for that. 2016-11-23 Jeff Law * varasm.c (assemble_name): Increase buffer size for name. * config/spu/spu.md (floatunsdidf2): Remove unused local variable. 2016-11-23 Jakub Kicinski * doc/extend.texi: Constify first argument to __builtin_object_size. 2016-11-23 Bernd Edlinger * opth-gen.awk: Use unsigned shifts for bit masks. Allow all bits to be used. Add brackets around macro argument. 2016-11-23 Uros Bizjak * config/i386/i386.md (*hi_1): Fix operand 2 constraints. 2016-11-23 Jakub Jelinek PR sanitizer/69278 * opts.c (parse_sanitizer_options): For -fsanitize=undefined, restore enabling also SANITIZE_UNREACHABLE and SANITIZE_RETURN. 2016-11-23 Jakub Jelinek PR middle-end/69183 * omp-low.c (build_outer_var_ref): Change lastprivate argument to code, pass it recursively, adjust uses. For OMP_CLAUSE_PRIVATE on worksharing constructs, treat it like clauses on simd construct. Formatting fix. (lower_rec_input_clauses): For OMP_CLAUSE_PRIVATE_OUTER_REF pass OMP_CLAUSE_PRIVATE as last argument to build_outer_var_ref. (lower_lastprivate_clauses): Pass OMP_CLAUSE_LASTPRIVATE instead of true as last argument to build_outer_var_ref. 2016-11-23 Uros Bizjak * config/i386/i386.md (*movqi_internal): Calculate mode attribute of alternatives 7,8,9 depending on TARGET_AVX512DQ. : Emit kmovw for MODE_HI insn mode attribute. (*k): Calculate mode attribute depending on TARGET_AVX512DQ. Emit kw for MODE_HI insn mode attribute. (*andqi_1): Calculate mode attribute of alternative 3 depending on TARGET_AVX512DQ. Emit kandw for MODE_HI insn mode attribute. (kandn): Calculate mode attribute of alternative 2 depending on TARGET_AVX512DQ. Emit kandnw for MODE_HI insn mode attribute. (kxnor): Merge insn patterns using SWI1248_AVX512BW mode iterator. Calculate mode attribute of alternative 1 depending on TARGET_AVX512DQ. Emit kxnorw for MODE_HI insn mode attribute. (*one_cmplqi2_1): Calculate mode attribute of alternative 2 depending on TARGET_AVX512DQ. Emit knotw for MODE_HI insn mode attribute. 2016-11-23 Prathamesh Kulkarni PR middle-end/78153 * gimple-fold.c (fold_stmt_1): Handle case for GIMPLE_RETURN. * tree-vrp.c (extract_range_basic): Handle case for CFN_BUILT_IN_STRLEN. 2016-11-23 Jeff Law * config/mcore/mcore.c (emit_new_cond_insn): Fix prototype. * config/iq2000/iq2000.c (iq2000_rtx_costs): Avoid multiplication in boolean context warning. * config/ia64/ia64.c (ia64_emit_insn_before): Fix prototype. 2016-11-23 James Greenhalgh PR target/63250 * config/arm/arm-builtins.c (arm_simd_floatHF_type_node): Rename to... (arm_fp16_type_node): ...This, make visibile. (arm_simd_builtin_std_type): Rename arm_simd_floatHF_type_node to arm_fp16_type_node. (arm_init_simd_builtin_types): Likewise. (arm_init_fp16_builtins): Likewise. * config/arm/arm.c (arm_excess_precision): New. (arm_floatn_mode): Likewise. (TARGET_C_EXCESS_PRECISION): Likewise. (TARGET_FLOATN_MODE): Likewise. (arm_promoted_type): Only promote arm_fp16_type_node. * config/arm/arm.h (arm_fp16_type_node): Declare. 2016-11-23 James Greenhalgh * config/arm/arm.c (arm_convert_to_type): Delete. (TARGET_CONVERT_TO_TYPE): Delete. (arm_init_libfuncs): Enable trunc_optab from DFmode to HFmode. (arm_libcall_uses_aapcs_base): Add trunc_optab from DF- to HFmode. * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): New. * config/arm/arm.md (truncdfhf2): Only convert through SFmode if we are in fast math mode, and have no single step hardware instruction. (extendhfdf2): Only expand through SFmode if we don't have a single-step hardware instruction. * config/arm/vfp.md (*truncdfhf2): New. (extendhfdf2): Likewise. 2016-11-23 James Greenhalgh * targhooks.c (default_floatn_mode): Enable _Float16 if a target provides HFmode. 2016-11-23 James Greenhalgh * config/s390/s390.h (TARGET_FLT_EVAL_METHOD): Delete. * config/m68k/m68k.h (TARGET_FLT_EVAL_METHOD): Delete. * config/i386/i386.h (TARGET_FLT_EVAL_METHOD): Delete. * defaults.h (TARGET_FLT_EVAL_METHOD): Delete. * doc/tm.texi.in (TARGET_FLT_EVAL_METHOD): Delete. * doc/tm.texi: Regenerate. * system.h (TARGET_FLT_EVAL_METHOD): Poison. 2016-11-23 James Greenhalgh * toplev.c (init_excess_precision): Delete most logic. * tree.c (excess_precision_type): Rewrite to use TARGET_EXCESS_PRECISION. * doc/invoke.texi (-fexcess-precision): Document behaviour in a more generic fashion. * ginclude/float.h: Wrap definition of FLT_EVAL_METHOD in __STDC_WANT_IEC_60559_TYPES_EXT__. 2016-11-23 James Greenhalgh * common.opt (fpermitted-flt-eval-methods): New. * doc/invoke.texi (-fpermitted-flt-eval-methods): Document it. * flag_types.h (permitted_flt_eval_methods): New. 2016-11-23 James Greenhalgh * config/m68k/m68k.c (m68k_excess_precision): New. (TARGET_C_EXCESS_PRECISION): Define. 2016-11-23 James Greenhalgh * config/s390/s390.c (s390_excess_precision): New. (TARGET_C_EXCESS_PRECISION): Define. 2016-11-23 James Greenhalgh * config/i386/i386.c (ix86_excess_precision): New. (TARGET_C_EXCESS_PRECISION): Define. 2016-11-23 James Greenhalgh * target.def (excess_precision): New hook. * target.h (flt_eval_method): New. (excess_precision_type): Likewise. * targhooks.c (default_excess_precision): New. * targhooks.h (default_excess_precision): New. * doc/tm.texi.in (TARGET_C_EXCESS_PRECISION): New. * doc/tm.texi: Regenerate. 2016-11-23 Martin Sebor PR middle-end/78461 * gimple-ssa-sprintf.c (format_string): Correct the maxima and set the minimum number of bytes for an unknown string to zero. 2016-11-23 Martin Jambor Martin Liska * hsa-builtins.def: New file. * Makefile.in (BUILTINS_DEF): Add hsa-builtins.def dependency. * builtins.def: Include hsa-builtins.def. (DEF_HSA_BUILTIN): New macro. * dumpfile.h (OPTGROUP_OPENMP): Define. * dumpfile.c (optgroup_options): Added OPTGROUP_OPENMP. * gimple.h (gf_mask): Added elements GF_OMP_FOR_GRID_INTRA_GROUP and GF_OMP_FOR_GRID_GROUP_ITER. (gimple_omp_for_grid_phony): Added checking assert. (gimple_omp_for_set_grid_phony): Likewise. (gimple_omp_for_grid_intra_group): New function. (gimple_omp_for_set_grid_intra_group): Likewise. (gimple_omp_for_grid_group_iter): Likewise. (gimple_omp_for_set_grid_group_iter): Likewise. * omp-low.c (check_omp_nesting_restrictions): Allow GRID loop where previosuly only distribute loop was permitted. (lower_lastprivate_clauses): Allow non tcc_comparison predicates. (grid_get_kernel_launch_attributes): Support multiple HSA grid dimensions. (grid_expand_omp_for_loop): Likewise and also support standalone distribute constructs. New parameter INTRA_GROUP, updated both users. (grid_expand_target_grid_body): Support standalone distribute constructs. (pass_data_expand_omp): Changed optinfo_flags to OPTGROUP_OPENMP. (pass_data_expand_omp_ssa): Likewise. (pass_data_omp_device_lower): Likewsie. (pass_data_lower_omp): Likewise. (pass_data_diagnose_omp_blocks): Likewise. (pass_data_oacc_device_lower): Likewise. (pass_data_omp_target_link): Likewise. (grid_lastprivate_predicate): New function. (lower_omp_for_lastprivate): Call grid_lastprivate_predicate for gridified loops. (lower_omp_for): Support standalone distribute constructs. (grid_prop): New type. (grid_safe_assignment_p): Check for assignments to group_sizes, new parameter GRID. (grid_seq_only_contains_local_assignments): New parameter GRID, pass it to callee. (grid_find_single_omp_among_assignments_1): Likewise, improve missed optimization info messages. (grid_find_single_omp_among_assignments): Likewise. (grid_find_ungridifiable_statement): Do not bail out for SIMDs. (grid_parallel_clauses_gridifiable): New function. (grid_inner_loop_gridifiable_p): Likewise. (grid_dist_follows_simple_pattern): Likewise. (grid_gfor_follows_tiling_pattern): Likewise. (grid_call_permissible_in_distribute_p): Likewise. (grid_handle_call_in_distribute): Likewise. (grid_dist_follows_tiling_pattern): Likewise. (grid_target_follows_gridifiable_pattern): Support standalone distribute constructs. (grid_var_segment): New enum. (grid_mark_variable_segment): New function. (grid_copy_leading_local_assignments): Call grid_mark_variable_segment if a new argument says so. (grid_process_grid_body): New function. (grid_eliminate_combined_simd_part): Likewise. (grid_mark_tiling_loops): Likewise. (grid_mark_tiling_parallels_and_loops): Likewise. (grid_process_kernel_body_copy): Support standalone distribute constructs. (grid_attempt_target_gridification): New grid variable holding overall gridification state. Support standalone distribute constructs and collapse clauses. * doc/optinfo.texi (Optimization groups): Document OPTGROUP_OPENMP. * hsa.h (hsa_bb): Add method method append_phi. (hsa_insn_br): Renamed to hsa_insn_cbr, renamed all occurences in all files too. (hsa_insn_br): New class, now the ancestor of hsa_incn_cbr. (is_a_helper ::test): New function. (is_a_helper ::test): Adjust to only cover conditional branch instructions. (hsa_insn_signal): Make a direct descendant of hsa_insn_basic. Add memorder constructor parameter and m_memory_order and m_signalop member variables. (hsa_insn_queue): Changed constructor parameters to common form. Added m_segment and m_memory_order member variables. (hsa_summary_t): Add private member function process_gpu_implementation_attributes. (hsa_function_summary): Rename m_binded_function to m_bound_function. (hsa_insn_basic_p): Remove typedef. (hsa_op_with_type): Change hsa_insn_basic_p into plain pointers. (hsa_op_reg_p): Remove typedef. (hsa_function_representation): Change hsa_op_reg_p into plain pointers. (hsa_insn_phi): Removed new and delete operators. (hsa_insn_br): Likewise. (hsa_insn_cbr): Likewise. (hsa_insn_sbr): Likewise. (hsa_insn_cmp): Likewise. (hsa_insn_mem): Likewise. (hsa_insn_atomic): Likewise. (hsa_insn_signal): Likewise. (hsa_insn_seg): Likewise. (hsa_insn_call): Likewise. (hsa_insn_arg_block): Likewise. (hsa_insn_comment): Likewise. (hsa_insn_srctype): Likewise. (hsa_insn_packed): Likewise. (hsa_insn_cvt): Likewise. (hsa_insn_alloca): Likewise. * hsa.c (hsa_destroy_insn): Also handle instances of hsa_insn_br. (process_gpu_implementation_attributes): New function. (link_functions): Move some functionality into it. Adjust after renaming m_binded_functions to m_bound_functions. (hsa_insn_basic::op_output_p): Add BRIG_OPCODE_DEBUGTRAP to the list of instructions with no output registers. (get_in_type): Return this if it is a register of matching size. (hsa_get_declaration_name): Moved to... * hsa-gen.c (hsa_get_declaration_name): ...here. Allocate temporary string on an obstack instead from ggc. (query_hsa_grid): Renamed to query_hsa_grid_dim, reimplemented, cut down to two overloads. (hsa_allocp_operand_address): Removed. (hsa_allocp_operand_immed): Likewise. (hsa_allocp_operand_reg): Likewise. (hsa_allocp_operand_code_list): Likewise. (hsa_allocp_operand_operand_list): Likewise. (hsa_allocp_inst_basic): Likewise. (hsa_allocp_inst_phi): Likewise. (hsa_allocp_inst_mem): Likewise. (hsa_allocp_inst_atomic): Likewise. (hsa_allocp_inst_signal): Likewise. (hsa_allocp_inst_seg): Likewise. (hsa_allocp_inst_cmp): Likewise. (hsa_allocp_inst_br): Likewise. (hsa_allocp_inst_sbr): Likewise. (hsa_allocp_inst_call): Likewise. (hsa_allocp_inst_arg_block): Likewise. (hsa_allocp_inst_comment): Likewise. (hsa_allocp_inst_queue): Likewise. (hsa_allocp_inst_srctype): Likewise. (hsa_allocp_inst_packed): Likewise. (hsa_allocp_inst_cvt): Likewise. (hsa_allocp_inst_alloca): Likewise. (hsa_allocp_bb): Likewise. (hsa_obstack): New. (hsa_init_data_for_cfun): Initialize obstack. (hsa_deinit_data_for_cfun): Release memory of the obstack. (hsa_op_immed::operator new): Use obstack instead of object_allocator. (hsa_op_reg::operator new): Likewise. (hsa_op_address::operator new): Likewise. (hsa_op_code_list::operator new): Likewise. (hsa_op_operand_list::operator new): Likewise. (hsa_insn_basic::operator new): Likewise. (hsa_insn_phi::operator new): Likewise. (hsa_insn_br::operator new): Likewise. (hsa_insn_sbr::operator new): Likewise. (hsa_insn_cmp::operator new): Likewise. (hsa_insn_mem::operator new): Likewise. (hsa_insn_atomic::operator new): Likewise. (hsa_insn_signal::operator new): Likewise. (hsa_insn_seg::operator new): Likewise. (hsa_insn_call::operator new): Likewise. (hsa_insn_arg_block::operator new): Likewise. (hsa_insn_comment::operator new): Likewise. (hsa_insn_srctype::operator new): Likewise. (hsa_insn_packed::operator new): Likewise. (hsa_insn_cvt::operator new): Likewise. (hsa_insn_alloca::operator new): Likewise. (hsa_init_new_bb): Likewise. (hsa_bb::append_phi): New function. (gen_hsa_phi_from_gimple_phi): Use it. (get_symbol_for_decl): Fix dinstinguishing between global and local functions. Put local variables into a segment according to their attribute or static flag, if there is one. (hsa_insn_br::hsa_insn_br): New. (hsa_insn_br::operator new): Likewise. (hsa_insn_cbr::hsa_insn_cbr): Set width via ancestor constructor. (query_hsa_grid_nodim): New function. (multiply_grid_dim_characteristics): Likewise. (gen_get_num_threads): Likewise. (gen_get_num_teams): Reimplemented. (gen_get_team_num): Likewise. (gen_hsa_insns_for_known_library_call): Updated calls to the above helper functions. (get_memory_order_name): Removed. (get_memory_order): Likewise. (hsa_memorder_from_tree): New function. (gen_hsa_ternary_atomic_for_builtin): Renamed to gen_hsa_atomic_for_builtin, can also create signals. (gen_hsa_insns_for_call): Handle many new builtins. Adjust to use hsa_memory_order_from_tree and gen_hsa_atomic_for_builtin. (hsa_insn_atomic): Fix function comment. (hsa_insn_signal::hsa_insn_signal): Fix comment. Update call to ancestor constructor and initialization of new member variables. (hsa_insn_queue::hsa_insn_queue): Added initialization of new member variables. (hsa_get_host_function): Handle functions with no bound CPU implementation. Fix binded to bound. (get_brig_function_name): Likewise. (HSA_SORRY_ATV): Remove semicolon after macro. (HSA_SORRY_AT): Likewise. (omp_simple_builtin::generate): Add missing semicolons. (hsa_insn_phi::operator new): Removed. (hsa_insn_br::operator new): Likewise. (hsa_insn_cbr::operator new): Likewise. (hsa_insn_sbr::operator new): Likewise. (hsa_insn_cmp::operator new): Likewise. (hsa_insn_mem::operator new): Likewise. (hsa_insn_atomic::operator new): Likewise. (hsa_insn_signal::operator new): Likewise. (hsa_insn_seg::operator new): Likewise. (hsa_insn_call::operator new): Likewise. (hsa_insn_arg_block::operator new): Likewise. (hsa_insn_comment::operator new): Likewise. (hsa_insn_srctype::operator new): Likewise. (hsa_insn_packed::operator new): Likewise. (hsa_insn_cvt::operator new): Likewise. (hsa_insn_alloca::operator new): Likewise. (get_symbol_for_decl): Accept CONST_DECLs, put them to readonly segment. (gen_hsa_addr): Also process CONST_DECLs. (gen_hsa_addr_insns): Process CONST_DECLs by creating private copies. (gen_hsa_unary_operation): Make sure the function does not use bittype source type for firstbit and lastbit operations. (gen_hsa_popcount_to_dest): Make sure the function uses a bittype source type. * hsa-brig.c (emit_insn_operands): Cope with zero operands in an instruction. (emit_branch_insn): Renamed to emit_cond_branch_insn. Emit the width stored in the class. (emit_generic_branch_insn): New function. (emit_insn): Call emit_generic_branch_insn. (emit_signal_insn): Remove obsolete comment. Update member variable name, pick a type according to profile. (emit_alloca_insn): Remove obsolete comment. (emit_atomic_insn): Likewise. (emit_queue_insn): Get segment and memory order from the IR object. (hsa_brig_section): Make allocate_new_chunk, chunks and cur_chunk provate, add a default NULL parameter to add method. (hsa_brig_section::add): Added a new parameter, store pointer to output data there if it is non-NULL. (emit_function_directives): Use this new parameter instead of calculating the pointer itself, fix function comment. (hsa_brig_emit_function): Add forgotten endian conversion. (hsa_output_kernels): Remove unnecessary building of kernel_dependencies_vector_type. (emit_immediate_operand): Declare. (emit_directive_variable): Also emit initializers of CONST_DECLs. (gen_hsa_insn_for_internal_fn_call): Also handle IFN_RSQRT. (verify_function_arguments): Properly detect variadic arguments. * hsa-dump.c (hsa_width_specifier_name): New function. (dump_hsa_insn_1): Dump generic branch instructions, update signal member variable name. Special dumping for queue objects. * ipa-hsa.c (process_hsa_functions): Adjust after renaming m_binded_functions to m_bound_functions. Copy externally visible flag to the node. (ipa_hsa_write_summary): Likewise. (ipa_hsa_read_section): Likewise. 2016-11-23 Richard Biener PR tree-optimization/78396 * tree-vectorizer.c (vectorize_loops): If an innermost loop didn't vectorize try vectorizing an if-converted body using BB vectorization. 2016-11-23 Richard Sandiford Alan Hayward David Sherwood * rtlanal.c (subreg_get_info): Use more local variables. Remark that for HARD_REGNO_NREGS_HAS_PADDING, each scalar unit occupies at least one register. Assume that full hard registers have consistent endianness. Share previously-duplicated if block. Rework the main handling so that it operates on independently- addressable YMODE-sized blocks. Use subreg_size_lowpart_offset to check lowpart offsets, without trying to find an equivalent integer mode first. Handle WORDS_BIG_ENDIAN != REG_WORDS_BIG_ENDIAN as a final register-endianness correction. 2016-11-23 Segher Boessenkool PR target/77881 PR bootstrap/78390 PR target/78438 PR bootstrap/78477 * combine.c (make_compound_operation_int): Do not convert a subreg of a non-constant logical shift right to a zero_extract. Handle the case where some zero bits have been shifted into the range covered by that subreg. 2016-11-23 Richard Sandiford Alan Hayward David Sherwood * rtl.h (subreg_size_offset_from_lsb): Declare. (subreg_offset_from_lsb): New function. (subreg_size_lowpart_offset): Declare. (subreg_lowpart_offset): Turn into an inline function. (subreg_size_highpart_offset): Declare. (subreg_highpart_offset): Turn into an inline function. * emit-rtl.c (subreg_size_lowpart_offset): New function. (subreg_size_highpart_offset): Likewise * rtlanal.c (subreg_size_offset_from_lsb): Likewise. 2016-11-23 Richard Biener PR tree-optimization/78482 * tree-cfgcleanup.c: Include tree-ssa-loop-niter.h. (remove_forwarder_block_with_phi): When merging with a loop header creates a new latch reset number of iteration information of the loop. 2016-11-23 Eric Botcazou * config/sparc/sparc.md (*ashrsi3_extend): Rename to... (*ashrsi3_extend0): ...this. Accept constant integers. (*ashrsi3_extend2): Rename to... (*ashrsi3_extend1): ...this. (*ashrsi3_extend2): New pattern. (*lshrsi3_extend1): Accept constant integers. (*lshrsi3_extend2): Fix condition on operand 2. 2016-11-23 Martin Liska * config/i386/i386.c: Initialize function pointer to NULL. 2016-11-23 Bin Cheng * fold-const.c (fold_cond_expr_with_comparison): Move simplification for A == C1 ? A : C2 to below. * match.pd: Move from above to here: (cond (eq (convert1? x) c1) (convert2? x) c2) -> (cond (eq x c1) c1 c2). 2016-11-23 Bin Cheng * fold-const.c (fold_cond_expr_with_comparison): Move simplification for A cmp C1 ? A : C2 to below, also simplify remaining code. * match.pd: Move and extend simplification from above to here: (cond (cmp (convert1? x) c1) (convert2? x) c2) -> (minmax (x c)). * tree-if-conv.c (ifcvt_follow_ssa_use_edges): New func. (predicate_scalar_phi): Call fold_stmt using the new valueize func. 2016-11-23 Martin Liska Martin Jambor * doc/install.texi: Remove entry about --with-hsa-kmt-lib. 2016-11-23 Aldy Hernandez PR target/78213 * opts.c (finish_options): Set -fsyntax-only if running self tests. 2016-11-23 Richard Biener PR middle-end/71762 * match.pd ((~X & Y) -> X < Y, (X & ~Y) -> Y < X, (~X | Y) -> X <= Y, (X | ~Y) -> Y <= X): Remove. 2016-11-23 Richard Biener PR lto/78472 * tree.c (gimple_canonical_types_compatible_p): Ignore zero-sized fields. 2016-11-23 Richard Biener Prathamesh Kulkarni PR tree-optimization/78154 * tree-vrp.c (gimple_stmt_nonzero_warnv_p): Return true if function returns it's argument and the argument is nonnull. * builtin-attrs.def: Define ATTR_RETURNS_NONNULL, ATT_RETNONNULL_NOTHROW_LEAF. * builtins.def (BUILT_IN_MEMPCPY): Change attribute to ATTR_RETNONNULL_NOTHROW_LEAF. (BUILT_IN_STPCPY): Likewise. (BUILT_IN_STPNCPY): Likewise. (BUILT_IN_MEMPCPY_CHK): Likewise. (BUILT_IN_STPCPY_CHK): Likewise. (BUILT_IN_STPNCPY_CHK): Likewise. (BUILT_IN_STRCAT): Change attribute to ATTR_RET1_NOTHROW_NONNULL_LEAF. (BUILT_IN_STRNCAT): Likewise. (BUILT_IN_STRNCPY): Likewise. (BUILT_IN_MEMSET_CHK): Likewise. (BUILT_IN_STRCAT_CHK): Likewise. (BUILT_IN_STRCPY_CHK): Likewise. (BUILT_IN_STRNCAT_CHK): Likewise. (BUILT_IN_STRNCPY_CHK): Likewise. 2016-11-23 Naveen H.S * fold-const.c (tree_expr_nonzero_p) : Make non-static. * fold-const.h (tree_expr_nonzero_p) : Declare. * match.pd (cmp (mult:c @0 @1) (mult:c @2 @1) : New Pattern. 2016-11-23 Paolo Bonzini * system.h (HAVE_DESIGNATED_INITIALIZERS, HAVE_DESIGNATED_UNION_INITIALIZERS): Do not use "defined" in macros. * doc/cpp.texi (Defined): Mention -Wexpansion-to-defined. * doc/cppopts.texi (Invocation): Document -Wexpansion-to-defined. * doc/invoke.texi (Warning Options): Document -Wexpansion-to-defined. 2016-11-23 Georg-Johann Lay PR target/60300 * config/avr/constraints.md (Csp): Widen range to [-11..6]. * config/avr/avr.c (avr_prologue_setup_frame): Limit number of RCALLs in prologue to 3. 2016-11-22 Michael Collison * config/aarch64/aarch64-protos.h (aarch64_and_split_imm1, aarch64_and_split_imm2) (aarch64_and_bitmask_imm): New prototypes * config/aarch64/aarch64.c (aarch64_and_split_imm1): New overloaded function to create bit mask covering the lowest to highest bits set. (aarch64_and_split_imm2): New overloaded functions to create bit mask of zeros between first and last bit set. (aarch64_and_bitmask_imm): New function to determine if a integer is a valid two instruction "and" operation. * config/aarch64/aarch64.md:(and3): New define_insn and _split allowing wider range of constants with "and" operations. * (ior3, xor3): Use new LOGICAL2 iterator to prevent "and" operator from matching restricted constant range used for ior and xor operators. * config/aarch64/constraints.md (UsO constraint): New SImode constraint for constants in "and" operantions. (UsP constraint): New DImode constraint for constants in "and" operations. * config/aarch64/iterators.md (lconst2): New mode iterator. (LOGICAL2): New code iterator. * config/aarch64/predicates.md (aarch64_logical_and_immediate): New predicate. (aarch64_logical_and_operand): New predicate allowing extended constants for "and" operations. 2016-11-22 Walter Lee * config/tilegx/tilegx.md (trap): New pattern. * config/tilepro/tilepro.md (trap): Likewise. 2016-11-22 Walter Lee * config/tilegx/tilegx.md (*zero_extract): Use define_insn_and_split instead of define_insn; Handle pos + size > 64. (*sign_extract): Likewise. 2016-11-22 Marek Polacek PR tree-optimization/78455 * tree-ssa-uninit.c (can_chain_union_be_invalidated_p): Fix typo. 2016-11-22 Ian Lance Taylor PR go/78431 PR go/78432 * godump.c (go_format_type): Always pass alignment as 1 when calling go_append_padding at end of struct/union. 2016-11-22 Jakub Jelinek PR target/78451 * config/i386/avx512bwintrin.h (_mm512_setzero_qi, _mm512_setzero_hi): Removed. (_mm512_maskz_mov_epi16, _mm512_maskz_loadu_epi16, _mm512_maskz_mov_epi8, _mm512_maskz_loadu_epi8, _mm512_maskz_broadcastb_epi8, _mm512_maskz_set1_epi8, _mm512_maskz_broadcastw_epi16, _mm512_maskz_set1_epi16, _mm512_mulhrs_epi16, _mm512_maskz_mulhrs_epi16, _mm512_mulhi_epi16, _mm512_maskz_mulhi_epi16, _mm512_mulhi_epu16, _mm512_maskz_mulhi_epu16, _mm512_maskz_mullo_epi16, _mm512_cvtepi8_epi16, _mm512_maskz_cvtepi8_epi16, _mm512_cvtepu8_epi16, _mm512_maskz_cvtepu8_epi16, _mm512_permutexvar_epi16, _mm512_maskz_permutexvar_epi16, _mm512_avg_epu8, _mm512_maskz_avg_epu8, _mm512_maskz_add_epi8, _mm512_maskz_sub_epi8, _mm512_avg_epu16, _mm512_maskz_avg_epu16, _mm512_subs_epi8, _mm512_maskz_subs_epi8, _mm512_subs_epu8, _mm512_maskz_subs_epu8, _mm512_adds_epi8, _mm512_maskz_adds_epi8, _mm512_adds_epu8, _mm512_maskz_adds_epu8, _mm512_maskz_sub_epi16, _mm512_subs_epi16, _mm512_maskz_subs_epi16, _mm512_subs_epu16, _mm512_maskz_subs_epu16, _mm512_maskz_add_epi16, _mm512_adds_epi16, _mm512_maskz_adds_epi16, _mm512_adds_epu16, _mm512_maskz_adds_epu16, _mm512_srl_epi16, _mm512_maskz_srl_epi16, _mm512_packs_epi16, _mm512_sll_epi16, _mm512_maskz_sll_epi16, _mm512_maddubs_epi16, _mm512_maskz_maddubs_epi16, _mm512_unpackhi_epi8, _mm512_maskz_unpackhi_epi8, _mm512_unpackhi_epi16, _mm512_maskz_unpackhi_epi16, _mm512_unpacklo_epi8, _mm512_maskz_unpacklo_epi8, _mm512_unpacklo_epi16, _mm512_maskz_unpacklo_epi16, _mm512_shuffle_epi8, _mm512_maskz_shuffle_epi8, _mm512_min_epu16, _mm512_maskz_min_epu16, _mm512_min_epi16, _mm512_maskz_min_epi16, _mm512_max_epu8, _mm512_maskz_max_epu8, _mm512_max_epi8, _mm512_maskz_max_epi8, _mm512_min_epu8, _mm512_maskz_min_epu8, _mm512_min_epi8, _mm512_maskz_min_epi8, _mm512_max_epi16, _mm512_maskz_max_epi16, _mm512_max_epu16, _mm512_maskz_max_epu16, _mm512_sra_epi16, _mm512_maskz_sra_epi16, _mm512_srav_epi16, _mm512_maskz_srav_epi16, _mm512_srlv_epi16, _mm512_maskz_srlv_epi16, _mm512_sllv_epi16, _mm512_maskz_sllv_epi16, _mm512_maskz_packs_epi16, _mm512_packus_epi16, _mm512_maskz_packus_epi16, _mm512_abs_epi8, _mm512_maskz_abs_epi8, _mm512_abs_epi16, _mm512_maskz_abs_epi16, _mm512_dbsad_epu8, _mm512_maskz_dbsad_epu8, _mm512_srli_epi16, _mm512_maskz_srli_epi16, _mm512_slli_epi16, _mm512_maskz_slli_epi16, _mm512_shufflehi_epi16, _mm512_maskz_shufflehi_epi16, _mm512_shufflelo_epi16, _mm512_maskz_shufflelo_epi16, _mm512_srai_epi16, _mm512_maskz_srai_epi16, _mm512_packs_epi32, _mm512_maskz_packs_epi32, _mm512_packus_epi32, _mm512_maskz_packus_epi32): Use _mm512_setzero_si512 instead of _mm512_setzero_qi or _mm512_setzero_hi. (_mm512_maskz_alignr_epi8, _mm512_dbsad_epu8, _mm512_maskz_dbsad_epu8): Formatting fixes. (_mm512_srli_epi16, _mm512_maskz_srli_epi16, _mm512_slli_epi16, _mm512_maskz_slli_epi16, _mm512_shufflehi_epi16, _mm512_maskz_shufflehi_epi16, _mm512_shufflelo_epi16, _mm512_maskz_shufflelo_epi16, _mm512_srai_epi16, _mm512_maskz_srai_epi16): Use _mm512_setzero_si512 instead of _mm512_setzero_qi or _mm512_setzero_hi. 2016-11-22 Nathan Sidwell * gcc-ar.c (main): Fix indentation. * gcov-io.c (gcov_write_summary): Remove extraneous {...} * ggc-page.c (move_ptes_to_front): Fix formatting. * hsa-dump.c (dump_has_cfun): Fix indentation. * sel-sched-ir.h: Remove trailing blank lines. 2016-11-22 Jakub Jelinek Alexander Monakov * internal-fn.c (expand_GOMP_USE_SIMT): New function. * tree.c (omp_clause_num_ops): OMP_CLAUSE__SIMT_ has 0 operands. (omp_clause_code_name): Add _simt_ name. (walk_tree_1): Handle OMP_CLAUSE__SIMT_. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SIMT_. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE__SIMT_. (scan_omp_simd): New function. (scan_omp_1_stmt): Use it in target regions if needed. (omp_max_vf): Don't max with omp_max_simt_vf. (lower_rec_simd_input_clauses): Use omp_max_simt_vf if OMP_CLAUSE__SIMT_ is present. (lower_rec_input_clauses): Compute maybe_simt from presence of OMP_CLAUSE__SIMT_. (lower_lastprivate_clauses): Likewise. (expand_omp_simd): Likewise. Remove explicit offloaded region check. (execute_omp_device_lower): Lower IFN_GOMP_USE_SIMT. * internal-fn.def (GOMP_USE_SIMT): New internal function. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__SIMT_. 2016-11-22 Alexander Monakov * internal-fn.c (expand_GOMP_SIMT_LANE): New. (expand_GOMP_SIMT_VF): New. (expand_GOMP_SIMT_LAST_LANE): New. (expand_GOMP_SIMT_ORDERED_PRED): New. (expand_GOMP_SIMT_VOTE_ANY): New. (expand_GOMP_SIMT_XCHG_BFLY): New. (expand_GOMP_SIMT_XCHG_IDX): New. * internal-fn.def (GOMP_SIMT_LANE): New. (GOMP_SIMT_VF): New. (GOMP_SIMT_LAST_LANE): New. (GOMP_SIMT_ORDERED_PRED): New. (GOMP_SIMT_VOTE_ANY): New. (GOMP_SIMT_XCHG_BFLY): New. (GOMP_SIMT_XCHG_IDX): New. * omp-low.c (omp_maybe_offloaded_ctx): New, outlined from... (create_omp_child_function): ...here. Set "omp target entrypoint" or "omp declare target" attribute based on is_gimple_omp_offloaded. (omp_max_simt_vf): New. Use it... (omp_max_vf): ...here. (lower_rec_input_clauses): Add reduction lowering for SIMT execution. (lower_lastprivate_clauses): Likewise, for "lastprivate" lowering. (lower_omp_ordered): Likewise, for "ordered" lowering. (expand_omp_simd): Add SIMT transforms. (pass_data_lower_omp): Add PROP_gimple_lomp_dev. (execute_omp_device_lower): New. (pass_data_omp_device_lower): New. (pass_omp_device_lower): New pass. (make_pass_omp_device_lower): New. * passes.def (pass_omp_device_lower): Position new pass. * tree-pass.h (PROP_gimple_lomp_dev): Define. (make_pass_omp_device_lower): Declare. 2016-11-22 Jakub Jelinek PR target/78451 * config/i386/avx512vlintrin.h (_mm_setzero_di): Removed. (_mm_maskz_mov_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm_maskz_load_epi64): Likewise. (_mm_setzero_hi): Removed. (_mm_maskz_loadu_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm_abs_epi64, _mm_maskz_abs_epi64, _mm_maskz_srl_epi64, _mm_maskz_unpackhi_epi64, _mm_maskz_unpacklo_epi64, _mm_maskz_compress_epi64, _mm_srav_epi64, _mm_maskz_srav_epi64, _mm_maskz_sllv_epi64, _mm_maskz_srlv_epi64, _mm_rolv_epi64, _mm_maskz_rolv_epi64, _mm_rorv_epi64, _mm_maskz_rorv_epi64, _mm_min_epi64, _mm_max_epi64, _mm_max_epu64, _mm_min_epu64, _mm_lzcnt_epi64, _mm_maskz_lzcnt_epi64, _mm_conflict_epi64, _mm_maskz_conflict_epi64, _mm_sra_epi64, _mm_maskz_sra_epi64, _mm_maskz_sll_epi64, _mm_rol_epi64, _mm_maskz_rol_epi64, _mm_ror_epi64, _mm_maskz_ror_epi64, _mm_alignr_epi64, _mm_maskz_alignr_epi64, _mm_srai_epi64, _mm_maskz_slli_epi64): Likewise. (_mm_cvtepi32_epi8, _mm256_cvtepi32_epi8, _mm_cvtsepi32_epi8, _mm256_cvtsepi32_epi8, _mm_cvtusepi32_epi8, _mm256_cvtusepi32_epi8, _mm_cvtepi32_epi16, _mm256_cvtepi32_epi16, _mm_cvtsepi32_epi16, _mm256_cvtsepi32_epi16, _mm_cvtusepi32_epi16, _mm256_cvtusepi32_epi16, _mm_cvtepi64_epi8, _mm256_cvtepi64_epi8, _mm_cvtsepi64_epi8, _mm256_cvtsepi64_epi8, _mm_cvtusepi64_epi8, _mm256_cvtusepi64_epi8, _mm_cvtepi64_epi16, _mm256_cvtepi64_epi16, _mm_cvtsepi64_epi16, _mm256_cvtsepi64_epi16, _mm_cvtusepi64_epi16, _mm256_cvtusepi64_epi16, _mm_cvtepi64_epi32, _mm256_cvtepi64_epi32, _mm_cvtsepi64_epi32, _mm256_cvtsepi64_epi32, _mm_cvtusepi64_epi32, _mm256_cvtusepi64_epi32, _mm_maskz_set1_epi32, _mm_maskz_set1_epi64): Formatting fixes. (_mm_maskz_cvtps_ph, _mm256_maskz_cvtps_ph): Use _mm_setzero_si128 instead of _mm_setzero_hi. (_mm256_permutex_pd, _mm256_maskz_permutex_epi64, _mm256_insertf32x4, _mm256_maskz_insertf32x4, _mm256_inserti32x4, _mm256_maskz_inserti32x4, _mm256_extractf32x4_ps, _mm256_maskz_extractf32x4_ps, _mm256_shuffle_i32x4, _mm256_maskz_shuffle_i32x4, _mm256_shuffle_f64x2, _mm256_maskz_shuffle_f64x2, _mm256_shuffle_f32x4, _mm256_maskz_shuffle_f32x4, _mm256_maskz_shuffle_pd, _mm_maskz_shuffle_pd, _mm256_maskz_shuffle_ps, _mm_maskz_shuffle_ps, _mm256_maskz_srli_epi32, _mm_maskz_srli_epi32, _mm_maskz_srli_epi64, _mm256_mask_slli_epi32, _mm256_maskz_slli_epi32, _mm256_mask_slli_epi64, _mm256_maskz_slli_epi64, _mm256_roundscale_ps, _mm256_maskz_roundscale_ps, _mm256_roundscale_pd, _mm256_maskz_roundscale_pd, _mm_roundscale_ps, _mm_maskz_roundscale_ps, _mm_roundscale_pd, _mm_maskz_roundscale_pd, _mm256_getmant_ps, _mm256_maskz_getmant_ps, _mm_getmant_ps, _mm_maskz_getmant_ps, _mm256_getmant_pd, _mm256_maskz_getmant_pd, _mm_getmant_pd, _mm_maskz_getmant_pd, _mm256_maskz_shuffle_epi32, _mm_maskz_shuffle_epi32, _mm256_rol_epi32, _mm256_maskz_rol_epi32, _mm_rol_epi32, _mm_maskz_rol_epi32, _mm256_ror_epi32, _mm256_maskz_ror_epi32, _mm_ror_epi32, _mm_maskz_ror_epi32, _mm_maskz_alignr_epi32, _mm_maskz_alignr_epi64, _mm256_maskz_srai_epi32, _mm_maskz_srai_epi32, _mm_srai_epi64, _mm_maskz_srai_epi64, _mm256_maskz_permutex_pd, _mm256_maskz_permute_pd, _mm256_maskz_permute_ps, _mm_maskz_permute_pd, _mm_maskz_permute_ps, _mm256_permutexvar_ps): Formatting fixes. (_mm_maskz_slli_epi64, _mm_rol_epi64, _mm_maskz_rol_epi64, _mm_ror_epi64, _mm_maskz_ror_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm_maskz_cvtps_ph, _mm256_maskz_cvtps_ph): Use _mm_setzero_si128 instead of _mm_setzero_hi. * config/i386/avx512dqintrin.h (_mm512_broadcast_f64x2, _mm512_broadcast_i64x2, _mm512_broadcast_f32x2, _mm512_broadcast_i32x2, _mm512_broadcast_f32x8, _mm512_broadcast_i32x8): Formatting fixes. (_mm512_extracti64x2_epi64, _mm512_maskz_extracti64x2_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm512_cvtt_roundpd_epi64, _mm512_mask_cvtt_roundpd_epi64, _mm512_maskz_cvtt_roundpd_epi64, _mm512_cvtt_roundpd_epu64, _mm512_mask_cvtt_roundpd_epu64, _mm512_maskz_cvtt_roundpd_epu64, _mm512_cvtt_roundps_epi64, _mm512_mask_cvtt_roundps_epi64, _mm512_maskz_cvtt_roundps_epi64, _mm512_cvtt_roundps_epu64, _mm512_mask_cvtt_roundps_epu64, _mm512_maskz_cvtt_roundps_epu64, _mm512_cvt_roundpd_epi64, _mm512_mask_cvt_roundpd_epi64, _mm512_maskz_cvt_roundpd_epi64, _mm512_cvt_roundpd_epu64, _mm512_mask_cvt_roundpd_epu64, _mm512_maskz_cvt_roundpd_epu64, _mm512_cvt_roundps_epi64, _mm512_mask_cvt_roundps_epi64, _mm512_maskz_cvt_roundps_epi64, _mm512_cvt_roundps_epu64, _mm512_mask_cvt_roundps_epu64, _mm512_maskz_cvt_roundps_epu64, _mm512_cvt_roundepi64_ps, _mm512_mask_cvt_roundepi64_ps, _mm512_maskz_cvt_roundepi64_ps, _mm512_cvt_roundepu64_ps, _mm512_mask_cvt_roundepu64_ps, _mm512_maskz_cvt_roundepu64_ps, _mm512_cvt_roundepi64_pd, _mm512_mask_cvt_roundepi64_pd, _mm512_maskz_cvt_roundepi64_pd, _mm512_cvt_roundepu64_pd, _mm512_mask_cvt_roundepu64_pd, _mm512_maskz_cvt_roundepu64_pd, _mm512_reduce_pd, _mm512_maskz_reduce_pd, _mm512_reduce_ps, _mm512_maskz_reduce_ps, _mm512_extractf32x8_ps, _mm512_maskz_extractf32x8_ps, _mm512_extractf64x2_pd, _mm512_maskz_extractf64x2_pd, _mm512_extracti32x8_epi32, _mm512_maskz_extracti32x8_epi32, _mm512_range_pd, _mm512_maskz_range_pd, _mm512_range_ps, _mm512_maskz_range_ps, _mm512_range_round_pd, _mm512_maskz_range_round_pd, _mm512_range_round_ps, _mm512_maskz_range_round_ps, _mm512_maskz_insertf64x2, _mm512_insertf32x8, _mm512_maskz_insertf32x8): Formatting fixes. (_mm512_extracti64x2_epi64, _mm512_maskz_extracti64x2_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. * config/i386/avx512vldqintrin.h (_mm_cvttpd_epi64, _mm_cvttpd_epu64, _mm_cvtpd_epi64, _mm_cvtpd_epu64, _mm_cvttps_epi64, _mm_maskz_cvttps_epi64, _mm_cvttps_epu64, _mm_maskz_cvttps_epu64, _mm_maskz_mullo_epi64, _mm_cvtps_epi64, _mm_maskz_cvtps_epi64, _mm_cvtps_epu64, _mm_maskz_cvtps_epu64, _mm256_extracti64x2_epi64, _mm256_maskz_extracti64x2_epi64): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm256_extracti64x2_epi64, _mm256_maskz_extracti64x2_epi64): Likewise in macros. * config/i386/avx512vlbwintrin.h (_mm_maskz_mov_epi8, _mm_maskz_loadu_epi16, _mm_maskz_mov_epi16, _mm_maskz_loadu_epi8, _mm_permutexvar_epi16, _mm_maskz_maddubs_epi16): Use _mm_setzero_si128 instead of _mm_setzero_hi. (_mm_maskz_min_epu16, _mm_maskz_max_epu8, _mm_maskz_max_epi8, _mm_maskz_min_epu8, _mm_maskz_min_epi8, _mm_maskz_max_epi16, _mm_maskz_max_epu16, _mm_maskz_min_epi16): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm_dbsad_epu8, _mm_maskz_shufflehi_epi16, _mm_maskz_shufflelo_epi16): Use _mm_setzero_si128 instead of _mm_setzero_hi. (_mm_maskz_shufflehi_epi16, _mm_maskz_shufflelo_epi16, _mm_maskz_slli_epi16): Use _mm_setzero_si128 instead of _mm_setzero_hi. (_mm_maskz_alignr_epi8): Use _mm_setzero_si128 instead of _mm_setzero_di. (_mm_maskz_mulhi_epi16, _mm_maskz_mulhi_epu16, _mm_maskz_mulhrs_epi16, _mm_maskz_mullo_epi16, _mm_srav_epi16, _mm_srlv_epi16, _mm_sllv_epi16): Use _mm_setzero_si128 instead of _mm_setzero_hi. 2016-11-22 Carl Love * config/rs6000/rs6000-c.c: Add built-in support for vector compare equal and vector compare not equal. The vector compares take two arguments of type vector bool char, vector bool short, vector bool int, vector bool long long with the same return type. * doc/extend.texi: Update built-in documentation file for the new powerpc built-ins. 2016-11-22 Uros Bizjak * Makefile.in ($(lang_checks_parallelized)): Fix detection of -j argument. 2016-11-22 Thomas Preud'homme * config.gcc: Allow new rmprofile value for configure option --with-multilib-list. * config/arm/t-rmprofile: New file. * doc/install.texi (--with-multilib-list): Document new rmprofile value for ARM. 2016-11-22 Kyrylo Tkachov PR target/78439 * config/arm/vfp.md (*movdi_vfp_cortexa8): Use 'q' constraints for the register operand in alternatives 4,5,6. 2016-11-22 Thomas Preud'homme PR target/77904 * config/arm/arm.c (thumb1_compute_save_reg_mask): Mark frame pointer in save register mask if it is needed. 2016-11-22 Jakub Jelinek PR tree-optimization/78436 * gimple-ssa-store-merging.c (zero_char_buf): Removed. (shift_bytes_in_array, shift_bytes_in_array_right, merged_store_group::apply_stores): Formatting fixes. (clear_bit_region): Likewise. Use memset. (encode_tree_to_bitpos): Formatting fixes. Fix comment typos - EPXR instead of EXPR and inerted instead of inserted. Use memset instead of zero_char_buf. For !BYTES_BIG_ENDIAN decrease byte_size by 1 if shift_amnt is 0. PR middle-end/78416 * expmed.c (expand_divmod): Use wide_int for computation of op1_is_pow2. Don't set it if op1 is 0. Formatting fixes. Use size <= HOST_BITS_PER_WIDE_INT instead of HOST_BITS_PER_WIDE_INT >= size. PR tree-optimization/78445 * tree-if-conv.c (tree_if_conversion): If any_pred_load_store or any_complicated_phi, version loop even if flag_tree_loop_if_convert is 1. Formatting fix. 2016-11-22 Martin Liska PR ipa/78309 * ipa-icf.c (void sem_item::set_hash): Update m_hash_set. (sem_function::get_hash): Use the new field. (sem_function::parse): Remove an argument from ctor. (sem_variable::parse): Likewise. (sem_variable::get_hash): Use the new field. (sem_item_optimizer::read_section): Use new ctor and set hash. * ipa-icf.h: _hash is removed from sem_item::sem_item, sem_variable::sem_variable, sem_function::sem_function. 2016-11-21 Jeff Law PR target/68538 * config/cris/cris.md: Don't call copy_to_mode_reg unless can_create_pseudo_p is true. 2016-11-21 Segher Boessenkool PR target/68803 * config/rs6000/rs6000.md (*rotlsi3_insert_5, *rotldi3_insert_6, *rotldi3_insert_7): New define_insns. 2016-11-21 Michael Meissner * config/rs6000/rs6000.md (movdi_internal32): Change constraints so that DImode can be allocated to FP/vector registers in more cases, and we can avoid direct move operations. If the register needs reloading, prefer GPRs over FP/vector registers. In the case of FPR vs. Altivec registers, prefer FPR registers unless we have the ISA 3.0 reg+offset scalar instructions. (movdi_internal64): Likewise. 2016-11-21 Jakub Jelinek PR middle-end/67335 * omp-simd-clone.c (simd_clone_adjust_argument_types): Use NULL prefix for tmp simd array if DECL_NAME (parm) is NULL. 2016-11-20 Jeff Law PR target/25128 * config/m68k/predicates.md (swap_peephole_relational_operator): New predicate. * config/m68k/m68k.md (relational tests against 65535/65536): New peephole2. 2016-11-21 Kyrylo Tkachov * tree-ssa-loop-prefetch.c: Delete FIXME after the includes. 2016-11-21 Martin Sebor * doc/invoke.texi (-fprintf-return-value): Document that option is enabled by default. 2016-11-21 Georg-Johann Lay * config/avr/avr-c.c (avr_register_target_pragmas): Use C++ for-loop declaration of loop variable. (avr_register_target_pragmas, avr_cpu_cpp_builtins): Same. * config/avr/avr.c (avr_popcount_each_byte) (avr_init_expanders, avr_regs_to_save, sequent_regs_live) (get_sequence_length, avr_prologue_setup_frame, avr_map_metric) (avr_expand_epilogue, avr_function_arg_advance) (avr_out_compare, avr_out_plus_1, avr_out_bitop, avr_out_fract) (avr_rotate_bytes, _reg_unused_after, avr_assemble_integer) (avr_adjust_reg_alloc_order, output_reload_in_const) (avr_conditional_register_usage, avr_find_unused_d_reg) (avr_map_decompose, avr_fold_builtin): Same. 2016-11-21 Georg-Johann Lay * config/avr/avr.c (avr_popcount): Remove static function. (avr_popcount_each_byte, avr_out_bitop): Use popcount_hwi instead. 2016-11-21 Richard Earnshaw * arm.opt (mapcs-float): Delete option. * arm.c (arm_option_override): Remove hunk relating to TARGET_APCS_FLOAT. * doc/invoke.texi (arm options): Remove documentation for -mapcs-float. 2016-11-21 Richard Sandiford * tree-tailcall.c (process_assignment): Simplify the check for a valid copy, allowing the source to be a local variable as well as an SSA name. (find_tail_calls): Allow copies between local variables to follow the call. Allow the result to be stored in any local variable, even if it's an aggregate. (eliminate_tail_call): Check whether the result is an SSA name before updating its SSA_NAME_DEF_STMT. 2016-11-21 David Malcolm PR preprocessor/78324 * input.c (get_substring_ranges_for_loc): Fail gracefully if -ftrack-macro-expansion has a value other than 2. 2016-11-21 Segher Boessenkool PR rtl-optimization/78400 * shrink-wrap.c (try_shrink_wrapping_separate): Call df_update_entry_exit_and_calls instead of df_update_entry_block_defs and df_update_exit_block_uses. 2016-11-21 Bernd Edlinger PR c++/71973 * doc/invoke.texi (-Wno-builtin-declaration-mismatch): Document the new default-enabled warning.. * builtin-types.def (BT_CONST_TM_PTR): New primitive type. (BT_PTR_CONST_STRING): Updated. (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR): Removed. (BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR): New function type. * builtins.def (DEF_TM_BUILTIN): Disable BOTH_P for TM builtins. (strftime): Update builtin function. * tree-core.h (TI_CONST_TM_PTR_TYPE): New enum value. * tree.h (const_tm_ptr_type_node): New type node. * tree.c (free_lang_data, build_common_tree_nodes): Initialize const_tm_ptr_type_node. 2016-11-21 Bill Schmidt PR tree-optimization/78413 * tree-if-conv.c (versionable_outer_loop_p): Require that both inner and outer loop latches have single predecessors. 2016-11-21 Georg-Johann Lay PR target/78093 * config/avr/avr.c (avr_decl_maybe_lds_p): New static function. (avr_encode_section_info) [TARGET_ABSDATA && AVR_TINY]: Use it. 2016-11-21 Trevor Saunders * rtl.h: Adjust prototype. * rtlanal.c (dead_or_set_p): Change argument type to rtx_insn *. (dead_or_set_regno_p): Likewise. 2016-11-21 Trevor Saunders * rtl.h: Adjust prototype. * rtlanal.c (add_int_reg_note): Change argument type to rtx_insn *. 2016-11-21 Trevor Saunders * function.c (contains): Change argument type to rtx_insn *. (prologue_contains): Likewise. (epilogue_contains): Likewise. (prologue_epilogue_contains): Likewise. * function.h: Adjust prototype. 2016-11-21 Trevor Saunders * optabs.c (emit_libcall_block): Change argument type to rtx_insn *. * optabs.h: Adjust prototype. 2016-11-21 Trevor Saunders * cfgrtl.c (delete_insn): Change argument type to rtx_insn *. (fixup_reorder_chain): Adjust. * cfgrtl.h: Adjust prototype. 2016-11-21 Trevor Saunders * rtl.h: Adjust prototype. * rtlanal.c (replace_label_in_insn): Change argument type to rtx_insn *. 2016-11-21 Trevor Saunders * config/v850/v850.c (expand_prologue): Adjust. (expand_epilogue): Likewise. * expr.c (init_expr_target): Likewise. * genrecog.c (print_subroutine): Always make the argument type rtx_insn *. * recog.h: Adjust prototype. 2016-11-21 Trevor Saunders * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): split up variables to make some rtx_insn *. * config/alpha/alpha.c (emit_unlikely_jump): Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/mn10300/mn10300.c (mn10300_legitimize_pic_address): Likewise. * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): Likewise. * config/spu/spu.c (spu_emit_branch_hint): Likewise. 2016-11-21 Trevor Saunders * config/arm/arm.c (legitimize_pic_address): Change to use rtx_insn * as the type of variables. (arm_pic_static_addr): Likewise. (arm_emit_movpair): Likewise. * config/c6x/c6x.c (reorg_split_calls): Likewise. * config/darwin.c (machopic_legitimize_pic_address): Likewise. * config/frv/frv.c (frv_optimize_membar_local): Likewise. * config/frv/frv.md: Likewise. * config/i386/i386-protos.h: Likewise. * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise. (ix86_split_fp_branch): Likewise. (predict_jump): Likewise. * config/ia64/ia64.c: Likewise. * config/mcore/mcore.c: Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise. * config/s390/s390.c: Likewise. * config/s390/s390.md: Likewise. * config/spu/spu.md: Likewise. * config/tilegx/tilegx.c (tilegx_legitimize_tls_address): Likewise. * lower-subreg.c (resolve_simple_move): Likewise. 2016-11-20 Jeff Law PR target/48551 * reload.h (struct target_reload): Make x_double_reg_address_ok be per-mode rather. * reload.c (find_reloads_address): Check if double_reg_address_ok is true for the mode of the memory reference. * reload1.c (init_reload): Initialize double_reg_address_ok for each mode. 2016-11-20 Aldy Hernandez PR middle-end/61409 * tree-ssa-uninit.c: Define new global max_phi_args. (compute_uninit_opnds_pos): Use max_phi_args. (prune_uninit_phi_opnds): Same. (use_pred_not_overlap_with_undef_path_pred): Remove reference to missing NUM_PREDS in function comment. (can_one_predicate_be_invalidated_p): New. (can_chain_union_be_invalidated_p): New. (flatten_out_predicate_chains): New. (uninit_ops_invalidate_phi_use): New. (is_use_properly_guarded): Call uninit_ops_invalidate_phi_use. 2016-11-20 Marc Glisse * fold-const.c (fold_comparison): Ignore EXACT_DIV_EXPR. * match.pd (A /[ex] B CMP C): New simplifications. 2016-11-20 Marc Glisse * match.pd (0 / X, X / X, X % X): New simplifications. 2016-11-19 Jakub Jelinek * config/i386/i386.c (ix86_can_inline_p): Use || instead of & when checking if callee's isa flags are subset of caller's isa flags. Fix comment wording. * config/i386/i386.c (ix86_valid_target_attribute_tree): Don't clear opts->x_ix86_isa_flags, clear opts->x_ix86_isa_flags2 instead and using = 0 instead of &= 0. * config/i386/i386.c (def_builtin, def_builtin2, def_builtin_const2, ix86_add_new_builtins): Formatting fixes. (ix86_expand_builtin): Use || instead of && for isa vs. isa2. (ix86_get_builtin): Likewise. * config/i386/i386.c (ix86_expand_builtin): Remove msk_mov variable, don't initialize it, don't use it for the case where it isn't provable %{z} nor using the same argument, instead move merge argument into a new pseudo and use that as target. Formatting fixes. 2016-11-19 Jeff Law PR target/25111 * config/m68k/m68k.md (bsetdreg): New pattern. (bchgdreg, bclrdreg): Likewise. 2016-11-19 Kaz Kojima PR target/78426 * config/sh/sh-mem.cc (sh_expand_cmpnstr): Use copy_to_mode_reg instead of force_reg. (sh_expand_setmem): Likewise. 2016-11-19 Krister Walfridsson * config.gcc (*-*-netbsd): Set use_gcc_stdint=wrap. 2016-11-18 Walter Lee * config/tilegx/tilegx.c (tilegx_gen_bundles): Preserve end-of-bundle marker for consecutive barriers. 2016-11-18 Walter Lee * config/tilegx/tilegx.md (clzsi2): Fix for big-endian. 2016-11-18 Jakub Jelinek PR middle-end/78419 * multiple_target.c (get_attr_len): Start with argnum and increment argnum on every arg. Use strchr in a loop instead of counting commas manually. (get_attr_str): Increment argnum for every comma in the string. (separate_attrs): Use for instead of while loop, simplify. (expand_target_clones): Rename defenition argument to definition. Free attrs and attr_str even when diagnosing errors. Temporarily change input_location around targetm.target_option.valid_attribute_p calls. Don't emit warning or errors if that function fails. * dwarf2out.c (size_of_discr_list): Fix typo in function comment. PR debug/78191 * dwarf2out.c (abbrev_opt_base_type_end): New variable. (die_abbrev_cmp): Sort dies with die_abbrev smaller than abbrev_opt_base_type_end only by increasing die_abbrev, before any other dies. (optimize_abbrev_table): Don't change abbrev numbers of base types and CU or optimize implicit consts in them if calc_base_type_die_sizes has been called during build_abbrev_table. (calc_base_type_die_sizes): If abbrev_opt_start, set abbrev_opt_base_type_end to one plus largest base type's die_abbrev. 2016-11-18 Jeff Law PR target/25112 * config/m68k/m68k.c (moveq feeding equality comparison): New peepholes. * config/m68k/predicates.md (addq_subq_operand): New predicate. (equality_comparison_operator): Likewise. 2016-11-18 Richard Sandiford * rtlanal.c (load_extend_op): Move to... * rtl.h: ...here and make inline. 2016-11-18 Terry Guo Thomas Preud'homme * common/config/arm/arm-common.c (arm_target_thumb_only): New function. * config/arm/arm-opts.h: Include arm-flags.h. (struct arm_arch_core_flag): Define. (arm_arch_core_flags): Define. * config/arm/arm-protos.h: Include arm-flags.h (FL_NONE, FL_ANY, FL_CO_PROC, FL_ARCH3M, FL_MODE26, FL_MODE32, FL_ARCH4, FL_ARCH5, FL_THUMB, FL_LDSCHED, FL_STRONG, FL_ARCH5E, FL_XSCALE, FL_ARCH6, FL_VFPV2, FL_WBUF, FL_ARCH6K, FL_THUMB2, FL_NOTM, FL_THUMB_DIV, FL_VFPV3, FL_NEON, FL_ARCH7EM, FL_ARCH7, FL_ARM_DIV, FL_ARCH8, FL_CRC32, FL_SMALLMUL, FL_NO_VOLATILE_CE, FL_IWMMXT, FL_IWMMXT2, FL_ARCH6KZ, FL2_ARCH8_1, FL2_ARCH8_2, FL2_FP16INST, FL_TUNE, FL_FOR_ARCH2, FL_FOR_ARCH3, FL_FOR_ARCH3M, FL_FOR_ARCH4, FL_FOR_ARCH4T, FL_FOR_ARCH5, FL_FOR_ARCH5T, FL_FOR_ARCH5E, FL_FOR_ARCH5TE, FL_FOR_ARCH5TEJ, FL_FOR_ARCH6, FL_FOR_ARCH6J, FL_FOR_ARCH6K, FL_FOR_ARCH6Z, FL_FOR_ARCH6ZK, FL_FOR_ARCH6KZ, FL_FOR_ARCH6T2, FL_FOR_ARCH6M, FL_FOR_ARCH7, FL_FOR_ARCH7A, FL_FOR_ARCH7VE, FL_FOR_ARCH7R, FL_FOR_ARCH7M, FL_FOR_ARCH7EM, FL_FOR_ARCH8A, FL2_FOR_ARCH8_1A, FL2_FOR_ARCH8_2A, FL_FOR_ARCH8M_BASE, FL_FOR_ARCH8M_MAIN, arm_feature_set, ARM_FSET_MAKE, ARM_FSET_MAKE_CPU1, ARM_FSET_MAKE_CPU2, ARM_FSET_CPU1, ARM_FSET_CPU2, ARM_FSET_EMPTY, ARM_FSET_ANY, ARM_FSET_HAS_CPU1, ARM_FSET_HAS_CPU2, ARM_FSET_HAS_CPU, ARM_FSET_ADD_CPU1, ARM_FSET_ADD_CPU2, ARM_FSET_DEL_CPU1, ARM_FSET_DEL_CPU2, ARM_FSET_UNION, ARM_FSET_INTER, ARM_FSET_XOR, ARM_FSET_EXCLUDE, ARM_FSET_IS_EMPTY, ARM_FSET_CPU_SUBSET): Move to ... * config/arm/arm-flags.h: This new file. * config/arm/arm.h (TARGET_MODE_SPEC_FUNCTIONS): Define. (EXTRA_SPEC_FUNCTIONS): Add TARGET_MODE_SPEC_FUNCTIONS to its value. (TARGET_MODE_SPECS): Define. (DRIVER_SELF_SPECS): Add TARGET_MODE_SPECS to its value. 2016-11-18 Thomas Preud'homme * config/arm/arm-protos.h (FL_NONE, FL_ANY, FL_CO_PROC, FL_ARCH3M, FL_MODE26, FL_MODE32, FL_ARCH4, FL_ARCH5, FL_THUMB, FL_LDSCHED, FL_STRONG, FL_ARCH5E, FL_XSCALE, FL_ARCH6, FL_VFPV2, FL_WBUF, FL_ARCH6K, FL_THUMB2, FL_NOTM, FL_THUMB_DIV, FL_VFPV3, FL_NEON, FL_ARCH7EM, FL_ARCH7, FL_ARM_DIV, FL_ARCH8, FL_CRC32, FL_SMALLMUL, FL_NO_VOLATILE_CE, FL_IWMMXT, FL_IWMMXT2, FL_ARCH6KZ, FL2_ARCH8_1, FL2_ARCH8_2, FL2_FP16INST): Reindent comment, add final dot when missing and make value unsigned. (arm_feature_set): Use unsigned entries instead of unsigned long. 2016-11-18 Dominik Vogt Re-apply after PR bootstrap/77359 is fixed: 2016-08-23 Dominik Vogt * explow.c (get_dynamic_stack_size): Take known alignment of stack pointer + STACK_DYNAMIC_OFFSET into account when calculating the size needed. 2016-11-18 Dominik Vogt PR bootstrap/77359 * config/rs6000/rs6000.c (rs6000_stack_info): Properly align local variables in functions calling alloca. Also update the ASCII drawings. * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET) (STACK_DYNAMIC_OFFSET): Likewise. * config/rs6000/aix.h (STARTING_FRAME_OFFSET) (STACK_DYNAMIC_OFFSET): Copy AIX specific versions of the rs6000.h macros to aix.h. 2016-11-18 Richard Sandiford Alan Hayward David Sherwood * combine.c (try_combine): Use rtx_mode_t instead of std::make_pair. * dwarf2out.c (mem_loc_descriptor, loc_descriptor): Likewise. (add_const_value_attribute): Likewise. * explow.c (plus_constant): Likewise. * expmed.c (expand_mult, make_tree): Likewise. * expr.c (convert_modes): Likewise. * loop-doloop.c (doloop_optimize): Likewise. * postreload.c (reload_cse_simplify_set): Likewise. * simplify-rtx.c (simplify_const_unary_operation): Likewise (simplify_binary_operation_1, simplify_const_binary_operation): Likewise. (simplify_const_relational_operation, simplify_immed_subreg): Likewise. * wide-int.h: Update documentation to recommend rtx_mode_t instead of std::make_pair. 2016-11-18 Richard Sandiford Alan Hayward David Sherwood * tree.h (SET_DECL_MODE): New macro. * cfgexpand.c (avoid_deep_ter_for_debug): Use SET_DECL_MODE. (expand_gimple_basic_block): Likewise. * function.c (split_complex_args): Likeise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Likewise. * stor-layout.c (layout_decl, relayout_decl): Likewise. (finish_bitfield_representative): Likewise. * tree.c (make_node_stat): Likewise. * tree-inline.c (remap_ssa_name): Likewise. (tree_function_versioning): Likewise. * tree-into-ssa.c (rewrite_debug_stmt_uses): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise. * tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise. * tree-ssa.c (insert_debug_temp_for_var_def): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise. * varasm.c (make_debug_expr_from_rtl): Likewise. 2016-11-18 Segher Boessenkool PR rtl-optimization/71785 * bb-reorder.c (maybe_duplicate_computed_goto): New function. (duplicate_computed_gotos): New function. (pass_duplicate_computed_gotos::execute): Rewrite. 2016-11-17 Jeff Law PR target/47192 * config/m68k/m68k.c (m68k_expand_epilogue): Emit a scheduling barrier prior to deallocating the stack. 2016-11-17 Andrew Burgess * config/arc/arc.md (cmem bit/sign-extend peephole2): New peephole to make better use of cmem loads in the case where a single bit is being accessed. * config/arc/predicates.md (ge_lt_comparison_operator): New predicate. 2016-11-17 Andrew Senkevich * config/i386/i386.c (processor_features): Add F_AVX5124VNNIW, F_AVX5124FMAPS. (isa_names_table): Handle new features. 2016-11-17 Kirill Yukhin Andrew Senkevich * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX5124FMAPS_SET, OPTION_MASK_ISA_AVX5124FMAPS_UNSET, OPTION_MASK_ISA_AVX5124VNNIW_SET, OPTION_MASK_ISA_AVX5124VNNIW_UNSET): New. (ix86_handle_option): Handle OPT_mavx5124fmaps, OPT_mavx5124vnniw. * config.gcc: Add avx5124fmapsintrin.h, avx5124vnniwintrin.h. * config/i386/avx5124fmapsintrin.h: New file. * config/i386/avx5124vnniwintrin.h: Ditto. * config/i386/constraints.md (h): New constraint. * config/i386/cpuid.h (bit_AVX5124VNNIW, bit_AVX5124FMAPS): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect avx5124fmaps, avx5124vnniw. * config/i386/i386-builtin-types.def: Add types V16SF_FTYPE_V16SF_V16SF_V16SF_V16SF_V16SF_PCV4SF_V16SF_UHI, V16SF_FTYPE_V16SF_V16SF_V16SF_V16SF_V16SF_PCV4SF, V4SF_FTYPE_V4SF_V4SF_V4SF_V4SF_V4SF_PCV4SF, V4SF_FTYPE_V4SF_V4SF_V4SF_V4SF_V4SF_PCV4SF_V4SF_UQI, V16SI_FTYPE_V16SI_V16SI_V16SI_V16SI_V16SI_PCV4SI, V16SI_FTYPE_V16SI_V16SI_V16SI_V16SI_V16SI_PCV4SI_V16SI_UHI. * config/i386/i386-builtin.def (__builtin_ia32_4fmaddps_mask, __builtin_ia32_4fmaddps, __builtin_ia32_4fmaddss, __builtin_ia32_4fmaddss_mask, __builtin_ia32_4fnmaddps_mask, __builtin_ia32_4fnmaddps, __builtin_ia32_4fnmaddss, __builtin_ia32_4fnmaddss_mask, __builtin_ia32_vp4dpwssd, __builtin_ia32_vp4dpwssd_mask, __builtin_ia32_vp4dpwssds, __builtin_ia32_vp4dpwssds_mask): New. * config/i386/i386-c.c (ix86_target_macros_internal): Define __AVX5124FMAPS__, __AVX5124VNNIW__. * config/i386/i386-modes.def: Fixed comment typos, added new modes (VECTOR_MODES (FLOAT, 256), VECTOR_MODE (INT, SI, 64)). * config/i386/i386.c (ix86_target_string): Add -mavx5124fmaps, -mavx5124vnniw. (PTA_AVX5124FMAPS, PTA_AVX5124VNNIW): Define. (ix86_option_override_internal): Handle new options. (ix86_valid_target_attribute_inner_p): Add avx5124fmaps, avx5124vnniw. (ix86_expand_builtin): Handle new builtins. (ix86_additional_allocno_class_p): New. * config/i386/i386.h (TARGET_AVX5124FMAPS, TARGET_AVX5124FMAPS_P, TARGET_AVX5124VNNIW, TARGET_AVX5124VNNIW_P): Define. (reg_class): Add MOD4_SSE_REGS. (MOD4_SSE_REG_P, MOD4_SSE_REGNO_P): New. * config/i386/i386.opt: Add mavx5124fmaps, mavx5124vnniw. * config/i386/immintrin.h: Include avx5124fmapsintrin.h, avx5124vnniwintrin.h. * config/i386/sse.md (unspec): Add UNSPEC_VP4FMADD, UNSPEC_VP4FNMADD, UNSPEC_VP4DPWSSD, UNSPEC_VP4DPWSSDS. (define_mode_iterator IMOD4): New. (define_mode_attr imod4_narrow): Ditto. (define_insn "mov"): Ditto. (define_insn "avx5124fmaddps_4fmaddps"): Ditto. (define_insn "avx5124fmaddps_4fmaddps_mask"): Ditto. (define_insn "avx5124fmaddps_4fmaddps_maskz"): Ditto. (define_insn "avx5124fmaddps_4fmaddss"): Ditto. (define_insn "avx5124fmaddps_4fmaddss_mask"): Ditto. (define_insn "avx5124fmaddps_4fmaddss_maskz"): Ditto. (define_insn "avx5124fmaddps_4fnmaddps"): Ditto. (define_insn "avx5124fmaddps_4fnmaddps_mask"): Ditto. (define_insn "avx5124fmaddps_4fnmaddps_maskz"): Ditto. (define_insn "avx5124fmaddps_4fnmaddss"): Ditto. (define_insn "avx5124fmaddps_4fnmaddss_mask"): Ditto. (define_insn "avx5124fmaddps_4fnmaddss_maskz"): Ditto. (define_insn "avx5124vnniw_vp4dpwssd"): Ditto. (define_insn "avx5124vnniw_vp4dpwssd_mask"): Ditto. (define_insn "avx5124vnniw_vp4dpwssd_maskz"): Ditto. (define_insn "avx5124vnniw_vp4dpwssds"): Ditto. (define_insn "avx5124vnniw_vp4dpwssds_mask"): Ditto. (define_insn "avx5124vnniw_vp4dpwssds_maskz"): Ditto. * init-regs.c (initialize_uninitialized_regs): Add emit_clobber call. * genmodes.c (mode_size_inline): Extend return type. * machmode.h (mode_size, mode_base_align): Extend type. 2016-11-17 Michael Meissner PR target/78101 * config/rs6000/predicates.md (fusion_addis_mem_combo_load): Add the appropriate checks for SFmode/DFmode load/stores in GPR registers. (fusion_addis_mem_combo_store): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Rename fusion_fpr_* to fusion_vsx_* and add in support for ISA 3.0 scalar d-form instructions for traditional Altivec registers. (emit_fusion_p9_load): Likewise. (emit_fusion_p9_store): Likewise. * config/rs6000/rs6000.md (p9 fusion store peephole2): Remove early clobber from scratch register. Do not match if the register being stored is the scratch register. (fusion_vsx___load): Rename fusion_fpr_* to fusion_vsx_* and add in support for ISA 3.0 scalar d-form instructions for traditional Altivec registers. (fusion_fpr___load): Likewise. (fusion_vsx___store): Likewise. (fusion_fpr___store): Likewise. 2016-11-17 Thomas Preud'homme PR target/77933 * config/arm/arm.c (thumb1_expand_prologue): Distinguish between lr being live in the function and lr needing to be saved. Distinguish between already saved pushable registers and registers to push. Check for LR being an available pushable register. 2016-11-17 Aaron Sawdey * config/i386/i386.md (cmpstrnsi): New test to bail out if neither string input is a string constant. * builtins.c (expand_builtin_strncmp): Attempt expansion of strncmp via cmpstrnsi even if neither string is constant. 2016-11-17 Jakub Jelinek PR middle-end/78201 * varasm.c (default_use_anchors_for_symbol_p): Fix a comment typo. Don't test decl != NULL. Don't look at DECL_SIZE, but DECL_SIZE_UNIT instead, return false if it is NULL, or doesn't fit into uhwi, or is larger or equal to targetm.max_anchor_offset. 2016-11-17 Pip Cet Eric Botcazou PR rtl-optimization/78355 * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Document that the macro only needs to deal with unaligned accesses. * doc/tm.texi: Regenerate. * lra-constraints.c (simplify_operand_subreg): Only invoke SLOW_UNALIGNED_ACCESS on innermode if the MEM is not aligned enough. 2016-11-17 David Malcolm * input.c (selftest::test_lexer_string_locations_long_line): New function. (selftest::test_lexer_string_locations_raw_string_multiline): New function. (selftest::input_c_tests): Call the new functions, via for_each_line_table_case. 2016-11-17 Kyrylo Tkachov * config/aarch64/aarch64.md (mov): Call aarch64_split_dimode_const_store on DImode constant stores. * config/aarch64/aarch64-protos.h (aarch64_split_dimode_const_store): New prototype. * config/aarch64/aarch64.c (aarch64_split_dimode_const_store): New function. 2016-11-17 Bill Schmidt Richard Biener PR tree-optimization/77848 * tree-if-conv.c (tree_if_conversion): Always version loops unless the user specified -ftree-loop-if-convert. 2016-11-17 Bernd Edlinger PR target/77308 * config/arm/arm.md (*thumb2_ldrd, *thumb2_ldrd_base, *thumb2_ldrd_base_neg, *thumb2_strd, *thumb2_strd_base, *thumb2_strd_base_neg): Recognize insn regardless of current_tune->prefer_ldrd_strd. * config/arm/ldrdstrd.md: Enable all ldrd/strd peephole rules whenever possible. 2016-11-17 Claudiu Zissulescu * config/arc/arc.c (arc_ccfsm_post_advance): Handle return instruction type. 2016-11-17 Claudiu Zissulescu * config/arc/arc-arches.def: Add FPX quarkse instruction as valid for arcem. * config/arc/arc-c.def (__ARC_FPX_QUARK__): Define. * config/arc/arc-cpus.def (quarkse_em): Add. * config/arc/arc-options.def (FL_FPX_QUARK, FL_QUARK): Likewise. * config/arc/arc-opts.h (FPX_QK): Define. * config/arc/arc-tables.opt: Regenerate. * config/arc/arc.c (gen_compare_reg): Change. (arc_register_move_cost): Avoid Dy,Dx moves. * config/arc/arc.h (TARGET_HARD_FLOAT): Change. (TARGET_FPX_QUARK, TARGET_FP_ASSIST): Define. * config/arc/arc.md (divsf3, sqrtsf2, fix_truncsfsi2, floatsisf2): New expands. * config/arc/fpu.md (divsf3_fpu, sqrtsf2_fpu, floatsisf2_fpu) (fix_truncsfsi2_fpu): Rename. * config/arc/fpx.md (cmp_quark, cmpsf_quark_, cmpsf_quark_ord) (cmpsf_quark_uneq, cmpsf_quark_eq, divsf3_quark, sqrtsf2_quark) (fix_truncsfsi2_quark, floatsisf2_quark): New patterns. * config/arc/t-multilib: Regenerate. 2016-11-17 Georg-Johann Lay * config/avr/avr.c (avr_print_operand_address): Use CONST_INT_P if appropriate. (ashlqi3_out, ashlsi3_out, ashrqi3_out, ashrhi3_out): Same. (ashrsi3_out, lshrqi3_out, lshrhi3_out, lshrsi3_out): Same. (avr_rtx_costs_1, extra_constraint_Q): Same. (avr_address_cost): Use SUBREG_P if possible. 2016-11-17 Richard Biener PR middle-end/78383 * tree-cfgcleanup.c (cleanup_control_flow_bb): Do not turn non-local goto into CFG. 2016-11-17 Richard Biener * common.opt (ftree-loop-if-convert-stores): Mark as preserved for backward compatibility. * doc/invoke.texi (ftree-loop-if-convert-stores): Remove. * tree-if-conv.c (pass_if_conversion::gate): Do not test flag_tree_loop_if_convert_stores. (pass_if_conversion::execute): Likewise. 2016-11-17 Kyrylo Tkachov * config/aarch64/predicates.md (aarch64_reg_or_fp_zero): Check for const_double code before calling aarch64_float_const_zero_rtx_p. 2016-11-17 Richard Biener PR tree-optimization/78306 * ipa-inline-analysis.c (initialize_inline_failed): Do not inhibit inlining if function calls cilk_spawn. (can_inline_edge_p): Likewise. 2016-11-17 Richard Biener PR middle-end/78305 * fold-const.c (negate_expr_p): Fix multiplication case. 2016-11-17 Chung-Lin Tang PR target/78357 * config/nios2/nios2.c (nios2_init_libfuncs): Remove TARGET_LINUX_ABI condition. (TARGET_INIT_LIBFUNCS): Delete definition and... * config/nios2/linux.h (TARGET_INIT_LIBFUNCS): ...move to here, add comments. 2016-11-17 Krister Walfridsson * config/netbsd-stdint.h: New. * config.gcc (i[34567]86-*-netbsd): Add netbsd-stdint.h to tm_file. (x86_64-*-netbsd*): Likewise. 2016-11-16 Andrew PInski * config/aarch64/aarch64.opt (mverbose-cost-dump): New option. * config/aarch64/aarch64.c (aarch64_rtx_costs): Use flag_aarch64_verbose_cost instead of checking for details dump. (aarch64_rtx_costs_wrapper): Likewise. 2016-11-16 Jakub Jelinek PR rtl-optimization/78378 * combine.c (make_extraction): Use force_to_mode for non-{REG,MEM} inner only if pos is 0. Fix up formatting. 2016-11-17 Alan Modra PR rtl-optimization/78325 PR rtl-optimization/70890 * ira.c (combine_and_move_insns): Only remove REG_EQUIV notes for dead regno. 2016-11-16 Jason Merrill * rtl.h: Declare gt_ggc_mx and gt_pch_nx. 2016-11-16 Bill Schmidt Richard Biener PR tree-optimization/77848 * tree-if-conv.c (version_loop_for_if_conversion): When versioning an outer loop, only save basic block aux information for the inner loop. (versionable_outer_loop_p): New function. (tree_if_conversion): Version the outer loop instead of the inner one if the pattern will be recognized for outer-loop vectorization. 2016-11-16 Andrew Burgess * gcc/bb-reorder.c: Remove 'toplev.h' include. (pass_partition_blocks::gate): No longer check user_defined_section_attribute, instead check the function decl for a section attribute. * gcc/c-family/c-attribs.c (handle_section_attribute): No longer set user_defined_section_attribute. * gcc/final.c (rest_of_handle_final): Likewise. * gcc/toplev.c: Remove definition of user_defined_section_attribute. * gcc/toplev.h: Remove declaration of user_defined_section_attribute. 2016-11-16 Maciej W. Rozycki * config/mips/mips.md (casesi_internal_mips16_): Explicitly switch between JR and JRC for the table jump. Adjust instruction count. 2016-11-16 Maciej W. Rozycki * config/mips/mips.md (casesi_internal_mips16_): Set `insn_count' to 11 rather than 16. 2016-11-16 Maciej W. Rozycki * config/mips/mips.md (casesi_internal_mips16_): Use the `ltu' rather than `leu' operation in the RTL pattern 2016-11-16 Maciej W. Rozycki * config/mips/mips.md (casesi_internal_mips16_): Add missing instruction prefixes throughout. Correct formatting. 2016-11-16 Maciej W. Rozycki * config/mips/mips.c (mips_output_jump): Output R_MICROMIPS_JALR rather than R_MIPS_JALR relocation in microMIPS code. Do not cancel short delay slots in PIC call relaxation. 2016-11-16 Thomas Preud'homme * config/arm/arm.md (arm_addsi3): Add alternative for addition of general register with general register or ARM constant into SP register. 2016-11-16 Jakub Jelinek PR fortran/78299 * omp-low.c (expand_omp_for_static_nochunk): Don't assert that loop->header == body_bb if broken_loop. 2015-11-16 Wilco Dijkstra * tree-ssa-math-opts.c (bswap_replace): Remove test of SLOW_UNALIGNED_ACCESS. 2016-11-16 Alexander Monakov * config/nvptx/mkoffload.c (main): Check that either OpenACC or OpenMP is selected. Pass -mgomp to offload compiler in OpenMP case. * config/nvptx/nvptx-protos.h (nvptx_shuffle_kind): Move enum declaration from nvptx.c. (nvptx_gen_shuffle): Declare. (nvptx_output_set_softstack): Declare. * config/nvptx/nvptx.c (nvptx_shuffle_kind): Move to nvptx-protos.h. (need_softstack_decl): New variable. (need_unisimt_decl): New variable. (diagnose_openacc_conflict): New. Use it... (nvptx_option_override): ...here. Handle TARGET_GOMP. (nvptx_encode_section_info): Handle "shared" attribute. (write_as_kernel): Restrict to OpenACC target regions. (init_softstack_frame): New. (nvptx_init_unisimt_predicate): New. (write_omp_entry): New. Use it... (nvptx_declare_function_name): ...here to emit OpenMP target region entrypoints. Handle TARGET_SOFT_STACK. Call nvptx_init_unisimt_predicate. (nvptx_output_set_softstack): New. (nvptx_get_drap_rtx): Return %argp as the DRAP if needed. (nvptx_gen_shuffle): Export. (nvptx_output_call_insn): Handle COND_EXEC patterns. Emit instruction predicate. (nvptx_print_operand): Fix handling of instruction predicates. (nvptx_get_unisimt_master): New helper function. (nvptx_get_unisimt_predicate): Ditto. (nvptx_call_insn_is_syscall_p): Ditto. (nvptx_unisimt_handle_set): Ditto. (nvptx_reorg_uniform_simt): New. Transform code for -muniform-simt. (nvptx_reorg): Call nvptx_reorg_uniform_simt. (nvptx_handle_shared_attribute): New. Use it... (nvptx_attribute_table): ... here (new entry). (nvptx_record_offload_symbol): Handle NULL attributes. (nvptx_file_end): Handle need_softstack_decl and need_unisimt_decl. (nvptx_simt_vf): New. (TARGET_SIMT_VF): Define. * config/nvptx/nvptx.h (TARGET_CPU_CPP_BUILTINS): Define __nvptx_softstack or __nvptx_unisimt__ when -msoft-stack, or resp. -muniform-simt option is active. (STACK_SIZE_MODE): Define. (FIXED_REGISTERS): Adjust. (SOFTSTACK_SLOT_REGNUM): New. (SOFTSTACK_PREV_REGNUM): New. (REGISTER_NAMES): Adjust. (struct machine_function): New fields. * config/nvptx/nvptx.md (UNSPEC_SET_SOFTSTACK): New. (UNSPEC_VOTE_BALLOT): Ditto. (UNSPEC_LANEID): Ditto. (UNSPECV_NOUNROLL): Ditto. (atomic): New attribute. (predicable): New attribute. Generate predicated forms via define_cond_exec. (br_true): Mark as not predicable. (br_false): Ditto. (br_true_uni): Ditto. (br_false_uni): Ditto. (return): Ditto. (trap_if_true): Ditto. (trap_if_false): Ditto. (nvptx_fork): Ditto. (nvptx_forked): Ditto. (nvptx_joining): Ditto. (nvptx_join): Ditto. (nvptx_barsync): Ditto. (epilogue): Emit stack restore if TARGET_SOFT_STACK. (allocate_stack): Implement for TARGET_SOFT_STACK. Remove unused code. (allocate_stack_): Remove unused pattern. (set_softstack_insn): New pattern. (restore_stack_block): Handle for TARGET_SOFT_STACK. (nvptx_vote_ballot): New pattern. (omp_simt_lane): Ditto. (omp_simt_last_lane): Ditto. (omp_simt_ordered): Ditto. (omp_simt_vote_any): Ditto. (omp_simt_xchg_bfly): Ditto. (omp_simt_xchg_idx): Ditto. (nvptx_nounroll): Ditto. (atomic_compare_and_swap_1): Mark with atomic attribute. (atomic_exchange): Ditto. (atomic_fetch_add): Ditto. (atomic_fetch_addsf): Ditto. (atomic_fetch_): Ditto. * config/nvptx/nvptx.opt (msoft-stack): New option. (muniform-simt): Ditto. (mgomp): Ditto. * config/nvptx/t-nvptx (MULTILIB_OPTIONS): New. * doc/extend.texi (Nvidia PTX Variable Attributes): New section. * doc/invoke.texi (msoft-stack): Document. (muniform-simt): Document (mgomp): Document. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_SIMT_VF): New hook. * target.def: Define it. * target-insns.def (omp_simt_lane): New. (omp_simt_last_lane): New. (omp_simt_ordered): New. (omp_simt_vote_any): New. (omp_simt_xchg_bfly): New. (omp_simt_xchg_idx): New. 2016-11-16 Maciej W. Rozycki * config/mips/mips-protos.h (mips_set_text_contents_type): New prototype. * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): New macro. (ASM_OUTPUT_CASE_END): Likewise. * config/mips/mips.c (mips_set_text_contents_type): New function. (mips16_emit_constants): Record the pool's initial label number with the `consttable' insn. Emit a `consttable_end' insn at the end. (mips_final_prescan_insn): Call `mips_set_text_contents_type' for `consttable' insns. (mips_final_postscan_insn): Call `mips_set_text_contents_type' for `consttable_end' insns. * config/mips/mips.md (unspec): Add UNSPEC_CONSTTABLE_END enum value. (consttable): Add operand. (consttable_end): New insn. 2016-11-16 Yuri Rumyantsev * params.def (PARAM_VECT_EPILOGUES_NOMASK): New. * tree-if-conv.c (tree_if_conversion): Make public. * * tree-if-conv.h: New file. * tree-vect-data-refs.c (vect_analyze_data_ref_dependences) Avoid dynamic alias checks for epilogues. * tree-vect-loop-manip.c (vect_do_peeling): Return created epilog. * tree-vect-loop.c: include tree-if-conv.h. (new_loop_vec_info): Add zeroing orig_loop_info field. (vect_analyze_loop_2): Don't try to enhance alignment for epilogues. (vect_analyze_loop): Add argument ORIG_LOOP_INFO which is not NULL if epilogue is vectorized, set up orig_loop_info field of loop_vinfo using passed argument. (vect_transform_loop): Check if created epilogue should be returned for further vectorization with less vf. If-convert epilogue if required. Print vectorization success for epilogue. * tree-vectorizer.c (vectorize_loops): Add epilogue vectorization if it is required, pass loop_vinfo produced during vectorization of loop body to vect_analyze_loop. * tree-vectorizer.h (struct _loop_vec_info): Add new field orig_loop_info. (LOOP_VINFO_ORIG_LOOP_INFO): New. (LOOP_VINFO_EPILOGUE_P): New. (LOOP_VINFO_ORIG_VECT_FACTOR): New. (vect_do_peeling): Change prototype to return epilogue. (vect_analyze_loop): Add argument of loop_vec_info type. (vect_transform_loop): Return created loop. 2016-11-16 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_components_for_bb): Mark the LR component as used also if LR_REGNO is a live input to the bb. * df-scan.c (df_get_entry_block_def_set): Return immediately after clearing the set if DF_SCAN_EMPTY_ENTRY_EXIT is set. (df_get_exit_block_use_set): Ditto. * df.h (df_scan_flags): New enum. * shrink-wrap.c (try_shrink_wrapping_separate): Set DF_SCAN_EMPTY_ENTRY_EXIT in df_scan->local_flags, and call df_update_entry_block_defs and df_update_exit_block_uses at the start; clear the flag and call those functions at the end. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): Set nb_iterations to the number of latch iterations rather than the number of loop iterations. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * combine.c (maybe_swap_commutative_operands): New function. (combine_simplify_rtx): Use it. (change_zero_ext): Likewise. (make_compound_operation_int): New function, split out of... (make_compound_operation): ...here. Use maybe_swap_commutative_operands for both. 2016-11-16 Richard Earnshaw * arm/arm-fpus.def (vfpv2): New FPU, currently an alias for 'vfp'. (neon-vfpv3): New FPU, currently an alias for 'neon'. * arm/arm-tables.opt: Regenerated. * arm/t-aprofile (MULTILIB_REUSE): Add reuse rules for vfpv2 and neon-vfpv3. * doc/invoke.texi (ARM: -mfpu): Document new options. Note that 'vfp' and 'neon' are aliases for specific implementations. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * optabs.c (vector_compare_rtx): Add a cmp_mode parameter and use it in the final call to gen_rtx_fmt_ee. (expand_vec_cond_expr): Update accordingly. (expand_vec_cmp_expr): Likewise. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * cprop.c (local_cprop_find_used_regs): Use df_read_modify_subreg_p. 2016-11-16 Richard Biener PR middle-end/78333 * gimplify.c (gimplify_function_tree): Do not instrument GNU extern inline functions. 2016-11-16 Martin Liska PR sanitizer/78270 * gimplify.c (gimplify_switch_expr): Always save previous gimplify_ctxp->live_switch_vars. 2016-11-16 Andrew Burgess * config/arc/arc.md (movb peephole2): New peephole2 to merge two zero_extract operations to allow a movb to occur. * testsuite/gcc.target/arc/movb-1.c: Update little endian arc results. * testsuite/gcc.target/arc/movb-2.c: Likewise. * testsuite/gcc.target/arc/movb-5.c: Likewise. * testsuite/gcc.target/arc/movh_cl-1.c: Extend test to cover little endian arc. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * expr.c (emit_group_load_1): Tighten check for whether an access involves only one operand of a CONCAT. Use extract_bit_field for constants if the bit range does span the whole operand. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * rtlanal.c (rtx_addr_can_trap_p_1): Handle unknown sizes. 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * tree-vect-loop.c (vect_transform_loop): Protect the updates of all three iteration counts with an any_* test. Use a single update for each count. Fix the calculation of nb_iterations_estimate. 2016-11-16 Richard Sandiford * config/pdp11/pdp11.c: Include dbxout.h. 2016-11-16 Richard Sandiford * config/arc/arc.c (arc_loop_hazard): Add missing brackets. 2016-11-16 Kyrylo Tkachov PR target/78364 * config/arm/arm.md (*extv_reg): Restrict operands 2 and 3 to the proper ranges for an SBFX instruction. (extzv_t2): Likewise for UBFX. 2016-11-16 Richard Biener PR tree-optimization/78348 * tree-loop-distribution.c (enum partition_kind): Add PKIND_MEMMOVE. (generate_memcpy_builtin): Honor PKIND_MEMCPY on the partition. (classify_partition): Set PKIND_MEMCPY if dependence analysis revealed no dependency, PKIND_MEMMOVE otherwise. 2016-11-16 Jakub Jelinek PR sanitizer/77823 * ubsan.c (ubsan_build_overflow_builtin): Add DATAP argument, if it points to non-NULL tree, use it instead of ubsan_create_data. (instrument_si_overflow): Handle vector signed integer overflow checking. * ubsan.h (ubsan_build_overflow_builtin): Add DATAP argument. * tree-vrp.c (simplify_internal_call_using_ranges): Punt for vector IFN_UBSAN_CHECK_*. * internal-fn.c (expand_addsub_overflow): Add DATAP argument, pass it through to ubsan_build_overflow_builtin. (expand_neg_overflow, expand_mul_overflow): Likewise. (expand_vector_ubsan_overflow): New function. (expand_UBSAN_CHECK_ADD, expand_UBSAN_CHECK_SUB, expand_UBSAN_CHECK_MUL): Use tit for vector arithmetics. (expand_arith_overflow): Adjust expand_*_overflow callers. 2016-11-16 Matthias Klose * doc/install.texi: Remove references to java/libjava. 2016-11-16 Kugan Vivekanandarajah * tree-ssa-coalesce.c (register_default_def): Remove register_ssa_partition. (create_outofssa_var_map): Likewise. * tree-ssa-live.c (register_ssa_partition_check): Remove. * tree-ssa-live.h (register_ssa_partition): Likewise. 2016-11-15 Bernd Edlinger * genattrtab.c (attr_rtx_1): Avoid allocating new rtx objects. Clear ATTR_CURR_SIMPLIFIED_P for re-used binary rtx objects. Use DEF_ATTR_STRING for string arguments. Use RTL_HASH for integer arguments. Only set ATTR_PERMANENT_P on newly hashed rtx when all sub-rtx are also permanent. (attr_eq): Simplify. (attr_copy_rtx): Remove. (make_canonical, get_attr_value): Use attr_equal_p. (copy_boolean): Rehash NOT. (simplify_test_exp_in_temp, optimize_attrs): Remove call to attr_copy_rtx. (attr_alt_intersection, attr_alt_union, attr_alt_complement, mk_attr_alt): Rehash EQ_ATTR_ALT. (make_automaton_attrs): Use attr_eq. 2016-11-15 Matthias Klose * doc/install.texi: Remove references to java/libjava. * doc/sourcebuild.texi: Likewise. * doc/invoke.texi: Likewise. * doc/standards.texi: Likewise. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use Pmode instead of VOIDmode. * config/ia64/ia64.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/iq2000/iq2000.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/m68k/m68k.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/microblaze/microblaze.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/mips/mips.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/mn10300/mn10300.h (INCOMING_RETURN_ADDR_RTX): Likewise. * config/nios2/nios2.h (INCOMING_RETURN_ADDR_RTX): Likewise. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * dce.c (check_argument_store): Pass the size instead of the memory reference. (find_call_stack_args): Pass MEM_SIZE to check_argument_store. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * alias.c (canon_rtx): Use simplify_gen_binary. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * rtl.h (load_extend_op): Declare. * rtlanal.c (load_extend_op): New function. (nonzero_bits1): Use it. (num_sign_bit_copies1): Likewise. * cse.c (cse_insn): Likewise. * fold-const.c (fold_single_bit_test): Likewise. (fold_unary_loc): Likewise. * fwprop.c (free_load_extend): Likewise. * postreload.c (reload_cse_simplify_set): Likewise. (reload_cse_simplify_operands): Likewise. * combine.c (try_combine): Likewise. (simplify_set): Likewise. Remove redundant SUBREG_BYTE and subreg_lowpart_p checks. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * combine.c (simplify_shift_const_1): Use the number of bits in the inner mode to determine the range of the shift. When handling shifts of vectors, skip any rules that apply only to scalars. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * rtlanal.c (num_sign_bit_copies1): Calculate bitwidth after handling VOIDmode. 2016-11-15 Matthias Klose * doc/install.texi: Remove references to gcj/libjava. * doc/invoke.texi: Likewise. 2016-11-15 Jeff Law * tree-ssa-threadbackward.c (fsm_find_thread_path): Remove unneeded parameter. Callers changed. (check-subpath_and_update_thread_path): Extracted from fsm_find_control_statement_thread_paths. (handle_phi, handle_assignment, handle_assignment_p): Likewise. (handle_phi, handle_assignment): Allow any constant node, not just INTEGER_CST. 2016-11-15 Claudiu Zissulescu * config/arc/arc-arch.h: New file. * config/arc/arc-arches.def: Likewise. * config/arc/arc-cpus.def: Likewise. * config/arc/arc-options.def: Likewise. * config/arc/t-multilib: Likewise. * config/arc/genmultilib.awk: Likewise. * config/arc/genoptions.awk: Likewise. * config/arc/arc-tables.opt: Likewise. * config/arc/driver-arc.c: Likewise. * testsuite/gcc.target/arc/nps400-cpu-flag.c: Likewise. * common/config/arc/arc-common.c (arc_handle_option): Trace toggled options. * config.gcc (arc*-*-*): Add arc-tables.opt to arc's extra options; check for supported cpu against arc-cpus.def file. (arc*-*-elf*, arc*-*-linux-uclibc*): Use new make fragment; define TARGET_CPU_BUILD macro; add driver-arc.o as an extra object. * config/arc/arc-c.def: Add emacs local variables. * config/arc/arc-opts.h (processor_type): Use arc-cpus.def file. (FPU_FPUS, FPU_FPUD, FPU_FPUDA, FPU_FPUDA_DIV, FPU_FPUDA_FMA) (FPU_FPUDA_ALL, FPU_FPUS_DIV, FPU_FPUS_FMA, FPU_FPUS_ALL) (FPU_FPUD_DIV, FPU_FPUD_FMA, FPU_FPUD_ALL): New defines. (DEFAULT_arc_fpu_build): Define. (DEFAULT_arc_mpy_option): Define. * config/arc/arc-protos.h (arc_init): Delete. * config/arc/arc.c (arc_cpu_name): New variable. (arc_selected_cpu, arc_selected_arch, arc_arcem, arc_archs) (arc_arc700, arc_arc600, arc_arc601): New variable. (arc_init): Add static; remove selection of default tune value, cleanup obsolete error messages. (arc_override_options): Make use of .def files for selecting the right cpu and option configurations. * config/arc/arc.h (stdbool.h): Include. (TARGET_CPU_DEFAULT): Define. (CPP_SPEC): Remove mcpu=NPS400 handling. (arc_cpu_to_as): Declare. (EXTRA_SPEC_FUNCTIONS): Define. (OPTION_DEFAULT_SPECS): Likewise. (ASM_DEFAULT): Remove. (ASM_SPEC): Use arc_cpu_to_as. (DRIVER_SELF_SPECS): Remove deprecated options. (arc_base_cpu): Declare. (TARGET_ARC600, TARGET_ARC601, TARGET_ARC700, TARGET_EM) (TARGET_HS, TARGET_V2, TARGET_ARC600): Make them use arc_base_cpu variable. (MULTILIB_DEFAULTS): Use ARC_MULTILIB_CPU_DEFAULT. * config/arc/arc.md (attr_cpu): Remove. * config/arc/arc.opt (mno-mpy): Deprecate. (mcpu=ARC600, mcpu=ARC601, mcpu=ARC700, mcpu=NPS400, mcpu=ARCEM) (mcpu=ARCHS): Remove. (mcrc, mdsp-packa, mdvbf, mmac-d16, mmac-24, mtelephony, mrtsc): Deprecate. (mbarrel_shifte, mspfp_, mdpfp_, mdsp_pack, mmac_): Remove. (arc_fpu): Use new defines. (mpy-option): Change to use numeric or string like inputs. * config/arc/t-arc (driver-arc.o): New target. (arc-cpus, t-multilib, arc-tables.opt): Likewise. * config/arc/t-arc-newlib: Delete. * config/arc/t-arc-uClibc: Renamed to t-uClibc. * doc/invoke.texi (ARC): Update arc options. 2016-11-15 Maciej W. Rozycki * config/mips/mips.c (mips16_emit_constants): Emit `consttable' insn at the beginning of the constant pool. (mips_insert_insn_pseudos): New function. (mips_machine_reorg2): Call it. * config/mips/mips.md (unspec): Add UNSPEC_CONSTTABLE and UNSPEC_INSN_PSEUDO enum values. (insn_pseudo, consttable): New insns. 2016-11-15 Michael Matz PR missed-optimization/77881 * combine.c (simplify_comparison): Remove useless subregs also inside the loop, not just after it. (make_compound_operation): Recognize some subregs as being masking as well. 2016-11-15 Richard Sandiford Alan Hayward David Sherwood * dwarf2out.c (mem_loc_descriptor): Fix GET_MODE_CLASS/ GET_MODE_SIZE typo. 2016-11-14 Michael Meissner * config/rs6000/rs6000.c (rs6000_expand_vector_set): Add support for using xxinsertw and vinsert{b,h} on ISA 3.0. * config/rs6000/vsx.md (vsx_extract_): Update comment. (vsx_set__p9): New insn to generate xxinsertw and vinsert{b,h} on ISA 3.0. 2016-11-14 Thomas Preud'homme * tree-ssa-math-opts.c (find_bswap_or_nop): Zero out bytes in cmpxchg and cmpnop in two steps: first the ones not accessed in original gimple expression in a endian independent way and then the ones not accessed in the final result in an endian-specific way. (bswap_replace): Stop doing big endian adjustment. 2016-11-14 Uros Bizjak * config/i386/i386.md (*andndi3_doubleword): Merge operand constraints. (*ashl3_doubleword): Ditto. 2016-11-14 Martin Liska * tree-ssa-dse.c (dse_optimize_stmt): Remove quotes and extra new line. 2016-11-14 Prasad Ghangal Richard Biener * doc/invoke.texi (fgimple): Document. * dumpfile.h (TDF_GIMPLE): Add. * dumpfile.c (dump_options): Add gimple. * gimple-pretty-print.c (dump_gimple_switch): Adjust dump for TDF_GIMPLE. (dump_gimple_label): Likewise. (dump_gimple_phi): Likewise. (dump_gimple_bb_header): Likewise. (dump_phi_nodes): Likewise. (pp_cfg_jump): Likewise. Pass in dump flags. (dump_implicit_edges): Adjust. * passes.c (pass_init_dump_file): Do not dump function header for TDF_GIMPLE. * tree-cfg.c (dump_function_to_file): Dump function return type and __GIMPLE keyword for TDF_GIMPLE. Change guard for dumping GIMPLE stmts. * tree-pretty-print.c (dump_decl_name): Adjust dump for TDF_GIMPLE. (dump_generic_node): Likewise. * function.h (struct function): Add pass_startwith member. * passes.c (execute_one_pass): Implement startwith. * tree-ssanames.c (make_ssa_name_fn): New argument, check for version and assign proper version for parsed ssa names. * tree-ssanames.h (make_ssa_name_fn): Add new argument to the function. * internal-fn.c (expand_PHI): New function. * internal-fn.h (expand_PHI): Declared here. * internal-fn.def: New defination for PHI. * tree-cfg.c (lower_phi_internal_fn): New function. (build_gimple_cfg): Call it. (verify_gimple_call): Condition for passing label as arg in internal function PHI. * tree-into-ssa.c (rewrite_add_phi_arguments): Handle already present PHIs with arguments. 2016-11-14 Martin Liska PR bootstrap/78069 * common.opt: Add prefer-atomic as a new enum value for -fprofile-update. * coretypes.h: Likewise. * doc/invoke.texi: Document the new option value. * gcc.c: Replace atomic with prefer-atomic. Remove warning. * tree-profile.c (tree_profiling): Select default value of -fprofile-update when 'prefer-atomic' is selected. 2016-11-14 Wilco Dijkstra * config/arm/cortex-a57.md (cortex_a57_alu): Move extend here, bfm... (cortex_a57_alu_shift): ...here. 2016-11-14 Wilco Dijkstra * config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_3) Use bfx attribute. (aarch64_lshr_sisd_or_int_3): Likewise. (aarch64_ashr_sisd_or_int_3): Likewise. (si3_insn_uxtw): Likewise. (3_insn): Likewise. (_ashl): Likewise. (zero_extend_lshr): Likewise. (extend_ashr): Likewise. (): Likewise. (insv): Likewise. (andim_ashift_bfiz): Likewise. * config/aarch64/thunderx.md (thunderx_shift): Add bfx. * config/arm/cortex-a53.md (cortex_a53_alu_shift): Likewise. * config/arm/cortex-a57.md (cortex_a57_alu): Add bfx. * config/arm/exynos-m1.md (exynos_m1_alu): Add bfx. (exynos_m1_alu_p): Likewise. * config/arm/types.md: Add bfx. * config/arm/xgene1.md (xgene1_bfm): Add bfx. 2016-11-14 Wilco Dijkstra * config/aarch64/aarch64.c (cortexa57_vector_cost): Change vec_stmt_cost, vec_align_load_cost and vec_unalign_load_cost. 2016-11-14 Richard Biener PR tree-optimization/78312 * gimple-ssa-backprop.c (backprop::prepare_change): Reset flow-sensitive info. 2016-11-14 Georg-Johann Lay PR target/78093 * doc/invoke.texi (AVR Options) [-mabsdata]: Document new option. * config/avr/avr.opt (-mabsdata): New option. * config/avr/avr-arch.h (avr_device_specific_features): Add AVR_ISA_LDS. * config/avr/avr.c (avr_encode_section_info) [AVR_TINY]: If -mabsdata & symbol is not progmem, tag as AVR_SYMBOL_FLAG_TINY_ABSDATA. * config/avr/avr-mcus.def (attiny4/5/9/10/20): Use AVR_ISA_LDS. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Print cc1_absdata spec depending on AVR_ISA_LDS. * config/avr/specs.h (CC1_SPEC): Enhanced by cc1_absdata spec. 2016-11-13 Jakub Jelinek * match.pd: Don't try to compare addresses of variables with DECL_VALUE_EXPR. 2016-11-13 Kugan Vivekanandarajah * ipa-cp.c (ipa_get_jf_pass_through_result): Skip unary expressions. (propagate_vr_accross_jump_function): Handle unary expressions. * ipa-prop.c (ipa_set_jf_unary_pass_through): New. (load_from_param_1): New. (load_from_unmodified_param): Factor common part into load_from_param_1. (load_from_param): New. (compute_complex_assign_jump_func): Handle unary expressions. (update_jump_functions_after_inlining): Likewise. (ipa_write_jump_function): Likewise. (ipa_read_jump_function): Likewise. 2016-11-13 Prathamesh Kulkarni PR c/35503 * doc/invoke.texi: Document Wrestrict. * pretty-print.c (pp_format): Add case for "Z" specifier. (test_pp_format): Test "Z" specifier. 2016-11-13 Eric Botcazou * ipa-icf.c (sem_function::merge): Do not create a wrapper also if the original function needs a static chain. 2016-11-13 David Edelsohn PR target/78336 * config/rs6000/rs6000.c (rs6000_asm_weaken_decl): Protect ASM_OUTPUT_DEF. 2016-11-12 Segher Boessenkool PR target/77957 * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't return early if !optional_tbtab. 2016-11-11 Eric Botcazou PR rtl-optimization/59461 * doc/rtl.texi (paradoxical subregs): Add missing word. * combine.c (reg_nonzero_bits_for_combine): Do not discard results in modes with precision larger than that of last_set_mode. * rtlanal.c (nonzero_bits1) : If WORD_REGISTER_OPERATIONS is set and LOAD_EXTEND_OP is appropriate, propagate results from inner REGs to paradoxical SUBREGs. (num_sign_bit_copies1) : Likewise. Check that the mode is not larger than a word before invoking LOAD_EXTEND_OP on it. 2016-11-11 Michael Meissner PR target/78243 * config/rs6000/vsx.md (vsx_extract__p9): Correct the element order for little endian ordering. * config/rs6000/altivec.md (reduc_plus_scal_): Use VECTOR_ELT_ORDER_BIG and not BYTES_BIG_ENDIAN to adjust element number. 2016-11-11 Uros Bizjak PR target/78310 * config/i386/i386.md (rotate to rotatex splitter): Avoid overflow when calculating operand 2. (rotate to rotatex zext splitter): Ditto. 2016-11-11 Jeff Law * gimple-ssa-isolate-paths.c (is_divmod_with_given_divisor): New function. (stmt_uses_name_in_undefined_way): New function, extracted from find_implicit_erroneous_behavior and extended for div/mod case. (stmt_uses_0_or_null_in_undefined_way): New function, extracted from find_explicit_erroneous_behavior and extended for div/mod case. (find_implicit_erroneous_behavior): Use new helper function. (find_explicit_erroneous_behavior): Use new helper function. 2016-11-11 Richard Biener PR tree-optimization/71575 * graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove bogus assert. 2016-11-11 Richard Biener PR middle-end/78295 * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn about uninitialized destination arg of BIT_INSERT_EXPR. 2016-11-10 Sandra Loosemore PR c/37998 * doc/invoke.texi (Code Gen Options) [-fno-common]: Use correct terminology. Expand to remove ambiguity. 2016-11-10 Segher Boessenkool PR rtl-optimization/78232 * combine.c (try_combine): Add a big comment about why reusing i2dest is undesirable. (change_zero_ext): Do not call simplify_gen_binary, do the simplifications manually. 2016-11-10 Michael Meissner * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If ISA 3.0, enable HImode and QImode to go in vector registers by default if the -mvsx-small-integer option is enabled. (rs6000_secondary_reload_simple_move): Likewise. (rs6000_preferred_reload_class): Don't force integer constants to be loaded into vector registers that we can easily make into memory (or being created in the GPRs and moved over with direct move). * config/rs6000/vsx.md (UNSPEC_P9_MEMORY): Delete, no longer used. (vsx_extract_): Rework V4SImode, V8HImode, and V16QImode vector extraction on ISA 3.0 when the scalar integer can be allocated in vector registers. Generate the VEC_SELECT directy, and don't use UNSPEC's to avoid having the scalar type in a vector register. Make the expander target registers, and let the combiner fold in results storing to memory, if the machine supports stores. (vsx_extract__di): Likewise. (vsx_extract__p9): Likewise. (vsx_extract__di_p9): Likewise. (vsx_extract__store_p9): Likewise. (vsx_extract_si): Likewise. (vsx_extract__p8): Likewise. (p9_lxsizx): Delete, no longer used. (p9_stxsix): Likewise. * config/rs6000/rs6000.md (INT_ISA3): New mode iterator for integers in vector registers for ISA 3.0. (QHI): Update comment. (zero_extendqi2): Add support for ISA 3.0 scalar load or vector extract instructions in sign/zero extend. (zero_extendhi): Likewise. (extendqi): Likewise. (extendhi2): Likewise. (HImode splitter for load/sign extend in vector register): Likewise. (float2): Eliminate old method of optimizing floating point conversions to/from small data types and rewrite it to support QImode/HImode being allowed in vector registers on ISA 3.0. (float2_internal): Likewise. (floatuns2): Likewise. (floatuns2_internal): Likewise. (fix_trunc2): Likewise. (fix_trunc2_internal): Likewise. (fixuns_trunc2): Likewise. (fixuns_trunc2_internal): Likewise. VSPLITISW on ISA 2.07. (movhi_internal): Combine movhi_internal and movqi_internal into one mov_internal with an iterator. Add support for QImode and HImode being allowed in vector registers. Make large number of attributes and constraints easier to read. (movqi_internal): Likewise. (mov_internal): Likewise. (movdi_internal64): Fix constraint to allow loading -16..15 with VSPLITISW on ISA 2.07. (integer XXSPLTIB splitter): Add support for QI, HI, and SImode as well as DImode. 2016-11-10 Pat Haugen PR rtl-optimization/78241 * loop-unroll.c (unroll_loop_runtime_iterations): Don't adjust 'niter', but emit initial peel copy if niter expr is not reliable. 2016-11-10 Segher Boessenkool * dwarf2cfi.c (dump_cfi_row): Add forward declaration. (maybe_record_trace_start): If the CFI is different on the new and old paths, print out both to the dump file before ICEing. 2016-11-10 Vladimir Makarov * target.def (additional_allocno_class_p): New. * hooks.h (hook_bool_reg_class_t_false): New prototype. * hooks.c (hook_bool_reg_class_t_false): New. * ira.c (setup_allocno_and_important_classes): Use the new hook. * doc/tm.texi.in (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Add it. * doc/tm.texi: Update. 2016-11-10 Jason Merrill * gengtype.c (new_structure): Append to structures list. (find_structure): Likewise. 2016-11-10 Jim Wilson * tree-loop-distribution.c (pg_add_dependence_edges): Return 2 if this_dir is 2. Check for this_dir non-zero before dir != this_dir check. 2016-11-10 Jakub Jelinek * omp-low.c (lower_omp_target): Fix up argument to is_reference. (expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being TRUNC_DIV_EXPR. * gimplify.c (gimplify_scan_omp_clauses): Likewise. Set ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran. Remove omp_no_lastprivate callers. Propagate lastprivate on combined teams distribute parallel for simd even to distribute and teams construct. For OMP_CLAUSE_DEPEND add missing break at the end of OMP_CLAUSE_DEPEND_SINK case. (omp_notice_variable): Use lang_hooks.decls.omp_scalar_p. (omp_no_lastprivate): Removed. (gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers. (gimplify_omp_for): Likewise. (computable_teams_clause): Fail for automatic vars from current function not yet seen in bind expr. * langhooks.c (lhd_omp_scalar_p): New function. * langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p. * varpool.c (varpool_node::get_create): Set node->offloading even for DECL_EXTERNAL decls. * langhooks-def.h (lhd_omp_scalar_p): New prototype. (LANG_HOOKS_OMP_SCALAR_P): Define. (LANG_HOOKS_DECLS): Use it. 2016-11-10 Martin Liska PR sanitizer/78270 * gimplify.c (gimplify_switch_expr): Create live_switch_vars only when SWITCH_BODY is a BIND_EXPR. 2016-11-10 Pierre-Marie de Rodat PR debug/78112 * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl on the context only when it has no DIE yet. 2016-11-10 Richard Earnshaw * arm.h (target_cpus): Delete. * arm-opts.h (enum processor_type): Prefix entires with TARGET_CPU_. * arm.c (all_cores): Prefix IDENT with TARGET_CPU_. (all_architectures): Likewise. (arm_option_override): Adjust use of CPU enums. (arm_sched_reorder): Likewise. * vfp.md (movdi_vfp, movdi_vfp_cortexa8): Likewise. * arm.opt (mcpu, mtune): Adjust use of CPU enums. * arm/genopt.sh (processor_type): Prefix enumeration entries with TARGET_CPU_. * arm-tables.opt: Regenerated. 2016-11-10 Siddhesh Poyarekar * config/aarch64/aarch64-cores.def (qdf24xx): Update part number. (falkor): New core. * config/aarch64/aarch64-tune.md: Regenerated. * config/arm/arm-cores.def (falkor): New core. * config/arm/arm-tables.opt: Regenerated. * config/arm/arm-tune.md: Regenerated. * config/arm/bpabi.h (BE8_LINK_SPEC): Add falkor support. * config/arm/t-aprofile (MULTILIB_MATCHES): Likewise. * doc/invoke.texi (AArch64 Options/-mtune): Document it. (ARM Options/-mtune): Likewise. 2016-11-10 Kugan Vivekanandarajah Revert 2016-11-09 Kugan Vivekanandarajah * ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions. (propagate_vr_accross_jump_function): Likewise. * ipa-prop.c (ipa_set_jf_unary_pass_through): New. (load_from_param_1): New. (load_from_unmodified_param): Factor common part into load_from_param_1. (load_from_param): New. (compute_complex_assign_jump_func): Handle unary expressions. (ipa_write_jump_function): Likewise. (ipa_read_jump_function): Likewise. 2016-11-09 Segher Boessenkool * simplify-rtx.c (simplify_binary_operation_1): Simplify (xor (and (xor A B) C) B) to (ior (and A C) (and B ~C)) and (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) if C is a const_int. 2016-11-09 David Malcolm * print-rtl-function.c: Include varasm.h. (print_any_param_name): New function. (print_param): New function. (print_rtx_function): Call print_param for each argument. * print-rtl.c (rtx_writer::finish_directive): New function. * print-rtl.h (rtx_writer::finish_directive): New decl. 2016-11-09 Uros Bizjak PR target/78262 * config/i386/i386.md (*3_doubleword): Mark operand 0 as earlyclobber. (*ashl3_doubleword): Ditto for all operand 0 alternatives. 2016-11-09 Martin Liska * fold-const-call.c (fold_const_call): Fix up type of s0 and s1. 2016-11-09 Jakub Jelinek PR target/77718 * builtins.c (expand_builtin_memcmp): Formatting fix. * flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE and SANITIZE_SHIFT_EXPONENT, change SANITIZE_SHIFT to bitwise or of them, renumber other enumerators. * opts.c (sanitizer_opts): Add shift-base and shift-exponent. * doc/invoke.texi: Document -fsanitize=shift-base and -fsanitize-shift-exponent, document -fsanitize=shift as having those 2 suboptions. 2016-11-09 Richard Biener * fold-const.c (tree_swap_operands_p): Remove unused arg. * fold-const.c (tree_swap_operands_p): Likewise. (fold_binary_loc): Adjust. (fold_ternary_loc): Likewise. * genmatch.c (dt_operand::gen_gimple_exp): Likewise. * gimple-fold.c (fold_stmt_1): Likewise. * gimple-match-head.c (gimple_resimplify2): Likewise. (gimple_resimplify3): Likewise. (gimple_simplify): Likewise. * tree-ssa-dom.c (record_equality): Likewise. * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Likewise. * tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise. * tree-ssa-threadedge.c (simplify_control_stmt_condition_1): Likewise. 2016-11-09 Richard Biener * tree-ssa-dom.c (canonicalize_comparison): Remove. (optimize_stmt): Remove redundant pre-propagation canonicalization of comparison operand order. 2016-11-09 Martin Liska * fold-const-call.c (fold_const_call): Fix the folding. 2016-11-09 Richard Biener * common.opt (flag_evaluation_order): Remove. * expr.c (expand_operands): Remove code guarded by flag_evaluation_order. * fold-const.c (reorder_operands_p): Remove, it always returns true. (negate_expr_p): Remove calls to reorder_operands_p. (fold_negate_expr): Likewise. (tree_swap_operands_p): Likewise. (fold_binary_loc): Likewise. 2016-11-09 Andreas Schwab PR target/78254 * config/m68k/m68k.md: Reject out-of-range bit pos in bit-fields insns operating on a register. 2016-11-09 Richard Biener PR tree-optimization/78007 * tree-vect-stmts.c (vectorizable_bswap): New function. (vectorizable_call): Call vectorizable_bswap for BUILT_IN_BSWAP{16,32,64} if arguments are not promoted. 2016-11-09 Richard Biener * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS object for forcing alignment. 2016-11-09 Kugan Vivekanandarajah * ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions. (propagate_vr_accross_jump_function): Likewise. * ipa-prop.c (ipa_set_jf_unary_pass_through): New. (load_from_param_1): New. (load_from_unmodified_param): Factor common part into load_from_param_1. (load_from_param): New. (compute_complex_assign_jump_func): Handle unary expressions. (ipa_write_jump_function): Likewise. (ipa_read_jump_function): Likewise. 2016-11-09 Kugan Vivekanandarajah PR ipa/78121 * ipa-cp.c (propagate_vr_accross_jump_function): Pass param type. Also fold constant passed as argument while computing value range. (propagate_constants_accross_call): Pass param type. * ipa-prop.c: export ipa_get_callee_param_type. * ipa-prop.h: export ipa_get_callee_param_type. 2016-11-09 Maxim Ostapenko * asan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN, BUILT_IN_STRPBRK, BUILT_IN_STRSPN and BUILT_IN_STRSTR. 2016-11-09 Maxim Ostapenko * asan.h (ASAN_STACK_MAGIC_PARTIAL): Remove. * asan.c (ASAN_STACK_MAGIC_PARTIAL): Replace with ASAN_STACK_MAGIC_MIDDLE. (asan_global_struct): Increase the size of fields. (asan_add_global): Add new field constructor. * sanitizer.def (__asan_version_mismatch_check_v6): Replace with __asan_version_mismatch_check_v8. 2016-11-08 David Edelsohn * dwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO at runtime. 2016-11-08 Uros Bizjak PR target/70799 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Handle ASHIFT and LSHIFTRT. (dimode_scalar_chain::compute_convert_gain): Ditto. (dimode_scalar_chain::convert_insn): Ditto. 2016-11-08 Kyrylo Tkachov * gimple-ssa-store-merging.c: Include selftest.h (verify_array_eq): New function. (verify_shift_bytes_in_array): Likewise. (verify_shift_bytes_in_array_right): Likewise. (verify_clear_bit_region): Likewise. (verify_clear_bit_region_be): Likewise. (store_merging_c_tests): Likewise. * selftest.h (store_merging_c_tests): Declare prototype. * selftest-run-tests.c (selftest::run_tests): Run store_merging_c_tests. 2016-11-08 Kyrylo Tkachov * config/arm/arm.opt (mold-rtx-costs): Delete. (mnew-generic-costs): Delete. * config/arm/arm-protos.h (struct tune_params): Delete rtx_costs field. * config/arm/arm.c (arm_rtx_costs_1): Delete. (arm_size_rtx_costs): Likewise. (arm_slowmul_rtx_costs): Likewise. (arm_fastmul_rtx_costs): Likewise. (arm_xscale_rtx_costs): Likewise. (arm_9e_rtx_costs): Likewise. (arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune, arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune, arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune, arm_fa726te_tune arm_cortex_a5_tune, arm_xgene1_tune, arm_marvell_pj4_tune, arm_cortex_a35_tune, arm_exynosm1_tune, arm_cortex_a73_tune, arm_cortex_m7_tune): Delete rtx_costs field. (arm_new_rtx_costs): Rename to... (arm_rtx_costs_internal): ... This. (arm_rtx_costs): Remove old way of doing rtx costs. 2016-11-08 Kyrylo Tkachov * config/arm/arm.c (arm_slowmul_tune): Use generic_extra_costs. (arm_fastmul_tune): Likewise. (arm_strongarm_tune): Likewise. (arm_xscale_tune): Likewise. (arm_9e_tune): Likewise. (arm_marvell_pj4_tune): Likewise. (arm_v6t2_tune): Likewise. (arm_v6m_tune): Likewise. (arm_fa726te_tune): Likewise. 2016-11-08 Kyrylo Tkachov PR tree-optimization/78234 * gimple-ssa-store-merging.c (clear_bit_region): Fix off-by-one error in start != 0 case. 2016-11-08 Martin Liska PR testsuite/78242 * dbgcnt.def: Add new debug counter asan_use_after_scope. * gimplify.c (gimplify_decl_expr): Do not sanitize vars with a value expr. Do not add artificial variables to live_switch_vars. Use the debug counter. (gimplify_target_expr): Use the debug counter. * internal-fn.def: Remove ECF_TM_PURE from ASAN_MARK builtin. * sanitizer.def: Set ATTR_NOTHROW_LEAF_LIST to BUILT_IN_ASAN_CLOBBER_N and BUILT_IN_ASAN_UNCLOBBER_N. 2016-11-08 Richard Biener * tree-vect-stmts.c (get_group_load_store_type): If the access is aligned do not trigger peeling for gaps. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Do not force alignment of vars with DECL_USER_ALIGN. 2016-11-08 James Greenhalgh * config/aarch64/t-aarch64 (aarch64-c.o): Depend on TARGET_H. 2016-11-08 Richard Biener PR tree-optimization/78205 * tree-vect-stmts.c (vectorizable_load): Move check whether we may run into gaps when BB vectorizing SLP permutations ... * tree-vect-slp.c (vect_supported_load_permutation_p): ... here where we can do a more precise check. 2016-11-08 Richard Biener PR tree-optimization/78224 * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds): Split the fallthru edge in case its successor may have PHIs. Do not free dominance info. 2016-11-07 Jakub Jelinek PR target/78229 * config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust EH info even for bzhi and pdep/pext. 2016-11-07 Peter Bergner * config.gcc (powerpc*-*-*, rs6000*-*-*): Remove setting of INCLUDE_EXTRA_SPEC for Advance Toolchain builds. 2016-11-07 Segher Boessenkool * config/rs6000/rs6000.md (div3): Expand using rs6000_emit_swdiv if appropriate. * config/rs6000/vector.md (div3): Ditto. 2016-11-07 David Edelsohn * configure.ac (.hidden): Change to conftest_s string. Provide string for AIX assembler. (gcc_cv_ld_hidden): Yes for AIX. * configure: Regenerate. * dwarf2asm.c (USE_LINKONCE_INDIRECT): Don't set for AIX (XCOFF). * config/rs6000/rs6000-protos.h (rs6000_asm_weaken_decl): Declare (rs6000_xcoff_asm_output_aligned_decl_common): Declare. * config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_DECL_NAME): Define. (ASM_OUTPUT_ALIGNED_DECL_COMMON): Define. (ASM_OUTPUT_ALIGNED_COMMON): Delete. * config/rs6000/rs6000.c (rs6000_init_builtins): Change clog rename from #if to if. (rs6000_xcoff_visibility): New. (rs6000_xcoff_declare_function_name): Add visibility support. (rs6000_xcoff_asm_globalize_decl_name): New. (rs6000_xcoff_asm_output_aligned_decl_common): New. (rs6000_asm_weaken_decl): New. (rs6000_code_end): Disable HIDDEN_LINKONCE on XCOFF. config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Change definition to reference function. 2016-11-07 Jack Howarth PR driver/78206 * incpath.c (remove_dup): Also silently ignore EPERM. 2016-11-07 Martin Jambor * tree.c (verify_type_variant): Use pointer comparison to check that TYPE_SIZE_UNIT match. 2016-11-07 Jakub Jelinek PR target/77834 * dse.c (dse_step5): Call scan_reads even if just insn_info->frame_read. Improve and fix dump file messages. PR target/78227 * config/i386/i386.c (ix86_expand_sse_cmp): Force dest into cmp_mode argument even for -O0 if cmp_mode != mode and maskcmp. 2016-11-07 Prathamesh Kulkarni PR middle-end/35691 * match.pd: Add following two patterns: (x == 0 & y == 0) -> (x | typeof(x)(y)) == 0. (x != 0 | y != 0) -> (x | typeof(x)(y)) != 0. 2016-11-07 Bernd Schmidt * emit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order. * sel-sched-ir.c (create_copy_of_insn_rtx): Likewise. * rtl.h (duplicate_reg_notes): Declare. * rtlanal.c (duplicate_reg_note): New function. PR rtl-optimization/77309 * combine.c (make_compound_operation): Allow EQ for IN_CODE, and don't assume an equality comparison for plain COMPARE. (simplify_comparison): Pass a more accurate code to make_compound_operation. 2016-11-07 Pat Haugen * target.def (compute_pressure_classes): New target hook. * doc/tm.texi.in: Document it. * doc/tm.texi: Regenerate. * ira.c (setup_pressure_classes): Call target hook if defined. 2016-11-07 David Malcolm * print-rtl.c (rtx_writer::operand_has_default_value_p): New method. (rtx_writer::print_rtx): In compact mode, omit trailing operands that have the default values. * print-rtl.h (rtx_writer::operand_has_default_value_p): New method. * rtl-tests.c (selftest::test_dumping_insns): Remove empty label string from expected dump. (seltest::test_uncond_jump): Remove trailing "(nil)" for REG_NOTES from expected dump. 2016-11-07 Jakub Jelinek PR target/77834 * alias.c (nonoverlapping_memrefs_p): If one decl is FUNCTION_DECL or LABEL_DECL and the other is not, return 1. 2016-11-07 Richard Biener PR target/78229 * config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust EH info. 2016-11-07 Richard Biener PR tree-optimization/78218 * gimple-ssa-store-merging.c (pass_store_merging::terminate_all_aliasing_chains): Drop unused argument, fix alias check to also consider uses. (pass_store_merging::execute): Adjust. 2016-11-07 Richard Biener PR tree-optimization/78228 * tree-ssa-phiopt.c (abs_replacement): Avoid introducing undefined behavior. 2016-11-07 Kyrylo Tkachov PR target/77822 * config/aarch64/aarch64.md (*tb1): Use aarch64_simd_shift_imm_ predicate for operand 1. (, ANY_EXTRACT): Use tighter predicates on operands 2 and 3 to restrict them to an appropriate range and add FAIL check if the region they specify is out of range. Delete useless constraint strings. (*, ANY_EXTRACT): Add appropriate predicates on operands 2 and 3 to restrict their range and add pattern predicate. 2016-11-07 Martin Liska * asan.c (enum asan_check_flags): Move the enum to header file. (asan_init_shadow_ptr_types): Make type creation more generic. (shadow_mem_size): New function. (asan_emit_stack_protection): Use newly added ASAN_SHADOW_GRANULARITY. Rewritten stack unpoisoning code. (build_shadow_mem_access): Add new argument return_address. (instrument_derefs): Instrument local variables if use after scope sanitization is enabled. (asan_store_shadow_bytes): New function. (asan_expand_mark_ifn): Likewise. (asan_sanitize_stack_p): Moved from asan_sanitize_stack_p. * asan.h (enum asan_mark_flags): Moved here from asan.c (asan_protect_stack_decl): Protect all declaration that need to live in memory. (asan_sanitize_use_after_scope): New function. (asan_no_sanitize_address_p): Likewise. * cfgexpand.c (partition_stack_vars): Consider asan_sanitize_use_after_scope in condition. (expand_stack_vars): Likewise. * common.opt (-fsanitize-address-use-after-scope): New option. * doc/invoke.texi (use-after-scope-direct-emission-threshold): Explain the parameter. * flag-types.h (enum sanitize_code): Define SANITIZE_USE_AFTER_SCOPE. * gimplify.c (build_asan_poison_call_expr): New function. (asan_poison_variable): Likewise. (gimplify_bind_expr): Generate poisoning/unpoisoning for local variables that have address taken. (gimplify_decl_expr): Likewise. (gimplify_target_expr): Likewise for C++ temporaries. (sort_by_decl_uid): New function. (gimplify_expr): Unpoison all variables for a label we can jump from outside of a scope. (gimplify_switch_expr): Unpoison variables defined in the switch context. (gimplify_function_tree): Clear asan_poisoned_variables. (asan_poison_variables): New function. (warn_switch_unreachable_r): Handle IFN_ASAN_MARK. * internal-fn.c (expand_ASAN_MARK): New function. * internal-fn.def (ASAN_MARK): Declare. * opts.c (finish_options): Handle -fstack-reuse if -fsanitize-address-use-after-scope is enabled. (common_handle_option): Enable address sanitization if -fsanitize-address-use-after-scope is enabled. * params.def (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): New parameter. * params.h: Likewise. * sancov.c (pass_sanopt::execute): Handle IFN_ASAN_MARK. * sanitizer.def: Define __asan_poison_stack_memory and __asan_unpoison_stack_memory functions. * asan.c (asan_mark_poison_p): New function. (transform_statements): Handle asan_mark_poison_p calls. * gimple.c (nonfreeing_call_p): Handle IFN_ASAN_MARK. 2016-11-07 Tamar Christina PR driver/78196 * Makefile.in (SELFTEST_FLAGS): Added -o /dev/null. 2016-11-07 Martin Liska * tree-profile.c (gimple_gen_time_profiler): Set proper type to time_profiler_counter_ptr. 2016-11-07 Richard Biener PR tree-optimization/37150 * tree-vectorizer.h (vect_transform_slp_perm_load): Add n_perms parameter. * tree-vect-slp.c (vect_supported_load_permutation_p): Adjust. (vect_analyze_slp_cost_1): Account for the real number of permutations emitted and for dead loads. (vect_transform_slp_perm_load): Add n_perms parameter counting the number of emitted permutations. * tree-vect-stmts.c (vectorizable_load): Adjust. 2016-11-07 Richard Biener PR tree-optimization/78189 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Fix alignment computation. 2016-11-06 Kugan Vivekanandarajah * ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code. 2016-11-05 Martin Sebor * doc/invoke.texi (Warning Options): Correct typos in -Walloca documentation. 2016-11-05 David Edelsohn PR bootstrap/78188 PR c++/71848 * ipa-comdats.c (pass_ipa_comdats::gate): Require HAVE_COMDAT_GROUP. 2016-11-04 Jakub Jelinek PR target/77834 * alias.c (nonoverlapping_memrefs_p): Return 0 if exprx or expry doesn't have rtl set. 2016-11-04 Bill Schmidt * config/rs6000/rs6000.c (gimple-ssa.h): New #include. (TARGET_GIMPLE_FOLD_BUILTIN): Define as rs6000_gimple_fold_builtin. (rs6000_gimple_fold_builtin): New function. Add handling for early expansion of vector addition builtins. 2016-11-04 Eric Botcazou * expr.h (copy_blkmode_from_reg): Delete. * expr.c (copy_blkmode_from_reg): Make static. 2016-11-04 Eric Botcazou * defaults.h (LOAD_EXTEND_OP): Define if not already defined. * combine.c (LOAD_EXTEND_OP): Delete. (simplify_comparison): Fix comment about LOAD_EXTEND_OP. * cse.c (LOAD_EXTEND_OP): Delete. * fold-const.c (LOAD_EXTEND_OP): Likewise. * fwprop.c (free_load_extend): Remove #ifdef LOAD_EXTEND_OP/#endif. * postreload.c (LOAD_EXTEND_OP): Delete. * reload.c (push_reload): Remove #ifdef LOAD_EXTEND_OP/#endif. Convert conditional compilation based on WORD_REGISTER_OPERATIONS. (find_reloads): Likewise. * reload1.c (eliminate_regs_1): Likewise. * rtlanal.c (nonzero_bits1): Remove #ifdef LOAD_EXTEND_OP/#endif. (num_sign_bit_copies1): Likewise. 2016-11-04 David Malcolm * config/i386/i386.c: Include "selftest.h" and "selftest-rtl.h". (selftest::ix86_test_dumping_hard_regs): New function. (selftest::ix86_run_selftests): New function. (TARGET_RUN_TARGET_SELFTESTS): When CHECKING_P, wire this up to selftest::ix86_run_selftests. * doc/tm.texi.in (TARGET_RUN_TARGET_SELFTESTS): New. * doc/tm.texi: Regenerate * selftest-rtl.h: New file. * rtl-tests.c: Include "selftest-rtl.h". (selftest::assert_rtl_dump_eq): Make non-static. (ASSERT_RTL_DUMP_EQ): Move to selftest-rtl.h. (selftest::test_dumping_regs): Update comment. * selftest-run-tests.c: Include "target.h". (selftest::run_tests): If non-NULL, call targetm.run_target_selftests. * target.def (run_target_selftests): New hook. 2016-11-04 Thomas Preud'homme * config/arm/arm-arches.def (armv8-m.main+dsp): Set Cortex-M33 as representative core for this architecture. * config/arm/arm-cores.def (cortex-m33): Define new processor. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex-M33 to the list of valid -mcpu options. * doc/invoke.texi (ARM Options): Document new Cortex-M33 processor. 2016-11-04 Thomas Preud'homme * config/arm/arm-arches.def (armv8-m.base): Set Cortex-M23 as representative core for this architecture. * config/arm/arm-cores.def (cortex-m23): Define new processor. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. * config/arm/arm.c (arm_v6m_tune): Add Cortex-M23 to the list of cores this tuning parameters apply to in the comment. * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex-M23 to the list of valid -mcpu options. * doc/invoke.texi (ARM Options): Document new Cortex-M23 processor. 2016-11-04 Bin Cheng * fold-const.c (fold_cond_expr_with_comparison): Remove call to pedantic_non_lvalue_loc. Remove useless code for lvalue where cond_expr can't be a lvalue. 2016-11-04 Claudiu Zissulescu * config/arc/arc.c (arc_process_double_reg_moves): Use gen_dexcl_2op call. * config/arc/arc.md (movsi_insn): Disable unsupported move instructions for ARCv2 cores. (movdi): Use prepare_move_operands. (movsf, movdf): Use move_dest_operand predicate. * config/arc/constraints.md (Chs): Enable when barrel shifter is present. * config/arc/fpu.md (divsf3): Change to divsf3_fpu. * config/arc/fpx.md (dexcl_3op_peep2_insn): Dx data register is also a destination. (dexcl_3op_peep2_insn_nores): Likewise. * config/arc/arc.h (SHIFT_COUNT_TRUNCATED): Define to one. (LINK_COMMAND_SPEC): Remove. 2016-11-04 Richard Biener PR middle-end/78185 * loop-invariant.c (find_exits): Record entering inner loops as possibly exiting to handle infinite sub-loops. * tree-ssa-loop-im.c: Include tree-ssa-loop-niter.h. (fill_always_executed_in_1): Honor infinite child loops. 2016-11-03 Michael Meissner PR target/78192 * config/rs6000/vsx.md (vsx_extract__di): The element number has already been adjusted for endianness, so don't adjust it any further. PR target/77993 * config/rs6000/rs6000.h (FLOAT128_IBM_P): Do not allow IFmode or ICmode unless we have standard PowerPC floating point. * config/rs6000/rs6000.md (FP iterator): Likewise. (FMOVE128 iterator): Likewise. 2016-11-03 Jakub Jelinek Alexandre Oliva Jason Merrill PR debug/28767 PR debug/56974 * langhooks.h (struct lang_hooks_for_types): Add type_dwarf_attribute langhook. * langhooks.c (lhd_type_dwarf_attribute): New function. * langhooks-def.h (lhd_type_dwarf_attribute): Declare. (LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_TYPE_DWARF_ATTRIBUTE. (check_qualified_type, check_aligned_type): Call it. * dwarf2out.c (modified_type_die): Don't use type_main_variant for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with check_base_type and check_lang_type. (gen_ptr_to_mbr_type_die): If lookup_type_die is already non-NULL, return early. For pointer-to-data-member add DW_AT_use_location attribute. (gen_subroutine_type_die): Add DW_AT_{,rvalue_}reference attribute if needed. (gen_type_die_with_usage): Don't use type_main_variant for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with check_base_type and check_lang_type. Formatting fixes. Call get_debug_type langhook. 2016-11-03 Jason Merrill * tree.c (check_lang_type): New. (check_qualified_type): Use it. (check_aligned_type): Use it. * tree.h: Declare it. 2016-11-03 Richard Earnshaw * config.gcc (arm-wrs-vxworks): Set target_cpu_cname. (arm*-freebsd*): Likewise. (arm*-*-netbsdelf*): Likewise. (arm*-*-linux*): Likewise. (arm*-*-uclinux*eabi*): Likewise. (arm*-*-phoenix*): Likewise. (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Likewise. (arm*-*-*): Don't clobber target_cpu_cname when --with-cpu is not specified. Default to arm6 if target_cpu_cname is not set. * arm/arm.c (arm_option_override): Simplify logic. Assert that the default cpu has been correctly configured. * arm/arm.h (TARGET_CPU_DEFAULT): Delete. (target_cpus): Delete TARGET_CPU_generic, add TARGET_CPU_num_cores. * arm/freebsd.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/linux-elf.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/symbian.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/unknown-elf.h (SUBTARGET_CPU_DEFAULT): Delete. 2016-11-03 Jiong Wang * reg-notes.def (CFA_VAL_EXPRESSION): New entry. * dwarf2cfi.c (dwarf2out_frame_debug_cfa_val_expression): New function. (dwarf2out_frame_debug): Support REG_CFA_VAL_EXPRESSION. (output_cfa_loc): Support DW_CFA_val_expression. (output_cfa_loc_raw): Likewise. (output_cfi): Likewise. (output_cfi_directive): Likewise. * dwarf2out.c (dw_cfi_oprnd1_desc): Support DW_CFA_val_expression. (dw_cfi_oprnd2_desc): Likewise. (mem_loc_descriptor): Recognize new pattern generated for value expression. 2016-11-03 Segher Boessenkool PR rtl-optimization/78186 * combine.c (change_zero_ext): Mask the RHS of a zero_extract as well, when converting to IOR. 2016-11-03 Eric Botcazou * config/sparc/sparc.md (vec_interleave_lowv8qi): Delete. (vec_interleave_highv8qi): Likewise. 2016-11-03 Martin Liska * profile.c (instrument_values): Fix coding style. (branch_prob): Use renamed function. * tree-profile.c (init_ic_make_global_vars): Likewise. (gimple_init_edge_profiler): Rename to gimple_init_gcov_profiler. tree_time_profiler_counter variable declaration. (gimple_gen_time_profiler): Rewrite to do a direct gimple code emission. * value-prof.h: Remove an argument. 2016-11-03 Richard Biener * config/rs6000/rs6000.c (rs6000_xcoff_declare_object_name): Use symtab_node::get_create. 2016-11-03 Kyrylo Tkachov * rtlanal.c (nonzero_bits1): Fix WORD_REGISTER_OPERATIONS condition. Move comments into more natural position. 2016-11-03 Vineet Gupta * config/arc/arc.h (SIZE_TYPE): Define as unsigned int. (PTRDIFF_TYPE): Define as int. 2016-11-03 Trevor Saunders * ccmp.c (expand_ccmp_expr_1): Adjust. (expand_ccmp_expr): Likewise. (expand_ccmp_next): Likewise. * config/aarch64/aarch64.c (aarch64_gen_ccmp_next): Likewise. (aarch64_gen_ccmp_first): Likewise. * doc/tm.texi: Regenerate. * target.def (gen_ccmp_first): Change argument types to rtx_insn *. (gen_ccmp_next): Likewise. 2016-11-03 Bin Cheng * tree-vect-loop.c (destroy_loop_vec_info): Handle cond_expr. (vect_is_simple_reduction): Swap cond_reduction by inversion. 2016-11-02 Uros Bizjak * config/i386/i386.c (ix86_init_libfuncs): New. Call darwin_rename_builtins here. (ix86_expand_divmod_libfunc): New. (TARGET_INIT_LIBFUNCS): Unconditionally define to ix86_init_libfuncs. (TARGET_EXPAND_DIVMOD_LIBFUNC): Define. 2016-11-02 Cesar Philippidis Nathan Sidwell * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Set to zero. 2016-11-02 Max Filippov * config/xtensa/xtensa.c (xtensa_output_integer_literal_parts): New function. (xtensa_output_literal): Use xtensa_output_integer_literal_parts to format MODE_INT and MODE_PARTIAL_INT literals. 2016-11-02 Segher Boessenkool PR target/78168 * config/r6000/rs6000.c (rs6000_get_separate_components): Return NULL if TARGET_SPE_ABI. 2016-11-02 Kyrylo Tkachov * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Don't forget to clear padding bits even when they're less than a byte. 2016-11-02 Richard Biener * gimple-ssa-store-merging.c: Include gimplify-me.h. (imm_store_chain_info::output_merged_stores): Force base_addr to be proper GIMPLE for a MEM_REF address. (pass_store_merging::execute): Restrict negative bitpos handling to non-MEM_REF bases. Remove TREE_THIS_VOLATILE check. Take into account non-NULL_TREE offset if the base is already addressable. 2016-11-26 Wilco Dijkstra * config/aarch64/aarch64-simd.md (aarch64_crypto_sha1hv4si): New pattern. (aarch64_be_crypto_sha1hv4si): New pattern. 2016-11-02 Wilco Dijkstra * config/aarch64/aarch64.md (add3): Remove redundant code. Don't split frame based additions. 2016-11-02 Richard Biener * gimple-ssa-store-merging.c (struct store_immediate_info): Remove redundant val and dest members. (store_immediate_info::store_immediate_info): Adjust. (merged_store_group::merged_store_group): Adjust. (merged_store_group::apply_stores): Likewise. (struct imm_store_chain_info): Add base_addr field. (imm_store_chain_info::imm_store_chain_info): New constructor. (imm_store_chain_info::terminate_and_process_chain): Do not pass base. (imm_store_chain_info::output_merged_store): Likewise. Use addr_base which is already the address. (imm_store_chain_info::output_merged_stores): Likewise. (pass_tree_store_merging::terminate_all_aliasing_chains): Take imm_store_chain_info instead of base. Fix alias check. (pass_tree_store_merging::terminate_and_release_chain): Likewise. (imm_store_chain_info::coalesce_immediate_stores): Adjust. (pass_store_merging::execute): Refuse to operate on TARGET_MEM_REF. use the address of the base and adjust for other changes. 2016-11-02 Martin Liska * fold-const-call.c (host_size_t_cst_p): Test whether t is convertible to size_t. 2016-11-02 Kyrylo Tkachov PR tree-optimization/78170 * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Truncate padding introduced by native_encode_expr on little-endian as well. 2016-11-02 Kyrylo Tkachov PR tree-optimization/78162 * gimple-ssa-store-merging.c (execute): Mark stores with bitpos < 0 as invalid. 2016-11-02 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_register_saved_on_entry): Add function comment. (aarch64_next_callee_save): Likewise. (aarch64_pushwb_single_reg): Likewise. (aarch64_gen_storewb_pair): Likewise. (aarch64_push_regs): Likewise. (aarch64_gen_loadwb_pair): Likewise. (aarch64_pop_regs): Likewise. (aarch64_gen_store_pair): Likewise. (aarch64_gen_load_pair): Likewise. (aarch64_save_callee_saves): Likewise. (aarch64_restore_callee_saves): Likewise. 2016-11-02 Richard Biener PR tree-optimization/78035 PR tree-optimization/77964 * gimple-pretty-print.c (pp_points_to_solution): Print vars_contains_interposable. * tree-ssa-alias.c: Include varasm.h. (ptrs_compare_unequal): Check vars_contains_interposable and decl_binds_to_current_def_p. (dump_points_to_solution): Dump vars_contains_interposable. * tree-ssa-alias.h (struct pt_solution): Add vars_contains_interposable flag. * tree-ssa-structalias.c: Include varasm.h. (set_uids_in_ptset): Record whether vars contains a not decl_binds_to_current_def_p variable in vars_contains_interposable. (ipa_escaped_pt): Update initializer. 2016-11-02 Richard Biener PR tree-optimization/78047 * tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize fake field at offset zero conservatively regarding to may_have_pointers. 2016-11-02 Richard Biener * tree-vrp.c (evrp_dom_walker::before_dom_children): Call infer_value_range on stmt ops and update value-ranges. Dump visited stmts and blocks. (evrp_dom_walker::push_value_range): Dump changes. (evrp_dom_walker::pop_value_range): Likewise. (evrp_dom_walker::try_find_new_range): Avoid noop changes. 2016-11-01 Trevor Saunders * emit-rtl.c (prev_nonnote_insn_bb): Change argument type to rtx_insn *. * rtl.h (prev_nonnote_insn_bb): Adjust prototype. 2016-11-01 Trevor Saunders * cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn * and adjust for that. * cfgrtl.h (delete_insn_chain): Adjust prototype. 2016-11-01 Trevor Saunders * config/rl78/rl78.c (gen-and_emit_move): Change argument type to rtx_insn *. (transcode_memory_rtx): Likewise. (move_to_acc): Likewise. (move_from_acc): Likewise. (move_acc_to_reg): Likewise. (move_to_x): Likewise. (move_to_hl): Likewise. (move_to_de): Likewise. * config/rs6000/rs6000.c (emit_frame_save): Likewise. (rs6000_emit_savres_rtx): Likewise. (rs6000_emit_prologue): Likewise. * reorg.c (update_reg_unused_notes): Likewise. * rtl.h (remove_note): Adjust prototype. * rtlanal.c (remove_note): Make argument type rtx_insn *. 2016-11-01 Trevor Saunders * config/alpha/alpha.c (alpha_legitimize_address_1): Split up variables so some can be rtx_insn *. (alpha_emit_xfloating_libcall): Likewise. * config/mips/mips.c (mips_call_tls_get_addr): Likewise. (mips_legitimize_tls_address): Likewise. * optabs.c (expand_binop): Likewise. * reload1.c (gen_reload): Likewise. 2016-11-01 Trevor Saunders * reorg.c (relax_delay_slots): Split up the trial variable. 2016-11-01 Trevor Saunders * config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type of variables rtx_insn *. * config/arm/arm.c (arm_call_tls_get_addr): Likewise. (legitimize_tls_address): Likewise. * config/bfin/bfin.c (hwloop_optimize): Likewise. (bfin_gen_bundles): Likewise. * config/c6x/c6x.c (reorg_split_calls): Likewise. (c6x_reorg): Likewise. * config/frv/frv.c (frv_reorder_packet): Likewise. * config/i386/i386.c (ix86_split_idivmod): Likewise. * config/ia64/ia64.c (ia64_expand_compare): Likewise. * config/m32c/m32c.c (m32c_prepare_shift): Likewise. * config/mn10300/mn10300.c: Likewise. * config/rl78/rl78.c: Likewise. * config/s390/s390.c (s390_fix_long_loop_prediction): Likewise. * config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise. (sh_expand_cmpnstr): Likewise. (sh_expand_strlen): Likewise. (sh_expand_setmem): Likewise. * config/sh/sh.md: Likewise. * emit-rtl.c (emit_pattern_before): Likewise. * except.c: Likewise. * final.c: Likewise. * jump.c: Likewise. 2016-11-01 Jason Merrill * tree-inline.c (copy_tree_body_r): Only copy the taken branch of a COND_EXPR with constant condition. 2016-11-01 Jakub Jelinek * dwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization. 2016-11-01 Rainer Orth * dwarf2out.c (output_rnglists): Wrap basebuf, len in HAVE_AS_LEB128. 2016-11-01 Jakub Jelinek * dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true. (gen_variable_die): For C++ inline static data members, consider the initial call when old_die is NULL to be declaration and call add_name_and_src_coords_attributes in that case with true as NO_LINKAGE_NAME. Add DW_AT_inline attribute if needed. (gen_member_die): For C++ inline static data members, emit a definition DIE right away in DW_TAG_compile_unit context. 2016-11-01 John David Anglin PR target/78166 * config/pa/pa.md: Add new shift/add patterns to handle (plus (mult (reg) (mem_shadd_operand)) (reg)) source operand. 2016-11-01 Max Filippov * config/xtensa/xtensa-protos.h (xtensa_use_return_instruction_p): New prototype. * config/xtensa/xtensa.c (xtensa_current_frame_size, xtensa_callee_save_size): Remove. (struct machine_function): Add new fields: current_frame_size, callee_save_size, frame_laid_out and epilogue_done. (compute_frame_size, xtensa_expand_prologue, xtensa_expand_epilogue): Replace xtensa_callee_save_size with cfun->machine->callee_save_size and xtensa_current_frame_size with cfun->machine->current_frame_size. (compute_frame_size): Update cfun->machine->frame_laid_out and don't update frame layout after reload completion. (xtensa_expand_epilogue): Set cfun->machine->epilogue_done instead of zeroing xtensa_current_frame_size. (xtensa_use_return_instruction_p): New function. * config/xtensa/xtensa.h (xtensa_current_frame_size): Remove declaration. (INITIAL_ELIMINATION_OFFSET): Use return value of compute_frame_size instead of xtensa_current_frame_size value. * config/xtensa/xtensa.md ("return" pattern): Use new predicate function xtensa_use_return_instruction_p instead of inline code. 2016-11-01 Jakub Jelinek * tree.h (BLOCK_IN_COLD_SECTION_P): Define. * final.c (final_scan_insn): Set BLOCK_IN_COLD_SECTION_P. * dwarf2out.c (rnglist_idx): New variable. (struct dw_ranges): Add label, idx and maybe_new_sec fields. (DEBUG_RNGLISTS_SECTION): Define. (ranges_base_label): New variable. (size_of_die) : If using DW_FORM_rnglistx, count size of uleb128 of range list index. (value_format) : For -gdwarf-5 -gsplit-dwarf return DW_FORM_rnglistx. (output_range_list_offset): Handle -gdwarf-5 .debug_rnglists offsets. Multiply dwarf < 5 offsets by 2 * DWARF_ADDR_SIZE. (add_ranges_num): Remove useless prototype. Don't multiply by 2 * DWARF2_ADDR_SIZE. Add maybe_new_sec argument, adjust for new fields added to dw_ranges struct. (add_ranges): Add maybe_new_sec argument and pass it through to add_ranges_num. (note_rnglist_head): New function. (add_ranges_by_labels): Pass true as maybe_new_sec to add_ranges_num, call note_rnglist_head on the head of the list. (output_ranges): Add function comment. Switch to .debug_ranges section here and emit .Ldebug_ranges0 label. (index_rnglists, output_rnglists): New functions. (gen_subprogram_die): Formatting fixes. (add_high_low_attributes): Don't divide offsets by 2 * DWARF2_ADDR_SIZE. Call note_rnglist_head on the first list element or when pointing into the middle of a list. Pass true as second argument to add_ranges on the first block fragment after cold/hot section switch. (init_sections_and_labels): For -gdwarf-5 use .debug_rnglists section instead of .debug_ranges. Initialize ranges_base_label if -gdwarf-5 -gsplit-dwarf. (dwarf2out_finish): For -gdwarf-5 -gsplit-dwarf call index_rnglists and add DW_AT_rnglists_base attr. Don't switch to dwarf_ranges_section here or emit .Ldebug_ranges0 label. Call output_rnglists for -gdwarf-5. (dwarf2out_c_finalize): Clear rnglist_idx. 2016-11-01 Fritz Reese * combine.c (simplify_compare_const): Add gcc_fallthrough. 2016-11-01 Bilyan Borisov Tamar Christina * config/arm/arm-c.c (arm_cpu_builtins): New macro definition. * config/arm/arm_neon.h (vmaxnm_f32): New intrinsinc. (vmaxnmq_f32): Likewise. (vminnm_f32): Likewise. (vminnmq_f32): Likewise. * config/arm/arm_neon_builtins.def (vmaxnm): New builtin. (vminnm): Likewise. * config/arm/neon.md (neon_, VCVTF): New expander. 2016-10-31 Michael Meissner * config/rs6000/vsx.md (VSX_EXTRACT_FL): New iterator for all binary floating point types supported by the hardware except for double. (vsx_xvcvsxwdp_df): Provide scalar result alternative to the vector instruction for optimizing extracting a SImode from a V4SImode vector and converting it to floating point. (vsx_xvcvuxwdp_df): Likewise. (vsx_extract_si): On ISA 3.0, allow extract target and temporary registers to be any VSX register. Move stores to the end of the constraints. (vsx_extract_si_float_df): New combiner pattern and splitter to optimize extracting a SImode from a V4SImode vector and converting it to a binary floating point type supported by the hardware. Use the vector converts instead of extracting the element, sign extending it, and then converting it to double. Other floating point types than double first convert to double, then the double is converted to that type. (vsx_extract_si_float_): Likewise. 2016-10-31 Andrew Pinski * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Rewrite handling of part num to handle the case where multiple implementers share the same part num. 2016-10-31 Jan Kratochvil Jakub Jelinek * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): Adjust for -gdwarf-5. (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Likewise. 2016-10-31 Jakub Jelinek * dwarf2out.c (dwarf_AT): Handle DW_AT_dwo_name. (use_debug_types): Adjust comment for DWARF5 DW_UT_type units. (new_die): Handle DW_TAG_skeleton_unit like DW_TAG_compile_unit. (is_cu_die, is_unit_die): Likewise. (should_move_die_to_comdat, break_out_comdat_types): Adjust comments for DWARF5 DW_UT_type units. (output_compilation_unit_header): Add UT argument, output start of DWARF5 .debug_info section header. (output_comp_unit): Add dwo_id argument. Adjust output_compilation_unit_header caller, for DW_UT_split_compile emit dwo_id field, otherwise padding1. Emit padding2 field. (add_top_level_skeleton_die_attrs): Add DW_AT_dwo_name rather than DW_AT_GNU_dwo_name attr for -gdwarf-5. (output_skeleton_debug_sections): Add dwo_id argument, for -gdwarf-5 emit DWARF 5 DW_UT_skeleton header. (output_comdat_type_unit): For -gdwarf-5 emit .debug_info DW_UT_type or DW_UT_split_type units rather than .debug_types. (dwarf2out_finish): Use DW_TAG_skeleton_unit rather than DW_TAG_compile_unit for skeleton unit die. Don't add DW_AT_GNU_dwo_id attributes for -gdwarf-5, instead pass checksum address to output_comp_unit and output_skeleton_debug_sections. * dwarf2out.c (debug_line_str_section): New variable. (debug_line_str_hash): Likewise. (DEBUG_LINE_STR_SECTION): Define. (set_indirect_string): Handle DW_FORM_line_strp like DW_FORM_strp. (find_string_form): Fix up formatting. (size_of_die): Handle DW_FORM_line_strp like DW_FORM_strp. Fix up indentation. (output_die): Handle DW_FORM_line_strp. (DWARF5_USE_DEBUG_LINE_STR): Define. (output_line_string): New function. (output_file_names): Add -gdwarf-5 support. (output_line_info): Likewise. (init_sections_and_labels): Initialize debug_line_str_section. (output_indirect_string): Change 2nd argument from void * to enum dwarf_form form, compare with form rather than DW_FORM_strp. (output_indirect_strings): Pass DW_FORM_strp to output_indirect_string traversion. (dwarf2out_finish): Output .debug_line_str strings. (dwarf2out_c_finalize): Clear debug_line_str_section and debug_line_str_hash. 2016-10-31 Tom Tromey PR debug/77315 * dwarf2out.c (mem_loc_descriptor): Use DW_OP_form_tls_address. (resolve_args_picking_1): Move DW_OP_form_tls_address case next to DW_OP_GNU_push_tls_address case. (loc_list_from_tree_1): Use DW_OP_form_tls_address. 2016-10-31 Jakub Jelinek * dwarf2out.h (struct dw_loc_descr_node): Adjust comment for frame_offset_rel bit. (struct array_descr_info): Add rank field. * dwarf2out.c (struct loc_descr_context): Add placeholder_arg and placeholder_seen fields. (resolve_args_picking_1): Handle also frame_offset_rel DW_OP_dup and DW_OP_over. Optimize DW_OP_pick 0 into DW_OP_dup and DW_OP_pick 1 into DW_OP_over. (function_to_dwarf_procedure, type_byte_size, field_byte_offset, gen_variant_part): Clear placeholder_{arg,seen}. (loc_list_from_tree_1): Drop const from context argument. Handle integral PLACEHOLDER_EXPR if context->placeholder_arg. (loc_list_for_address_of_addr_expr_of_indirect_ref, loc_list_from_tree, loc_descriptor_from_tree): Drop const from context argument. (add_scalar_info): Drop const from context argument. Handle context->placeholder_arg. (add_bound_info): Drop const from context argument. (gen_descr_array_type_die): Drop const from ctx variable. Initialize placeholder_arg and placeholder_seen. Add DW_AT_rank attribute and use a single DW_TAG_generic_subrange instead of 7 DW_TAG_subrange_type for assumed rank arrays. * dwarf2out.h (enum dw_val_class): Add dw_val_class_loclistsptr. * dwarf2out.c (struct dw_loc_list_struct): Change emitted field from bool to 1-bit uchar bitfield. Add num_assigned and offset_emitted bitfields. (dw_val_equal_p): Compare v.val_lbl_id rather than v.val_unsigned for dw_val_class_lineptr and dw_val_class_macptr. Handle dw_val_class_loclistsptr. (new_addr_loc_descr): Fix up formatting. (DEBUG_LOCLISTS_SECTION, DEBUG_DWO_LOCLISTS_SECTION): Define. (add_AT_low_high_pc): Fix up formatting. (add_AT_loclistsptr): New function. (AT_lbl): Allow dw_val_class_loclistsptr. (print_dw_val, attr_checksum, attr_checksum_ordered, same_dw_val_p): Handle dw_val_class_loclistsptr. (loc_list_idx): New variable. (output_loclists_offsets, assign_location_list_indexes): New functions. (size_of_die): For dw_val_class_loc_list -gsplit-dwarf -gdwarf-5 add size_of_uleb128 of the index. Drop never used dwarf_split_debug_info AT_index handling. Handle dw_val_class_loclistsptr. (value_format): Return DW_FORM_loclistsx for dw_val_class_loc_list if -gsplit-dwarf -gdwarf-5. Handle dw_val_class_loclistsptr. (output_loc_list): Handle DWARF 5 .debug_loclists* format. (output_loc_list_offset): Handle -gsplit-dwarf -gdwarf-5 DW_FORM_loclistx indexes. (output_attr_index_or_value): Fix up formatting. Don't handle dw_val_class_loc_list here. (output_die): Formatting fixes. Handle dw_val_class_loclistsptr. For dw_val_class_loc_list call output_loc_list_offset rather than output_attr_index_or_value. (init_sections_and_labels): For -gdwarf-5 use .debug_loclists or .debug_loclists.dwo section name for debug_loc_section. (resolve_addr_in_expr): Formatting fix. (index_location_lists): Likewise. (dwarf2out_finish): If there are any location lists, for -gsplit-dwarf -gdwarf-5 add DW_AT_loclists_base attribute. Call index_location_lists only if have_location_lists. Call assign_location_list_indexes for -gsplit-dwarf -gdwarf-5. Emit .debug_loclists{,.dwo} section header for -gdwarf-5, for -gdwarf-5 -gsplit-dwarf also emit offset table. * dwarf2out.c (DWARF_LARGEST_DATA_FORM_BITS): Define. (size_of_die, value_format, output_die): Use DW_FORM_data16 for 128-bit dw_val_class_const_double or dw_val_class_wide_int. * dwarf2out.c (dwarf_op): Renamed to ... (dwarf_OP): ... this. (convert_descriptor_to_mode, scompare_loc_descriptor, minmax_loc_descriptor, typed_binop, mem_loc_descriptor, implicit_ptr_descriptor, optimize_one_addr_into_implicit_ptr): Adjust callers. (dwarf_AT, dwarf_TAG): New functions. (check_die): Disallow DW_AT_call_all_calls next to DW_AT_GNU_all_call_sites. (gen_call_site_die): Use dwarf_TAG and dwarf_AT with DWARF 5 tag and attributes instead of the corresponding GNU tag and attributes. (gen_subprogram_die): Likewise. Emit call site information even for -gdwarf-5 -gstrict-dwarf. Replace DW_AT_GNU_defaulted with DW_AT_defaulted in comment. (resolve_addr): Handle DW_AT_call_origin attribute on DW_TAG_call_site DIE like DW_AT_abstract_origin on DW_TAG_GNU_call_site DIE. * dwarf2out.c (dwarf_op): New function. (size_of_loc_descr): Handle DW_OP_{implicit_pointer,entry_value}, DW_OP_{const,regval,deref}_type and DW_OP_{convert,reinterpret}. (output_loc_operands, output_loc_operands_raw): Likewise. (resolve_args_picking_1, prune_unused_types_walk_loc_descr, mark_base_types, hash_loc_operands, compare_loc_operands): Likewise. (resolve_addr_in_expr): Likewise. Only punt for !dwarf_strict if dwarf_version < 5. (convert_descriptor_to_mode): Use dwarf_op (DW_OP_xxx) instead of DW_OP_GNU_xxx. (scompare_loc_descriptor, ucompare_loc_descriptor, minmax_loc_descriptor, typed_binop, mem_loc_descriptor, implicit_ptr_descriptor, optimize_one_addr_into_implicit_ptr, optimize_location_into_implicit_ptr): Likewise. Only punt for !dwarf_strict if dwarf_version < 5. (string_cst_pool_decl): Adjust comment. (non_dwarf_expression): Handle DW_OP_implicit_pointer. * dwarf2out.h (enum dw_val_class): Add dw_val_class_const_implicit, dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit. (struct dw_val_node): Add val_file_implicit field. * dwarf2out.c (dw_val_equal_p, print_dw_val, attr_checksum, attr_checksum_ordered, same_dw_val_p, size_of_die, value_format, output_die): Handle dw_val_class_const_implicit, dw_val_class_unsigned_const_implicit and dw_val_class_file_implicit. (abbrev_die_table): Change into va_gc vec. (abbrev_die_table_allocated, abbrev_die_table_in_use, ABBREV_DIE_TABLE_INCREMENT): Remove. (AT_int, AT_unsigned, AT_file): Allow dw_val_class_*_implicit. (abbrev_opt_start, abbrev_usage_count, sorted_abbrev_dies): New variables. (build_abbrev_table): Adjust for abbrev_die_table being a va_gc vec. If abbrev_opt_start, fill in abbrev_usage_count and abbrev_dies vectors. (die_abbrev_cmp, optimize_implicit_const, optimize_abbrev_table): New functions. (output_die_abbrevs): For DW_FORM_implicit_const emit sleb128 with the implicit value. (output_abbrev_section): Adjust for abbrev_die_table being a va_gc vec. (output_comp_unit): Initialize abbrev_opt_start if emitting the main unit. Call optimize_abbrev_table. (dwarf2out_init, dwarf2out_finish, dwarf2out_c_finalize): Adjust for abbrev_die_table being a va_gc vec. PR tree-optimization/77860 * tree-ssa-reassoc.c (eliminate_using_constants): Handle also integral complex and vector constants. * dwarf2out.c (dwarf2out_define, dwarf2out_undef, output_macinfo_op, optimize_macinfo_range, save_macinfo_strings): Replace DW_MACRO_GNU_* constants with corresponding DW_MACRO_* constants. (output_macinfo): Likewise. Emit .debug_macro* rather than .debug_macinfo* even for -gstrict-dwarf -gdwarf-5. (init_sections_and_labels): Use .debug_macro* labels rather than .debug_macinfo* labels even for -gstrict-dwarf -gdwarf-5. (dwarf2out_finish): Use DW_AT_macros instead of DW_AT_macro_info or DW_AT_GNU_macros for -gdwarf-5. 2016-10-31 Waldemar Brodkorb * config/microblaze/linux.h (UCLIBC_DYNAMIC_LINKER): Define. 2016-09-11 Le-Chun Wu Mark Wielaard * common.opt (Wshadow=global): New option. Default for -Wshadow. (Wshadow=local): New option. (Wshadow-local): Hidden alias for -Wshadow=local. (Wshadow=compatible-local): New option. (Wshadow-compatible-local): Hidden alias for -Wshadow=compatible-local. * doc/invoke.texi: Document Wshadow=global, Wshadow=local and Wshadow=compatible-local. 2016-10-31 Bin Cheng * tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP. Check slp defs for COND_EXPR by swapping/inverting operands if the new parameter SWAP indicates so. (vect_build_slp_tree_1): New parameter SWAP. Check COND_EXPR stmt is isomorphic to the first stmt via swapping/inverting. Store swap information in the new parameter SWAP. (vect_build_slp_tree): New local array SWAP and pass it to function vect_build_slp_tree_1. Cleanup result handling code for function call to vect_get_and_check_slp_defs. Skip operand swapping if the order of operands has been fixed as indicated by SWAP[i]. 2016-10-31 Bin Cheng * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt. 2016-10-30 Bill Schmidt PR tree-optimization/71915 PR tree-optimization/71490 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add stride_type field. (find_basis_for_base_expr): Require stride types to match when seeking a basis. (alloc_cand_and_find_basis): Record the stride type. (slsr_process_phi): Pass stride type to alloc_cand_and_find_basis. (backtrace_base_for_ref): Pass types to legal_cast_p_1 rather than the expressions having those types. (slsr_process_ref): Pass stride type to alloc_cand_and_find_basis. (create_mul_ssa_cand): Likewise. (create_mul_imm_cand): Likewise. (create_add_ssa_cand): Likewise. (create_add_imm_cand): Likewise. (legal_cast_p_1): Change interface to accept types rather than the expressions having those types. (legal_cast_p): Pass types to legal_cast_p_1. (slsr_process_cast): Pass stride type to alloc_cand_and_find_basis. (slsr_process_copy): Likewise. (dump_candidate): Display stride type when a cast exists. (create_add_on_incoming_edge): Introduce a cast when necessary for the stride type. (analyze_increments): Change the code checking for invalid casts to rely on the stride type, and update the documentation and example. Change the code checking for pointer multiplies to rely on the stride type. (insert_initializers): Introduce a cast when necessary for the stride type. Use the stride type for the type of the initializer. 2016-10-30 Prathamesh Kulkarni * config/arm/arm.c (arm_const_not_ok_for_debug_p): Use VAR_P. 2016-10-29 Jakub Jelinek PR rtl-optimization/77919 * expr.c (expand_expr_real_1) : Only avoid forcing into memory if both modes are complex and their inner modes have the same precision. If the two modes are different complex modes, convert each part separately and generate a new CONCAT. 2016-10-29 John David Anglin * config/pa/pa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string. 2016-10-29 Jakub Jelinek PR target/78148 * gimple-ssa-store-merging.c (imm_store_chain_info::output_merged_store): Use build_aligned_type instead of SET_TYPE_ALIGN on shared integral type. 2016-10-29 John David Anglin * config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment. (MALLOC_ABI_ALIGNMENT): Define to 128 on all targets except SOM. Adjust comment. 2016-10-28 Jeff Law * config/vax/vax.h (REGNO_REG_CLASS): Access the REGNO argument. * config/spu/spu.h (REGNO_REG_CLASS): Likewise. 2016-10-28 Eric Botcazou * doc/sourcebuild.texi (Ada Tests): Remove mention of gcc chapter. 2016-10-28 Eric Botcazou * target.def (min_arithmetic_precision): New hook. * doc/tm.texi.in (Misc): Add TARGET_MIN_ARITHMETIC_PRECISION. * doc/tm.texi: Regenerate. * internal-fn.c (expand_arith_overflow): Adjust handling of target dependent support by means of TARGET_MIN_ARITHMETIC_PRECISION. * targhooks.c (default_min_arithmetic_precision): New function. * targhooks.h (default_min_arithmetic_precision): Declare. * config/sparc/sparc.c (TARGET_MIN_ARITHMETIC_PRECISION): Define. (sparc_min_arithmetic_precision): New function. 2016-10-28 Segher Boessenkool PR target/71847 * combine.c (change_zero_ext): Handle zero_ext of hard registers. Swap commutative operands in new RTL if needed. Handle zero_ext in the set_dest. (recog_for_combine): Pass *pnewpat to change_zero_ext instead of PATTERN (insn). 2016-10-28 Prathamesh Kulkarni Kugan Vivekanandarajah Jim Wilson PR tree-optimization/43721 * target.def: New hook expand_divmod_libfunc. * doc/tm.texi.in: Add hook for TARGET_EXPAND_DIVMOD_LIBFUNC. * doc/tm.texi: Regenerate. * internal-fn.def: Add new entry for DIVMOD ifn. * internal-fn.c (expand_DIVMOD): New. * tree-ssa-math-opts.c: Include optabs-libfuncs.h, tree-eh.h, targhooks.h. (widen_mul_stats): Add new field divmod_calls_inserted. (target_supports_divmod_p): New. (divmod_candidate_p): Likewise. (convert_to_divmod): Likewise. (pass_optimize_widening_mul::execute): Call calculate_dominance_info, renumber_gimple_stmt_uids at beginning of function. Call convert_to_divmod and record stats for divmod. * config/arm/arm.c (arm_expand_divmod_libfunc): Override hook TARGET_EXPAND_DIVMOD_LIBFUNC. * doc/sourcebuild.texi: Add items for arm_divmod_simode, divmod, divmod_simode. 2016-10-28 Eric Botcazou Segher Boessenkool * dojump.c (do_jump_by_parts_greater_rtx): Invert probability when swapping the arms of the branch. * internal-fn.c (expand_addsub_overflow): Use a straight-line code sequence for the generic signed-signed-signed case. 2016-10-28 Jeff Law * config/bfin/bfin.c (bfin_legitimate_address_p): Add missing fallthru comment. * config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Likewise. 2016-10-28 Segher Boessenkool PR rtl-optimization/78029 * function.c (prologue_contains, epilogue_contains): New functions. (record_prologue_seq, record_epilogue_seq): New functions. * function.h (prologue_contains, epilogue_contains, record_prologue_seq, record_epilogue_seq): New declarations. * sched-deps.c (sched_analyze_insn): Make dependencies to prevent mixing prologue and epilogue insns. (init_deps): Initialize the new fields in struct deps_desc. * sched-int.h (struct deps_desc): New fields last_prologue, last_epilogue, and last_logue_was_epilogue. * shrink-wrap.c (emit_common_heads_for_components): Record all emitted prologue and epilogue insns. (emit_common_tails_for_components): Ditto. (insert_prologue_epilogue_for_components): Ditto. 2016-10-28 Kyrylo Tkachov PR middle-end/22141 * Makefile.in (OBJS): Add gimple-ssa-store-merging.o. * common.opt (fstore-merging): New Optimization option. * opts.c (default_options_table): Add entry for OPT_ftree_store_merging. * fold-const.h (can_native_encode_type_p): Declare prototype. * fold-const.c (can_native_encode_type_p): Define. * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define. (PARAM_MAX_STORES_TO_MERGE): Likewise. * timevar.def (TV_GIMPLE_STORE_MERGING): New timevar. * passes.def: Insert pass_tree_store_merging. * tree-pass.h (make_pass_store_merging): Declare extern prototype. * gimple-ssa-store-merging.c: New file. * doc/invoke.texi (Optimization Options): Document -fstore-merging. (--param documentation): Document store-merging-allow-unaligned and max-stores-to-merge. 2016-10-28 Will Schmidt PR middle-end/72747 * gimplify.c (gimplify_init_constructor): Move emit of constructor assignment to earlier in the if/else logic. 2016-10-28 Richard Biener PR middle-end/78128 PR middle-end/71002 * fold-const.c (make_bit_field_ref): Only adjust alias set when the original alias set was zero. 2016-10-28 Andreas Krebbel * config/s390/s390.c (s390_adjust_loop_scan_osc): New function. (s390_adjust_loops): New function. (s390_reorg): Invoke s390_adjust_loops. * config/s390/s390.md (UNSPEC_OSC_BREAK): New constant. ("osc_break"): New insn definition. 2016-10-28 Andreas Krebbel * config/s390/s390.opt: Support alternate cpu level naming (archXX). * config.gcc: Support alternate archXX cpu levels with --with-arch= and --with-tune=. * config/s390/linux.h: Translate new archXX cpu levels to the original names when calling GAS. * config/s390/tpf.h: Likewise. * doc/invoke.texi: Document the alternate cpu level names. 2016-10-28 Jakub Jelinek PR rtl-optimization/77919 * expr.c (expand_expr_real_1) : Force CONCAT into MEM if mode1 is not a complex mode. PR rtl-optimization/78132 * ree.c (combine_reaching_defs): Give up if copy_needed and !HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode). 2016-10-27 Eric Botcazou * config/sparc/sparc.md (<*vlop:code>3): Remove leading '*'. 2016-10-27 Michael Meissner * config/rs6000/constraints.md (wH constraint): Add new constraints for allowing 32-bit integers (and eventually 8/16-bit integers) into the vector registers. (wI constraint): Likewise. (wJ constraint): Likewise. (wK constraint): Likewise. * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add -mvsx-small-integer as a default option for ISA 2.07 (i.e. power8). (POWERPC_MASKS): Likewise. * config/rs6000/rs6000.opt (-mvsx-small-integer): Add new debug switch to turn off small integer support in vector registers. * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Eliminate test for -mupper-regs-di, since it is already done with the reg_add[mode].scalar_in_vsx_p. Add support for the switch -mvsx-small-integer. (rs6000_debug_reg_global): Add support for wH, wI, wJ, and wK constraints. (rs6000_setup_reg_addr_masks): Likewise. (rs6000_init_hard_regno_mode_ok): Likewise. (rs6000_option_override_internal): Add consistency checks for -mvsx-small-integer. (rs6000_secondary_reload_simple_move): SImode is a simple move if -mvsx-small-integer. (rs6000_secondary_reload): Use std::swap. (rs6000_preferred_reload_class): Don't prefer FLOAT_REGS over VSX_REGS for small integers in vector registers, since there is no D-FORM address mode for such types. (rs6000_register_move_cost): Use FIRST_FPR_REGNO instead of 32. (rs6000_opt_masks): Add -mvsx-small-integer. * config/rs6000/vsx.md (VSINT_84): Add SImode for small integer support. (VSX_EXTRACT_I2): Clone VSX_EXTRACT_I, but drop V4SI since SImode extracts can be done on ISA 2.07. (vsx_extract_): Add support for small integers in vsx registers. (vsx_extract__p9): Use 'v' instead of VSX_EX, since we no longer support V4SImode in this pattern. (vsx_extract_si): New insn to support extraction of SImode in ISA 2.07 using either xxextractuw or vspltw. (vsx_extract__p8): Use 'v' instead of VSX_EX, since we no longer support V4SImode in this pattern. * config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wH, wI, wJ, and wK constraints. * config/rs6000/rs6000.md (f32_sv): Use correct instruction for storing SDmode with VSX instructions. (zero_extendsi2): Reorder pattern, so RLDICL comes after the GPR load and before the FPR and VSX loads. Remove ??, ! from the constraints. Add MFVSRWZ and XXEXTRACTUW instructions to support small integers in vector registers. (extendsi2): Reorder pattern, so EXTSW comes after the GPR load and before the FPR and VSX loads. Remove ??, ! from the constraints. Add VEXTSW2D support for small integers in vector registers. (lfiwax): Remove ! constraint. Add VEXTSW2D support for small integers in vector registers. (floatsi2_lfiwax): If -mvsx-small-integer issue a normal move instead of using an UNSPEC. (lfiwzx): Remove ! constraint. Add XXEXTRACTUW support for small integers in vector registers. (floatunssi2_lfiwzx): If -mvsx-small-integer issue a normal move instead of using an UNSPEC. (movsi_internal1): Add support for -mvsx-small-integer. Align columns so that it is more readable. (SImode splitter for ISA 3.0 constants): Add splitter for -128..127 constants that can easily be constructed on ISA 3.0. * doc/md.texi (PowerPC Constraints): Document wH, wI, wJ, and wK constraints. 2016-10-27 Jakub Jelinek PR middle-end/78025 * omp-simd-clone.c (simd_clone_adjust): Handle noreturn declare simd functions. 2016-10-27 Aldy Hernandez * builtins.c (expand_builtin_nonlocal_goto): Avoid evaluating PIC_OFFSET_TABLE_REGNUM twice. 2016-10-27 Bin Cheng * match.pd ((convert (op:s (convert@2 @0) (convert?@3 @1)))): Add support for constant operand for OP. 2016-10-27 Jakub Jelinek * dwarf2out.c (gen_member_die): Only reparent_child instead of splice_child_die if child doesn't have DW_AT_specification attribute. 2016-10-27 Thomas Preud'homme * config/arm/arm.h (TARGET_HAVE_LDREX): Define for ARMv8-M Baseline. (TARGET_HAVE_LDREXBH): Likewise. (TARGET_HAVE_LDACQ): Likewise. 2016-10-27 Thomas Preud'homme * config/arm/arm.c (arm_split_atomic_op): Add function comment. Add logic to to decide whether to copy over old value to register for new value. * config/arm/sync.md: Add comments explaning why mode and code attribute are not defined in iterators.md (thumb1_atomic_op_str): New code attribute. (thumb1_atomic_newop_str): Likewise. (thumb1_atomic_fetch_op_str): Likewise. (thumb1_atomic_fetch_newop_str): Likewise. (thumb1_atomic_fetch_oldop_str): Likewise. (atomic_exchange): Add new ARMv8-M Baseline only alternatives to mirror the more restrictive constraints of the Thumb-1 insns after split compared to Thumb-2 counterpart insns. (atomic_): Likewise. Add comment to keep constraints in sync with non atomic version. (atomic_nand): Likewise. (atomic_fetch_): Likewise. (atomic_fetch_nand): Likewise. (atomic__fetch): Likewise. (atomic_nand_fetch): Likewise. * config/arm/thumb1.md (thumb1_addsi3): Add comment to keep contraint in sync with atomic version. (thumb1_subsi3_insn): Likewise. (thumb1_andsi3_insn): Likewise. (thumb1_iorsi3_insn): Likewise. (thumb1_xorsi3_insn): Likewise. 2016-10-27 Nick Clifton * plugin.c (register_plugin_info): Produce an error message if the plugin is not found in the hash table. 2016-10-27 Bin Cheng * match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)): New pattern. 2016-10-26 Kelvin Nilsen PR target/78056 * config/rs6000/rs6000.c (spe_init_builtins): Modify loops to not define builtin functions from the bdesc_spe_predicates or bdesc_spe_evsel arrays if the builtin mask is not compatible with the current compiler configuration. (paired_init_builtins): Modify loop to not define define builtin functions from the bdesc_paried_preds array if the builtin mask is not compatible with the current compiler configuration. (altivec_init_builtins): Modify loops to not define the __builtin_altivec_stxvl function nor the builtin functions from the bdesc_dst or bdesc_altivec_preds, or bdesc_abs arrays if the builtin mask is not compatible with the current compiler configuration. 2016-10-26 Jeff Law * config/sh/sh.c (output_branch): Add missing fallthru comments. (gen_shl_and): Likewise. * config/sh/sh.md (movsicc): Add missing fallthru comments. * config/mips/mips.c (mips16_constant_cost): Add missing fallthru comments. (mips16_build_call_stub): Increase buffer size. Adjust fallthru comment. 2016-10-26 David Malcolm * print-rtl.c (rtx_writer::print_rtx_operand_code_u): Print INSN_UIDs for all insns in compact mode. (rtx_writer::print_rtx): Likewise. * print-rtl.h (rtx_writer::flag_compact): Update comment. * rtl-tests.c (selftest::test_dumping_insns): Update expected output to include INSN_UID. (selftest::test_uncond_jump): Likewise. 2016-10-26 Pat Haugen * haifa-sched.c (call_used_regs_num): Rename to... (call_saved_regs_num): ...this. (fixed_regs_num): New variable. (sched_pressure_start_bb): Subtract out fixed_regs. Scale call_saved regs not call_used. (alloc_global_sched_pressure_data): Compute call_saved and fixed regs. 2016-10-26 David Malcolm * print-rtl-function.c (print_rtx_function): Rewrite in terms of class rtx_writer. * print-rtl.c (outfile): Delete global. (sawclose): Likewise. (indent): Likewise. (in_call_function_usage): Likewise. (flag_compact): Likewise. (flag_simple): Likewise. (rtx_writer::rtx_writer): New ctor. (print_rtx_operand_code_0): Convert to... (rtx_writer::print_rtx_operand_code_0): ...this. (print_rtx_operand_code_e): Convert to... (rtx_writer::print_rtx_operand_code_e): ...this. (print_rtx_operand_codes_E_and_V): Convert to... (rtx_writer::print_rtx_operand_codes_E_and_V): ...this. (print_rtx_operand_code_i): Convert to... (rtx_writer::print_rtx_operand_code_i): ...this. (print_rtx_operand_code_r): Convert to... (rtx_writer::print_rtx_operand_code_r): ...this. (print_rtx_operand_code_u): Convert to... (rtx_writer::print_rtx_operand_code_u): ...this. (print_rtx_operand): Convert to... (rtx_writer::print_rtx_operand): ...this. (print_rtx): Convert to... (rtx_writer::print_rtx): ...this. (print_inline_rtx): Rewrite in terms of class rtx_writer. (debug_rtx): Likewise. (print_rtl): Convert to... (rtx_writer::print_rtl): ...this. (print_rtl): Reimplement in terms of class rtx_writer. (print_rtl_single): Rewrite in terms of class rtx_writer. (print_rtl_single_with_indent): Convert to.. (rtx_writer::print_rtl_single_with_indent): ...this. (print_simple_rtl): Rewrite in terms of class rtx_writer. * print-rtl.h (flag_compact): Delete decl. (class rtx_writer): New class. * rtl-tests.c (selftest::assert_rtl_dump_eq): Rewrite in terms of class rtx_writer. 2016-10-26 Jeff Law * config/microblaze/microblaze.c (tls_mentioned_p): Avoid fallthru. * config/arc/arc.c (acr_print_operand): Adjust fallthru comment. (check_if_valid_sleep_operand): Add missing fallthru comment. (arc_register_move_cost): Increase buffer size. * config/arc/arc.md (cbranch4si_scratch): Add missing fallthru comment. * config/arc/predicates.md (move_str_operand): Avoid fallthru. * config/cr16/cr16.c (cr16_print_operand): Add missing fallthru comment. Add gcc_unreachable for path that should never happen. * config/epiphany/epiphany.c (epiphany_print_operand): Adjust fallthru comment. 2016-10-26 Jakub Jelinek Martin Liska PR fortran/77973 * gimplify.c (gimplify_adjust_omp_clauses_1): For all added map clauses with OMP_CLAUSE_SIZE being a decl, call omp_notice_variable on outer context if any. 2016-10-26 Jakub Jelinek * gen-pass-instances.awk (adjust_linenos): Increment pass_lines[p] by increment rather than double it. (insert_remove_pass): Strip leading whitespace from args[3]. Don't emit a space before args[4]. (END): Don't emit a space before with_arg. 2016-10-26 Thomas Preud'homme * config/arm/sync.md (atomic_compare_and_swap_1): Add new ARMv8-M Baseline only alternatives to (i) hold store atomic success value in a return register rather than a scratch register, (ii) use a low register for it and to (iii) ensure the cbranchsi insn generated by the split respect the constraints of Thumb-1 cbranchsi4_insn and cbranchsi4_scratch. * config/arm/thumb1.md (cbranchsi4_insn): Add comment to indicate constraints must match those in atomic_compare_and_swap. (cbranchsi4_scratch): Likewise. 2016-10-26 Thomas Preud'homme * config/arm/arm.c (arm_expand_compare_and_swap): Add new bdst local variable. Add the new parameter to the insn generator. Set that parameter to be CC flag for 32-bit targets, bval otherwise. Set the return value from the negation of that parameter for Thumb-1, keeping the logic unchanged otherwise except for using bdst as the destination register of the compare_and_swap insn. (arm_split_compare_and_swap): Add explanation about how is the value returned to the function comment. Rename scratch variable to neg_bval. Adapt initialization of variables holding operands to the new operand numbers. Use return register to hold result of store exclusive for Thumb-1, scratch register otherwise. Construct the appropriate cbranch for Thumb-1 targets, keeping the logic unchanged for 32-bit targets. Guard Z flag setting to restrict to 32bit targets. Use gen_cbranchsi4 rather than hand-written conditional branch to loop for strongly ordered compare_and_swap. * config/arm/predicates.md (cc_register_operand): New predicate. * config/arm/sync.md (atomic_compare_and_swap_1): Use a match_operand with the new predicate to accept either the CC flag or a destination register for the boolean return value, restricting it to CC flag only via constraint. Adapt operand numbers accordingly. 2016-10-26 Jeff Law * config/fr30/fr30.c (fr30_print_operand): Adjust fallthru comment. * config/frv/frv.c (comparison_string): Do not fall through after an error. * config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru comment. (expand_one_builtin): Add missing break. * config/m32c/m32c.c (encode_pattern_1): Add fallthru comment. (m32c_legitimate_address_p): Likewise. * config/m32r/m32r.c (m32r_print_operand): Adjust fallthru comment. * config/mcore/mcore.c (mcore_gen_compare): Adjust fallthru comments. * config/microblaze/microblaze.c (microblaze_function_arg): Adjust fallthru comment. * config/msp430/msp430.c (msp430_legitimate_address_p): Adjust fallthru comment. * config/nios2/nios2.c (nios2_rtx_costs): Avoid fallthru. * config/rl78/rl78.c (rl78_calculate_death_notes): Add fallthru comment. (rl78_asm_ctor_dtor): Increase buffer size. * config/stormy16/stormy16.c (xstormy16_asm_output_destrutor): Increase buffer size. (xstormy16_asm_output_constructor): Likewise. * config/pa/pa.c (pa_asm_output_mi_thunk): Increase buffer size. * config/h8300/h8300.c (h8300_print_operand): Adjust FALLTHRU comment to silence warning. * config/spu/spu.c (spu_sched_reorder): Add missing fallthru comment. (spu_legitimate_address_p): Fix logic error and add missing fallthru comment. 2016-10-26 Michael Matz PR tree-optimization/78060 PR tree-optimization/78061 PR tree-optimization/78088 * tree-ssa-loop-split.c (easy_exit_values): New function. (tree_ssa_split_loops): Use it. (compute_new_first_bound): Change order of operations, fix invalid use of types. 2016-10-26 Georg-Johann Lay gen-pass-instances.awk is sensitive to the order in which passes are added; passes that appear later have to be added first. PR target/71676 PR target/71678 * config/avr/avr-passes.def: Swap order of directives for gen-pass-instances.awk. 2016-10-25 Jeff Law * config/vax/vax.c (vad_address_cost_1): Add missing FALLTHRU comment. (vax_notice_update_cc): Likewise. 2016-10-25 Eric Botcazou * config.gcc (sparc*-*-solaris2*): Adjust. (sparc64-*-linux*): Likewise. * config/sparc/default-64.h: Rename to... * config/sparc/default64.h: ...this. * config/sparc/sparc.c (sparc_option_override): Replace TARGET_64BIT with TARGET_ARCH64. (sparc_mangle_type): Replace !TARGET_64BIT with TARGET_ARCH32. * config/sparc/sparc.h: Minor tweaks. * config/sparc/sparc.md: Replace !TARGET_64BIT and !TARGET_ARCH64 with TARGET_ARCH32 throughout. Minor various tweaks throughout. 2016-10-25 David Malcolm * input.c (fcache::file_patch): Add comment about lifetime. (selftest::cpp_reader_ptr): New class. (selftest::lexer_test): Convert m_parser from cpp_reader * to a cpp_reader_ptr, and move m_tempfile to after it. (selftest::lexer_test::lexer_test): Update for above reordering. (lexer_test::~lexer_test): Move cleanup of m_parser to cpp_reader_ptr's dtor. 2016-10-25 David Malcolm * toplev.c (toplev::main): Remove call to location_adhoc_data_fini. 2016-10-25 Eric Botcazou * tree.h (wi::fits_to_tree_p): Accept only 0 and 1 for boolean types. * tree.c (int_fits_type_p): Likewise. Adjust head comment. 2016-10-25 David Malcolm * ggc-tests.c (forcibly_ggc_collect): Rename to... (selftest::forcibly_ggc_collect): ...this, and remove "static". (test_basic_struct): Update for above renaming. (test_length): Likewise. (test_union): Likewise. (test_finalization): Likewise. (test_deletable_global): Likewise. (test_inheritance): Likewise. (test_chain_next): Likewise. (test_user_struct): Likewise. (test_tree_marking): Likewise. * selftest-run-tests.c (selftest::run_tests): Call selftest::forcibly_ggc_collect at the end of the selftests. * selftest.h (selftest::forcibly_ggc_collect): New decl. 2016-10-25 Jakub Jelinek PR target/78102 * optabs.def (vcondeq_optab, vec_cmpeq_optab): New optabs. * optabs.c (expand_vec_cond_expr): For comparison codes EQ_EXPR and NE_EXPR, attempt vcondeq_optab as fallback. (expand_vec_cmp_expr): For comparison codes EQ_EXPR and NE_EXPR, attempt vec_cmpeq_optab as fallback. * optabs-tree.h (expand_vec_cmp_expr_p, expand_vec_cond_expr_p): Add enum tree_code argument. * optabs-query.h (get_vec_cmp_eq_icode, get_vcond_eq_icode): New inline functions. * optabs-tree.c (expand_vec_cmp_expr_p): Add CODE argument. For CODE EQ_EXPR or NE_EXPR, attempt to use vec_cmpeq_optab as fallback. (expand_vec_cond_expr_p): Add CODE argument. For CODE EQ_EXPR or NE_EXPR, attempt to use vcondeq_optab as fallback. * tree-vect-generic.c (expand_vector_comparison, expand_vector_divmod, expand_vector_condition): Adjust expand_vec_cmp_expr_p and expand_vec_cond_expr_p callers. * tree-vect-stmts.c (vectorizable_condition, vectorizable_comparison): Likewise. * tree-vect-patterns.c (vect_recog_mixed_size_cond_pattern, check_bool_pattern, search_type_for_mask_1): Likewise. * expr.c (do_store_flag): Likewise. * doc/md.texi (@code{vec_cmpeq@var{m}@var{n}}, @code{vcondeq@var{m}@var{n}}): Document. * config/i386/sse.md (vec_cmpeqv2div2di, vcondeqv2di): New expanders. 2016-10-25 Jeff Law * config/v850/v850.c (v850_handle_data_area_attribute): Fix fallthru comment. (v850_output_aligned_bss): Add missing break. * config/m68k/m68k.c (m68k_get_reloc_decoration): Add gcc_unreachable. 2016-10-25 Martin Liska PR sanitizer/78106 * sanopt.c (imm_dom_path_with_freeing_call): Handle gasm statements as they can also contain possibly a freeing call. 2016-10-25 H.J. Lu Martin Liska PR ipa/78099 * common.opt: Mark flag_ipa_icf_variables as Optimization flag. * ipa-icf.c (sem_function::get_hash): Add target optimization node to hash. 2016-10-25 Wilco Dijkstra PR target/78041 * config/arm/neon.md (ashldi3_neon): Add "r 0 i" and "&r r i" variants. Remove partial overlap check for shift by 1. (ashldi3_neon): Likewise. 2016-10-25 Thomas Preud'homme * config/arm/constraints.md (Q constraint): Document its use for Thumb-1. (Pf constraint): New constraint for relaxed, consume or relaxed memory models. * config/arm/sync.md (atomic_load): Add new ARMv8-M Baseline only alternatives to allow any register when memory model matches Pf and thus lda is used, but only low registers otherwise. Use unpredicated output template for Thumb-1 targets. (atomic_store): Likewise for stl. (arm_load_exclusive): Add new ARMv8-M Baseline only alternative whose output template does not have predication. (arm_load_acquire_exclusive): Likewise. (arm_load_exclusivesi): Likewise. (arm_load_acquire_exclusivesi): Likewise. (arm_store_release_exclusive): Likewise. (arm_store_exclusive): Use unpredicated output template for Thumb-1 targets. 2016-10-25 Jakub Jelinek * internal-fn.def (LAUNDER): New internal function. * internal-fn.c (expand_LAUNDER): New function. 2016-10-25 Georg-Johann Lay Pitchumani Sivanupandi New avr target pass to work around performance loss by PR fix. PR target/71676 PR target/71678 * config/avr/avr.md (casesi__sequence) [qi,hi]: New insn. (*cmp) [qi,qq,uqq,hi,hq,uhq,ha,uha]: Rename to cmp3. * config/avr/predicates.md (extend_operator): New. * config/avr/avr-passes.def (avr_pass_casesi): Register new pass. * config/avr/avr-protos.h (avr_casei_sequence_check_operands) (make_avr_pass_casesi): New prototypes. * config/avr/avr.c (print-rtl.h): Include it. (pass_data avr_pass_data_casesi): Data for new pass. (avr_pass_casesi): New class implementing rtl_opt_pass .avr-casesi. (make_avr_pass_casesi, avr_parallel_insn_from_insns) (avr_is_casesi_sequence, avr_casei_sequence_check_operands) (avr_optimize_casesi): New functions. 2016-10-25 Georg-Johann Lay Pitchumani Sivanupandi PR target/71676 PR target/71678 * config/avr/avr.md (casesi): Rewrite avoiding subregs of SI. 2016-10-24 Jakub Jelinek * dwarf2out.c (gen_subprogram_die): Add DW_AT_reference or DW_AT_rvalue_reference attributes. 2016-10-24 Bernd Edlinger * doc/invoke.text (Wint-in-bool-context): Update documentation. * value-prof.c (stringop_block_profile): Fix a warning. 2016-10-24 Martin Sebor PR middle-end/77735 * builtins.c (string_length): New function. (c_strlen): Use string_length. Correctly handle wide strings. * gimple-ssa-sprintf.c (target_max_value, target_size_max): New functions. (target_int_max): Call target_max_value. (format_result::knownrange): New data member. (fmtresult::fmtresult): Define default constructor. (format_integer): Use it and set format_result::knownrange. Handle global constants. (format_floating_max): Add third argument. (format_floating): Recompute maximum value for %a for each argument. (get_string_length): Use fmtresult default ctor. (format_string): Set format_result::knownrange. (format_directive): Check format_result::knownrange. (add_bytes): Same. Correct caret placement in diagnostics. (pass_sprintf_length::compute_format_length): Set format_result::knownrange. (pass_sprintf_length::handle_gimple_call): Use target_size_max. 2016-10-24 Jakub Jelinek * config/i386/i386.c (ix86_in_large_data_p, ix86_expand_builtin): Use VAR_P (x) instead of TREE_CODE (x) == VAR_DECL. 2016-10-24 Ximin Luo PR debug/77985 * dwarf2out.c (file_table_relative_p): Remove. (gen_compile_unit_die, dwarf2out_early_finish): Emit DW_AT_comp_dir also for absolute paths. * doc/tm.texi: Update. * doc/tm.texi.in (SDB and DWARF) : Remove. * target.def (force_at_comp_dir): Remove hook. * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Remove define. 2016-10-24 Richard Biener * tree-vrp.c (evrp_dom_walker::before_dom_children): Ignore backedges when identifying the single predecessor to take conditional info from. Use SCEV to get at ranges for loop IVs. * lto-streamer-out.c (lto_write_mode_table): CSE inner mode to avoid false warning. 2016-10-24 Georg-Johann Lay PR target/78093 * doc/extend.texi (AVR Variable Attributes) [absdata]: Document it. * config/avr/avr.c (AVR_SYMBOL_FLAG_TINY_ABSDATA): New macro. (avr_address_tiny_absdata_p): New static function. (avr_legitimate_address_p, avr_legitimize_address) [AVR_TINY]: Use it to determine validity of constant addresses. (avr_attribute_table) [absdata]: New variable attribute... (avr_handle_absdata_attribute): ...and handler. (avr_decl_absdata_p): New static function. (avr_encode_section_info) [AVR_TINY]: Use it to add flag AVR_SYMBOL_FLAG_TINY_ABSDATA to respective symbols_refs. (avr_address_cost) [AVR_TINY]: absdata addresses cost 2. 2016-10-24 Richard Biener PR tree-optimization/78076 * tree-ssa-loop-split.c (tree_ssa_split_loops): Reset aux also on the loop tree root. 2016-10-24 Jakub Jelinek * config/i386/i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_BEXTR{,I}{32,64}, IX86_BUILTIN_BZHI{32,64}, IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}. (ix86_gimple_fold_builtin): Handle IX86_BUILTIN_BZHI{32,64}, IX86_BUILTIN_PDEP{32,64} and IX86_BUILTIN_PEXT{32,64}. 2016-10-24 Martin Liska PR sanitizer/77966 * opts.c (finish_options): Skip conditionally. 2016-10-23 Martin Sebor PR target/77837 * config/rs6000/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define. * config/rs6000/linux64.h (TARGET_PRINTF_POINTER_FORMAT): Likewise. 2016-10-23 Eric Botcazou * config/sparc/sparc.md (cpu_feature): Minor tweak. (enabled): Likewise. (movsi_insn, movdi_insn_sp32, movdi_insn_sp64, movsf_insn, movdf_insn_sp32, movdf_insn_sp64, zero_extendsidi2_insn_sp64, sign_extendsidi2_insn, mov_insn, mov_insn_sp64, mov_insn_sp32, not_, nand_vis, _not1_vi, _not2_vis, one_cmpl2, fcmp, pdistn_vis): Likewise. 2016-10-23 Eric Botcazou * config/sparc/sparc-c.c (sparc_target_macros): Replace TARGET_64BIT with TARGET_ARCH64. Define __VIS to 0x400 if TARGET_VIS4. 2016-10-21 Andrew Pinski * config/aarch64/aarch64-cores.def: Rewrite so IMP and PART are integer constants. * config/aarch64/driver-aarch64.c (struct aarch64_core_data): Change implementer_id to unsigned char. Change part_no to unsigned int. (AARCH64_BIG_LITTLE): New define. (INVALID_IMP): New define. (INVALID_CORE): New define. (cpu_data): Change the last element's implementer_id and part_no to integers. (valid_bL_string_p): Rewrite to .. (valid_bL_core_p): this for integers instead of strings. (parse_field): New function. (contains_string_p): Rewrite to ... (contains_core_p): this for integers and only for the part_no. (host_detect_local_cpu): Rewrite handling of implementation and par num to be integers; simplifying the code. 2016-10-21 Kugan Vivekanandarajah * ipa-prop.c (ipa_compute_jump_functions_for_edge): Create nonzero value range for pointers in more cases. 2016-10-21 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_add_constant_internal): Add extra argument to allow emitting the move immediate. Use add/sub with positive immediate. (aarch64_add_constant): Add inline function. (aarch64_add_sp): Likewise. (aarch64_sub_sp): Likewise. (aarch64_expand_prologue): Call aarch64_sub_sp. (aarch64_expand_epilogue): Call aarch64_add_sp. Decide when to leave out move. (aarch64_output_mi_thunk): Call aarch64_add_constant. 2016-10-21 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_layout_frame): Align FP callee-saves. 2016-10-21 Jakub Jelinek * config/i386/adxintrin.h (_subborrow_u32, _addcarry_u32, _addcarryx_u32, _subborrow_u64, _addcarry_u64, _addcarryx_u64): Formatting fixes. * config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step, _rdseed64_step): Likewise. * config/i386/tbmintrin.h (__bextri_u32): Likewise. PR target/78057 * config/i386/i386.c: Include fold-const-call.h, tree-vrp.h and tree-ssanames.h. (ix86_fold_builtin): Fold IX86_BUILTIN_[LT]ZCNT{16,32,64} with INTEGER_CST argument. (ix86_gimple_fold_builtin): New function. (TARGET_GIMPLE_FOLD_BUILTIN): Define. * dwarf2out.c (ranges_table): Change into vec *. (ranges_by_label): Change into vec *. (ranges_table_allocated, ranges_table_in_use, ranges_by_label_allocated, ranges_by_label_in_use, RANGES_TABLE_INCREMENT): Removed. (add_ranges_num): Use vec_safe_push into ranges_table. (add_ranges_by_labels): Use vec_safe_push into ranges_by_label. (output_ranges): Adjust for ranges_table and ranges_by_label conversion from arrays to vec. (add_high_low_attributes, dwarf2out_finish): Adjust for range_table conversion from arrays to vec. (dwarf2out_c_finalize): Don't clear ranges_table_allocated, ranges_table_in_use, ranges_by_label_allocated and ranges_by_label_in_use. Set ranges_by_label to NULL instead of 0. * dwarf2out.c (gen_variable_die): Emit DW_AT_const_expr attribute if needed. Re-add origin_die variable and its initialization. * gimplify.c (gimplify_bind_expr): Handle oacc_declare_returns even for -fstack-reuse=none, or for volatile vars etc. 2016-10-21 David Malcolm * print-rtl-function.c (flag_compact): Move extern decl to... * print-rtl.h (flag_compact): ...here. * rtl-tests.c (selftests::assert_rtl_dump_eq): New function. (ASSERT_RTL_DUMP_EQ): New macro. (selftest::test_dumping_regs): New function. (selftest::test_dumping_insns): New function. (selftest::test_uncond_jump): Add uses of ASSERT_RTL_DUMP_EQ on the insns. (selftest::rtl_tests_c_tests): Call the new test functions. 2016-10-21 Trevor Saunders * cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust. (outgoing_edges_match): Likewise. (try_crossjump_to_edge): Likewise. * cfgrtl.c (try_redirect_by_replacing_jump): Likewise. (rtl_tidy_fallthru_edge): Likewise. * rtl.h (tablejump_p): Adjust prototype. * rtlanal.c (tablejump_p): Return the label as a rtx_insn *. 2016-10-21 Trevor Saunders * rtl.h (label_ref_label): New function. (set_label_ref_label): New function. (LABEL_REF_LABEL): Delete. * alias.c (rtx_equal_for_memref_p): Adjust. * cfgbuild.c (make_edges): Likewise. (purge_dead_tablejump_edges): Likewise. * cfgexpand.c (convert_debug_memory_address): Likewise. * cfgrtl.c (patch_jump_insn): Likewise. * combine.c (distribute_notes): Likewise. * cse.c (hash_rtx_cb): Likewise. (exp_equiv_p): Likewise. (fold_rtx): Likewise. (check_for_label_ref): Likewise. * cselib.c (rtx_equal_for_cselib_1): Likewise. (cselib_hash_rtx): Likewise. * emit-rtl.c (mark_label_nuses): Likewise. * explow.c (convert_memory_address_addr_space_1): Likewise. * final.c (output_asm_label): Likewise. (output_addr_const): Likewise. * gcse.c (add_label_notes): Likewise. * genconfig.c (walk_insn_part): Likewise. * genrecog.c (validate_pattern): Likewise. * ifcvt.c (cond_exec_get_condition): Likewise. (noce_emit_store_flag): Likewise. (noce_get_alt_condition): Likewise. (noce_get_condition): Likewise. * jump.c (maybe_propagate_label_ref): Likewise. (mark_jump_label_1): Likewise. (redirect_exp_1): Likewise. (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * print-rtl.c (print_value): Likewise. * reload.c (find_reloads): Likewise. * reload1.c (set_label_offsets): Likewise. * reorg.c (get_branch_condition): Likewise. * rtl-tests.c (test_uncond_jump): Likewise. * rtl.c (rtx_equal_p_cb): Likewise. (rtx_equal_p): Likewise. * rtlanal.c (reg_mentioned_p): Likewise. (rtx_referenced_p): Likewise. (get_condition): Likewise. * varasm.c (const_hash_1): Likewise. (compare_constant): Likewise. (const_rtx_hash_1): Likewise. (output_constant_pool_1): Likewise. 2016-10-21 Senthil Kumar Selvaraj PR target/71627 * reload.c (find_valid_class_1): Allow regclass if atleast one regno in regclass is ok. Compute and use rclass size based on actually available regnos for mode in rclass. 2016-10-21 Eric Botcazou * config/sparc/sparc-modes.def (CCV): New. (CCXV): Likewise. * config/sparc/predicates.md (v_comparison_operator): New. (icc_comparison_operator): Add support for CCV/CCXV. (xcc_comparison_operator): Likewise. * config/sparc/sparc.c (output_cbranch): Likewise. (sparc_print_operand): Likewise. * config/sparc/sparc.md (UNSPEC_{ADD,SUB,NEG}V): New constants. (uaddvdi4): New expander. (addvdi4): Likewise. (uaddvdi4_sp32): New instruction. (addvdi4_sp32): Likewise. (uaddvsi4): New expander. (addvsi4): Likewise. (cmp_ccc_plus_sltu_set): New instruction. (cmp_ccv_plus): Likewise. (cmp_ccxv_plus): Likewise. (cmp_ccv_plus_set): Likewise. (cmp_ccxv_plus_set): Likewise. (cmp_ccv_plus_sltu_set): Likewise. (uaddvdi4): New expander. (subvdi4): Likewise. (usubdi4_sp32): New instruction. (subvdi4_sp32): Likewise. (usubvsi4): New expander. (subvsi4): Likewise. (cmpsi_minus_sltu_set): New instruction. (cmp_ccv_minus): Likewise. (cmp_ccxv_minus): Likewise. (cmp_ccv_minus_set): Likewise. (cmp_ccxv_minus_set): Likewise. (cmp_ccv_minus_sltu_set): Likewise. (unegvdi3): New expander. (negvdi3): Likewise. (unegdi3_sp32): New instruction. (negvdi3_sp32): Likewise. (unegvsi3): New expander. (negvsi3): Likewise. (cmp_ccc_neg_sltu_set): New instruction. (cmp_ccv_neg): Likewise. (cmp_ccxv_neg): Likewise. (cmp_ccv_neg_set): Likewise. (cmp_ccxv_neg_set): Likewise. (cmp_ccv_neg_sltu_set): Likewise. * tree-ssa-loop-split.c: Remove trailing spaces. * match.pd: Likewise. 2016-10-21 Kyrylo Tkachov PR rtl-optimization/78038 * ree.c (get_defs): Return NULL if a defining insn for REG cannot be deduced to set REG through the RTL structure. (make_defs_and_copies_lists): Return false on a failing get_defs call. 2016-10-21 Richard Biener PR tree-optimization/78051 * tree-vrp.c (evrp_dom_walker::before_dom_children): Update stmt and mark replaced if folding did something. 2016-10-21 David Edelsohn * config/rs6000/rs6000.c (rs6000_assemble_visibility): Swap "internal" and "protected" in visibility types. (rs6000_xcoff_declare_function_name): Fix formatting. (rs6000_xcoff_declare_object_name): Fix formatting. 2016-10-21 Uros Bizjak * config/i386/i386.c (ix86_fold_builtin): Handle IX86_BUILTIN_INFQ and IX86_BUILTIN_HUGE_VALQ here ... (ix86_expand_builtin): ... not here. 2016-10-20 Jakub Jelinek * doc/gty.texi (for_user): Use @item next to @findex. 2016-10-20 Uros Bizjak PR target/78037 * config/i386/bmiintrin.h (__tzcnt_u16): Call __builtin_ia32_tzcnt_u16. (__tzcnt_u32, _tzcnt_u32): Call __builtin_ia32_tzcnt_u32. (__tzcnt_u64, _tzcnt_u64): Call __builtin_ia32_tzcnt_u64. * config/i386/lzcntintrin.h (__lzcnt_u16): Call __builtin_ia32_lzcnt_u16. (__lzcnt_u32, _lzcnt_u32): Call __builtin_ia32_lzcnt_u32. (__lzcnt_u64, _lzcnt_u64): Call __builtin_ia32_lzcnt_u64. * config/i386/i386.md (UNSPEC_LZCNT, UNSPEC_TZCNT): New unspecs. (ctz2, *ctz2): Use SWI48 mode iterator. (bmi_tzcnt_): New expander. (*bmi_tzcnt__falsedep_1): New define_insn_and_split pattern. (*bmi_tzcnt__falsedep, *bmi_tzcnt_): New insn patterns. (clz2_lzcnt, *clz2_lzcnt): Use SWI48 mode iterator. (lzcnt_): New expander. (*lzcnt__falsedep_1): New define_insn_and_split pattern. (*lzcnt__falsedep, *lzcnt_): New insn patterns. * config/i386/i386-builtin-types.def (UINT_FTYPE_UINT): New. (UINT64_FTYPE_UINT64): New. * config/i386/i386-builtin.def (__builtin_clzs): Remove description. (__builtin_ia32_lzcnt_u16): New description. (__builtin_ia32_lzcnt_u32): Ditto. (__builtin_ia32_lzcnt_u64): Ditto. (__builtin_ctzs): Remove description. (__builtin_ia32_tzcnt_u16): New description. (__builtin_ia32_tzcnt_u32): Ditto. (__builtin_ia32_tzcnt_u64): Ditto. * config/i386/i386.c (ix86_expand_args_builtin): Handle UINT_FTYPE_UINT and UINT64_FTYPE_UINT64. 2016-10-20 Martin Liska PR lto/78049 * lto-streamer-in.c (fixup_call_stmt_edges_1): Replace value comparison with STMT_UID_NOT_IN_RANGE. (fixup_call_stmt_edges): Do not fixup edges of a thunk in LTRANS. 2016-10-20 Eric Botcazou * compare-elim.c (conforming_compare): Accept UNSPECs. (find_comparison_dom_walker::before_dom_children): Deal with instructions both using and killing the flags register. (equivalent_reg_at_start): New function extracted from... (try_eliminate_compare): ...here. Use it and add support for registers and UNSPECs as second operand of the compare. * config/visium/visium-modes.def (CCV): New. * config/visium/predicates.md (visium_v_comparison_operator): New. (visium_branch_operator): Deal with CCV mode. * config/visium/visium.c (visium_select_cc_mode): Likewise. (output_cbranch): Likewise. * config/visium/visium.md (UNSPEC_{ADD,SUB,NEG}V): New constants. (uaddv4): New expander. (addv4): Likewise. (add3_insn_set_carry): New instruction. (add3_insn_set_overflow): Likewise. (addsi3_insn_set_overflow): Likewise. (usubv4): New expander. (subv4): Likewise. (sub3_insn_set_carry): New instruction. (sub3_insn_set_overflow): Likewise. (subsi3_insn_set_overflow): Likewise. (unegv3): New expander. (negv3): Likewise. (neg2_insn_set_overflow): New instruction. (addv_tst): Likewise. (subv_tst): Likewise. (negv_tst): Likewise. (cbranch4_addv_insn): New splitter and instruction. (cbranch4_subv_insn): Likewise. (cbranch4_negv_insn): Likewise. 2016-10-20 Richard Biener * tree-ssa-alias.c (ptrs_compare_unequal): Remove code duplication. Handle decls possibly not bound. * tree-ssa-structalias.c (get_constraint_for_ssa_var): Add nothing_id for decls that might not be bound if we are interested for the address. (get_constraint_for_component_ref): Deal with that. 2016-10-20 Michael Matz Loop splitting. * common.opt (-fsplit-loops): New flag. * passes.def (pass_loop_split): Add. * opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3. (enable_fdo_optimizations): Add loop splitting. * timevar.def (TV_LOOP_SPLIT): Add. * tree-pass.h (make_pass_loop_split): Declare. * tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare. * tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h, * tree-ssa-loop-split.c: New file. * Makefile.in (OBJS): Add tree-ssa-loop-split.o. * doc/invoke.texi (fsplit-loops): Document. * doc/passes.texi (Loop optimization): Add paragraph about loop splitting. 2016-10-20 Richard Biener * cgraphunit.c (analyze_functions): Set node->definition to false to signal symbol removal to debug_hooks->late_global_decl. * ipa.c (symbol_table::remove_unreachable_nodes): When not in WPA signal symbol removal to the debuginfo machinery. * dwarf2out.c (dwarf2out_late_global_decl): Instead of using early_finised to guard the we're called for symbol removal case look at the symtabs definition flag. (gen_variable_die): Remove redundant check. 2016-10-20 Andreas Krebbel * config/s390/s390.md ("prefetch"): Add fallthrough comment. 2016-10-20 Prathamesh Kulkarni PR tree-optimization/53979 * match.pd ((a ^ b) | a -> a | b): New pattern. 2016-10-19 John David Anglin * config/pa/pa64-hpux.h (PA_INIT_FRAME_DUMMY_ASM_OP): Move to config/pa/pa64-hpux-lib.h. (PA_CRTBEGIN_HACK): Likewise. (DTOR_LIST_BEGIN): Likewise. 2016-10-19 Bernd Edlinger * config/arm/arm.c (arm_emit_coreregs_64bit_shift): Clear the result register only if "in" and "out" are different registers. 2016-10-19 Eric Botcazou * omp-low.c (pass_oacc_device_lower::gate): New method. (execute): Always call execute_oacc_device_lower. 2016-10-19 Bill Schmidt PR tree-optimization/77916 PR tree-optimization/77937 * gimple-ssa-strength-reduction.c (analyze_increments): Remove stopgap fix. (insert_initializers): Requirement of initializer for -1 should be based on pointer-typedness of the candidate basis. 2016-10-19 Bin Cheng PR tree-optimization/78005 * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Compute upper (included) bound for niters of prolog loop. (vect_gen_scalar_loop_niters): Change parameter VF to VFM1. Compute niters of scalar loop above which vectorized loop is preferred, as well as the upper (included) bound for the niters. (vect_do_peeling): Record niter bound for loops accordingly. 2016-10-19 Thomas Schwinge PR lto/77458 * tree-core.h (enum tree_index): Put the complex types after their component types. * tree-streamer.c (verify_common_node_recorded): New function. (preload_common_nodes) : Use it. 2016-10-19 Martin Liska * cgraph.h (cgraph_edge::binds_to_current_def_p): Replace NULL with false as a return value. 2016-10-19 Thomas Schwinge PR tree-optimization/78024 * omp-low.c (oacc_loop_discovery): Call clear_bb_flags before, and don't clear BB_VISITED after processing. 2016-10-19 Richard Biener * domwalk.c (dom_walker::walk): Use RPO order. 2016-10-19 Richard Biener * tree-vrp.c (evrp_dom_walker::evrp_dom_walker): Initialize stmts_to_remove. (evrp_dom_walker::~evrp_dom_walker): Free it. (evrp_dom_walker::stmts_to_remove): Add. (evrp_dom_walker::before_dom_children): Mark PHIs and stmts whose output we fully propagate for removal. Propagate into BB destination PHI arguments. (execute_early_vrp): Remove queued stmts. Dump value ranges before stmt removal. 2016-10-18 Aldy Hernandez * Makefile.in (OBJS): Add gimple-ssa-warn-alloca.o. * passes.def: Add two instances of pass_walloca. * tree-pass.h (make_pass_walloca): New. * gimple-ssa-warn-alloca.c: New file. * doc/invoke.texi: Document -Walloca, -Walloca-larger-than=, and -Wvla-larger-than= options. 2016-10-18 Thomas Schwinge * cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN. * config/nvptx/nvptx.c (nvptx_find_sese): Likewise. 2016-10-18 Kelvin Nilsen * config/rs6000/altivec.h (vec_xl_len): New macro. (vec_xst_len): New macro. (vec_cmpnez): New macro. (vec_cntlz_lsbb): New macro. (vec_cnttz_lsbb): New macro. (vec_xlx): New macro. (vec_xrx): New macro. (vec_all_nez): New C++ predicate template. (vec_any_eqz): New C++ predicate template. (vec_all_ne): Revised C++ predicate template under _ARCH_PWR9 conditional compilation. (vec_any_eq): Revised C++ predicate template under _ARCH_PWR9 conditional compilation. (vec_all_nez): New macro. (vec_any_eqz): New macro. (vec_all_ne): Revised macro under _ARCH_PWR9 conditional compilation. (vec_any_eq): Revised macro under _ARCH_PWR9 conditional compilation. * config/rs6000/vector.md (VI): Moved this mode iterator definition from altivec.md to vector.md. (UNSPEC_NEZ_P): New value. (vector_ne__p): New expansion for implementation of vec_all_ne and vec_any_eq built-in functions. (vector_nez__p): New expansion for implementation of vec_all_nez and vec_any_eqz built-in functions. (vector_ne_v2di_p): New expansion for implementation of vec_all_ne and vec_any_eq built-in function. (cr6_test_for_zero): New commentary to explain this expansion. (cr6_test_for_zero_reverse): New commentary to explain this expansion. (cr6_test_for_lt): New commentary to explain this expansion. (cr6_test_for_lt_reverse): New commentary to explain this expansion. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded function prototypes for vec_all_ne, vec_all_nez, vec_any_eq, vec_any_eqz, vec_cmpnez, vec_cntlz_lsbb, vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx, and vec_xrx built-in functions. (altivec_resolve_overloaded_builtin): Modify the handling of ALTIVEC_BUILTIN_VEC_CMPNE to use the Power9 instructions when the compiler is configured to support TARGET_P9_VECTOR. * config/rs6000/rs6000-builtin.def (BU_ALTIVEC_P): Add commentary to explain the special processing that is given to predicate built-ins introduced using this macro. (BU_ALTIVEC_OVERLOAD_P): Add commentary to alert maintainers to the special processing given to predicate built-ins introduced using this macro. (BU_VSX_P): Likewise. (BU_P8V_AV_P): Likewise. (BU_P9V_AV_P): Likewise. (BU_P9V_AV_X): New macro. (BU_P9V_64BIT_AV_X): New macro. (BU_P9V_VSX_3): New macro. (BU_P9V_OVERLOAD_P): New macro. (LXVL): New BU_P9V_64BIT_VSX_2. (VEXTUBLX): New BU_P9V_AV_2. (VEXTUBRX): Likewise. (VEXTUHLX): Likewise. (VEXTUHRX): Likewise. (VEXTUWLX): Likewise. (VEXTUWRX): Likewise. (STXVL): New BU_P9V_64BIT_AV_X. (VCLZLSBB): New BU_P9V_AV_1. (VCTZLSBB): Likewise. (CMPNEB): New BU_P9V_AV_2. (CMPNEH): Likewise. (CMPNEW): Likewise. (CMPNEF): Likewise. (CMPNED): Likewise. (VCMPNEB_P): New BU_P9V_AV_P. (VCMPNEH_P): Likewise. (VCMPNEW_P): Likewise. (VCMPNED_P): Likewise. (VCMPNEFP_P): Likewise. (VCMPNEDP_P): Likewise. (CMPNEZB): New BU_P9V_AV_2. (CMPNEZH): Likewise. (CMPNEZW): Likewise. (VCMPNEZB_P): New BU_P9V_AV_P. (VCMPNEZH_P): Likewise. (VCMPNEZW_P): Likewise. (LXVL): New BU_P9V_OVERLOAD_2. (STXVL): New BU_P9V_OVERLOAD_3. (VEXTULX): New BU_P9V_OVERLOAD_2. (VEXTURX): Likewise. (CMPNEZ): Likewise. (VCMPNEZ_P): New BU_P9V_OVERLOAD_P. (VCMPNE_P): Likewise. (VCLZLSBB): New BU_P9V_OVERLOAD_1. (VCTZLSBB): Likewise. * config/rs6000/rs6000.c (altivec_expand_predicate_builtin): Add comment to explain mode used for scratch register. (altivec_expand_stxvl_builtin): New function. (altivec_expand_builtin): Add case for new constant P9V_BUILTIN_STXVL. (altivec_init_builtins): Add initialized variable void_ftype_v16qi_pvoid_long and use this type to define the built-in function __builtin_altivec_stxvl. * config/rs6000/vsx.md (UNSPEC_LXVL): New value. (UNSPEC_STXVL): New value. (UNSPEC_VCLZLSBB): New value. (UNSPEC_VCTZLSBB): New value. (UNSPEC_VEXTUBLX): New value. (UNSPEC_VEXTUHLX): New value. (UNSPEC_VEXTUWLX): New value. (UNSPEC_VEXTUBRX): New value. (UNSPEC_VEXTUHRX): New value. (UNSPEC_VEXTUWRX): New value. (UNSPEC_VCMPNEB): New value. (UNSPEC_VCMPNEZB): New value. (UNSPEC_VCMPNEH): New value. (UNSPEC_VCMPNEZH): New value. (UNSPEC_VCMPNEW): New value. (UNSPEC_VCMPNEZW): New value. (*vsx_ne__p): New insn for vector test all not equal with vector of integer modes. (*vsx_ne__p): New insn for vector test all not equal with vector of float or double modes. (*vector_nez__p): New insn for vector test all not equal or zero. (lxvl): New expand for load VSX vector with length. (*lxvl): New insn for load VSX vector with length. (stxvl): New expand for store VSX vector with length. (*stxvl): New insn for store VSX vector with length. (vcmpneb): New insn for vector of byte compare not equal. (vcmpnezb): New insn for vector of byte compare not equal or zero. (vcmpneh): New insn for vector of half word compare not equal. (vcmpnezh): New insn for vector of half word compare not equal or zero. (vcmpnew): New insn for vector of word compare not equal. (vcmpne): New insn for vector of float or double compare not equal. (vcmpnezw): New insn for vector of word compare not equal or zero. (vclzlsbb): New insn for vector count leading zero least-significant bits byte. (vctzlsbb): New insn for vector count trailing zero least signficant bits byte. (vextublx): New insn for vector extract unsigned byte left indexed. (vextubrx): New insn for vector extract unsigned byte right indexed. (vextuhlx): New insn for vector extract unsigned half word left indexed. (vextuhrx): New insn for vector extract unsigned half word right indexed. (vextuwlx): New insn for vector extract unsigned word left indexed. (vextuwrx): New insn for vector extract unsigned word right indexed. * config/rs6000/rs6000.h (RS6000_BTC_CONST): Enhance comment to clarify intent of this constant. * config/rs6000/altivec.md (VI): Move this mode iterator to vsx.md. * doc/extend.texi (PowerPC Altivec Built-in Functions): Add documentation for vec_all_nez, vec_any_eqz, vec_cmpnez, vec_cntlz_lsbb, vec_cnttz_lsbb, vec_xl_len, vec_xst_len, vec_xlx, and vec_xrx functions. 2016-10-18 Andrew Pinski PR tree-opt/65950 * predict.c (is_exit_with_zero_arg): New function. (tree_bb_level_predictions): Don't consider paths leading to exit(0) as nottaken. 2016-10-18 Uros Bizjak PR target/77991 * config/i386/i386.c (legitimize_tls_address) : For TARGET_64BIT || TARGET_ANY_GNU_TLS convert dest to Pmode if different than Pmode. 2016-10-18 Bill Schmidt PR tree-optimization/77916 * gimple-ssa-strength-reduction.c (analyze_increments): Reinstate stopgap fix, as pointers with -1 increment are still broken. 2016-10-18 David Edelsohn * config/rs6000/rs6000.c (rs6000_output_symbol_ref): Move storage mapping class decoration from here... (rs6000_xcoff_encode_section): ...to here. (rs6000_savres_strategy) [AIX,ELFv2]: Inline FPR save and restore if shrink-wrapping and optimizing for speed. 2016-10-18 Richard Biener * tree-vrp.c (evrp_dom_walker::before_dom_children): Handle not visited but non-executable predecessors. Return taken edge. Simplify conditions and refactor propagation vs. folding step. 2016-10-18 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_savres_strategy): Do not select {SAVE,REST}_MULTIPLE if shrink-wrapping separate components. (rs6000_get_separate_components): Assert we do not have those strategies selected. 2016-10-18 Richard Biener * tree-ssa-propagate.h (substitute_and_fold): Adjust prototype. * tree-ssa-propagate.c (ssa_prop_fini): Remove final BB_VISITED clearing. (substitute_and_fold_dom_walker): Adjust constructor. (substitute_and_fold_dom_walker::before_dom_children): Remove do_dce flag and handling (always true). (substitute_and_fold): Likewise. * tree-vrp.c (vrp_finalize): Adjust. (execute_early_vrp): Remove final BB_VISITED clearing. * tree-ssa-ccp.c (ccp_finalize): Adjust. * tree-ssa-copy.c (fini_copy_prop): Likewise. * ira.c (ira): Call clear_bb_flags. 2016-10-18 Richard Biener * genmatch.c (dt_operand::gen_gimple_expr): Use get_name to get at the operand to look at with TREE_OPERAND for generic sub-nodes. 2016-10-18 David Malcolm * genattrtab.c (attr_string): Use rtx_reader_ptr for call to copy_md_ptr_loc. (gen_attr): Use rtx_reader_ptr for lookup_enum_type call. (write_test_expr): Use rtx_reader_ptr for calls to fprint_c_condition. (write_attr_value): Likewise. * genconditions.c (write_one_condition): Use rtx_reader_ptr for call to print_md_ptr_loc. (write_one_condition): Likewise for calls to print_c_condition. * genconstants.c: Include "statistics.h" and "vec.h". (main): Update for conversion to member functions. * genemit.c (emit_c_code): Use rtx_reader_ptr for call to print_md_ptr_loc. * genenums.c: Include "statistics.h" and "vec.h". (main): Update for conversion of traverse_enum_types to a method. * genmddeps.c: Include "statistics.h" and "vec.h". * genoutput.c (process_template): Use rtx_reader_ptr for call to print_md_ptr_loc. * genpreds.c (write_predicate_subfunction): Likewise. (write_predicate_expr): Likewise for calls to print_c_condition. * genrecog.c (print_test): Likewise. * gensupport.c (process_rtx): Likewise for calls to copy_md_ptr_loc and join_c_conditions. (alter_test_for_insn): Likewise for call to join_c_conditions. (process_substs_on_one_elem): Likewise. (gen_mnemonic_setattr): Update for move of string_obstack to a field of rtx_reader. (mnemonic_htab_callback): Likewise. Fix formatting. (gen_mnemonic_attr): Likewise. * gentarget-def.c (def_target_insn): Use rtx_reader_ptr for calls to print_c_condition. * read-md.c: Include "statistics.h" and "vec.h". (string_obstack): Convert this global to field "m_string_obstack" of class rtx_reader. (ptr_locs): Likewise, as "m_ptr_locs". (ptr_loc_obstack): Likewise, as "m_ptr_loc_obstack". (joined_conditions): Likewise, as "m_joined_conditions". (joined_conditions_obstack): Likewise, as "m_joined_conditions_obstack". (md_constants): Likewise, as "m_md_constants". (enum_types): Likewise, as "m_enum_types". (set_md_ptr_loc): Convert to... (rtx_reader::set_md_ptr_loc): ...member function. (get_md_ptr_loc): Convert to... (rtx_reader::get_md_ptr_loc): ...member function. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (join_c_conditions): Convert to... (rtx_reader::join_c_conditions): ...member function. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (read_name): Convert to... (rtx_reader::read_name): ...member function. (read_escape): Convert to... (rtx_reader::read_escape): ...member function. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (read_braced_string): Convert to... (rtx_reader::read_braced_string): ...member function. (read_string): Convert to... (rtx_reader::read_string): ...member function. (read_skip_construct): Convert to... (rtx_reader::read_skip_construct): ...member function. (handle_constants): Convert to... (rtx_reader::handle_constants): ...member function. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (handle_enum): Convert to... (rtx_reader::handle_enum): ...member function. (lookup_enum_type): Convert to... (rtx_reader::lookup_enum_type): ...member function. (traverse_enum_types): Convert to... (rtx_reader::traverse_enum_types): ...member function. (rtx_reader::rtx_reader): Move initializations of various former global data from rtx_reader::read_md_files to here, as fields, along with the call to unlock_std_streams. (rtx_reader::~rtx_reader): Clean up m_base_dir, and clean up the new fields. (rtx_reader::read_md_files): Move initializations of various global data from here to the ctor. * read-md.h (read_name): Convert to... (rtx_reader::read_name): ...member function. (rtx_reader::read_escape): New method decl. (read_quoted_string): Convert to... (rtx_reader::read_quoted_string): ...member function. (rtx_reader::read_braced_string): New method decl. (read_string): Convert to... (rtx_reader::read_string): ...member function. (rtx_reader::read_skip_construct): New method decl. (rtx_reader::set_md_ptr_loc): New method decl. (rtx_reader::get_md_ptr_loc): New method decl. (copy_md_ptr_loc): Convert to... (rtx_reader::copy_md_ptr_loc): ...member function. (fprint_md_ptr_loc): Convert to... (rtx_reader::fprint_md_ptr_loc): ...member function. (print_md_ptr_loc): Convert to... (rtx_reader::print_md_ptr_loc): ...member function. (rtx_reader::lookup_enum_type): New method decl. (rtx_reader::traverse_enum_types): New method decl. (rtx_reader::handle_constants): New method decl. (traverse_md_constants): Convert to... (rtx_reader::traverse_md_constants): ...member function. (rtx_reader::handle_enum): New method decl. (rtx_reader::join_c_conditions): New method decl. (fprint_c_condition): Convert to... (rtx_reader::fprint_c_condition): ...member function. (print_c_condition): Convert to... (rtx_reader::print_c_condition): ...member function. (rtx_reader::apply_iterator_to_string): New method decl. (rtx_reader::copy_rtx_for_iterators): New method decl. (rtx_reader::read_conditions): New method decl. (rtx_reader::record_potential_iterator_use): New method decl. (rtx_reader::read_mapping): New method decl. (rtx_reader::read_rtx): New method decl. (rtx_reader::read_rtx_code): New method decl. (rtx_reader::read_rtx_operand): New method decl. (rtx_reader::read_nested_rtx): New method decl. (rtx_reader::read_rtx_variadic): New method decl. (rtx_reader::get_string_obstack): New method. (rtx_reader::get_md_constants): New method. (string_obstack): Convert global variable decl to... (rtx_reader::m_string_obstack): ...this new field. (rtx_reader::m_ptr_locs): New field. (rtx_reader::m_ptr_loc_obstack): New field. (rtx_reader::m_joined_conditions): New field. (rtx_reader::m_joined_conditions_obstack): New field. (rtx_reader::m_md_constants): New field. (rtx_reader::m_enum_types): New field. * read-rtl.c (apply_iterator_to_string): Convert to... (rtx_reader::apply_iterator_to_string): ...member function. (copy_rtx_for_iterators): Convert to... (rtx_reader::copy_rtx_for_iterators): ...member function. (add_condition_to_string): Use rtx_reader_ptr for calls join_c_conditions. (apply_iterators): Use rtx_reader_ptr for calls to join_c_conditions and copy_rtx_for_iterators. (read_conditions): Convert to... (rtx_reader::read_conditions): ...member function. (record_potential_iterator_use): Convert to... (rtx_reader::record_potential_iterator_use): ...member function. (read_mapping): Convert to... (rtx_reader::read_mapping): ...member function. (read_subst_mapping): Use rtx_reader_ptr for read_string call. (read_rtx): Convert to... (rtx_reader::read_rtx): ...member function. (read_rtx_code): Convert to... (rtx_reader::read_rtx_code): ...member function. (read_rtx_operand): Convert to... (rtx_reader::read_rtx_operand): ...member function. Update for move of string_obstack to a field. (read_nested_rtx): Convert to.. (rtx_reader::read_nested_rtx): ...member function. (read_rtx_variadic): Convert to.. (rtx_reader::read_rtx_variadic): ...member function. 2016-10-18 Kugan Vivekanandarajah * tree-vrp.c (get_value_range): Check get_ptr_nonnull. 2016-10-18 Kugan Vivekanandarajah * ipa-prop.c (ipa_compute_jump_functions_for_edge): Set value range for pointer type too. (ipcp_update_vr): set_ptr_nonnull for pointer. 2016-10-18 Kugan Vivekanandarajah * tree-ssa-alias.h (pt_solution_singleton_or_null_p): Renamed from pt_solution_singleton_p. * tree-ssa-ccp.c (fold_builtin_alloca_with_align): Use renamed pt_solution_singleton_or_null_p from pt_solution_singleton_p. * tree-ssa-structalias.c (find_what_p_points_to): Preserve pointer nonnull computed by VRP. Also Conservatively set pt.null to 1. (pt_solution_reset): Conservatively set pt.null to 1. (pt_solution_singleton_or_null_p): Renamed from pt_solution_singleton_p. * tree-ssanames.h (set_ptr_nonnull): Declare. (get_ptr_nonnull): Likewise. * tree-ssanames.c (set_ptr_nonnull): New. (get_ptr_nonnull): Likewise. * tree-vrp.c (vrp_finalize): Set ptr that are nonnull. (evrp_dom_walker::before_dom_children): Likewise. 2016-10-17 Eric Botcazou * config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to... * config/i386/i386.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here. * config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to... * config/ia64/ia64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here. * config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to. * config/rs6000/rs6000.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ...here. (rs6000_option_override_internal): Clear it if ABI_AIX. * config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Move to... * config/sparc/sparc.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): ... here. 2016-10-17 Bill Schmidt * gimple-ssa-strength-reduction.c (record_increment): Remove garbage comment. 2016-10-17 Eric Botcazou * expmed.c (expand_shift_1): Add MAY_FAIL parameter and do not assert that the result is non-zero if it is true. (maybe_expand_shift): New wrapper around expand_shift_1. (emit_store_flag): Call maybe_expand_shift in lieu of expand_shift. 2016-10-17 Bill Schmidt PR tree-optimization/77916 * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge): Don't allow a MINUS_EXPR for pointer arithmetic for either known or unknown strides. (record_increment): Increments of -1 for unknown strides just use a multiply initializer like other negative values. (analyze_increments): Remove stopgap solution for -1 increment applied to pointer arithmetic. 2016-10-17 Yuri Rumyantsev * dominance.c (dom_info::dom_info): Add new constructor for region which is vector of basic blocks. (dom_init): New method to initialize members common for both constructors. (dom_info::dom_info): Invoke dom_init for partial initialization. (dom_info::get_idom): Add check to corner cases on basic blocks which are not in region. (dom_info::calc_dfs_tree): Check M_FAKE_EXIT_EDGE instead of M_REVERSE to detect unreachable bbs. (dom_info::calc_idoms): Likewise. (compute_dom_fast_query_in_region): New function. (calculate_dominance_info_for_region): Likewise. (free_dominance_info_for_region): Likewise. * dominance.h: Add prototypes for introduced region-based functions * tree-if-conv.c (build_region): New function. (if_convertible_loop_p_1): Invoke local version of post-dominators calculation before basic block predication with subsequent freeing post-dominator info. (tree_if_conversion): Remove free of post-dominator info (pass_if_conversion::execute): Delete detection of infinite loops and fake edges to exit block since post-dominator calculation is performed per if-converted loop only. 2016-10-17 Bernd Edlinger PR target/77308 * config/arm/arm.c (arm_emit_coreregs_64bit_shift): Clear the result register explicitly. * config/arm/arm.md (ashldi3, ashrdi3, lshrdi3): Don't FAIL if optimizing for size. 2016-10-17 Kyrylo Tkachov * config/aarch64/aarch64.c: Delete inclusion of cortex-a57-fma-steering.h. (aarch64_override_options): Delete call to aarch64_register_fma_steering. * config/aarch64/aarch64-protos.h (make_pass_fma_steering): Declare. * config/aarch64/cortex-a57-fma-steering.h: Delete. * config/aarch64/aarch64-passes.def: New file. * config/aarch64/cortex-a57-fma-steering.c (aarch64_register_fma_steering): Delete definition. (make_pass_fma_steering): Remove static qualifier. * config/aarch64/t-aarch64 (PASSES_EXTRA): New directive. (cortex-a57-fma-steering.o): Remove dependency on cortex-a57-fma-steering.h. 2016-10-17 Eric Botcazou * explow.c (validize_mem): Do not modify the argument in-place. 2016-10-17 Thomas Schwinge * tree-streamer.c (record_common_node): Explicitly list expected tree codes. 2016-10-17 Richard Biener PR tree-optimization/77988 * tree-vrp.c (remove_range_assertions): Use replace_uses_by. 2016-10-17 Marek Polacek * Makefile.in (C_COMMON_OBJS): Add c-family/c-attribs.o. 2016-10-17 Richard Biener * bb-reorder.c (reorder_basic_blocks_simple): Clear BB_VISITED before using it. 2016-10-17 Prathamesh Kulkarni PR tree-optimization/71636 * match.pd (x & ((1 << b) - 1) -> x & ~(~0 << b)): New pattern. 2016-10-17 Richard Biener * gimplify.c (gimplify_function_tree): Do not move the outer binds block. 2016-10-17 Jakub Jelinek * langhooks.h (struct lang_hooks_for_decls): Remove function_decl_explicit_p, function_decl_deleted_p and function_decl_defaulted hooks. Add decl_dwarf_attribute hook. * langhooks-def.h (lhd_decl_dwarf_attribute): Declare. (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, LANG_HOOKS_FUNCTION_DECL_DELETED_P, LANG_HOOKS_FUNCTION_DECL_DEFAULTED): Remove. (LANG_HOOKS_DECL_DWARF_ATTRIBUTE): Define. (LANG_HOOKS_DECLS): Remove LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, LANG_HOOKS_FUNCTION_DECL_DELETED_P and LANG_HOOKS_FUNCTION_DECL_DEFAULTED. Add LANG_HOOKS_DECL_DWARF_ATTRIBUTE. * langhooks.c (lhd_decl_dwarf_attribute): New function. * dwarf2out.c (gen_subprogram_die): Use lang_hooks.decls.decl_dwarf_attribute instead of lang_hooks.decls.function_decl_*. 2016-10-16 Eric Botcazou PR ada/37139 PR ada/67205 * common.opt (-ftrampolines): New option. * doc/invoke.texi (Code Gen Options): Document it. * doc/tm.texi.in (Trampolines): Add TARGET_CUSTOM_FUNCTION_DESCRIPTORS. * doc/tm.texi: Regenerate. * builtins.def: Add init_descriptor and adjust_descriptor. * builtins.c (expand_builtin_init_trampoline): Do not issue a warning on platforms with descriptors. (expand_builtin_init_descriptor): New function. (expand_builtin_adjust_descriptor): Likewise. (expand_builtin) : New case. : Likewise. * calls.c (prepare_call_address): Remove SIBCALLP parameter and add FLAGS parameter. Deal with indirect calls by descriptor and adjust. Set STATIC_CHAIN_REG_P on the static chain register, if any. (call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor. (expand_call): Likewise. Move around call to prepare_call_address and pass all flags to it. * cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR. * gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value. (gimple_call_set_by_descriptor): New setter. (gimple_call_by_descriptor_p): New getter. * gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR. (gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR. * langhooks.h (struct lang_hooks): Add custom_function_descriptors. * langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS. * rtl.h (STATIC_CHAIN_REG_P): New macro. * rtlanal.c (find_first_parameter_load): Skip static chain registers. * target.def (custom_function_descriptors): New POD hook. * tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR. (CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR. * tree-core.h (ECF_BY_DESCRIPTOR): New mask. Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR. * tree.c (make_node_stat) : Use FUNCTION_ALIGNMENT. (build_common_builtin_nodes): Initialize init_descriptor and adjust_descriptor. * tree-nested.c: Include target.h. (struct nesting_info): Add 'any_descr_created' field. (get_descriptor_type): New function. (lookup_element_for_decl): New function extracted from... (create_field_for_decl): Likewise. (lookup_tramp_for_decl): ...here. Adjust. (lookup_descr_for_decl): New function. (convert_tramp_reference_op): Deal with descriptors. (build_init_call_stmt): New function extracted from... (finalize_nesting_tree_1): ...here. Adjust and deal with descriptors. * defaults.h (FUNCTION_ALIGNMENT): Define. (TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY. * config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define. * config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise. * config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS):Likewise. * config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise. 2016-10-16 Eric Botcazou * config/sparc/sparc.c (sparc_expand_vector_init): Only accept literal constants in CONST_VECTORs. 2016-10-15 Eric Botcazou * config/sparc/sparc.c (sparc_expand_vec_perm_bmask): Use a scratch register as destination of bmask. (vector_init_bshuffle): Likewise. * config/sparc/sparc.md (vec_perm_constv8qi): Likewise. (bmaskdi_vis): Enable only in 64-bit mode. 2016-10-15 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_get_separate_components): Do not make LR a separately shrink-wrapped component unless savres_strategy contains all of {SAVE,REST}_INLINE_{GPRS,FPRS,VRS}. Do not wrap GPRs unless both {SAVE,REST}_INLINE_GPRS. Do not disallow all wrapping when not both {SAVE,REST}_INLINE_GPRS. 2016-10-15 Eric Botcazou * optabs.c (expand_parity): Fix mode mismatch, add final conversion and keep looping on failure. 2016-10-14 David Malcolm * print-rtl-function.c (print_edge): Omit "(flags)" when none are set. (print_rtx_function): Update example in comment for... * print-rtl.c (print_rtx_operand_code_r): In compact mode, print non-virtual pseudos with a '%' sigil followed by the regno, offset by (LAST_VIRTUAL_REGISTER + 1), so that the first non-virtual pseudo is dumped as "%0". 2016-10-14 Jakub Jelinek PR middle-end/77959 * expr.c (expand_expr_real_1) : For EXPAND_WRITE return a MEM. 2016-10-14 Eric Botcazou * config/sparc/sparc-passes.def: New file. * config/sparc/t-sparc (PASSES_EXTRA): Add sparc-passes.def. * config/sparc/sparc-protos.h (make_pass_work_around_errata): New. * config/sparc/sparc.c (sparc_option_override): Don't register passes. 2016-10-14 Pat Haugen * loop-unroll.c (unroll_loop_runtime_iterations): Condition initial loop peel to loops with exit test at the beginning. 2016-10-14 Pat Haugen PR rtl-optimization/68212 * cfgloopmanip.c (duplicate_loop_to_header_edge): Use preheader edge frequency when computing scale factor for peeled copies. * loop-unroll.c (unroll_loop_runtime_iterations): Fix freq/count values for switch/peel blocks/edges. 2016-10-14 Pedro Alves * coretypes.h (OVERRIDE, FINAL): Delete, moved to include/ansidecl.h. 2016-10-14 Catherine Moore * config/mips/mips.c (mips_prepare_pch_save): Initialize micromips_globals to zero. 2016-10-14 Richard Biener PR tree-optimization/77979 * tree-vrp.c (compare_name_with_value): Handle released SSA names in the equivalency sets. (compare_names): Likewise. 2016-10-14 Martin Liska * builtins.h(target_char_cst_p): Declare the function. * builtins.c (fold_builtin_memchr): Remove. (target_char_cst_p): Move the function from gimple-fold.c. (fold_builtin_3): Do not call the function. * gimple-fold.c (gimple_fold_builtin_memchr): New function. (gimple_fold_builtin): Call the function. * fold-const-call.c (fold_const_call_1): Handle CFN_BUILT_IN_MEMCHR. 2016-10-14 Martin Liska * builtins.c (fold_builtin_strcmp): Remove function. (fold_builtin_strncmp): Likewise. (fold_builtin_2): Remove call of the function. (fold_builtin_3): Likewise. * fold-const-call.c (fold_const_call): Add constant folding for CFN_BUILT_IN_STRCASECMP and CFN_BUILT_IN_STRNCASECMP. * fold-const-call.h (build_cmp_result): Declare the function. * gimple-fold.c (gimple_load_first_char): New function. (gimple_fold_builtin_string_compare): Likewise. (gimple_fold_builtin): Call the function. 2016-10-14 Nathan Sidwell * gcov-io.c (gcov_open): Deconstify 'mode'. 2016-10-14 Martin Liska * fold-const.c (c_getstr): Support of properly \0-terminated string constants. New argument is added. * fold-const.h: New argument is added. 2016-10-14 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): New function. (aarch64_print_hint_for_core): Likewise. (aarch64_print_hint_for_arch): Likewise. (aarch64_validate_march): Use it. Fix indentation in type signature. (aarch64_validate_mcpu): Use aarch64_print_hint_for_core_or_arch. (aarch64_validate_mtune): Likewise. (aarch64_handle_attr_arch): Likewise. (aarch64_handle_attr_cpu): Likewise. (aarch64_handle_attr_tune): Likewise. 2016-10-14 Prathamesh Kulkarni * optabs.def: Remove optab function gen_int_libfunc for sdivmod_optab and udivmod_optab. 2016-10-13 Andreas Schwab * config/m68k/m68k.c (m68k_option_override): Check opt_fstack_limit_symbol_arg and opt_fstack_limit_register_no instead of stack_limit_rtx. 2016-10-13 Jakub Jelinek * dwarf2out.c (gen_member_die): Handle inline static data member definitions. 2016-10-13 Nathan Sidwell * gcov-io.c (gcov_open): Fix documentation. Simplify setting gcov_var.mode. Remove unnecessary fstat. 2016-10-13 Segher Boessenkool PR bootstrap/77962 * function.c (thread_prologue_and_epilogue_insns): Call all make_*logue_seq in the same order as traditional. Call them all a second time if shrink_wrapped_separate. 2016-10-13 Marek Polacek * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn, insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Don't use -Wno-error. 2016-10-13 Bill Schmidt PR tree-optimization/77937 * gimple-ssa-strength-reduction.c (analyze_increments): Set cost to infinite when we have a pointer with an increment of -1. 2016-10-13 Thomas Preud'homme * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h 2016-10-13 David Malcolm * function-tests.c (selftest::test_expansion_to_rtl): Add "true" for new "compact" param of print_rtx_function. Check for "cinsn" rather than "insn". * print-rtl-function.c (flag_compact): New decl. (print_rtx_function): Add param "compact" and use it to set flag_compact, adding a description of the effect to the leading comment, and updating the example output. * print-rtl.c (flag_compact): New variable. (print_rtx_operand_code_0): Omit the JUMP_LABEL reference in compact mode. (print_rtx_operand_code_i): When printing source locations, wrap xloc.file in quotes. Don't print INSN_CODEs in compact mode. (print_rtx_operand_code_r): Don't print regnos for hard regs and virtuals in compact mode. (print_rtx_operand_code_u): Don't print insn UIDs in compact mode, apart from in LABEL_REFs. (print_rtx_operand): In case 'w', don't print in hex in compact mode. Don't print basic block ids in compact mode. (print_rtx): In compact mode, prefix the code of insns with "c", only print the INSN_UID of CODE_LABELs, and omit their LABEL_NUSES. * print-rtl.h (print_rtx_function): Add "compact" param. 2016-10-13 Richard Earnshaw * arm.h (TARGET_VFP): Delete. (TARGET_VFPD32): Remove references to TARGET_VFP. (TARGET_VFP3, TARGET_VFP5): Likewise. (TARGET_VFP_SINGLE, TARGET_VFP_DOUBLE): Likewise. (TARGET_NEON_FP16): Likewise. (TARGET_FMA): Likewise. (TARGET_CRYPTO): Likewise. (TARGET_NEON): Likewise. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (FUNCTION_ARG_REGNO_P): Likewise. * arm.c (arm_option_check_internal): Likewise. (arm_option_override): Likewise. (use_return_insn): Likewise. (arm_function_value_regno_p): Likewise. (arm_apply_result_size): Likewise. (use_vfp_abi): Likewise. (arm_legitimate_address_outer_p): Likewise. (thumb2_legitimate_address_p): Likewise. (arm_legitimate_index_p): Likewise. (thumb2_legitimate_index_p): Likewise. (arm_legitimate_address): Likewise. (arm_get_vfp_saved_size): Likewise. (arm_emit_vfp_multi_reg_pop): Likewise. (arm_get_frame_offsets): Likewise. (arm_save_coproc_regs): Likewise. (arm_hard_regno_mode_ok): Likewise. (arm_expand_epilogue_apcs_frame): Likewise. (arm_expand_epilogue): Likewise. (arm_file_start): Likewise. (arm_conditional_register_usage): Likewise. (arm_validize_comparison): Use vfp_compare_operand directly. * arm-builtins.c (arm_init_builtins): Remove references to TARGET_VFP. (arm_expand_vfp_builtin): Use TARGET_HARD_FLOAT for detecting unsupported usage. (arm_atomic_assign_expand_fenv): Likewise. * arm.md (divsf3): Likewise. (arm_negsi2): Likewise. (absdf2): Likewise. (arm_movdi): Likewise. (arm_movt): Likewise. (cbranchsf4): Change predicate to vfp_compare_operand. (cbranchdf4): Change predicate to vfp_compare_operand. (cstorehf4): Change predicate to vfp_compare_operand. (cstoresf4): Change predicate to vfp_compare_operand. (cstoredf4): Change predicate to vfp_compare_operand. (vfp_pop_multiple_with_writeback): Remove references to TARGET_VFP. (movhi_insn_arch4, movhi_bytes): Likewise. * constraints.md (Dt): Likewise. (Dp): Likewise. * iterators.md (SDF): Likewise. * predicates.md (arm_float_compare_operand): Delete. (const_double_vcvt_power_of_two_reciprocal): Remove references to TARGET_VFP. (const_double_vcvt_power_of_two): Likewise. * thumb2.md thumb2_movsi_insn): Likewise. * vfp.md (arm_movhi_vfp, thumb2_movhi_vfp): Likewise. (movhf_vfp): Likewise. (arm_movsi_vfp, thumb2_movsi_vfp): Likewise. (movdi_vfp, movdi_vfp_cortexa8): Likewise. (movsf_vfp, thumb2_movsf_vfp): Likewise. (movdf_vfp, thumb2_movdf_vfp): Likewise. (movsfcc_vfp, abssf2_vfp, negsf2_vfp, addsf3_vfp): Likewise. (subsf3_vfp, divsf3_vfp): Likewise. (mulsf3_vfp, mulsf3negsf_vfp, negmulsf3_vfp): Likewise. (mulsf3addsf_vfp, (mulsf3subsf_vfp, mulsf3negsfaddsf_vfp): Likewise. (mulsf3negsfsubsf_vfp): Likewise. (truncsisf2_vfp, fixuns_truncsfsi2, floatsisf2_vfp): Likewise. (floatunssisf2, sqrtsf2_vfp): Likewise. (movcc_vfp): Likewise. (cmpsf_split_vfp, cmpsf_trap_split_vfp): Likewise. (cmpsf_vfp, cmpsf_trap_vfp): Likewise. (push_multi_vfp): Likewise. (set_fpscr, get_fpscr): Likewise. * arm-c.c (arm_cpu_builtins): Unconditionally define __VFP_FP__. 2016-10-13 Richard Earnshaw * arm.h (TARGET_VFP): Unconditionally define to 1. (arm_fpu_desc): Remove 'model' field. (TARGET_FPU_MODEL): Delete. * arm.c (all_fpus): Don't initialize the model field. (arm_can_inline_p): Don't check the FPU model. * arm-fpus.def: Remove redundant model field from all FPU descriptions. 2016-10-13 Richard Biener PR middle-end/77826 * genmatch.c (struct capture): Add value_match member. (commutate): Preserve value_match. (lower_opt_convert): Likewise. (lower_cond): Likewise. (replace_id): Likewise. (struct dt_operand): Add value_match member. (decision_tree::cmp_node): Compare it. (decision_tree::insert_operand): Honor it when finding and when appending a DT_MATCH. (dt_operand::gen_match_op): Generate a type check after operand_equal_p if ! value_match for both GENERIC and GIMPLE. (parser::get_internal_capture_id): New helper. (parser::finish_match_operand): New function lowering @@. (parser::parse_capture): Parse @@ as value-match. (parser::parse_expr): Use get_internal_capture_id. (parser::parse_simplify): Call finish_match_operand. (walk_captures): New helper. * match.pd (X - (X / Y) * Y -> X % Y): Use value-matching instead of operand_equal_p. ((X /[ex] A) * A -> X): Likewise. ((X | Y) ^ X -> Y & ~ X): Handle constants properly by using convert[12] and value-matching. ((A | B) & (A | C) -> A | (B & C)): Likewise. ((X | Y) | Y -> X | Y): Likewise. ((X ^ Y) ^ Y -> X): Likewise. (A - (A & B) -> ~B & A): Likewise. ((T)(P + A) - (T)P -> (T) A): Likewise. ((T)P - (T)(P + A) -> -(T) A): Likewise. ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Likewise. * doc/match-and-simplify.texi: Amend capture section. 2016-10-13 Claudiu Zissulescu * config/arc/arc.md (umul_600): Remove predicated variant. (umul64_600): Likewise. 2016-10-13 Claudiu Zissulescu * config/arc/arc.h (INSN_LENGTH_ALIGNMENT): Change. 2016-10-13 Bin Cheng * tree-vect-loop.c (loop_niters_no_overflow): New func. (vect_transform_loop): Call loop_niters_no_overflow. Pass the no-overflow information to vect_do_peeling_for_loop_bound and vect_gen_vector_loop_niters. 2016-10-13 Bin Cheng * tree-predcom.c (tree_predictive_commoning_loop): Skip loop that only iterates 1 time. 2016-10-13 Bin Cheng * tree-vect-loop-manip.c (adjust_vec_debug_stmts): Don't release adjust_vec automatically. (slpeel_add_loop_guard): Remove param cond_expr_stmt_list. Rename param exit_bb to guard_to. (slpeel_checking_verify_cfg_after_peeling): (set_prologue_iterations): (create_lcssa_for_virtual_phi): New func which is factored out from slpeel_tree_peel_loop_to_edge. (slpeel_tree_peel_loop_to_edge): (iv_phi_p): New func. (vect_can_advance_ivs_p): Call iv_phi_p. (vect_update_ivs_after_vectorizer): Call iv_phi_p. Directly insert new gimple stmts in basic block. (vect_gen_niters_for_prolog_loop): Rename to... (vect_gen_prolog_loop_niters): ...Rename from. Change parameters and adjust implementation. (vect_update_inits_of_drs): Fix code style issue. Convert niters to sizetype if necessary. (vect_build_loop_niters): Move to here from tree-vect-loop.c. Change it to external function. (vect_gen_scalar_loop_niters, vect_gen_vector_loop_niters): New. (vect_gen_vector_loop_niters_mult_vf): New. (slpeel_update_phi_nodes_for_loops): New. (slpeel_update_phi_nodes_for_guard1): Reimplement. (find_guard_arg, slpeel_update_phi_nodes_for_guard2): Reimplement. (slpeel_update_phi_nodes_for_lcssa, vect_do_peeling): New. * tree-vect-loop.c (vect_build_loop_niters): Move to file tree-vect-loop-manip.c (vect_generate_tmps_on_preheader): Delete. (vect_transform_loop): Rename vectorization_factor to vf. Call vect_do_peeling instead of vect_do_peeling-* functions. * tree-vectorizer.h (vect_do_peeling): New decl. (vect_build_loop_niters, vect_gen_vector_loop_niters): New decls. (vect_do_peeling_for_loop_bound): Delete. (vect_do_peeling_for_alignment): Delete. 2016-10-13 Bin Cheng * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Put duplicated loop after its preheader and after the original loop. 2016-10-13 Bin Cheng * tree-vect-loop.c (vect_analyze_loop_2): Check and skip loop if it has no enough iterations for LOOP_VINFO_PEELING_FOR_GAPS. 2016-10-13 Bin Cheng * tree-vect-loop.c (vectorizable_live_operation): Support handling for live variable outside loop but not in lcssa form. 2016-10-13 Bin Cheng * cfg.c (reset_original_copy_tables): New func. * cfg.h (reset_original_copy_tables): New decl. 2016-10-13 Jakub Jelinek PR c/77946 * tree.h (FALLTHROUGH_LABEL_P): Use private_flag instead of public_flag. * varasm.c (default_binds_local_p_3): Formatting fix. 2016-10-13 Bin Cheng * tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue. (vect_do_peeling_for_loop_bound, vect_do_peeling_for_alignment): Remove useless code. 2016-10-13 Martin Liska PR tree-optimization/77943 * tree-ssa-tail-merge.c (merge_stmts_p): Do not merge BBs with a different EH landing pads. 2016-10-13 Jakub Jelinek PR target/77957 * hooks.h (hook_tree_void_null): Declare. * hooks.c (hook_tree_void_null): New function. * langhooks.c (lhd_return_null_tree_v): Remove. * langhooks-def.h (lhd_return_null_tree_v): Remove. * cfgexpand.c (stack_protect_prologue): If guard_decl is NULL, set y to const0_rtx. * function.c (stack_protect_epilogue): Likewise. * config/tilepro/tilepro.c (TARGET_STACK_PROTECT_GUARD): Redefine if TARGET_THREAD_SSP_OFFSET is defined. * config/s390/s390.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/sparc/sparc.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/tilegx/tilegx.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/i386/i386.c (TARGET_STACK_PROTECT_GUARD): Likewise. (ix86_stack_protect_guard): New function. 2016-10-13 Richard Biener * dwarf2out.c (tree_add_const_value_attribute): Do not try rtl_for_decl_init during early phase. (gen_variable_die): Do not create locations during early phase. (gen_label_die): Likewise. (decls_for_scope): Do not waste time handling BLOCK_NONLOCALIZED_VARs twice. 2016-10-12 Richard Biener * tree-vrp.c (evrp_dom_walker::try_find_new_range): Renamed from try_add_new_range and made to eturn new range. (evrp_dom_walker::before_dom_children): Push op1 value range before pushing op0 value range. 2016-10-12 Bill Schmidt PR tree-optimization/77937 * gimple-ssa-strength-reduction.c (analyze_increments): Use POINTER_TYPE_P on the candidate type to determine whether candidates in this chain require pointer arithmetic. 2016-10-12 Eric Botcazou * config/visium/visium.c (visium_gimplify_va_arg): Emit a big-endian correction if the type is smaller than a word. (visium_select_cc_mode): Add ... fall through ... comment. 2016-10-12 Segher Boessenkool * config/rs6000/rs6000.c (machine_function): Add new fields gpr_is_wrapped_separately and lr_is_wrapped_separately. (TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS, TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB, TARGET_SHRINK_WRAP_DISQUALIFY_COMPONENTS, TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS, TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS, TARGET_SHRINK_WRAP_SET_HANDLED_COMPONENTS): Define. (rs6000_get_separate_components): New function. (rs6000_components_for_bb): New function. (rs6000_disqualify_components): New function. (rs6000_emit_prologue_components): New function. (rs6000_emit_epilogue_components): New function. (rs6000_set_handled_components): New function. (rs6000_emit_prologue): Don't emit LR save if lr_is_wrapped_separately. Don't emit GPR saves if gpr_is_wrapped_separately for that register. (restore_saved_lr): Don't restore LR if lr_is_wrapped_separately. (rs6000_emit_epilogue): Don't emit GPR restores if gpr_is_wrapped_separately for that register. Don't make a REG_CFA_RESTORE note for registers we did not restore, either. 2016-10-12 Segher Boessenkool * function.c (thread_prologue_and_epilogue_insns): Call try_shrink_wrapping_separate. Compute the prologue_seq afterwards, if it has possibly changed. Compute the split_prologue_seq and epilogue_seq later, too. * shrink-wrap.c: #include cfgbuild.h and insn-config.h. (dump_components): New function. (struct sw): New struct. (SW): New function. (init_separate_shrink_wrap): New function. (fini_separate_shrink_wrap): New function. (place_prologue_for_one_component): New function. (spread_components): New function. (disqualify_problematic_components): New function. (emit_common_heads_for_components): New function. (emit_common_tails_for_components): New function. (insert_prologue_epilogue_for_components): New function. (try_shrink_wrapping_separate): New function. * shrink-wrap.h: Declare try_shrink_wrapping_separate. 2016-10-12 Segher Boessenkool * regrename.c (build_def_use): Invalidate chains that have a REG_CFA_RESTORE on some instruction. 2016-10-12 Segher Boessenkool * dce.c (delete_unmarked_insns): Don't delete instructions with a REG_CFA_RESTORE note. 2016-10-12 Segher Boessenkool * common.opt (-fshrink-wrap-separate): New flag. * doc/invoke.texi: Document it. * doc/tm.texi.in (Shrink-wrapping separate components): New subsection. * doc/tm.texi: Regenerate. * emit-rtl.h (struct rtl_data): New field shrink_wrapped_separate. * target.def (shrink_wrap): New hook vector. (get_separate_components, components_for_bb, disqualify_components, emit_prologue_components, emit_epilogue_components, set_handled_components): New hooks. 2016-10-12 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_return_in_memory): Warn for vector return by reference only if -Wpsabi. (rs6000_pass_by_reference): Similarly, for argument passing. 2016-10-12 David Malcolm * function-tests.c: Include "print-rtl.h". (selftest::test_expansion_to_rtl): Call print_rtx_function on the function, and verify what is dumped. * print-rtl-function.c (print_edge): New function. (begin_any_block): New function. (end_any_block): New function. (can_have_basic_block_p): New function. (print_rtx_function): Track the basic blocks of insns in the chain, wrapping those that are within blocks within "(block)" directives. Remove the "(cfg)" directive. 2016-10-12 David Malcolm * selftest.c (selftest::read_file): New function. (selftest::test_read_file): New function. (selftest::selftest_c_tests): Call test_read_file. * selftest.h (selftest::read_file): New decl. 2016-10-12 Richard Biener PR debug/77947 * cgraphunit.c (analyze_functions): Preserve cgraph nodes function context. 2016-10-12 Thomas Schwinge * lto-streamer.c: Fix LTO_STREAMER_DEBUG build. * dwarf2out.c (dwarf2_lineno_debug_hooks): Use dwarf2out_assembly_start. * Makefile.in (SELFTEST_FLAGS): Add -nostdinc. * Makefile.in (SELFTEST_FLAGS): New variable. (s-selftest, selftest-gdb, selftest-valgrind): Use it. * vmsdbgout.c (vmsdbg_debug_hooks): Add filename parameter to early_finish hook. 2016-10-12 Georg-Johann Lay * rtl.h (struct rtx_def): Comment how RTX_FLAGS will be dumped in RTL dumps. 2016-10-12 Martin Liska * gimple-fold.c (create_tmp_reg_or_ssa_name): New function. (gimple_fold_builtin_memory_op): Use the function. (gimple_fold_builtin_strchr): Likewise. (gimple_fold_builtin_strcat): Likewise. (gimple_build): Likewise. 2016-10-12 Nathan Sidwell * diagnostic.c (diagnostc_report_diagnostic): Fix formatting. 2016-10-12 Pierre-Marie de Rodat * dwarf2out.c (int_loc_descriptor): Generate opcodes for another equivalent 32-bit constant (modulo 2**32) when that yields smaller instructions. (size_of_int_loc_descriptor): Update accordingly. 2016-10-12 Pierre-Marie de Rodat * dwarf2out.c (dwarf2out_early_global_decl): For nested functions, call dwarf2out_decl on the parent function first. 2016-10-12 Richard Biener * match.pd ((X /[ex] A) * A -> X): Remove unnecessary constraint on the conversion. 2016-10-12 Richard Biener * tree-ssa-propagate.c (substitute_and_fold_dom_walker::before_dom_children): Do not ignore ASSERT_EXPRs but only preserve them. * tree-vrp.c (remove_range_assertions): Deal with ASSERT_EXPRs that have been propagated into. (vrp_finalize): Enable DCE for substitute_and_fold. 2016-10-12 Richard Biener PR tree-optimization/77920 * tree-vrp.c (simplify_div_or_mod_using_ranges): Simplify. (simplify_min_or_max_using_ranges): Pass in gsi and use it. (simplify_abs_using_ranges): Likewise. (simplify_conversion_using_ranges): Likewise. (simplify_stmt_using_ranges): Adjust. 2016-10-12 Jakub Jelinek PR tree-optimization/77929 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle (*ops)[ranges[i].idx]->op != ranges[i].exp case. 2016-10-12 Aaron Sawdey PR target/77934 * config/rs6000/vmx.md (vsx_concat_): The mtvsrdd instruction needs a base register for arg 1. 2016-10-12 Jakub Jelinek * common.opt (Wimplicit-fallthrough) Turn into alias to -Wimplicit-fallthrough=3. Remove EnabledBy. (Wimplicit-fallthrough=): New option. * gimplify.c (warn_implicit_fallthrough_r): Use OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough. * doc/invoke.texi (-Wimplicit-fallthrough): Document as alias to -Wimplicit-fallthrough=3. (-Wimplicit-fallthrough=): Document. 2016-10-11 Eric Botcazou * config/sparc/sparc.c (emit_scc_insn): Remove direct support for EQ and GEU in DImode if TARGET_SUBXC. * config/sparc/sparc.md (seqdi_zero): Remove TARGET_SUBXC. (seqdi_zero_subxc): Delete. (neg_seqdi_zero): Remove TARGET_VIS3. (neg_seqdi_zero_vis3): Delete. (plus_seqdi_zero): Likewise. (minus_seqdi_zero): Likewise. (plus_plus_sltu): Accept only register. (addx): Likewise. (plus_sltu_vis3): Likewise. (plus_plus_sltu_vis3): Likewise. (neg_sgeu_vis3): Delete. (minus_sgeu_vis3): Likewise. (addxc): Accept only registers. (neg_sltu_subxc): Write %%g0 instead of 0. (minus_neg_sltu_subxc): Accept only register. (neg_plus_sltu_subxc): Likewise. (minus_sltu_subxc): Write %%g0 instead of 0. (minus_minus_sltu_subxc): Accept only register. (sgeu_insn_subxc): Delete. (plus_sgeu_subxc): Likewise. (subxc): Accept only register. (scc splitter): Split always GEU again. 2016-10-11 Jeff Law PR tree-optimization/77424 * tree-ssa-threadupdate.c (thread_through_all_blocks): Remove dead conditionals. Assert that all e->aux fields are NULL. 2016-10-11 David Malcolm * print-rtl.c (print_rtx): Rename "i" to "idx". Split out the operand-printing "switch" statement into... (print_rtx_operand_code_0): ...this new function, ... (print_rtx_operand_code_e): ...this new function, ... (print_rtx_operand_codes_E_and_V): ...this new function, ... (print_rtx_operand_code_i): ...this new function, ... (print_rtx_operand_code_r): ...this new function, ... (print_rtx_operand_code_u): ...this new function, ... (print_rtx_operand): ...and this new function. 2016-10-11 Uros Bizjak * config/alpha/alpha-passes.def: New file. * config/alpha/t-alpha: New file. * config/alpha/alpha-protos.h (gcc::context, rtl_opt_pass): Declare. (make_pass_handle_trap_shadows): New prototype. (make_pass_align_insns): Ditto. * config/alpha/alpha.c (alpha_option_override): Don't register passes here. * config.gcc (alpha*-*-*) Add alpha/t-alpha to tmake_file. 2016-10-11 Michael Meissner PR target/77924 * config/rs6000/rs6000.c (rs6000_init_builtins): Only create the distinct __ibm128 IBM extended double type if long doubles are 128-bits and the default format for long double is IEEE 128-bit. 2016-10-11 Richard Biener * dwarf2out.c (DEBUG_STR_OFFSETS_SECTION): Remove conditional. (init_sections_and_labels): Use DEBUG_DWO_STR_OFFSETS_SECTION. (verify_die): New function. (dwarf2out_finish): Call it. (output_line_info): Handle case of -gsplit-dwarf without DWARF2_ASM_LINE_DEBUG_INFO. 2016-10-11 Richard Biener PR debug/77931 * gimple-low.c (lower_gimple_bind): Handle arbitrary common sub-chains of BLOCK_VARS and gimple_bind_vars. 2016-10-11 Venkataramanan Kumar * config/i386/znver1.md : Fix imov/imovx load type reservations. 2016-10-11 Eric Botcazou * config/sparc/sparc.opt (msubxc): New option. * doc/invoke.texi (SPARC options): Document it and tidy up. * doc/tm.texi.in (Condition Codes): Adjust SPARC example. * doc/tm.texi: Regenerate. * config/sparc/sparc-modes.def (CC_NOOV): Rename into... (CCNZ): ...this. (CCX_NOOV): Rename into... (CCXNZ): ...this. (CCC): New. (CCXC): Likewise. * config/sparc/predicates.m (fcc_register_operand): Simplify. (fcc0_register_operand): Likewise. (icc_register_operand): New. (icc_or_fcc_register_operand): Simplify. (nz_comparison_operator): New. (c_comparison_operator): Likewise. (noov_compare_operator): Rename into... (icc_comparison_operator): ...this. Use above predicates. (noov_compare64_operator): Rename into... (v9_comparison_operator): ...this and tidy up. (fcc_comparison_operator): New. (icc_or_fcc_comparison_operator): Likewise. (v9_register_compare_operator): Rename info... (v9_register_comparison_operator): ...this. * config/sparc/sparc.c (TARGET_FIXED_CONDITION_CODE_REGS): Define. (sparc_option_override): Remove redundant VIS masks and add MASK_SUBXC for Niagara-7. (sparc_fixed_condition_code_regs): New function. (select_cc_mode): Remove ATTRIBUTE_UNUSED. Adjust for CCNZ/CCXNZ renaming and add support for CCC/CCXC. (output_cbranch): Likewise. (sparc_print_operand): Likewise. (gen_v9_scc): Remove obsolete assertion. (emit_scc_insn): Emit RTL directly for EQ and NE. Add direct support for EQ in DImode if TARGET_SUBXC. Remove test on TARGET_VIS3 for GEU. (output_cbcond): Remove bogus handling of CC modes. (sparc_register_move_cost): Return 100 for NO_REGS. * config/sparc/sparc.md (W): New mode iterator. (length): Adjust for noov_compare64_operator renaming. (cmpsi_sne): New instruction. (cmpdi_sne): Likewise. (seqdi_special): Delete. (seqdi_special): Likewise. (snesi_special): Likewise. (snedi_special): Likewise. (snedi_special_vis3): Likewise. (snesi patterns): Use W iterator. (snedi patterns): Likewise. Add TARGET_SUBXC patterns. (sltu patterns): Likewise. (sgeu patterns): Likewise. (scc splitter): Do not split GEU in DImode if TARGET_SUBXC. (normal_branch): Use icc_comparison_operator predicate. (inverted_branch): Likewise. (cbcond_sp32): Use comparison_operator predicate. (cbcond_sp64): Likewise. (normal_int_branch_sp64): Adjust for renaming (inverted_int_branch_sp64): Likewise. (mov_cc_reg_sp64): Likewise. (movsf_cc_reg_sp6): Likewise. (movdf_cc_reg_sp64): Likewise. (movtf_cc_reg_hq_sp64): Likewise. (movtf_cc_reg_sp64): Likewise. (mov_cc_v9): Use icc_or_fcc_comparison_operator predicate. (movsf_cc_v9): Likewise. (movdf_cc_v9): Likewise. (movtf_cc_hq_v9): Likewise. (movtf_cc_v9): Likewise. (adddi3): Call gen_adddi3_sp32. (adddi3_insn_sp32): Rename to... (adddi3_sp32): ...this. Accept only register_operand as operand #1 and use CCCmode for the carry. (addx_extend_sp32): Use CCCmode for the carry. (addx_extend_sp64): Delete. (adddi3_extend_sp32): Use CCCmode for the carry. (cmp_plus patterns): Use CCNZ/CCXNZ mode and add C variants. (subdi3): Call gen_subdi3_sp32. (subdi3_insn_sp32): Rename to... (subdi3_sp32): ...this and use CCmode for the carry. (subx_extend_sp32): Use CCCmode for the carry. (subx_extend_sp64): Delete. (subdi3_extend_sp32): Use CCmode for the carry. (cmp_minus patterns): Use CCNZ/CCXNZ mode and add C variants. (negdi3): Call gen_negdi3_sp32. (negdi3_sp32): Use CCCmode for the carry. (cmp_neg patterns): Use CCNZ/CCXNZ mode and add C variants. (cmp_nz_ashift_1): Use CCNZ mode. (cmp_nz_set_ashift_1): Likewise. (ctrapsi4): Use comparison_operator predicate. (ctrapdi4): Likewise. (trapsi_insn): Use icc_comparison_operator predicate. (trapdi_insn): Likewise. (edge8 patterns): Use CCNZmode. (edge16 patterns): Likewise. (edge32 patterns): Likewise. 2016-10-11 Eric Botcazou * config/visium/visium-modes.def (CC_NOOV): Rename into... (CCNZ): ...this. (CC_BTST): Rename into... (CCC): ...this. * config/visium/predicates.md (real_add_operand): New. (visium_btst_operator): Rename into... (visium_equality_comparison_operator): ...this. (visium_noov_operator): Rename into... (visium_nz_comparison_operator): ...this. (visium_c_comparison_operator): New. (visium_branch_operator): Adjust and deal with all CC modes. * config/visium/visium.c (visium_adjust_cost): Adjust. (visium_split_double_add): Use the *_set_carry patterns. (visium_select_cc_mode): Add support for CCC mode and adjust. (output_cbranch): Adjust and use the carry-based operators for floating-point comparisons. * config/visium/visium.md (flags_subst_arith): Adjust. (addsi3_insn_set_carry): New instruction. (subsi3_insn_set_carry): Likewise. (negsi2_insn_set_carry): Likewise. (btst): Adjust. (cmp_sne): Likewise. (cbranch4): Use ordered_comparison_operator. (cbranch4_insn): Likewise. (cbranchsi4_btst_insn): Adjust. 2016-10-11 Tom de Vries PR middle-end/77558 * builtins.c (std_canonical_va_list_type): Remove RECORD_TYPE special-casing. 2016-10-11 Eric Botcazou * tree.h (build_complex_type): Add second parameter with default. * tree.c (build_complex_type): Add NAMED second parameter and adjust recursive call. Create a TYPE_DECL only if NAMED is true. (build_common_tree_nodes): Pass true in calls to build_complex_type. 2016-10-11 Georg-Johann Lay New avr-passes.def to register AVR specific passes. * config/avr/avr-passes.def: New file. * config/avr/t-avr (PASSES_EXTRA): Add avr-passes.def. * config/avr/avr-protos.h (gcc::context, rtl_opt_pass): Declare. (make_avr_pass_recompute_note): New proto. * config/avr/avr.c (make_avr_pass_recompute_notes): New function. (avr_pass_recompute_notes): Use anonymous namespace. (avr_register_passes): Remove function... (avr_option_override): ...and its call. 2016-10-11 Robert Suchanek * config/mips/mips-cpus.def: Replace PTF_AVOID_BRANCHLIKELY with PTF_AVOID_BRANCHLIKELY_ALWAYS for generic architecture and with PTF_AVOID_BRANCHLIKELY_SPEED for others. (mips2, mips3, mips4): Add PTF_AVOID_BRANCHLIKELY_SIZE to tune flags. * config/mips/mips.c (mips_option_override): Enable the branch likely depending on the tune flags and optimization level. * config/mips/mips.h (PTF_AVOID_BRANCHLIKELY): Remove. (PTF_AVOID_BRANCHLIKELY_SPEED): Define. (PTF_AVOID_BRANCHLIKELY_SIZE): Likewise. (PTF_AVOID_BRANCHLIKELY_ALWAYS): Likewise. 2016-10-11 Richard Biener * lto-streamer-out.c (collect_block_tree_leafs): New helper. (output_function): Properly stream the whole block tree. * lto-streamer-in.c (input_function): Likewise. 2016-10-11 Marek Polacek * Makefile.in (C_COMMON_OBJS): Add c-family/c-warn.o. 2016-10-11 Kugan Vivekanandarajah * tree-vrp.c (evrp_dom_walker::try_add_new_range): New. (evrp_dom_walker::before_dom_children): Infer and push new value ranges for x in y < x. 2016-10-10 Joseph Myers PR target/77586 * config/ia64/ia64.c (ia64_libgcc_floating_mode_supported_p) (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove. * config/ia64/elf.h (IA64_NO_LIBGCC_TFMODE): Likewise. * config/ia64/freebsd.h (IA64_NO_LIBGCC_TFMODE): Likewise. * config/ia64/vms.h (IA64_NO_LIBGCC_XFMODE) (IA64_NO_LIBGCC_TFMODE): Likewise. 2016-10-11 Kugan Vivekanandarajah * tree-vrp.c (vrp_intersect_ranges_1): Allocate bitmap before copying. 2016-10-10 Andreas Tobler * config.gcc: Add aarch64-*-freebsd* support. * config.host: Likewise. * config/aarch64/aarch64-freebsd.h: New file. * config/aarch64/t-aarch64-freebsd: Ditto. 2016-10-10 Jeff Law PR tree-optimization/71947 * tree-ssa-dom.c (cprop_into_stmt): Avoid replacing A with B, then B with A within a single statement. 2016-10-10 Bill Schmidt PR tree-optimization/77824 * gimple-ssa-strength-reduction.c (stmt_cost): Explicitly return zero cost for copies. (find_candidates_dom_walker::before_dom_children): Replace MODIFY_EXPR with SSA_NAME. (replace_mult_candidate): Likewise. (replace_profitable_candidates): Likewise. 2016-10-10 Andreas Krebbel * config/s390/s390.h: Wrap more macros args in brackets and fix 2016-10-10 Georg-Johann Lay * config/avr/gen-avr-mmcu-texi.c (string.h): Include. 2016-10-10 Andreas Schwab PR target/77738 * config/ia64/ia64.md ("doloop_end"): Reject if mode of loop pseudo is not DImode. 2016-10-10 Claudiu Zissulescu * common/config/arc/arc-common.c (arc_option_optimization_table): Remove compact casesi option. * config/arc/arc.c (arc_override_options): Use compact casesi option only for pre-ARCv2 cores. * doc/invoke.texi (mcompact-casesi): Update text. 2016-10-09 Aaron Sawdey * config/rs6000/rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED): Add macro to say we can efficiently handle overlapping unaligned loads. * config/rs6000/rs6000.c (expand_block_compare): Avoid generating poor code for processors older than p8. 2016-10-09 Eric Botcazou * gen-pass-instances.awk: Remove GNUism. 2016-10-09 Prathamesh Kulkarni * ipa-prop.c (ipcp_transform_function): Set fields m_vr and bits to NULL of (*ipcp_transformations)][node->uid]. 2016-10-09 John David Anglin * config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment. (MALLOC_ABI_ALIGNMENT): Define. 2016-10-09 Jakub Jelinek * tree-ssa.c (target_for_debug_bind, verify_phi_args, ssa_undefined_value_p, maybe_optimize_var): Use VAR_P and/or VAR_OR_FUNCTION_DECL_P macros. * tree-chkp.c (chkp_register_var_initializer, chkp_make_static_bounds, chkp_get_bounds_for_decl_addr, chkp_parse_array_and_component_ref, chkp_find_bounds_1): Likewise. * ipa-polymorphic-call.c (decl_maybe_in_construction_p): Likewise. * hsa-gen.c (get_symbol_for_decl): Likewise. * cgraphunit.c (check_global_declaration, analyze_functions, handle_alias_pairs, thunk_adjust, cgraph_node::expand_thunk): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p, canonicalize_constructor_val, gimple_get_virt_method_for_vtable): Likewise. * tree.c (set_decl_section_name, copy_node_stat, need_assembler_name_p, free_lang_data_in_decl, find_decls_types_r, merge_dllimport_decl_attributes, handle_dll_attribute, decl_init_priority_insert, auto_var_in_fn_p, array_at_struct_end_p, verify_type): Likewise. * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior, find_explicit_erroneous_behavior): Likewise. * sdbout.c (sdbout_toplevel_data, sdbout_late_global_decl): Likewise. * ipa.c (process_references): Likewise. * tree-chkp-opt.c (chkp_get_check_result): Likewise. * varasm.c (get_block_for_decl, use_blocks_for_decl_p, make_decl_rtl, notice_global_symbol, assemble_variable, mark_decl_referenced, build_constant_desc, output_constant_def_contents, do_assemble_alias, make_decl_one_only, default_section_type_flags, categorize_decl_for_section, default_encode_section_info): Likewise. * trans-mem.c (requires_barrier): Likewise. * gimple-expr.c (mark_addressable): Likewise. * cfgexpand.c (add_scope_conflicts_1, expand_one_var, expand_used_vars_for_block, clear_tree_used, stack_protect_decl_p, expand_debug_expr): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * ubsan.c (instrument_bool_enum_load): Likewise. * tree-pretty-print.c (print_declaration): Likewise. * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise. * tree-ssa-uninit.c (warn_uninitialized_vars): Likewise. * asan.c (asan_protect_global, instrument_derefs): Likewise. * tree-into-ssa.c (rewrite_stmt, maybe_register_def, pass_build_ssa::execute): Likewise. * var-tracking.c (var_debug_decl, track_expr_p): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost, split_address_cost): Likewise. * ipa-split.c (test_nonssa_use, consider_split, mark_nonssa_use): Likewise. * tree-inline.c (insert_debug_decl_map, remap_ssa_name, can_be_nonlocal, remap_decls, copy_debug_stmt, initialize_inlined_parameters, add_local_variables, reset_debug_binding, replace_locals_op): Likewise. * dse.c (can_escape): Likewise. * ipa-devirt.c (compare_virtual_tables, referenced_from_vtable_p): Likewise. * tree-diagnostic.c (default_tree_printer): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields, unpack_ts_decl_with_vis_value_fields, lto_input_ts_decl_common_tree_pointers): Likewise. * builtins.c (builtin_save_expr, fold_builtin_expect, readonly_data_expr): Likewise. * tree-ssa-structalias.c (new_var_info, get_constraint_for_ssa_var, create_variable_info_for, set_uids_in_ptset, visit_loadstore): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * gimplify.c (force_constant_size, gimplify_bind_expr, gimplify_decl_expr, gimplify_var_or_parm_decl, gimplify_compound_lval, gimplify_init_constructor, gimplify_modify_expr, gimplify_asm_expr, gimplify_oacc_declare, gimplify_type_sizes): Likewise. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store, pass_build_cgraph_edges::execute): Likewise. * tree-ssa-live.c (mark_all_vars_used_1, remove_unused_scope_block_p, remove_unused_locals): Likewise. * tree-ssa-alias.c (ptr_deref_may_alias_decl_p, ptrs_compare_unequal, ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise. * function.c (instantiate_expr, instantiate_decls_1, setjmp_vars_warning, add_local_decl): Likewise. * alias.c (ao_ref_from_mem, get_alias_set, compare_base_symbol_refs): Likewise. * tree-stdarg.c (find_va_list_reference, va_list_counter_struct_op, va_list_ptr_read, va_list_ptr_write, check_all_va_list_escapes, optimize_va_list_gpr_fpr_size): Likewise. * tree-nrv.c (pass_nrv::execute): Likewise. * tsan.c (instrument_expr): Likewise. * tree-ssa-dce.c (remove_dead_stmt): Likewise. * vtable-verify.c (verify_bb_vtables): Likewise. * tree-dfa.c (ssa_default_def, set_ssa_default_def, get_ref_base_and_extent): Likewise. * toplev.c (wrapup_global_declaration_1, wrapup_global_declaration_2): Likewise. * tree-sra.c (static bool constant_decl_p, find_var_candidates, analyze_all_variable_accesses): Likewise. * tree-nested.c (get_nonlocal_debug_decl, convert_nonlocal_omp_clauses, note_nonlocal_vla_type, note_nonlocal_block_vlas, convert_nonlocal_reference_stmt, get_local_debug_decl, convert_local_omp_clauses, convert_local_reference_stmt, nesting_copy_decl, remap_vla_decls): Likewise. * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Likewise. * stmt.c (decl_overlaps_hard_reg_set_p): Likewise. * dbxout.c (dbxout_late_global_decl, dbxout_type_fields, dbxout_symbol, dbxout_common_check): Likewise. * expr.c (expand_assignment, expand_expr_real_2, expand_expr_real_1, string_constant): Likewise. * hsa.c (hsa_get_declaration_name): Likewise. * passes.c (rest_of_decl_compilation): Likewise. * tree-ssanames.c (make_ssa_name_fn): Likewise. * tree-streamer-out.c (pack_ts_decl_common_value_fields, pack_ts_decl_with_vis_value_fields, write_ts_decl_common_tree_pointers): Likewise. * stor-layout.c (place_field): Likewise. * symtab.c (symtab_node::maybe_create_reference, symtab_node::verify_base, symtab_node::make_decl_local, symtab_node::copy_visibility_from, symtab_node::can_increase_alignment_p): Likewise. * dwarf2out.c (add_var_loc_to_decl, tls_mem_loc_descriptor, decl_by_reference_p, reference_to_unused, rtl_for_decl_location, fortran_common, add_location_or_const_value_attribute, add_scalar_info, add_linkage_name, set_block_abstract_flags, local_function_static, gen_variable_die, dwarf2out_late_global_decl, optimize_one_addr_into_implicit_ptr, optimize_location_into_implicit_ptr): Likewise. * gimple-low.c (record_vars_into): Likewise. * ipa-visibility.c (update_vtable_references): Likewise. * tree-ssa-address.c (fixed_address_object_p, copy_ref_info): Likewise. * lto-streamer-out.c (tree_is_indexable, get_symbol_initial_value, DFS::DFS_write_tree_body, write_symbol): Likewise. * langhooks.c (lhd_warn_unused_global_decl, lhd_set_decl_assembler_name): Likewise. * attribs.c (decl_attributes): Likewise. * except.c (output_ttype): Likewise. * varpool.c (varpool_node::get_create, ctor_for_folding, varpool_node::assemble_decl, varpool_node::create_alias): Likewise. * fold-const.c (fold_unary_loc): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge, ipa_find_agg_cst_from_init): Likewise. * omp-low.c (expand_omp_regimplify_p, expand_omp_taskreg, expand_omp_target, lower_omp_regimplify_p, grid_reg_assignment_to_local_var_p, grid_remap_prebody_decls, find_link_var_op): Likewise. * tree-chrec.c (chrec_contains_symbols): Likewise. * tree-cfg.c (verify_address, verify_expr, verify_expr_location_1, gimple_duplicate_bb, move_stmt_op, replace_block_vars_by_duplicates, execute_fixup_cfg): Likewise. PR tree-optimization/77901 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Only optimize if ranges[i].exp is SSA_NAME when looking for >= and only when ranges[i].exp is NULL or SSA_NAME when looking for the other comparison. 2016-10-09 Prathamesh Kulkarni * ipa-cp.c (ipcp_alignment_lattice): Remove. (ipcp_param_lattices): Remove field alignment. (print_all_lattices): Remove call to ipcp_alignment_lattice::print. (set_all_contains_variable): Remove call to ipcp_alignment_lattice::set_to_bottom. (initialize_node_lattices): Likewise. (propagate_alignment_accross_jump_function): Remove. (propagate_constants_accross_call): Remove call to propagate_alignment_accross_jump_function. (ipcp_store_alignment_results): Remove. (ipcp_driver): Remove call to ipcp_store_alignment_results. (propagate_bits_accross_jump_function): Handle ancestor jump function. * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Remove pretty-printing of alignment jump function. (ipa_set_jf_unknown): Remove assignment to jfunc->alignment.known. (ipa_compute_jump_functions_for_edge): Adjust ipa_bits jump function for alignments and remove computing ipa_alignment jump function. (ipa_node_params_t::duplicate): Remove copying of src_trans->alignments. (ipa_write_jump_functions): Remove streaming for ipa_alignment. (ipa_read_jump_function): Remove reading of ipa_alignment. (write_ipcp_transformation_info): Remove streaming for alignment propagation summary. (read_ipcp_transformation_info): Remove reading of alignment propagation summary. (ipcp_update_alignments): Remove. (ipcp_update_bits): Adjust to set alignment for parameters of pointer type. (ipcp_transform_function): Remove call to ipcp_update_alignments() and remove assignment to (*ipcp_transformations)[node->uid].alignments. * ipa-prop.h (ipa_alignment): Remove. (ipa_jump_func): Remove field alignment. (ipcp_transformation_summary): Remove field alignments. * doc/invoke.texi: Mark fipa-cp-alignment as obsolete. * opts.c (default_options_table): Remove entry for fipa-cp-alignment. (enable_fdo_optimizations): Remove checking for fipa-cp-alignment. 2016-10-08 Eric Botcazou * config/sparc/sparc.h (FIXED_REGISTERS): Add %icc. * config/visium/visium.c (visium_expand_int_cstore): Revert latest change. (visium_expand_fp_cstore): Likewise. 2016-10-08 Prathamesh Kulkarni * diagnostic-core.h (warning_at_rich_loc_n): Declare. * diagnostic.c (warning_at_rich_loc_n): New function. (diagnostic_n_impl_richloc): Likewise. (diagnostic_n_impl): Move most of the function to diagnostic_n_impl_richloc and call it. 2016-10-08 Jakub Jelinek * gen-pass-instances.awk: Rewritten. * Makefile.in (pass-instances.def): Depend on $(PASSES_EXTRA), pass $(PASSES_EXTRA) after passes.def to the script. * config/i386/t-i386 (PASSES_EXTRA): Add i386-passes.def. * config/i386/i386-passes.def: New file. * config/i386/i386-protos.h (make_pass_insert_vzeroupper, make_pass_stv): Declare. * config/i386/i386.c (pass_stv::pass_stv): Initialize timode_p to false. (pass_stv::gate): Depending on timode_p member require TARGET_64BIT or !TARGET_64BIT. (pass_stv::clone, pass_stv::set_pass_param): New methods. (pass_stv::timode_p): New non-static data member. (ix86_option_override): Don't register passes here. * doc/invoke.texi: Document accepting Else, fallthrough. * doc/invoke.texi (-Wimplicit-fallthrough): Document FALLTHRU comment style changes. * doc/invoke.texi (-Wimplicit-fallthrough): Document the accepted FALLTHRU comment styles. 2016-10-07 Andrew Pinski * config/aarch64/aarch64-arches.def (AARCH64_ARCH): #undef at the end. * config/aarch64/aarch64-cores.def (AARCH64_CORE): Likewise. * config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR): Likewise. * config/aarch64/aarch64-option-extensions.def (AARCH64_OPT_EXTENSION): Likewise. * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Likewise. * config/aarch64/aarch64-opts.h (AARCH64_CORE): Don't #undef here. (AARCH64_ARCH): Likewise. * common/config/aarch64/aarch64-common.c (AARCH64_OPT_EXTENSION): Likewise. (AARCH64_CORE): Likewise. (AARCH64_ARCH): Likewise. * config/aarch64/aarch64-protos.h (AARCH64_FUSION_PAIR): Likewise. (AARCH64_EXTRA_TUNING_OPTION): Likewise. * config/aarch64/aarch64.c (AARCH64_FUION_PAIR): Likewise. (AARCH64_EXTRA_TUNING_OPTION): Likewise. (AARCH64_ARCH): Likewise. (AARCH64_CORE): Likewise. * config/aarch64/aarch64.h (AARCH64_CORE): Likewise. * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Likewise. (AARCH64_CORE): Likewise. (AARCH64_ARCH): Likewise. 2016-10-06 Michael Meissner * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Split -mfloat128 into -mfloat128-type that enables the IEEE 128-bit floating point type infrastructre, and -mfloat128 that enables the keyword. Define __FLOAT128__ if -mfloat128, and __FLOAT128_TYPE__ if -mfloat128-type. Define __ibm128 to be long double by default. * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print whether the IEEE 128-bit floating point type infrastructure should automatically be enabled. (rs6000_init_hard_regno_mode_ok): Switch to use -mfloat128-type instead of -mfloat128 to enable KFmode. (rs6000_option_override_internal): Split the option -mfloat128 into -mfloat128-type and -mfloat128. On Linux PowerPC 64-bit systems, automatically set -mfloat128-type, but don't enable it on other operating systems. Move setting the long double size and IEEE quad support before the IEEE 128-bit floating point changes. (rs6000_init_builtins): Do not create a unique type for __ibm128 if long double is IBM extended double, instead rely on __ibm128 being defined as 'long double'. If -mfloat128-type and not -mfloat128, create the KFmode type with an undocumented __ieee128 keyword. (rs6000_init_libfuncs): Use -mfloat128-type instead of -mfloat128 for tests about the types, but keep tests for -mfloat128 to enable the keyword support. (rs6000_complex_function_value): Likewise. (rs6000_scalar_mode_supported_p): Likewise. (rs6000_floatn_mode): Likewise. (rs6000_c_mode_for_suffix): Likewise. (rs6000_opt_masks): Add -mfloat128-type. * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Add support for -mfloat128-type being split from -mfloat128. Add -mfloat128-hardware, which was missing. * config/rs6000/rs6000.opt (-mfloat128): Split -mfloat128 into -mfloat128 and -mfloat128-type: (-mfloat128-type): Likewise. * config/rs6000/linux64.h (TARGET_FLOAT128_ENABLE_TYPE): Define so that 64-bit Linux systems with enable -mfloat128-type by default on VSX systems. * config/rs6000/rs6000.h (TARGET_FLOAT128_ENABLE_TYPE): Likewise. (FLOAT128_VECTOR_P): Switch IEEE 128-bit floating points to use -mfloat128-type instead of -mfloat128. (FLOAT128_2REG_P): Likewise. (MASK_FLOAT128_TYPE): Likewise. (ALTIVEC_ARG_MAX_RETURN): Likewise. (RS6000_BTM_FLOAT128): Likewise. (TARGET_FLOAT128): Poison old identifiers. (OPTION_MASK_FLOAT128): Likewise. (MASK_FLOAT128): Likewise. * config/rs6000/rs6000.md (FP): Likewise. (FLOAT128): Likewise. (fix_truncdi2): Likewise. (fixuns_trunc2): Likewise. (floatdi2): Likewise. (floatuns2): Likewise. (neg2, FLOAT128 iterator): Likewise. (abs2, FLOAT128 iterator): Likewise. (ieee_128bit_negative_zero): Likewise. (ieee_128bit_vsx_neg2): Likewise. (ieee_128bit_vsx_neg2_internal): Likewise. (ieee_128bit_vsx_abs2): Likewise. (ieee_128bit_vsx_abs2_internal): Likewise. (ieee_128bit_vsx_nabs2): Likewise. (ieee_128bit_vsx_nabs2_internal): Likewise. (extendiftf2): Likewise. (extendifkf2): Likewise. (extendtfkf2): Likewise. (trunciftf2): Likewise. (truncifkf2): Likewise. (trunckftf2): Likewise. (trunctfif2): Likewise. (extendkftf2): Likewise. (trunctfkf2): Likewise. 2016-10-07 Kyrylo Tkachov * simplify-rtx.c (simplify_immed_subreg): Zero-initialize tmp array before merging in bytes to pass down to real_from_target. 2016-10-07 Richard Biener * tree-ssa-propagate.c (replace_phi_args_in): Remove no longer required hack. (substitute_and_fold_dom_walker::before_dom_children): Substitute and fold before pass specific folding to avoid feeding that with SSA names that will be later released. * tree-ssa-ccp.c (get_value_for_expr): Guard for new SSA names introduced by folding and visited by evaluate_stmt called during ccp_fold_stmt. (likely_value): Likewise. (evaluate_stmt): Likewise. * tree-vrp.c (simplify_truth_ops_using_ranges): Fold modified stmt. (simplify_div_or_mod_using_ranges): Likewise. (simplify_min_or_max_using_ranges): Likewise. (simplify_abs_using_ranges): Likewise. (simplify_conversion_using_ranges): Likewise. (simplify_float_conversion_using_ranges): Likewise. (simplify_stmt_using_ranges): Likewise. 2016-10-07 Marek Polacek * gimplify.c (should_warn_for_implicit_fallthrough): Check for FALLTHROUGH_LABEL_P here... (warn_implicit_fallthrough_r): ...not here. 2016-10-07 Bernd Schmidt PR tree-optimization/77880 * expr.c (by_pieces_ninsns): Use unsigned HOST_WIDE_INT where necessary. 2016-10-07 Marek Polacek PR c++/77803 * gimplify.c (last_stmt_in_scope): Add check for FALLTHROUGH (). 2016-10-07 Richard Biener * bitmap.h: Document constraints on bitmap modification while iterating over it. 2016-10-07 Richard Biener * bitmap.c (bitmap_elem_to_freelist): Set indx to -1. * bitmap.h (bmp_iter_set): When advancing to the next element check that we didn't remove the current one. (bmp_iter_and): Likewise. (bmp_iter_and_compl): Likewise. * tree-ssa.c (release_defs_bitset): Do not remove worklist bit we currently iterate on but keep a one-level queue. * sched-deps.c (remove_from_deps): Do not clear current bit but keep a one-level queue. 2016-10-07 Jakub Jelinek PR tree-optimization/77664 * tree-ssa-reassoc.c (update_range_test): Also clear low and high for the other ranges. (optimize_range_tests_diff): Fix up formatting. (optimize_range_tests_var_bound): New function. (optimize_range_tests): Use it. 2016-10-07 Martin Liska * coverage.c (build_gcov_exit_decl): Fix priority what should be really 99. 2016-10-07 Richard Biener * gimple-low.c (lower_gimple_bind): Clear DECL_CHAIN of vars in gimple_bind_vars but not in BLOCK_VARS. 2016-10-07 Richard Biener PR tree-optimization/77879 * tree-ssa-structalias.c (handle_const_call): Properly handle NRV return slots. (handle_pure_call): Likewise. 2016-10-06 Aaron Sawdey * config/rs6000/rs6000.c (rs6000_elf_asm_out_constructor) (rs6000_elf_asm_out_destructor): increase size of buf to avoid possible overflow. 2016-10-06 Andrew Pinski * config/aarch64/aarch64-cores.def: Add a comment before each set of cores. 2016-10-06 Kugan Vivekanandarajah PR tree-optimization/77862 * tree-vrp.c (add_equivalence): Use get_value_range so that num_vr_values is checked before accessing vr_values. 2016-10-06 Kugan Vivekanandarajah * tree-vrp.c (evrp_dom_walker::before_dom_children): Handle POINTER_TYPE_P. 2016-10-05 Jeff Law PR tree-optimization/71661 * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Handle case when removal of a forwarder exposes a new natural loop. 2016-10-06 Uros Bizjak * config/i386/sse.md (andnot3): Add FALLTHRU comments. Introduce ssesuffix variable. (3): Ditto. (*3): Ditto. 2016-10-06 Jan Hubicka * postreload.c (reload_cse_simplify): Skip also USE when detecting noop move. 2016-10-06 Richard Biener PR tree-optimization/77855 * tree-ssa-pre.c (prune_clobbered_mems): Queue exprs to remove instead of removing the current item while iterating over the set which is not safe. 2016-10-06 James Clarke Eric Botcazou PR target/77759 * config/sparc/sparc.c (classify_data_t): Remove int_regs field. (classify_registers): Don't set it (function_arg_slotno): Don't initialize and test it. Tidy up. 2016-10-06 Richard Biener PR tree-optimization/77839 * tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value lattice transition. 2016-10-06 Martin Liska * gcc.c: Set -fprofile-update=atomic when profiling is enabled and -pthread is set. Warn when one combines -pthread and -fprofile-update=single for an app using profiling code. 2016-10-06 Martin Liska PR bootstrap/77788 * expmed.h (mul_highpart_cost_ptr): Add an gcc_assert. * gimple-ssa-strength-reduction.c (slsr_process_cast): Initialize a pointer to NULL. (slsr_process_copy): Likewise. * input.c (location_get_source_line): Likewise. * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise. 2016-10-05 Andrew Senkevich * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCOMMIT_UNSET, OPTION_MASK_ISA_PCOMMIT_SET): Deleted definitions. (ix86_handle_option): Deleted handle of OPT_mpcommit. * config.gcc: Deleted pcommitintrin.h * config/i386/pcommitintrin.h: Deleted file. * config/i386/cpuid.h (bit_PCOMMIT): Deleted. * config/i386/driver-i386.c (host_detect_local_cpu): Deleted pcommit detection. * config/i386/i386-c.c (ix86_target_macros_internal): Deleted define __PCOMMIT__. * config/i386/i386.c (ix86_target_string): Deleted -mpcommit. (PTA_PCOMMIT): Deleted define. (ix86_option_override_internal): Deleted handle of option. (ix86_valid_target_attribute_inner_p): Deleted pcommit. * config/i386/i386-builtin.def (IX86_BUILTIN_PCOMMIT, __builtin_ia32_pcommit): Deleted. * config/i386/i386.h (TARGET_PCOMMIT, TARGET_PCOMMIT_P): Deleted. * config/i386/i386.md (unspecv): Deleted UNSPECV_PCOMMIT. (pcommit): Deleted instruction. * config/i386/i386.opt: Mention -mpcommit deprecation. * config/i386/x86intrin.h: Deleted inclusion of pcommitintrin.h. 2016-10-05 Uros Bizjak PR target/77874 * config/i386/sse.md (3): Remove wrong assert. (float2: Use as operand 1 constraint. 2016-10-05 Jakub Jelinek PR sanitizer/66343 * ubsan.c (ubsan_create_data): Call initialize_sanitizer_builtins here. (ubsan_instrument_float_cast): And not here. PR sanitizer/66343 * ubsan.c (ubsan_ids): New GTY(()) array. (ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids instead of static local counters. 2016-10-05 Martin Sebor PR bootstrap/77819 * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define macro. * config/linux.c (gnu_libc_printf_pointer_format): Remove. * targhooks.c [DEFAULT_LIBC == LIBC_UCLIBC) && SINGLE_LIBC] (default_printf_pointer_format): Define function. * targhooks.c (linux_printf_pointer_format): Define new function. * targhooks.h (linux_printf_pointer_format): Declare. (gnu_libc_printf_pointer_format): Remove declaration. 2016-10-05 Kyrylo Tkachov * fold-const.c (native_encode_real): Fix logic for selecting offset to write to when BYTES_BIG_ENDIAN. 2016-10-05 Wilco Dijkstra * builtins.c (fold_builtin_strchr): Remove function. (fold_builtin_strrchr): Likewise. (fold_builtin2): Remove strchr, index, strrchr, rindex cases. * gimple-fold.c (target_char_cst_p): New function. (gimple_fold_builtin_strchr) Add more foldings. (gimple_fold_builtin): Add index, strrchr, rindex cases. 2016-10-05 Richard Biener PR middle-end/77863 * genmatch.c (capture_info::walk_c_expr): Diagnose unknown capture ids in c-exprs. 2016-10-05 Richard Biener PR middle-end/77826 * genmatch.c (dt_operand::gen_match_op): Amend operand_equal_p with types_match for GIMPLE code gen to handle type mismatched constants properly. (dt_operand::gen): Adjust. * match.pd ((X /[ex] A) * A -> X): Properly handle converted and constant A. 2016-10-05 Richard Biener * match.pd (copysign(x, CST) -> [-]abs (x)): New pattern. 2016-10-05 Richard Biener PR middle-end/77842 * genmatch.c (parser::parse_c_expr): Handle premature EOF. 2016-10-05 Pierre-Marie de Rodat * dwarf2out.c (dwarf2out_imported_module_or_decl): Move DWARF version check to protect only DW_TAG_imported_module generation. 2016-10-05 Richard Biener PR middle-end/55152 * match.pd (min(a,-a) -> -abs(a)): New pattern. 2016-10-04 Ian Lance Taylor * explow.c (allocate_dynamic_stack_space): Call do_pending_stack_adjust before handling flag_split_stack. 2016-10-04 David Malcolm * genattrtab.c (make_internal_attr): Supply dummy column number to file_location ctor. (main): Likewise. * genoutput.c (init_insn_for_nothing): Likewise. * gensupport.c (add_define_attr): Likewise. * read-md.c (message_at_1): Print column number. (fatal_with_file_and_line): Likewise. (rtx_reader::read_char): Track column numbers. (rtx_reader::unread_char): Likewise. (rtx_reader::rtx_reader): Initialize m_read_md_colno. (rtx_reader::handle_include): Stash and restore m_read_md_colno. (rtx_reader::handle_file): Initialize m_read_md_colno. (rtx_reader::get_current_location): Supply column number to file_location ctor. * read-md.h (struct file_location): Add field "colno". (file_location::file_location): Likewise. (rtx_reader::get_colno): New accessor. (rtx_reader::m_read_md_colno): New field. (rtx_reader::m_last_line_colno): New field. 2016-10-04 Jakub Jelinek * doc/extend.texi (Java Exceptions): Remove. (java_interface): Remove. 2016-10-04 Doug Gilmore PR tree-optimization/77808 * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Check base_addr and addr are different before copying points-to information. 2016-10-04 Uros Bizjak * config/i386/x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove. * config/i386/i386.h (TARGET_VECTORIZE_DOUBLE): Remove. * config/i386/i386.c (ix86_add_stmt_cost): Use TARGET_BONNEL instead of !TARGET_VECTORIZE_DOUBLE when penalizing DFmode vector ops. 2016-10-04 Richard Biener PR tree-optimization/77399 * tree-ssa-forwprop.c (simplify_vector_constructor): Properly verify the target can convert. 2016-10-04 Richard Biener PR middle-end/77833 * explow.c (plus_constant): Verify the mode of the constant pool offset before calling plus_constant. 2016-10-04 Richard Biener PR middle-end/77407 * match.pd (X / abs (X) -> X < 0 ? -1 : 1): Drop vector type support, mark with :C. (X / -X -> -1): Mark with :C. 2016-10-04 Jakub Jelinek * defaults.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Remove. * system.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Poison. * doc/tm.texi.in (TARGET_USE_JCR_SECTION): Remove. * doc/tm.texi: Regenerated. * config/i386/mingw32.h (TARGET_USE_JCR_SECTION): Remove. * config/i386/cygming.h (TARGET_USE_JCR_SECTION): Remove. * config/darwin.h (JCR_SECTION_NAME): Remove. * config/pa/pa64-hpux.h (JCR_SECTION_NAME): Remove. * config/rs6000/aix71.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix51.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix52.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix53.h (TARGET_USE_JCR_SECTION): Remove. * config/rs6000/aix61.h (TARGET_USE_JCR_SECTION): Remove. 2016-10-03 Prathamesh Kulkarni * ipa-cp.c (propagate_bits_accross_jump_function): Introduce space between "because" and "param" in dump message in call to fprintf. 2016-10-03 Jeff Law PR tree-optimization/71550 PR tree-optimization/71403 * tree-ssa-threadbackward.c: Include tree-vectorizer.h (profitable_jump_thread_path): Also return boolean indicating if the realized path will create an irreducible loop. Remove loop depth tests from 71403. (fsm_find_control_statement_thread_paths): Remove loop depth tests from 71403. If threading will create an irreducible loop, then throw away loop iteration and related information. 2016-10-03 Uros Bizjak * configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning options. * configure: Regenerate. 2016-10-03 Bernd Edlinger PR preprocessor/77699 * input.c (maybe_grow): Don't allocate one byte extra headroom. (get_next_line): Return false on error. (read_next_line): Removed, use get_next_line instead. (read_line_num): Don't copy the line. (location_get_source_line): Don't use static data. (selftest::test_reading_source_line): Add more test cases. 2016-10-03 Kyrylo Tkachov Revert 2016-09-30 Kyrylo Tkachov * ifcvt.c (noce_try_avoid_const_materialization): New function. (noce_process_if_block): Use it. 2016-10-03 Bernd Edlinger * doc/invoke.texi: Update -Wint-in-bool-context. 2016-10-02 Jakub Jelinek * dwarf2out.c (output_fde, output_call_frame_info, dwarf2out_do_cfi_startproc, set_indirect_string, gen_internal_sym, output_die, output_line_info): Use MAX_ARTIFICIAL_LABEL_BYTES as char array sizes for ASM_GENERATE_INTERNAL_LABEL output. 2016-10-01 Richard Biener PR middle-end/77798 * genmatch.c (get_operand_type): Add operand position arg and handle COND_EXPR comparison operand with fixed boolean_type_node. (expr::gen_transform): Adjust. (dt_simplify::gen_1): Likewise. 2016-10-01 Jakub Jelinek * config/i386/sse.md (): Add FALLTHRU comments. Simplify asserts, remove unnecessary conditions. Formatting fixes. (*3): Likewise. 2016-09-30 Jakub Jelinek * doc/invoke.texi (-Wregister): Document. 2016-09-30 Bernd Edlinger * configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING. * configure: Regenerated. * config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING. * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING. 2016-09-30 Prasad Ghangal PR other/31566 * gcc.c (process_command): For @filename handling, output the correct name if the file does not exist. 2016-09-30 Marek Polacek * config/aarch64/aarch64-simd.md: Adjust fall through comments. * config/alpha/predicates.md: Likewise. 2016-09-30 Kyrylo Tkachov * ifcvt.c (noce_try_avoid_const_materialization): New function. (noce_process_if_block): Use it. 2016-09-30 Martin Liska * doc/invoke.texi: Document asan-use-after-return that it's disabled by default in runtime. 2016-09-30 Richard Biener * tree-vrp.c (intersect_ranges): If we failed to handle the intersection choose a constant singleton range if available. 2016-09-30 Richard Biener PR tree-optimization/77399 * tree-ssa-forwprop.c (simplify_vector_constructor): Handle float <-> int conversions. 2016-09-30 Alan Modra * config/rs6000/rs6000.c (rs6000_opt_vars): Revert last change. 2016-09-29 Uros Bizjak * config/i386/driver-i386.c (host_detect_local_cpu): Check maximum ext_level before calling CPUID with 0x80000008. Simplify xgetbv checks. 2016-09-29 David Malcolm * Makefile.in (OBJS): Add print-rtl-function.o. * print-rtl-function.c: New file. * print-rtl.h (print_rtx_function): New decl. 2016-09-29 Uros Bizjak PR target/77756 * config/i386/cpuid.h (__get_cpuid_count): New. (__get_cpuid): Rename __level to __leaf. 2016-09-29 Marek Polacek * genattrtab.c (write_attr_case): Also emit FALLTHRU marker. 2016-09-29 Bernd Schmidt PR target/77718 * builtins.c (expand_builtin_memcmp): Don't swap args unless result is only being compared with zero. 2016-09-29 Marek Polacek * dwarf2out.c (loc_descriptor): Add fall through comment. (add_const_value_attribute): Likewise. 2016-09-29 Matthew Wahab * config/arm/arm.md (*arm_movsi_insn): Replace "t2" arch attribute with "v6t2". Move "arch" attribute above "pool_range". * config/arm/vfp.md (*arm_movhi_vfp): Replace "t2" arch attribute with "v6t2". (*thumb2_movhi_vfp): Likewise. (*arm_movhi_fp16): Likewise. (*thumb2_movhi_fp16): Likewise. (*arm_movsi_vfp): Remove "arch" attribute. (*thumb2_movsi_vfp): Likewise. 2016-09-29 Martin Liska * doc/extend.texi: Remove limitation of Objective C for __attribute__((constructor)) and __attribute__((destructor)). 2016-09-29 Richard Biener PR tree-optimization/77768 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Handle stores to readonly memory when removing redundant stores. 2016-09-29 Richard Biener PR middle-end/77407 * match.pd: Add X / abs (X) -> X < 0 ? -1 : 1 and X / -X -> -1 simplifications. 2016-09-29 Richard Biener PR middle-end/55152 * match.pd: Add max(a,-a) -> abs(a) pattern. * tree-ssa-phiopt.c (minmax_replacement): Disable for HONOR_SIGNED_ZEROS types. 2016-09-29 James Greenhalgh * defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Remove. * system.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Poison. 2016-09-29 Richard Biener * tree-vrp.c (set_defs_to_varying): New helper avoiding writing to vr_const_varying. (vrp_initialize): Call it. (vrp_visit_stmt): Likewise. (evrp_dom_walker::before_dom_children): Likewise. 2016-09-29 Richard Biener * tree-vect-stmts.c (vectorizable_load): Avoid emitting vector constructors with vector elements. 2016-09-29 Richard Biener PR tree-optimization/77768 * tree-ssa-sccvn.c (visit_reference_op_store): Properly deal with stores to a place we know has a constant value. 2016-09-29 Alan Modra * config/rs6000/sysv4.opt (mgnu-attribute): New option. * doc/invoke.texi: Document it. * config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define. (rs6000_passes_float): Comment. (rs6000_passes_long_double): New static var. (call_ABI_of_interest): Return false unless rs6000_gnu_attr is set. (init_cumulative_args): Set up to emit fp .gnu_attribute for ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float to include fp values returned in vectors. Set rs6000_passes_long_double. (rs6000_function_arg_advance_1): Likewise for function args. (rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs, and SPE. Emit long double tag value too. (rs6000_opt_vars): Add gnu-attr. * configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test. * configure: Regenerate. * config.in: Regenerate. 2016-09-28 Jakub Jelinek * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead of 0 < x. (format_floating, format_string, format_directive, get_destination_size, pass_sprintf_length::handle_gimple_call): Likewise. 2016-09-28 Jakub Jelinek * gimple-ssa-sprintf.c: Fix comment formatting. (format_integer): Use is_gimple_assign. (pass_sprintf_length::handle_gimple_call): Use gimple_call_builtin_p and gimple_call_fndecl. Reorder case BUILT_IN_SPRINTF_CHK. Fix up BUILT_IN_SNPRINTF_CHK comment. Replace "to to" with "to" in comment. (pass_sprintf_length::execute): Use is_gimple_call. 2016-09-28 Wilco Dijkstra * gimple-fold.c (gimple_fold_builtin): After failing to fold strchr, also try the generic folding. 2016-09-28 Martin Sebor PR c/77762 * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Fix typos. 2016-09-28 Martin Sebor PR middle-end/77683 * gimple-ssa-sprintf.c (format_integer): Fail gracefully when length modifier is not expected. (format_floating): Ignore l length modifier and fail gracefuly when it isn't one of the other expected ones. 2016-09-28 Martin Sebor PR bootstrap/77753 * varasm.c (assemble_addr_to_section): Increase local buffer size. 2016-09-27 Richard Biener * dwarf2out.c (cu_die_list): New global. (dwarf2out_finish): Walk cu_die_list instead of limbo DIEs. Add main_comp_unit_die to cu_die_list if we created it. Move break_out_includes ... (dwarf2out_early_finish): ... here. Push created CU DIEs onto the cu_die_list. 2016-09-28 Richard Biener * dwarf2out.c (struct die_struct): Add removed flag. (lookup_type_die): If the DIE is marked as removed, clear TYPE_SYMTAB_DIE and return NULL. (lookup_decl_die): If the DIE is marked as removed, remove it from the hash and return NULL. (mark_removed): New helper. (prune_unused_types_prune): Call it for removed DIEs. (gen_subprogram_die): Move the premark_used_types call to after DIEs for the functions scopes are generated. (process_scope_var): Do not re-create pruned types or type decls. Make sure to also re-parent type decls. (dwarf2out_finish): Move unused type pruning and debug_types handling ... (dwarf2out_early_finish): ... here. 2016-09-29 Claudiu Zissulescu * config/arc/arc-c.c: New file. * config/arc/arc-c.def: Likewise. * config/arc/t-arc: Likewise. * config.gcc: Include arc-c.o as c and cpp object. * config/arc/arc-protos.h (arc_cpu_cpp_builtins): Add prototype. * config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): Use arc_cpu_cpp_builtins. 2016-09-29 Claudiu Zissulescu * config/arc/arc.md (*rotrsi3_cnt1): New pattern. (*ashlsi2_cnt1, *lshrsi3_cnt1, *ashrsi3_cnt1): Likewise. 2016-09-28 Nathan Sidwell * gimple-pretty-print.c (dump_gimple_call_args): Simplify "' " printing. 2016-09-28 Wilco Dijkstra PR tree-optimization/61056 * gimple-fold.c (gimple_fold_builtin_strchr): New function to optimize strchr (s, 0) to strlen. (gimple_fold_builtin): Add BUILT_IN_STRCHR case. 2016-09-27 Robin Dapp PR tree-optimization/77724 * tree-vect-loop-manip.c (create_intersect_range_checks_index): Add tree_fits_shwi_p check. 2016-09-27 Jakub Jelinek * auto-inc-dec.c (try_merge): Remove break after return. * cselib.c (autoinc_split): Likewise. * explow.c (promote_mode): Likewise. * fixed-value.c (fixed_arithmetic): Likewise. * hsa.c (hsa_internal_fn::get_arity): Likewise. * rtlanal.c (modified_between_p, modified_in_p): Likewise. * trans-mem.c (get_attrs_for): Likewise. * tree-if-conv.c (if_convertible_stmt_p): Likewise. * tree-vrp.c (simplify_stmt_using_ranges): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_fold_builtin): Likewise. * config/aarch64/aarch64.c (aarch64_get_condition_code_1): Likewise. * config/c6x/c6x.c (c6x_get_unit_specifier): Likewise. * config/cr16/cr16.c (legitimate_pic_operand_p): Likewise. * config/cris/cris.c (cris_op_str): Likewise. * config/mn10300/mn10300.c (cc_flags_for_code): Likewise. * config/tilepro/tilepro.c (tilepro_emit_setcc_internal_di): Likewise. 2016-09-27 Nathan Sidwell * internal-fn.h (IFN_UNIQUE_CODES, IFN_GOACC_LOOP_CODES, IFN_GOACC_REDUCTION_CODES): New. (enum ifn_unique_kind, enum ifn_goacc_loop_kind, enum ifn_goacc_reduction_kind): Use them. * gimple-pretty-print.c (dump_gimple_call_args): Decode first arg of internal functions, when applicable. 2016-09-27 Maciej W. Rozycki * config/mips/constraints.md (d): Fix documentation. * doc/md.texi (Machine Constraints): Update accordingly. 2016-09-27 Richard Biener * dwarf2out.c (dwarf2out_init): Move text_section_line_info, cur_line_info_table initialization ... (dwarf2out_assembly_start): ... here. 2016-09-27 Matthew Wahab * config/arm/arm.md (*arm_movsi_insn): Add "arch" attribute. * config/arm/vfp.md (*arm_movhi_vfp): Likewise. (*thumb2_movhi_vfp): Likewise. (*arm_movhi_fp16): Remove predication operand from VMOV.F16 template. Expand predicable attribute to mark VMOV.F16 as not predicable. Add "arch" attribute. (*thumb2_movhi_fp16): Likewise. (*arm_movsi_vfp): Break a long line. Add "arch" attribute. (*thumb2_movsi_vfp): Add "arch" attribute. 2016-09-27 David Edelsohn * config/rs6000/rs6000.c (rs6000_output_symbol): Don't modify VAR_DECL string. 2016-09-27 Marek Polacek * config/ia64/ia64.c (ia64_print_operand): Adjust fall through comment. * config/c6x/c6x.h: Adjust fall through comment. * config/sh/sh.c (final_prescan_insn): Likewise. * config/visium/visium.c (visium_expand_int_cstore): Likewise. (visium_expand_fp_cstore): Likewise. 2016-09-27 Kyrylo Tkachov * config/arm/arm.c (const_ok_for_op): Use "Fall through" comment form expected by -Wimplicit-fallthrough. (thumb1_size_rtx_costs): Likewise. (thumb2_reorg): Likewise. (tls_mentioned_p): Add "Fall through" comment. (thumb2_reorg): Likewise. * config/arm/arm-builtins.c (arm_expand_neon_args): Use "Fall through" comment form expected by -Wimplicit-fallthrough. 2016-09-27 Martin Liska PR gcov-profile/46266 * input.h (RESERVED_LOCATION_P): New macro. * profile.c (branch_prob): Use RESERVED_LOCATION_P and instread of comparison with UNKNOWN_LOCATION. 2016-09-27 Richard Biener PR tree-optimization/77745 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): When removing redundant stores make sure to check compatibility of the TBAA state for downstream accesses. * tree-ssa-sccvn.c (visit_reference_op_store): Likewise for when value-numbering virtual operands for store matches. 2016-09-27 Oleg Endo PR target/51244 * config/sh/sh.c (sh_rtx_costs): Fix return value of SET of movt and movrt patterns. Match them before anything else in the SET case. 2016-09-27 Martin Liska PR gcov-profile/7970 PR gcov-profile/16855 PR gcov-profile/44779 * coverage.c (build_gcov_exit_decl): New function. (coverage_obj_init): Call the function and generate __gcov_exit destructor. * doc/gcov.texi: Document when __gcov_exit function is called. 2016-09-27 Marek Polacek PR bootstrap/77751 * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn, insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Use -Wno-error instead of -Wno-implicit-fallthrough. 2016-09-27 Martin Liska PR bootstrap/77749 * gcov-counter.def: Remove GCOV_COUNTER_V_DELTA. 2016-09-27 Jakub Jelinek * combine.c (simplify_comparison): Add canonical FALLTHROUGH comments. * config/i386/i386.c (ix86_dep_by_shift_count_body): Add FALLTHROUGH comments. Remove break after return. (ix86_fp_compare_code_to_integer, has_dispatch, ix86_simd_clone_usable): Remove break after return. 2016-09-27 Bernd Edlinger PR rlt-optimization/77714 * lra-eliminations.c (eliminate_regs_in_insn): Avoid alias on REG_EQUAL note. 2016-09-27 Kugan Vivekanandarajah PR ipa/77677 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Use extract_range_from_unary_expr to convert value_range. * tree-vrp.c (extract_range_from_unary_expr_1): Rename to. (extract_range_from_unary_expr): This. * tree-vrp.h (extract_range_from_unary_expr): Declare. 2016-09-27 Segher Boessenkool * config/rs6000/rs6000.md (movcc_internal1): Disparage using CTR or LR. 2016-09-26 Rainer Orth * config/i386/i386.c (ix86_print_operand) [HAVE_AS_IX86_CMOV_SUN_SYNTAX]: Add gcc_fallthrough. * config/sparc/sparc.c (check_pic): Add fallthrough comment. (epilogue_renumber): Likewise. 2016-09-26 Kugan Vivekanandarajah PR middle-end/77719 * tree-ssa-reassoc.c (make_new_ssa_for_def): Use gimple_get_lhs to get lhs instead of gimple_assign_lhs as stmt can be builtins too. 2016-09-26 Thomas Preud'homme * tree.h (memmodel_from_int, memmodel_base, is_mm_relaxed, is_mm_consume, is_mm_acquire, is_mm_release, is_mm_acq_rel, is_mm_seq_cst, is_mm_sync): Move to ... * memmodel.h: This. New file. * builtins.c: Include memmodel.h. * optabs.c: Likewise. * tsan.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arm/arm.c: Likewise. * config/i386/i386.c: Likewise. * config/ia64/ia64.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/sparc/sparc.c: Likewise. * genconditions.c: Include memmodel.h in generated file. * genemit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genpreds.c: Likewise. * genrecog.c: Likewise. 2016-09-26 David Malcolm * read-rtl.c (read_rtx_code): Rename local "i" to "idx", and use "c" instead when parsing characters. Move operand parsing into... (read_rtx_operand): ...this new function, renaming "i" to "idx", and tightening the scope of various locals. 2016-09-26 Liu Hao * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Fix typo. 2016-09-26 Marek Polacek * system.h: Use __has_attribute to check whether the fallthrough attribute is supported. 2016-09-26 Marek Polacek * ipa-inline-analysis.c (find_foldable_builtin_expect): Use gimple_call_internal_p. * ipa-split.c (find_return_bb): Likewise. (execute_split_functions): Likewise. * omp-low.c (dump_oacc_loop_part): Likewise. (oacc_loop_xform_head_tail): Likewise. * predict.c (predict_loops): Likewise. * sanopt.c (pass_sanopt::execute): Likewise. * tree-cfg.c (get_abnormal_succ_dispatcher): Likewise. * tree-parloops.c (oacc_entry_exit_ok_1): Likewise. * tree-stdarg.c (gimple_call_ifn_va_arg_p): Remove function. (expand_ifn_va_arg_1): Use gimple_call_internal_p. (expand_ifn_va_arg): Likewise. * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise. (optimize_mask_stores): Likewise. * tree-vect-stmts.c (vect_simd_lane_linear): Likewise. (vect_transform_stmt): Likewise. * tree-vectorizer.c (vect_loop_vectorized_call): Likewise. * tsan.c (instrument_memory_accesses): Likewise. 2016-09-26 Kyrylo Tkachov Alexander Monakov * regrename.c (rename_chains): Check HARD_FRAME_POINTER_IS_FRAME_POINTER rather than HARD_FRAME_POINTER_REGNUM when picking unavailable registers. * sel-sched.c (mark_unavailable_hard_regs): Likewise. 2016-09-26 Andreas Krebbel * config/s390/s390.c (s390_rtx_costs): Add /* fallthrough */. (s390_sched_score): Likewise. 2016-09-26 Martin Liska * doc/gcov.texi: Update program output of gcov tool. 2016-09-26 Martin Liska PR gcov-profile/23332 * profile.c (instrument_values): Do not handle HIST_TYPE_CONST_DELTA. * tree-profile.c (gimple_gen_const_delta_profiler): Remove. * value-prof.c (dump_histogram_value): Do not handle HIST_TYPE_CONST_DELTA. (stream_in_histogram_value): Likewise. (gimple_find_values_to_profile): Likewise. * value-prof.h (enum hist_type): Likewise. 2016-09-26 Martin Liska * common.opt: Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN from default sanitize recover values. * doc/invoke.texi: Fix documentation related to -fsanitize=leak, -fsanitize=address, -fsanitize=thread and -fsanitize-recover. * flag-types.h: Replace couple of 1 << x to 1UL << x, make it consistent. * opts.c (finish_options): Do a generic loop over options that can be recovered. (parse_sanitizer_options): Exclude SANITIZE_UNREACHABLE and SANITIZE_RETURN. (common_handle_option): Likewise. * opts.h: Declare can_recover to sanitizer_opts_s. 2016-09-26 Andre Vieira * target.def(elf_flags_numeric): Change documentation to present tense. * doc/tm.texi: Regenerate. 2016-09-26 Marek Polacek PR c/7652 * Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn, insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Add -Wno-switch-fallthrough. * builtins.c (expand_builtin_int_roundingfn_2): Add gcc_fallthrough. (expand_builtin): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass): Likewise. * convert.c (convert_to_real_1): Likewise. (convert_to_integer_1): Likewise. * final.c (output_alternate_entry_point): Likewise. * genattrtab.c (make_canonical): Likewise. (write_test_expr): Likewise. * genpreds.c (validate_exp): Likewise. * gimple-ssa-strength-reduction.c (find_candidates_dom_walker::before_dom_children): Likewise. * godump.c (go_format_type): Likewise. * reload1.c (elimination_effects): Likewise. * resource.c (mark_referenced_resources): Likewise. (mark_set_resources): Likewise. * tree-ssa-loop-ivopts.c (find_deriving_biv_for_expr): Likewise. * varasm.c (output_addressed_constants): Likewise. 2016-09-26 Marek Polacek PR c/7652 * common.opt (Wimplicit-fallthrough): New option. * doc/extend.texi: Document statement attributes and the fallthrough attribute. * doc/invoke.texi: Document -Wimplicit-fallthrough. * gimple.h (gimple_call_internal_p): New function. * gimplify.c (struct gimplify_ctx): Add in_switch_expr. (struct label_entry): New struct. (find_label_entry): New function. (case_label_p): New function. (collect_fallthrough_labels): New function. (last_stmt_in_scope): New function. (should_warn_for_implicit_fallthrough): New function. (warn_implicit_fallthrough_r): New function. (maybe_warn_implicit_fallthrough): New function. (expand_FALLTHROUGH_r): New function. (expand_FALLTHROUGH): New function. (gimplify_switch_expr): Call maybe_warn_implicit_fallthrough and expand_FALLTHROUGH for the innermost GIMPLE_SWITCH. (gimplify_label_expr): New function. (gimplify_case_label_expr): Set location. (gimplify_expr): Call gimplify_label_expr. * internal-fn.c (expand_FALLTHROUGH): New function. * internal-fn.def (FALLTHROUGH): New internal function. * langhooks.c (lang_GNU_OBJC): New function. * langhooks.h (lang_GNU_OBJC): Declare. * system.h (gcc_fallthrough): Define. * tree-core.h: Add FALLTHROUGH_LABEL_P comment. * tree.h (FALLTHROUGH_LABEL_P): Define. 2016-09-26 Richard Biener * dwarf2out.c (stripattributes): Remove unused function. (DEBUG_NORM_MACINFO_SECTION): Rename to DEBUG_MACINFO_SECTION. Push dwarf_split_debug_info handling into init_sections_and_labels. (DEBUG_NORM_MACRO_SECTION): Likewise to DEBUG_MACRO_SECTION. (DEBUG_MACRO_SECTION_FLAGS): Remove. (debug_macinfo_section_name): New global. (output_macinfo): Use debug_macinfo_section_name. (init_sections_and_labels): Split out section and label generation from dwarf2out_init. Set debug_macinfo_section_name. (dwarf2out_init): Move text section label generation and emission to ... (dwarf2out_assembly_start): ... here. (dwarf2out_finish): Call init_sections_and_labels before DWARF output starts. 2016-09-26 Richard Biener PR debug/77692 * cgraphunit.c (analyze_functions): Before early removing global vars calls the late_global_decl debug handler mark the variable as readonly. 2016-09-25 Oleg Endo PR target/51244 * config/sh/sh.c (sh_movt_set_dest, sh_movrt_set_dest): Add overloads. (sh_rtx_costs): Handle SET of movt and movrt patterns. * cnofig/sh/sh-protos.h (sh_movt_set_dest, sh_movrt_set_dest): Forward declare new overloads. * config/sh/sh.md (*cset_zero): Add variant that takes a treg_set_expr operand. 2016-09-24 Aaron Sawdey * config/rs6000/rs6000.c (expand_block_compare, do_load_for_compare): Change TARGET_LITTLE_ENDIAN to !BYTES_BIG_ENDIAN. 2016-09-24 David Edelsohn * configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment. * configure: Regenerate. 2016-09-24 Marek Polacek PR c/77490 * doc/invoke.texi: Document -Wbool-operation. 2016-09-23 Aaron Sawdey * config/rs6000/rs6000.md (cmpmemsi): New define_expand. * config/rs6000/rs6000.c (expand_block_compare): New function used by cmpmemsi pattern to do builtin expansion of memcmp (). (compute_current_alignment): Add helper function for expand_block_compare used to compute alignment as the compare proceeds. (select_block_compare_mode): Used by expand_block_compare to select the mode used for reading the next chunk of bytes in the compare. (do_load_for_compare): Used by expand_block_compare to emit the load insns for the compare. (rs6000_emit_dot_insn): Moved this function to avoid a forward reference from expand_block_compare (). * config/rs6000/rs6000-protos.h (expand_block_compare): Add a prototype for this function. * config/rs6000/rs6000.opt (mblock-compare-inline-limit): Add a new target option for controlling how much code inline expansion of memcmp() will be allowed to generate. 2016-09-23 Jakub Jelinek * hooks.c (hook_bool_bool_false, hook_bool_bool_gcc_optionsp_false, hook_bool_mode_false, hook_bool_mode_true, hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_const_rtx_insn_const_rtx_insn_true, hook_bool_mode_uhwi_false, hook_void_FILEptr_constcharptr, hook_bool_FILEptr_rtx_false, hook_bool_gsiptr_false, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, default_can_output_mi_thunk_no_vcall, hook_int_uint_mode_1, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_int_rtx_0, hook_int_rtx_bool_0, hook_void_tree, hook_void_constcharptr, hook_void_tree_treeptr, hook_void_int_int, hook_bool_tree_false, hook_bool_const_tree_false, hook_bool_tree_true, hook_bool_const_tree_true, hook_bool_tree_tree_false, hook_bool_tree_tree_true, hook_bool_tree_bool_false, hook_bool_rtx_insn_true, hook_bool_rtx_false, hook_bool_uintp_uintp_false, hook_bool_rtx_mode_int_int_intp_bool_false, hook_rtx_rtx_null, hook_rtx_tree_int_null, hook_uint_mode_0, hook_constcharptr_const_tree_null, hook_tree_tree_int_treep_bool_null, hook_tree_tree_tree_null, hook_tree_tree_tree_tree_null, hook_constcharptr_const_rtx_insn_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null, hook_tree_const_tree_null, hook_bool_rtx_insn_int_false, hook_void_rtx_insn_int, hook_void_gcc_optionsp): For arguments with ATTRIBUTE_UNUSED, remove parameter name as well as ATTRIBUTE_UNUSED. * vec.h (vNULL): Extend comment to say = vNULL initialization isn't needed for static vars. * sel-sched-ir.c (sel_global_bb_info, sel_region_bb_info, loop_nests, s_i_d, last_added_blocks): Remove unnecessary = vNULL initialization of file scope vec. * passes.c (pass_tab, enabled_pass_uid_range_tab, disabled_pass_uid_range_tab): Likewise. * haifa-sched.c (sched_luids, h_i_d): Likewise. * tree-chkp-opt.c (check_infos): Likewise. * sel-sched.c (vec_av_set, vec_temp_moveop_nops): Likewise. * vec.h (vnull::operator vec): Add constexpr keyword for C++11 and later. 2016-09-23 Doug Gilmore PR tree-optimization/77654 * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Add call to duplicate_ssa_name_ptr_info. 2016-09-23 David Malcolm PR preprocessor/77672 * input.c (selftest::test_lexer_string_locations_simple): Update test to expect location information of the terminator character at the location of the final closing quote. (selftest::test_lexer_string_locations_hex): Likewise. (selftest::test_lexer_string_locations_oct): Likewise. (selftest::test_lexer_string_locations_letter_escape_1): Likewise. (selftest::test_lexer_string_locations_letter_escape_2): Likewise. (selftest::test_lexer_string_locations_ucn4): Likewise. (selftest::test_lexer_string_locations_ucn8): Likewise. (selftest::test_lexer_string_locations_u8): Likewise. (selftest::test_lexer_string_locations_utf8_source): Likewise. (selftest::test_lexer_string_locations_concatenation_1): Likewise. (selftest::test_lexer_string_locations_concatenation_2): Likewise. (selftest::test_lexer_string_locations_concatenation_3): Likewise. (selftest::test_lexer_string_locations_macro): Likewise. (selftest::test_lexer_string_locations_long_line): Likewise. 2016-09-23 Richard Biener * tree-ssa-sccvn.c (visit_reference_op_call): Value number virtual definition to virtual use if the call devirtualizes to a const or pure function. (visit_use): Also visit calls we can devirtualize to a const or pure function. 2016-09-23 Richard Biener PR tree-optimization/77697 * tree-ssa-forwprop.c (defcodefor_name): Remove bogus code, signal error if we have sth ternary or unhandled. 2016-09-23 Matthew Wahab * config/arm/arm_neon.h (vabd_f16): New. (vabdq_f16): New. (vabs_f16): New. (vabsq_f16): New. (vadd_f16): New. (vaddq_f16): New. (vcage_f16): New. (vcageq_f16): New. (vcagt_f16): New. (vcagtq_f16): New. (vcale_f16): New. (vcaleq_f16): New. (vcalt_f16): New. (vcaltq_f16): New. (vceq_f16): New. (vceqq_f16): New. (vceqz_f16): New. (vceqzq_f16): New. (vcge_f16): New. (vcgeq_f16): New. (vcgez_f16): New. (vcgezq_f16): New. (vcgt_f16): New. (vcgtq_f16): New. (vcgtz_f16): New. (vcgtzq_f16): New. (vcle_f16): New. (vcleq_f16): New. (vclez_f16): New. (vclezq_f16): New. (vclt_f16): New. (vcltq_f16): New. (vcltz_f16): New. (vcltzq_f16): New. (vcvt_f16_s16): New. (vcvt_f16_u16): New. (vcvt_s16_f16): New. (vcvt_u16_f16): New. (vcvtq_f16_s16): New. (vcvtq_f16_u16): New. (vcvtq_s16_f16): New. (vcvtq_u16_f16): New. (vcvta_s16_f16): New. (vcvta_u16_f16): New. (vcvtaq_s16_f16): New. (vcvtaq_u16_f16): New. (vcvtm_s16_f16): New. (vcvtm_u16_f16): New. (vcvtmq_s16_f16): New. (vcvtmq_u16_f16): New. (vcvtn_s16_f16): New. (vcvtn_u16_f16): New. (vcvtnq_s16_f16): New. (vcvtnq_u16_f16): New. (vcvtp_s16_f16): New. (vcvtp_u16_f16): New. (vcvtpq_s16_f16): New. (vcvtpq_u16_f16): New. (vcvt_n_f16_s16): New. (vcvt_n_f16_u16): New. (vcvtq_n_f16_s16): New. (vcvtq_n_f16_u16): New. (vcvt_n_s16_f16): New. (vcvt_n_u16_f16): New. (vcvtq_n_s16_f16): New. (vcvtq_n_u16_f16): New. (vfma_f16): New. (vfmaq_f16): New. (vfms_f16): New. (vfmsq_f16): New. (vmax_f16): New. (vmaxq_f16): New. (vmaxnm_f16): New. (vmaxnmq_f16): New. (vmin_f16): New. (vminq_f16): New. (vminnm_f16): New. (vminnmq_f16): New. (vmul_f16): New. (vmul_lane_f16): New. (vmul_n_f16): New. (vmulq_f16): New. (vmulq_lane_f16): New. (vmulq_n_f16): New. (vneg_f16): New. (vnegq_f16): New. (vpadd_f16): New. (vpmax_f16): New. (vpmin_f16): New. (vrecpe_f16): New. (vrecpeq_f16): New. (vrnd_f16): New. (vrndq_f16): New. (vrnda_f16): New. (vrndaq_f16): New. (vrndm_f16): New. (vrndmq_f16): New. (vrndn_f16): New. (vrndnq_f16): New. (vrndp_f16): New. (vrndpq_f16): New. (vrndx_f16): New. (vrndxq_f16): New. (vrsqrte_f16): New. (vrsqrteq_f16): New. (vrecps_f16): New. (vrecpsq_f16): New. (vrsqrts_f16): New. (vrsqrtsq_f16): New. (vsub_f16): New. (vsubq_f16): New. 2016-09-23 Matthew Wahab * config.gcc (extra_headers): Add arm_fp16.h * config/arm/arm_fp16.h: New. * config/arm/arm_neon.h: Include "arm_fp16.h". 2016-09-23 Matthew Wahab * config/arm/arm_neon_builtins.def (vadd): New (v8hf, v4hf variants). (vmulf): New (v8hf, v4hf variants). (vfma): New (v8hf, v4hf variants). (vfms): New (v8hf, v4hf variants). (vsub): New (v8hf, v4hf variants). (vcage): New (v8hf, v4hf variants). (vcagt): New (v8hf, v4hf variants). (vcale): New (v8hf, v4hf variants). (vcalt): New (v8hf, v4hf variants). (vceq): New (v8hf, v4hf variants). (vcgt): New (v8hf, v4hf variants). (vcge): New (v8hf, v4hf variants). (vcle): New (v8hf, v4hf variants). (vclt): New (v8hf, v4hf variants). (vceqz): New (v8hf, v4hf variants). (vcgez): New (v8hf, v4hf variants). (vcgtz): New (v8hf, v4hf variants). (vcltz): New (v8hf, v4hf variants). (vclez): New (v8hf, v4hf variants). (vabd): New (v8hf, v4hf variants). (vmaxf): New (v8hf, v4hf variants). (vmaxnm): New (v8hf, v4hf variants). (vminf): New (v8hf, v4hf variants). (vminnm): New (v8hf, v4hf variants). (vpmaxf): New (v4hf variant). (vpminf): New (v4hf variant). (vpadd): New (v4hf variant). (vrecps): New (v8hf, v4hf variants). (vrsqrts): New (v8hf, v4hf variants). (vabs): New (v8hf, v4hf variants). (vneg): New (v8hf, v4hf variants). (vrecpe): New (v8hf, v4hf variants). (vrnd): New (v8hf, v4hf variants). (vrnda): New (v8hf, v4hf variants). (vrndm): New (v8hf, v4hf variants). (vrndn): New (v8hf, v4hf variants). (vrndp): New (v8hf, v4hf variants). (vrndx): New (v8hf, v4hf variants). (vrsqrte): New (v8hf, v4hf variants). (vmul_lane): Add v4hf and v8hf variants. (vmul_n): Add v4hf and v8hf variants. (vext): New (v8hf, v4hf variants). (vcvts): New (v8hi, v4hi variants). (vcvts): New (v8hf, v4hf variants). (vcvtu): New (v8hi, v4hi variants). (vcvtu): New (v8hf, v4hf variants). (vcvts_n): New (v8hf, v4hf variants). (vcvtu_n): New (v8hi, v4hi variants). (vcvts_n): New (v8hi, v4hi variants). (vcvtu_n): New (v8hf, v4hf variants). (vbsl): New (v8hf, v4hf variants). (vcvtas): New (v8hf, v4hf variants). (vcvtau): New (v8hf, v4hf variants). (vcvtms): New (v8hf, v4hf variants). (vcvtmu): New (v8hf, v4hf variants). (vcvtns): New (v8hf, v4hf variants). (vcvtnu): New (v8hf, v4hf variants). (vcvtps): New (v8hf, v4hf variants). (vcvtpu): New (v8hf, v4hf variants). 2016-09-23 Matthew Wahab * config/arm/arm-builtins.c (hf_UP): New. (si_UP): New. (vfp_builtin_data): New. Update comment. (enum arm_builtins): Include "arm_vfp_builtins.def". (ARM_BUILTIN_VFP_PATTERN_START): New. (arm_init_vfp_builtins): New. (arm_init_builtins): Add arm_init_vfp_builtins. (arm_expand_vfp_builtin): New. (arm_expand_builtins): Update for arm_expand_vfp_builtin. Fix long line. * config/arm/arm_vfp_builtins.def: New file. * config/arm/t-arm (arm.o): Add arm_vfp_builtins.def. (arm-builtins.o): Likewise. 2016-09-23 Kugan Vivekanandarajah PR ipa/77677 * ipa-cp.c (propagate_vr_accross_jump_function): Drop TREE_OVERFLOW from constant while creating value range. 2016-09-23 Renlin Li * ira.c (ira): Move ira_use_lra_p initialization code to ... (ira_init_once): Here. 2016-09-23 Uros Bizjak Jakub Jelinek * hooks.h (hook_uint_uintp_false): Rename to... (hook_bool_uint_uintp_false): ... this. * hooks.c (hook_uint_uintp_false): Rename to... (hook_bool_uint_uintp_false): ... this. * target.def (elf_flags_numeric): Use hook_bool_uint_uintp_false instead of hook_uint_uintp_false. 2016-09-23 Matthew Wahab * config/arm/arm-builtins.c (arm_init_neon_builtin): New. (arm_init_builtins): Move body of a loop to the standalone function arm_init_neon_builtin. (arm_expand_neon_builtin_1): New. Update comment. Function body moved from arm_neon_builtin with some white-space fixes. (arm_expand_neon_builtin): Move code into the standalone function arm_expand_neon_builtin_1. 2016-09-23 Matthew Wahab * config/arm/iterators.md (VCVTHI): New. (NEON_VCMP): Add UNSPEC_VCLT and UNSPEC_VCLE. Fix a long line. (NEON_VAGLTE): New. (VFM_LANE_AS): New. (VH_CVTTO): New. (V_reg): Add HF, V4HF and V8HF. Fix white-space. (V_HALF): Add V4HF. Fix white-space. (V_if_elem): Add HF, V4HF and V8HF. Fix white-space. (V_s_elem): Likewise. (V_sz_elem): Fix white-space. (V_elem_ch): Likewise. (VH_elem_ch): New. (scalar_mul_constraint): Add V8HF and V4HF. (Is_float_mode): Fix white-space. (Is_d_reg): Add V4HF and V8HF. Fix white-space. (q): Add HF. Fix white-space. (float_sup): New. (float_SUP): New. (cmp_op_unsp): Add UNSPEC_VCALE and UNSPEC_VCALT. (neon_vfm_lane_as): New. * config/arm/neon.md (add3_fp16): New. (sub3_fp16): New. (mul3add_neon): New. (fma4_intrinsic): New. (fmsub4_intrinsic): Fix white-space. (fmsub4_intrinsic): New. (2): New. (neon_v): New. (neon_v): New. (neon_vrsqrte): New. (neon_vpaddv4hf): New. (neon_vadd): New. (neon_vsub): New. (neon_vmulf): New. (neon_vfma): New. (neon_vfms): New. (neon_vc): New. (neon_vc_fp16insn): New (neon_vc_fp16insn_unspec): New. (neon_vca): New. (neon_vca_fp16insn): New. (neon_vca_fp16insn_unspec): New. (neon_vcz): New. (neon_vabd): New. (neon_vf): New. (neon_vpfv4hf: New. (neon_): New. (neon_vrecps): New. (neon_vrsqrts): New. (neon_vrecpe): New (VH variant). (neon_vdup_lane_internal): New. (neon_vdup_lane): New. (neon_vcvt): New (VCVTHI variant). (neon_vcvt): New (VH variant). (neon_vcvt_n): New (VH variant). (neon_vcvt_n): New (VCVTHI variant). (neon_vcvt): New. (neon_vmul_lane): New. (neon_vmul_n): New. * config/arm/unspecs.md (UNSPEC_VCALE): New (UNSPEC_VCALT): New. (UNSPEC_VFMA_LANE): New. (UNSPECS_VFMS_LANE): New. 2016-09-23 Dominik Vogt * config/s390/s390.md ("*extzv_zEC12", "*extzv_z10") ("*extzv"): Correct a typo in a comment. Merged patterns. ("*insv_zEC12", "*insv_z10") ("*insv"): Ditto. ("*insv_zEC12_appendbitsleft") ("*insv_appendbitsleft") ("*insv_z10_appendbitsleft"): Ditto. ("*insv_zEC12_noshift", "*insv_z10_noshift") ("*insv_noshift"): Ditto. Provide pattern with operands switched. ("*pre_z10_extv"): Use new subst patterns. ("*extzvdi_lshiftrt", "*_ior_and_sr_ze") ("*extvsidi", "*_and_subregdi_rotr") ("*_and_subregdi_rotl", "*_di_and_rot") ("*insv_z10_noshift_cc", "*insv_z10_noshift_cconly") ("*__ior_and_lshiftrt") ("*_sidi_ior_and_lshiftrt") ("*trunc_sidi_and_subreg_lshrt"): New patterns. ("*extzv__sll", "*extzv__srl") ("*extzv__srl") ("*extzv__sll"): Renamed patterns, use risbgn on zEC12. ("SINT"): New mode_iterator with SI, HI, QI. * config/s390/subst.md ("clobbercc_or_nocc_subst", "z10_or_zEC12_cond") ("clobbercc_or_nocc", "risbg_n"): New constructs for risbg pattern duplication. 2016-09-23 Dominik Vogt * config/s390/predicates.md ("contiguous_bitmask_operand"): Adapt to new interface of s390_contiguous_bitmask_p. ("contiguous_bitmask_nowrap_operand"): New predicate. ("*anddi3_cc", "*anddi3_cconly", "*anddi3"): Replace NxxDq with NxxDw. * config/s390/constraints.md ("NxxDw", "NxxSq"): Adapt to new interface of s390_contiguous_bitmask_p. ("NxxDw"): Rename NxxDq constraint to NxxDw. ("NxxSw"): New constraint. * config/s390/s390.md ("*andsi3_zarch"): Enable bitmask wraparound. * config/s390/s390-protos.h (s390_contiguous_bitmask_p): Updated interface. (s390_contiguous_bitmask_nowrap_p): Export. * config/s390/s390.c (s390_contiguous_bitmask_nowrap_p): New name of former s390_contiguous_bitmask_p. (s390_contiguous_bitmask_p): Use s390_contiguous_bitmask_nowrap_p to detect contiguous bit ranges with wraparound. Change signature to return START and END position instead of POS and LENGTH. (s390_contiguous_bitmask_vector_p): Remove extra code for continous bit ranges with wraparound. (s390_extzv_shift_ok): Use s390_contiguous_bitmask_nowrap_p. (s390_contiguous_bitmask_vector_p,s390_extzv_shift_ok,print_operand): Adapt to new signature of s390_contiguous_bitmask_p. 2016-09-23 Bin Cheng * tree-vect-loop-manip.c (create_intersect_range_checks_index): New. (create_intersect_range_checks): New. (vect_create_cond_for_alias_checks): Call above function. 2016-09-23 Matthew Wahab * config/arm/iterators.md (Code iterators): Fix some white-space in the comments. (GLTE): New. (ABSNEG): New (FCVT): Moved from vfp.md. (VCVT_HF_US_N): New. (VCVT_SI_US_N): New. (VCVT_HF_US): New. (VCVTH_US): New. (FP16_RND): New. (absneg_str): New. (FCVTI32typename): Moved from vfp.md. (sup): Add UNSPEC_VCVTA_S, UNSPEC_VCVTA_U, UNSPEC_VCVTM_S, UNSPEC_VCVTM_U, UNSPEC_VCVTN_S, UNSPEC_VCVTN_U, UNSPEC_VCVTP_S, UNSPEC_VCVTP_U, UNSPEC_VCVT_HF_S_N, UNSPEC_VCVT_HF_U_N, UNSPEC_VCVT_SI_S_N, UNSPEC_VCVT_SI_U_N, UNSPEC_VCVTH_S_N, UNSPEC_VCVTH_U_N, UNSPEC_VCVTH_S and UNSPEC_VCVTH_U. (vcvth_op): New. (fp16_rnd_str): New. (fp16_rnd_insn): New. * config/arm/unspecs.md (UNSPEC_VCVT_HF_S_N): New. (UNSPEC_VCVT_HF_U_N): New. (UNSPEC_VCVT_SI_S_N): New. (UNSPEC_VCVT_SI_U_N): New. (UNSPEC_VCVTH_S): New. (UNSPEC_VCVTH_U): New. (UNSPEC_VCVTA_S): New. (UNSPEC_VCVTA_U): New. (UNSPEC_VCVTM_S): New. (UNSPEC_VCVTM_U): New. (UNSPEC_VCVTN_S): New. (UNSPEC_VCVTN_U): New. (UNSPEC_VCVTP_S): New. (UNSPEC_VCVTP_U): New. (UNSPEC_VCVTP_S): New. (UNSPEC_VCVTP_U): New. (UNSPEC_VRND): New. (UNSPEC_VRNDA): New. (UNSPEC_VRNDI): New. (UNSPEC_VRNDM): New. (UNSPEC_VRNDN): New. (UNSPEC_VRNDP): New. (UNSPEC_VRNDX): New. * config/arm/vfp.md (hf2): New. (neon_vabshf): New. (neon_vhf): New. (neon_vrndihf): New. (addhf3): New. (subhf3): New. (divhf3): New. (mulhf3): New. (*mulsf3neghf_vfp): New. (*negmulhf3_vfp): New. (*mulsf3addhf_vfp): New. (*mulhf3subhf_vfp): New. (*mulhf3neghfaddhf_vfp): New. (*mulhf3neghfsubhf_vfp): New. (fmahf4): New. (neon_vfmahf): New. (fmsubhf4_fp16): New. (neon_vfmshf): New. (*fnmsubhf4): New. (*fnmaddhf4): New. (neon_vsqrthf): New. (neon_vrsqrtshf): New. (FCVT): Move to iterators.md. (FCVTI32typename): Likewise. (neon_vcvthhf): New. (neon_vcvthsi): New. (neon_vcvth_nhf_unspec): New. (neon_vcvth_nhf): New. (neon_vcvth_nsi_unspec): New. (neon_vcvth_nsi): New. (neon_vcvthsi): New. (neon_hf): New. 2016-09-23 Dominik Vogt * config/s390/s390.md (bitoff, bitoff_plus): Neq mode attributes. ("*extzv_zEC12", "*insv_zEC12", "*insv_z10") ("*insv_zEC12_appendbitsleft") ("*insv_z10_appendbitsleft", "*rsbg__sll") ("*rsbg__srl"): Use new attributes. 2016-09-23 Jakub Jelinek * ipa-cp.c (ipcp_store_vr_results): Avoid static local var zero. * sreal.h (sreal::min, sreal::max): Avoid static local vars, construct values without normalization. * tree-ssa-sccvn.c (vn_reference_lookup_3): Don't initialize static local lhs_ops to vNULL. 2016-09-23 Matthew Wahab Jiong Wang * config/arm/arm.c (coproc_secondary_reload_class): Make HFmode available when FP16 instructions are available. (output_move_vfp): Add support for 16-bit data moves. (arm_validize_comparison): Fix some white-space. Support HFmode by conversion to SFmode. * config/arm/arm.md (truncdfhf2): Fix a comment. (extendhfdf2): Likewise. (cstorehf4): New. (movsicc): Fix some white-space. (movhfcc): New. (movsfcc): Fix some white-space. (*cmovhf): New. * config/arm/vfp.md (*arm_movhi_vfp): Disable when VFP FP16 instructions are available. (*thumb2_movhi_vfp): Likewise. (*arm_movhi_fp16): New. (*thumb2_movhi_fp16): New. (*movhf_vfp_fp16): New. (*movhf_vfp_neon): Disable when VFP FP16 instructions are available. (*movhf_vfp): Likewise. (extendhfsf2): Enable when VFP FP16 instructions are available. (truncsfhf2): Enable when VFP FP16 instructions are available. 2016-09-23 Martin Liska * config/s390/vx-builtins.md: Replace 'adress' with 'address'. 2016-09-23 Matthew Wahab * config/arm/arm.c (arm_evpc_neon_vuzp): Add support for V8HF and V4HF modes. (arm_evpc_neon_vtrn): Likewise. (arm_evpc_neon_vrev): Likewise. (arm_evpc_neon_vext): Likewise. * config/arm/arm_neon.h (vbsl_f16): New. (vbslq_f16): New. (vdup_n_f16): New. (vdupq_n_f16): New. (vdup_lane_f16): New. (vdupq_lane_f16): New. (vext_f16): New. (vextq_f16): New. (vmov_n_f16): New. (vmovq_n_f16): New. (vrev64_f16): New. (vrev64q_f16): New. (vtrn_f16): New. (vtrnq_f16): New. (vuzp_f16): New. (vuzpq_f16): New. (vzip_f16): New. (vzipq_f16): New. * config/arm/arm_neon_buillins.def (vdup_n): New (v8hf, v4hf variants). (vdup_lane): New (v8hf, v4hf variants). (vext): New (v8hf, v4hf variants). (vbsl): New (v8hf, v4hf variants). * config/arm/iterators.md (VDQWH): New. (VH): New. (V_double_vector_mode): Add V8HF and V4HF. Fix white-space. (Scalar_mul_8_16): Fix white-space. (Is_d_reg): Add V4HF and V8HF. * config/arm/neon.md (neon_vdup_lane_internal): New. (neon_vdup_lane): New. (neon_vtrn_internal): Replace VDQW with VDQWH. (*neon_vtrn_insn): Likewise. (neon_vzip_internal): Likewise. Also fix white-space. (*neon_vzip_insn): Likewise (neon_vuzp_internal): Likewise. (*neon_vuzp_insn): Likewise * config/arm/vec-common.md (vec_perm_const): New. 2016-09-23 Jiong Wang Matthew Wahab * config/arm/arm.c (output_move_vfp): Weaken assert to allow HImode. (arm_hard_regno_mode_ok): Allow HImode values in VFP registers. * config/arm/arm.md (*movhi_bytes): Disable when VFP registers are available. Also fix some white-space. * config/arm/vfp.md (*arm_movhi_vfp): New. (*thumb2_movhi_vfp): New. 2016-09-23 Matthew Wahab * config/arm/arm-c.c (arm_cpu_builtins): Define "__ARM_FEATURE_FP16_SCALAR_ARITHMETIC" and "__ARM_FEATURE_FP16_VECTOR_ARITHMETIC". 2016-09-23 Matthew Wahab * doc/sourcebuild.texi (ARM-specific attributes): Add anchor for arm_v8_1a_neon_ok. Add entries for arm_v8_2a_fp16_scalar_ok, arm_v8_2a_fp16_scalar_hw, arm_v8_2a_fp16_neon_ok and arm_v8_2a_fp16_neon_hw. (Add options): Add entries for arm_v8_1a_neon, arm_v8_2a_scalar, arm_v8_2a_neon. 2016-09-23 Matthew Wahab * doc/sourcebuild.texi (ARM-specific attributes): Add entries for arm_fp16_alternative_ok and arm_fp16_none_ok. 2016-09-23 Martin Liska * ipa-icf.c (sem_variable::merge): Replace adress with address. 2016-09-23 Matthew Wahab * config/arm/arm-arches.def ("armv8.1-a"): Add FL_CRC32. ("armv8.2-a"): New. ("armv8.2-a+fp16"): New. * config/arm/arm-protos.h (FL2_ARCH8_2): New. (FL2_FP16INST): New. (FL2_FOR_ARCH8_2A): New. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm.c (arm_arch8_2): New. (arm_fp16_inst): New. (arm_option_override): Set arm_arch8_2 and arm_fp16_inst. Check for incompatible fp16-format settings. * config/arm/arm.h (TARGET_VFP_FP16INST): New. (TARGET_NEON_FP16INST): New. (arm_arch8_2): Declare. (arm_fp16_inst): Declare. * config/arm/bpabi.h (BE8_LINK_SPEC): Add entries for march=armv8.2-a and march=armv8.2-a+fp16. * config/arm/t-aprofile (Arch Matches): Add entries for armv8.2-a and armv8.2-a+fp16. * doc/invoke.texi (ARM Options): Add "-march=armv8.1-a", "-march=armv8.2-a" and "-march=armv8.2-a+fp16". 2016-09-23 Martin Liska * doc/extend.texi: Remove fused-madd from i386 target options. 2016-09-23 Martin Liska * config/i386/i386.c (ix86_valid_target_attribute_inner_p): Handle movbe. 2016-09-23 Martin Liska * config/i386/i386.c (ix86_valid_target_attribute_inner_p): Handle crc32. 2016-09-23 Martin Liska PR target/71652 * config/i386/i386.c (ix86_option_override_internal): Change signature and return false when there's an error related to arch string. (release_options_strings): New function. (ix86_valid_target_attribute_tree): Call the function. 2016-09-23 Jakub Jelinek * hsa-gen.c (hsa_op_immed::hsa_op_immed Use CONSTRUCTOR_NELTS (...) instead of vec_safe_length (CONSTRUCTOR_ELTS (...)). (gen_hsa_ctor_assignment): Likewise. * print-tree.c (print_node): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-sra.c (sra_modify_constructor_assign): Likewise. * expr.c (store_constructor): Likewise. * fold-const.c (operand_equal_p): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * hsa-brig.c (hsa_op_immed::emit_to_buffer): Likewise. * ipa-icf-gimple.c (func_checker::compare_operand): Likewise. 2016-09-23 Richard Biener * hooks.h (hook_uint_uintp_false): Declare. 2016-09-22 Senthil Kumar Selvaraj * config/avr/avr.c (avr_rtx_costs_1): Handle DImode MULT. (avr_address_cost): Replace 61 with MAX_LD_OFFSET(mode). 2016-09-22 Martin Sebor PR target/77676 * gimple-ssa-sprintf.c (target_int_min, target_int_max): Use HOST_BITS_PER_WIDE_INT, make a static local variable auto. (target_int_min): Correct computation. (format_integer): Use long long as the argument for the ll length modifier. (format_floating): Use target_int_max(). (get_string_length): Same. (format_string): Avoid setting the bounded flag for strings of unknown length. (try_substitute_return_value): Avoid setting range info when the result isn't bounded. * varasm.c (assemble_name): Increase buffer size. 2016-09-22 Andre Vieira Terry Guo * target.def (elf_flags_numeric): New target hook. * targhooks.h (default_asm_elf_flags_numeric): New. * varasm.c (default_asm_elf_flags_numeric): New. (default_elf_asm_named_section): Use new target hook. * config/arm/arm.opt (mpure-code): New. * config/arm/arm.h (SECTION_ARM_PURECODE): New. * config/arm/arm.c (arm_asm_init_sections): Add section attribute to default text section if -mpure-code. (arm_option_check_internal): Diagnose use of option with non supported targets and/or options. (arm_asm_elf_flags_numeric): New. (arm_function_section): New. (arm_elf_section_type_flags): New. * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Disable for -mpure-code. * doc/texi (TARGET_ASM_ELF_FLAGS_NUMERIC): New. * doc/texi.in (TARGET_ASM_ELF_FLAGS_NUMERIC): Likewise. 2016-09-22 Jan Hubicka * regcprop.c (copyprop_hardreg_forward_1): Remove noop moves. 2016-09-22 Trevor Saunders * emit-rtl.c (next_cc0_user): Make argument type rtx_insn *. * rtl.h: Adjust prototype. 2016-09-22 Trevor Saunders * emit-rtl.c (next_active_insn): Change argument type to rtx_insn *. (prev_active_insn): Likewise. (active_insn_p): Likewise. * rtl.h: Adjust prototypes. * cfgcleanup.c (merge_blocks_move_successor_nojumps): Adjust. * config/arc/arc.md: Likewise. * config/pa/pa.c (branch_to_delay_slot_p): Likewise. (branch_needs_nop_p): Likewise. (use_skip_p): Likewise. * config/sh/sh.c (gen_block_redirect): Likewise. (split_branches): Likewise. * reorg.c (optimize_skip): Likewise. (fill_simple_delay_slots): Likewise. (fill_slots_from_thread): Likewise. (relax_delay_slots): Likewise. * resource.c (mark_target_live_regs): Likewise. 2016-09-22 Trevor Saunders * config/cris/cris.c (cris_asm_output_case_end): Change argument type to rtx_insn *. * emit-rtl.c (next_nonnote_nondebug_insn): Likewise. (prev_nonnote_nondebug_insn): Likewise. * config/cris/cris-protos.h: Adjust prototype. * rtl.h: Likewise. * jump.c (rtx_renumbered_equal_p): Adjust. 2016-09-22 Trevor Saunders * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. * rtl.h: Adjust prototype. * config/sh/sh.md: Adjust. * dwarf2out.c (add_var_loc_to_decl): Likewise. 2016-09-22 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to rtx_insn *. (prev_nondebug_insn): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * rtl.h: Adjust prototype. * cfgloop.h: Likewise. 2016-09-22 Trevor Saunders * emit-rtl.c (next_nonnote_insn): Change argument type to rtx_insn *. (prev_nonnote_insn): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. (reversed_comparison): Likewise. * rtl.h: Adjust prototypes. * config/arc/arc.md: Adjust. * cse.c (find_comparison_args): Likewise. * reorg.c (redundant_insn): Change return type to rtx_insn *. (fix_reg_dead_note): Change argument type to rtx_insn *. (delete_prior_computation): Likewise. (delete_computation): Likewise. (fill_slots_from_thread): Adjust. (relax_delay_slots): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. (simplify_relational_operation_1): Likewise. (simplify_ternary_operation): Likewise. 2016-09-22 Trevor Saunders * config/arc/arc-protos.h (arc_label_align): Change type of variables from rtx to rtx_insn *. * config/arc/arc.c (arc_label_align): Likewise. * config/arm/arm.c (any_sibcall_could_use_r3): Likewise. * config/bfin/bfin.c (workaround_speculation): Likewise. * config/c6x/c6x.c (find_next_cycle_insn): Likewise. (find_last_same_clock): Likewise. (reorg_split_calls): Likewise. * config/cris/cris-protos.h (cris_cc0_user_requires_cmp): Likewise. * config/cris/cris.c (cris_cc0_user_requires_cmp): Likewise. * config/h8300/h8300-protos.h (same_cmp_preceding_p): Likewise. (same_cmp_following_p): Likewise. * config/h8300/h8300.c (same_cmp_preceding_p): Likewise. (same_cmp_following_p): Likwise. * config/m32r/m32r.c (m32r_expand_epilogue): Likewise. * config/nds32/nds32-protos.h (nds32_target_alignment): Likewise. * config/nds32/nds32.c (nds32_target_alignment): Likewise. * config/rl78/rl78.c (rl78_alloc_physical_registers_op2): Likewise. (rl78_alloc_physical_registers_cmp): Likewise. (rl78_alloc_physical_registers_umul): Likewise. (rl78_calculate_death_notes): Likewise. * config/s390/s390-protos.h (s390_label_align): Likewise. * config/s390/s390.c (s390_label_align): Likewise. * config/sh/sh.c (barrier_align): Likewise. * config/sparc/sparc-protos.h (emit_cbcond_nop): Likewise. * config/sparc/sparc.c (sparc_asm_function_epilogue): Likewise. (emit_cbcond_nop): Likewise. 2016-09-22 Martin Liska PR ipa/77653 * ipa-icf.c (sem_variable::merge): Yield merge operation if alias address matters, not necessarily address of original. 2016-09-22 Richard Biener PR middle-end/77697 * gimple-fold.c (fold_array_ctor_reference): Turn asserts into fold fails. 2016-09-22 Richard Biener PR middle-end/77677 * gimple-match-head.c (gimple_resimplify1): Drop TREE_OVERFLOW from constant folding results. (gimple_resimplify2): Likewise. (gimple_resimplify3): Likewise. 2016-09-22 Richard Biener PR middle-end/77678 * expr.c (expand_expr_real_1): Guard array access against negative offset. 2016-09-22 Rainer Orth * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN instead of MPFR_RNDN. (format_floating): Likewise. 2016-09-22 Jakub Jelinek PR fortran/77665 * tree-inline.c (remap_gimple_stmt): Set has_simduid_loops for all IFN_GOMP_SIMD_* internal fns, not just for IFN_GOMP_SIMD_ORDERED_*. 2016-09-21 Michael Meissner PR target/77670 * config/rs6000/predicates.md (invert_fpmask_comparison_operator): New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP instructions when you want to invert the test. * config/rs6000/rs6000.md (fpmask): Use the arguments in the correct order for XXSEL. (movcc_invert_p9): Define the inverted test for using XSCMP{EQ,GT,GE}DP. 2016-09-21 David Malcolm * genconstants.c (main): Introduce noop_reader and convert call to read_md_files to a method call. * genenums.c (main): Likewise. * genmddeps.c (main): Likewise. * genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with rtx_reader_ptr->get_top_level_filename (). (write_tm_preds_h): Likewise. (write_insn_preds_c): Likewise. * gensupport.c (class gen_reader): New subclass of rtx_reader. (rtx_handle_directive): Convert to... (gen_reader::handle_unknown_directive): ...this. (init_rtx_reader_args_cb): Convert return type from bool to rtx_reader *. Create a gen_reader instance, using it for the call to read_md_files. Return it if no errors occur. (init_rtx_reader_args): Convert return type from bool to rtx_reader *. * gensupport.h (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args_cb): Likewise. * read-md.c (struct file_name_list): Move to class rtx_reader. (read_md_file): Delete in favor of rtx_reader::m_read_md_file. (read_md_filename): Delete in favor of rtx_reader::m_read_md_filename. (read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno. (in_fname): Delete in favor of rtx_reader::m_toplevel_fname. (base_dir): Delete in favor of rtx_reader::m_base_dir. (first_dir_md_include): Delete in favor of rtx_reader::m_first_dir_md_include. (last_dir_md_include_ptr): Delete in favor of rtx_reader::m_last_dir_md_include_ptr. (max_include_len): Delete. (rtx_reader_ptr): New. (fatal_with_file_and_line): Use get_filename and get_lineno accessors of rtx_reader_ptr. (require_char_ws): Likewise. (rtx_reader::read_char): New method, based on ::read_char. (rtx_reader::unread_char): New method, based on ::unread_char. (read_escape): Use get_filename and get_lineno accessors of rtx_reader_ptr. (read_braced_string): Use get_lineno accessor of rtx_reader_ptr. (read_string): Use get_filename and get_lineno accessors of rtx_reader_ptr. (rtx_reader::rtx_reader): New ctor. (rtx_reader::~rtx_reader): New dtor. (handle_include): Convert from a function to... (rtx_reader::handle_include): ...this method, converting handle_directive from a callback to a virtual function. (handle_file): Likewise, converting to... (rtx_reader::handle_file): ...this method. (handle_toplevel_file): Likewise, converting to... (rtx_reader::handle_toplevel_file): ...this method. (rtx_reader::get_current_location): New method. (parse_include): Convert from a function to... (rtx_reader::add_include_path): ...this method, dropping redundant update to unused max_include_len. (read_md_files): Convert from a function to... (rtx_reader::read_md_files): ...this method, converting handle_directive from a callback to a virtual function. (noop_reader::handle_unknown_directive): New method. * read-md.h (directive_handler_t): Delete this typedef. (in_fname): Delete. (read_md_file): Delete. (read_md_lineno): Delete. (read_md_filename): Delete. (class rtx_reader): New class. (rtx_reader_ptr): New decl. (class noop_reader): New subclass of rtx_reader. (read_char): Reimplement in terms of rtx_reader::read_char. (unread_char): Reimplement in terms of rtx_reader::unread_char. (read_md_files): Delete. * read-rtl.c (read_rtx_code): Update for deletion of globals read_md_filename and read_md_lineno. 2016-09-21 Jason Merrill * input.h (from_macro_definition_at): New. 2016-09-21 Segher Boessenkool * doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values. 2016-09-21 Bernd Edlinger PR tree-optimization/77550 * tree-vect-stmts.c (create_array_ref): Change parameters. (get_group_alias_ptr_type): New function. (vectorizable_store, vectorizable_load): Use get_group_alias_ptr_type. 2016-09-21 Marek Polacek * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length): Add falls through comment. 2016-09-21 Richard Biener * dwarf2out.c (remove_child_with_prev): Clear child->die_sib. (replace_child): Likewise. (remove_child_TAG): Adjust. (move_marked_base_types): Likewise. (prune_unused_types_prune): Clear die_sib of removed children. 2016-09-21 Georg-Johann Lay PR target/77326 * config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn touches some regs mentioned in cc_status, do CC_STATUS_INIT. 2016-09-21 Richard Biener PR tree-optimization/77648 * tree-ssa-structalias.c (process_constraint): Handle all DEREF with complex RHS. (make_transitive_closure_constraints): Adjust comment. (make_any_offset_constraints): New function. (handle_rhs_call): Make sure to first expand a pointer to all subfields before transitively closing it. (handle_const_call): Likewise. Properly expand returned pointers as well. (handle_pure_call): Likewise. 2016-09-21 Richard Biener Jakub Jelinek PR tree-optimization/77621 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Split group at non-vectorizable stmts. 2016-09-21 Kugan Vivekanandarajah PR tree-optimization/72835 * tree-ssa-reassoc.c (make_new_ssa_for_def): New. (make_new_ssa_for_all_defs): Likewise. (zero_one_operation): Replace all SSA_NAMEs defined in the chain. 2016-09-20 Martin Sebor PR middle-end/49905 * Makefile.in (OBJS): Add gimple-ssa-sprintf.o. * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Redefine. * config/linux.c (gnu_libc_printf_pointer_format): New function. * config/sol2.h (TARGET_PRINTF_POINTER_FORMAT): Same. * config/sol2.c (solaris_printf_pointer_format): New function. * doc/invoke.texi (-Wformat-length, -fprintf-return-value): New options. * doc/tm.texi.in (TARGET_PRINTF_POINTER_FORMAT): Document. * doc/tm.texi: Regenerate. * gimple-fold.h (get_range_strlen): New function. (get_maxval_strlen): Declare existing function. * gimple-fold.c (get_range_strlen): Add arguments and compute both maximum and minimum. (get_range_strlen): Define overload. (get_maxval_strlen): Adjust. * gimple-ssa-sprintf.c: New file and pass. * passes.def (pass_sprintf_length): Add new pass. * targhooks.h (default_printf_pointer_format): Declare new function. (gnu_libc_printf_pointer_format): Same. (solaris_libc_printf_pointer_format): Same. * targhooks.c (default_printf_pointer_format): Define new function. * tree-pass.h (make_pass_sprintf_length): Declare new function. * print-tree.c: Increase buffer size. 2016-09-21 Kugan Vivekanandarajah * tree-vrp.c (get_value_range): Teach PARM_DECL to use ipa-vrp results. 2016-09-21 Kugan Vivekanandarajah * common.opt: New option -fipa-vrp. * ipa-cp.c (ipa_get_vr_lat): New. (ipcp_vr_lattice::print): Likewise. (print_all_lattices): Call ipcp_vr_lattice::print. (ipcp_vr_lattice::meet_with): New. (ipcp_vr_lattice::meet_with_1): Likewise. (ipcp_vr_lattice::top_p): Likewise. (ipcp_vr_lattice::bottom_p): Likewsie. (ipcp_vr_lattice::set_to_bottom): Likewise. (set_all_contains_variable): Call VR set_to_bottom. (initialize_node_lattices): Init VR lattices. (propagate_vr_accross_jump_function): New. (propagate_constants_accross_call): Call propagate_vr_accross_jump_function. (ipcp_store_vr_results): New. (ipcp_driver): Handle VR. * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Handle VR. (ipa_set_jf_unknown): Likewise. (ipa_compute_jump_functions_for_edge): Likewise. (ipa_node_params_t::duplicate): Likewise. (ipa_write_jump_function): Likewise. (ipa_read_jump_function): Likewise. (write_ipcp_transformation_info): Likewise. (read_ipcp_transformation_info): Likewise. (ipcp_update_vr): New. (ipcp_transform_function): Handle VR. * ipa-prop.h (struct ipa_vr): New. * cgraph.c: Include tree-vrp.h. * cgraphunit.c: Likewise. * ipa-utils.c: Likewise. * ipa.c: Likewise. * opts.c: Likewise. * toplev.c: Likewise. * ipa-devirt.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-profile.c: Likewise. 2016-09-21 Kugan Vivekanandarajah * doc/invoke.texi: Document -fdump-tree-evrp. * passes.def: Define new pass_early_vrp. * timevar.def: Define new TV_TREE_EARLY_VRP. * tree-pass.h (make_pass_early_vrp): New. * tree-ssa-propagate.c: Make replace_uses_in non static. * tree-ssa-propagate.h: Export replace_uses_in. * tree-vrp.c (extract_range_for_var_from_comparison_expr): New. (extract_range_from_assert): Factor out extract_range_for_var_from_comparison_expr. (vrp_initialize_lattice): New. (vrp_initialize): Factor out vrp_initialize_lattice. (vrp_valueize): Fix it to reject complex value ranges. (vrp_free_lattice): New. (evrp_dom_walker::before_dom_children): Likewise. (evrp_dom_walker::after_dom_children): Likewise. (evrp_dom_walker::push_value_range): Likewise. (evrp_dom_walker::pop_value_range): Likewise. (execute_early_vrp): Likewise. (execute_vrp): Call vrp_initialize_lattice and vrp_free_lattice. (make_pass_early_vrp): New. 2016-09-20 Uros Bizjak * config/i386/i386.md (mult->ashift peephole2s): Use pow2p_hwi instead of exact_log2. 2016-09-20 Uros Bizjak PR target/77621 * config/i386/i386.c (ix86_preferred_simd_mode) : Don't return word_mode for !TARGET_VECTORIZE_DOUBLE. (ix86_add_stmt_cost): Penalize DFmode vector operations for !TARGET_VECTORIZE_DOUBLE. 2016-09-20 Gerald Pfeifer * doc/invoke.texi (Warning Options): Simplify language. (Optimize Options): Complete sentence. 2016-09-20 David Edelsohn * dbxout.c (xcoff_debug_hooks): Add filename parameter to early_finish hook. 2016-09-20 Michael Meissner PR target/71395 * config/rs6000/rs6000.c (rs6000_expand_vector_init): For V4SF inits on power8 and above, use the VMRGEW instruction instead of a permute. * config/rs6000/altivec.md (UNSPEC_VMRGEW_DIRECT): New unspec. (p8_vmrgew_v4sf_direct): New VMRGEW insn for V4SF floating initialization. 2016-09-20 Tamar Christina * config/aarch64/arm_neon.h (vst2_s64, vst2_u64, vst2_f64, vst2_s8): Add missing attributes. (vst3_s64, vst3_u64, vst3_f64, vst3_s8): Likewise. (vst4_s64, vst4_u64, vst4_f64, vst4_s8): Likewise. 2016-09-20 Bernd Edlinger * config/var/vax.h (ELIMINABLE_REGS): Define. (INITIAL_ELIMINATION_OFFSET): Define. 2016-09-20 Jakub Jelinek PR middle-end/77624 * builtins.c (fold_builtin_atomic_always_lock_free): Only look through cast to void * if the cast is from some other pointer type. 2016-09-20 Richard Biener PR tree-optimization/77646 * tree-ssa-sccvn.c (visit_reference_op_call): Always value-number a VDEF. 2016-09-20 Tamar Christina * config/aarch64/arm_neon.h: Add gnu_inline and artificial attributes to all inlined functions and make them extern. 2016-09-20 Richard Biener * debug.h (gcc_debug_hooks): Add filename parameter to early_finish hook. * debug.c (do_nothing_debug_hooks): Adjust. * dbxout.c (dbx_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise. (dwarf2out_finish): Move producer, filename and path annotation ... (dwarf2out_early_finish): ... here. Remove in_lto_p special-casing. * cgraphunit.c (symbol_table::finalize_compilation_unit): Adjust. 2016-09-19 Bernd Edlinger PR c++/77434 * doc/invoke.texi: Document -Wint-in-bool-context. PR middle-end/77421 * dwarf2out.c (output_loc_operands): Fix an assertion. 2016-09-19 Joseph Myers * ginclude/float.h [__STDC_WANT_IEC_60559_BFP_EXT__] (CR_DECIMAL_DIG): New macro. 2016-09-19 Joseph Myers * ginclude/stddef.h (max_align_t) [__i386__]: Add __float128 element. 2016-09-19 Vladimir Makarov PR rtl-optimization/77416 * lra-remat.c (operand_to_remat): Process hard coded insn registers. 2016-09-19 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-19 Segher Boessenkool * target.def (lra_p): Wordsmithing. * doc/tm.texi: Regenerate. 2016-09-19 Jakub Jelinek Jan Hubicka PR target/77587 * cgraph.c (cgraph_node::rtl_info): Pass &avail to ultimate_alias_target call, return NULL if avail < AVAIL_AVAILABLE. Call ultimate_alias_target just once, not up to 4 times. 2016-09-19 Richard Biener * dwarf2out.c (early_dwarf_finished): New global. (set_early_dwarf::set_early_dwarf): Assert early_dwarf_finished is false. (dwarf2out_early_finish): Set early_dwarf_finished at the end, if called from LTO exit early. (dwarf2out_late_global_decl): When being during the early debug phase do not add locations but only const value attributes. Adjust the way we generate early DIEs for LTO. 2016-09-19 Richard Biener PR middle-end/77605 * tree-data-ref.c (analyze_subscript_affine_affine): Use the proper niter to bound the loops. 2016-09-19 Richard Biener PR tree-optimization/77514 * tree-ssa-pre.c (create_expression_by_pieces): Optimize search for folded stmt. 2016-09-17 Jan Hubicka * passes.def (pass_early_thread_jumps): Schedule after forwprop. * tree-pass.h (make_pass_early_thread_jumps): Declare. * tree-ssa-threadbackward.c (fsm_find_thread_path, fsm_find_thread_path, profitable_jump_thread_path, fsm_find_control_statement_thread_paths, find_jump_threads_backwards): Add speed_p parameter. (pass_data_early_thread_jumps): New pass. (make_pass_early_thread_jumps): New function. 2016-09-17 Andreas Schwab * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Add cast. * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. 2016-09-16 Eric Botcazou * recog.c (rest_of_handle_split_after_reload): Delete. (pass_split_after_reload::gate): New method. (pass_split_after_reload::execute): Call split_all_insns directly. 2016-09-16 Jonathan Wakely * doc/extend.texi (Integer Overflow Builtins): Fix type of out parameters for functions taking long long arguments. 2016-09-16 Bill Schmidt PR target/77613 * config/rs6000/rs6000.c (rtx_is_swappable_p): Add support for splat with truncate. 2016-09-16 Jason Merrill * hwint.h (least_bit_hwi, pow2_or_zerop, pow2p_hwi, ctz_or_zero): New. * hwint.c (exact_log2): Use pow2p_hwi. (ctz_hwi, ffs_hwi): Use least_bit_hwi. * alias.c (memrefs_conflict_p): Use pow2_or_zerop. * builtins.c (get_object_alignment_2, get_object_alignment) (get_pointer_alignment, fold_builtin_atomic_always_lock_free): Use least_bit_hwi. * calls.c (compute_argument_addresses, store_one_arg): Use least_bit_hwi. * cfgexpand.c (expand_one_stack_var_at): Use least_bit_hwi. * combine.c (force_to_mode): Use least_bit_hwi. (contains_muldiv, find_split_point, combine_simplify_rtx) (simplify_if_then_else, simplify_set, force_to_mode) (if_then_else_cond, simplify_and_const_int_1) (simplify_compare_const): Use pow2p_hwi. * cse.c (fold_rtx): Use pow2p_hwi. * emit-rtl.c (set_mem_attributes_minus_bitpos, adjust_address_1): Use least_bit_hwi. * expmed.c (synth_mult, expand_divmod): Use ctz_or_zero, ctz_hwi. (init_expmed_one_conv): Use pow2p_hwi. * expr.c (is_aligning_offset): Use pow2p_hwi. * fold-const.c (round_up_loc, round_down_loc): Use pow2_or_zerop. (fold_binary_loc): Use pow2p_hwi. * function.c (assign_parm_find_stack_rtl): Use least_bit_hwi. * gimple-fold.c (gimple_fold_builtin_memory_op): Use pow2p_hwi. * gimple-ssa-strength-reduction.c (replace_ref): Use least_bit_hwi. * hsa-gen.c (gen_hsa_addr_with_align, hsa_bitmemref_alignment): Use least_bit_hwi. * ifcvt.c (noce_try_store_flag_constants): Use pow2p_hwi. * ipa-cp.c (ipcp_alignment_lattice::meet_with_1): Use least_bit_hwi. * ipa-prop.c (ipa_modify_call_arguments): Use least_bit_hwi. * omp-low.c (oacc_loop_fixed_partitions) (oacc_loop_auto_partitions): Use least_bit_hwi. * rtlanal.c (nonzero_bits1): Use ctz_or_zero. * stor-layout.c (place_field): Use least_bit_hwi. * tree-pretty-print.c (dump_generic_node): Use pow2p_hwi. * tree-sra.c (build_ref_for_offset): Use least_bit_hwi. * tree-ssa-ccp.c (ccp_finalize): Use least_bit_hwi. * tree-ssa-math-opts.c (bswap_replace): Use least_bit_hwi. * tree-ssa-strlen.c (handle_builtin_memcmp): Use pow2p_hwi. * tree-vect-data-refs.c (vect_analyze_group_access_1) (vect_grouped_store_supported, vect_grouped_load_supported) (vect_permute_load_chain, vect_shift_permute_load_chain) (vect_transform_grouped_load): Use pow2p_hwi. * tree-vect-generic.c (expand_vector_divmod): Use ctz_or_zero. * tree-vect-patterns.c (vect_recog_divmod_pattern): Use ctz_or_zero. * tree-vect-stmts.c (vectorizable_mask_load_store): Use least_bit_hwi. * tsan.c (instrument_expr): Use least_bit_hwi. * var-tracking.c (negative_power_of_two_p): Use pow2_or_zerop. 2016-09-16 Andreas Schwab * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use parameter OFFSET, not offset. * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. 2016-09-16 Jakub Jelinek PR target/77526 * combine.c (rest_of_handle_combine): If any edges have been purged, free dominators if available. 2016-09-16 Jakub Jelinek Eric Botcazou PR middle-end/77594 * internal-fn.c (expand_arith_overflow) : Don't fall through into expand_addsub_overflow after expand_neg_overflow. 2016-09-15 David Malcolm * diagnostic-show-locus.c (selftest::test_fixit_insert_containing_newline): New function. (selftest::test_fixit_replace_containing_newline): New function. (selftest::diagnostic_show_locus_c_tests): Call the above. 2016-09-15 Bin Cheng PR tree-optimization/77503 * tree-vect-loop.c (vectorizable_reduction): Record reduction code for CONST_COND_REDUCTION at analysis stage and use it at transform stage. * tree-vectorizer.h (struct _stmt_vec_info): New field. (STMT_VINFO_VEC_CONST_COND_REDUC_CODE): New macro. * tree-vect-stmts.c (new_stmt_vec_info): Initialize above new field. 2016-09-15 Richard Biener PR middle-end/77544 * fold-const.c (split_tree): Do not split constant ~X. 2016-09-15 Jakub Jelinek PR rtl-optimization/77425 * sched-int.h (sd_iterator_cond): Don't update it_ptr->linkp if list is NULL. PR middle-end/77475 * config/i386/i386.c (ix86_parse_stringop_strategy_string): Simplify, use %qs instead of %s where desirable, use argument instead of arg in the diagnostic wording, add list of supported strategies and spellcheck hint. (ix86_option_override_internal): Emit target("m...") instead of option("m...") in the diagnostic. Use %qs instead of %s in invalid -march/-mtune option diagnostic. Add list of supported arches/tunings and spellcheck hint. Remove prefix, suffix and sw variables, use main_args_p ? "..." : "..." in diagnostics to make translation possible. 2016-09-15 Richard Biener * dwarf2asm.h (dw2_asm_output_offset): Add overload with extra offset argument. * dwarf2asm.c (dw2_asm_output_offset): Implement that. * doc/tm.texi.in (ASM_OUTPUT_DWARF_OFFSET): Adjust documentation to reflect new offset parameter. * doc/tm.texi: Regenerate. * config/darwin.h (ASM_OUTPUT_DWARF_OFFSET): Adjust. * config/darwin-protos.h (darwin_asm_output_dwarf_delta): Add offset argument. (darwin_asm_output_dwarf_offset): Likewise. * config/darwin.c (darwin_asm_output_dwarf_delta): Add offset argument. (darwin_asm_output_dwarf_offset): Pass offset argument through. * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Adjust. * config/i386/cygmin.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. 2016-09-15 Chung-Lin Tang PR fortran/72743 * ipa-icf.c (set_alias_uids): New function. (sem_variable::merge): Use set_alias_uids to set DECL_PT_UID of all the merged variable's referring aliases. 2016-09-15 Richard Biener PR tree-optimization/77514 * tree-ssa-pre.c (create_expression_by_pieces): Handle garbage only forced_stmts sequence. 2016-09-15 Kugan Vivekanandarajah * tree-ssanames.h (FOR_EACH_SSA_NAME): New. * cfgexpand.c (update_alias_info_with_stack_vars): Use FOR_EACH_SSA_NAME to iterate over SSA variables. (pass_expand::execute): Likewise. * omp-simd-clone.c (ipa_simd_modify_function_body): Likewise. * tree-cfg.c (dump_function_to_file): Likewise. * tree-into-ssa.c (pass_build_ssa::execute): Likewise. (update_ssa): Likewise. * tree-ssa-alias.c (dump_alias_info): Likewise. * tree-ssa-ccp.c (ccp_finalize): Likewise. * tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise. (create_outofssa_var_map): Likewise. (coalesce_ssa_name): Likewise. * tree-ssa-operands.c (dump_immediate_uses): Likewise. * tree-ssa-pre.c (compute_avail): Likewise. * tree-ssa-sccvn.c (init_scc_vn): Likewise. (scc_vn_restore_ssa_info): Likewise. (free_scc_vn): Likwise. (run_scc_vn): Likewise. * tree-ssa-structalias.c (compute_points_to_sets): Likewise. * tree-ssa-ter.c (new_temp_expr_table): Likewise. * tree-ssa-copy.c (fini_copy_prop): Likewise. * tree-ssa.c (verify_ssa): Likewise. 2016-09-14 Matthew Fortune * config.gcc (mips*-mti-elf*, mips*-mti-linux*): Set mips32r2 and mips64r2 as default 32-bit and 64-bit architectures. (mips*-img-elf*, mips*-img-linux*): Set mips32r6 and mips64r6 as default 32-bit and 64-bit architectures. 2016-09-14 Pat Haugen * loop-unroll.c (unroll_loop_runtime_iterations): Set probability of succ edge. 2016-09-14 Segher Boessenkool * target.def (lra_p): Change commentary (for the manual) for the new default. * doc/tm.texi: Regenerate. 2016-09-14 Segher Boessenkool * config/aarch64/aarch64.c (TARGET_LRA_P): Delete macro. * config/arm/arm.c (TARGET_LRA_P): Delete macro. * config/i386/i386.c (TARGET_LRA_P): Delete macro. * config/nds32/nds32.c (TARGET_LRA_P): Delete macro. 2016-09-14 Segher Boessenkool * targhooks.c (default_lra_p): Return true instead of false. 2016-09-14 Segher Boessenkool * config/alpha/alpha.c (TARGET_LRA_P): New macro, defined to hook_bool_void_false. * config/avr/avr.c: Ditto. * config/bfin/bfin.c: Ditto. * config/c6x/c6x.c: Ditto. * config/cr16/cr16.c: Ditto. * config/cris/cris.c: Ditto. * config/epiphany/epiphany.c: Ditto. * config/fr30/fr30.c: Ditto. * config/frv/frv.c: Ditto. * config/h8300/h8300.c: Ditto. * config/ia64/ia64.c: Ditto. * config/iq2000/iq2000.c: Ditto. * config/lm32/lm32.c: Ditto. * config/m32c/m32c.c: Ditto. * config/m32r/m32r.c: Ditto. * config/m68k/m68k.c: Ditto. * config/mcore/mcore.c: Ditto. * config/microblaze/microblaze.c: Ditto. * config/mmix/mmix.c: Ditto. * config/mn10300/mn10300.c: Ditto. * config/moxie/moxie.c: Ditto. * config/msp430/msp430.c: Ditto. * config/nios2/nios2.c: Ditto. * config/nvptx/nvptx.c: Ditto. * config/pa/pa.c: Ditto. * config/pdp11/pdp11.c: Ditto. * config/rl78/rl78.c: Ditto. * config/sparc/sparc.c: Ditto. * config/spu/spu.c: Ditto. * config/stormy16/stormy16.c: Ditto. * config/tilegx/tilegx.c: Ditto. * config/tilepro/tilepro.c: Ditto. * config/v850/v850.c: Ditto. * config/vax/vax.c: Ditto. * config/visium/visium.c: Ditto. * config/xtensa/xtensa.c: Ditto. 2016-09-14 Jakub Jelinek PR sanitizer/68260 * tsan.c: Include target.h. (enum tsan_atomic_action): Add bool_clear and bool_test_and_set. (BOOL_CLEAR, BOOL_TEST_AND_SET): Define. (tsan_atomic_table): Add BUILT_IN_ATOMIC_CLEAR and BUILT_IN_ATOMIC_TEST_AND_SET entries. (instrument_builtin_call): Handle bool_clear and bool_test_and_set. 2016-09-14 Bernd Edlinger Martin Liska PR middle-end/77574 * predict.c (force_edge_cold): Add braces to a condition. 2016-09-13 Bernd Edlinger PR rtl-optimization/77289 * lra-constraints.c (get_final_hard_regno): Removed. (get_hard_regno): Add new parameter final_p. (get_reg_class): Directly call lra_get_elimination_hard_regno. (operands_match_p): Adjust call to get_hard_regno. (uses_hard_regs_p): Likewise. (process_alt_operands): Likewise. 2016-09-13 Joe Seymour PR target/70713 * config/msp430/msp430.c (msp430_start_function): Emit an error if a function is both weak and specifies an interrupt number. 2016-09-13 Jakub Jelinek PR tree-optimization/77454 * tree-ssa-dom.c (optimize_stmt): Set modified flag on stmt after changing GIMPLE_COND. Move update_stmt_if_modified call after this. Formatting fix. 2016-09-13 Tamar Christina * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins): Fix builtin type signature printing. 2016-09-13 Uros Bizjak * config/alpha/alpha.c (alpha_pass_by_reference): Pass un-named SFmode and SCmode arguments by reference. 2016-09-13 David Malcolm * diagnostic-show-locus.c (selftest::test_one_liner_fixit_insert): Rename to... (selftest::test_one_liner_fixit_insert_before): ...this, and update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_one_liner_fixit_insert_after): New function. (selftest::test_one_liner_fixit_validation_adhoc_locations): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_one_liner_many_fixits): Likewise. (selftest::test_diagnostic_show_locus_one_liner): Update for renaming, call new test function. (selftest::test_diagnostic_show_locus_fixit_lines): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_fixit_consolidation): Likewise. * diagnostic.c (selftest::test_print_parseable_fixits_insert): Likewise. * edit-context.c (selftest::test_applying_fixits_insert): Rename to... (selftest::test_applying_fixits_insert_before): ...this. (selftest::test_applying_fixits_insert): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::test_applying_fixits_insert_after): New function. (selftest::test_applying_fixits_insert_after_at_line_end): New function. (selftest::test_applying_fixits_insert_after_failure): New function. (selftest::test_applying_fixits_multiple): Update for renaming of add_fixit_insert to add_fixit_insert_before. (selftest::change_line): Likewise. (selftest::test_applying_fixits_unreadable_file): Likewise. (selftest::test_applying_fixits_line_out_of_range): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::edit_context_c_tests): Update for renamed test function; call new test functions. 2016-09-13 Pat Haugen PR tree-optimization/77536 PR rtl-optimization/68212 * config/rs6000/rs6000.md (div->recip splitter): Remove optimize_insn_for_speed_p condition. 2016-09-13 Maciej W. Rozycki * optabs.c (prepare_cmp_insn): Update documentation comment. 2016-09-13 Jakub Jelinek Manuel Lopez-Ibanez PR middle-end/77475 * opts.h (candidates_list_and_hint): Declare. * opts-common.c (candidates_list_and_hint): New function. (cmdline_handle_error): Use it. 2016-09-12 David Malcolm * edit-context.c (edited_line::get_len): New accessor. (edited_file::print_diff): Split out hunk-printing into... (edited_file::print_diff_hunk): New method. (edited_file::print_diff_line): New method. 2016-09-12 Andrew Pinski * config/aarch64/aarch64-tuning-flags.def (SLOW_UNALIGNED_LDPW): New tuning option. * config/aarch64/aarch64.c (thunderx_tunings): Enable AARCH64_EXTRA_TUNE_SLOW_UNALIGNED_LDPW. (aarch64_operands_ok_for_ldpstp): Return false if AARCH64_EXTRA_TUNE_SLOW_UNALIGNED_LDPW and the mode was SImode and the alignment is less than 8 byte. (aarch64_operands_adjust_ok_for_ldpstp): Likewise. 2016-09-12 Orlando Arias PR target/77570 * config/msp430/msp430.md (delay_cycles_32x): Fix pushm/popm. 2016-09-12 Marek Polacek * doc/extend.texi: Use lowercase "boolean". * doc/invoke.texi: Likewise. * doc/md.texi: Likewise. * target.def: Likewise. * doc/tm.texi: Regenerated. 2016-09-12 Kyrylo Tkachov PR middle-end/77426 * expmed.c (synth_mult): Delete duplicate mode check. 2016-09-10 Tom de Vries PR C/71602 * builtins.c (std_canonical_va_list_type): Strictly return non-null for va_list type only. * config/i386/i386.c (ix86_canonical_va_list_type): Same. * gimplify.c (gimplify_va_arg_expr): Handle &va_list. 2016-09-09 Peter Bergner PR rtl-optimization/77289 * lra-constraints.c (get_final_hard_regno): Add support for non hard register numbers. Remove support for subregs. (get_hard_regno): Use SUBREG_P. Don't call get_final_hard_regno(). (get_reg_class): Delete removed get_final_hard_regno() argument. (uses_hard_regs_p): Call get_final_hard_regno(). 2016-09-09 Martin Sebor PR c/77520 PR c/77521 * pretty-print.c (pp_quoted_string): New function. (pp_format): Call it for %c and %s directives. 2016-09-10 Bernd Edlinger * doc/tm.texi.in (INITIAL_FRAME_POINTER_OFFSET): Remove. (ELIMINABLE_REGS, TARGET_CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET) : Update documentation. * target.def (frame_pointer_required, can_eliminate): Likewise. * doc/tm.texi: Regenerated. * builtins.c (expand_builtin_setjmp_receiver): Remove #ifdef ELIMINABLE_REGS. * df-scan.c (df_hard_reg_init): Likewise. * ira.c (ira_setup_eliminable_regset): Likewise. * lra-eliminations.c (reg_eliminate_1, (update_reg_eliminate, init_elim_table): Likewise. * reload1.c (reg_eliminate_1, verify_initial_elim_offsets, set_initial_elim_offsets, update_eliminables, init_elim_table): Likewise. * rtlanal.c (get_initial_register_offset): Likewise. * config/ft32/ft32.h (INITIAL_FRAME_POINTER_OFFSET): Remove. * config/m32r/m32r.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/moxie/moxie.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/vax/vax.h (INITIAL_FRAME_POINTER_OFFSET): Likewise. * config/fr30/fr30.h: Fix comment. * config/frv/frv.c: Likewise. * config/frv/frv.h: Likewise. * config/ft32/ft32.h: Likewise. * config/visium/visium.h: Likewise. * config/pa/pa64-linux.h: Likewise. * config/v850/v850.h: Likewise. * config/cris/cris.c: Likewise. * config/ia64/ia64.h: Likewise. * config/moxie/moxie.h: Likewise. * config/m32r/m32r.h: Likewise. 2016-09-10 Alexander Ivchenko PR target/77267 * config.in: Regenerate. * config/i386/linux-common.h (MPX_LD_AS_NEEDED_GUARD_PUSH): New macro. (MPX_LD_AS_NEEDED_GUARD_PUSH): Ditto. (LIBMPXWRAPPERS_SPEC): Remove "--no-whole-archive" from static-libmpxwrappers case. (LIBMPX_SPEC): Add guards with MPX_LD_AS_NEEDED_GUARD_PUSH and MPX_LD_AS_NEEDED_GUARD_POP. * configure: Regenerate. * configure.ac (HAVE_LD_PUSHPOPSTATE_SUPPORT): New variable. defined if linker support "--push-state"/"--pop-state". 2016-09-09 Bernd Edlinger * doc/cpp.texi (__*_WIDTH__): Small wording fixes. 2016-09-09 Joseph Myers * doc/cpp.texi (__SCHAR_WIDTH__, __SHRT_WIDTH__, __INT_WIDTH__) (__LONG_WIDTH__, __LONG_LONG_WIDTH__, __PTRDIFF_WIDTH__) (__SIG_ATOMIC_WIDTH__, __SIZE_WIDTH__, __WCHAR_WIDTH__) (__WINT_WIDTH__, __INT_LEAST8_WIDTH__, __INT_LEAST16_WIDTH__) (__INT_LEAST32_WIDTH__, __INT_LEAST64_WIDTH__) (__INT_FAST8_WIDTH__, __INT_FAST16_WIDTH__, __INT_FAST32_WIDTH__) (__INT_FAST64_WIDTH__, __INTPTR_WIDTH__, __INTMAX_WIDTH__): Document. * ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Define width macros from TS 18661-1. * glimits.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Likewise. 2016-09-08 Jakub Jelinek PR fortran/77516 * omp-low.c (lower_rec_simd_input_clauses): Use max_vf for non-positive OMP_CLAUSE_SAFELEN_EXPR. 2016-09-07 David Malcolm * Makefile.in (OBJS): Add substring-locations.o. * langhooks-def.h (class substring_loc): New forward decl. (lhd_get_substring_location): New decl. (LANG_HOOKS_GET_SUBSTRING_LOCATION): New macro. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_GET_SUBSTRING_LOCATION. * langhooks.c (lhd_get_substring_location): New function. * langhooks.h (class substring_loc): New forward decl. (struct lang_hooks): Add field get_substring_location. * substring-locations.c: New file, taking definition of format_warning_va and format_warning_at_substring from c-family/c-format.c, making them non-static. * substring-locations.h (class substring_loc): Move class here from c-family/c-common.h. Add and rewrite comments. (format_warning_va): New decl. (format_warning_at_substring): New decl. (get_source_location_for_substring): Add comment. 2016-09-07 Eric Gallager * config/i386/i386.c: Add 'U' suffix to processor feature bits to avoid -Wnarrowing warning. * config/i386/x86-tune.def: Likewise for DEF_TUNE selector bitmasks. * opts.c: Likewise for SANITIZER_OPT bitmasks. 2016-09-07 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_legitimize_address): Avoid use of base_offset if offset already in range. 2016-09-07 Kaz Kojima * config/sh/sh-protos.h (struct sh_atomic_model, selected_atomic_model, TARGET_ATOMIC_ANY, TARGET_ATOMIC_STRICT, TARGET_ATOMIC_SOFT_GUSA, TARGET_ATOMIC_HARD_LLCS, TARGET_ATOMIC_SOFT_TCB, TARGET_ATOMIC_SOFT_IMASK): Move to... * config/sh/sh.h (struct sh_atomic_model, selected_atomic_model, TARGET_ATOMIC_ANY, TARGET_ATOMIC_STRICT, TARGET_ATOMIC_SOFT_GUSA, TARGET_ATOMIC_HARD_LLCS, TARGET_ATOMIC_SOFT_TCB, TARGET_ATOMIC_SOFT_IMASK): ...here. Guard with __cplusplus. 2016-09-06 Jakub Jelinek PR target/69255 * config/i386/i386.c (ix86_expand_builtin): For builtin with unsupported or unknown ISA, use expand_call. 2016-09-06 Martin Liska PR gcov-profile/77378 PR gcov-profile/77466 * tree-profile.c (tree_profiling): Detect whether target can use -fprofile-update=atomic. 2016-09-06 Richard Biener PR tree-optimization/77479 * tree-vrp.c (update_value_range): Extend overflow handling to VARYING. 2016-09-05 Jakub Jelinek PR target/77476 * config/i386/i386.md (isa): Add x64_avx512bw. (*zero_extendsidi2): For alternative 11 use x64_avx512bw isa. (kmov_isa): New mode attr. (zero_extenddi2): Use isa for the last alternative. (*zero_extendsi2): Likewise. (*zero_extendqihi2): Use avx512dq isa for the last alternative. 2016-09-05 Gerald Pfeifer * doc/invoke.texi (SPU Options): nops -> NOPs. (x86 Options): Ditto. 2016-09-05 Jakub Jelinek PR middle-end/77475 * toplev.c (process_options): Temporarily set input_location to UNKNOWN_LOCATION around targetm.target_option.override () call. 2016-09-05 Uros Bizjak PR rtl-optimization/77452 * explow.c (plus_constant) : Extract scalar constant from inner-mode reference to a CONST_VECTOR constant in the constant pool. 2016-09-05 Marek Polacek PR c/77423 * doc/invoke.texi: Update -Wlogical-not-parentheses documentation. 2016-09-05 Jakub Jelinek PR other/77421 * gensupport.c (alter_output_for_subst_insn): Remove redundant *insn_out == '*' test. Don't copy unnecessary to yet another memory buffer, and don't leak it. PR rtl-optimization/77425 * ipa-devirt.c (get_odr_type): Set val->id unconditionally. 2016-09-03 Kirill Yukhin * ubsan.c (ubsan_use_new_style_p): Fix check for empty string. 2016-09-02 David Malcolm * common.opt (fdiagnostics-generate-patch): New option. * diagnostic.c: Include "edit-context.h". (diagnostic_initialize): Initialize context->edit_context_ptr. (diagnostic_finish): Delete context->edit_context_ptr. (diagnostic_report_diagnostic): Add fix-it hints from the diagnostic to context->edit_context_ptr, if any. * diagnostic.h (class edit_context): Add forward decl. (struct diagnostic_context): Add field "edit_context_ptr". * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-generate-patch. (-fdiagnostics-generate-patch): New item. * toplev.c: Include "edit-context.h". (process_options): Set global_dc->edit_context_ptr to a new edit_context if the options need one. (toplev::main): Handle -fdiagnostics-generate-patch by using global_dc->edit_context_ptr. 2016-09-02 Jakub Jelinek PR c/65467 * gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit map and firstprivate clauses on target construct for _Atomic qualified decls. (gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses on target construct for _Atomic qualified decls. * omp-low.c (use_pointer_for_field): Return true for _Atomic qualified decls. * omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for _Atomic qualified arguments not mentioned in uniform clause. 2016-09-02 David Malcolm * Makefile.in (OBJS-libcommon): Add edit-context.o. * diagnostic-color.c (color_dict): Add "diff-filename", "diff-hunk", "diff-delete", and "diff-insert". (parse_gcc_colors): Update default value of GCC_COLORS in comment to reflect above changes. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. * edit-context.c: New file. * edit-context.h: New file. * input.c (struct fcache): Add field "missing_trailing_newline". (diagnostics_file_cache_forcibly_evict_file): Initialize it to true. (add_file_to_cache_tab): Likewise. (fcache::fcache): Likewise. (get_next_line): Update c->missing_trailing_newline. (location_missing_trailing_newline): New function. * input.h (location_missing_trailing_newline): New decl. * selftest-run-tests.c (selftest::run_tests): Call edit_context_c_tests. * selftest.h (edit_context_c_tests): New decl. 2016-09-02 Jakub Jelinek Richard Biener PR tree-optimization/77444 * tree-ssa-loop-ivopts.c (cand_value_at): For pointers use sizetype as steptype, remove redundant initialization. 2016-09-02 Jakub Jelinek PR sanitizer/77396 * sanopt.c: Include gimple-ssa.h, tree-phinodes.h and ssa-iterators.h. (sanopt_optimize_walker): Optimize away __asan_before_dynamic_init (...) followed by __asan_after_dynamic_init () without intervening memory loads/stores. * ipa-pure-const.c (special_builtin_state): Handle BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT and BUILT_IN_ASAN_AFTER_DYNAMIC_INIT. 2016-09-02 Prathamesh Kulkarni * cfg.c (free_original_copy_tables): Replace second assignment of bb_copy = NULL by bb_original = NULL. 2016-09-02 Jakub Jelinek PR other/77421 * config/i386/i386.c (ix86_expanded_args_builtin): Remove redundant assignment added in r216794. 2016-09-02 David Malcolm * Makefile.in (OBJS): Add typed-splay-tree.o. * selftest-run-tests.c (selftest::run_tests): Call typed_splay_tree_c_tests. * selftest.h (typed_splay_tree_c_tests): New decl. * typed-splay-tree.c: New file. * typed-splay-tree.h (typed_splay_tree::foreach_fn): New typedef. (typed_splay_tree::max): New method. (typed_splay_tree::min): New method. (typed_splay_tree::foreach): New method. (typed_splay_tree::closure): New struct. (typed_splay_tree::inner_foreach_fn): New function. 2016-09-02 Prathamesh Kulkarni * ipa-cp.c (ipcp_store_bits_results): Change option name from -fipa-cp-bit to -fipa-bit-cp. 2016-09-01 Martin Sebor PR tree-optimization/71831 * tree-object-size.h: Return bool instead of the size and add argument for the size. * tree-object-size.c (compute_object_offset): Update signature. (addr_object_size): Same. (compute_builtin_object_size): Return bool instead of the size and add argument for the size. Handle POINTER_PLUS_EXPR when optimization is disabled. (expr_object_size): Adjust. (plus_stmt_object_size): Adjust. (pass_object_sizes::execute): Adjust. * builtins.c (fold_builtin_object_size): Adjust. * doc/extend.texi (Object Size Checking): Update. * ubsan.c (instrument_object_size): Adjust. 2016-09-01 Martin Sebor * genmatch.c (parser::parse_expr): Increase buffer size to guarantee it fits the output of the formatted function regardless of its arguments. * genmodes.c (parser::parse_expr): Same. * gimplify.c (gimplify_asm_expr): Same. * passes.c (pass_manager::register_one_dump_file): Same. * print-tree.c (print_node): Same. 2016-09-01 Segher Boessenkool * config/rs6000/altivec.md: Use VSCR_REGNO instead of 110 throughout. 2016-09-01 Segher Boessenkool * config/rs6000/altivec.md: Use VRSAVE_REGNO instead of 109 throughout. 2016-09-01 Segher Boessenkool * config/rs6000/altivec.md: Use CR6_REGNO instead of 74 throughout. * config/rs6000/vector.md: Ditto. * config/rs6000/vsx.md: Ditto. 2016-09-01 Eric Botcazou * ipa-inline-analysis.c (param_change_prob): Get to the base object first in all cases. 2016-09-01 Segher Boessenkool * config/rs6000/rs6000.md (*restore_gpregs__r11, *restore_gpregs__r12, *restore_gpregs__r1, *return_and_restore_gpregs__r11, *return_and_restore_gpregs__r12, *return_and_restore_gpregs__r1, *return_and_restore_fpregs__r11, *return_and_restore_fpregs__r12, *return_and_restore_fpregs__r1): Use the hard register LR_REGNO directly instead of via the "l" constraint. Renumber operands. Fix whitespace. 2016-09-01 Segher Boessenkool * config/rs6000/altivec.md (*save_world, *save_vregs__r11, save_vregs__r12, *restore_vregs__r11, *restore_vregs__r12): Use LR_REGNO instead of 65. * config/rs6000/darwin.md (load_macho_picbase, load_macho_picbase_si, load_macho_picbase_di, *call_indirect_nonlocal_darwin64, *call_nonlocal_darwin64, *call_value_indirect_nonlocal_darwin64, *call_value_nonlocal_darwin64, reload_macho_picbase, reload_macho_picbase_si, reload_macho_picbase_di): Ditto. * config/rs6000/rs6000.h (RETURN_ADDR_IN_PREVIOUS_FRAME): Ditto. * config/rs6000/rs6000.md (*save_gpregs__r11, *save_gpregs__r12, *save_gpregs__r1, *save_fpregs__r11, *save_fpregs__r12, *save_fpregs__r1): Ditto. * config/rs6000/spe.md (*save_gpregs_spe, *restore_gpregs_spe, *return_and_restore_gpregs_spe): Ditto. 2016-09-01 Segher Boessenkool * config/rs6000/rs6000.md (define_insn "*return_and_restore_fpregs_aix__r11"): Delete the use of the link register. (define_insn "*return_and_restore_fpregs_aix__r1"): Ditto. 2016-09-01 Bill Schmidt Michael Meissner PR target/72827 * config/rs6000/rs6000.c (rs6000_legitimize_address): Avoid reg+reg addressing for TImode. (rs6000_legitimate_address_p): Only allow register indirect addressing for TImode, even without TARGET_QUAD_MEMORY. 2016-09-01 Richard Biener PR middle-end/77436 * tree-chrec.c (tree_fold_binomial): Use widest_int, properly check whether the result fits the desired result type. 2016-09-01 Nathan Sidwell * config/nvptx/nvptx.md (cbranch4): Op 2 can be const. 2016-09-01 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement): New function. (TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT): Define. 2016-09-01 Kyrylo Tkachov * config/aarch64/aarch64.md (*ands_compare0): New pattern. * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_NZmode for comparisons of integer ZERO_EXTEND against zero. 2016-09-01 Eric Botcazou * config/i386/i386.c (ix86_option_override_internal): Also disable the STV pass if -mstackrealign is enabled. 2016-08-31 Ilya Verbin * config/i386/driver-i386.c (host_detect_local_cpu): Fix detection of AVX512IFMA. 2016-08-31 David Malcolm * diagnostic-show-locus.c (class layout): Add field m_fixit_hints. (layout_range::intersects_line_p): New method. (test_range_contains_point_for_single_point): Rename to... (test_layout_range_for_single_point): ...this, and add testing for layout_range::intersects_line_p. (test_range_contains_point_for_single_line): Rename to... (test_layout_range_for_single_line): ...this, and add testing for layout_range::intersects_line_p. (test_range_contains_point_for_multiple_lines): Rename to... (test_layout_range_for_multiple_lines): ...this, and add testing for layout_range::intersects_line_p. (layout::layout): Populate m_fixit_hints. (layout::get_expanded_location): Handle the case of a line-span for a fix-it hint. (layout::validate_fixit_hint_p): New method. (get_line_span_for_fixit_hint): New function. (layout::calculate_line_spans): Add spans for fixit-hints. (layout::should_print_annotation_line_p): New method. (layout::print_any_fixits): Drop param "richloc", instead using validated fixits in m_fixit_hints. Add "const" to hint pointers. (diagnostic_show_locus): Avoid printing blank annotation lines. (selftest::test_diagnostic_context::test_diagnostic_context): Initialize show_column and start_span. (selftest::test_diagnostic_context::start_span_cb): New static function. (selftest::test_diagnostic_show_locus_fixit_lines): New function. (selftest::diagnostic_show_locus_c_tests): Update for function renamings. Call test_diagnostic_show_locus_fixit_lines. 2016-08-31 Marc Glisse PR tree-optimization/73714 * match.pd (a * (1 << b)): Revert change from 2016-05-23. 2016-08-31 David Malcolm * selftest.c: Move "namespace selftest {" to top of file, removing explicit "selftest::" qualifiers throughout. 2016-08-31 Marc Glisse * config/i386/avx512fintrin.h (__m512_u, __m512i_u, __m512d_u): New types. (_mm512_loadu_pd, _mm512_storeu_pd, _mm512_loadu_ps, _mm512_storeu_ps, _mm512_loadu_si512, _mm512_storeu_si512): Replace builtin with vector extension. * config/i386/avxintrin.h (__m256_u, __m256i_u, __m256d_u): New types. (_mm256_loadu_pd, _mm256_storeu_pd, _mm256_loadu_ps, _mm256_storeu_ps, _mm256_loadu_si256, _mm256_storeu_si256): Replace builtin with vector extension. * config/i386/emmintrin.h (__m128i_u, __m128d_u): New types. (_mm_loadu_pd, _mm_storeu_pd, _mm_loadu_si128, _mm_storeu_si128): Replace builtin with vector extension. * config/i386/xmmintrin.h (__m128_u): New type. (_mm_loadu_ps, _mm_storeu_ps): Replace builtin with vector extension. (_mm_load_ps, _mm_store_ps): Simplify. 2016-08-31 Eric Botcazou * config/arm/arm.c (thumb1_size_rtx_costs) : Add missing guard. 2016-08-30 David Malcolm * diagnostic-show-locus.c (colorizer::begin_state): Support more than 3 ranges per diagnostic by alternating between color 1 and color 2. (layout::layout): Replace use of rich_location::MAX_RANGES with richloc->get_num_locations (). (layout::calculate_line_spans): Replace use of rich_location::MAX_RANGES with m_layout_ranges.length (). (layout::print_annotation_line): Handle arbitrary numbers of ranges in caret-printing by defaulting to '^'. (selftest::test_one_liner_many_fixits): New function. (test_diagnostic_show_locus_one_liner): Call it. * diagnostic.c (diagnostic_initialize): Update for renaming of rich_location::MAX_RANGES to rich_location::STATICALLY_ALLOCATED_RANGES. * diagnostic.h (struct diagnostic_context): Likewise. 2016-08-30 David Malcolm * selftest.c (selftest::named_temp_file::named_temp_file): New ctor. (selftest::temp_source_file::~temp_source_file): Move to... (selftest::named_temp_file::~named_temp_file): ...here. (selftest::test_named_temp_file): New function. (selftest::selftest_c_tests): Call test_named_temp_file. * selftest.h (class named_temp_file): New class. (class temp_source_file): Convert to a subclass of named_temp_file. 2016-08-30 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_emit_epilogue): Do not emit USEs of LR_REGNO in returns and sibcalls. (rs6000_output_mi_thunk): Similar. (rs6000_sibcall_aix): Similar. * config/rs6000/rs6000.md (sibcall, sibcall_value, sibcall_local32, sibcall_local64, sibcall_value_local32, sibcall_value_local64, sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove the USE of LR_REGNO from the patterns as well. Delete an obsolete comment. (return_internal_): Delete. 2016-08-30 Tamar Christina * config/aarch64/aarch64-simd.md (aarch64_ld2_dreg_le): New. (aarch64_ld2_dreg_be): New. (aarch64_ld2_dreg): Removed. (aarch64_ld3_dreg_le): New. (aarch64_ld3_dreg_be): New. (aarch64_ld3_dreg): Removed. (aarch64_ld4_dreg_le): New. (aarch64_ld4_dreg_be): New. (aarch64_ld4_dreg): Removed. (aarch64_ld): Wrapper around _le, _be. 2016-08-30 David Malcolm * diagnostic-show-locus.c (test_one_liner_fixit_insert): Remove redundant location param. (test_one_liner_fixit_remove): Likewise. (test_one_liner_fixit_replace): Likewise. (test_one_liner_fixit_replace_equal_secondary_range): Likewise. * gcc-rich-location.c (gcc_rich_location::add_fixit_misspelled_id): Eliminate call to get_range_from_loc. Drop overload taking a const char *. * gcc-rich-location.h (gcc_rich_location::add_fixit_misspelled_id): Drop overload taking a const char *. 2016-08-30 Szabolcs Nagy * config/linux.c (linux_libc_has_function): Return true on musl. 2016-08-30 Szabolcs Nagy * config.gcc (*-*-*musl*): Disable gnu-indirect-function. 2016-08-30 Eric Botcazou * postreload-gcse.c (bb_has_well_behaved_predecessors): Tweak criterion used for abnormal egdes. 2016-08-30 Jakub Jelinek PR tree-optimization/72866 * tree-vect-patterns.c (search_type_for_mask): Turn into a small wrapper, move all code to ... (search_type_for_mask_1): ... this new function. Add caching and adjust recursive calls. PR debug/77363 * dwarf2out.c (modified_type_die): Use lookup_type_die (type) instead of lookup_type_die (type_main_variant (type)) even for array types. PR middle-end/77377 * simplify-rtx.c (avoid_constant_pool_reference): For out of bounds constant pool reference return x instead of c. 2016-08-29 Segher Boessenkool * config/rs6000/rs6000.h (CALL_REALLY_USED_REGISTERS): Do not include MQ. 2016-08-29 David Malcolm * input.c (selftest::test_make_location_nonpure_range_endpoints): Fix header comment. 2016-08-29 David Malcolm * diagnostic-show-locus.c (selftest::test_one_liner_fixit_validation_adhoc_locations): New function. (selftest::test_diagnostic_show_locus_one_liner): Call it. * input.c (get_pure_location): Move to libcpp/line-map.c. * input.h (get_pure_location): Convert decl to an inline function calling implementation in libcpp. 2016-08-29 Uros Bizjak PR target/77403 * config/i386/sse.md (vec_set_lo_): Fix assembler template for intel asm dialect. (vec_set_hi_): Ditto. 2016-08-29 David Malcolm * selftest.h (selftest::fail): Add ATTRIBUTE_NORETURN. (selftest::fail_formatted): Likewise. 2016-08-29 David Malcolm * input.c (make_location): Call get_start and get_finish on the endpoints to avoid storing packed ranges or ad-hoc ranges in them. (selftest::test_make_location_nonpure_range_endpoints): New function. (selftest::input_c_tests): Call it. * input.h (get_start): New inline function. 2016-08-29 Tom de Vries PR c/77398 * gimplify.c (gimplify_va_arg_expr): Replace first argument type error with assert. 2016-08-29 Eric Botcazou * Makefile.in (gcov-iov.h): Add dummy recipe. 2016-08-29 Nathan Sidwell * config/nvptx/nvptx.c: #include tree-vrp.h. 2016-08-28 Eric Botcazou PR target/77324 * config/sparc/sparc.c (sparc_legitimate_address_p): Accept special HIGH+LO construct during reload. 2016-08-28 Tom de Vries PR lto/70955 * config/i386/i386.c (ix86_build_builtin_va_list_64): Tag type with 'sysv_abi va_list' attribute. (ix86_build_builtin_va_list): Tag type with 'ms_abi va_list' attribute. (ix86_canonical_va_list_type): Handle 'sysv_abi/ms_abi va_list' attributes. 2016-08-27 Trevor Saunders * emit-rtl.h (struct rtl_data): Make stack_slot_list a vector. * emit-rtl.c (unshare_all_rtl_1): Adjust. (unshare_all_rtl_again): Likewise. * function.c (assign_stack_local_1): Likewise. (assign_stack_temp_for_type): Likewise. 2016-08-27 Trevor Saunders * cfgbuild.c (make_edges): Adjust. * cfgrtl.c (can_delete_label_p): Likewise. * dwarf2cfi.c (create_trace_edges): Likewise. * except.c (sjlj_emit_dispatch_table): Likewise. * function.h (struct expr_status): make x_forced_labels a vector. * jump.c (rebuild_jump_labels_1): Adjust. * reload1.c (set_initial_label_offsets): Likewise. * stmt.c (force_label_rtx): Likewise. (expand_label): Likewise. 2016-08-27 Trevor Saunders * haifa-sched.c (fix_recovery_deps): Make ready_list a vector. 2016-08-27 Patrick Palka PR tree-optimization/71077 PR tree-optimization/68542 * fold-const.c (fold_relational_const): Fix folding of VECTOR_CST comparisons that have a scalar boolean result type. (selftest::test_vector_folding): New static function. (selftest::fold_const_c_tests): Call it. 2016-08-27 Gerald Pfeifer * doc/extend.texi (SPU Built-in Functions): Remove stale references to material formerly at IBM and Sony. 2016-08-26 David Edelsohn PR target/77349 * config/rs6000/xcoff.h (DWARF_OFFSET_SIZE): Define as PTR_SIZE. 2016-08-26 David Malcolm * diagnostic-show-locus.c (selftest::test_fixit_consolidation): New function. (selftest::diagnostic_show_locus_c_tests): Call it. * gcc-rich-location.h (gcc_rich_location): Eliminate unused constructor based on source_range. 2016-08-26 David Malcolm * diagnostic-color.c (color_dict): Add "fixit-insert" and "fixit-delete". (parse_gcc_colors): Update description of default GCC_COLORS. * diagnostic-show-locus.c (colorizer::set_fixit_hint): Delete. (colorizer::set_fixit_insert): New method. (colorizer::set_fixit_delete): New method. (colorizer::get_color_by_name): New method. (colorizer::STATE_FIXIT_INSERT): New constant. (colorizer::STATE_FIXIT_DELETE): New constant. (class colorizer): Drop "_cs" suffix from fields. Delete "_ce" fields in favor of new field "m_stop_color". Add fields "m_fixit_insert" and "m_fixit_delete". (colorizer::colorizer): Update for above changes. Replace colorize_start calls with calls to get_color_by_name. (colorizer::begin_state): Handle STATE_FIXIT_INSERT and STATE_FIXIT_DELETE. Update for field renamings. (colorizer::finish_state): Simplify by using m_stop_color, rather than multiple identical "*_ce" fields. (colorizer::get_color_by_name): New method. (layout::print_any_fixits): Print insertions and replacements using the "fixit-insert" color, and deletions using the "fixit-delete" color. * doc/invoke.texi (-fdiagnostics-color): Update description of default GCC_COLORS, and of the supported capabilities. 2016-08-26 Max Filippov * config/xtensa/xtensa.c (xtensa_expand_prologue): Update current_function_static_stack_size variable with the static stack frame size of the current function when flag_stack_usage_info is enabled. 2016-08-26 Nathan Sidwell * ipa-inline-analysis.c (inline_write_summary): Remove unnecessary assignment inside if condition. 2016-08-26 Richard Biener PR tree-optimization/69047 * tree-ssa.c (maybe_rewrite_mem_ref_base): Handle general bitfield extracts similar to what FRE does. (non_rewritable_mem_ref_base): Likewise. 2016-08-26 Joseph Myers * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p) (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove. * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Likewise. * config/i386/vxworks.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. 2016-08-26 Kyrylo Tkachov PR target/70473 * config/arm/cortex-a8-neon.md (cortex_a8_vfp_muld): Reduce reservation duration to 15 cycles. (cortex_a8_vfp_macs): Likewise. (cortex_a8_vfp_macd): Likewise. (cortex_a8_vfp_divs): Likewise. (cortex_a8_vfp_divd): Likewise. 2016-08-26 Kyrylo Tkachov * config/arm/arm.c (arm_sets_movw_movt_fusible_p): New function. (aarch_macro_fusion_pair_p): Use above to avoid early return. 2016-08-26 Prathamesh Kulkarni Martin Jambhor * common.opt: New option -fipa-bit-cp. * doc/invoke.texi: Document -fipa-bit-cp. * opts.c (default_options_table): Add entry for -fipa-bit-cp. (enable_fdo_optimizations): Check for flag_ipa_bit_cp. * tree-ssa-ccp.h: New header file. * tree-ssa-ccp.c: Include tree-ssa-ccp.h (bit_value_binop_1): Change to bit_value_binop_1 and export it. Replace all occurences of tree parameter by two new params: signop, int. (bit_value_unop_1): Change to bit_value_unop and export it. Replace all occurences of tree parameter by two new params: signop, int. (bit_value_binop): Change call from bit_value_binop_1 to bit_value_binop. (bit_value_assume_aligned): Likewise. (bit_value_unop): Change call from bit_value_unop_1 to bit_value_unop. (do_ssa_ccp): Pass nonzero_p || flag_ipa_cp_bit instead of nonzero_p to ccp_finalize. (ccp_finalize): Skip processing if val->mask == 0. * ipa-cp.c: Include tree-ssa-ccp.h (ipcp_bits_lattice): New class. (ipcp_param_lattice (bits_lattice): New member. (print_all_lattices): Call ipcp_bits_lattice::print. (set_all_contains_variable): Call ipcp_bits_lattice::set_to_bottom. (initialize_node_lattices): Likewise. (propagate_bits_accross_jump_function): New function. (propagate_constants_accross_call): Call propagate_bits_accross_jump_function. (ipcp_propagate_stage): Store parameter types when in_lto_p is true. (ipcp_store_bits_results): New function. (ipcp_driver): Call ipcp_store_bits_results. * ipa-prop.h (ipa_bits): New struct. (ipa_jump_func): Add new member bits of type ipa_bits. (ipa_param_descriptor): Change decl to decl_or_type. (ipa_get_param): Change decl to decl_or_type and assert on PARM_DECL. (ipa_get_type): New function. (ipcp_transformation_summary): New member bits. * ipa-prop.c (ipa_get_param_decl_index_1): s/decl/decl_or_type. (ipa_populate_param_decls): Likewise. (ipa_dump_param): Likewise. (ipa_print_node_jump_functions_for_edge): Pretty-print ipa_bits jump function. (ipa_set_jf_unknown): Set ipa_bits::known to false. (ipa_compute_jump_functions_for_edge): Compute jump function for bits propagation. (ipa_node_params_t::duplicate): Copy src->bits into dst->bits. (ipa_write_jump_function): Add streaming for ipa_bits. (ipa_read_jump_function): Add support for reading streamed ipa_bits. (write_ipcp_transformation_info): Add streaming for ipa_bits summary for ltrans. (read_ipcp_transfomration_info): Add support for reading streamed ipa_bits. (ipcp_update_bits): New function. (ipcp_transform_function): Call ipcp_update_bits. 2016-08-25 Szabolcs Nagy * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Update. (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Update. 2016-08-25 David Edelsohn * multiple_target.c (pass_data_dispatcher_calls): Fix typo. 2016-08-25 Richard Biener * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes): Only add locations in late dwarf. (gen_scheduled_generic_parms_dies): Do not set early dwarf here. (dwarf2out_early_finish): But do it here. 2016-08-24 Michael Collison Michael Collison * config/arm/arm-modes.def: Add new condition code mode CC_V to represent the overflow bit. * config/arm/arm.c (maybe_get_arm_condition_code): Add support for CC_Vmode. (arm_gen_unlikely_cbranch): New function to generate common rtl conditional branches for overflow patterns. * config/arm/arm-protos.h: Add prototype for arm_gen_unlikely_cbranch. * config/arm/arm.md (addv4, add3_compareV, addsi3_compareV_upper): New patterns to support signed builtin overflow add operations. (uaddv4, add3_compareC, addsi3_compareV_upper): New patterns to support unsigned builtin add overflow operations. (subv4, sub3_compare1): New patterns to support signed builtin overflow subtract operations, (usubv4): New patterns to support unsigned builtin subtract overflow operations. (negvsi3, negvdi3, negdi2_compare, negsi2_carryin_compare): New patterns to support builtin overflow negate operations. 2016-08-24 Andreas Krebbel Revert 2016-08-23 Dominik Vogt * explow.c (get_dynamic_stack_size): Take known alignment of stack pointer + STACK_DYNAMIC_OFFSET into account when calculating the size needed. 2016-08-24 Thomas Preud'homme * doc/fragments.texi (MULTILIB_REUSE): Mention that only options in MULTILIB_OPTIONS should be used. Small wording fixes. * genmultilib: Memorize set of all option combinations in combination_space. Detect if RHS of MULTILIB_REUSE uses an option not found in MULTILIB_OPTIONS by checking if option set is listed in combination_space. Output new and existing error message to stderr. 2016-08-24 Thomas Preud'homme * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping for -mcpu=cortex-a7, -mfpu=neon-fp16, -mfpu=fpv5-d16 and -mfpu=fp-armv8. Fix typo in -mfpu=vfpv3-d16-fp16 mapping. (MULTILIB_REUSE): Remove reuse rules for option set including -mfpu=fp-armv8 and -mfpu=vfpv4 2016-08-24 Sebastian Huber * config/arm/t-rtems: Add vfp multilib. 2016-08-23 Ian Lance Taylor * config/s390/s390.c (s390_asm_file_start): Call default_file_start. 2016-08-23 Michael Meissner * config/rs6000/rs6000.c (rs6000_expand_vector_init): Set initialization of all 0's to the 0 constant, instead of directly generating XOR. Add support for V4SImode vector initialization on 64-bit systems with direct move, and rework the ISA 3.0 V4SImode initialization. Change variables used in V4SFmode vector intialization. For V4SFmode vector splat on ISA 3.0, make sure any memory addresses are in index form. Add support for using VSPLTH/VSPLTB to initialize vector short and vector char vectors with all of the same element. (regno_or_subregno): New helper function to return a register number for either REG or SUBREG. (rs6000_adjust_vec_address): Do not generate ADDI ,R0,. Use regno_or_subregno where possible. (rs6000_split_v4si_init_di_reg): New helper function to build up a DImode value from two SImode values in order to generate V4SImode vector initialization on 64-bit systems with direct move. (rs6000_split_v4si_init): Split up the insns for a V4SImode vector initialization. (rtx_is_swappable_p): V4SImode vector initialization insn is not swappable. * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Add declaration. * config/rs6000/vsx.md (VSX_SPLAT_I): New mode iterators and attributes to initialize V8HImode and V16QImode vectors with the same element. (VSX_SPLAT_COUNT): Likewise. (VSX_SPLAT_SUFFIX): Likewise. (UNSPEC_VSX_VEC_INIT): New unspec. (vsx_concat_v2sf): Eliminate using 'preferred' register classes. Allow SFmode values to come from Altivec registers. (vsx_init_v4si): New insn/split for V4SImode vector initialization on 64-bit systems with direct move. (vsx_splat_, VSX_W iterator): Rework V4SImode and V4SFmode vector initializations, to allow V4SImode vector initializations on 64-bit systems with direct move. (vsx_splat_v4si): Likewise. (vsx_splat_v4si_di): Likewise. (vsx_splat_v4sf): Likewise. (vsx_splat_v4sf_internal): Likewise. (vsx_xxspltw_, VSX_W iterator): Eliminate using 'preferred' register classes. (vsx_xxspltw__direct, VSX_W iterator): Likewise. (vsx_vsplt_di): New insns to support initializing V8HImode and V16QImode vectors with the same element. * config/rs6000/rs6000.h (TARGET_DIRECT_MOVE_64BIT): Disallow optimization if -maltivec=be. 2016-08-23 Christophe Lyon * config/arm/arm.md (arm_movqi_insn): Swap predicable_short_it attribute for alternatives 3 and 4. 2016-08-23 David Malcolm * selftest.c (selftest::assert_str_contains): New function. (selftest::test_assertions): Verify ASSERT_STR_CONTAINS. * selftest.h (selftest::assert_str_contains): New decl. (ASSERT_STR_CONTAINS): New macro. 2016-08-23 Richard Biener PR tree-optimization/77286 * tree-vect-loop.c (vect_analyze_loop_form_1): Do not modify the CFG here. (vect_transform_loop): Split exit edges of loop and scalar loop if required and at the appropriate time. 2016-08-23 Dominik Vogt * explow.c (get_dynamic_stack_size): Take known alignment of stack pointer + STACK_DYNAMIC_OFFSET into account when calculating the size needed. Correct a typo in a comment. 2016-08-23 Dominik Vogt * config/s390/s390.md ("*andc_split"): New splitter for and with complement. 2016-08-23 Richard Biener PR tree-optimization/27336 * tree-vrp.c (infer_value_range): Handle stmts that can throw by looking for a non-EH edge. (process_assert_insertions_for): Likewise. 2016-08-23 Richard Biener PR middle-end/77305 * statistics.c (statistics_counter_event): Robustify against NULL current_pass. 2016-08-23 Venkataramanan Kumar * config/i386/i386.c (processor_alias_table): Enable PTA_PRFCHW for targets amdfam10 and barcelona. 2016-08-22 Uros Bizjak * config/i386/i386.md (*zero_extendsidi2): Add (*r,*k) alternative. (zero_extenddi2): Ditto. (*zero_extendsi2): Ditto. (*zero_extendqihi2): Ditto. 2016-08-22 Joseph Myers PR middle-end/77269 * builtins.c (fold_builtin_classify): Use builtin_decl_explicit (BUILT_IN_SIGNBIT) to expand __builtin_isinf_sign. 2016-08-22 Patrick Palka * print-tree.c (print_node) [VECTOR_CST]: Coalesce the output of identical consecutive elements. [SSA_NAME]: Print the name's def stmt on its own line. When printing the node's def stmt, avoid printing an unwanted trailing newline by replacing the call to print_gimple_stmt() with its inlined body and adjusting it to not set pp_needs_newline and to call pp_flush() instead of pp_newline_and_flush(). 2016-08-22 Joseph Myers * tree.h (CASE_FLT_FN_FLOATN_NX, float16_type_node) (float32_type_node, float64_type_node, float32x_type_node) (float128x_type_node): New macros. * builtin-types.def (BT_FLOAT16, BT_FLOAT32, BT_FLOAT64) (BT_FLOAT128, BT_FLOAT32X, BT_FLOAT64X, BT_FLOAT128X) (BT_FN_FLOAT16, BT_FN_FLOAT32, BT_FN_FLOAT64, BT_FN_FLOAT128) (BT_FN_FLOAT32X, BT_FN_FLOAT64X, BT_FN_FLOAT128X) (BT_FN_FLOAT16_FLOAT16, BT_FN_FLOAT32_FLOAT32) (BT_FN_FLOAT64_FLOAT64, BT_FN_FLOAT128_FLOAT128) (BT_FN_FLOAT32X_FLOAT32X, BT_FN_FLOAT64X_FLOAT64X) (BT_FN_FLOAT128X_FLOAT128X, BT_FN_FLOAT16_CONST_STRING) (BT_FN_FLOAT32_CONST_STRING, BT_FN_FLOAT64_CONST_STRING) (BT_FN_FLOAT128_CONST_STRING, BT_FN_FLOAT32X_CONST_STRING) (BT_FN_FLOAT64X_CONST_STRING, BT_FN_FLOAT128X_CONST_STRING) (BT_FN_FLOAT16_FLOAT16_FLOAT16, BT_FN_FLOAT32_FLOAT32_FLOAT32) (BT_FN_FLOAT64_FLOAT64_FLOAT64, BT_FN_FLOAT128_FLOAT128_FLOAT128) (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X) (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X) (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X): New type definitions. * builtins.def (DEF_GCC_FLOATN_NX_BUILTINS): New macro. (copysign, fabs, huge_val, inf, nan, nans): Use it. * builtins.c (expand_builtin): Use CASE_FLT_FN_FLOATN_NX for fabs and copysign. (fold_builtin_0): Use CASE_FLT_FN_FLOATN_NX for inf and huge_val. (fold_builtin_1): Use CASE_FLT_FN_FLOATN_NX for fabs. * doc/extend.texi (Other Builtins): Document these built-in functions. * fold-const-call.c (fold_const_call): Use CASE_FLT_FN_FLOATN_NX for nan and nans. 2016-08-22 Gerald Pfeifer * doc/install.texi (Binaries): www.opencsw.org now uses https. 2016-08-22 Richard Biener * tree-ssa-forwprop.c (pass_forwprop::execute): Use RPO order. 2016-08-21 Uros Bizjak PR target/77270 * config/i386/i386.md (prefetch): When TARGET_PRFCHW or TARGET_PREFETCHWT1 are disabled, emit 3dNOW! write prefetches for non-SSE2 athlons only, otherwise prefer SSE prefetches. 2016-08-20 Kugan Vivekanandarajah * tree-vrp.c (vrp_visit_assignment_or_call): Changed to Return VR. (vrp_visit_cond_stmt): Just sets TAKEN_EDGE_P. (vrp_visit_switch_stmt): Likewise. (extract_range_from_stmt): Factored out from vrp_visit_stmt. (extract_range_from_phi_node): Factored out from vrp_visit_phi_stmt. (vrp_visit_stmt): Use extract_range_from_stmt. (vrp_visit_phi_node): Use extract_range_from_phi_node. 2016-08-20 Kugan Vivekanandarajah * Makefile.in: Add tree-vrp.h to GTFILES. * gengtype.c (open_base_files): Add tree-vrp.h. * asan.c: Add tree-vrp.h which now has the definition value_range_type. * builtins.c: Likewise. * fold-const.c: Likewise. * gimple-builder.c: Likewise. * gimple-laddress.c: Likewise. * hsa-gen.c: Likewise. * internal-fn.c: Likewise. * ssa.h: Likewise. * targhooks.c: Liewise, * tree-ssa-address.c: Likewise. * tree-ssanames.h (value_range_type: Move to tree-vrp.h. * tree-vrp.c (struct value_range): Move to tree-vrp.h * tree-vrp.h: New file. 2016-08-20 Kugan Vivekanandarajah PR tree-optimization/61839 * tree-vrp.c (two_valued_val_range_p): New. (simplify_stmt_using_ranges): Convert CST BINOP VAR where VAR is two-valued to VAR == VAL1 ? (CST BINOP VAL1) : (CST BINOP VAL2). Also Convert VAR BINOP CST where VAR is two-valued to VAR == VAL1 ? (VAL1 BINOP CST) : (VAL2 BINOP CST). 2016-08-19 David Malcolm * diagnostic-show-locus.c (layout::annotation_line_showed_range_p): New method. (layout::print_any_fixits): Remove case fixit_hint::REMOVE. Reimplement case fixit_hint::REPLACE to cover removals, and replacements where the range of the replacement isn't one of the ranges in the rich_location. (test_one_liner_fixit_replace): Likewise. (selftest::test_one_liner_fixit_replace_non_equal_range): New function. (selftest::test_one_liner_fixit_replace_equal_secondary_range): New function. (selftest::test_diagnostic_show_locus_one_liner): Call the new functions. * diagnostic.c (print_parseable_fixits): Remove case fixit_hint::REMOVE. 2016-08-19 Uros Bizjak PR target/77270 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_PRFCHW from entries that also have PTA_3DNOW flag. Enable SSE prefetch also for TARGET_PREFETCHWT1. Do not try to enable TARGET_PRFCHW ISA flag here. * config/i386/i386.md (prefetch): Enable also for TARGET_3DNOW. Rewrite expander function body. (*prefetch_3dnow): Enable for TARGET_3DNOW and TARGET_PREFETCHWT1. 2016-08-19 Joseph Myers PR c/32187 * tree-core.h (TI_COMPLEX_FLOAT16_TYPE) (TI_COMPLEX_FLOATN_NX_TYPE_FIRST, TI_COMPLEX_FLOAT32_TYPE) (TI_COMPLEX_FLOAT64_TYPE, TI_COMPLEX_FLOAT128_TYPE) (TI_COMPLEX_FLOAT32X_TYPE, TI_COMPLEX_FLOAT64X_TYPE) (TI_COMPLEX_FLOAT128X_TYPE, TI_FLOAT16_TYPE, TI_FLOATN_TYPE_FIRST) (TI_FLOATN_NX_TYPE_FIRST, TI_FLOAT32_TYPE, TI_FLOAT64_TYPE) (TI_FLOAT128_TYPE, TI_FLOATN_TYPE_LAST, TI_FLOAT32X_TYPE) (TI_FLOATNX_TYPE_FIRST, TI_FLOAT64X_TYPE, TI_FLOAT128X_TYPE) (TI_FLOATNX_TYPE_LAST, TI_FLOATN_NX_TYPE_LAST): New enum tree_index values. (NUM_FLOATN_TYPES, NUM_FLOATNX_TYPES, NUM_FLOATN_NX_TYPES): New macros. (struct floatn_type_info): New structure type. (floatn_nx_types): New variable declaration. * tree.h (FLOATN_TYPE_NODE, FLOATN_NX_TYPE_NODE) (FLOATNX_TYPE_NODE, float128_type_node, float64x_type_node) (COMPLEX_FLOATN_NX_TYPE_NODE): New macros. * tree.c (floatn_nx_types): New variable. (build_common_tree_nodes): Initialize _FloatN, _FloatNx and corresponding complex types. * target.def (floatn_mode): New hook. * targhooks.c: Include "real.h". (default_floatn_mode): New function. * targhooks.h (default_floatn_mode): New prototype. * doc/extend.texi (Floating Types): Document _FloatN and _FloatNx types. * doc/sourcebuild.texi (float@var{n}, float@var{n}x): Document new effective-target and dg-add-options keywords. (float@var{n}_runtime, float@var{n}x_runtime, floatn_nx_runtime): Document new effective-target keywords. * doc/tm.texi.in (TARGET_FLOATN_MODE): New @hook. * doc/tm.texi: Regenerate. * ginclude/float.h (LDBL_DECIMAL_DIG): Define to __LDBL_DECIMAL_DIG__, not __DECIMAL_DIG__. [__STDC_WANT_IEC_60559_TYPES_EXT__]: Define macros from TS 18661-3. * real.h (struct real_format): Add field ieee_bits. * real.c (ieee_single_format, mips_single_format) (motorola_single_format, spu_single_format, ieee_double_format) (mips_double_format, motorola_double_format) (ieee_extended_motorola_format, ieee_extended_intel_96_format) (ieee_extended_intel_128_format) (ieee_extended_intel_96_round_53_format, ibm_extended_format) (mips_extended_format, ieee_quad_format, mips_quad_format) (vax_f_format, vax_d_format, vax_g_format, decimal_single_format) (decimal_double_format, decimal_quad_format, ieee_half_format) (arm_half_format, real_internal_format: Initialize ieee_bits field. * config/i386/i386.c (ix86_init_builtin_types): Do not initialize float128_type_node. Set float80_type_node to float64x_type_node if appropriate and long_double_type_node not appropriate. * config/ia64/ia64.c (ia64_init_builtins): Likewise. * config/pdp11/pdp11.c (pdp11_f_format, pdp11_d_format): Initialize ieee_bits field. * config/rs6000/rs6000.c (TARGET_FLOATN_MODE): New macro. (rs6000_init_builtins): Set ieee128_float_type_node to float128_type_node. (rs6000_floatn_mode): New function. 2016-08-19 Jakub Jelinek * config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step, _rdseed64_step): Uglify argument names and/or local variable names in inline functions. * config/i386/rtmintrin.h (_xabort): Likewise. * config/i386/avx512vlintrin.h (_mm256_ternarylogic_epi64, _mm256_mask_ternarylogic_epi64, _mm256_maskz_ternarylogic_epi64, _mm256_ternarylogic_epi32, _mm256_mask_ternarylogic_epi32, _mm256_maskz_ternarylogic_epi32, _mm_ternarylogic_epi64, _mm_mask_ternarylogic_epi64, _mm_maskz_ternarylogic_epi64, _mm_ternarylogic_epi32, _mm_mask_ternarylogic_epi32, _mm_maskz_ternarylogic_epi32): Likewise. * config/i386/lwpintrin.h (__llwpcb, __lwpval32, __lwpval64, __lwpins32, __lwpins64): Likewise. * config/i386/avx2intrin.h (_mm_i32gather_pd, _mm_mask_i32gather_pd, _mm256_i32gather_pd, _mm256_mask_i32gather_pd, _mm_i64gather_pd, _mm_mask_i64gather_pd, _mm256_i64gather_pd, _mm256_mask_i64gather_pd, _mm_i32gather_ps, _mm_mask_i32gather_ps, _mm256_i32gather_ps, _mm256_mask_i32gather_ps, _mm_i64gather_ps, _mm_mask_i64gather_ps, _mm256_i64gather_ps, _mm256_mask_i64gather_ps, _mm_i32gather_epi64, _mm_mask_i32gather_epi64, _mm256_i32gather_epi64, _mm256_mask_i32gather_epi64, _mm_i64gather_epi64, _mm_mask_i64gather_epi64, _mm256_i64gather_epi64, _mm256_mask_i64gather_epi64, _mm_i32gather_epi32, _mm_mask_i32gather_epi32, _mm256_i32gather_epi32, _mm256_mask_i32gather_epi32, _mm_i64gather_epi32, _mm_mask_i64gather_epi32, _mm256_i64gather_epi32, _mm256_mask_i64gather_epi32): Likewise. * config/i386/pmm_malloc.h (_mm_malloc, _mm_free): Likewise. * config/i386/ia32intrin.h (__writeeflags): Likewise. * config/i386/pkuintrin.h (_wrpkru): Likewise. * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd, _mm512_mask_prefetch_i32gather_ps, _mm512_mask_prefetch_i64gather_pd, _mm512_mask_prefetch_i64gather_ps, _mm512_prefetch_i32scatter_pd, _mm512_prefetch_i32scatter_ps, _mm512_mask_prefetch_i32scatter_pd, _mm512_mask_prefetch_i32scatter_ps, _mm512_prefetch_i64scatter_pd, _mm512_prefetch_i64scatter_ps, _mm512_mask_prefetch_i64scatter_pd, _mm512_mask_prefetch_i64scatter_ps): Likewise. * config/i386/gmm_malloc.h (_mm_malloc, _mm_free): Likewise. * config/i386/avx512fintrin.h (_mm512_ternarylogic_epi64, _mm512_mask_ternarylogic_epi64, _mm512_maskz_ternarylogic_epi64, _mm512_ternarylogic_epi32, _mm512_mask_ternarylogic_epi32, _mm512_maskz_ternarylogic_epi32, _mm512_i32gather_ps, _mm512_mask_i32gather_ps, _mm512_i32gather_pd, _mm512_i64gather_ps, _mm512_i64gather_pd, _mm512_i32gather_epi32, _mm512_i32gather_epi64, _mm512_i64gather_epi32, _mm512_i64gather_epi64): Likewise. * config/i386/fxsrintrin.h (_fxsave): Remove return keyword in inlines returning void. (_fxrstor, _fxsave64, _fxrstor64): Likewise. * config/i386/xsaveintrin.h (_xsave, _xrstor, _xsave64, _xrstor64): Likewise. * config/i386/xsaveoptintrin.h (_xsaveopt, _xsaveopt64): Likewise. * config/i386/pkuintrin.h (_wrpkru): Likewise. Add space after function name. (_rdpkru_u32): Add space after function name. * config/i386/t-i386 (i386-c.o): Don't depend on i386-builtin-types.inc. (i386.o): Depend on i386-builtin-types.inc. 2016-08-19 Matthew Wahab PR target/77281 * config/arm/arm.c (neon_valid_immediate): Delete declaration. Use const_vec_duplicate to check for duplicated elements. 2016-08-19 Richard Biener PR tree-optimization/77290 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Fix flag_tree_parallelize_loops check. 2016-08-19 Richard Biener * match.pd (x | 0 -> x): Add. 2016-08-19 Richard Biener PR tree-optimization/77286 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges): Deal with virtual PHIs being out-of-order. 2016-08-18 David Malcolm * doc/invoke.texi (fverbose-asm): Note that source code lines are emitted, and provide an example. * final.c (asm_show_source): New function. (final_scan_insn): Call asm_show_source. 2016-08-18 David Malcolm * diagnostic-show-locus.c (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (class colorizer): Similarly replace field m_diagnostic with m_diagnostic_kind. (colorizer::colorizer): Replace diagnostic param with diagnostic_kind. (colorizer::begin_state): Update for above field change. (layout::layout): Replace diagnostic param with rich_location * and diagnostic_kind. (diagnostic_show_locus): Replace diagnostic param with richloc and diagnostic_kind. (class selftest::test_diagnostic_context): New class. (selftest::test_diagnostic_show_locus_unknown_location): New function. (selftest::test_one_liner_simple_caret): New function. (selftest::test_one_liner_caret_and_range): New function. (selftest::test_one_liner_multiple_carets_and_ranges): New function. (selftest::test_one_liner_fixit_remove): New function. (selftest::test_one_liner_fixit_replace): New function. (selftest::test_diagnostic_show_locus_one_liner): New function. (selftest::diagnostic_show_locus_c_tests): Call the new test functions. * diagnostic.c (diagnostic_initialize): Initialize colorize_source_p, show_ruler_p and parseable_fixits_p. (default_diagnostic_finalizer): Update for change to diagnostic_show_locus. (diagnostic_append_note): Likewise. * diagnostic.h (diagnostic_show_locus): Replace const diagnostic_info * param with location * and diagnostic_t. 2016-08-18 David Malcolm * input.c (saved_line_table): New global. (class selftest::temp_line_table): Rename to line_table_test and move declaration to selftest.h, and drop field m_old_line_table. (selftest::temp_line_table::temp_line_table): Rename ctor to... (selftest::line_table_test::line_table_test): ...this. Add a default ctor. Store current value of line_table within saved_line_table. (selftest::temp_line_table::~temp_line_table): Rename dtor to... (selftest::line_table_test::~line_table_test): ...this, and restore line_table from the saved_line_table, rather than m_old_line_table. (selftest::test_accessing_ordinary_linemaps): Update for above renaming. (selftest::test_lexer): Likewise. (struct selftest::lexer_test): Likewise. (selftest::lexer_test::lexer_test): Likewise. (selftest::input_c_tests): Move the looping over test cases from here into... (selftest::for_each_line_table_case): New function. * input.h (saved_line_table): New decl. * selftest.h (struct selftest::line_table_case): New forward decl. (class selftest::line_table_test): New class, moved here from selftest::temp_line_table in input.c, and renamed. (selftest::for_each_line_table_case): New decl. 2015-08-18 H.J. Lu PR target/72839 * config/i386/i386.c (lakemont_cost): Set MOVE_RATIO to 17. 2016-08-18 Chung-Lin Tang PR middle-end/70895 * gimplify.c (omp_add_variable): Adjust/add variable mapping on enclosing parallel construct for reduction variables on OpenACC loop directives. 2016-08-18 Pierre-Marie de Rodat * dwarf2out.c (copy_dwarf_procedure): Remove obsolete comment. (new_dwarf_proc_die): Emit DW_TAG_dwarf_procedure DIEs even for -gdwarf-3. (function_to_dwarf_procedure): Update comment. 2016-08-18 David Malcolm * input.c (diagnostics_file_cache_forcibly_evict_file): New function. * input.h (diagnostics_file_cache_forcibly_evict_file): New declaration. * selftest.c (selftest::temp_source_file::~temp_source_file): Evict m_filename from the diagnostic file cache. 2016-08-18 Richard Biener * tree-pass.h (make_pass_materialize_all_clones): Declare. * ipa.c (pass_data_materialize_all_clones, pass_materialize_all_clones, make_pass_materialize_all_clones): New simple IPA pass encapsulating clone materialization. * passes.def (all_late_ipa_passes): Start with pass_materialize_all_clones. * cgraphunit.c (symbol_table::compile): Remove call to materialize_all_clones. * tree-into-ssa.c: Include statistics.h. (update_ssa): Count number of times we do incremental/rewrite SSA update. 2016-08-18 Richard Biener PR tree-optimization/77282 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): When doing auto-parallelizing also prevent use of PHIs that carry dependences across loop backedges. 2016-08-18 Tamar Christina Ramana Radhakrishnan * varasm.c (default_use_anchors_for_symbol_p): Reject too large decls. 2016-08-18 Richard Biener * ssa-iterators.h (ssa_vuse_operand): New inline. * tree-if-conv.c (ifc_temp_var): Update virtual operand. (predicate_all_scalar_phis): Use remove_phi_node to remove phi nodes predicated. Delay removing virtual PHIs. (predicate_mem_writes): Update virtual operands. (combine_blocks): Likewise. Propagate out remaining virtual PHIs. (tree_if_conversion): Do not rewrite virtual SSA form. * tree-phinodes.c (release_phi_node): Make static. * tree-phinodes.h (release_phi_node): Remove. 2016-08-18 Jakub Jelinek * config/i386/i386.c (enum ix86_builtins): Remove IX86_BUILTIN_* codes that appear in bdesc_* arrays, instead include i386-builtin.def twice to define those. (bdesc_comi, bdesc_pcmpestr, bdesc_pcmpistr, bdesc_special_args, bdesc_args, bdesc_round_args, bdesc_mpx, bdesc_mpx_const, bdesc_multi_arg): Define by including i386-builtin.def the third time. * config/i386/i386-builtin.def: New file. 2016-08-17 David Malcolm * input.c (get_source_range_for_char): Rename to... (selftest::get_source_range_for_char): ...this, and move within the #if CHECKING_P guard. (get_num_source_ranges_for_substring): Rename to... (selftest::get_num_source_ranges_for_substring): ...this, move within the #if CHECKING_P guard, and make static. (selftest::assert_num_substring_ranges): Initialize actual_num_ranges. 2016-08-18 Alan Modra PR rtl-optimization/72771 * reload.c (find_reloads): Don't assume that a subreg mem is OK when find_reloads_toplev returns address_reloaded==-1. (alternative_allows_const_pool_ref): Update comment. 2015-08-17 Alan Hayward PR tree-optimization/71752 * tree-vect-loop.c (vectorizable_reduction): Keep SLP operand ordering. * tree-vect-slp.c (vect_get_slp_defs): Handle null operands. 2016-08-17 Jakub Jelinek * gimple-fold.c (gimple_fold_call): Use gimple_call_noreturn_p instead of testing ECF_NORETURN bit in gimple_call_flags. * tree-cfg.c (make_edges_bb, execute_fixup_cfg): Likewise. * predict.c (tree_bb_level_predictions): Likewise. * gimple-low.c (gimple_stmt_may_fallthru): Likewise. PR middle-end/77259 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): If turning a call into __builtin_unreachable-like noreturn call, adjust gimple_call_set_fntype. * tree-cfgcleanup.c (fixup_noreturn_call): Remove lhs also if gimple_call_fntype has void return type. 2016-08-17 Chung-Lin Tang * omp-low.c (lower_oacc_reductions): Adjust variable lookup to use maybe_lookup_decl, to handle nested acc loop directives. 2016-08-17 Richard Biener PR tree-optimization/76490 * tree-vrp.c (update_value_range): Preserve overflow infinities when intersecting with ranges from get_range_info. (operand_less_p): Handle overflow infinities correctly. (value_range_constant_singleton): Use vrp_operand_equal_p to handle overflow max/min correctly. (vrp_valueize): Likewise. (union_ranges): Likewise. (intersect_ranges): Likewise. (vrp_visit_phi_node): Improve iteration limitation to only apply when we'll possibly re-visit the PHI via a changed argument on the backedge. 2016-08-17 Thomas Preud'homme * config/arm/t-aprofile (MULTILIB_EXCEPTIONS): Rewrite into ... (MULTILIB_REQUIRED): This by specifying multilib needing to be built rather than those that should not be built. 2016-08-17 Stanislaw Halik PR target/66488 * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Define if __x86_64__. 2016-08-17 Richard Biener * tree-ssa.c: Include tree-cfg.h and tree-dfa.h. (verify_vssa): New function verifying virtual SSA form. (verify_ssa): Call it. * tree-ssa-loop-manip.c (slpeel_update_phi_nodes_for_guard2): Do not apply loop-closed SSA handling to virtuals. * ssa-iterators.h (op_iter_init): Handle GIMPLE_TRANSACTION. * tree-into-ssa.c (prepare_use_sites_for): Skip virtual SSA names when rewriting their symbol. (prepare_def_site_for): Likewise. * tree-chkp-opt.c (chkp_reduce_bounds_lifetime): Clear virtual operands of moved stmts. 2016-08-17 Richard Biener PR tree-optimization/23855 * tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h. (tree_unswitch_outer_loop): Iterate find_loop_guard as long as we find guards to hoist. Do not update SSA form but rewrite virtuals into loop closed SSA. (find_loop_guard): Adjust to skip already hoisted guards. Do not mark virtuals for renaming or update SSA form. 2016-08-17 Martin Liska * coverage.c (get_gcov_type): Replace GCOV_TYPE_SIZE with a LONG_LONG_TYPE_SIZE comparison. * gcov-io.h: Remove macro definitions. * tree-profile.c (gimple_gen_edge_profiler): Replace usage of GCOV_TYPE_ATOMIC_FETCH_ADD with a LONG_LONG_TYPE_SIZE comparison. 2016-08-16 Jakub Jelinek * config/i386/i386.c (enum ix86_builtins): Reorder enumerators, so that builtins not mentioned in bdesc_* arrays come first, then the ones mentioned in bdesc_* arrays in the order they appear in the arrays in between IX86_BUILTIN__BDESC_*_FIRST and IX86_BUILTIN__BDESC_*_LAST enumerator. (bdesc_mpx): Fix up a comment typo. (bdesc_multi_arg): Remove __builtin_ia32_vpcomne[bwdq] and __builtin_ia32_vpcomneu[bwdq] builtins. (BDESC_VERIFY, BDESC_VERIFYS): Define. (ix86_init_mmx_sse_builtins, ix86_init_mpx_builtins): Verify enum ix86_builtins ordering. (ix86_expand_builtin): Use enum ix86_builtins ordering assumption for direct bdesc_* array member access instead of searching all the arrays until an fcode match is found. 2016-08-16 Uros Bizjak * config/i386/i386.md (*ashl3_mask): Rewrite define_insn pattern as define_insn_and_split. Split insn before reload to ashl3_1. (*3_mask): Ditto. Split insn before reload to 3_1. (*3_mask): Ditto. Split insn before reload to 3_1. 2016-08-16 David Malcolm PR c/72857 * input.c (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, adding param "caret_idx", and converting output param from source_range * to location_t *. (get_source_range_for_char): New function. (get_num_source_ranges_for_substring): Update comment to reflect above renaming. (assert_char_at_range): Update to use get_source_range_for_char rather than get_source_range_for_substring. (test_lexer_string_locations_concatenation_2): Likewise. * substring-locations.h (get_source_range_for_substring): Rename to... (get_source_location_for_substring): ...this, and adding param "caret_idx", and converting output param from source_range * to location_t *. 2016-08-16 David Malcolm * input.c (class selftest::temp_source_file): Move to selftest.h. (selftest::temp_source_file::temp_source_file): Move to selftest.c. (selftest::temp_source_file::~temp_source_file): Likewise. * selftest.c (selftest::temp_source_file::temp_source_file): Move here from input.c. (selftest::temp_source_file::~temp_source_file): Likewise. * selftest.h (class selftest::temp_source_file): Move here from input.c 2016-08-16 Jakub Jelinek PR target/71910 * tree-cfg.c (execute_fixup_cfg): Add node variable, use it. Before inlining, add cgraph edge for the added __builtin_unreachable call. PR middle-end/67485 * expmed.c (expand_mult_const): Change val_so_far's type to UHWI, only cast it to SHWI for the final comparison. 2016-08-16 Martin Liska PR gcov-profile/36412 * doc/gcov.texi: Document --hash-filenames(-x). * gcov.c (print_usage): Add the option. (process_args): Process the option, sort options alphabetically. (md5sum_to_hex): New function. (make_gcov_file_name): Do the md5sum and append it to a filename. 2016-08-16 Bin Cheng PR tree-optimization/69848 * config/aarch64/aarch64-simd.md (vcond): Invert NE and swtich operands to avoid additional NOT instruction. (vcond): Ditto. (vcondu, vcondu): Ditto. 2016-08-16 Eric Botcazou * doc/install.texi (*-*-solaris2*): Adjust latest change. 2016-08-16 Richard Biener PR tree-optimization/76783 * tree-ssa-propagate.c (ssa_prop_init): Use RPO order. Clear BB visited flags at start. 2016-08-16 Bin Cheng PR tree-optimization/72817 PR tree-optimization/73450 * tree-ssa-loop-niter.c (number_of_iterations_ne): Check multiple_of_p for adjusted IV.base. 2016-08-15 Uros Bizjak PR target/72867 * config/i386/sse.md (3): Emit ieee_3 for !flag_finite_math_only or flag_signed_zeros. (*3): Rename from *3_finite. Do not depend on flag_finite_math_only. (ieee_3): New insn pattern. (*3): Remove. (*ieee_smin3): Ditto. (*ieee_smax3): Ditto. * config/i386/mmx.md (mmx_v2sf3): Emit mmx_ieee_v2sf3 for !flag_finite_math_only or flag_signed_zeros. (*mmx_v2sf3): Rename from *mmx_v2sf3_finite. Do not depend on flag_finite_math_only. (mmx_ieee_v2sf3): New insn pattern. (*mmx_v2sf3): Remove. * config/i386/subst.md (round_saeonly_mask_arg3): New subst attribute. * config/i386/i386.c (ix86_expand_sse_fp_mimnax): Check flag_signed_zeros instead of !flag_unsafe_math_optimizations. 2016-08-15 Segher Boessenkool PR rtl-optimization/73650 * lra-constraints.c (simple_move_p): If the insn is multiple_sets it is not a simple move. 2016-08-15 Martin Liska PR driver/72765 * gcc.c (do_spec_1): Call save_string with the right size. (save_string): Do an assert about string we copy. 2016-08-15 Richard Biener * ree.c (rest_of_handle_ree): Remove redundant timevar push/pop. * config/i386/i386.c (pass_data_insert_vzeroupper): Account to TV_MACH_DEP. (pass_data_stv): Likewise. 2016-08-15 Richard Biener PR tree-optimization/73434 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Preserve TBAA info on the base when forwarding a non-invariant address. 2016-08-15 Jakub Jelinek * dwarf2out.c (struct checksum_attributes): Add at_string_length_bit_size and at_string_length_byte_size fields. (collect_checksum_attributes): Handle DW_AT_string_length_bit_size and DW_AT_string_length_byte_size. (die_checksum_ordered): Handle at_string_length_bit_size and at_string_length_byte_size. (gen_array_type_die): For dwarf_version >= 5 emit DW_AT_string_length_byte_size instead of DW_AT_byte_size. (adjust_string_types): For dwarf_version >= 5 remove DW_AT_string_length_byte_size instead of DW_AT_byte_size. (resolve_addr): Likewise. PR debug/71906 * dwarf2out.c (string_types): New variable. (gen_array_type_die): Change early_dwarf handling of DW_AT_string_length, create DW_OP_call4 referencing the length var temporarily. Handle parameters that are pointers to string length. (adjust_string_types): New function. (gen_subprogram_die): Temporarily set string_types to local var, call adjust_string_types if needed. (non_dwarf_expression, copy_deref_exprloc, optimize_string_length): New functions. (resolve_addr): Adjust DW_AT_string_length if it is DW_OP_call4. 2016-08-15 Eric Botcazou * doc/install.texi (*-*-solaris2*): Fix version number and document requirement on GNU make for building libjava with the Solaris linker. 2016-08-15 Martin Liska Jakub Jelinek PR tree-optimization/72824 * tree-loop-distribution.c (const_with_all_bytes_same) : Fix a typo. 2016-08-14 Uros Bizjak PR target/76342 * config/i386/avx512fintrin.h (_mm512_undefined_epi32): Renamed from _mm512_undefined_si512. (_mm_undefined_si512): New definition. 2016-08-13 Richard Biener * tree-ssa-forwprop.c (pass_forwprop::execute): Propagate into PHIs and update the lattice for its def. 2016-08-12 Jakub Jelinek PR c/71512 * ubsan.c (instrument_si_overflow): Pass true instead of false to gsi_replace. (pass_ubsan::execute): Call gimple_purge_dead_eh_edges at the end of bbs. Return TODO_cleanup_cfg if any returned true. 2016-08-12 Michael Meissner * config/rs6000/vsx.md (vsx_concat_): Add support for the ISA 3.0 MTVSRDD instruction. (vsx_splat_): Change cpu type of MTVSRDD instruction to vecperm. 2016-08-12 Bernd Edlinger PR tree-optimization/71083 * tree-predcom.c (ref_at_iteration): Use a COMPONENT_REF for the bitfield access when possible. 2016-08-12 Patrick Palka PR middle-end/71654 * match.pd ((T)A CMP (T)B -> A CMP B): Allow (T)A to be a sign-changing cast from a shorter unsigned type to a wider signed type. 2016-08-12 Jakub Jelinek * config/i386/sse.md (avx512dq_vextract64x2_1_maskm, vec_extract_hi__mask, vec_extract_lo__mask, vec_extract_hi__mask): Use Yk constraint instead of k. 2016-08-12 Bill Schmidt * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Correct costs for vec_construct. 2016-08-12 Bin Cheng PR tree-optimization/69848 * tree-vectorizer.h (enum vect_def_type): New condition reduction type CONST_COND_REDUCTION. * tree-vect-loop.c (vectorizable_reduction): Support new condition reudction type CONST_COND_REDUCTION. 2016-08-12 Richard Biener PR tree-optimization/57326 * tree-ssa-pre.c (fully_constant_expression): Handle simplification returning an SSA name. (phi_translate_1): When fully_constant_expression returns a NAME make sure we have a leader for it. 2016-08-12 Martin Liska Adam Fineman * gcov.c (process_file): Create .gcov file when .gcda file is missing. 2016-08-12 Marek Polacek PR c/7652 * alias.c (find_base_value): Adjust fall through comment. * cfgexpand.c (expand_debug_expr): Likewise. * combine.c (find_split_point): Likewise. (expand_compound_operation): Likewise. Add FALLTHRU. (make_compound_operation): Adjust fall through comment. (canon_reg_for_combine): Add FALLTHRU. (force_to_mode): Adjust fall through comment. (simplify_shift_const_1): Likewise. (simplify_comparison): Likewise. * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Add FALLTHRU. * config/aarch64/predicates.md: Likewise. * config/i386/i386.c (function_arg_advance_32): Likewise. (ix86_gimplify_va_arg): Likewise. (print_reg): Likewise. (ix86_print_operand): Likewise. (ix86_build_const_vector): Likewise. (ix86_expand_branch): Likewise. (ix86_sched_init_global): Adjust fall through comment. (ix86_expand_args_builtin): Add FALLTHRU. (ix86_expand_builtin): Likewise. (ix86_expand_vector_init_one_var): Likewise. * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): Likewise. (rs6000_adjust_cost): Likewise. (insn_must_be_first_in_group): Likewise. * config/rs6000/rs6000.md: Likewise. Adjust fall through comment. * dbxout.c (dbxout_symbol): Adjust fall through comment. * df-scan.c (df_uses_record): Likewise. * dojump.c (do_jump): Add FALLTHRU. * dwarf2out.c (mem_loc_descriptor): Likewise. Adjust fall through comment. (resolve_args_picking_1): Adjust fall through comment. (loc_list_from_tree_1): Likewise. * expmed.c (make_tree): Likewise. * expr.c (expand_expr_real_2): Add FALLTHRU. (expand_expr_real_1): Likewise. Adjust fall through comment. * fold-const.c (const_binop): Adjust fall through comment. (fold_truth_not_expr): Likewise. (fold_cond_expr_with_comparison): Add FALLTHRU. (fold_binary_loc): Likewise. (contains_label_1): Adjust fall through comment. (multiple_of_p): Likewise. * gcov-tool.c (process_args): Add FALLTHRU. * genattrtab.c (check_attr_test): Likewise. (write_test_expr): Likewise. * genconfig.c (walk_insn_part): Likewise. * genpreds.c (validate_exp): Adjust fall through comment. (needs_variable): Likewise. * gensupport.c (get_alternatives_number): Add FALLTHRU. (subst_dup): Likewise. * gimple-pretty-print.c (dump_gimple_assign): Likewise. * gimplify.c (gimplify_addr_expr): Adjust fall through comment. (gimplify_scan_omp_clauses): Add FALLTHRU. (goa_stabilize_expr): Likewise. * graphite-isl-ast-to-gimple.c (substitute_ssa_name): Adjust fall through comment. * hsa-gen.c (get_address_from_value): Likewise. * ipa-icf.c (sem_function::hash_stmt): Likewise. * ira.c (ira_setup_alts): Add FALLTHRU. * lra-eliminations.c (lra_eliminate_regs_1): Adjust fall through comment. * lto-streamer-out.c (lto_output_tree_ref): Add FALLTHRU. * opts.c (common_handle_option): Likewise. * read-rtl.c (read_rtx_code): Likewise. * real.c (round_for_format): Likewise. * recog.c (asm_operand_ok): Likewise. * reginfo.c (reg_scan_mark_refs): Adjust fall through comment. * reload1.c (set_label_offsets): Likewise. (eliminate_regs_1): Likewise. (reload_reg_reaches_end_p): Likewise. * rtlanal.c (commutative_operand_precedence): Add FALLTHRU. (rtx_cost): Likewise. * sched-rgn.c (is_exception_free): Likewise. * simplify-rtx.c (simplify_rtx): Adjust fall through comment. * stor-layout.c (int_mode_for_mode): Likewise. * toplev.c (print_to_asm_out_file): Likewise. (print_to_stderr): Likewise. * tree-cfg.c (gimple_verify_flow_info): Likewise. * tree-chrec.c (chrec_fold_plus_1): Add FALLTHRU. (chrec_fold_multiply): Likewise. (evolution_function_is_invariant_rec_p): Likewise. (for_each_scev_op): Likewise. * tree-data-ref.c (siv_subscript_p): Likewise. (get_references_in_stmt): Likewise. * tree.c (find_placeholder_in_expr): Adjust fall through comment. (substitute_in_expr): Likewise. (type_cache_hasher::equal): Likewise. (walk_type_fields): Likewise. * var-tracking.c (adjust_mems): Add FALLTHRU. (set_dv_changed): Adjust fall through comment. * varasm.c (default_function_section): Add FALLTHRU. 2016-08-12 Marek Polacek PR c/7652 * tree-complex.c (expand_complex_division): Add missing break. 2016-08-12 Richard Biener * passes.c (execute_todo): Do not push/pop TV_TODO. (execute_one_ipa_transform_pass): Move timevar push/pop TODO execution. (execute_one_pass): Likewise. * common.opt (ftime-report-details): New switch. * doc/invoke.texi (ftime-report-details): Document. * timevar.h (timer::print_row): Adjust signature. (timer::all_zero): New static helper. (timer::child_map_t): New typedef. (timer::time_var_def): Add children field. * timevar.c (timer::named_items::print): Adjust. (timer::~timer): Free timevar recorded children. (timer::pop_internal): When -ftime-report-details record time spent in sub-timevars. (timer::print_row): Adjust. (timer::print): Print sub-timevar stats, use all_zero. * timevar.def (TV_TODO): Remove. 2016-08-12 Richard Biener PR tree-optimization/72851 * tree-ssa-propagate.c: Include cfganal.h. Rewrite block and stmt worklists to use bitmaps indexed in execution order. (executable_blocks, cfg_blocks_num, cfg_blocks_tail, cfg_blocks_head, bb_in_list, interesting_ssa_edges, varying_ssa_edges): Remove. (cfg_blocks): Make a bitmap. (bb_to_cfg_order, cfg_order_to_bb, ssa_edge_worklist, uid_to_stmt): New globals. (cfg_blocks_empty_p): Adjust. (cfg_blocks_add): Likewise. (cfg_blocks_get): Likewise. (add_ssa_edge): Likewise. (add_control_edge): Likewise. (simulate_stmt): Likewise. (process_ssa_edge_worklist): Likewise. (simulate_block): Likewise. (ssa_prop_init): Compute PRE order and stmt UIDs. (ssa_prop_fini): Adjust. (ssa_propagate): Adjust. 2016-08-12 Richard Biener * tree-vrp.c (vrp_visit_phi_node): Allow a last iteration if the currently executable edges have fixed ranges. Always go through update_value_range. 2016-08-12 Alexandre Oliva PR debug/63240 * langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Const_tree-ify. (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Likewise. (LANG_HOOKS_FUNCTION_DECL_DEFAULTED): Set default. (LANG_HOOKS_DECLS): Add it. * langhooks.h (struct lang_hooks_for_decls): Add function_decl_defaulted. Const_tree-ify function_decl_explicit_p and function_decl_deleted_p. * dwarf2out.c (gen_subprogram_die): Add DW_AT_defaulted attribute. Add DW_AT_deleted instead of DW_AT_GNU_deleted, also at strict DWARF v5. PR debug/55641 * dwarf2out.c (decl_quals): Don't map TREE_READONLY to TYPE_QUAL_CONST in reference-typed decls. PR debug/49366 * dwarf2out.c (loc_list_from_tree_1): Expand some CONSTRUCTORs in DW_OP_pieces, just enough to handle pointers to member functions. (gen_remaining_tmpl_value_param_die_attribute): Use a location expression on DWARFv5 if a constant value doesn't work. 2016-08-11 David Malcolm * selftest-run-tests.c (selftest::run_tests): Call selftest_c_tests. * selftest.c (selftest::test_assertions): New function. (selftest::selftest_c_tests): New function. * selftest.h (selftest::selftest_c_tests): New declaration. 2016-08-11 Richard Biener Bill Schmidt PR rtl-optimization/72855 * df-core.c (df_verify): Turn off DF_VERIFY_SCHEDULED at end. 2016-08-11 Bill Schmidt PR target/72863 * vsx.md (vsx_load_): For P8LE, emit swaps at expand time. (vsx_store_): Likewise. 2015-08-11 H.J. Lu * config/i386/i386.c (timode_scalar_to_vector_candidate_p): Allow TImode CONST_WIDE_INT store. (timode_scalar_chain::convert_insn): Handle CONST_WIDE_INT store. 2015-08-11 H.J. Lu * config/i386/i386.h (MOVE_MAX_PIECES): Use TImode in 64-bit mode if unaligned SSE load and store are optimal. 2016-08-11 Bernd Edlinger PR tree-optimization/71083 * tree-predcom.c (ref_at_iteration): Correctly align the reference type. 2016-08-11 Andreas Krebbel * config/s390/s390-builtin-types.def: Add INT128 types. * config/s390/s390-builtins.def: Add INT128 variants for the add sub low-level builtins dealing with TImode. * config/s390/s390.c (s390_expand_builtin): Allow mode conversions via subreg when expanding a builtin. * config/s390/s390.md: Remove UNSPEC_VEC_ADDC_U128, UNSPEC_VEC_SUB_U128, and UNSPEC_VEC_SUBC_U128 constants. Fix comment. * config/s390/vecintrin.h: Adjust builtin names accordingly. * config/s390/vx-builtins.md ("vec_add_u128"): Remove expander. ("vec_addc", "vec_addc_u128"): Merge to "vacc_". ("vec_adde_u128"): Rename to "vacq". Change mode to TImode. ("vec_addec_u128"): Rename to "vacccq". Change mode to TImode. ("vec_subc", "vec_subc_u128"): Merge to "vscbi_". ("vec_sube_u128"): Rename to "vsbiq". Change mode to TImode. ("vec_subec_u128"): Rename to "vsbcbiq". Change mode to TImode. 2016-08-11 Andreas Krebbel * config/s390/s390-builtins.def: Mark last operand of s390_vlvg* 2016-08-11 Bin Cheng * config/aarch64/aarch64-simd.md (vcond): Delete unused declaration. (vcond): Ditto. (vcondu, vcondu): Ditto. 2016-08-11 Bin Cheng * config/aarch64/aarch64-simd.md (vec_cmp): Init variable explicitly, also assert on it before use. 2016-08-11 Richard Biener PR tree-optimization/72772 * cfgloopmanip.c (create_preheader): Use split_edge if there is a single loop entry, avoiding degenerate PHIs. 2016-08-11 Richard Biener * tree-ssa-threadbackward.c (pass_data_thread_jumps): Remove unconditional TODO_cleanup_cfg. (pass_thread_jumps::execute): Initialize loops, perform a CFG cleanup only if we threaded a jump. 2016-08-11 Alan Modra PR target/71680 * lra-constraints.c (simplify_operand_subreg): Allow subreg mode for mem when SLOW_UNALIGNED_ACCESS if inner mode is also slow. Emit two reloads for slow mem case, first loading in fast innermode, then converting to required mode. 2016-08-10 Kelvin Nilsen * config/rs6000/altivec.h (vec_extract_exp): New macro. (vec_extract_sig): New macro. (vec_insert_exp): New macro. (vec_test_data_class): New macro. (scalar_extract_exp): New macro. (scalar_extract_sig): New macro. (scalar_insert_exp): New macro. (scalar_test_data_class): New macro. (scalar_test_neg): New macro. (scalar_cmp_exp_gt): New macro. (scalar_cmp_exp_lt): New macro. (scalar_cmp_exp_eq): New macro. (scalar_cmp_exp_unordered): New macro. * config/rs6000/predicates.md (u7bit_cint_operand): New predicate to enforce constraint that operand is a 7-bit unsigned literal. * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_1): New macro for power9 built-ins. (BU_P9V_VSX_2): Likewise. (BU_P9V_64BIT_VSX_2): Likewise. (VSEEDP): Add scalar extract exponent support. (VSEESP): Add scalar extract signature support. (VSTDCNDP): Add scalar test negative support. (VSTDCNSP): Likewise. (VSIEDP): Add scalar insert exponent support. (VSCEDPGT): Add scalar compare exponent greater than support. (VSCEDPLT): Add scalar compare exponent less than support. (VSCEDPEQ): Add scalar compare exponent test-for-equality support. (VSCEDPUO): Add scalar compare exponent test-for-unordered support. (VSTDCDP): Add scalar test data class support. (VSTDCSP): Likewise. (VSEEDP): Add overload support for scalar extract exponent operation. (VSESDP): Add overload support for scalar extract signature operation. (VSTDCN): Add overload support for scalar test negative operation. (VSTDCNDP): Add overload support for scalar test negative operation. (VSTDCNSP): Add overload support for scalar test negative operation. (VSIEDP): Add overload support for scalar insert exponent operation. (VSTDC): Add overload support for scalar test data class operation. (VSTDCDP): Add overload support for scalar test data class operation. (VSTDCSP): Add overload support for scalar test data class opreation. (VSCEDPGT): Add overload support for scalar compare exponent greater than operation. (VSCEDPLT): Add overload support for scalar compare exponent less than operation. (VSCEDPEQ): Add overload support for scalar compare exponent test-for-equality operation. (VSCEDPUO): Add overload support for scalar compare exponent test-for-unordered operation. (VEEDP): Add vector extract exponent support. (VEESP): Likewise. (VESDP): Add vector extract significand support. (VESSP): Likewise. (VIEDP): Add vector insert exponent support. (VIESP): Likewise. (VTDCDP): Add vector test data class support. (VTDCSP): Likewise. (VES): Add overload support for vector extract significand operation. (VESDP): Likewise. (VESSP): Likewise (VEE): Add overload support for vector extract exponent operation. (VEEDP): Likewise. (VEESP): Likewise. (VTDC): Add overload support for vector test data class operation. (VTDCDP): Likewise. (VTDCSP): Likewise. (VIE): Add overload support for vector insert exponent operation. (VIEDP): Likewise. (VIESP): Likewise. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded binary floating point functions. (altivec_resolve_overloaded_builtin): Improve error messages to distinguish between functions not supported in the current compiler configuration and functions that were invoked with an invalid parameter combination, and include the built-in function name in both error messages. * config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_name): New prototype. * config/rs6000/rs6000.c (rs6000_overloaded_builtin_name): New function. (rs6000_expand_binop_builtin): Add check to enforce that argument 2 of the test data class operations is a 7-bit unsigned literal. (rs6000_invalid_builtin): Add code to issue an error message if a built-in function that requires the power9_vector and -m32 command-line options is compiled without these options. * config/rs6000/vsx.md (UNSPEC_VSX_SXEXPDP): New value. (UNSPEC_VSX_SXSIGDP): New value. (UNSPEC_VSX_SXSIGPDP): New value. (UNSPEC_VSX_SIEXPDP): New value. (UNSPEC_VSX_SCMPEXPDP): New value. (UNSPEC_VSX_STSTDC): New value. (UNSPEC_VSX_VXEXP): New value. (UNSPEC_VSX_VXSIG): New value. (UNSPEC_VSX_VIEXP): New value. (UNSPEC_VSX_VTSTDC): New value. (xsxexpdp): New insn for scalar extract exponent. (xsxsigdp): New insn for scalar extract significand. (xsiexpdp): New insn for scalar insert exponent. (xscmpexpdp_): New expansion for scalar compare exponents. (*xscmpexpdp): New insn for scalar compare exponents. (xststdc): New expansion for both single- and double-precision scalar test for negative value operations. (*xststdc): New insn for scalar test data class operation. (xvxexp): New insn for single- and double-precision vector extract exponent operation. (xvxsig): New insn for single- and double-precision vector extract significand operation. (xviexp): New insn for single- and double-precision vector insert exponent operation. (xvtstdc): New insn for single- and double-precision vector test data class operation. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document built-in functions to represent the Power9 binary floating-point support instructions. 2016-08-10 bin cheng * doc/sourcebuild.texi (@item vect_cond_mixed): New item. 2016-08-10 Alan Lawrence Renlin Li Bin Cheng * config/aarch64/iterators.md (V_cmp_mixed, v_cmp_mixed): New. * config/aarch64/aarch64-simd.md (v2di3): Call gen_vcondv2div2di instead of gen_aarch64_vcond_internalv2div2di. (aarch64_vcond_internal): Delete pattern. (aarch64_vcond_internal): Ditto. (vcond): Ditto. (vcond): Re-implement using vec_cmp and vcond_mask. (vcondu): Ditto. (vcond): New pattern. (vcondu): New pattern. (aarch64_cmtst): Revise comment using aarch64_vcond instead of aarch64_vcond_internal. 2016-08-10 Alan Lawrence Renlin Li Bin Cheng * config/aarch64/aarch64-simd.md (vec_cmp): New pattern. (vec_cmp): New pattern. (vec_cmpu): New pattern. (vcond_mask_): New pattern. 2016-08-10 Yuri Rumyantsev PR tree-optimization/71734 * tree-ssa-loop-im.c (ref_indep_loop_p): Add new argument REF_LOOP, invoke ref_indep_loop_p_1. (outermost_indep_loop): Pass LOOP argumnet where REF was defined to ref_indep_loop_p. (ref_indep_loop_p_1): Fix commentary, add argument REF_LOOP, combine it with ref_indep_lopp_p_2, update SAFELEN if only REF is inside LOOP, do not cache dpendence value for loops with non-zero SAFELEN. (ref_indep_loop_p_2): Delete function. (can_sm_ref_p): Pass LOOP as additional argument to ref_indep_loop_p. 2016-08-10 Michael Meissner PR target/72853 * config/rs6000/rs6000.c (mem_operand_ds_form): Add check for op being an offsettable address. 2016-08-10 Martin Liska PR gcov-profile/58306 * tree-profile.c (gimple_init_edge_profiler): Create conditionally atomic variants of profile update functions. 2016-08-10 Martin Liska Cherry picked (and modified) from google-4_7 branch 2012-12-26 Rong Xu * common.opt (fprofile-update): Add new flag. * coretypes.h: Define enum profile_update. * doc/invoke.texi: Document -fprofile-update. * gcov-io.h: Declare GCOV_TYPE_ATOMIC_FETCH_ADD and GCOV_TYPE_ATOMIC_FETCH_ADD_FN. * tree-profile.c (gimple_init_edge_profiler): Generate also atomic profiler update. (gimple_gen_edge_profiler): Likewise. 2016-08-10 David Malcolm * toplev.c (finalize): Set aux_info_file, asm_out_file, and stack_usage_file to NULL after fclose calls. 2016-08-10 Senthil Kumar Selvaraj PR target/71873 * reload.c (push_reload): Compute subreg_in_class for subregs of constants and plus expressions. Remove special handling of SYMBOL_REFs. 2016-08-10 Alan Modra PR target/71680 * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return SImode for TARGET_E500_DOUBLE when given SImode. 2016-08-09 David Wohlferd * config/i3836/avx512fintrin.h (_mm512_cvtsepi64_epi32): Remove unused variable __O. 2016-08-09 Martin Liska * doc/gcov.texi: Change _gcov_dump to __gcov_dump and _gcov_reset to __gcov_reset. * doc/gcov-tool.texi: Fix typo. 2016-08-09 Martin Liska * value-prof.c (gimple_divmod_values_to_profile): Do not instrument MOD histogram if a value is not a SSA name. 2016-08-09 Martin Liska * value-prof.c (dump_histogram_value): Swap pow2 and non-pow2 values. 2016-08-09 Renlin Li PR middle-end/64971 * calls.c (prepare_call_address): Convert funexp to Pmode when necessary. * config/aarch64/aarch64.md (sibcall): Remove fix for PR 64971. (sibcall_value): Likewise. 2016-08-09 Marek Polacek PR c/7652 * cselib.c (cselib_expand_value_rtx_1): Add return. * gengtype.c (dbgprint_count_type_at): Likewise. * hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Likewise. * reg-stack.c (get_true_reg): Restructure to avoid fallthrough warning. 2016-08-09 Martin Jambor PR ipa/71981 * ipa-polymorphic-call.c (get_dynamic_type): Bail out gracefully if instance is a MEM_REF. 2016-08-09 Uros Bizjak PR target/72843 * config/i386/i386.md (*movtf_internal): Use lra_in_progress || reload_completed instead of !can_create_pseudo_p in the insn constraint. (*movxf_internal): Ditto. (*movdf_internal): Ditto. (*movsf_internal): Ditto. 2016-08-09 Bin Cheng PR tree-optimization/72772 * tree-ssa-loop-niter.c (loop_exits_before_overflow): Check equality for expanded base. 2016-08-09 Bin Cheng PR tree-optimization/72772 * tree-ssa-loop-niter.h (simplify_using_initial_conditions): Delete parameter STOP. * tree-ssa-loop-niter.c (tree_simplify_using_condition_1): Delete parameter STOP and update calls. Move expand_simple_operations function call from here... (simplify_using_initial_conditions): ...to here. Delete parameter STOP. (tree_simplify_using_condition): Delete parameter STOP. * tree-scalar-evolution.c (simple_iv_with_niters): Update call to simplify_using_initial_conditions. 2016-08-09 Matthew Fortune PR c/65345 * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use create_tmp_var_raw instead of create_tmp_var. 2016-08-09 Richard Biener * tree-ssa-threadbackward.c (profitable_jump_thread_path): Treat same SSA names related. 2016-08-09 Jakub Jelinek PR tree-optimization/72824 * tree-loop-distribution.c (const_with_all_bytes_same): Verify real_zerop is not negative. 2016-08-09 Richard Biener PR tree-optimization/71802 * tree-cfgcleanup.c (cleanup_tree_cfg_bb): Make sure to catch all merge opportunities with the predecessor. 2016-08-09 Richard Biener PR ipa/68273 * ipa-prop.c (ipa_modify_formal_parameters): Build parameter types with natural alignment also for the over-aligned case. 2016-08-08 Andi Kleen * tree-vrp.c (get_single_symbol): Always initialize inv and neg. 2016-08-08 David Malcolm PR c/64955 * langhooks-def.h (LANG_HOOKS_RUN_LANG_SELFTESTS): New default do-nothing langhook. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_RUN_LANG_SELFTESTS. * langhooks.h (struct lang_hooks): Add run_lang_selftests. * selftest-run-tests.c: Include "tree.h" and "langhooks.h". (selftest::run_tests): Call lang_hooks.run_lang_selftests. 2016-08-08 David Malcolm PR bootstrap/72844 * input.c: Ensure that HAVE_ICONV is defined. 2016-08-08 Jakub Jelinek PR middle-end/72781 * omp-low.c (lower_lastprivate_clauses): Set TREE_NO_WARNING on the private vars for lastprivate and for linear iterator. PR middle-end/68762 * omp-simd-clone.c: Include varasm.h. (simd_clone_create): Copy over DECL_COMDAT, DECL_WEAK, DECL_EXTERNAL, DECL_VISIBILITY, DECL_VISIBILITY_SPECIFIED, DECL_DLLIMPORT_P and for DECL_ONE_ONLY call make_decl_one_only. Fix up spelling in comment and update function name. 2016-07-29 Pitchumani Sivanupandi * config/avr/driver-avr.c (specfiles_doc_url): Remove. (avr_diagnose_devicespecs_error): Remove. (avr_devicespecs_file): Remove composing absolute path for specfile and its verbose info. Remove conditions to check specs-file, 2016-08-08 Jakub Jelinek PR rtl-optimization/72821 * lra-spills.c (regno_in_use_p): Don't use BLOCK_FOR_INSN on barriers, just return false for them. 2016-08-08 Alan Modra PR target/72771 * config/rs6000/rs6000.c (toc_relative_expr_p): Allow (lo_sum (high)) toc refs created during reload. Update function comment. 2016-08-08 Alan Modra PR target/72802 * config/rs6000/rs6000.md (mov_hardfloat): Sort alternatives. Put loads first, then stores, and reg/reg moves within same class later. Delete attr length. 2016-08-08 Alan Modra PR target/72802 * config/rs6000/rs6000.c (mem_operand_gpr): Remove vsx dform test. (mem_operand_ds_form): New predicate. * config/rs6000/rs6000-protos.h (mem_operand_ds_form): Declare. * config/rs6000/constraints.md (wY): Use mem_operand_df_form. * config/rs6000/predicates.md (offsettable_mem_14bit_operand): Delete. * config/rs6000/rs6000.md (f32_lm2, f32_sm2): Use wY for SF. (extendsfdf2_fpr): Replace o constraint with wY. 2016-08-07 Jan Hubicka * tree-ssa-threadbackward.c: Include tree-inline.h (profitable_jump_thread_path): Use estimate_num_insns to estimate size of copied block; for cold paths reduce duplication. (find_jump_threads_backwards): Remove redundant tests. (pass_thread_jumps::gate): Enable for -Os. 2016-08-07 Jakub Jelinek PR c/72816 * stor-layout.c (layout_decl): Fix up formatting. (relayout_decl): Allow DECL to be FIELD_DECL. 2016-08-07 Alan Modra * config/rs6000/rs6000.md (fix_truncsi2): Fix mode of reg. 2016-08-07 Kugan Vivekanandarajah * data-streamer-in.c (streamer_read_wide_int): New. (streamer_read_widest_int): Renamed function. * data-streamer-out.c (streamer_write_wide_int): New (streamer_write_widest_int): Renamed function. * lto-streamer-in.c (streamer_read_wi): Renamed and moved to data-stream-in.c. (input_cfg): Call renamed function. * lto-streamer-out.c (streamer_write_wi): Renamed and moved to data-stream-out.c. (output_cfg): Call renamed function. * data-streamer.h: Add declarations. 2016-08-08 Prathamesh Kulkarni * tree-ssa-ccp.c (extend_mask): New param sgn. Remove ORing with wi::mask. (get_default_value): Adjust call to extend_mask to pass sign. (evaluate_stmt): Likewise. 2016-08-06 Jakub Jelinek * gcov.c (handle_cycle): Use INTTYPE_MAXIMUM (int64_t) instead of INT64_MAX. 2016-08-06 Prathamesh Kulkarni * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Disable transform if operand's type is pointer to function or method. 2016-08-05 Patrick Palka PR tree-optimization/18046 * tree-ssa-threadedge.c: Include cfganal.h. (simplify_control_statement_condition): If simplifying a GIMPLE_SWITCH, replace the index operand of the GIMPLE_SWITCH with the dominating ASSERT_EXPR before handing it off to VRP. Mention that a CASE_LABEL_EXPR may be returned. (thread_around_empty_blocks): Adjust to handle simplify_control_statement_condition() returning a CASE_LABEL_EXPR. (thread_through_normal_block): Likewise. * tree-vrp.c (simplify_stmt_for_jump_threading): Simplify a switch statement by trying to determine which case label will be taken. 2016-08-05 Vladimir Makarov PR rtl-optimization/69847 * lra-constraints.c (process_invariant_for_inheritance): Save pattern instead of src. (remove_inheritance_pseudos): Use the pattern. Add assert. 2016-08-05 David Malcolm * input.c (string_concat::string_concat): New constructor. (string_concat_db::string_concat_db): New constructor. (string_concat_db::record_string_concatenation): New method. (string_concat_db::get_string_concatenation): New method. (string_concat_db::get_key_loc): New method. (class auto_cpp_string_vec): New class. (get_substring_ranges_for_loc): New function. (get_source_range_for_substring): New function. (get_num_source_ranges_for_substring): New function. (class selftest::lexer_test_options): New class. (struct selftest::lexer_test): New struct. (class selftest::ebcdic_execution_charset): New class. (selftest::ebcdic_execution_charset::s_singleton): New variable. (selftest::lexer_test::lexer_test): New constructor. (selftest::lexer_test::~lexer_test): New destructor. (selftest::lexer_test::get_token): New method. (selftest::assert_char_at_range): New function. (ASSERT_CHAR_AT_RANGE): New macro. (selftest::assert_num_substring_ranges): New function. (ASSERT_NUM_SUBSTRING_RANGES): New macro. (selftest::assert_has_no_substring_ranges): New function. (ASSERT_HAS_NO_SUBSTRING_RANGES): New macro. (selftest::test_lexer_string_locations_simple): New function. (selftest::test_lexer_string_locations_ebcdic): New function. (selftest::test_lexer_string_locations_hex): New function. (selftest::test_lexer_string_locations_oct): New function. (selftest::test_lexer_string_locations_letter_escape_1): New function. (selftest::test_lexer_string_locations_letter_escape_2): New function. (selftest::test_lexer_string_locations_ucn4): New function. (selftest::test_lexer_string_locations_ucn8): New function. (selftest::uint32_from_big_endian): New function. (selftest::test_lexer_string_locations_wide_string): New function. (selftest::uint16_from_big_endian): New function. (selftest::test_lexer_string_locations_string16): New function. (selftest::test_lexer_string_locations_string32): New function. (selftest::test_lexer_string_locations_u8): New function. (selftest::test_lexer_string_locations_utf8_source): New function. (selftest::test_lexer_string_locations_concatenation_1): New function. (selftest::test_lexer_string_locations_concatenation_2): New function. (selftest::test_lexer_string_locations_concatenation_3): New function. (selftest::test_lexer_string_locations_macro): New function. (selftest::test_lexer_string_locations_stringified_macro_argument): New function. (selftest::test_lexer_string_locations_non_string): New function. (selftest::test_lexer_string_locations_long_line): New function. (selftest::test_lexer_char_constants): New function. (selftest::input_c_tests): Call the new test functions once per case within the line_table test matrix. * input.h (struct string_concat): New struct. (struct location_hash): New struct. (class string_concat_db): New class. * substring-locations.h: New header. 2016-08-05 Patrick Palka PR tree-optimization/72810 * tree-vrp.c (simplify_switch_using_ranges): Avoid changing the type of the case labels when truncating. 2016-08-05 James Greenhalgh PR Target/72819 * config/aarch64/aarch64.h (aarch64_fp16_type_node): Declare. (aarch64_fp16_ptr_type_node): Likewise. * config/aarch64/aarch64-simd-builtins.c (aarch64_fp16_ptr_type_node): Define. (aarch64_init_fp16_types): New, refactored out of... (aarch64_init_builtins): ...here, update to call aarch64_init_fp16_types. * config/aarch64/aarch64.c (aarch64_gimplify_va_arg_expr): Handle HFmode. (aapcs_vfp_sub_candidate): Likewise. 2016-08-05 Martin Liska Joshua Cranmer * gcov.c (line_t::has_block): New function. (enum loop_type): New enum. (handle_cycle): New function. (unblock): Likewise. (circuit): Likewise. (get_cycles_count): Likewise. (accumulate_line_counts): Use new loop detection algorithm. 2016-08-05 Martin Liska * gcov.c (output_intermediate_file): Rename function_info::line_next to next_file_fn. (process_file): Likewise. (read_graph_file): Likewise. (accumulate_line_counts): Likewise. (output_lines): Likewise. 2016-08-05 Richard Biener * tree-ssa-threadupdate.c (thread_block_1): Remove unnecessary restriction on threading to a loop header. 2016-08-05 Richard Biener * tree-cfgcleanup.c (tree_forwarder_block_p): Use bb_loop_header_p. * cfghooks.c (force_nonfallthru): If we ended up splitting a latch adjust loop info accordingly. 2016-08-05 Kugan Vivekanandarajah * tree-vrp.c (extract_range_basic): Check cfun->after_inlining before folding call to __builtin_constant_p with parameters to false. 2016-08-05 Alan Modra * config/rs6000/rs6000.c (rs6000_preferred_reload_class): Delete code accidentally committed 2016-05-02 providing class when given NO_REGS. 2016-08-04 Patrick Palka * tree-vrp.c (simplify_switch_using_ranges): Try to truncate the case label ranges that partially overlap with OP's value range. 2016-08-04 Uros Bizjak PR target/72805 * config/i386/avx512fintrin.h (_mm512_cmp_epi32_mask) [!__OPTIMIZE__]: Cast builtin function result to __mmask16 instead of __mmask8. (_mm512_cmp_epu32_mask) [!__OPTIMIZE__]: Ditto. (_mm512_mask_cmp_epi32_mask) [!__OPTIMIZE__]: Ditto. (_mm512_mask_cmp_epu32_mask) [!__OPTIMIZE__]: Ditto. 2016-08-04 David Malcolm * selftest.h (ASSERT_TRUE): Reimplement in terms of... (ASSERT_TRUE_AT): New macro. (ASSERT_FALSE): Reimplement in terms of... (ASSERT_FALSE_AT): New macro. (ASSERT_STREQ_AT): Fix typo in comment. 2016-08-04 Patrick Palka * gimple.c (preprocess_case_label_vec_for_gimple): When the case labels are exhaustive, designate the label with the widest range to be the default label. 2016-08-04 Andrew Pinski * config/aarch64/aarch64.c (thunderx_vector_cost): New variable. (thunderx_tunings): Use thunderx_vector_cost instead of generic_vector_cost. 2016-08-04 Martin Liska * gcov.c (main): Fix GNU coding style. (output_intermediate_file): Likewise. (process_file): Likewise. (generate_results): Likewise. (release_structures): Likewise. (create_file_names): Likewise. (find_source): Likewise. (read_graph_file): Likewise. (find_exception_blocks): Likewise. (canonicalize_name): Likewise. (make_gcov_file_name): Likewise. (mangle_name): Likewise. (accumulate_line_counts): Likewise. (output_branch_count): Likewise. (read_line): Likewise. 2016-08-04 Bernd Edlinger PR rtl-optimization/71779 * emit-rtl.c (set_reg_attrs_from_value): Only propagate REG_POINTER, if the value was sign-extended according to POINTERS_EXTEND_UNSIGNED or if it was truncated. PR rtl-optimization/70903 * cse.c (cse_insn): If DEST is a paradoxical SUBREG, don't record DEST. 2016-08-04 Kugan Vivekanandarajah * tree-inline.c (remap_ssa_name): Check for POINTER_TYPE_P before accessing SSA_NAME_PTR_INFO. 2016-08-04 Georg-Johann Lay PR 70677 * common/config/avr/avr-common.c (avr_option_optimization_table) [OPT_LEVELS_ALL]: Turn off -fcaller-saves. 2016-08-04 Georg-Johann Lay PR 55181 * config/avr/avr.md: New pattern to work around do_store_flag generating shift instructions for bit extractions. 2016-08-04 Kugan Vivekanandarajah * tree-vrp.c (set_value_range): Use vrp_equiv_obstack with BITMAP_ALLOC. (add_equivalence): Likewise. (get_value_range): Allocate value range with vrp_value_range_pool. (vrp_initialize): Initialize vrp_equiv_obstack for equiv allocation. (vrp_finalize): Relase vrp_equiv_obstack and vrp_value_range_pool. 2016-08-03 Peter Bergner * config/rs6000/rs6000.c (rs6000_option_override_internal): Make LRA the default for the rs6000 port. 2016-08-03 Bernd Edlinger PR middle-end/71876 * calls.c (special_function_p): Remove special handling of "setjmp_syscall", "qsetjmp", "longjmp", "siglongjmp" and the prefix "__x". Recognize "savectx", "vfork" and "getcontext" only without prefix. Remove potentially unsafe ECF_LEAF and ECF_NORETURN. 2016-08-03 Vladimir Makarov PR middle-end/72778 * lra-spills.c (regno_in_use_p): Check bb and regno modification. Don't stop on regular insns. 2016-08-03 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_declare_function_name): Round frame size to DImode boundary. (nvptx_propagate): Likewise. 2016-08-03 Alan Modra * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Make scalar float access depend on TARGET_EFFICIENT_UNALIGNED_VSX. * config/rs6000/rs6000.opt (-mefficient-unaligned-vsx): Renamed from -mefficient-unaligned-vector. Note that this affects fp too. 2016-08-03 Alan Modra * config/rs6000/rs6000.c (rs6000_rtx_costs): Make unaligned mem cost more. 2016-08-03 Alan Modra * config/rs6000/rs6000.md (fix_truncsi2): Force source operand to a reg. Localize vars. 2016-08-03 Alan Modra * config/rs6000/rs6000.opt: Remove negatives from help strings and comments. 2016-08-03 Alan Modra * config/rs6000/rs6000.c (rs6000_secondary_reload_direct_move): Delete duplicated code. 2016-08-02 Vladimir Makarov PR middle-end/72778 * lra-spills.c (regno_in_use_p): New. (lra_final_code_change): Use it. 2016-08-02 Vladimir Makarov PR rtl-optimization/69847 * lra-int.h (struct lra-reg): Use restore_rtx instead of restore_regno. (lra_rtx_hash): New. * lra.c (initialize_lra_reg_info_element): Use restore_rtx instead of restore_regno. (lra_rtx_hash): Rename and move lra-remat.c::rtx_hash. * lra-remat.c (rtx_hash): Rename and Move to lra.c. * lra-spills.c (lra_final_code_change): Don't delete insn when the next insn is USE with the same reg as the current insn source. * lra-constraints.c (curr_insn_transform): Use restore_rtx instead of restore_regno. (lra_constraints_init): Call initiate_invariants. (lra_constraints_finish): Call finish_invariants. (struct invariant, invariant_t, invariant_ptr_t): New. (const_invariant_ptr_t, invariants, invariants_pool): New. (invariant_table, invariant_hash, invariant_eq_p): New. (insert_invariant, initiate_invariants, finish_invariants): New. (clear_invariants, invalid_invariant_regs): New. (inherit_reload_reg, split_reg, fix_bb_live_info): Use restore_rtx instead of restore_regno. (invariant_p, process_invariant_for_inheritance): New. (inherit_in_ebb): Implement invariant inheritance. (lra_inheritance): Initialize and finalize invalid_invariant_regs. (remove_inheritance_pseudos): Implement undoing invariant inheritance. (undo_optional_reloads, lra_undo_inheritance): Use restore_rtx instead of restore_regno. * lra-assigns.c (regno_live_length): New. (reload_pseudo_compare_func): Use regno_live_length. (assign_by_spills): Use restore_rtx instead of restore_regno. (lra_assign): Ditto. Initiate regno_live_length. 2016-02-08 James Greenhalgh * config/aarch64/arm_neon.h (vminnm_f64): Add back missing 'f' from __builtin_aarch64_fmindf. 2016-08-02 Bin Cheng PR tree-optimization/34114 * tree-ssa-loop-niter.c (number_of_iterations_ne): Prove no-overflow information for more control IVs. 2016-08-02 Bin Cheng PR tree-optimization/34114 * fold-const.c (multiple_of_p): Improve MULT_EXPR, PLUS_EXPR, PLUS_EXPR case. Handle SSA_NAME case. 2016-08-02 Tamar Christina * config/aarch64/aarch64-simd-builtins.def (__builtin_aarch64_fmindf): Change BUILTIN_VDQF to BUILTIN_VDQF_DF. (__builtin_aarch64_fmaxdf): Likewise. (__builtin_aarch64_smin_nandf): Likewise. (__builtin_aarch64_smax_nandf): Likewise. * config/aarch64/aarch64-simd.md (3): Remove. * config/aarch64/aarch64.md (3): Rename to... (3): ...this. * config/aarch64/arm_neon.h (vmaxnm_f64): New. (vminnm_f64): Likewise. (vmin_f64): Likewise. (vmax_f64): Likewise. * config/aarch64/iterators.md (FMAXMIN): Merge with... (FMAXMIN_UNS): ...this. (fmaxmin): Merged with (fmaxmin_op): ...this... (maxmin_uns_op): ...in to this. 2016-08-01 Michael Meissner * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add support for vec_extract on vector float, vector int, vector short, and vector char vector types. * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add vector float, vector int, vector short, and vector char optimizations on 64-bit ISA 2.07 systems for both constant and variable element numbers. (rs6000_split_vec_extract_var): Likewise. * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Allow SFmode to be Altivec registers on ISA 2.07 and above. (vsx_extract_v4sf): Delete alternative that hard coded element 0, which never was matched due to the split occuring before register allocation (and the code would not have worked on little endian systems if it did match). Allow extracts to go to the Altivec registers if ISA 2.07 (power8). Change from using "" around the C++ code to using {}'s. (vsx_extract_v4sf__load): New insn to optimize vector float vec_extracts when the vector is in memory. (vsx_extract_v4sf_var): New insn to optimize vector float vec_extracts when the element number is variable on 64-bit ISA 2.07 systems. (vsx_extract_, VSX_EXTRACT_I iterator): Add optimizations for 64-bit ISA 2.07 as well as ISA 3.0. (vsx_extract__p9, VSX_EXTRACT_I iterator): Likewise. (vsx_extract__p8, VSX_EXTRACT_I iterator): Likewise. (vsx_extract__load, VSX_EXTRACT_I iterator): New insn to optimize vector int, vector short, and vector char vec_extracts when the vector is in memory. (vsx_extract__var, VSX_EXTRACT_I iterator): New insn to optimize vector int, vector short, and vector char vec_extracts when the element number is variable. 2016-08-01 Georg-Johann Lay PR target/71948 * config/avr/avr.c (AVR_SYMBOL_FLAG_TINY_PM): Use a value that does not overlap with other symbol flags. 2016-08-01 Wilco Dijkstra * config/aarch64/aarch64.h (aarch64_frame): Remove padding0 and hardfp_offset. Add locals_offset, initial_adjust, callee_adjust, callee_offset and final_adjust. * config/aarch64/aarch64.c (aarch64_layout_frame): Remove unused padding0 and hardfp_offset initializations. Choose frame layout and set frame variables accordingly. Use INVALID_REGNUM instead of FIRST_PSEUDO_REGISTER. (aarch64_push_regs): Use INVALID_REGNUM, not FIRST_PSEUDO_REGISTER. (aarch64_pop_regs): Likewise. (aarch64_expand_prologue): Remove all decision code, just emit prolog according to frame variables. (aarch64_expand_epilogue): Remove all decision code, just emit epilog according to frame variables. (aarch64_initial_elimination_offset): Use offset to local/arg area. 2015-08-01 H.J. Lu PR target/72748 * config/i386/i386.c (timode_scalar_chain::convert_insn): Call fix_debug_reg_uses after changing source register mode to V1TImode if source register is undefined. 2015-08-01 Alan Hayward PR tree-optimization/71818 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Don't advance IVs with non invariant evolutions 2016-08-01 Georg-Johann Lay PR target/72767 * config/avr/avr.md (length) [branch]: Correct insn length attribute for forward branches. 2016-08-01 Georg-Johann Lay * doc/extend.texi (AVR Built-in Functions): Document __builtin_avr_nops. * config/avr/builtins.def (NOPS): New. * config/avr/avr.c (avr_expand_nops): New static function. (avr_expand_builtin): Use it to handle AVR_BUILTIN_NOPS. 2016-08-01 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_classify_address): Use DImode when performing aarch64_offset_7bit_signed_scaled_p check for TImode LDP/STP addresses. 2016-08-01 Virendra Pathak * config/aarch64/aarch64.c (vulcan_tunings): Update vulcan L1 cache_line_size. 2016-07-30 Michael Meissner * config/rs6000/rs6000-protos.h (rs6000_adjust_vec_address): New function that takes a vector memory address, a hard register, an element number and a temporary base register, and recreates an address that points to the appropriate element within the vector. * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Likewise. (rs6000_split_vec_extract_var): Add support for the target of a vec_extract with variable element number being a scalar memory location. (rtx_is_swappable_p): VLSO insns (UNSPEC_VSX_VSLOW) are not swappable. * config/rs6000/vsx.md (vsx_extract__load): Replace vsx_extract__load insn with a new insn that optimizes storing either element to a memory location, using scratch registers to pick apart the vector and reconstruct the address. (vsx_extract___load): Likewise. (vsx_extract__store): Rework alternatives to more correctly support Altivec registers. Add support for ISA 3.0 Altivec d-form store instruction. (vsx_extract__var): Add support for extracting a variable element number from memory. 2016-07-29 Georg-Johann Lay * config/avr/avr.c (avr_out_compare): Use const0_rtx instead of 0 when testing for compares against constants of the form 0xabab. 2016-07-29 Bin Cheng PR tree-optimization/57558 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks): New function. (vect_loop_versioning): Support versioning with niter assumptions. * tree-vect-loop.c (tree-ssa-loop.h): Include header file. (vect_get_loop_niters): New parameter. Reimplement to support assumptions in loop niter info. (vect_analyze_loop_form_1, vect_analyze_loop_form): Ditto. (new_loop_vec_info): Init LOOP_VINFO_NITERS_ASSUMPTIONS. (vect_estimate_min_profitable_iters): Use LOOP_REQUIRES_VERSIONING. Support loop versioning for niters. * tree-vectorizer.c (tree-ssa-loop-niter.h): Include header file. (vect_free_loop_info_assumptions): New function. (vectorize_loops): Free loop niter info for loops with flag LOOP_F_ASSUMPTIONS set if vectorization failed. * tree-vectorizer.h (struct _loop_vec_info): New field num_iters_assumptions. (LOOP_VINFO_NITERS_ASSUMPTIONS): New macro. (LOOP_REQUIRES_VERSIONING_FOR_NITERS): New macro. (LOOP_REQUIRES_VERSIONING): New macro. (vect_free_loop_info_assumptions): New decl. 2016-07-29 Bin Cheng * cfgloop.h (struct loop): New field constraints. (LOOP_C_INFINITE, LOOP_C_FINITE): New macros. (loop_constraint_set, loop_constraint_clr, loop_constraint_set_p): New functions. * cfgloop.c (alloc_loop): Initialize new field. * cfgloopmanip.c (copy_loop_info): Copy constraints. * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions): Adjust niter analysis wrto loop constraints. * doc/loop.texi (@node Number of iterations): Add description for loop constraints. 2016-07-29 Marek Polacek PR c/7652 * config/i386/i386.c (ix86_expand_args_builtin): Add break. (ix86_expand_round_builtin): Likewise. 2016-07-29 Segher Boessenkool Georg-Johann Lay PR rtl-optimization/71976 * combine.c (get_last_value): Return 0 if the argument for which the function is called has a wider mode than the recorded value. 2016-07-29 Marek Polacek PR c/7652 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Add break. (altivec_expand_st_builtin): Likewise. 2016-07-29 Georg-Johann Lay * config/avr/avr.md (addqi3) [cc]: Revert glitch in insn attribute introduced in r238381. 2016-07-29 Kugan Vivekanandarajah PR middle-end/68217 * tree-vrp.c (extract_range_from_binary_expr_1): In case of signed & sign-bit-CST, generate [-INF, 0] instead of [-INF, INF]. 2016-07-28 Michael Meissner * config/rs6000/rs6000-protos.h (rs6000_split_vec_extract_var): New declaration. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add support for vec_extract of vector double or vector long having a variable element number on 64-bit ISA 2.07 systems or newer. * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Likewise. (rs6000_split_vec_extract_var): New function to split a vec_extract built-in function with variable element number. (rtx_is_swappable_p): Variable vec_extracts and shifts are not swappable. * config/rs6000/vsx.md (UNSPEC_VSX_VSLO): New unspec. (UNSPEC_VSX_EXTRACT): Likewise. (vsx_extract_, VSX_D iterator): Fix constraints to allow direct move instructions to be generated on 64-bit ISA 2.07 systems and newer, and to take advantage of the ISA 3.0 MFVSRLD instruction. (vsx_vslo_): New insn to do VSLO on V2DFmode and V2DImode arguments for vec_extract variable element. (vsx_extract__var, VSX_D iterator): New insn to support vec_extract with variable element on V2DFmode and V2DImode vectors. * config/rs6000/rs6000.h (TARGET_VEXTRACTUB): Remove -mupper-regs-df requirement, since it isn't needed. (TARGET_DIRECT_MOVE_64BIT): New macro to say whether we can do direct moves on 64-bit systems, which allows optimization of vec_extract on 64-bit ISA 2.07 systems and newer. 2016-07-28 Kristina Martsenko 2016-07-28 Wilco Dijkstra * config/aarch64/aarch64.md (zero_extend2_aarch64): Change output statement and type. (qihi2_aarch64): Likewise, and split into two. (extendqihi2_aarch64): New. (zero_extendqihi2_aarch64): New. * config/aarch64/iterators.md (ldrxt): Remove. * config/aarch64/aarch64.c (aarch64_rtx_costs): Change cost of uxtb/uxth. 2016-07-28 Kristina Martsenko * config/aarch64/aarch64.c (aarch64_rtx_costs): Fix cost of zero extend. 2016-07-28 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_pushwb_pair_reg): Rename. (aarch64_push_reg): New function to push 1 or 2 registers. (aarch64_pop_reg): New function to pop 1 or 2 registers. (aarch64_expand_prologue): Use aarch64_push_regs. (aarch64_expand_epilogue): Use aarch64_pop_regs. 2016-07-28 Yuri Rumyantsev PR tree-optimization/71734 * tree-ssa-loop-im.c (ref_indep_loop_p_1): Pass value of safelen attribute instead of REF_LOOP and use it. (ref_indep_loop_p_2): Use SAFELEN argument instead of REF_LOOP and set it for Loops having non-zero safelen attribute. (ref_indep_loop_p): Pass zero as initial value for safelen. 2016-07-28 Ilya Enkovich PR middle-end/72657 PR target/72683 * tree-chkp.c (chkp_retbnd_call_by_val): Check for instrumentation call using chkp_gimple_call_builtin_p. (chkp_copy_bounds_for_assign): Likewise. 2016-07-28 Trevor Saunders * config/alpha/alpha.c (alpha_adjust_cost): Adjust. * config/arm/arm-protos.h (struct tune_params): Likewise. * config/arm/arm.c (xscale_sched_adjust_cost): Likewise. (cortex_a9_sched_adjust_cost): Likewise. (fa726te_sched_adjust_cost): Likewise. (arm_adjust_cost): Likewise. * config/bfin/bfin.c (bfin_adjust_cost): Likewise. * config/c6x/c6x.c (c6x_adjust_cost): Likewise. * config/epiphany/epiphany.c (epiphany_adjust_cost): Likewise. * config/i386/i386.c (ix86_adjust_cost): Likewise. * config/ia64/ia64.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mep/mep.c (mep_adjust_cost): Likewise. * config/microblaze/microblaze.c (microblaze_adjust_cost): * Likewise. * config/mips/mips.c (mips_adjust_cost): Likewise. * config/mn10300/mn10300.c (mn10300_adjust_sched_cost): * Likewise. * config/pa/pa.c (pa_adjust_cost): Likewise. * config/rs6000/rs6000.c (rs6000_adjust_cost): Likewise. (rs6000_debug_adjust_cost): Likewise. * config/sh/sh.c (sh_adjust_cost): Likewise. * config/sparc/sparc.c (supersparc_adjust_cost): Likewise. (hypersparc_adjust_cost): Likewise. (sparc_adjust_cost): Likewise. * config/spu/spu.c (spu_sched_adjust_cost): Likewise. * config/tilegx/tilegx.c (tilegx_sched_adjust_cost): Likewise. * config/tilepro/tilepro.c (tilepro_sched_adjust_cost): * Likewise. * config/visium/visium.c (visium_adjust_cost): Likewise. * doc/tm.texi: Regenerate. * haifa-sched.c (dep_cost_1): Adjust. * target.def: Merge adjust_cost and adjust_cost_2. 2016-07-28 Trevor Saunders * haifa-sched.c (add_to_speculative_block): Make twins a vector. 2016-07-28 Trevor Saunders * store-motion.c (struct st_expr): Make pattern_regs a vector. (extract_mentioned_regs): Append to a vector instead of returning a rtx_expr_list. (st_expr_entry): Adjust. (free_st_expr_entry): Likewise. (store_ops_ok): Likewise. (store_killed_in_insn): Likewise. (find_moveable_store): Likewise. 2016-07-28 Martin Liska PR gcov-profile/68025 * tree-profile.c (tree_profiling): Respect no_profile_instrument_function attribute. * doc/extend.texi: Document no_profile_instrument_function attribute. 2016-07-28 Martin Liska PR rtl-optimization/70944 * combine.c (make_compound_operation): Do not allow make_compound_operation for vector mode 2016-07-28 Kugan Vivekanandarajah PR middle-end/71994 * tree-ssa-reassoc.c (maybe_optimize_range_tests): Check tcc_comparison before calling get_ops. 2016-07-27 Bernd Edlinger * defaults.h (LOG2_BITS_PER_UNIT): Move from here... * tree.h (LOG2_BITS_PER_UNIT): ...to here. (BITS_PER_UNIT_LOG): Remove. (int_bit_position): Use LOG2_BITS_PER_UNIT instead of BITS_PER_UNIT_LOG. * expr.c (expand_assignment): Likewise. * stor-layout.c (initialize_sizetypes): Likewise. 2016-07-27 Michael Meissner * config/rs6000/vector.md (vec_extract): Change the calling signature of rs6000_expand_vector_extract so that the element number is a RTX instead of a constant integer. * config/rs6000/rs6000-protos.h (rs6000_expand_vector_extract): Likewise. * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Likewise. (altivec_expand_vec_ext_builtin): Likewise. * config/rs6000/altivec.md (reduc_plus_scal_): Likewise. * config/rs6000/vsx.md (vsx_extract_): Fix spelling of the MFVSRLD instruction. 2016-07-27 David Malcolm * input.c (get_pure_location): Move here from tree.c. (make_location): Likewise. Add header comment. (selftest::test_accessing_ordinary_linemaps): Verify pure_location_p, make_location, get_location_from_adhoc_loc and get_range_from_loc. * input.h (get_pure_location): Move declaration here from tree.h. (get_finish): Likewise for inline function. (make_location): Likewise for declaration. * tree.c (get_pure_location): Move to input.c. (make_location): Likewise. * tree.h (get_pure_location): Move declaration to tree.h. (get_finish): Likewise for inline function. (make_location): Likewise for declaration. 2016-07-27 Prathamesh Kulkarni PR middle-end/71078 * match.pd (x / abs(x) -> copysign(1.0, x)): New pattern. 2016-07-27 David Malcolm * system.h (STATIC_ASSERT): Use static_assert if building with C++11 onwards. 2016-07-27 Richard Biener PR tree-optimization/72517 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Revert change to not compute read-read dependences. 2016-07-27 Richard Biener * predict.c (set_even_probabilities): Make nedges unsigned. 2016-07-27 Martin Liska * predict.c (set_even_probabilities): Handle unlikely edges. (combine_predictions_for_bb): Likewise. 2016-07-26 Michael Meissner PR target/71869 * config/rs6000/rs6000.c (rs6000_generate_compare): Rework __float128 support when we don't have hardware support, so that the IEEE built-in functions like isgreater, first call __unordkf3 to make sure neither operand is a NaN, and if both operands are ordered, do the normal comparison. 2016-07-26 Patrick Palka * tree-vrp.c (dump_asserts_for): Print loc->expr instead of name. (extract_code_and_val_from_cond_with_ops): Verify that name is either cond_op0 or cond_op1. 2016-07-26 Patrick Palka PR tree-optimization/18046 * genmodes.c (emit_mode_size_inline): Emit an assert that verifies that mode is a valid array index. (emit_mode_nuinits_inline): Likewise. (emit_mode_inner_inline): Likewise. (emit_mode_unit_size_inline): Likewise. (emit_mode_unit_precision_inline): Likewise. * tree-vrp.c: Include params.h. (find_switch_asserts): Register edge assertions for the default label which correspond to the anti-ranges of each case label. * params.def (PARAM_MAX_VRP_SWITCH_ASSERTIONS): New. * doc/invoke.texi: Document it. 2016-07-26 Bill Schmidt * gimple-ssa-strength-reduction.c (slsr_process_phi): Remove dead and unnecessary call to gimple_bb. 2016-07-26 Richard Biener PR rtl-optimization/71984 * simplify-rtx.c (simplify_subreg): Use GET_MODE_SIZE and prepare for VOIDmode. 2016-07-26 Richard Biener PR middle-end/72517 * expmed.c (extract_bit_field_1): Constrain the vector mode with element size matching the extraction mode size when choosing a better vector mode to do the extraction from. 2016-07-26 Richard Biener Prathamesh Kulkarni PR middle-end/70920 * match.pd ((intptr)x eq/ne CST to x eq/ne (typeof x) CST): New pattern. 2016-07-26 Trevor Saunders * tree-ssa-structalias.c (struct scc_info): Change types of members to auto_sbitmap and auto_vec. (scc_info::scc_info): New constructor. (scc_info::~scc_info): New destructor. (init_scc_info): Remove. (free_scc_info): Remove. (find_indirect_cycles): Adjust. (perform_var_substitution): Likewise. (free_var_substitution_info): Likewise. 2016-07-26 Trevor Saunders * tree-outof-ssa.c (struct elim_graph): Change type of members to auto_vec and auto_sbitmap. (elim_graph::elim_graph): New constructor. (delete_elim_graph): Remove. (expand_phi_nodes): Adjust. 2016-07-26 Trevor Saunders * tree-outof-ssa.c (struct elim_graph): Remove typedef. (new_elim_graph): Adjust. (clear_elim_graph): Likewise. (delete_elim_graph): Likewise. (elim_graph_size): Likewise. (elim_graph_add_node): Likewise. (elim_graph_add_edge): Likewise. (elim_graph_remove_succ_edge): Likewise. (eliminate_name): Likewise. (eliminate_build): Likewise. (elim_forward): Likewise. (elim_unvisited_predecessor): Likewise. (elim_backward): Likewise. (elim_create): Likewise. (eliminate_phi): Likewise. (expand_phi_nodes): Likewise. 2016-07-26 Trevor Saunders * bt-load.c (compute_out): Use auto_sbitmap class. (link_btr_uses): Likewise. * cfganal.c (mark_dfs_back_edges): Likewise. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewise. (single_pred_before_succ_order): Likewise. * cfgexpand.c (pass_expand::execute): Likewise. * cfgloop.c (verify_loop_structure): Likewise. * cfgloopmanip.c (fix_bb_placements): Likewise. (remove_path): Likewise. (update_dominators_in_loop): Likewise. * cfgrtl.c (break_superblocks): Likewise. * ddg.c (check_sccs): Likewise. (create_ddg_all_sccs): Likewise. * df-core.c (df_worklist_dataflow): Likewise. * dse.c (dse_step3): Likewise. * except.c (eh_region_outermost): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gcse.c (prune_expressions): Likewise. (prune_insertions_deletions): Likewise. * gimple-ssa-backprop.c (backprop::~backprop): Likewise. * graph.c (draw_cfg_nodes_no_loops): Likewise. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Likewise. * lcm.c (compute_earliest): Likewise. (compute_farthest): Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * lra-lives.c: Likewise. * lra.c (lra): Likewise. * modulo-sched.c (schedule_reg_moves): Likewise. (optimize_sc): Likewise. (get_sched_window): Likewise. (sms_schedule_by_order): Likewise. (check_nodes_order): Likewise. (order_nodes_of_sccs): Likewise. (order_nodes_in_scc): Likewise. * recog.c (split_all_insns): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * reload1.c (reload): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. (split_edges): Likewise. (compute_trg_info): Likewise. * sel-sched.c (init_seqno): Likewise. * store-motion.c (remove_reachable_equiv_notes): Likewise. * tree-into-ssa.c (update_ssa): Likewise. * tree-ssa-live.c (live_worklist): Likewise. * tree-ssa-loop-im.c (fill_always_executed_in): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): * Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): * Likewise. * tree-ssa-pre.c (compute_antic): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Likewise. * var-tracking.c (vt_find_locations): Likewise. 2016-07-26 Trevor Saunders * sbitmap.h (auto_sbitmap): New class. 2016-07-26 Alan Modra PR target/72103 * config/rs6000/rs6000.c (rs6000_secondary_reload): Initialize sri->t_icode. 2016-07-25 David Malcolm * input.c (selftest::temp_source_file::temp_source_file): Fix missing "%s" in fprintf. 2016-07-25 John David Anglin PR middle-end/71732 * cselib.c (cselib_process_insn): Invalidate argument slots for const/pure calls. 2016-07-25 Jiong Wang * config/aarch64/arm_neon.h (vfmah_lane_f16, vfmah_laneq_f16, vfmsh_lane_f16, vfmsh_laneq_f16, vmulh_lane_f16, vmulh_laneq_f16, vmulxh_lane_f16, vmulxh_laneq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64.md (fma, fnma): Support HF. * config/aarch64/arm_fp16.h (vfmah_f16, vfmsh_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64.md (hf3): New. (hf3): Likewise. (add3): Likewise. (sub3): Likewise. (mul3): Likewise. (div3): Likewise. (*div3): Likewise. (3): Extend to HF. * config/aarch64/aarch64-simd.md (aarch64_rsqrts): Likewise. (fabd3): Likewise. (3): Likewise. (3): Likewise. (aarch64_fmulx): Likewise. (aarch64_fac): Likewise. (aarch64_frecps): Likewise. (hfhi3): New. (hihf3): Likewise. * config/aarch64/iterators.md (VHSDF_SDF): Delete. (VSDQ_HSDI): Support HI. (fcvt_target, FCVT_TARGET): Likewise. * config/aarch64/arm_fp16.h (vaddh_f16, vsubh_f16, vabdh_f16, vcageh_f16, vcagth_f16, vcaleh_f16, vcalth_f16, vceqh_f16, vcgeh_f16, vcgth_f16, vcleh_f16, vclth_f16, vcvth_n_f16_s16, vcvth_n_f16_s32, vcvth_n_f16_s64, vcvth_n_f16_u16, vcvth_n_f16_u32, vcvth_n_f16_u64, vcvth_n_s16_f16, vcvth_n_s32_f16, vcvth_n_s64_f16, vcvth_n_u16_f16, vcvth_n_u32_f16, vcvth_n_u64_f16, vdivh_f16, vmaxh_f16, vmaxnmh_f16, vminh_f16, vminnmh_f16, vmulh_f16, vmulxh_f16, vrecpsh_f16, vrsqrtsh_f16): New. 2016-07-25 Jiong Wang * config.gcc (aarch64*-*-*): Install arm_fp16.h. * config/aarch64/aarch64-builtins.c (hi_UP): New. * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64-simd.md (aarch64_frsqrte): Extend to HF mode. (aarch64_frecp): Likewise. (aarch64_cm): Likewise. * config/aarch64/aarch64.md (2): Likewise. (l2): Likewise. (fix_trunc2): Likewise. (sqrt2): Likewise. (*sqrt2): Likewise. (abs2): Likewise. (hf2): New pattern for HF mode. (hihf2): Likewise. * config/aarch64/arm_neon.h: Include arm_fp16.h. * config/aarch64/iterators.md (GPF_F16, GPI_F16, VHSDF_HSDF): New. (w1, w2, v, s, q, Vmtype, V_cmp_result, fcvt_iesize, FCVT_IESIZE): Support HF mode. * config/aarch64/arm_fp16.h: New file. (vabsh_f16, vceqzh_f16, vcgezh_f16, vcgtzh_f16, vclezh_f16, vcltzh_f16, vcvth_f16_s16, vcvth_f16_s32, vcvth_f16_s64, vcvth_f16_u16, vcvth_f16_u32, vcvth_f16_u64, vcvth_s16_f16, vcvth_s32_f16, vcvth_s64_f16, vcvth_u16_f16, vcvth_u32_f16, vcvth_u64_f16, vcvtah_s16_f16, vcvtah_s32_f16, vcvtah_s64_f16, vcvtah_u16_f16, vcvtah_u32_f16, vcvtah_u64_f16, vcvtmh_s16_f16, vcvtmh_s32_f16, vcvtmh_s64_f16, vcvtmh_u16_f16, vcvtmh_u32_f16, vcvtmh_u64_f16, vcvtnh_s16_f16, vcvtnh_s32_f16, vcvtnh_s64_f16, vcvtnh_u16_f16, vcvtnh_u32_f16, vcvtnh_u64_f16, vcvtph_s16_f16, vcvtph_s32_f16, vcvtph_s64_f16, vcvtph_u16_f16, vcvtph_u32_f16, vcvtph_u64_f16, vnegh_f16, vrecpeh_f16, vrecpxh_f16, vrndh_f16, vrndah_f16, vrndih_f16, vrndmh_f16, vrndnh_f16, vrndph_f16, vrndxh_f16, vrsqrteh_f16, vsqrth_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd-builtins.def (reduc_smax_scal_, reduc_smin_scal_): Use VDQIF_F16. (reduc_smax_nan_scal_, reduc_smin_nan_scal_): Use VHSDF. * config/aarch64/aarch64-simd.md (reduc__scal_): Use VHSDF. (aarch64_reduc__internal): Likewise. * config/aarch64/iterators.md (VDQIF_F16): New. (vp): Support HF modes. * config/aarch64/arm_neon.h (vmaxv_f16, vmaxvq_f16, vminv_f16, vminvq_f16, vmaxnmv_f16, vmaxnmvq_f16, vminnmv_f16, vminnmvq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd.md (*aarch64_mulx_elt_to_64v2df): Rename to "*aarch64_mulx_elt_from_dup". (*aarch64_mul3_elt): Update schedule type. (*aarch64_mul3_elt_from_dup): Likewise. (*aarch64_fma4_elt_from_dup): Likewise. (*aarch64_fnma4_elt_from_dup): Likewise. * config/aarch64/iterators.md (VMUL): Supprt half precision float modes. (f, fp): Support HF modes. * config/aarch64/arm_neon.h (vfma_lane_f16, vfmaq_lane_f16, vfma_laneq_f16, vfmaq_laneq_f16, vfma_n_f16, vfmaq_n_f16, vfms_lane_f16, vfmsq_lane_f16, vfms_laneq_f16, vfmsq_laneq_f16, vfms_n_f16, vfmsq_n_f16, vmul_lane_f16, vmulq_lane_f16, vmul_laneq_f16, vmulq_laneq_f16, vmul_n_f16, vmulq_n_f16, vmulx_lane_f16, vmulxq_lane_f16, vmulx_laneq_f16, vmulxq_laneq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64-simd.md (fma4, fnma4): Extend to HF modes. * config/aarch64/arm_neon.h (vfma_f16, vfmaq_f16, vfms_f16, vfmsq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64-simd.md (aarch64_rsqrts): Extend to HF modes. (fabd3): Likewise. (3): Likewise. (3): Likewise. (aarch64_p): Likewise. (3): Likewise. (3): Likewise. (3): Likewise. (aarch64_faddp): Likewise. (aarch64_fmulx): Likewise. (aarch64_frecps): Likewise. (*aarch64_fac): Rename to aarch64_fac. (add3): Extend to HF modes. (sub3): Likewise. (mul3): Likewise. (div3): Likewise. (*div3): Likewise. * config/aarch64/aarch64.c (aarch64_emit_approx_div): Return false for HF, V4HF and V8HF. * config/aarch64/iterators.md (VDQ_HSDI, VSDQ_HSDI): New mode iterator. * config/aarch64/arm_neon.h (vadd_f16, vaddq_f16, vabd_f16, vabdq_f16, vcage_f16, vcageq_f16, vcagt_f16, vcagtq_f16, vcale_f16, vcaleq_f16, vcalt_f16, vcaltq_f16, vceq_f16, vceqq_f16, vcge_f16, vcgeq_f16, vcgt_f16, vcgtq_f16, vcle_f16, vcleq_f16, vclt_f16, vcltq_f16, vcvt_n_f16_s16, vcvtq_n_f16_s16, vcvt_n_f16_u16, vcvtq_n_f16_u16, vcvt_n_s16_f16, vcvtq_n_s16_f16, vcvt_n_u16_f16, vcvtq_n_u16_f16, vdiv_f16, vdivq_f16, vdup_lane_f16, vdup_laneq_f16, vdupq_lane_f16, vdupq_laneq_f16, vdups_lane_f16, vdups_laneq_f16, vmax_f16, vmaxq_f16, vmaxnm_f16, vmaxnmq_f16, vmin_f16, vminq_f16, vminnm_f16, vminnmq_f16, vmul_f16, vmulq_f16, vmulx_f16, vmulxq_f16, vpadd_f16, vpaddq_f16, vpmax_f16, vpmaxq_f16, vpmaxnm_f16, vpmaxnmq_f16, vpmin_f16, vpminq_f16, vpminnm_f16, vpminnmq_f16, vrecps_f16, vrecpsq_f16, vrsqrts_f16, vrsqrtsq_f16, vsub_f16, vsubq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-builtins.c (TYPES_BINOP_USS): New. * config/aarch64/aarch64-simd-builtins.def: Register new builtins. * config/aarch64/aarch64-simd.md (aarch64_rsqrte): Extend to HF modes. (neg2): Likewise. (abs2): Likewise. (2): Likewise. (l2): Likewise. (2): Likewise. (2): Likewise. (ftrunc2): Likewise. (2): Likewise. (sqrt2): Likewise. (*sqrt2): Likewise. (aarch64_frecpe): Likewise. (aarch64_cm): Likewise. * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Return false for HF, V4HF and V8HF. * config/aarch64/iterators.md (VHSDF, VHSDF_DF, VHSDF_SDF): New. (VDQF_COND, fcvt_target, FCVT_TARGET, hcon): Extend mode attribute to HF modes. (stype): New. * config/aarch64/arm_neon.h (vdup_n_f16): New. (vdupq_n_f16): Likewise. (vld1_dup_f16): Use vdup_n_f16. (vld1q_dup_f16): Use vdupq_n_f16. (vabs_f16, vabsq_f16, vceqz_f16, vceqzq_f16, vcgez_f16, vcgezq_f16, vcgtz_f16, vcgtzq_f16, vclez_f16, vclezq_f16, vcltz_f16, vcltzq_f16, vcvt_f16_s16, vcvtq_f16_s16, vcvt_f16_u16, vcvtq_f16_u16, vcvt_s16_f16, vcvtq_s16_f16, vcvt_u16_f16, vcvtq_u16_f16, vcvta_s16_f16, vcvtaq_s16_f16, vcvta_u16_f16, vcvtaq_u16_f16, vcvtm_s16_f16, vcvtmq_s16_f16, vcvtm_u16_f16, vcvtmq_u16_f16, vcvtn_s16_f16, vcvtnq_s16_f16, vcvtn_u16_f16, vcvtnq_u16_f16, vcvtp_s16_f16, vcvtpq_s16_f16, vcvtp_u16_f16, vcvtpq_u16_f16, vneg_f16, vnegq_f16, vrecpe_f16, vrecpeq_f16, vrnd_f16, vrndq_f16, vrnda_f16, vrndaq_f16, vrndi_f16, vrndiq_f16, vrndm_f16, vrndmq_f16, vrndn_f16, vrndnq_f16, vrndp_f16, vrndpq_f16, vrndx_f16, vrndxq_f16, vrsqrte_f16, vrsqrteq_f16, vsqrt_f16, vsqrtq_f16): New. 2016-07-25 Jiong Wang * config/aarch64/aarch64-simd.md (aarch64_): Use VALL_F16. (aarch64_ext): Likewise. (aarch64_rev): Likewise. * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev): Support V4HFmode and V8HFmode. * config/aarch64/arm_neon.h (__INTERLEAVE_LIST): Support float16x4_t, float16x8_t. (__aarch64_vdup_lane_f16, __aarch64_vdup_laneq_f16, __aarch64_vdupq_lane_f16, __aarch64_vdupq_laneq_f16, vbsl_f16, vbslq_f16, vdup_n_f16, vdupq_n_f16, vdup_lane_f16, vdup_laneq_f16, vdupq_lane_f16, vdupq_laneq_f16, vduph_lane_f16, vduph_laneq_f16, vext_f16, vextq_f16, vmov_n_f16, vmovq_n_f16, vrev64_f16, vrev64q_f16, vtrn1_f16, vtrn1q_f16, vtrn2_f16, vtrn2q_f16, vtrn_f16, vtrnq_f16, vuzp1_f16, vuzp1q_f16, vuzp2_f16, vuzp2q_f16, vzip1_f16, vzip2q_f16): New. (vmov_n_f16): Reimplement using vdup_n_f16. (vmovq_n_f16): Reimplement using vdupq_n_f16.. 2016-07-25 Jiong Wang * config/aarch64/aarch64.c (aarch64_add_constant): New parameter "frame_related_p". Generate CFA annotation when it's necessary. (aarch64_expand_prologue): Use aarch64_add_constant. (aarch64_expand_epilogue): Likewise. (aarch64_output_mi_thunk): Pass "false" when calling aarch64_add_constant. 2016-07-25 Jiong Wang * config/aarch64/aarch64.c (aarch64_add_constant): Optimize instruction sequences. 2016-07-25 Jiong Wang * config/aarch64/aarch64.c (aarch64_add_constant): New parameter "mode". Use aarch64_internal_mov_immediate instead of aarch64_build_constant. (aarch64_output_mi_thunk): Pass Pmode when calling aarch64_add_constant. (aarch64_build_constant): Delete. 2016-07-25 Alexander Monakov Revert 2016-07-20 Alexander Monakov * config/nvptx/nvptx.c (nvptx_option_override): Do not set flag_toplevel_reorder. 2016-07-25 Richard Biener * cgraph.c (cgraph_node::verify_node): Compare against builtin by using DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE. * tree-chkp.c (chkp_gimple_call_builtin_p): Likewise. * tree-streamer.h (streamer_handle_as_builtin_p): Remove. (streamer_get_builtin_tree): Likewise. (streamer_write_builtin): Likewise. * lto-streamer.h (LTO_builtin_decl): Remove. * lto-streamer-in.c (lto_read_tree_1): Remove assert. (lto_input_scc): Remove LTO_builtin_decl handling. (lto_input_tree_1): Liekwise. * lto-streamer-out.c (lto_output_tree_1): Remove special handling of builtins. (DFS::DFS): Likewise. * tree-streamer-in.c (streamer_get_builtin_tree): Remove. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Remove assert. (streamer_write_builtin): Remove. 2016-07-25 Martin Liska * lto-cgraph.c (input_symtab): Don't call get_working_sets if flag_auto_profile is set to true. 2016-07-25 Martin Liska PR gcov-profile/71868 * cfgloopanal.c (expected_loop_iterations_unbounded): When we have a function with multiple latches, count them all. 2016-07-25 Martin Liska * tree-ssa-loop-niter.c (loop_only_exit_p): Release body array. 2016-07-25 Martin Liska PR tree-optimization/71987 * tree-ssa-reassoc.c (maybe_optimize_range_tests): Call get_ops just for SSA_NAMEs. Fix GNU coding style. 2016-07-25 Martin Liska PR gcov-profile/64874 * gcov-io.h: Update command about file format. * gcov-iov.c (main): Adapt the numbering scheme. 2016-07-24 Kugan Vivekanandarajah PR middle-end/66726 * tree-ssa-reassoc.c (optimize_vec_cond_expr): Handle tcc_compare stmt whose result is used in PHI. (final_range_test_p): Likewise. (maybe_optimize_range_tests): Likewise. 2016-07-22 Michael Meissner * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Reformat two multi-line strings. 2016-07-22 Martin Sebor * doc/extend.texi (Compound Literals): Add '@' missed in last commit. 2016-07-22 Martin Sebor PR c/71560 * doc/extend.texi (Compound Literals): Correct and clarify. (Cast to Union): Same. 2016-07-22 Kelvin Nilsen * config/rs6000/rs6000.c (rs6000_option_override_internal): Add comments to explain why certain error messages make mention of undocumented options. (rs6000_invalid_builtin): Change error messages to replace mention of undocumented options with mention of the -mcpu=power9 option that enables those undocumented options. * config/rs6000/rs6000.h (MASK_FLOAT128): New macro. (RS6000_BTM_FLOAT128): Use the new MASK_FLOAT128 macro in the definition of this macro to correct an existing error. * config/rs6000/rs6000.opt: Add the Undocumented qualifier to the mpower9-fusion, mpower9-vector, mpower9-dform, and mmodulo entries. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Modify descriptions of built-in functions so that they depend on -mcpu=power9 instead of on the corresponding undocumented flags. * doc/invoke.texi (Option Summary): Remove all mention of newly undocumented flags. (IBM RS/6000 and PowerPC Options): Likewise. * doc/md.texi (Constraints for Particuliar Machines): Remove all mention of newly undocumented flags. 2016-07-22 Evgeny Stupachenko * ipa-cp.c (determine_versionability): Do not create constprop clones, when target_clones attribute is set. 2016-07-22 Bin Cheng * common.opt (funsafe-loop-optimizations): Mark ignore. * doc/invoke.texi (funsafe-loop-optimizations): Remove. * loop-iv.c (get_simple_loop_desc): Remove unsafe-loop-optimizations related code. * tree-ssa-loop-niter.c (finite_loop_p): Ditto. * config/bfin/bfin.c (bfin_can_use_doloop_p): Ditto. 2016-07-22 Bin Cheng * tree-ssa-loop-niter.h (number_of_iterations_exit_assumptions): New Parameter. * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions): New Parameter. (number_of_iterations_exit): Warn missed loop optimization for possible infinite loops. 2016-07-22 Segher Boessenkool PR target/71216 * config/rs6000/rs6000.c (rs6000_file_start): Fix condition for when to emit a ".machine" pseudo-op. 2016-07-22 Martin Liska PR gcov-profile/69028 PR gcov-profile/62047 * coverage.c (coverage_compute_lineno_checksum): Do not calculate checksum for fns w/o xloc.file. (coverage_compute_profile_id): Likewise. 2016-07-22 Georg-Johann Lay * config/avr/avr.c (TARGET_SECONDARY_RELOAD): Remove hook define... (avr_secondary_reload): ...and implementation. (avr_adjust_insn_length) [ADJUST_LEN_LPM]: Remove handling. * config/avr/avr.md (reload_in): Remove insns. (adjust_len) [lpm]: Remove insn attribute value. * config/avr/predicates.md (flash_operand): Remove insn predicate. 2016-07-21 Bernd Edlinger PR middle-end/71876 * builtin-attrs.def (ATTR_RT_NOTHROW_LEAF_LIST): New return twice attribute. * builtins.def (BUILT_IN_SETJMP): Use ATTR_RT_NOTHROW_LEAF_LIST here. * calls.c (special_function_p): Remove the special handling of the "__builtin_" prefix. 2016-07-21 Bernd Edlinger PR middle-end/71876 * calls.c (gimple_maybe_alloca_call_p): New function. Return true if STMT may be an alloca call. (gimple_alloca_call_p, alloca_call_p): Return only true for the builtin alloca call. * calls.h (gimple_maybe_alloca_call_p): New function. * tree-inline.c (inline_forbidden_p_stmt): Use gimple_maybe_alloca_call_p here. 2016-07-21 David Malcolm * spellcheck-tree.c (best_macro_match::best_macro_match): Explictly specify the template arguments when invoking the base class constructor, to help older C++ compilers. 2016-07-21 Jakub Jelinek PR sanitizer/71953 * asan.c (asan_dynamic_init_call): Call asan_init_shadow_ptr_types before builtin_decl_implicit. 2016-07-21 James Greenhalgh * optabs.c (emit_condiitonal_move): Short circuit for identical sources. 2016-07-21 James Greenhalgh * ifcvt.c (noce_if_info): New fields: speed_p, original_cost, max_seq_cost. Removed fields: then_cost, else_cost, branch_cost. (noce_conversion_profitable_p): New. (noce_try_store_flag_constants): Use it. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (bb_valid_for_noce_process_p): Add to the cost parameter rather than overwriting it. (noce_convert_multiple_sets): Move cost model to here, from... (bb_ok_for_noce_convert_multiple_sets) ...here. (noce_process_if_block): Update calls for above changes. (noce_find_if_block): Record new noce_if_info parameters. 2016-07-21 James Greenhalgh * target.def (max_noce_ifcvt_seq_cost): New. * doc/tm.texi.in (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Document it. * doc/tm.texi: Regenerate. * targhooks.h (default_max_noce_ifcvt_seq_cost): New. * targhooks.c (default_max_noce_ifcvt_seq_cost): New. * params.def (PARAM_MAX_RTL_IF_CONVERSION_PREDICTABLE_COST): New. (PARAM_MAX_RTL_IF_CONVERSION_UNPREDICTABLE_COST): Likewise. * doc/invoke.texi: Document new params. 2016-07-21 Richard Biener PR tree-optimization/71947 * tree-vrp.c (extract_range_from_assert): Singleton symbolic ranges have useful limit_vr information. 2016-07-21 Richard Biener * function-tests.c (build_trivial_generic_function): Set BLOCK_SUPERCONTEXT of DECL_INITIAL. * omp-low.c (create_omp_child_function): Likewise. (grid_expand_target_grid_body): Likewise. * cgraphunit.c (init_lowered_empty_function): Likewise. (cgraph_node::expand_thunk): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * ipa.c (cgraph_build_static_cdtor_1): Likewise. 2016-07-21 Prathamesh Kulkarni * tree-ssa-strlen.c (strlen_dom_walker::before_dom_children): Fix typo in comment. 2016-07-21 Georg-Johann Lay * config/avr/avr.md (any_extract, any_shiftrt): New code iterators. (*insv.extract, *insv.shiftrt, *insv.not-bit.0, *insv.not-bit.7) (*insv.xor-extract, *insv.xor1-bit.0): New insns. (adjust_len) [insv_notbit, insv_notbit_0, insv_notbit_7]: New values for insn attribute. * config/avr/avr.c (avr_out_insert_notbit): New function. (avr_adjust_insn_length): Handle ADJUST_LEN_INSV_NOTBIT, ADJUST_LEN_INSV_NOTBIT_0/_7. * config/avr/avr-protos.h (avr_out_insert_notbit): New proto. 2016-07-21 Bin Cheng * tree-chrec.c (convert_affine_scev): New parameter. Pass new arg. (chrec_convert_1, chrec_convert): Ditto. * tree-chrec.h (chrec_convert, convert_affine_scev): New parameter. * tree-scalar-evolution.c (interpret_rhs_expr): Pass new arg. * tree-vrp.c (adjust_range_with_scev): Ditto. * tree-ssa-loop-niter.c (idx_infer_loop_bounds): Ditto. (scev_var_range_cant_overflow): New function. (scev_probably_wraps_p): New parameter. Call above function. * tree-ssa-loop-niter.h (scev_probably_wraps_p): New parameter. 2016-07-21 Bin Cheng * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up by removing computation of may_be_zero. 2016-07-21 Jakub Jelinek * tree-object-size.c (unknown): Use HOST_WIDE_INT_M1U instead of -1. 2016-07-21 Andrew Sutton Improving concepts performance and diagnostics. * timevar.def (TV_CONSTRAINT_SAT, TV_CONSTRAINT_SUB): New time vars for constraint satisfaction and subsumption. * timevar.h (auto_timevar): New constructor that matches the push/pop pattern of usage in pt.c. 2016-07-20 Uros Bizjak * hwint.h (HOST_WIDE_INT_0): New define. (HOST_WIDE_INT_0U): Ditto. * double-int.c: Use HOST_WIDE_INT_0 instead of (HOST_WIDE_INT) 0. * dse.c: Use HOST_WIDE_INT_0U instead of (unsigned HOST_WIDE_INT) 0. * simplify-rtx.c: Ditto. * tree-object-size.c: Ditto. 2016-07-20 Andreas Krebbel * config/s390/s390.c (s390_encode_section_info): Remove mode size check. 2016-07-20 Uros Bizjak * cse.c: Use HOST_WIDE_INT_M1 instead of ~(HOST_WIDE_INT) 0. * combine.c: Use HOST_WIDE_INT_M1U instead of ~(unsigned HOST_WIDE_INT) 0. * double-int.h: Ditto. * dse.c: Ditto. * dwarf2asm.c:Ditto. * expmed.c: Ditto. * genmodes.c: Ditto. * match.pd: Ditto. * read-rtl.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-ssa-loop-prefetch.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-patterns.c: Ditto. * tree.c: Ditto. 2016-07-20 Georg-Johann Lay * config/avr.c (avr_legitimize_address) [AVR_TINY]: Force constant addresses outside [0,0xc0] into a register. (avr_out_movhi_r_mr_reg_no_disp_tiny): Pass insn. And handle cases where the base address register is unused after. (avr_out_movhi_r_mr_reg_disp_tiny): Same. (avr_out_movhi_mr_r_reg_disp_tiny): Same. (avr_out_store_psi_reg_disp_tiny): Same. 2016-07-20 Georg-Johann Lay Implement attribute progmem on reduced Tiny cores by adding flash offset 0x4000 to respective symbols. PR target/71948 * doc/extend.texi (AVR Variable Attributes) [progmem]: Add documentation how it works on reduced Tiny cores. (AVR Named Address Spaces): No support for reduced Tiny. * config/avr/avr.c (AVR_SYMBOL_FLAG_TINY_PM): New macro. (avr_address_tiny_pm_p): New static function. (avr_print_operand_address) [AVR_TINY]: Add AVR_TINY_PM_OFFSET if the address is in progmem. (avr_assemble_integer): Same. (avr_encode_section_info) [AVR_TINY]: Set AVR_SYMBOL_FLAG_TINY_PM for symbol_ref in progmem. * config/avr/avr.h (AVR_TINY_PM_OFFSET): New macro. * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use it instead of magic 0x4000 when built-in def'ing __AVR_TINY_PM_BASE_ADDRESS__. 2016-07-20 Patrick Palka * configure.ac (thin_archive_support): New variable. AC_SUBST it. * configure: Regenerate. * Makefile.in (THIN_ARCHIVE_SUPPORT): New variable. (USE_THIN_ARCHIVES): New variable. (libbackend.a): If USE_THIN_ARCHIVES then pass T to ar to build this archive as a thin archive. 2016-07-20 David Malcolm * diagnostic-show-locus.c (diagnostic_show_locus): If this is the same location as last time, don't skip if we have fix-it hints. Clarify the skipping logic by converting it from one "if" clause to repeated "if" clauses. * spellcheck-tree.c: Include "cpplib.h". (find_closest_macro_cpp_cb): Move here from c/c-decl.c. (best_macro_match::best_macro_match): New constructor. * spellcheck-tree.h (struct edit_distance_traits): Move here from c/c-decl.c. (class best_macro_match): Move here from c/c-decl.c, converting from a typedef to a subclass, gaining a ctor. 2016-07-20 Georg-Johann Lay * config/avr/avr-protos.h (avr_addr_space_supported_p): New prototype. * config/avr/avr.c (TARGET_ADDR_SPACE_DIAGNOSE_USAGE): New hook define... (avr_addr_space_diagnose_usage): ...and implementation. (avr_addr_space_supported_p): New function. (avr_nonconst_pointer_addrspace, avr_pgm_check_var_decl): Only report bad address space usage if that space is supported. (avr_insert_attributes): Same. No more complain about unsupported address spaces. * config/avr/avr-c.c (tm_p.h): Include it. (avr_cpu_cpp_builtins): Only define addr-space related built-in macro if avr_addr_space_supported_p. 2016-07-20 Alexander Monakov * config/nvptx/nvptx.c (nvptx_option_override): Do not set flag_toplevel_reorder. 2016-07-20 David Malcolm * gcc-rich-location.c (gcc_rich_location::add_fixit_misspelled_id): New overload, taking a const char *. * gcc-rich-location.h (gcc_rich_location::add_fixit_misspelled_id): Likewise. 2016-07-20 Georg-Johann Lay * target.def (addr_space): Add new diagnose_usage to hook vector. * targhooks.c (default_addr_space_diagnose_usage): Add default implementation and... * targhooks.h (default_addr_space_diagnose_usage): ... its prototype. * c/c-parser.c (c_lex_one_token) [CPP_NAME]: If the token is some address space, call targetm.addr_space.diagnose_usage. * doc/tm.texi.in (Named Address Spaces): Add anchor for TARGET_ADDR_SPACE_DIAGNOSE_USAGE documentation. * doc/tm.texi: Regenerate. 2016-07-20 Martin Liska PR middle-end/71898 * graphite-isl-ast-to-gimple.c (later_of_the_two): Properly handly PHI stmts. 2016-07-20 Bin Cheng PR tree-optimization/71503 PR tree-optimization/71683 * tree-if-conv.c (gen_phi_arg_condition): Record true predicate and break. 2016-07-20 Martin Liska * doc/invoke.texi (-fipa-ra): Document when the option is disabled. Fix a typo. 2016-07-20 Martin Liska * Makefile.in: Include fibonacci_heap.c * fibonacci_heap.c: New file. * fibonacci_heap.h (fibonacci_heap::insert): Use insert_node. (fibonacci_heap::union_with): Fix deletion of the second heap. * selftest-run-tests.c (selftest::run_tests): Incorporate fibonacci heap tests. * selftest.h: Declare fibonacci_heap_c_tests. 2016-07-20 Martin Liska * selftest-run-tests.c (selftest::run_tests): New function. * selftest.h (sreal_c_tests): Declare. * sreal.c (sreal_verify_basics): New function. (verify_aritmetics): Likewise. (sreal_verify_arithmetics): Likewise. (verify_shifting): Likewise. (sreal_verify_shifting): Likewise. (void sreal_c_tests): Likewise. 2016-07-19 Jakub Jelinek PR rtl-optimization/71916 * cfgrtl.c (contains_no_active_insn_p): Return false also for bb which have a single succ fake edge. 2016-07-19 Aldy Hernandez PR debug/71855 * dwarf2out.c (gen_subprogram_die): Only call gen_unspecified_parameters_die while dumping early dwarf. 2016-07-19 Jakub Jelinek PR middle-end/71874 * gimple-fold.c (fold_builtin_memory_op): Use get_addr_base_and_unit_offset instead of get_ref_base_and_extent. 2016-07-19 Uros Bizjak * builtins.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1, HOST_WIDE_INT_1U instead of (unsigned HOST_WIDE_INT) 1, HOST_WIDE_INT_M1 instead of (HOST_WIDE_INT) -1 and HOST_WIDE_INT_M1U instead of (unsigned HOST_WIDE_INT) -1. * combine.c: Ditto. * cse.c: Ditto. * dojump.c: Ditto. * double-int.c: Ditto. * dse.c: Ditto. * dwarf2out.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * fold-const.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * genmodes.c: Ditto. * hwint.c: Ditto. * hwint.h: Ditto. * ifcvt.c: Ditto. * loop-doloop.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * match.pd: Ditto. * optabs.c: Ditto. * real.c: Ditto. * reload.c: Ditto. * rtlanal.c: Ditto. * simplify-rtx.c: Ditto. * stor-layout.c: Ditto. * toplev.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * tree-vect-generic.c: Ditto. * tree-vect-patterns.c: Ditto. * tree.c: Ditto. * tree.h: Ditto. * ubsan.c: Ditto. * varasm.c: Ditto. * wide-int-print.cc: Ditto. * wide-int.cc: Ditto. * wide-int.h: Ditto. 2016-07-19 David Malcolm * selftest.c (selftest::assert_streq): Handle NULL values of val_actual and val_expected. 2016-07-19 Martin Jambor PR fortran/71688 * trans-decl.c (gfc_generate_function_code): Use cgraph_get_create_node rather than cgraph_create_node to get a call graph node. 2016-07-19 Richard Biener * gimple-fold.c (get_base_constructor): Add VIEW_CONVERT case, handle all tcc_constant bases and valueize SSA names. * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle tcc_constant bases. 2016-07-19 David Malcolm * function-tests.c (selftest::verify_three_block_rtl_cfg): Verify the flags of the exit block and bb2, not just the entry block. 2016-07-19 Richard Biener PR tree-optimization/71901 * tree-ssa-sccvn.h (struct vn_reference_op_struct): Add align member, group stuff with the bitfield. (vn_ref_op_align_unit): New inline. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): For ARRAY_REFs record element alignment and operand 3 unchanged. (ao_ref_init_from_vn_reference): Adjust. (valueize_refs_1): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. 2016-07-19 Richard Biener PR tree-optimization/71908 * tree-ssa-structalias.c (get_constraint_for_component_ref): Handle symbolic constants in a more reliable way. 2016-07-19 Ilya Enkovich * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update comment. (vect_update_inits_of_drs): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Likewise. 2016-07-19 Richard Biener PR lto/71907 * lto-streamer-out.c (DFS::DFS_write_tree_body): For blocks with an abstract origin that is not an inlined function outer scope add a self-reference as abstract origin. * tree-streamer-out.c (write_ts_block_tree_pointers): Likewise. 2016-07-18 Michael Meissner PR target/71493 * config/rs6000/rs6000.c (rs6000_function_value): Fix unintentional System V.4 structure return breakage for structures with a single floating point element. 2016-07-18 Yuri Rumyantsev PR tree-optimization/71734 * tree-ssa-loop-im.c (ref_indep_loop_p_1): Add REF_LOOP argument which contains REF, use it to check safelen, assume that safelen value must be greater 1, fix style. (ref_indep_loop_p_2): Add REF_LOOP argument. (ref_indep_loop_p): Pass LOOP as additional argument to ref_indep_loop_p_2. 2016-07-18 Dominik Vogt * cfgexpand.c (expand_stack_vars): Implement synamic stack space allocation in the prologue. * explow.c (get_dynamic_stack_base): New function to return an address expression for the dynamic stack base. (get_dynamic_stack_size): New function to do the required dynamic stack space size calculations. (allocate_dynamic_stack_space): Use new functions. (align_dynamic_address): Move some code from allocate_dynamic_stack_space to new function. * explow.h (get_dynamic_stack_base, get_dynamic_stack_size): Export. 2016-07-18 Andreas Krebbel * config/s390/s390.c (s390_encode_section_info): Always set notaligned marker if mode size is 0 or no MEM_ALIGN info could be found. 2016-07-18 Richard Biener PR tree-optimization/71893 * tree-ssa-pre.c (create_component_ref_by_pieces_1): Compensate for sizetype cast added by array_ref_element_size. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. 2016-07-16 John David Anglin * config/pa/pa.c (hppa_profile_hook): Allocate stack space for register parameters. Remove code to initialize argument pointer on TARGET_64BIT. Optimize call to _mcount when it can be reached using a pc-relative branch. Cleanup conditional code. * config/pa/pa.md (call_mcount): New expander. (call_mcount_nonpic): New insn. (call_mcount_pic): New insn and split. (call_mcount_pic_post_reload): New insn. (call_mcount_64bit): New insn and split. (call_mcount_64bit_post_reload): New insn. 2016-07-15 Georg-Johann Lay * config/avr/predicates.md (const_m255_to_m1_operand): New. * config/avr/constraints.md (Cn8, Ca1, Co1, Yx2): New constraints. * config/avr/avr.md (add3) : Fix set_vzn for +/-2. (*cmphi.zero-extend.0, *cmphi.zero-extend.1) (*usum_widenqihi3, *udiff_widenqihi3) (*addhi3_zero_extend.const): New combiner insns. (andqi3, iorqi3): Provide "l" (NO_LD_REGS) alternative if just 1 bit is affected. * config/avr/avr.c (avr_out_bitop) : Don't access xop[3]. (avr_out_compare) [EQ,NE]: Tweak comparing d-regs against -1. 2016-07-15 Cesar Philippidis * omp-low.c (lower_omp_target): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. 2016-07-15 Richard Biener PR tree-optimization/71881 * tree-loop-distribution.c (destroy_loop): Remove blocks in reverse DOM order to make debug temp generation happy. 2016-07-15 Richard Biener PR tree-optimization/71887 * tree-ssa-phiopt.c (absorbing_element_p): Add rhs arg and verify it is not zero for division / modulo handling. (value_replacement): Adjust. 2016-07-15 Virendra Pathak Julian Brown * config/aarch64/aarch64-cores.def: Update vulcan COSTS. * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs): New variable. * config/aarch64/aarch64.c (vulcan_addrcost_table): Likewise. (vulcan_regmove_cost): Likewise. (vulcan_vector_cost): Likewise. (vulcan_branch_cost): Likewise. (vulcan_tunings): Likewise. 2016-07-15 Alexander Monakov * cgraphunit.c (cgraph_order_sort_kind): New entry ORDER_VAR_UNDEF. (output_in_order): Loop over undefined variables too. Output them via assemble_undefined_decl. Skip variables that correspond to hard registers or have value-exprs. * varpool.c (symbol_table::output_variables): Handle undefined variables together with defined ones. 2016-07-15 Richard Biener * tree-ssa-pre.c (get_representative_for): Make sure to return the value number of SSA names. (phi_translate_1): get_representative_for cannot return NULL. (do_pre_regular_insertion): Remove redundant call to fully_constant_expression. (do_pre_partial_partial_insertion): Likewise. 2016-07-15 Bin Cheng * tree-scalar-evolution.c (simple_iv_with_niters): New funcion. (derive_simple_iv_with_niters): New function. (simple_iv): Rewrite using simple_iv_with_niters. * tree-scalar-evolution.h (simple_iv_with_niters): New decl. * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions): New function. (number_of_iterations_exit): Rewrite using above function. * tree-ssa-loop-niter.h (number_of_iterations_exit_assumptions): New Decl. 2016-07-15 Richard Biener * config/i386/i386.c (ix86_builtin_vectorization_cost): Adjust vec_construct cost. 2016-07-14 Jakub Jelinek PR tree-optimization/71872 * tree-data-ref.c (get_references_in_stmt): Ignore references with is_gimple_constant get_base_address. 2016-07-14 Thomas Preud'homme * config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline. (TARGET_HAVE_LDACQD): New macro. * config/arm/sync.md (atomic_loaddi): Use TARGET_HAVE_LDACQD rather than TARGET_HAVE_LDACQ. (arm_load_acquire_exclusivedi): Likewise. (arm_store_release_exclusivedi): Likewise. 2016-07-14 Thomas Preud'homme PR rtl-optimization/71878 * lra-constraints.c (match_reload): Pass information about other output operands. Create new unique register value if matching input operand shares same register value as output operand being considered. (curr_insn_transform): Record output operands already processed. 2016-07-14 Kyrylo Tkachov PR target/65951 PR tree-optimization/70923 * tree-vect-patterns.c: Include mult-synthesis.h. (target_supports_mult_synth_alg): New function. (synth_lshift_by_additions): Likewise. (apply_binop_and_append_stmt): Likewise. (vect_synth_mult_by_constant): Likewise. (target_has_vecop_for_code): Likewise. (vect_recog_mult_pattern): Use above functions to synthesize vector multiplication by integer constants. 2016-07-14 Alan Modra * config/rs6000/altivec.md (altivec_mov): Disparage gpr alternatives. Correct '*' placement on Y,r alternative. Add '*' on operand 1 of r,r alternative. 2016-07-14 Kyrylo Tkachov * expmed.c (mult_variant, choose_mult_variant): Move declaration to... * expmed.h: ... Here. 2016-07-14 Jan Hubicka * gimple.h (stmt_can_terminate_bb_p): New function. * tree-cfg.c (need_fake_edge_p): Rename to ... (stmt_can_terminate_bb_p): ... this; return true if stmt can throw external; handle const and pure calls. * tree-ssa-loop-niter.c (loop_only_exit_p): Use it. 2016-07-14 Richard Biener PR tree-optimization/71866 * tree-ssa-pre.c (get_constant_for_value_id): Remove. (do_hoist_insertion): Avoid endless recursion when we didn't insert anything because we managed to simplify things down to a constant or SSA name. (fully_constant_expression): Re-write in terms of ... * tree-ssa-sccvn.h (vn_nary_simplify): ... this. Declare. * tree-ssa-sccvn.c (vn_nary_simplify): New wrapper around vn_nary_build_or_lookup_1. (vn_nary_build_or_lookup_1): Added flag and renamed from ... (vn_nary_build_or_lookup): ... this which now wraps it. 2016-07-14 Alan Modra PR target/71733 * config/rs6000/rs6000.c (rs6000_option_override_internal): Deal with p9_vector override before power9-dform override. 2016-07-13 Andi Kleen * value-prof.c (gimple_value_profile_transformations): Don't run when auto_profile is on. 2016-07-13 Andi Kleen * auto-profile.c (update_inlined_ind_target, afdo_indirect_call): Print information to dump file. 2016-07-13 Andrew Burgess * genrecog.c (special_predicate_operand_p): New function. (predicate_name): Move function. (validate_pattern): Don't warn about missing mode for all define_special_predicate predicates. 2016-07-13 Bin Cheng * tree-vect-data-refs.c (vect_no_alias_p): New function. (vect_prune_runtime_alias_test_list): Call vect_no_alias_p to resolve alias checks which are known at compilation time. Truncate vector LOOP_VINFO_MAY_ALIAS_DDRS(loop_vinfo) if all alias checks are resolved. Move dump info for too many runtime alias checks to here... * tree-vect-loop.c (vect_analyze_loop_2): ...From here. 2016-07-13 Richard Biener PR tree-optimization/24574 * tree-ssa-phiopt.c (absorbing_element_p): Pass in argument position and add shift, rotate, divison and modulo support for left zero. (value_replacement): Pass in argument position to absorbing_element_p. 2016-07-13 Ilya Enkovich PR ipa/71633 * ipa-inline-transform.c (inline_call): Support instrumented thunks. 2016-07-13 Thomas Preud'homme * config/arm/arm.h (TARGET_HAVE_CBZ): Define. (TARGET_IDIV): Set for all Thumb targets provided they have hardware divide feature. * config/arm/arm.md (divsi3): New unpredicable alternative for ARMv8-M Baseline. Make initial alternative TARGET_32BIT only. (udivsi3): Likewise. * config/arm/thumb1.md (thumb1_cbz): New define_insn. * doc/sourcebuild.texi (arm_thumb1_cbz_ok): Document new effective target. 2016-07-13 Thomas Preud'homme * config/arm/arm.h (TARGET_HAVE_MOVT): Include ARMv8-M as having MOVT. * config/arm/arm.c (arm_arch_name): (const_ok_for_op): Check MOVT/MOVW availability with TARGET_HAVE_MOVT. (thumb_legitimate_constant_p): Strip the high part of a label_ref. (thumb1_rtx_costs): Also return 0 if setting a half word constant and MOVW is available and replace (unsigned HOST_WIDE_INT) INTVAL by UINTVAL. (thumb1_size_rtx_costs): Make set of half word constant also cost 1 extra instruction if MOVW is available. Use a cost variable incremented by COSTS_N_INSNS (1) when the condition match rather than returning an arithmetic expression based on COSTS_N_INSNS. Make constant with bottom half word zero cost 2 instruction if MOVW is available. * config/arm/arm.md (define_attr "arch"): Add v8mb. (define_attr "arch_enabled"): Set to yes if arch value is v8mb and target is ARMv8-M Baseline. (arm_movt): New unpredicable alternative for ARMv8-M Baseline. (arm_movtas_ze): Likewise. * config/arm/thumb1.md (thumb1_movdi_insn): Add ARMv8-M Baseline only alternative for constants satisfying j constraint. (thumb1_movsi_insn): Likewise. (movsi splitter for K alternative): Tighten condition to not trigger if movt is available and j constraint is satisfied. (Pe immediate splitter): Likewise. (thumb1_movhi_insn): Add ARMv8-M Baseline only alternative for constant fitting in an halfword to use MOVW. * doc/sourcebuild.texi (arm_thumb1_movt_ok): Document new ARM effective target. 2016-07-13 Richard Biener PR middle-end/71104 * gimplify.c (gimplify_modify_expr): Gimplify the RHS before gimplifying the LHS. Make sure to gimplify a returning twice call LHS without using SSA names. 2016-07-12 Trevor Saunders * tree-data-ref.c (find_data_references_in_stmt): Remove unnecessary call to vec::release. (graphite_find_data_references_in_stmt): Likewise. * tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Likewise. * tree-vect-stmts.c (vectorizable_condition): Likewise. 2016-07-12 Trevor Saunders * cfgexpand.c (expand_used_vars): Make the type of a local variable auto_vec. * genmatch.c (lower_for): Likewise. * haifa-sched.c (haifa_sched_init): Likewise. (add_to_speculative_block): Likewise. (create_check_block_twin): Likewise. * predict.c (handle_missing_profiles): Likewise. * tree-data-ref.c (loop_nest_has_data_refs): Likewise. * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Likewise. * tree-ssa-loop-niter.c (discover_iteration_bound_by_body_walk): Likewise. (maybe_lower_iteration_bound): Likewise. * tree-ssa-sccvn.c (DFS): Likewise. * tree-stdarg.c (reachable_at_most_once): Likewise. * tree-vect-stmts.c (vectorizable_conversion): Likewise. (vectorizable_store): Likewise. 2016-07-12 Trevor Saunders * tree-ssa-sccvn.c (sccvn_dom_walker::~sccvn_dom_walker): remove. (sccvn_dom_walker): make cond_stack an auto_vec. 2016-07-12 Trevor Saunders * ree.c (struct ext_state): Make type of members auto_vec. (find_and_remove_re): Adjust. 2016-07-12 Trevor Saunders * cfgexpand.c (struct stack_vars_data): Make type of fields auto_vec. (expand_used_vars): Adjust. 2016-07-12 Trevor Saunders * ipa.c (record_cdtor_fn): Adjust. (build_cdtor_fns): Likewise. (ipa_cdtor_merge): Make static_ctors and static_dtors local variables. 2016-07-12 Trevor Saunders * genextract.c (struct accum_extract): Add constructor and make members auto_vec. (gen_insn): Adjust. 2016-07-12 Trevor Saunders * tree.c (struct free_lang_data_d): Add constructor and change types of members to ones that automatically manage resources. (fld_worklist_push): Adjust. (find_decls_types): Likewise. (find_decls_types_in_eh_region): Likewise. (free_lang_data_in_cgraph): Stop manually creating and destroying members of free_lang_data_d. 2016-07-13 Uros Bizjak PR rtl-optimization/68961 * config/i386/sse.md (movsd/movhpd to movupd peephole2s): Add new peephole variant. Use sse_reg_operand predicates. 2016-07-12 Uros Bizjak * config/i386/predicates.md (x86_64_immediate_operand) : Remove unneeded truncation to DImode. : Ditto. (x86_64_zext_immediate_operand) : Ditto. 2016-07-12 Michael Meissner PR target/71805 * config/rs6000/altivec.md (altivec_vperm__internal): The xxperm and xxpermr instructions require that the 2nd input operand overlap with the output operand, and not the 1st. (altivec_vperm_v8hiv16qi): Likewise. (altivec_vperm__uns_internal): Likewise. (altivec_vpermr__internal): Likewise. (vperm_v8hiv4si): Likewise. (vperm_v16qiv8hi): Likewise. 2016-07-12 Nathan Sidwell * config/arm/arm.c (arm_option_override): Set MASK_SINGLE_PIC_BASE when -mno-pic-data-is-text-relative is in effect, by default. * doc/invoke.texi (mpic-data-is-text-relative): Document new behavior and clarify. 2016-07-12 Martin Liska * params.def: Add avg-loop niter. * tree-ssa-loop-ivopts.c (avg_loop_niter): Use the param. * cfgloopanal.c (expected_loop_iterations_unbounded): Likewise. * doc/invoke.texi: Document the new parameter. 2016-07-12 Kyrylo Tkachov PR middle-end/71700 * expr.c (store_constructor): Mask sign-extended bits when widening sub-word constructor element at the start of a word. 2016-07-12 Martin Liska * Makefile.in: Append rule for params-options.h. * params-options.h: New file. 2016-07-12 Martin Liska * ira-build.c (mark_loops_for_removal): Properly iterate loops. 2016-07-12 Steven Bosscher Richard Biener PR tree-optimization/23286 PR tree-optimization/70159 * doc/invoke.texi: Document -fcode-hoisting. * common.opt (fcode-hoisting): New flag. * opts.c (default_options_table): Enable -fcode-hoisting at -O2+. * tree-ssa-pre.c (pre_stats): Add hoist_insert. (do_regular_insertion): Rename to ... (do_pre_regular_insertion): ... this and amend general comments on insertion strathegy. (do_partial_partial_insertion): Rename to ... (do_pre_partial_partial_insertion): ... this. (do_hoist_insertion): New function. (insert_aux): Take flags on whether to do PRE and/or hoist insertion and call do_hoist_insertion properly. (insert): Adjust. (pass_pre::gate): Enable also if -fcode-hoisting is enabled. (pass_pre::execute): Register hoist_insert stats. 2016-07-12 Jakub Jelinek PR middle-end/71716 * gimple-fold.c (optimize_atomic_compare_exchange_p): Return false for SCALAR_FLOAT_TYPE_P type of expected var, or if TYPE_PRECISION is different from mode's bitsize. Small cleanup. 2016-07-12 Richard Biener PR rtl-optimization/68961 * fwprop.c (propagate_rtx): Allow SUBREGs of VEC_CONCAT and CONCAT to simplify to a non-constant. 2016-07-11 Jakub Jelinek PR middle-end/71758 * omp-low.c (expand_omp_target): Gimplify device. PR tree-optimization/71823 * tree-vect-stmts.c (vectorizable_operation): Use vect_get_vec_defs to get vec_oprnds2 from op2. 2016-07-11 Uros Bizjak * config/i386/predicates.md (x86_64_immediate_operand) : Hoist common subexpressions. (x86_64_zext_immediate_operand) : Ditto. 2016-07-11 Pat Haugen PR target/71800 * config/rs6000/rs6000.md (stfiwx): Change constraint to 'wu' to prevent generation of 'stxsiwx' on pre Power8 hardware. 2016-07-11 David Malcolm * input.c: Include cpplib.h. (selftest::temp_source_file): New class. (selftest::temp_source_file::temp_source_file): New ctor. (selftest::temp_source_file::~temp_source_file): New dtor. (selftest::should_have_column_data_p): New function. (selftest::test_should_have_column_data_p): New function. (selftest::temp_line_table): New class. (selftest::temp_line_table::temp_line_table): New ctor. (selftest::temp_line_table::~temp_line_table): New dtor. (selftest::test_accessing_ordinary_linemaps): Add case_ param; use it to create a temp_line_table. (selftest::assert_loceq): Only verify LOCATION_COLUMN for locations that are known to have column data. (selftest::line_table_case): New struct. (selftest::test_reading_source_line): Move tempfile handling to class temp_source_file. (ASSERT_TOKEN_AS_TEXT_EQ): New macro. (selftest::assert_token_loc_eq): New function. (ASSERT_TOKEN_LOC_EQ): New macro. (selftest::test_lexer): New function. (selftest::boundary_locations): New array. (selftest::input_c_tests): Call test_should_have_column_data_p. Loop over a test matrix of interesting values of location and default_range_bits, calling test_lexer on each case in the matrix. Move call to test_accessing_ordinary_linemaps into the matrix. * selftest.h (ASSERT_EQ): Reimplement in terms of... (ASSERT_EQ_AT): New macro. 2016-07-11 H.J. Lu PR target/71801 * config/i386/i386.c (timode_scalar_chain::fix_debug_reg_uses): Don't convert TImode in debug insn. 2016-07-11 Bernd Edlinger Convert TYPE_ALIGN_OK to a TYPE_LANG_FLAG. * tree-core.h (tree_base::nothrow_flag): Adjust comment. (tree_type_common::lang_flag_7): New. (tree_type_common::spare): Reduce size. * tree.h (TYPE_ALIGN_OK): Remove. (TYPE_LANG_FLAG_7): New. (get_inner_reference): Adjust header. * print-tree.c (print_node): Adjust. * expr.c (get_inner_reference): Remove parameter keep_aligning. (get_bit_range, expand_assignment, expand_expr_addr_expr_1): Adjust calls to get_inner_reference. (expand_expr_real_1): Adjust call to get_inner_reference. Remove handling of TYPE_ALIGN_OK. * builtins.c (get_object_alignment_2): Adjust call to get_inner_reference. Remove handling of VIEW_CONVERT_EXPR. * emit-rtl.c (set_mem_attributes_minus_bitpos): Remove handling of TYPE_ALIGN_OK. * asan.c (instrument_derefs): Adjust calls to get_inner_reference. * cfgexpand.c (expand_debug_expr): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref, loc_list_from_tree, fortran_common): Likewise. * fold-const.c (optimize_bit_field_compare, decode_field_reference, fold_unary_loc, fold_comparison, split_address_to_core_and_offset): Likewise. * gimple-laddress.c (execute): Likewise. * gimple-ssa-strength-reduction.c (slsr_process_ref): Likewise. * gimplify.c (gimplify_scan_omp_clauses): Likewise. * hsa-gen.c (gen_hsa_addr): Likewise. * simplifx-rtx.c (delegitimize_mem_from_attrs): Likewise. * tsan.c (instrument_expr): Likewise. * ubsan.c (instrument_bool_enum_load, instrument_object_size): Likewise. * tree.c (verify_type_variant): Remove handling of TYPE_ALIGN_OK. * tree-affine.c (tree_to_aff_combination, get_inner_reference_aff): Adjust calls to get_inner_reference. * tree-data-ref.c (split_constant_offset_1, dr_analyze_innermost): Likewise. * tree-scalar-evolution.c (interpret_rhs_expr): Likewise. * tree-sra.c (ipa_sra_check_caller): Likewise. * tree-ssa-loop-ivopts.c (split_address_cost): Likewise. * tree-ssa-math-opts.c (find_bswap_or_nop_load, bswap_replace): Likewise. * tree-vect-data-refs.c (vect_check_gather, vect_analyze_data_refs): Likewise. * config/mips/mips.c (r10k_safe_mem_expr_p): Likewise. * config/pa/pa.c (pa_emit_move_sequence): Remove handling of TYPE_ALIGN_OK. 2016-07-11 David Malcolm * Makefile.in (selftest-valgrind): New phony target. * function-tests.c (selftest::build_cfg): Delete pass instances created by the test. (selftest::convert_to_ssa): Likewise. (selftest::test_expansion_to_rtl): Likewise. * tree-cfg.c (selftest::test_linear_chain): Release dominator vectors. (selftest::test_diamond): Likewise. 2016-07-11 Richard Biener PR tree-optimization/71816 * tree-ssa-pre.c (compute_avail): Adjust alignment of ref rather than replacing all of its operands. 2016-07-11 Alan Modra * config/rs6000/rs6000.md (UNSPEC_DOLOOP): New unspec. (ctr): Add unspec. (ctr_internal*): Likewise. 2016-07-08 James Bowman * config/ft32/ft32.c (ft32_elf_encode_section_info): New function. * config/ft32/ft32.h (ASM_OUTPUT_SYMBOL_REF): New function. 2016-07-08 Vladimir Makarov PR rtl-optimization/71621 * lra-constraints.c (process_alt_operands): Check combination of reg class and mode. 2016-07-08 Jason Merrill Richard Biener P0145: Refining Expression Order for C++. * gimplify.c (initial_rhs_predicate_for): New. (gimplfy_modify_expr): Gimplify RHS before LHS. 2016-07-08 Bill Schmidt PR target/71297 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Allow standard error handling to take over when a wrong number of arguments is presented to __builtin_vec_ld () or __builtin_vec_st (). 2016-07-08 Jiong Wang * config/aarch64/aarch64-simd-builtins.def (smax): Remove float variants. (smin): Likewise. (fmax): New entry. (fmin): Likewise. * config/aarch64/arm_neon.h (vmaxnm_f32): Use __builtin_aarch64_fmaxv2sf. (vmaxnmq_f32): Likewise. (vmaxnmq_f64): Likewise. (vminnm_f32): Likewise. (vminnmq_f32): Likewise. (vminnmq_f64): Likewise. 2016-07-08 Michael Meissner PR target/71806 * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Do not enable -mfloat128-hardware by default. (ISA_3_0_MASKS_IEEE): New macro to give all of the VSX options that IEEE 128-bit hardware support needs. * config/rs6000/rs6000.c (rs6000_option_override_internal): If -mcpu=power9 -mfloat128, enable -mfloat128-hardware by default. Use ISA_3_0_MASKS_IEEE as the set of options that IEEE 128-bit floating point requires. * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mfloat128 and -mfloat128-hardware changes. 2016-07-08 Alan Hayward PR tree-optimization/71667 * tree-vect-loop.c (vectorizable_live_operation): ignore DEBUG stmts 2016-07-08 Martin Liska PR middle-end/71606 * fold-const.c (fold_convertible_p): As COMPLEX_TYPE folding produces SAVE_EXPRs, thus return false for the type. 2016-07-07 Martin Liska * file-find.c (remove_prefix): New function. * file-find.h (remove_prefix): Declare the function. * gcc-ar.c (main): Skip a folder of the wrapper if a wrapped binary would point to the same file. 2016-07-07 Jan Hubicka * tree-scalar-evolution.c (iv_can_overflow_p): export. * tree-scalar-evolution.h (iv_can_overflow_p): Declare. * tree-ssa-loop-ivopts.c (alloc_iv): Use it. 2016-07-07 Ilya Enkovich PR ipa/71624 * ipa-inline-analysis.c (compute_inline_parameters): Set local.can_change_signature to false for intrumentation thunk callees. 2016-07-07 Thomas Preud'homme * config/arm/arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability with TARGET_HAVE_MOVT. (TARGET_HAVE_MOVT): Define. * config/arm/arm.c (const_ok_for_op): Check MOVT/MOVW availability with TARGET_HAVE_MOVT. * config/arm/arm.md (arm_movt): Use TARGET_HAVE_MOVT to check MOVT availability. (addsi splitter): Use TARGET_THUMB && TARGET_HAVE_MOVT rather than TARGET_THUMB2. (symbol_refs movsi splitter): Remove TARGET_32BIT check. (arm_movtas_ze): Use TARGET_HAVE_MOVT to check MOVT availability. * config/arm/constraints.md (define_constraint "j"): Use TARGET_HAVE_MOVT to check MOVT availability. 2016-07-07 Thomas Preud'homme * config/arm/arm-protos.h: Reindent FL_FOR_* macro definitions. 2016-07-07 Thomas Preud'homme * config/arm/arm-arches.def (armv8-m.base): Define new architecture. (armv8-m.main): Likewise. (armv8-m.main+dsp): Likewise. * config/arm/arm-protos.h (FL_FOR_ARCH8M_BASE): Define. (FL_FOR_ARCH8M_MAIN): Likewise. * config/arm/arm-tables.opt: Regenerate. * config/arm/bpabi.h: Add armv8-m.base, armv8-m.main and armv8-m.main+dsp to BE8_LINK_SPEC. * config/arm/arm.h (TARGET_HAVE_LDACQ): Exclude ARMv8-M. (enum base_architecture): Add BASE_ARCH_8M_BASE and BASE_ARCH_8M_MAIN. * config/arm/arm.c (arm_arch_name): Increase size to work with ARMv8-M Baseline and Mainline. (arm_option_override_internal): Also disable arm_restrict_it when !arm_arch_notm. Update comment for -munaligned-access to also cover ARMv8-M Baseline. (arm_file_start): Increase buffer size for printing architecture name. * doc/invoke.texi: Document architectures armv8-m.base, armv8-m.main and armv8-m.main+dsp. (mno-unaligned-access): Clarify that this is disabled by default for ARMv8-M Baseline architectures as well. 2016-07-07 Thomas Preud'homme * config/arm/elf.h: Use __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to decide whether to prevent some libgcc routines being included for some multilibs rather than __ARM_ARCH_6M__ and add comment to indicate the link between this condition and the one in libgcc/config/arm/lib1func.S. 2016-07-07 Richard Biener * tree-ssa-pre.c: Include alias.h. (compute_avail): If we have multiple VN_REFERENCEs with the same hashtable entry adjust that to make it a valid replacement for all of them with respect to alignment and aliasing when doing insertion. * tree-ssa-sccvn.h (vn_reference_operands_for_lookup): Declare. * tree-ssa-sccvn.c (vn_reference_operands_for_lookup): New function. 2016-07-06 Segher Boessenkool PR target/70098 PR target/71763 * config/rs6000/rs6000.md (*ctr_internal1, *ctr_internal2, *ctr_internal5, *ctr_internal6): Add *wi to the output constraint. 2016-07-06 Trevor Saunders * var-tracking.c (struct adjust_mem_data): Make side_effects a vector. (adjust_mems): Adjust. (adjust_insn): Likewise. (prepare_call_arguments): Likewise. 2016-07-06 Trevor Saunders * gcse.c (struct ls_expr): Make stores field a vector. (ldst_entry): Adjust. (free_ldst_entry): Likewise. (print_ldst_list): Likewise. (compute_ld_motion_mems): Likewise. (update_ld_motion_stores): Likewise. 2016-07-06 Trevor Saunders * gcse.c (struct ls_expr): Remove loads field. (ldst_entry): Adjust. (free_ldst_entry): Likewise. (print_ldst_list): Likewise. (compute_ld_motion_mems): Likewise. 2016-07-06 Trevor Saunders * store-motion.c (struct st_expr): Make antic_stores a vector. (st_expr_entry): Adjust. (free_st_expr_entry): Likewise. (print_store_motion_mems): Likewise. (find_moveable_store): Likewise. (compute_store_table): Likewise. (remove_reachable_equiv_notes): Likewise. (replace_store_insn): Likewise. (build_store_vectors): Likewise. 2016-07-06 Kyrylo Tkachov * config/arm/driver-arm.c (arm_cpu_table): Add entries for cortex-a32, cortex-a35, cortex-a53, cortex-a57, cortex-a72, cortex-a73. 2016-07-06 Yuri Rumyantsev PR tree-optimization/71518 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Adjust misalign also for outer loops with negative step. 2016-07-06 Wilco Dijkstra * config/arm/cortex-a53.md: Use final_presence_set for in-order. (cortex_a53_shift): Add mov_shift. (cortex_a53_shift_reg): Add new reservation for register shifts. (cortex_a53_alu): Remove bfm. (cortex_a53_alu_shift): Add bfm, remove mov_shift. (cortex_a53_alu_extr): Add new reservation for EXTR. (bypasses): Improve bypass modelling. 2016-07-06 Senthil Kumar Selvaraj PR target/50739 * config/avr/avr.c (avr_asm_select_section): Strip off SECTION_DECLARED from flags when calling get_section. 2016-07-06 Richard Sandiford * tree-vectorizer.h (vect_memory_access_type): Add VMAT_INVARIANT, VMAT_CONTIGUOUS_DOWN and VMAT_CONTIGUOUS_REVERSED. * tree-vect-stmts.c (compare_step_with_zero): New function. (perm_mask_for_reverse): Move further up file. (get_group_load_store_type): Stick to VMAT_ELEMENTWISE if the step is negative. (get_negative_load_store_type): New function. (get_load_store_type): Call it. Add an ncopies argument. (vectorizable_mask_load_store): Update call accordingly and remove tests for negative steps. (vectorizable_store, vectorizable_load): Likewise. Handle new memory_access_types. 2016-07-06 Richard Sandiford * tree-vectorizer.h (vect_memory_access_type): New enum. (_stmt_vec_info): Add a memory_access_type field. (STMT_VINFO_MEMORY_ACCESS_TYPE): New macro. (vect_model_store_cost): Take an access type instead of a boolean. (vect_model_load_cost): Likewise. * tree-vect-slp.c (vect_analyze_slp_cost_1): Update calls to vect_model_store_cost and vect_model_load_cost. * tree-vect-stmts.c (vec_load_store_type): New enum. (vect_model_store_cost): Take an access type instead of a store_lanes_p boolean. Simplify tests. (vect_model_load_cost): Likewise, but for load_lanes_p. (get_group_load_store_type, get_load_store_type): New functions. (vectorizable_store): Use get_load_store_type. Record the access type in STMT_VINFO_MEMORY_ACCESS_TYPE. (vectorizable_load): Likewise. (vectorizable_mask_load_store): Likewise. Replace is_store variable with vls_type. 2016-07-06 Richard Sandiford * tree-vectorizer.h (vect_grouped_load_supported): Add a single_element_p parameter. * tree-vect-data-refs.c (vect_grouped_load_supported): Likewise. Check the PR65518 case here rather than in vectorizable_load. * tree-vect-loop.c (vect_analyze_loop_2): Update call accordignly. * tree-vect-stmts.c (vectorizable_load): Likewise. 2016-07-06 Richard Sandiford * tree-vectorizer.h (gather_scatter_info): New structure. (vect_check_gather_scatter): Return a bool rather than a decl. Replace return-by-pointer arguments with a single gather_scatter_info *. * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise. (vect_analyze_data_refs): Update call accordingly. * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise. (vectorizable_mask_load_store): Likewise. Also record the offset dt and vectype in the gather_scatter_info. (vectorizable_store): Likewise. (vectorizable_load): Likewise. 2016-07-06 Richard Sandiford * tree-vect-stmts.c (vect_model_store_cost): For non-SLP strided groups, use the cost of N scalar accesses instead of ncopies vector accesses. (vect_model_load_cost): Likewise. 2016-07-06 Richard Sandiford * tree-vect-stmts.c (vect_cost_group_size): Delete. (vect_model_store_cost): Avoid calling it. Use first_stmt_p variable to indicate when once-per-group costs are being used. (vect_model_load_cost): Likewise. Fix comment and misindented code. 2016-07-06 Richard Sandiford * tree-vect-stmts.c (vectorizable_load): Remove unnecessary peeling-for-gaps condition. 2016-07-06 Andreas Krebbel * config/s390/s390.c (s390_expand_vec_init): Force initializer element to register if it doesn't match general_operand. 2016-07-05 Michael Meissner Bill Schmidt * config/rs6000/rs6000-protos.h (rs6000_split_signbit): New prototype. * config/rs6000/rs6000.c (rs6000_split_signbit): New function. * config/rs6000/rs6000.md (UNSPEC_SIGNBIT): New constant. (SIGNBIT): New mode iterator. (Fsignbit): New mode attribute. (signbit2): Change operand1 to match FLOAT128 instead of IBM128; dispatch to gen_signbit{kf,tf}2_dm for __float128 when direct moves are available. (signbit2_dm): New define_insn_and_split). (signbit2_dm2): New define_insn. 2016-07-05 Kyrylo Tkachov PR rtl-optimization/71594 * ifcvt.c (noce_convert_multiple_sets): Wrap new_val or old_val into subregs of appropriate mode before trying to emit a conditional move. 2016-07-05 Jan Hubicka * tree-scalar-evolution.c (iv_can_overflow_p): New function. (simple_iv): Use it. 2016-07-05 Jan Hubicka * tree-ssa-loop-niter.c (nowrap_type_p): Use ANY_INTEGRAL_TYPE_P. 2016-07-05 Jiong Wang * lra-constraints.c (process_alt_operands): Don't add spilling cost for "offmemok". 2016-07-05 Jan Hubicka * tree-scalar-evoluiton.c (simple_iv): Use nowrap_type to check if IV can overflow. 2016-07-05 Richard Biener * gimple-ssa-split-paths.c (find_block_to_duplicate_for_splitting_pa): Handle empty else block. (is_feasible_trace): Likewise. (split_paths): Likewise. 2016-07-05 Richard Biener * tree-loop-distribution.c (distribute_loop): Fix issue with the cost model loop. 2016-07-05 Christophe Lyon * config/arm/neon-testgen.ml: Delete. * config/arm/neon.ml: Delete. 2016-07-04 Jakub Jelinek PR c++/71739 * tree.c (attribute_value_equal): Use get_attribute_name instead of directly using TREE_PURPOSE. 2016-07-04 Jiong Wang * config/aarch64/aarch64.h: Rename "ARMv8.1" to "ARMv8.1-A". * config/aarch64/aarch64_neon.h: Likewise. * config/aarch64/arm_neon.h: Likewise. * config/aarch64/atomics.md: Likewise. * config/aarch64/aarch64-simd-builtins.def: Likewise. * doc/invoke.texi: Likewise. 2016-07-04 Dominik Vogt * config/s390/s390.md: Add "z13" cpu_facility. ("*movcc"): Add support for z13 instructions lochi and locghi. * config/s390/predicates.md ("loc_operand"): New predicate for "load on condition" type instructions. 2016-07-04 Dominik Vogt Jeff Law * explow.c (allocate_dynamic_stack_space): Simplify knowing that MUST_ALIGN was always true and extra_align ist always BITS_PER_UNIT. 2016-07-04 Yuri Rumyantsev * config/i386/i386.c (ix86_expand_vec_perm): Add handle one-operand permutation for TARGET_AVX512F. (ix86_expand_vec_one_operand_perm_avx512): New function. (expand_vec_perm_1): Invoke introduced function. * tree-vect-loop.c (vect_transform_loop): Clear-up safelen value since it may be not valid after vectorization. 2016-07-04 Ramana Radhakrishnan PR target/63874 * config/aarch64/aarch64.c (aarch64_classify_symbol): Fix typo in comment. Only force to memory if it is a weak external reference. 2016-07-04 Matthew Wahab Jiong Wang * config/aarch64/aarch64-arches.def: Add "armv8.2-a". * config/aarch64/aarch64.h (AARCH64_FL_V8_2): New. (AARCH64_FL_F16): New. (AARCH64_FL_FOR_ARCH8_2): New. (AARCH64_ISA_8_2): New. (AARCH64_ISA_F16): New. (TARGET_FP_F16INST): New. (TARGET_SIMD_F16INST): New. * config/aarch64/aarch64-option-extensions.def ("fp16"): New entry. ("fp"): Disabling "fp" also disables "fp16". * config/aarch64/aarch64-c.c (arch64_update_cpp_builtins): Conditionally define __ARM_FEATURE_FP16_SCALAR_ARITHMETIC and __ARM_FEATURE_FP16_VECTOR_ARITHMETIC. * doc/invoke.texi (AArch64 Options): Document "armv8.2-a" and "fp16". 2016-07-04 Jan Beulich * gcc.c (default_compilers["@c-header"]): Conditionalize "-o". 2016-07-01 Michael Meissner PR target/71720 * config/rs6000/vsx.md (vsx_splat_v4sf_internal): When splitting the insns, use an insn form that does not adjust the offset on little endian systems. 2016-07-01 Jan Beulich * varasm.c (get_variable_section): Validate initializer in named .bss-like sections. 2016-07-01 Kelvin Nilsen * config/rs6000/altivec.md (*altivec_vpermr__internal): Exchange the order of the second and third operands in the vpermr instruction tmeplate. 2016-07-01 Peter Bergner PR target/71698 * config/rs6000/rs6000.c (rs6000_secondary_reload_simple_move): Disallow TDmode values. 2016-07-01 Alan Modra PR rtl-optimization/71709 * ira-lives.c (find_call_crossed_cheap_reg): Exit loop on arg reg being set, not referenced. 2016-07-01 Yuri Rumyantsev PR tree-optimization/70729 * tree-vectorizer.c (adjust_simduid_builtins): Nullify safelen field of loop since it can be not valid after transformation. 2016-07-01 Kyrylo Tkachov * config/arm/arm.c (thumb_reload_in_hi): Delete. * config/arm/arm-protos.h (thumb_reload_in_hi): Delete prototype. 2016-07-01 Eric Botcazou * config/arm/arm.c (arm_function_ok_for_sibcall): Add another check for NULL decl. 2016-06-30 Michael Meissner PR target/71677 * config/rs6000/constraints.md (wY constraint): New constraint to match the requirements for the LXSD and STXSD instructions. * config/rs6000/predicates.md (offsettable_mem_14bit_operand): New predicate to match the requirements for the LXSD and STXSD instructions. * config/rs6000/rs6000.md (mov_hardfloat32, FMOVE64 case): Use constaint wY for LXSD/STXSD instructions instead of 'o' or 'Y' to make sure that the bottom 2 bits of offset are 0, the address form is offsettable, and no updating is done in the address mode. (mov_hardfloat64, FMOVE64 case): Likewise. (movdi_internal32): Likewise (movdi_internal64): Likewise. 2016-06-30 Jakub Jelinek PR tree-optimization/71707 * tree-ssa-strlen.c (get_stridx_plus_constant): Handle already present strinfo even for ADDR_EXPR ptr. 2016-06-30 Kelvin Nilsen * config/rs6000/altivec.md (darn_32): Change the condition to TARGET_P9_MISC instead of TARGET_MODULO. (darn_raw): Replace TARGET_MODULO with TARGET_P9_MISC in the condition expression. (darn): Replace TARGET_MODULO with TARGET_P9_MISC in the condition expression. * config/rs6000/dfp.md (UNSPEC_DTSTSFI): New unspec constant. (DFP_TEST): New code iterator. (dfptstsfi__mode>): New define_expand. (*dfp_sgnfcnc_): New define_insn. * config/rs6000/rs6000-builtin.def (BU_P9_MISC_0): Move this macro definition next to BU_P9_MISC_1 definition and change the MASK value to RS6000_BTM_P9_MISC. (BU_P9_MISC_1): Change the MASK value to RS6000_BTM_P9_MISC. (BU_P9_64BIT_MISC_0): Likewise. (BU_P9_DFP_MISC_0): New macro definition. (BU_P9_DFP_MISC_1): New macro definition. (BU_P9_DFP_MISC_2): New macro definition. (BU_P9_DFP_OVERLOAD_1): New macro definition. (BU_P9_DFP_OVERLOAD_2): New macro definition. (BU_P9_DFP_OVERLOAD_3): New macro definition. (TSTSFI_LT_DD): New BU_P9_DFP_MISC_2. (TSTSFI_LT_TD): Likewise. (TSTSFI_EQ_DD): Likewise. (TSTSFI_EQ_TD): Likewise. (TSTSFI_GT_DD): Likewise. (TSTSFI_GT_TD): Likewise. (TSTSFI_OV_DD): Likewise. (TSTSFI_OV_TD): Likewise. (TSTSFI_LT): New BU_P9_DFP_OVERLOAD_2. (TSTSFI_LT_DD): Likewise. (TSTSFI_LT_TD): Likewise. (TSTSFI_EQ): Likewise. (TSTSFI_EQ_DD): Likewise. (TSTSFI_EQ_TD): Likewise. (TSTSFI_GT): Likewise. (TSTSFI_GT_DD): Likewise. (TSTSFI_GT_TD): Likewise. (TSTSFI_OV): Likewise. (TSTSFI_OV_DD): Likewise. (TSTSFI_OV_TD): Likewise. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded test significance functions. * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add OPTION_MASK_P9_MISC into the representation of this mask. (POWERPC_MASKS): Add OPTION_MASK_P9_MISC into the representation of this mask. * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Set the RS6000_BTM_P9_MISC flag in the return value if TARGET_P9_MISC is non-zero. (rs6000_expand_binop_builtin): Enforce that argument 0 of the exp argument is a 6-bit unsigned literal value if the icode argument represents a DFP test significance built-in call. (rs6000_invalid_builtin): Add support for the RS6000_BTM_P9_MISC flag used independently and in combination with the RS6000_BTM_64BIT flag. (rs6000_opt_masks): Add entry for power9-misc command-line option. (rs6000_builtin_mask_names): Add entry for power9-misc command-line option. * config/rs6000/rs6000.h: Redefine TARGET_P9_MISC as 0 if HAVE_AS_POWER9 is not a defined macro. Define MASK_P9_MISC and RS6000_BTM_P9_MISC macros. * config/rs6000/rs6000.opt: Add support for the -mpower9-misc option and change the description of the -mpower9-vector option to enable only vector instructions, removing its erroneously claimed support for scalar instructions. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document the ISA 3.0 digital floating point test significance built-in functions. 2016-06-30 Wilco Dijkstra * config/aarch64/aarch64.c (cortexa35_tunings): Enable AES fusion. Use cortexa57_branch_cost. (cortexa53_tunings): Use cortexa57_branch_cost. (cortexa72_tunings): Use cortexa57_branch_cost. Use AUTOPREFETCHER_WEAK. (cortexa73_tunings): Use cortexa57_branch_cost. 2016-06-30 Kyrylo Tkachov James Greenhalgh * config/aarch64/arm_neon.h (vcopyq_lane_f32, vcopyq_lane_f64, vcopyq_lane_p8, vcopyq_lane_p16, vcopyq_lane_s8, vcopyq_lane_s16, vcopyq_lane_s32, vcopyq_lane_s64, vcopyq_lane_u8, vcopyq_lane_u16, vcopyq_lane_u32, vcopyq_lane_u64): Reimplement in C. (vcopy_lane_f32, vcopy_lane_f64, vcopy_lane_p8, vcopy_lane_p16, vcopy_lane_s8, vcopy_lane_s16, vcopy_lane_s32, vcopy_lane_s64, vcopy_lane_u8, vcopy_lane_u16, vcopy_lane_u32, vcopy_lane_u64, vcopy_laneq_f32, vcopy_laneq_f64, vcopy_laneq_p8, vcopy_laneq_p16, vcopy_laneq_s8, vcopy_laneq_s16, vcopy_laneq_s32, vcopy_laneq_s64, vcopy_laneq_u8, vcopy_laneq_u16, vcopy_laneq_u32, vcopy_laneq_u64, vcopyq_laneq_f32, vcopyq_laneq_f64, vcopyq_laneq_p8, vcopyq_laneq_p16, vcopyq_laneq_s8, vcopyq_laneq_s16, vcopyq_laneq_s32, vcopyq_laneq_s64, vcopyq_laneq_u8, vcopyq_laneq_u16, vcopyq_laneq_u32, vcopyq_laneq_u64): New intrinsics. 2016-06-30 James Greenhalgh Kyrylo Tkachov * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane): New define_insn. (*aarch64_simd_vec_copy_lane_): Likewise. 2016-06-30 David Malcolm PR driver/71651 * gcc.c (driver::build_option_suggestions): Pass "option" to add_misspelling_candidates. * opts-common.c (add_misspelling_candidates): Add "option" param; use it to avoid adding negated forms for options marked with RejectNegative. * opts.h (add_misspelling_candidates): Add "option" param. 2016-06-30 Jakub Jelinek PR middle-end/71693 * fold-const.c (fold_binary_loc) : Cast TREE_OPERAND (arg0, 0) and TREE_OPERAND (arg0, 1) to type first when permuting bitwise operation with rotate. Cast TREE_OPERAND (arg0, 0) to type when cancelling two rotations. 2016-06-29 David Malcolm * opts.c (handle_param): Use find_param_fuzzy to offer suggestions for misspelled param names. * params.c: Include spellcheck.h. (find_param_fuzzy): New function. * params.h (find_param_fuzzy): New prototype. * spellcheck.c (struct edit_distance_traits): Move to... * spellcheck.h (struct edit_distance_traits): ...here. 2016-06-29 Michael Meissner * config/rs6000/predicates.md (const_0_to_7_operand): New predicate, recognize 0..7. * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add support for doing extracts from V16QImode, V8HImode, V4SImode under ISA 3.0. * config/rs6000/vsx.md (VSX_EXTRACT_I): Mode iterator for ISA 3.0 vector extract support. (VSX_EXTRACT_PREDICATE): Mode attribute to validate element number for ISA 3.0 vector extract. (VSX_EX): Constraints to use for ISA 3.0 vector extract. (vsx_extract_, VSX_EXTRACT_I): Add support for doing extracts of a constant element number from small integer vectors on 64-bit ISA 3.0 systems. (vsx_extract__di): Likewise. * config/rs6000/rs6000.h (TARGET_VEXTRACTUB): New target macro to say when we can do ISA 3.0 vector extracts. * config/rs6000/rs6000.md (stfiwx): Allow DImode in Altivec registers, using the stxsiwx instruction. 2016-06-29 Jim Wilson * config/aarch64/aarch64-cores.def (qdf24xx): Use qdf24xx tuning. * config/aarch64/aarch64.c (qdf24xx_addrcost_table, qdf24xx_regmove_cost, qdf24xx_tunings): New. * config/arm/aarch64-cost-tables.h (qdf24xx_extra_costs): New. * config/arm/arm-cores.def (qdf24xx): Use qdf24xx tuning. * config/arm/arm.c (arm_qdf24xx_tune): New. 2016-06-29 Wilco Dijkstra * config/aarch64/aarch64.c (cortexa53_tunings): Increase loop alignment to 8. Set function alignment to 16. (cortexa35_tunings): Likewise. (cortexa57_tunings): Increase loop alignment to 8. (cortexa72_tunings): Likewise. (cortexa73_tunings): Likewise. 2016-06-29 Matthew Wahab * doc/sourcebuild.texi (Effective-Target keywords): Add entries for arm_fp16_ok and arm_fp16_hw. (Add Options): Add entries for arm_fp16, arm_fp16_ieee and arm_fp16_alternative. 2016-06-29 Ilya Enkovich PR tree-optimization/71655 * tree-vect-stmts.c (vectorizable_comparison): Swap definition types when swapping operands. 2016-06-29 Martin Liska PR middle-end/71585 * common.opt (flag_stack_protect): Mark the flag as optimization flag. * ipa-inline-transform.c (inline_call): Remove unnecessary call of build_optimization_node. 2016-06-29 Yuri Rumyantsev PR tree-optimization/70729 * tree-ssa-loop-im.c (ref_indep_loop_p_1): Consider memory reference as independent in loops having positive safelen value. * tree-vect-loop.c (vect_transform_loop): Clear-up safelen value since it may be not valid after vectorization. 2016-06-29 Jakub Jelinek PR tree-optimization/71625 * tree-ssa-strlen.c (get_addr_stridx): Add PTR argument. Assume list is sorted by ascending list->offset. If PTR is non-NULL and there is previous strinfo, call get_stridx_plus_constant. (get_stridx): Pass exp as second argument to get_addr_stridx. (addr_stridxptr): Add missing list = list->next, so that there can be more than one entries in the list. Bump limit from 16 to 32. Ensure the list is sorted by ascending list->offset. (get_stridx_plus_constant): Adjust so that it can be also called with ADDR_EXPR instead of SSA_NAME as PTR. (handle_char_store): Pass NULL_TREE as second argument to get_addr_stridx. 2016-06-29 Richard Biener PR rtl-optimization/68961 * simplify-rtx.c (simplify_subreg): Handle VEC_CONCAT like CONCAT. 2016-06-29 Richard Biener PR middle-end/71002 * alias.c (component_uses_parent_alias_set_from): Handle type punning through union accesses by using the union alias set. * gimple.c (gimple_get_alias_set): Remove union type punning case. 2016-07-29 Richard Biener * match.pd ((T)(T2)x -> (T)x): Remove restriction on final precision not matching mode precision. 2016-06-28 John David Anglin * config/pa/pa.md (call_symref_64bit_post_reload): Don't call pa_output_arg_descriptor. (call_val_symref_64bit_post_reload): Likewise. (call_val_powf_64bit_post_reload): Likewise. (sibcall_internal_symref_64bit): Likewise. (sibcall_value_internal_symref_64bit): Likewise. 2016-06-28 Jakub Jelinek PR middle-end/71626 * config/i386/i386.c (ix86_expand_vector_move): For SUBREG of a constant, force its SUBREG_REG into memory or register instead of whole op1. 2016-06-28 Pitchumani Sivanupandi PR target/58655 * config/avr/avr.opt (-mfract-convert-truncate): Update description. * doc/invoke.texi (AVR Options): Document it. 2016-06-28 Walter Lee * config/tilegx/linux.h: Do not include arch/icache.h (CLEAR_INSN_CACHE): Provide inlined definition directly. * config/tilepro/linux.h: Do not include arch/icache.h (CLEAR_INSN_CACHE): Provide inlined definition directly. 2016-06-28 Wilco Dijkstra * tree-ssa-math-opts.c (find_bswap_or_nop_1): Adjust bitnumbering for big-endian BIT_FIELD_REF. 2016-06-28 Pat Haugen * config/rs6000/rs6000.md ('type' attribute): Add htmsimple/dfp types. ('size' attribute): Add '128'. Include power9.md. (*mov_hardfloat32, *mov_hardfloat64, *movdi_internal32, *movdi_internal64, *movdf_update1): Set size attribute to '64'. (add3, sub3, mul3, div3, sqrt2, copysign3, neg2_hw, abs2_hw, *nabs2_hw, *fma4_hw, *fms4_hw, *nfma4_hw, *nfms4_hw, extend2_hw, truncdf2_hw, *xscvqpwz_, *xscvqpdz_, *xscvdqp_, *truncdf2_odd): Set size attribute to '128'. (*cmp_hw): Change type to veccmp and set size attribute to '128'. * config/rs6000/power6.md (power6-fp): Include dfp type. * config/rs6000/power7.md (power7-fp): Likewise. * config/rs6000/power8.md (power8-fp): Likewise. * config/rs6000/power9.md: New file. * config/rs6000/t-rs6000 (MD_INCLUDES): Add power9.md. * config/rs6000/htm.md (*tabort, *tabortc, *tabortci, *trechkpt, *treclaim, *tsr, *ttest): Change type attribute to htmsimple. * config/rs6000/dfp.md (extendsddd2, truncddsd2, extendddtd2, trunctddd2, adddd3, addtd3, subdd3, subtd3, muldd3, multd3, divdd3, divtd3, *cmpdd_internal1, *cmptd_internal1, floatdidd2, floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixtddi2, dfp_ddedpd_, dfp_denbcd_, dfp_dxex_, dfp_diex_, dfp_dscli_, dfp_dscri_): Change type attribute to dfp. * config/rs6000/crypto.md (crypto_vshasigma): Change type attribute to vecsimple. * config/rs6000/rs6000.c (power9_cost): Update costs, cache size and prefetch streams. (rs6000_option_override_internal): Remove temporary code setting tuning to power8. Don't set rs6000_sched_groups for power9. (last_scheduled_insn): Change to rtx_insn *. (divide_cnt, vec_load_pendulum): New variables. (rs6000_adjust_cost): Add Power9 to test for store->load separation. (rs6000_issue_rate): Set issue rate for Power9. (is_power9_pairable_vec_type): New. (power9_sched_reorder2): New. (rs6000_sched_reorder2): Call new function for Power9 specific reordering. (insn_must_be_first_in_group): Remove Power9. (insn_must_be_last_in_group): Likewise. (force_new_group): Likewise. (rs6000_sched_init): Fix initialization of last_scheduled_insn. Initialize divide_cnt/vec_load_pendulum. (_rs6000_sched_context, rs6000_init_sched_context, rs6000_set_sched_context): Handle context save/restore of new variables. 2016-06-28 Richard Biener * tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Properly handle DECL_BIT_FIELD_REPRESENTATIVE occuring as COMPONENT_REF operand. (nonoverlapping_component_refs_p): Likewise. * stor-layout.c (start_bitfield_representative): Mark DECL_BIT_FIELD_REPRESENTATIVE as DECL_NONADDRESSABLE_P. 2016-06-28 Jakub Jelinek * Makefile.in: Don't cat ../stage_current if it does not exist. * doc/extend.texi (__builtin_add_overflow_p): Clarify behavior when last argument is a bit-field. PR rtl-optimization/71673 * internal-fn.c (expand_arith_overflow_result_store): Use OPTAB_LIB_WIDEN instead of OPTAB_DIRECT as last argument to expand_simple_binop. PR middle-end/66867 * builtins.c (expand_ifn_atomic_compare_exchange_into_call, expand_ifn_atomic_compare_exchange): New functions. * internal-fn.c (expand_ATOMIC_COMPARE_EXCHANGE): New function. * tree.h (build_call_expr_internal_loc): Rename to ... (build_call_expr_internal_loc_array): ... this. Fix up type of last argument. * internal-fn.def (ATOMIC_COMPARE_EXCHANGE): New internal fn. * predict.c (expr_expected_value_1): Handle IMAGPART_EXPR of ATOMIC_COMPARE_EXCHANGE result. * builtins.h (expand_ifn_atomic_compare_exchange): New prototype. * gimple-fold.h (optimize_atomic_compare_exchange_p, fold_builtin_atomic_compare_exchange): New prototypes. * gimple-fold.c (optimize_atomic_compare_exchange_p, fold_builtin_atomic_compare_exchange): New functions.. * tree-ssa.c (execute_update_addresses_taken): If optimize_atomic_compare_exchange_p, ignore &var in 2nd argument of call when finding addressable vars, and if such var becomes non-addressable, call fold_builtin_atomic_compare_exchange. 2016-06-27 Segher Boessenkool PR target/71670 * config/rs6000/rs6000.md (ashdi3_extswsli_dot): Use gen_ashdi3_extswsli_dot2 instead of gen_ashdi3_extswsli_dot. 2016-06-27 Pat Haugen * config/rs6000/rs6000.md ('type' attribute): Add veclogical,veccmpfx,vecexts,vecmove insn types. (*abs2_fpr, *nabs2_fpr, *neg2_fpr, *extendsfdf2_fpr, copysign3_fcpsgn, truncdf2_internal1, neg2_internal, p8_fmrgow_, pack): Change type to fpsimple. (*xxsel, copysign3_hard, neg2_hw, abs2_hw, *nabs2_hw): Change type to vecmove. (*and3_internal, *bool3_internal, *boolc3_internal, *boolcc3_internal, *eqv3_internal, *one_cmpl3_internal, *ieee_128bit_vsx_neg2_internal, *ieee_128bit_vsx_abs2_internal, *ieee_128bit_vsx_nabs2_internal, extendkftf2, trunctfkf2, *ieee128_mfvsrd_64bit, *ieee128_mfvsrd_32bit, *ieee128_mtvsrd_64bit, *ieee128_mtvsrd_32bit): Change type to veclogical. (mov_hardfloat, *mov_hardfloat32, *mov_hardfloat64, *movdi_internal32, *movdi_internal64): Update insn types. * config/rs6000/vsx.md (*vsx_le_undo_permute_, vsx_extract_): Change type to veclogical. (*vsx_xxsel, *vsx_xxsel_uns): Change type to vecmove. (vsx_sign_extend_qi_, *vsx_sign_extend_hi_, *vsx_sign_extend_si_v2di): Change type to vecexts. * config/rs6000/altivec.md (*altivec_mov, *altivec_movti): Change type to veclogical. (*altivec_eq, *altivec_gt, *altivec_gtu, *altivec_vcmpequ_p, *altivec_vcmpgts_p, *altivec_vcmpgtu_p): Change type to veccmpfx. (*altivec_vsel, *altivec_vsel_uns): Change type to vecmove. * config/rs6000/dfp.md (*negdd2_fpr, *absdd2_fpr, *nabsdd2_fpr, negtd2, *abstd2_fpr, *nabstd2_fpr): Change type to fpsimple. * config/rs6000/40x.md (ppc405-float): Add fpsimple. * config/rs6000/440.md (ppc440-fp): Add fpsimple. * config/rs6000/476.md (ppc476-fp): Add fpsimple. * config/rs6000/601.md (ppc601-fp): Add fpsimple. * config/rs6000/603.md (ppc603-fp): Add fpsimple. * config/rs6000/6xx.md (ppc604-fp): Add fpsimple. * config/rs6000/7xx.md (ppc750-fp): Add fpsimple. (ppc7400-vecsimple): Add veclogical, vecmove, veccmpfx. * config/rs6000/7450.md (ppc7450-fp): Add fpsimple. (ppc7450-vecsimple): Add veclogical, vecmove. (ppc7450-veccmp): Add veccmpfx. * config/rs6000/8540.md (ppc8540_simple_vector): Add veclogical, vecmove. (ppc8540_vector_compare): Add veccmpfx. * config/rs6000/a2.md (ppca2-fp): Add fpsimple. * config/rs6000/cell.md (cell-fp): Add fpsimple. (cell-vecsimple): Add veclogical, vecmove. (cell-veccmp): Add veccmpfx. * config/rs6000/e300c2c3.md (ppce300c3_fp): Add fpsimple. * config/rs6000/e6500.md (e6500_vecsimple): Add veclogical, vecmove, veccmpfx. * config/rs6000/mpc.md (mpccore-fp): Add fpsimple. * config/rs6000/power4.md (power4-fp): Add fpsimple. (power4-vecsimple): Add veclogical, vecmove. (power4-veccmp): Add veccmpfx. * config/rs6000/power5.md (power5-fp): Add fpsimple. * config/rs6000/power6.md (power6-fp): Add fpsimple. (power6-vecsimple): Add veclogical, vecmove. (power6-veccmp): Add veccmpfx. * config/rs6000/power7.md (power7-fp): Add fpsimple. (power7-vecsimple): Add veclogical, vecmove, veccmpfx. * config/rs6000/power8.md (power8-fp): Add fpsimple. (power8-vecsimple): Add veclogical, vecmove, veccmpfx. * config/rs6000/rs64.md (rs64a-fp): Add fpsimple. * config/rs6000/titan.md (titan_fp): Add fpsimple. * config/rs6000/xfpu.md (fp-default, fp-addsub-s, fp-addsub-d): Add fpsimple. * config/rs6000/rs6000.c (rs6000_adjust_cost): Add TYPE_FPSIMPLE. 2016-06-27 Peter Bergner PR target/71656 * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add OPTION_MASK_P9_DFORM_VECTOR. * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not disable -mpower9-dform-vector when using reload. (quad_address_p): Remove 'gpr_p' argument and all associated code. New 'strict' argument. Update all callers. Add strict addressing support. (rs6000_legitimate_offset_address_p): Remove call to virtual_stack_registers_memory_p. (rs6000_legitimize_reload_address): Add quad address support. (rs6000_legitimate_address_p): Move call to quad_address_p above call to virtual_stack_registers_memory_p. Adjust quad_address_p args to account for new strict usage. (rs6000_output_move_128bit): Adjust quad_address_p args to account for new strict usage. * config/rs6000/predicates.md (quad_memory_operand): Likewise. 2016-06-26 Uros Bizjak PR target/70902 PR target/71453 PR target/71555 PR target/71596 PR target/71657 * config/i386/i386.c (ix86_spill_class): Disable condition to always return NO_REGS. 2016-06-26 Jan Hubicka * predict.c: Include gimple-pretty-print.h (predicted_by_loop_heuristics_p): Check also PRED_LOOP_EXIT_WITH_RECURSION (predict_loops): Find self recursive calls and use special purpose predictors for them; dump log about decisions. (pass_profile::execute): Dump info about #of iterations. * predict.def (PRED_LOOP_EXIT_WITH_RECURSION, (PRED_LOOP_GUARD_WITH_RECURSION): New predictors. 2016-06-26 John David Anglin * config/pa/pa.c (pa_output_indirect_call): Rework to combine output_asm_insn calls and shorten long lines. Output .CALL argument descriptor using pa_output_arg_descriptor. Add various inline $$dyncall and other optimizations. (pa_attr_length_indirect_call): Adjust ordering and lengths. 2016-06-25 Jakub Jelinek PR tree-optimization/71643 * tree-ssa-tail-merge.c (find_clusters_1): Ignore basic blocks with EH preds. * tree-ssa-tail-merge.c (deps_ok_for_redirect_from_bb_to_bb): Don't leak a bitmap if dep_bb is NULL. PR tree-optimization/71631 * tree-ssa-reassoc.c (reassociate_bb): Pass true as last argument to rewrite_expr_tree even if negate_result, move new_lhs var declaration and initialization earlier, for powi_result set afterwards new_lhs to lhs. For negate_result, use new_lhs instead of tmp if new_lhs != lhs, and don't shadow gsi var. 2016-06-24 Jan Hubicka * predict.c (predict_paths_leading_to, predict_paths_leading_to_edge): Add in_loop parameter. (predict_loops): Add loop guard heuristics. * predict.def (PRED_LOOP_GUARD): New heuristics. 2016-06-24 Jan Hubicka * predict.c: Include ipa-utils.h (tree_bb_level_prediction): Predict recursive calls. (tree_estimate_probability_bb): Skip inexpensive calls for call predictor. * predict.def (PRED_RECURSIVE_CALL): New. 2016-06-24 Bill Schmidt * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2): New #define. (BU_FLOAT128_1): Likewise. (FABSQ): Likewise. (COPYSIGNQ): Likewise. (RS6000_BUILTIN_NANQ): Likewise. (RS6000_BUILTIN_NANSQ): Likewise. (RS6000_BUILTIN_INFQ): Likewise. (RS6000_BUILTIN_HUGE_VALQ): Likewise. * config/rs6000/rs6000.c (rs6000_fold_builtin): New prototype. (TARGET_FOLD_BUILTIN): New #define. (rs6000_builtin_mask_calculate): Add TARGET_FLOAT128 entry. (rs6000_invalid_builtin): Add handling for RS6000_BTM_FLOAT128. (rs6000_fold_builtin): New target hook implementation, handling folding of 128-bit NaNs and infinities. (rs6000_init_builtins): Initialize const_str_type_node; ensure all entries are filled in to avoid problems during bootstrap self-test; define builtins for 128-bit NaNs and infinities. (rs6000_opt_mask): Add entry for float128. * config/rs6000/rs6000.h (RS6000_BTM_FLOAT128): New #define. (RS6000_BTM_COMMON): Include RS6000_BTM_FLOAT128. (rs6000_builtin_type_index): Add RS6000_BTI_const_str. (const_str_type_node): New #define. * config/rs6000/rs6000.md (copysign3 for IEEE128): Convert to a define_expand that dispatches to either copysign3_soft or copysign3_hard. (copysign3_hard): Rename from copysign3. (copysign3_soft): New define_insn. * doc/extend.texi: Document new builtins. 2016-06-24 Jakub Jelinek * cfgloop.c (flow_loop_dump): Cast nit to uint64_t and print it using PRIu64 instead of lu. 2016-06-24 Eric Botcazou PR debug/71642 * tree-inline.c (remap_decl): When fixing up DECL_ORIGINAL_TYPE, just copy the type name. 2016-06-24 Jakub Jelinek PR tree-optimization/71647 * omp-low.c (lower_rec_input_clauses): Convert omp_clause_aligned_alignment (c) to size_type_node for the last argument of __builtin_assume_aligned. 2016-06-24 H.J. Lu * configure.ac (calling ___tls_get_addr via GOT): New assembler/linker check. (HAVE_AS_IX86_TLS_GET_ADDR_GOT): New. Defined to 1 if 32-bit assembler and linker supports calling ___tls_get_addr via GOT. Otherise, defined to 0. * config.in: Regenerated. * configure: Likewise. * config/i386/constraints.md (Yb): New constraint. * config/i386/i386.h (reg_class): Add TLS_GOTBASE_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. * config/i386/i386.md (*tls_global_dynamic_32_gnu): Replace the b constraint with the Yb constraint. Call ___tls_get_addr via GOT for GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT is 1. (*tls_local_dynamic_base_32_gnu): Likewise. (*tls_global_dynamic_64_): Call _tls_get_addr via GOT for GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT is 1. (*tls_local_dynamic_base_64_): Likewise. 2016-06-24 Martin Liska * cfgloop.c (flow_loop_dump): Dump average number of loop iterations. * cfgloop.h: Change 'struct loop' to 'const struct loop' for a few functions. * cfgloopanal.c (expected_loop_iterations_unbounded): Set a new argument to true if the expected number of iterations is loop-based. 2016-06-24 Uros Bizjak * configure.ac (HAVE_AS_GOTOF_IN_DATA): Use $as_ix86_gas_32_opt to assemble for 32bit target. (HAVE_AS_IX86_TLSGDPLT): Use $as_ix86_gas_32_opt to assemble and $ld_ix86_gld_32_opt to link for 32bit target. (HAVE_AS_IX86_TLSLDMPLT): Ditto. * configure: Regenerate. 2016-06-24 Kyrylo Tkachov * config/arm/arm.c (int_log2): Delete definition and prototype. (shift_op): Use exact_log2 instead of int_log2. (vfp3_const_double_for_fract_bits): Likewise. 2016-06-24 Jakub Jelinek * internal-fn.c (expand_arith_set_overflow): New function. (expand_addsub_overflow, expand_neg_overflow, expand_mul_overflow): Use it. (expand_arith_overflow_result_store): Likewise. Handle precision smaller than mode precision. * tree-vrp.c (extract_range_basic): For imag part, handle properly signed 1-bit precision result. * doc/extend.texi (__builtin_add_overflow): Document that last argument can't be pointer to enumerated or boolean type. (__builtin_add_overflow_p): Document that last argument can't have enumerated or boolean type. 2016-06-23 Michael Meissner Bill Schmidt * config/rs6000/predicates.md (splat_input_operand): Rework. Don't allow constants, since the insns that use this predicate don't support constants. Constants are handled by other insns that are created via combine. During and after register allocation, only allow indexed or indirect addresses, and not general addresses. Only allow modes supported by the hardware. * config/rs6000/rs6000.c (xxsplitb_constant_p): Update usage comment. Move check for using VSPLTIS to a common location, instead of doing it in two different places. 2016-06-23 Jocelyn Mayer * config/i386/driver-i386.c (host_detect_local_cpu): Set PROCESSOR_PENTIUMPRO for signature_CENTAUR_ebx family >= 9. : Pass c7 or nehemiah for signature_CENTAUR_ebx. 2016-06-23 H.J. Lu PR target/66232 PR target/67400 * configure.ac (as_ix86_tls_ldm_opt): Renamed to ... (as_ix86_gas_32_opt): This. (ld_ix86_tls_ldm_opt): Renamed to ... (ld_ix86_gld_32_opt): This. (R_386_TLS_LDM reloc): Updated. (R_386_GOT32X reloc): New assembler/linker check. (HAVE_AS_IX86_GOT32X): New. Defined to 1 if 32-bit assembler and linker support "jmp *_start@GOT" and "cmpl $0, bar@GOT". Otherise, defined to 0. * config.in: Regenerated. * configure: Likewise. * config/i386/i386.c (ix86_force_load_from_GOT_p): Return true if HAVE_AS_IX86_GOT32X is 1 in 32-bit mode. (ix86_legitimate_address_p): Allow UNSPEC_GOT for -fno-plt if ix86_force_load_from_GOT_p returns true. (ix86_print_operand_address_as): Also support UNSPEC_GOT if ix86_force_load_from_GOT_p returns true. (ix86_expand_move): Generate UNSPEC_GOT in 32-bit mode to load the external function address via the GOT slot. (ix86_nopic_noplt_attribute_p): Check both TARGET_64BIT and HAVE_AS_IX86_GOT32X before returning false. (ix86_output_call_insn): Generate "%!jmp/call\t*%p0@GOT" in 32-bit mode if ix86_nopic_noplt_attribute_p returns true. 2016-06-23 Eric Botcazou * tree-inline.c (remap_decl): Preserve DECL_ORIGINAL_TYPE invariant. 2016-06-23 Andi Kleen * Makefile.in: Regenerate. * doc/install.texi: Document autoprofiledbootstrap. 2016-06-23 Andi Kleen * config/i386/gcc-auto-profile: New file. 2016-06-23 Martin Liska PR middle-end/71619 * predict.c (predict_loops): Revert the hunk that was removed in r237103. 2016-06-23 Jakub Sejdak * config.gcc: Add support for arm*-*-phoenix* targets. * config/arm/t-phoenix: New. * config/phoenix.h: New. 2016-06-23 Uros Bizjak H.J. Lu PR target/67400 * config/i386/i386-protos.h (ix86_force_load_from_GOT_p): New. * config/i386/i386.c (ix86_force_load_from_GOT_p): New function. (ix86_legitimate_constant_p): Do not allow UNSPEC_GOTPCREL if ix86_force_load_from_GOT_p returns true. (ix86_legitimate_address_p): Allow UNSPEC_GOTPCREL if ix86_force_load_from_GOT_p returns true. (ix86_print_operand_address_as): Support UNSPEC_GOTPCREL if ix86_force_load_from_GOT_p returns true. (ix86_expand_move): Load the external function address via the GOT slot if ix86_force_load_from_GOT_p returns true. * config/i386/predicates.md (x86_64_immediate_operand): Return false for SYMBOL_REFs where ix86_force_load_from_GOT_p returns true. (x86_64_zext_immediate_operand): Ditto. 2016-06-22 Uros Bizjak * config/i386/i386.c (ix86_expand_move): Simplify SYMBOL_REF handling. 2016-06-22 David Malcolm PR c/70339 * diagnostic-core.h (pedwarn_at_rich_loc): New prototype. * diagnostic.c (pedwarn_at_rich_loc): New function. * spellcheck.h (best_match::best_match): Add a "best_distance_so_far" optional parameter. (best_match::set_best_so_far): New method. (best_match::get_best_distance): New accessor. (best_match::get_best_candidate_length): New accessor. 2016-06-22 Nick Clifton * dwarf2out.c (scompare_loc_descriptor): Use SCALAR_INT_MODE_P() in place of GET_MODE_CLASS() == MODE_INT, so that partial integer modes are accepted as well. (ucompare_loc_descriptor): Likewise. (minmax_loc_descriptor): Likewise. (clz_loc_descriptor): Likewise. (popcount_loc_descriptor): Likewise. (bswap_loc_descriptor): Likewise. (rotate_loc_descriptor): Likewise. (mem_loc_descriptor): Likewise. (loc_descriptor): Likewise. 2016-06-22 David Malcolm * common.opt (fdiagnostics-parseable-fixits): New option. * diagnostic.c: Include "selftest.h". (print_escaped_string): New function. (print_parseable_fixits): New function. (diagnostic_report_diagnostic): Call print_parseable_fixits. (selftest::assert_print_escaped_string): New function. (ASSERT_PRINT_ESCAPED_STRING_STREQ): New macro. (selftest::test_print_escaped_string): New function. (selftest::test_print_parseable_fixits_none): New function. (selftest::test_print_parseable_fixits_insert): New function. (selftest::test_print_parseable_fixits_remove): New function. (selftest::test_print_parseable_fixits_replace): New function. (selftest::diagnostic_c_tests): New function. * diagnostic.h (struct diagnostic_context): Add field "parseable_fixits_p". * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-parseable-fixits. (-fdiagnostics-parseable-fixits): New option. * opts.c (common_handle_option): Handle -fdiagnostics-parseable-fixits. * selftest-run-tests.c (selftest::run_tests): Call selftest::diagnostic_c_tests. * selftest.h (selftest::diagnostic_c_tests): New prototype. 2016-06-22 Ilya Enkovich PR tree-optimization/71488 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Support comparison of boolean vectors. * tree-vect-stmts.c (vectorizable_comparison): Vectorize comparison of boolean vectors using bitwise operations. 2016-06-22 Andreas Schwab * config/aarch64/aarch64-protos.h (aarch64_elf_asm_named_section): Remove declaration. 2016-06-22 Eric Botcazou * function.c (assign_parm_setup_reg): Prevent sharing in another case. 2016-06-22 Bernd Edlinger * config/i386/i386.c (print_reg): Emit an error message on attempt to print FLAGS_REG. 2016-06-22 Kyrylo Tkachov * config/arm/arm.c (arm_cortex_a73_tune): New struct. * config/arm/arm-cores.def (cortex-a73): New entry. (cortex-a73.cortex-a35): Likewise. (cortex-a73.cortex-a53): Likewise. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. * config/arm/bpabi.h (BE8_LINK_SPEC): Handle mcpu=cortex-a73, mcpu=cortex-a73.cortex-a35 and mcpu=cortex-a73.cortex-a53. * config/arm/t-aprofile: Handle mcpu=cortex-a73, mcpu=cortex-a73.cortex-a35 and mcpu=cortex-a73.cortex-a53. * doc/invoke.texi (ARM Options): Document cortex-a73, cortex-a73.cortex-a35 and cortex-a73.cortex-a53. 2016-06-22 Kyrylo Tkachov * config/aarch64/aarch64.c (cortexa73_tunings): New struct. * config/aarch64/aarch64-cores.def (cortex-a73): New entry. (cortex-a73.cortex-a35): Likewise. (cortex-a73.cortex-a53): Likewise. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi (AArch64 Options): Document cortex-a73, cortex-a73.cortex-a35 and cortex-a73.cortex-a53 arguments to -mcpu and -mtune. 2016-06-22 Rainer Orth * configure.ac (gcc_cv_as_compress_debug): Remove --compress-debug-sections as extra as switch. Handle gas --compress-debug-sections=type. (gcc_cv_ld_compess_debug): Remove bogus ld_date check. Handle gld --compress-debug-sections=type. * configure: Regenerate. 2016-06-21 Andrew Burgess * bb-reorder.c (pass_partition_blocks::gate): Update comment. 2016-06-21 John David Anglin * gcov-tool.c (profile_rewrite): Use int64_t instead of long long. (do_rewrite): likewise. 2016-06-21 Trevor Saunders * common/config/mep/mep-common.c: Remove. * config.gcc: Remove mep-* support. * config/mep/constraints.md: Remove. * config/mep/default.h: Remove. * config/mep/intrinsics.h: Remove. * config/mep/intrinsics.md: Remove. * config/mep/ivc2-template.h: Remove. * config/mep/mep-c5.cpu: Remove. * config/mep/mep-core.cpu: Remove. * config/mep/mep-default.cpu: Remove. * config/mep/mep-ext-cop.cpu: Remove. * config/mep/mep-intrin.h: Remove. * config/mep/mep-ivc2.cpu: Remove. * config/mep/mep-pragma.c: Remove. * config/mep/mep-protos.h: Remove. * config/mep/mep.c: Remove. * config/mep/mep.cpu: Remove. * config/mep/mep.h: Remove. * config/mep/mep.md: Remove. * config/mep/mep.opt: Remove. * config/mep/predicates.md: Remove. * config/mep/t-mep: Remove. * doc/install.texi: Remove mep-* documentation. * doc/md.texi: Likewise. 2016-06-21 Trevor Saunders * config.gcc: Remove support for avr-rtems. * config/avr/gen-avr-mmcu-specs.c: Likewise. * config/avr/rtems.h: Remove. * config/avr/t-rtems: Remove. 2016-06-21 Trevor Saunders * config.gcc: Remove m32r-rtems support. * config/m32r/rtems.h: Remove. 2016-06-21 Trevor Saunders * config.gcc: Remove h8300-rtems support. * config/h8300/rtems.h: Remove. * config/h8300/t-rtems: Remove. 2016-06-21 Trevor Saunders * config.gcc: Remove support for knetbsd. * configure.ac: Likewise. * config/i386/knetbsd-gnu.h: Remove. * config/i386/knetbsd-gnu64.h: Remove. * config/knetbsd-gnu.h: Remove. * configure: Regenerate. 2016-06-21 Trevor Saunders * config.gcc: Remove support for openbsd 2 and 3. * config/openbsd-oldgas.h: Remove. 2016-06-21 Trevor Saunders * config.gcc: Remove interix support. * config/i386/i386-interix.h: Remove. * config/i386/interix.opt: Remove. * config/i386/t-interix: Remove. * configure: Regenerate. * configure.ac: Remove interix support. * doc/install.texi: Remove interix documentation. 2016-06-21 Kelvin Nilsen * config/rs6000/rs6000.h: Add conditional preprocessing directives to disable Power9-specific compiler features if HAVE_AS_POWER9 is not defined. 2016-06-21 Eric Botcazou * tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if they are both PLACEHOLDER_EXPRs. 2016-06-21 Michael Meissner * stor-layout.c (layout_type): Move setting complex MODE to layout_type, instead of setting it ahead of time by the caller. * tree.c (build_complex_type): Likewise. 2016-06-21 Martin Liska * predict.c (force_edge_cold): Replace imposisble with impossible. 2016-06-21 Ilya Verbin * config/i386/i386.c (ix86_emit_swsqrtsf): Emit vrsqrt28ps. * config/i386/sse.md (define_expand "rsqrtv16sf2"): New. 2016-06-21 Ilya Verbin * config/i386/i386.c (ix86_emit_swdivsf): Emit vrcp28ps. 2016-06-21 H.J. Lu Ilya Enkovich PR target/71549 * config/i386/i386.c (timode_scalar_chain::fix_debug_reg_uses): New member function to convert V1TImode register to SUBREG TImode in debug insn. (timode_scalar_chain::convert_insn): Call fix_debug_reg_uses after changing register mode to V1TImode. 2016-06-21 Virendra Pathak * config/aarch64/aarch64-cores.def (vulcan): New core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Document vulcan as an available option. 2016-06-21 Eric Botcazou * cse.c (canon_asm_operands): New function extracted from... (canonicalize_insn): ...here. Call it to canonicalize an ASM_OPERANDS either standalone or member of a PARALLEL. 2016-06-21 Georg-Johann Lay PR target/30417 * config/avr/gen-avr-mmcu-specs.c (print_mcu): [*link_data_start]: Wrap -Tdata into %{!Tdata:...}. [*link_text_start]: Wrap -Ttext into %{!Ttext:...}. 2016-06-21 Georg-Johann Lay PR target/71103 * config/avr/avr.md (movqi): Only handle loading subreg:qi of constant addresses if can_create_pseudo_p. 2016-06-21 Jakub Jelinek PR tree-optimization/71588 * tree-ssa-strlen.c (valid_builtin_call): New function. (adjust_last_stmt, handle_builtin_memset, strlen_optimize_stmt): Use it. 2016-06-20 Jakub Jelinek PR middle-end/71581 * tree-ssa-uninit.c (warn_uninit): If EXPR and VAR are NULL, see if T isn't anonymous SSA_NAME with COMPLEX_EXPR created for conversion of scalar user var to complex type and use the underlying SSA_NAME_VAR in that case. If EXPR is still NULL, punt. PR rtl-optimization/71591 * toplev.c (toplev::run_self_tests): If no_backend, complain and don't run any tests. 2016-06-20 Hans-Peter Nilsson PR target/71571 * config/cris/cris.c (cris_asm_output_mi_thunk): Add missing "ba" delay-slot "nop" for PIC with CRIS v32. Also add missing leading space for PIC with non-v32 and the common non-PIC "jump". 2016-06-20 Jakub Jelinek PR target/71559 * config/i386/i386.c (ix86_fp_cmp_code_to_pcmp_immediate): Fix up returned values and add UN*/LTGT/*ORDERED cases with values matching D operand modifier on vcmp for AVX. 2016-06-20 Wilco Dijkstra * config/aarch64/aarch64.opt (mpc-relative-literal-loads): Rename internal option name. * config/aarch64/aarch64.c (aarch64_nopcrelative_literal_loads): Rename to aarch64_pcrelative_literal_loads. (aarch64_expand_mov_immediate): Likewise. (aarch64_secondary_reload): Likewise. (aarch64_can_use_per_function_literal_pools_p): Likewise. (aarch64_override_options_after_change_1): Rename and simplify logic. (aarch64_classify_symbol): Merge large model checks into switch, remove pc-relative load check. 2016-06-20 James Greenhalgh * config/arm/aarch-cost-tables.h (cortexa53_extra_costs): Make FP costs relative to the cost of a register move. 2016-06-20 James Greenhalgh * config/aarch64/arm_neon.h (vcvt_n_f64_s64): New. (vcvt_n_f64_u64): Likewise. (vcvt_n_s64_f64): Likewise. (vcvt_n_u64_f64): Likewise. (vcvt_f64_s64): Likewise. (vrecpe_f64): Likewise. (vcvt_f64_u64): Likewise. (vrecps_f64): Likewise. 2016-06-20 James Greenhalgh * config/aarch64/aarch64.md (3): Add attributes to iterators. (3): Likewise. Correct attributes. * config/aarch64/aarch64-builtins.c (aarch64_types_binop_uss_qualifiers): Delete. (TYPES_BINOP_USS): Likewise. (aarch64_types_binop_sus_qualifiers): Likewise. (TYPES_BINOP_SUS): Likewise. (aarch64_types_fcvt_from_unsigned_qualifiers): New. (TYPES_FCVTIMM_SUS): Likewise. * config/aarch64/aarch64-simd-builtins.def (scvtf): Use SHIFTIMM rather than BINOP. (ucvtf): Use FCVTIMM_SUS rather than BINOP_SUS. (fcvtzs): Use SHIFTIMM rather than BINOP. (fcvtzu): Use SHIFTIMM_USS rather than BINOP_USS. 2016-06-20 James Greenhalgh * config/arm/aarch-cost-tables.h (cortexa57_extra_costs): Make FP costs relative to the cost of a register move. 2016-06-20 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Allow scalar/single vector modes to be tieable. 2016-06-20 Wilco Dijkstra * config/arm/cortex-a57.md (cortex_a57_fp_cpys): Add fcsel. 2016-06-20 Kyrylo Tkachov * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Use "alignment" instead of "alignement". * tree.h (TYPE_ALIGN): Likewise. 2016-06-20 Georg-Johann Lay PR target/71103 * config/avr/avr.md (movqi): Handle loading subreg:qi (const). 2016-06-20 Georg-Johann Lay * config/avr/avr.c (avr_print_operand): Fix "format not a string literal" build warnings. (avr_print_operand_address): Dito. 2016-06-19 David Edelsohn PR target/71375 * config/rs6000/aix51.h (TARGET_EXTRA_BUILTINS): Define as 0. * config/rs6000/aix43.h (TARGET_EXTRA_BUILTINS): Same. 2016-06-18 John David Anglin * config/pa/pa.h (TARGET_LONG_PIC_PCREL_CALL): Remove. 2016-06-18 Eric Botcazou PR bootstrap/71435 * reload1.c (reload): Pass 0 to finish_spills when called because update_eliminables_and_spill returns true and remove did_spill. (finish_spills): Adjust comment and document GLOBAL parameter. 2016-06-17 DJ Delorie PR target/71338 * config/rl78/rl78-expand.c (umulqihi3): Enable for G10. * config/rl78/rl78-virtual.c (umulhi3_shift_virt): Likewise. (umulqihi3_virt): Likewise. * config/rl78/rl78-real.c (umulhi3_shift_real): Likewise. (umulqihi3_real): Likewise. 2016-06-17 Martin Liska * tree-ssa-reassoc.c (transform_add_to_multiply): Use auto_vec. 2016-06-17 Martin Liska * predict.def: PRED_LOOP_EXIT from 92 to 85. 2016-06-17 James Greenhalgh * config/arm/arm_neon.h (vadd_f32): replace __FAST_MATH with __FAST_MATH__. (vaddq_f32): Likewise. (vmul_f32): Likewise. (vmulq_f32): Likewise. (vsub_f32): Likewise. (vsubq_f32): Likewise. 2016-06-17 Bin Cheng PR tree-optimization/71347 * tree-ssa-loop-ivopts.c (determine_group_iv_cost_address): Compute cost for all uses in group. 2016-06-17 Bin Cheng * tree-vect-loop.c (vect_create_epilog_for_reduction): Only insert gimple seq if it's not empty. 2016-06-17 Bin Cheng * tree-vectorizer.h (struct dr_with_seg_len): Remove class member OFFSET. * tree-vect-data-refs.c (operator ==): Handle DR_OFFSET directly, rather than OFFSET. (comp_dr_with_seg_len_pair): Ditto. (vect_prune_runtime_alias_test_list): Ditto. Also Canonicalize struct dr_with_seg_len_pair against DR_OFFSET. * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Handle DR_OFFSET directly. 2016-06-17 Szabolcs Nagy * config/aarch64/geniterators.sh: Handle parenthesised conditions. 2016-06-16 John David Anglin * config/pa/pa.c (pa_output_pic_pcrel_sequence): New. (pa_output_lbranch): Use pa_output_pic_pcrel_sequence. (pa_output_millicode_call): Likewise. (pa_output_call): Likewise. (pa_output_indirect_call): Likewise. (pa_asm_output_mi_thunk): Likewise. 2016-06-16 Bernhard Reutner-Fischer * doc/invoke.texi (x86 Options): Fix -mno-fp-ret-in-387 typo. 2016-06-16 Martin Liska * predict.c (combine_predictions_for_insn): When we find a first match predictor, we should consider just predictors with PRED_FLAG_FIRST_MATCH. Print either first match (if any) or DS theory predictor. (combine_predictions_for_bb): Likewise. 2016-06-16 Jakub Jelinek * gimplify.c (gimplify_scan_omp_clauses): Handle COMPONENT_REFs with base of reference to struct. 2016-06-16 Uros Bizjak * doc/invoke.texi (x86 Options): Document -m80387 and -mhard-float. 2016-06-16 Senthil Kumar Selvaraj PR target/71151 * config/avr/avr.c (avr_asm_init_sections): Remove setup of progmem_swtable_section. (progmem_swtable_section): Remove. (avr_asm_function_rodata_section): Remove. (TARGET_ASM_FUNCTION_RODATA_SECTION): Remove. * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION: Define to 1. 2016-06-16 Jocelyn Mayer * config/i386/driver-i386.c (host_detect_local_cpu): Set PROCESSOR_K8 for signature_CENTAUR_ebx with has_longmode. : Pass nano-3000, nano, eden-x2 or k8 for signature_CENTAUR_ebx. * config/i386/i386.c (ix86_option_override_internal): Add definitions for VIA c7, samuel-2, nehemiah, esther, eden-x2, eden-x4, nano, nano-1000, nano-2000, nano-3000, nano-x2 and nano-x4. * doc/invoke.texi (x86 Options): Document new VIA -march entries. 2016-06-16 Martin Liska * predict.def: Add fortran loop preheader predictor. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Properly fold IFN_BUILTIN_EXPECT with a known constant argument. 2016-06-16 Martin Liska * predict.def: Add 'Fortran' to display text of all PRED_FORTRAN_* predictors. 2016-06-16 Uros Bizjak PR target/71242 * config/ia64/ia64.c (enum ia64_builtins) [IA64_BUILTIN_NANQ]: New. [IA64_BUILTIN_NANSQ]: Ditto. (ia64_fold_builtin): New function. (TARGET_FOLD_BUILTIN): New define. (ia64_init_builtins) Declare const_string_type node. Add __builtin_nanq and __builtin_nansq builtin functions. (ia64_expand_builtin): Handle IA64_BUILTIN_NANQ and IA64_BUILTIN_NANSQ. 2016-06-16 Nick Clifton * config/msp430/msp430-opts.h (msp430_hwmult_types): Add MSP430_HWMULT_ prefix to enum values. (msp430_regions): Add MSP430_REGION_ prefix to enum values. * config/msp430/msp430.c: Update use of enum values. * config/msp430/msp430.md: Likewise. * config/msp430/msp430.opt: Likewise. 2016-06-16 Jan Hubicka * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix estimation of comparsions in the last iteration. 2016-06-16 Claudiu Zissulescu Joern Rennecke * config/arc/arc.c (arc_print_operand_address): Handle pc-relative addresses. (arc_needs_pcl_p): Add GOTOFFPC. (arc_legitimate_pic_addr_p): Likewise. (arc_output_pic_addr_const): Likewise. (arc_legitimize_pic_address): Generate a pc-relative address using GOTOFFPC. (arc_output_libcall): Use @pcl syntax. (arc_delegitimize_address_0): Delegitimize ARC_UNSPEC_GOTOFFPC. * config/arc/arc.md ("unspec"): Add ARC_UNSPEC_GOTOFFPC. (*movsi_insn): Use @pcl syntax. (doloop_begin_i): Likewise. 2016-06-16 Martin Liska * predict.def: Define a new predictor. 2016-06-16 Claudiu Zissulescu * config/arc/arc.opt (mtp-regno): Update text. 2016-06-16 Renlin Li * config/aarch64/aarch64.c (aarch64_legitimize_address): Fix a typo. 2016-06-16 Jakub Jelinek PR target/71554 * config/i386/i386.md (setcc + movzbl peephole2): Use reg_set_p. (setcc + and peephole2): Likewise. PR rtl-optimization/71532 * cse.c (cse_insn): For const/pure calls, invalidate argument passing memory slots. 2016-06-15 Michael Meissner * config/rs6000/vsx.md (VSINT_84): Add DImode to enable loading DImode constants with XXSPLTIB in vector registers. (vsx_extract_, V2DImode/V2DFmode): Combine both vsx_extract__internal{1,2} into a single insn that handles direct move (both ISA 2.07 and ISA 3.0 versions), and optimizes extraction of the element at the top of the register as a scalar value. (vsx_extract__internal1): Likewise. (vsx_extract__internal2): Likewise. * config/rs6000/constraints.md (wi constraint): Remove a comment about DImode not being allowed in Altivec registers. (wB constraint): New constraint for constants that can be generated in Altivec registers with VSPLTISW/VUPKHSW. * config/rs6000/predicates.md (xxspltib_constant_split): Update comments. (xxspltib_constant_nosplit): Likewise. * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Add support for -mupper-regs-di to enable DImode to go into Altivec registers. (POWERPC_MASKS): Likewise. (power7 cpu): Likewise. * config/rs6000/rs6000.opt (-mupper-regs-di): Likewise. * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Add support for DImode being allowed in Altivec registers. Update wi/wj constraints. Set scalar_in_vmx_p flag. (rs6000_option_override_internal): Add checks for -mupper-regs-di. (xxspltib_constant_p): Allow CONST_INT's with VOIDmode. Don't return true if we could use VSPLTISW/VUPKHSW instead of XXSPLTIB. (rs6000_opt_masks): Add -mupper-regs-di. * config/rs6000/rs6000.md (lfiwax): Update clobbers that don't use direct move to use wi and not wj. (lfiwzx): Likewise. (floatsi2_lfiwax_mem): Combine alternatives into a single alternative. (floatunssi2_lfiwzx_mem): Likewise. (fix_truncdi2_fctidz): Change second alternative to allow any VSX register, instead of just Altivec registers, to allow either operand to be an Altivec register or both. (fixuns_truncdi2_fctiduz): Likewise. (movdi_internal32): Add support for -mupper-regs-di. Add support to load constants via XXSPLTIB or VSPLTISW. Add spacing to allow the alternatives and attributes to be lined up to be easier to read. (movdi_internal64): Likewise. (64-bit DImode splitters): Change predicates to only split loading up GPR registers. Add splits for using XXSPLTIB or VSPLTISW to load constants in ISA 3.0 or ISA 2.07 respectively. * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mupper-regs-di. Update -mupper-regs-df and -mupper-regs-sf to mention -mcpu=power9 sets these options. * doc/md.texi (PowerPC and IBM RS6000 constraints): Document the wB constraint. 2016-06-15 Pitchumani Sivanupandi PR target/67353 * config/avr/avr.c (avr_set_current_function): Warn misspelled interrupt/ signal handler if -Wmisspelled-isr flag is enabled. * config/avr/avr.opt (Wmisspelled-isr): New warning flag. Enabled by default to warn misspelled interrupt/ signal handler. * doc/invoke.texi (AVR Options): Document it. Update description for -nodevicelib option. 2016-06-15 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_shll_n): Clean up parentheses. Use GET_MODE_UNIT_BITSIZE. (aarch64_shll2_n): Likewise. 2016-06-15 Ilya Enkovich PR middle-end/71529 * ipa-chkp.c (chkp_build_instrumented_fndecl): Fix DECL_CONTEXT for copied arguments. 2016-06-15 Alan Hayward PR tree-optimization/71483 * tree-vect-loop.c (vectorizable_live_operation): Pick correct index for slp 2016-06-15 Martin Liska * predict.c (tree_predict_by_opcode): Call predict_edge_def instead of predict_edge w/o a probability. 2016-06-15 Alan Hayward PR tree-optimization/71439 * tree-vect-loop.c (vect_analyze_loop_operations): Additional check for live PHIs. 2016-06-15 Kyrylo Tkachov * ifcvt.c (bb_ok_for_noce_multiple_sets): Allow simple lowpart register subregs in SET_SRC. 2016-06-15 Richard Biener * tree-vect-stmts.c (vectorizable_store): Remove strided grouped store restrictions. 2016-06-15 Richard Biener * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Do not consider dependences between accesses that belong to the same group. (vect_analyze_data_ref_dependences): Do not analyze read-read or self-dependences. 2016-06-14 David Malcolm * spellcheck-tree.c: Include spellcheck-tree.h rather than spellcheck.h. (find_closest_identifier): Reimplement in terms of best_match. * spellcheck-tree.h: New file. * spellcheck.c (struct edit_distance_traits): New struct. (find_closest_string): Reimplement in terms of best_match. * spellcheck.h (levenshtein_distance): Move prototype of tree-based overload to spellcheck-tree.h. (find_closest_identifier): Likewise. (struct edit_distance_traits): New template. (class best_match): New class. 2016-06-14 David Malcolm * selftest-run-tests.c (selftest::run_tests): Call selftest::spellcheck_tree_c_tests. * selftest.h (selftest::spellcheck_tree_c_tests): New decl. * spellcheck-tree.c: Include selftest.h and stringpool.h. (selftest::test_find_closest_identifier): New function. (selftest::spellcheck_tree_c_tests): New function. * spellcheck.c (selftest::test_find_closest_string): Verify that the order of the vec does not affect the results for this case. (selftest::test_data): New array. (selftest::test_metric_conditions): New function. (selftest::spellcheck_c_tests): Add a test of case-comparison. Call selftest::test_metric_conditions. 2016-06-14 Bill Schmidt * config/rs6000/rs6000-builtin.def (commentary): Typo. (BU_P9_MISC_1): Likewise. (BU_P9_64BIT_MISC_0): Likewise. (BU_P9_MISC_0): Likewise. 2016-06-14 David Malcolm * gcc-rich-location.c (gcc_rich_location::add_fixit_misspelled_id): New method. * gcc-rich-location.h (gcc_rich_location::add_fixit_misspelled_id): Add decl. 2016-06-14 Andreas Tobler * config/arm/freebsd.h: Only enable unaligned access for armv6 on FreeBSD 11 and above. 2016-06-14 Uros Bizjak * config/i386/i386.md (signbittf2): Emit sse_movmskps for TARGET_SSE. 2016-06-14 Kyrylo Tkachov * expmed.h: Close parenthesis in "at your option" in copyright boilerplate. * lower-subreg.h: Likewise. 2016-06-14 Richard Biener PR middle-end/71526 * genmatch.c (expr::gen_transform): Use in_type for comparisons if available. 2015-06-14 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p): New function. (aarch64_rtx_costs): Use it. Rewrite CONST_INT_P (op1) case to handle mask+shift version. * config/aarch64/aarch64-protos.h (aarch64_mask_and_shift_for_ubfiz_p): New prototype. * config/aarch64/aarch64.md (*andim_ashift_bfiz): Replace matching condition with aarch64_mask_and_shift_for_ubfiz_p. 2016-06-14 Richard Biener PR tree-optimization/71522 * tree-ssa.c (non_rewritable_lvalue_p): Do not rewrite non-float copying into float copying. 2016-06-14 Jakub Jelinek PR tree-optimization/71520 * tree-ssa-tail-merge.c (find_duplicate): Handle labels. (replace_block_by): Move user labels from bb1 to bb2. 2016-06-14 Richard Biener PR middle-end/71310 PR bootstrap/71510 * expr.h (get_bit_range): Declare. * expr.c (get_bit_range): Export. * fold-const.c (optimize_bit_field_compare): Use get_bit_range and word_mode again to constrain the bitfield access. 2016-06-14 Richard Biener PR tree-optimization/71521 * tree-vrp.c (extract_range_from_binary_expr_1): Guard division int_const_binop against zero divisor. 2016-06-13 Uros Bizjak * config/i386/i386.md (signbittf2): New expander. * config/i386/sse.md (ptesttf2): New insn pattern. 2016-06-13 David Malcolm PR bootstrap/71481 * input.c (selftest::test_reading_source_line): Avoid reading from __FILE__ by creating a tempfile with known content and reading from that instead. 2016-06-13 David Malcolm * pretty-print.c (assert_pp_format_colored): Skip the test if GCC_COLORS is set. (test_pp_format): Remove comment about GCC_COLORS. 2016-06-13 David Malcolm * input.c (test_reading_source_line): Use SELFTEST_LOCATION. * pretty-print.c (assert_pp_format_va): Add location param and use it with ASSERT_STREQ_AT. (assert_pp_format): Add location param and pass it to assert_pp_format_va. (assert_pp_format_colored): Likewise. (ASSERT_PP_FORMAT_1): New. (ASSERT_PP_FORMAT_2): New. (ASSERT_PP_FORMAT_3): New. (test_pp_format): Provide SELFTEST_LOCATION throughout, either explicitly, or implicitly via the above macros. * selftest.c (selftest::pass): Use a selftest::location rather than file and line. (selftest::fail): Likewise. Print the function name. (selftest::fail_formatted): Likewise. (selftest::assert_streq): Use a selftest::location rather than file and line. * selftest.h (selftest::location): New struct. (SELFTEST_LOCATION): New macro. (selftest::pass): Accept a const location & rather than file and line. (selftest::fail): Likewise. (selftest::fail_formatted): Likewise. (selftest::assert_streq): Likewise. (ASSERT_TRUE): Update for above changes, using SELFTEST_LOCATION. (ASSERT_FALSE): Likewise. (ASSERT_EQ): Likewise. (ASSERT_NE): Likewise. (ASSERT_STREQ): Likewise. (ASSERT_PRED1): Likewise. (ASSERT_STREQ_AT): New macro. 2016-06-13 David Malcolm * selftest.c (selftest::fail_formatted): New function. (selftest::assert_streq): New function. * selftest.h (selftests::fail_formatted): New decl. (selftest::assert_streq): New decl. (ASSERT_STREQ): Reimplement in terms of selftest::assert_streq. 2016-06-13 Jeff Law PR tree-optimization/71403 * tree-ssa-threadbackward.c (convert_and_register_jump_thread_path): No longer accept reference to path. Do not pop items off the path anymore. (fsm_find_control_statement_thread_paths): Do not allow threading to a deeper loop nest. Pop the last item off the path here rather than in convert_and_register_jump_thread_path. 2016-06-13 Evandro Menezes Wilco Dijkstra [AArch64] Emit division using the Newton series * config/aarch64/aarch64-protos.h (cpu_approx_modes): Add new member "division". (aarch64_emit_approx_div): Declare new function. * config/aarch64/aarch64.c (generic_approx_modes): New member "division". (exynosm1_approx_modes): Likewise. (xgene1_approx_modes): Likewise. (aarch64_emit_approx_div): Define new function. * config/aarch64/aarch64.md ("div3"): New expansion. * config/aarch64/aarch64-simd.md ("div3"): Likewise. * config/aarch64/aarch64.opt (-mlow-precision-div): Add new option. * doc/invoke.texi (-mlow-precision-div): Describe new option. 2016-06-13 Evandro Menezes Wilco Dijkstra [AArch64] Emit square root using the Newton series * config/aarch64/aarch64-protos.h (aarch64_emit_approx_rsqrt): Replace with new function "aarch64_emit_approx_sqrt". (cpu_approx_modes): New member "sqrt". * config/aarch64/aarch64.c (generic_approx_modes): New member "sqrt". (exynosm1_approx_modes): Likewise. (xgene1_approx_modes): Likewise. (aarch64_emit_approx_rsqrt): Replace with new function "aarch64_emit_approx_sqrt". (aarch64_override_options_after_change_1): Handle new option. * config/aarch64/aarch64-simd.md (rsqrt2): Use new function instead. (sqrt2): New expansion and insn definitions. * config/aarch64/aarch64.md: Likewise. * config/aarch64/aarch64.opt (mlow-precision-sqrt): Add new option description. * doc/invoke.texi (mlow-precision-sqrt): Likewise. 2016-06-13 Evandro Menezes [AArch64] Add more choices for the reciprocal square root approximation Allow a target to prefer such operation depending on the operation mode. * config/aarch64/aarch64-protos.h (AARCH64_APPROX_MODE): New macro. (AARCH64_APPROX_{NONE,ALL}): Likewise. (cpu_approx_modes): New structure. (tune_params): New member "approx_modes". * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNE_APPROX_RSQRT): Remove macro. * config/aarch64/aarch64.c (generic_approx_modes): New core "cpu_approx_modes" structure. (exynosm1_approx_modes): Likewise. (xgene1_approx_modes): Likewise. (generic_tunings): New member "approx_modes". (cortexa35_tunings): Likewise. (cortexa53_tunings): Likewise. (cortexa57_tunings): Likewise. (cortexa72_tunings): Likewise. (exynosm1_tunings): Likewise. (thunderx_tunings): Likewise. (xgene1_tunings): Likewise. (use_rsqrt_p): New argument for the mode and use new member from "tune_params". (aarch64_builtin_reciprocal): Devise mode from builtin. (aarch64_optab_supported_p): New argument for the mode. * doc/invoke.texi (-mlow-precision-recip-sqrt): Reword description. 2016-06-13 Kelvin Nilsen * config/rs6000/rs6000.h (RS6000_BTM_COMMON): Add the RS6000_BTM_MODULO flag into the set of flags that are considered to be part of the common configuration. 2016-06-13 Kelvin Nilsen * config/rs6000/altivec.h (vec_absd): New macro for vector absolute difference unsigned. (vec_absdb): New macro for vector absolute difference unsigned byte. (vec_absdh): New macro for vector absolute difference unsigned half-word. (vec_absdw): New macro for vector absolute difference unsigned word. * config/rs6000/altivec.md (UNSPEC_VADU): New value. (vadu3): New insn. (*p9_vadu3): New insn. * config/rs6000/rs6000-builtin.def (vadub): New built-in definition. (vaduh): New built-in definition. (vaduw): New built-in definition. (vadu): New overloaded built-in definition. (vadub): New overloaded built-in definition. (vaduh): New overloaded built-in definition. (vaduw): New overloaded built-in definition. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded vector absolute difference unsigned functions. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document the ISA 3.0 vector absolute difference unsigned built-in functions. 2016-06-13 Eric Botcazou * tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and update shared_lookup_references only once after changing operands. 2016-06-13 Thomas Schwinge PR middle-end/71373 * tree-nested.c (convert_nonlocal_omp_clauses) (convert_local_omp_clauses): Document missing OMP_CLAUSE_*. * tree-cfg.c (edge_to_cases_cleanup): Fix CASE_CHAIN typo. * tree.def (CASE_LABEL_EXPR): Likewise. 2016-06-13 Bernd Edlinger PR bootstrap/71481 * input.c (test_builtins): Fix an assertion. 2016-06-13 Uros Bizjak * config/i386/i386.md (paritydi2): Use ix86_expand_setcc. (paritysi2): Ditto. (isinfxf2): Ditto. (isinf2): Ditto. 2016-06-13 Uros Bizjak * ggc-tests.c (test_finalization): Only test need_finalization_p for GCC_VERSION >= 4003. 2016-06-13 Andreas Krebbel * config/s390/vecintrin.h: Fix file description in comment. 2016-06-13 Andreas Krebbel * config/s390/s390-builtin-types.def: Change builtin type naming scheme to match builtin-types.def. 2016-06-13 Marc Glisse * fold-const.c (optimize_minmax_comparison): Remove. (fold_comparison): Remove call to the above. * match.pd (MIN (X, Y) == X, MIN (X, 5) == 0, MIN (X, C1) < C2): New transformations. 2016-06-13 Alan Hayward PR tree-optimization/71416 * tree-vect-loop.c (vectorizable_live_operation): Let worklist have multiple entries 2016-06-13 Martin Liska * predict.c (enum predictor_reason): Prefix enum with REASON_. (combine_predictions_for_insn): Likewise. (prune_predictions_for_bb): Likewise. (combine_predictions_for_bb): Likewise. 2016-06-13 Richard Biener PR tree-optimization/71505 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Make assert match comment. 2016-06-13 Marek Polacek PR middle-end/71476 * gimplify.c (maybe_warn_switch_unreachable): Factored out of gimplify_switch_expr. (warn_switch_unreachable_r): New function. 2016-06-13 Andreas Krebbel PR target/71379 * config/s390/s390.c (s390_expand_builtin): Increase MAX_ARGS by one. 2016-06-13 Richard Biener PR middle-end/64516 * fold-const.c (fold_unary_loc): Preserve alignment when folding a VIEW_CONVERT_EXPR into a MEM_REF. 2016-06-13 Martin Liska PR sanitizer/71458 * toplev.c (process_options): Do not enable -fcheck-pointer-bounds w/ -fsanitize=bounds. 2016-06-12 Uros Bizjak * config/i386/i386.c (ix86_init_builtins): Calculate FLOAT128_FTYPE_CONST_STRING function type only once. * doc/extend.texi (x86 Built-in Functions): Update text, __float128 built-in functions are available for x86-32 and x86-64 targets. 2016-06-12 Uros Bizjak PR target/71241 * config/i386/i386.i386-builtin-types.def (CONST_STRING): New primitive type. (FLOAT128_FTYPE_CONST_STRING): New function type. * config/i386/i386.c (enum ix86_builtins) [IX86_BUILTIN_NANQ]: New. [IX86_BUILTIN_NANSQ]: Ditto. (ix86_fold_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ. (ix86_init_builtin_types): Declare const_string_type_node. (ix86_init_builtins): Add __builtin_nanq and __builtin_nansq builtin functions. (ix86_expand_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ. * doc/extend.texi (x86 Built-in Functions): Document __builtin_nanq and __builtin_nansq. 2016-06-11 Jiong Wang PR target/71061 * config/arm/arm-protos.h (arm_attr_length_pop_multi): New declaration. * config/arm/arm.c (arm_attr_length_pop_multi): New function to return length for pop patterns. (arm_attr_length_push_multi): Update comments. * config/arm/arm.md (*load_multiple_with_writeback): Set "length" attribute. (*pop_multiple_with_writeback_and_return): Likewise. (*pop_multiple_with_return): Likewise. 2016-06-11 Segher Boessenkool PR middle-end/71310 * fold-const.c (optimize_bit_field_compare): Don't try to use word_mode unconditionally for reading the bit field, look at DECL_BIT_FIELD_REPRESENTATIVE instead. 2016-06-11 Kugan Vivekanandarajah PR middle-end/71478 * tree-ssa-reassoc.c (reassociate_bb): Remove (-1) from ops list for vector integer type. 2016-06-10 Jakub Jelinek PR middle-end/71494 * tree-nested.c (convert_nonlocal_reference_stmt): For GIMPLE_GOTO without LABEL_DECL, set *handled_ops_p to false instead of true. 2016-06-10 Martin Sebor PR c/71392 * builtin-attrs.def (ATTR_NOTHROW_NONNULL_LEAF_LIST): New macro. (ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF): Same. * builtins.def (BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW): Use them. (BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW): Same. (BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW): Same. (BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW): Same. (BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADD_OVERFLOW): Same. (BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW): Same. (BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW): Same. (BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW): Same. (BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW): Same. 2016-06-10 Bernd Edlinger * config/arm/arm.h (pool_vector_label, return_used_this_function): Remove. 2016-06-10 Jeff Law PR tree-optimization/71335 * tree-ssa-threadbackward.c (profitable_jump_thread_path): Filter out zero length paths here. (convert_and_register_jump_thread_path): Remove hacks related to duplicated blocks in the jump thread path. (fsm_find_control_statement_thread_paths): Avoid putting the same block on the thread path twice, but ensure the thread path is unchanged from the caller's point of view. 2016-06-10 Jan Hubicka * predict.c (predict_loops): Remove PRED_LOOP_BRANCH. * predict.def (PRED_LOOP_BRANCH): Remove. 2016-06-10 David Malcolm * Makefile.in (OBJS): Add ggc-tests.o. (GTFILES): Add ggc-tests.c. * ggc-tests.c: New file. * selftest-run-tests.c (selftest::run_tests): Call selftest::ggc_tests_c_tests. * selftest.h (selftest::ggc_tests_c_tests): New prototype. 2016-06-10 Alexander Monakov * match.pd (-1 / B < A): Use :c to avoid pattern duplication. 2016-06-10 Maxim Ostapenko PR sanitizer/71480 * varasm.c (place_block_symbol): Adjust alignment for asan protected STRING_CSTs even if TREE_CONSTANT_POOL_ADDRESS_P. 2016-06-10 Jan Hubicka * profile.c: Include cfgloop.h. (branch_prob): Compute estimated number of iterations. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Do not recompute estimate number of iterations from profile. 2016-06-10 Bernd Edlinger PR inline-asm/68843 * reg-stack.c (check_asm_stack_operands): Explicit input arguments must be grouped on top of stack. Don't force early clobber on ordinary reg outputs. 2016-06-10 Richard Biener * targhooks.c (default_builtin_vectorization_cost): Adjust vec_construct cost. 2016-06-10 Richard Biener * gimple-fold.c (gimple_fold_builtin_memory_op): Make sure to fold the RHS to a constant if possible. 2016-06-10 Thomas Schwinge PR middle-end/71373 * tree-nested.c (convert_nonlocal_omp_clauses) (convert_local_omp_clauses): Handle OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO, OMP_CLAUSE__CACHE_, OMP_CLAUSE_TILE. * gimplify.c (gimplify_adjust_omp_clauses): Discard OMP_CLAUSE_TILE. * omp-low.c (scan_sharing_clauses): Don't expect OMP_CLAUSE_TILE. * omp-low.c (scan_sharing_clauses): Don't expect OMP_CLAUSE__CACHE_. 2016-06-10 Alan Hayward PR tree-optimization/71407 PR tree-optimization/71416 * tree-vect-loop.c (vectorizable_live_operation): Use vectype for BIT_FIELD_REF type. 2016-06-10 Richard Biener PR middle-end/71477 * cfgloop.c (alloc_loop): Initialize nb_iterations_likely_upper_bound. 2016-06-09 Eric Botcazou * df-problems.c (df_note_bb_compute): Guard use of DF_INSN_INFO_GET. 2016-06-09 Vladimir Makarov Jiong Wang PR rtl-optimization/70751 * lra-constraints.c (process_alt_operands): Recognize Non-pseudo spilled into memory. 2016-06-09 Jonathan Yong <10walls@gmail.com> Revert: 2015-09-21 Jonathan Yong <10walls@gmail.com> * config/i386/cygwin.h (STARTFILE_SPEC): Explicitly search sysroot/usr/lib/32api for additional win32 libraries, fixes failing Cygwin bootstrapping. 2016-06-09 Marcin BaczyÅ„ski * diagnostic.h (diagnostic_line_cutoff, diagnostic_flush_buffer): Delete. 2016-06-09 David Malcolm PR bootstrap/71471 * pretty-print.c (pp_indent): Specify that %p is printed in a host-dependent manner. (test_pp_format): Remove the test for %p. 2016-06-09 Maciej W. Rozycki * config/mips/mips.c (mips_output_jump): Fix formatting. 2016-06-09 Richard Biener PR tree-optimization/71462 * tree-ssa-loop-manip.c (find_uses_to_rename): Guard against removed blocks. 2016-06-09 Martin Liska * predict.c (dump_prediction): Add new argument. (enum predictor_reason): New enum. (struct predictor_hash): New struct. (predictor_hash::hash): New function. (predictor_hash::equal): Likewise. (not_removed_prediction_p): New function. (prune_predictions_for_bb): Likewise. (combine_predictions_for_bb): Prune predictions. 2016-06-09 Martin Liska * predict.c (filter_predictions): New function. (remove_predictions_associated_with_edge): Use the filter function. (equal_edge_p): New function. 2016-06-09 Stefan Bruens * doc/invoke.texi (ARM Options): Use lexicographical ordering. Correct usage of @samp vs @option, add @samp where appropriate. Add -march={armv6k,armv6z,arm6zk}, remove -march=ep9312. Add armv6s-m and document it, as it is no official ARM name. 2016-06-09 Kyrylo Tkachov * ifcvt.c (struct noce_if_info): Add transform_name field. (noce_try_move): Set if_info->transform_name to the function name. (noce_try_ifelse_collapse): Likewise. (noce_try_store_flag): Likewise. (noce_try_inverse_constants): Likewise. (noce_try_store_flag_constants): Likewise. (noce_try_addcc): Likewise. (noce_try_store_flag_mask): Likewise. (noce_try_cmove): Likewise. (noce_try_cmove_arith): Likewise. (noce_try_minmax): Likewise. (noce_try_abs): Likewise. (noce_try_sign_mask): Likewise. (noce_try_bitop): Likewise. (noce_convert_multiple_sets): Likewise. (noce_process_if_block): Print if_info->transform_name to dump_file if transformation succeeded. 2016-06-09 Kyrylo Tkachov * config/arm/cortex-a57.md (cortex_a57_alu): Handle csel type. 2016-06-08 Martin Sebor Jakub Jelinek PR c++/70507 PR c/68120 * builtins.def (BUILT_IN_ADD_OVERFLOW_P, BUILT_IN_SUB_OVERFLOW_P, BUILT_IN_MUL_OVERFLOW_P): New builtins. * builtins.c: Include gimple-fold.h. (fold_builtin_arith_overflow): Handle BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P. (fold_builtin_3): Likewise. * doc/extend.texi (Integer Overflow Builtins): Document __builtin_{add,sub,mul}_overflow_p. 2016-06-08 Jose E. Marchesi * config/sparc/driver-sparc.c (cpu_names): Fix the entry for the SPARC-M7 and add an entry for SPARC-S7 cpus (Sonoma). 2016-06-08 Alan Lawrence * config/aarch64/aarch64.c (aarch64_function_arg_alignment): Rewrite, looking one level down for records and arrays. 2016-06-08 David Malcolm * pretty-print.c: Include "selftest.h". (pp_format): Fix comment. (identifier_to_locale): Likewise. (selftest::test_basic_printing): New function. (selftest::assert_pp_format): New function. (selftest::test_pp_format): New function. (selftest::pretty_print_c_tests): New function. * selftest-run-tests.c (selftest::run_tests): Call selftest::pretty_print_c_tests. * selftest.h (pretty_print_c_tests): New declaration. 2016-06-07 Jan Hubicka * invoke.texi (max-loop-headers-insns): Document. * params.def (PARAM_MAX_LOOP_HEADER_INSNS): New. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Update comment. (ch_base::copy_headers): Use PARAM_MAX_LOOP_HEADER_INSNS. 2016-06-08 Richard Biener * tree-vect-stmts.c (vectorizable_load): Remove restrictions on strided SLP loads and fall back to scalar loads in case we can't chunk them. 2016-06-08 Richard Biener PR tree-optimization/71452 * tree-ssa.c (non_rewritable_lvalue_p): Make sure that the type used for the SSA rewrite has enough precision to cover the dynamic type of the location. 2016-06-08 Jakub Jelinek Richard Biener PR c++/71448 * fold-const.c (fold_comparison): Handle CONSTANT_CLASS_P (base0) the same as DECL_P (base0) for indirect_base0. Use equality_code in one further place. 2016-06-08 Richard Sandiford * expmed.c (store_bit_field_1): Do not restrict a multiword op0 to one word if the field is known to overlap other words. (extract_bit_field_1): Likewise. (store_split_bit_field): Remove compensating code. (extract_split_bit_field): Likewise. 2016-06-08 Bernd Schmidt PR debug/71432 PR ada/71413 * tree-ssa-strlen.c (handle_builtin_memcmp): Ignore debug insns. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.def (faddp): New builtins for modes in VDQF. * config/aarch64/aarch64-simd.md (aarch64_faddp): New. (arch64_addpv4sf): Delete. (reduc_plus_scal_v4sf): Use "gen_aarch64_faddpv4sf" instead of "gen_aarch64_addpv4sf". * config/aarch64/arm_neon.h (vpadd_f32): Remove inline assembly. Use builtin. (vpadds_f32): Likewise. (vpaddq_f32): Likewise. (vpaddq_f64): Likewise. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.def (fabd): New builtins for modes VALLF. * config/aarch64/aarch64-simd.md (fabd_3): Extend modes from VDQF to VALLF. Rename to "fabd3". "*fabd_scalar3): Delete. * config/aarch64/arm_neon.h (vabds_f32): Remove inline assembly. Use builtin. (vabdd_f64): Likewise. (vabd_f32): Likewise. (vabd_f64): Likewise. (vabdq_f32): Likewise. (vabdq_f64): Likewise. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.def (rsqrts): New builtins for modes VALLF. * config/aarch64/aarch64-simd.md (aarch64_rsqrts_3): Rename to "aarch64_rsqrts". * config/aarch64/aarch64.c (get_rsqrts_type): Update gen* name. * config/aarch64/arm_neon.h (vrsqrtss_f32): Remove inline assembly. Use builtin. (vrsqrtsd_f64): Likewise. (vrsqrts_f32): Likewise. (vrsqrts_f64): Likewise. (vrsqrtsq_f32): Likewise. (vrsqrtsq_f64): Likewise. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.def (rsqrte): New builtins for modes VALLF. * config/aarch64/aarch64-simd.md (aarch64_rsqrte_2): Rename to "aarch64_rsqrte". * config/aarch64/aarch64.c (get_rsqrte_type): Update gen* name. * config/aarch64/arm_neon.h (vrsqrts_f32): Remove inline assembly. Use builtin. (vrsqrted_f64): Likewise. (vrsqrte_f32): Likewise. (vrsqrte_f64): Likewise. (vrsqrteq_f32): Likewise. (vrsqrteq_f64): Likewise. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.def (scvtf): Register vector modes. (ucvtf): Likewise. (fcvtzs): Likewise. (fcvtzu): Likewise. * config/aarch64/aarch64-simd.md (3): New. (3): Likewise. * config/aarch64/arm_neon.h (vcvt_n_f32_s32): Remove inline assembly. Use builtin. (vcvt_n_f32_u32): Likewise. (vcvt_n_s32_f32): Likewise. (vcvt_n_u32_f32): Likewise. (vcvtq_n_f32_s32): Likewise. (vcvtq_n_f32_u32): Likewise. (vcvtq_n_f64_s64): Likewise. (vcvtq_n_f64_u64): Likewise. (vcvtq_n_s32_f32): Likewise. (vcvtq_n_s64_f64): Likewise. (vcvtq_n_u32_f32): Likewise. (vcvtq_n_u64_f64): Likewise. * config/aarch64/iterators.md (VDQ_SDI): New mode iterator. (VSDQ_SDI): Likewise. (fcvt_target): Support V4DI, V4SI and V2SI. (FCVT_TARGET): Likewise. 2016-06-08 Jiong Wang * config/aarch64/aarch64-builtins.c (TYPES_BINOP_USS): New (TYPES_BINOP_SUS): Likewise. (aarch64_simd_builtin_data): Update include file name. (aarch64_builtins): Likewise. * config/aarch64/aarch64-simd-builtins.def (scvtf): New entries for conversion between scalar float-point and fixed-point. (ucvtf): Likewise. (fcvtzs): Likewise. (fcvtzu): Likewise. * config/aarch64/aarch64.md (3: New pattern for conversion between scalar float to fixed-pointer. (: Likewise. (UNSPEC_FCVTZS): New UNSPEC enumeration. (UNSPEC_FCVTZU): Likewise. (UNSPEC_SCVTF): Likewise. (UNSPEC_UCVTF): Likewise. * config/aarch64/arm_neon.h (vcvtd_n_f64_s64): Remove inline assembly. Use builtin. (vcvtd_n_f64_u64): Likewise. (vcvtd_n_s64_f64): Likewise. (vcvtd_n_u64_f64): Likewise. (vcvtd_n_f32_s32): Likewise. (vcvts_n_f32_u32): Likewise. (vcvtd_n_s32_f32): Likewise. (vcvts_n_u32_f32): Likewise. * config/aarch64/iterators.md (fcvt_target): Support integer to float mapping. (FCVT_TARGET): Likewise. (FCVT_FIXED2F): New iterator. (FCVT_F2FIXED): Likewise. (fcvt_fixed_insn): New define_int_attr. 2016-06-07 Jan Hubicka * predict.c (pass_strip_predict_hints::execute): Cleanup CFG if some statements was removed. 2016-06-08 Alan Hayward * tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug newline. * tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): likewise. (vect_can_advance_ivs_p): likewise. (vect_update_ivs_after_vectorizer): likewise. * tree-vect-loop.c (vect_determine_vectorization_factor): likewise. (vect_analyze_scalar_cycles_1): likewise. (vect_analyze_loop_operations): likewise. (report_vect_op): likewise. (vect_is_slp_reduction): likewise. (vect_is_simple_reduction): likewise. (get_initial_def_for_induction): likewise. (vect_transform_loop): likewise. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): likewise. (vect_recog_sad_pattern): likewise. (vect_recog_widen_sum_pattern): likewise. (vect_recog_widening_pattern): likewise. (vect_recog_divmod_pattern): likewise. * tree-vect-slp.c (vect-build-slp_tree_1): likewise. (vect_analyze_slp_instance): likewise. (vect_transform_slp_perm_load): likewise. (vect_schedule_slp_instance): likewise. 2016-06-07 Jan Hubicka * predict.c (predict_iv_comparison): Mention that heuristics is broken. (return_prediction): PRED_CONST_RETURN predict return as not taken. * predict.def (PRED_CONTINUE): Change hitrate 50->67 (PRED_LOOP_BRANCH): Document predictor as broken. (PRED_LOOP_EXIT): Change hitrate 91->92. (PRED_LOOP_EXTRA_EXIT): Change hitrate 91->83. (PRED_POINTER, PRED_TREE_POINTER): Change hitrate 85->70. (PRED_OPCODE_POSITIVE): Change hitrate 79->64. (PRED_OPCODE_NONEQUAL): Change hitrate 91->66. (PRED_TREE_OPCODE_POSITIVE): Change hitrate 73->64 (PRED_TREE_OPCODE_NONEQUAL): Chnage hitrate 72->66 (PRED_CALL): Chane hitrate 71->67. (PRED_TREE_EARLY_RETURN): Document issues, change hitrate 61->54. (PRED_GOTO): Document as unused right now. (PRED_CONST_RETURN): Change hitrate 67->69 (PRED_NEGATIVE_RETURN): Change hitrate 96->98 (PRED_NULL_RETURN): Change hitrate 91->90. (PRED_LOOP_IV_COMPARE_GUESS): Change hitrate to 98. (PRED_FORTRAN_FAIL_ALLOC): Change hitrate to 62; document issues. (PRED_FORTRAN_SIZE_ZERO): Change hitrate to 99. 2016-06-07 Bill Seurer * config/rs6000/altivec.h: Add __builtin_vec_mul. * config/rs6000/rs6000-builtin.def (vec_mul): Change vec_mul to a special case Altivec builtin. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove VSX_BUILTIN_VEC_MUL (replaced with special case code). * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add code for ALTIVEC_BUILTIN_VEC_MUL. * config/rs6000/rs6000.c (altivec_init_builtins): Add definition for __builtin_vec_mul. 2016-06-07 Peter Bergner * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mhtm and -mno-htm. 2016-06-07 David Malcolm * spellcheck.c (selftest::test_find_closest_string): New function. (spellcheck_c_tests): Call the above. 2016-06-07 Kyrylo Tkachov * simplify-rtx.c (simplify_cond_clz_ctz): Delete 'mode' local variable. 2016-06-07 Jakub Jelinek * config/i386/sse.md (avx_vec_concat): Add v=v,vm and Yv=Yv,C alternatives. 2016-06-07 Richard Biener PR c/61564 * common.opt (ffast-math): Make Optimization. 2016-06-07 Simon Dardis Prachi Godbole * config/mips/p5600.md (p5600_fpu_fadd): Remove checking for `fabs' and `fneg' type attributes. (p5600_fpu_fabs): Add `fmove' to the comment. 2016-06-07 Jan Hubicka * gimple.c: Include builtins.h (gimple_inexpensive_call_p): New function. * gimple.h (gimple_inexpensive_call_p): Declare. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Use it. * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise; fix formatting. 2016-06-07 Paolo Carlini * diagnostic.c (diagnostic_impl, diagnostic_n_impl): New. (inform, inform_at_rich_loc, inform_n, warning, warning_at, warning_at_rich_loc, warning_n, pedwarn, permerror, permerror_at_rich_loc, error, error_n, error_at, error_at_rich_loc, sorry, fatal_error, internal_error, internal_error_no_backtrace): Use the above. 2016-06-07 Richard Biener PR tree-optimization/71428 * tree-ssa-math-opts.c (perform_symbolic_merge): Properly distinguish BIT_FIELD_REF op vs. load. 2016-06-07 Richard Biener PR middle-end/71423 * match.pd ((X | ~Y) -> Y <= X): Properly invert the comparison for signed ops. 2016-06-06 John David Anglin * config/pa/pa.md (call): Generate indirect long calls to non-local functions on TARGET_64BIT. (call_value): Likewise. 2016-06-06 John David Anglin * config/pa/pa.md (call_val_reg_64bit): Remove "reg: DI " clobber from pattern and subsequent splitters. (call_val_reg_64bit_post_reload): Likewise. 2016-06-07 Kugan Vivekanandarajah PR middle-end/71408 * tree-ssa-reassoc.c (zero_one_operation): Fix NEGATE_EXPR operand for propagate_op_to_single_use. 2016-06-07 Kugan Vivekanandarajah PR middle-end/71281 * tree-ssa-reassoc.c (reassociate_bb): Set uid for negate stmt. 2016-06-07 Uros Bizjak * config/i386/i386.h (enum ix86_enitity): Add X86_DIRFLAG. (enum x86_dirflag_state): New enum. (NUM_MODES_FOR_MODE_SWITCHING): Add X86_DIRFLAG_ANY. (machine_function): Remove needs_cld. (ix86_current_function_needs_cld): Remove. * config/i386/i386.c (ix86_set_func_type): Set ix86_optimize_mode_switching[X86_DIRFLAG] to 1. (ix86_expand_prologue): Do not emit CLD here. (ix86_dirflag_mode_needed): New function. (ix86_dirflag_mode_entry): Ditto. (ix86_mode_needed): Handle X86_DIRFLAG entity. (ix86_mode_after): Ditto. (ix86_mode_entry): Ditto. (ix86_mode_exit): Ditto. (ix86_emit_mode_set): Ditto. * config/i386/i386.md (strmov_singleop): Set ix86_optimize_mode_switching[X86_DIRFLAG] to 1 for TARGET_CLD. Do not set ix86_current_function_needs_cld. (rep_mov): Ditto. (strset_singleop): Ditto. (rep_stos): Ditto. (cmpstrnqi_nz_1): Ditto. (cmpstrnqi_1): Ditto. (strlenqi_1): Ditto. 2016-06-06 Jakub Jelinek PR tree-optimization/71259 * tree-vect-slp.c (vect_get_constant_vectors): For VECTOR_BOOLEAN_TYPE_P, return all ones constant instead of one for constant op, and use COND_EXPR for non-constant. 2016-06-06 David Malcolm * Makefile.in (OBJS): Add function-tests.o, hash-map-tests.o, hash-set-tests.o, rtl-tests.o, selftest-run-tests.o. (OBJS-libcommon): Add selftest.o. (OBJS-libcommon-target): Add selftest.o. (all.internal): Add "selftest". (all.cross): Likewise. (selftest): New phony target. (s-selftest): New target. (selftest-gdb): New phony target. (COLLECT2_OBJS): Add selftest.o. * bitmap.c: Include "selftest.h". (selftest::test_gc_alloc): New function. (selftest::test_set_range): New function. (selftest::test_clear_bit_in_middle): New function. (selftest::test_copying): New function. (selftest::test_bitmap_single_bit_set_p): New function. (selftest::bitmap_c_tests): New function. * common.opt (fself-test): New. * diagnostic-show-locus.c: Include "selftest.h". (make_range): New function. (test_range_contains_point_for_single_point): New function. (test_range_contains_point_for_single_line): New function. (test_range_contains_point_for_multiple_lines): New function. (assert_eq): New function. (test_get_line_width_without_trailing_whitespace): New function. (selftest::diagnostic_show_locus_c_tests): New function. * et-forest.c: Include "selftest.h". (selftest::test_single_node): New function. (selftest::test_simple_tree): New function. (selftest::test_disconnected_nodes): New function. (selftest::et_forest_c_tests): New function. * fold-const.c: Include "selftest.h". (selftest::assert_binop_folds_to_const): New function. (selftest::assert_binop_folds_to_nonlvalue): New function. (selftest::test_arithmetic_folding): New function. (selftest::fold_const_c_tests): New function. * function-tests.c: New file. * gimple.c: Include "selftest.h". Include "gimple-pretty-print.h". (selftest::verify_gimple_pp): New function. (selftest::test_assign_single): New function. (selftest::test_assign_binop): New function. (selftest::test_nop_stmt): New function. (selftest::test_return_stmt): New function. (selftest::test_return_without_value): New function. (selftest::gimple_c_tests): New function. * hash-map-tests.c: New file. * hash-set-tests.c: New file. * input.c: Include "selftest.h". (selftest::assert_loceq): New function. (selftest::test_accessing_ordinary_linemaps): New function. (selftest::test_unknown_location): New function. (selftest::test_builtins): New function. (selftest::test_reading_source_line): New function. (selftest::input_c_tests): New function. * rtl-tests.c: New file. * selftest-run-tests.c: New file. * selftest.c: New file. * selftest.h: New file. * spellcheck.c: Include "selftest.h". (selftest::levenshtein_distance_unit_test_oneway): New function, adapted from testsuite/gcc.dg/plugin/levenshtein_plugin.c. (selftest::levenshtein_distance_unit_test): Likewise. (selftest::spellcheck_c_tests): Likewise. * toplev.c: Include selftest.h. (toplev::run_self_tests): New. (toplev::main): Handle -fself-test. * toplev.h (toplev::run_self_tests): New. * tree.c: Include "selftest.h". (selftest::test_integer_constants): New function. (selftest::test_identifiers): New function. (selftest::test_labels): New function. (selftest::tree_c_tests): New function. * tree-cfg.c: Include "selftest.h". (selftest::push_fndecl): New function. (selftest::test_linear_chain): New function. (selftest::test_diamond): New function. (selftest::test_fully_connected): New function. (selftest::tree_cfg_c_tests): New function. * vec.c: Include "selftest.h". (selftest::safe_push_range): New function. (selftest::test_quick_push): New function. (selftest::test_safe_push): New function. (selftest::test_truncate): New function. (selftest::test_safe_grow_cleared): New function. (selftest::test_pop): New function. (selftest::test_safe_insert): New function. (selftest::test_ordered_remove): New function. (selftest::test_unordered_remove): New function. (selftest::test_block_remove): New function. (selftest::reverse_cmp): New function. (selftest::test_qsort): New function. (selftest::vec_c_tests): New function.c. * wide-int.cc: Include selftest.h and wide-int-print.h. (selftest::from_int ): New function. (selftest::from_int ): New function. (selftest::from_int ): New function. (selftest::assert_deceq): New function. (selftest::assert_hexeq): New function. (selftest::test_printing ): New function template. (selftest::test_ops ): New function template. (selftest::test_comparisons ): New function template. (selftest::run_all_wide_int_tests ): New function template. (selftest::wide_int_cc_tests): New function. 2016-06-06 Kyrylo Tkachov PR middle-end/37780 * ifcvt.c (noce_try_ifelse_collapse): New function. Declare prototype. (noce_process_if_block): Call noce_try_ifelse_collapse. * simplify-rtx.c (simplify_cond_clz_ctz): New function. (simplify_ternary_operation): Use the above to simplify conditional CLZ/CTZ expressions. 2016-06-06 Kyrylo Tkachov PR middle-end/37780 * config/aarch64/aarch64.md (ctz2): Convert to define_insn_and_split. 2016-06-06 Kyrylo Tkachov PR middle-end/37780 * config/arm/arm.md (ctzsi2): Convert to define_insn_and_split. 2016-06-06 Bernd Edlinger PR c/24414 * cfgexpand.c (expand_asm_loc): Remove handling for ADDR_EXPR. Implicitly clobber memory for basic asm with non-empty assembler string. Use targetm.md_asm_adjust also here. * compare-elim.c (arithmetic_flags_clobber_p): Use asm_noperands here. * final.c (final_scan_insn): Handle basic asm in PARALLEL block. * gimple.c (gimple_asm_clobbers_memory_p): Handle basic asm with non-empty assembler string. * ira.c (compute_regs_asm_clobbered): Use asm_noperands here. * recog.c (asm_noperands): Handle basic asm in PARALLEL block. (decode_asm_operands): Handle basic asm in PARALLEL block. (extract_insn): Handle basic asm in PARALLEL block. * doc/extend.texi: Mention new behavior of basic asm. * config/ia64/ia64 (rtx_needs_barrier): Handle ASM_INPUT here. * config/pa/pa.c (branch_to_delay_slot_p, branch_needs_nop_p, branch_needs_nop_p): Use asm_noperands. 2016-06-06 Jose E. Marchesi * config/sparc/sparc.md (cpu): Add niagara7 cpu type. Include the M7 SPARC DFA scheduler. New attribute v3pipe. Annotate insns with v3pipe where appropriate. Define cpu_feature vis4. Add lzd instruction type and set it on clzdi_sp64 and clzsi_sp64. Add (V8QI "8") to vbits. Add insns {add,sub}v8qi3 Add insns ss{add,sub}v8qi3 Add insns us{add,sub}{v8qi,v4hi}3 Add insns {min,max}{v8qi,v4hi,v2si}3 Add insns {minu,maxu}{v8qi,v4hi,v2si}3 Add insns fpcmp{le,gt,ule,ug,ule,ugt}{8,16,32}_vis. * config/sparc/niagara4.md: Add a comment explaining the discrepancy between the documented latenty numbers and the implemented ones. * config/sparc/niagara7.md: New file. * configure.ac (HAVE_AS_SPARC5_VIS4): Define if the assembler supports SPARC5 and VIS 4.0 instructions. * configure: Regenerate. * config.in: Likewise. * config.gcc: niagara7 is a supported cpu in sparc*-*-* targets. * config/sparc/sol2.h (ASM_CPU32_DEFAUILT_SPEC): Set for TARGET_CPU_niagara7. (ASM_CPU64_DEFAULT_SPEC): Likewise. (CPP_CPU_SPEC): Handle niagara7. (ASM_CPU_SPEC): Likewise. * config/sparc/sparc-opts.h (processor_type): Add PROCESSOR_NIAGARA7. (mvis4): New option. * config/sparc/sparc.h (TARGET_CPU_niagara7): Define. (AS_NIAGARA7_FLAG): Define. (ASM_CPU64_DEFAULT_SPEC): Set for niagara7. (CPP_CPU64_DEFAULT_SPEC): Likewise. (CPP_CPU_SPEC): Handle niagara7. (ASM_CPU_SPEC): Likewise. * config/sparc/sparc.c (niagara7_costs): Define. (sparc_option_override): Handle niagara7 and adjust cache-related parameters with better values for niagara cpus. Also support VIS4. (sparc32_initialize_trampoline): Likewise. (sparc_use_sched_lookahead): Likewise. (sparc_issue_rate): Likewise. (sparc_register_move_cost): Likewise. (dump_target_flag_bits): Support VIS4. (sparc_vis_init_builtins): Likewise. (sparc_builtins): Likewise. * config/sparc/sparc-c.c (sparc_target_macros): Define __VIS__ for VIS4 4.0. * config/sparc/driver-sparc.c (cpu_names): Add SPARC-M7 and UltraSparc M7. * config/sparc/sparc.opt (sparc_processor_type): New value niagara7. * config/sparc/visintrin.h (__attribute__): Prototypes for the VIS4 builtins. * doc/invoke.texi (SPARC Options): Document -mcpu=niagara7 and -mvis4. * doc/extend.texi (SPARC VIS Built-in Functions): Document the VIS4 builtins. 2016-06-06 Jonathan Wakely * doc/sourcebuild.texi (Directives): Remove extra closing braces. 2016-06-06 Richard Biener PR tree-optimization/71398 * tree-ssa-loop-ivcanon.c (unloop_loops): First unloop, then remove edges. 2016-06-05 James Bowman * config/ft32/ft32.c (ft32_setup_incoming_varargs, ft32_expand_prolog, ft32_expand_epilogue): Handle pretend_args. * config/ft32/ft32.h: Remove OUTGOING_REG_PARM_STACK_SPACE. * config/ft32/ft32.md: Add pretend_returner. 2016-06-06 Uros Bizjak PR target/71389 * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): Copy op1 RTX to avoid invalid sharing. (ix86_expand_vector_move_misalign): Ditto. 2016-06-05 John David Anglin * expr.c (move_by_pieces_d::generate): Mark mode parameter with ATTRIBUTE_UNUSED. 2016-06-05 Jan Hubicka * predict.c (predicted_by_loop_heuristics_p): New function. (predict_iv_comparison): Use it. (predict_loops): Walk from innermost loops; do not predict edges leaving multiple loops multiple times; implement PRED_LOOP_ITERATIONS_MAX heuristics. * predict.def (PRED_LOOP_ITERATIONS_MAX): New predictor. 2016-06-05 Jan Hubicka * cfg.c (check_bb_profile): Do not report mismatched profiles when only edges out of BB are EH edges. 2016-06-04 Martin Sebor Marcin BaczyÅ„ski PR c/48116 * doc/invoke.texi (-Wreturn-type): Mention not warning on return with a void expression in a void function. 2016-06-03 Jan Hubicka * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Do not check aux; dump reasons of decisions. (should_duplicate_loop_header_p): Likewise. (do_while_loop_p): Likewise. (ch_base::copy_headers): Dump asi num insns duplicated. 2016-06-04 Jakub Jelinek PR tree-optimization/71405 * tree-ssa.c (execute_update_addresses_taken): For clobber with incompatible type, build a new clobber with the right type instead of building a VIEW_CONVERT_EXPR around it. 2016-06-04 Oleg Endo PR tree-optimization/52171 * config/sh/sh.c (sh_use_by_pieces_infrastructure_p): Use by_pieces_ninsns instead of move_by_pieces_ninsns. 2016-06-04 Oleg Endo * config/sh/sh.c (sh_print_operand_address): Don't use hardcoded 'r0' for reg+reg addressing mode. 2016-06-03 Bill Schmidt * rs6000-c.c (c/c-tree.h): Add #include. (altivec_resolve_overloaded_builtin): Handle ARRAY_TYPE arguments in C++ when found in the base position of vec_ld or vec_st. 2016-06-03 Jan Hubicka * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Avoid use of profile unless profile status is PROFILE_READ. * profile.c (compute_branch_probabilities): Set profile status only after reporting predictor hitrates. 2016-06-03 Joseph Myers PR target/71276 PR target/71277 * common.opt (ffp-int-builtin-inexact): New option. * doc/invoke.texi (-fno-fp-int-builtin-inexact): Document. * doc/md.texi (floor@var{m}2, btrunc@var{m}2, round@var{m}2) (ceil@var{m}2): Document dependence on this option. * ipa-inline-transform.c (inline_call): Handle flag_fp_int_builtin_inexact. * ipa-inline.c (can_inline_edge_p): Likewise. * config/i386/i386.md (rintxf2): Do not test flag_unsafe_math_optimizations. (rint2_frndint): New define_insn. (rint2): Do not test flag_unsafe_math_optimizations for 387 or !flag_trapping_math for SSE. Just use gen_rint2_frndint for 387 instead of extending and truncating. (frndintxf2_): Test flag_fp_int_builtin_inexact || !flag_trapping_math instead of flag_unsafe_math_optimizations. Change to frndint2_. (frndintxf2__i387): Likewise. Change to frndint2__i387. (xf2): Likewise. (2): Test flag_fp_int_builtin_inexact || !flag_trapping_math instead of flag_unsafe_math_optimizations for x87. Test TARGET_ROUND || !flag_trapping_math || flag_fp_int_builtin_inexact instead of !flag_trapping_math for SSE. Use ROUND_NO_EXC in constant operand of gen_sse4_1_round2. Just use gen_frndint2_ for 387 instead of extending and truncating. 2016-06-03 H.J. Lu Julia Koval PR target/66960 PR target/67630 PR target/67634 PR target/67841 PR target/68037 PR target/68618 PR target/68661 PR target/69575 PR target/69596 PR target/69734 * config/i386/i386-protos.h (ix86_epilogue_uses): New prototype. * config/i386/i386.c (ix86_conditional_register_usage): Preserve all registers, except for function return registers if there are no caller-saved registers. (ix86_set_func_type): New function. (ix86_set_current_function): Call ix86_set_func_type to set no_caller_saved_registers and func_type. Call reinit_regs if caller-saved registers are changed. Don't allow MPX, SSE, MMX nor x87 instructions in interrupt handler nor function with no_caller_saved_registers attribute. (ix86_function_ok_for_sibcall): Return false if there are no caller-saved registers. (type_natural_mode): Don't warn ABI change for MMX in interrupt handler. (ix86_function_arg_advance): Skip for callee in interrupt handler. (ix86_function_arg): Return special arguments in interrupt handler. (ix86_promote_function_mode): Promote pointer to word_mode only for normal functions. (ix86_can_use_return_insn_p): Don't use `ret' instruction in interrupt handler. (ix86_epilogue_uses): New function. (ix86_hard_regno_scratch_ok): Likewise. (ix86_save_reg): Preserve all registers in interrupt handler after reload. Preserve all registers, except for function return registers, if there are no caller-saved registers after reload. (find_drap_reg): Always use callee-saved register if there are no caller-saved registers. (ix86_minimum_incoming_stack_boundary): Return MIN_STACK_BOUNDARY for interrupt handler. (ix86_expand_prologue): Don't allow DRAP in interrupt handler. Emit cld instruction if stringops are used in interrupt handler or interrupt handler isn't a leaf function. (ix86_expand_epilogue): Generate interrupt return for interrupt handler and pop the 'ERROR_CODE' off the stack before interrupt return in exception handler. (ix86_expand_call): Disallow calling interrupt handler directly. If there are no caller-saved registers, mark all registers that are clobbered by the call which returns as clobbered. (ix86_handle_no_caller_saved_registers_attribute): New function. (ix86_handle_interrupt_attribute): Likewise. (ix86_attribute_table): Add interrupt and no_caller_saved_registers attributes. (TARGET_HARD_REGNO_SCRATCH_OK): Likewise. * config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Use argument accumulation in interrupt function if stack may be realigned to avoid DRAP. (EPILOGUE_USES): New. (function_type): New enum. (machine_function): Add func_type and no_caller_saved_registers. * config/i386/i386.md (UNSPEC_INTERRUPT_RETURN): New. (interrupt_return): New pattern. * doc/extend.texi: Document x86 interrupt and no_caller_saved_registers attributes. 2016-06-03 Bernd Schmidt PR tree-optimization/52171 * builtins.c (expand_cmpstrn_or_cmpmem): Delete, moved elsewhere. (expand_builtin_memcmp): New arg RESULT_EQ. All callers changed. Look for constant strings. Move some code to emit_block_cmp_hints and use it. * builtins.def (BUILT_IN_MEMCMP_EQ): New. * defaults.h (COMPARE_MAX_PIECES): New macro. * expr.c (move_by_pieces_d, store_by_pieces_d): Remove old structs. (move_by_pieces_1, store_by_pieces_1, store_by_pieces_2): Remvoe. (clear_by_pieces_1): Don't declare. Move definition before use. (can_do_by_pieces): New static function. (can_move_by_pieces): Use it. Return bool. (by_pieces_ninsns): Renamed from move_by_pieces_ninsns. New arg OP. All callers changed. Handle COMPARE_BY_PIECES. (class pieces_addr); New. (pieces_addr::pieces_addr, pieces_addr::decide_autoinc, pieces_addr::adjust, pieces_addr::increment_address, pieces_addr::maybe_predec, pieces_addr::maybe_postinc): New member functions for it. (class op_by_pieces_d): New. (op_by_pieces_d::op_by_pieces_d, op_by_pieces_d::run): New member functions for it. (class move_by_pieces_d, class compare_by_pieces_d, class store_by_pieces_d): New subclasses of op_by_pieces_d. (move_by_pieces_d::prepare_mode, move_by_pieces_d::generate, move_by_pieces_d::finish_endp, store_by_pieces_d::prepare_mode, store_by_pieces_d::generate, store_by_pieces_d::finish_endp, compare_by_pieces_d::generate, compare_by_pieces_d::prepare_mode, compare_by_pieces_d::finish_mode): New member functions. (compare_by_pieces, emit_block_cmp_via_cmpmem): New static functions. (expand_cmpstrn_or_cmpmem): Moved here from builtins.c. (emit_block_cmp_hints): New function. (move_by_pieces, store_by_pieces, clear_by_pieces): Rewrite to just use the newly defined classes. * expr.h (by_pieces_constfn): New typedef. (can_store_by_pieces, store_by_pieces): Use it in arg declarations. (emit_block_cmp_hints, expand_cmpstrn_or_cmpmem): Declare. (move_by_pieces_ninsns): Don't declare. (can_move_by_pieces): Change return value to bool. * target.def (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Update docs. (compare_by_pieces_branch_ratio): New hook. * target.h (enum by_pieces_operation): Add COMPARE_BY_PIECES. (by_pieces_ninsns): Declare. * targethooks.c (default_use_by_pieces_infrastructure_p): Handle COMPARE_BY_PIECES. (default_compare_by_pieces_branch_ratio): New function. * targhooks.h (default_compare_by_pieces_branch_ratio): Declare. * doc/tm.texi.in (STORE_MAX_PIECES, COMPARE_MAX_PIECES): Document. * doc/tm.texi: Regenerate. * tree-ssa-strlen.c: Include "builtins.h". (handle_builtin_memcmp): New static function. (strlen_optimize_stmt): Call it for BUILT_IN_MEMCMP. * tree.c (build_common_builtin_nodes): Create __builtin_memcmp_eq. 2016-06-03 Alan Hayward * tree-vect-stmts.c (vect_stmt_relevant_p): Do not vectorize non live relevant stmts which are simple and invariant. * tree-vect-loop.c (vectorizable_live_operation): Check relevance instead of simple and invariant 2016-06-03 Alan Hayward * tree-vect-loop.c (vect_analyze_loop_operations): Allow live stmts. (vectorizable_reduction): Check for new relevant state. (vectorizable_live_operation): vectorize live stmts using BIT_FIELD_REF. Remove special case for gimple assigns stmts. * tree-vect-stmts.c (is_simple_and_all_uses_invariant): New function. (vect_stmt_relevant_p): Check for stmts which are only used live. (process_use): Use of a stmt does not inherit it's live value. (vect_mark_stmts_to_be_vectorized): Simplify relevance inheritance. (vect_analyze_stmt): Check for new relevant state. * tree-vectorizer.h (vect_relevant): New entry for a stmt which is used outside the loop, but not inside it. 2016-06-03 Alan Hayward * tree-vectorizer.h (vect_get_vec_def_for_operand_1): New. * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): New. (vect_get_vec_def_for_operand): Split out code. 2016-06-03 Segher Boessenkool * config/rs6000/rs6000.md (define_peepholes for two mfcr's): Delete. 2016-06-03 Alan Hayward * tree-vect-stmts.c (vectorizable_call) Remove GOMP_SIMD_LANE code. 2016-06-03 Kyrylo Tkachov * config/arm/thumb1.md (*thumb1_mulsi3): Fix typos in comment. 2016-06-03 Jakub Jelinek PR middle-end/71387 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): If redirecting to noreturn e->callee->decl that has void return type and void arguments, adjust gimple_call_fntype and remove lhs even if it had previously addressable type. 2016-06-02 Jeff Law PR tree-optimization/71328 * tree-ssa-threadupdate.c (duplicate_thread_path): Fix off-by-one error when checking for a jump back onto the copied path. 2016-06-02 David Malcolm * config/microblaze/microblaze.c (get_branch_target): Add return NULL_RTX for the non-CALL_P case. (insert_wic_for_ilb_runout): Remove unused local "wic_addr1". (insert_wic): Remove unused local "j". 2016-06-02 Martin Liska * predict.def: Fix typo in PRED_FORTRAN_FAIL_IO display name. 2016-06-02 H.J. Lu Julia Koval * function.c (assign_parm_setup_stack): Force source into a register if needed. * target.def (function_incoming_arg): Update documentation to allow arbitrary address computation based on hard register. * doc/tm.texi: Regenerated. 2016-06-02 Martin Liska * predict.c (combine_predictions_for_bb): Fix first match in cases where a first predictor contains more than one occurence in list of predictors. Take the best value in such case. 2016-06-02 Kyrylo Tkachov PR rtl-optimization/71295 * rtlanal.c (subreg_get_info): If taking a subreg at the requested offset would go over the size of the inner mode reject it. 2016-06-02 Jakub Jelinek * config/i386/sse.md (*vec_concatv4si): Use v=v,v instead of x=x,x and v=v,m instead of x=x,m. * config/i386/sse.md (*vec_concatv2si_sse4_1): Add avx512dq v=Yv,rm alternative. Change x=x,x alternative to v=Yv,Yv and x=rm,C alternative to v=rm,C. * config/i386/sse.md (*vec_concatv2di): Add x86_avx512dq v=Yv,rm alternative. Change x=xm,C alternative to v=vm,C, x=x,x alternative to v=Yv,Yv and x=x,m to v=v,m. Use maybe_evex prefix attribute instead of vex for the last two above mentioned alternatives. 2016-06-02 Kyrylo Tkachov PR target/70830 * config/arm/arm.c (arm_output_multireg_pop): Guard "pop" on update. 2016-06-02 Segher Boessenkool * config/rs6000/dfp.md (trunctddd2): Correct the "length" attribute. 2016-06-01 David Malcolm * config/rl78/rl78.c (rl78_expand_prologue): Convert local from int to unsigned. 2016-05-31 Michael Meissner * config/rs6000/vsx.md (vsx_splat_, V2DI/V2DF): Simplify alternatives, eliminating preferred register class. Add support for the MTVSRDD instruction in ISA 3.0. (vsx_splat_v4si_internal): Use splat_input_operand instead of reg_or_indexed_operand. (vsx_splat_v4sf_internal): Likewise. 2016-05-31 Michael Meissner PR target/71186 * config/rs6000/vsx.md (xxspltib__nosplit): Add alternatives for loading up all 0's or all 1's. 2016-06-01 Thomas Preud'homme * doc/sourcebuild.texi (arm_acq_rel): Document new effective target. 2016-06-01 Eduard Sanou * doc/cppenv.texi: Note that the `%s` in `date` is a non-standard extension. * gcc.c (driver_handle_option): Call set_source_date_epoch_envvar. * gcc.c (set_source_date_epoch_envvar): New function, sets the SOURCE_DATE_EPOCH environment variable to the current time. 2016-06-01 Eric Botcazou * tree-vect-loop.c (vect_determine_vectorization_factor): Also compute the factor for live Phi nodes. 2016-06-01 Jan Hubicka * loop-dolop.c (doloop_optimize): Us likely max iteration bound. * tree-parloops.c (parallelize_loops): likewise. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop, tree_unswitch_outer_loop): likewise. 2016-06-01 Jakub Jelinek PR middle-end/71371 * gimplify.c (gimplify_omp_for): Temporarily clear gimplify_omp_ctxp around creation of the temporary. 2016-06-01 Richard Biener PR tree-optimization/71366 * tree-ssa-loop-ivcanon.c (edges_to_remove): New global. (unloop_loops): Move removing edges here ... (try_unroll_loop_completely): ... from here. (try_peel_loop): ... and here. (tree_unroll_loops_completely_1): Track parent loops via bitmap of header BBs. (tree_unroll_loops_completely): Adjust for that. 2016-06-01 Kelvin Nilsen * config/rs6000/altivec.h (vec_slv): New macro. (vec_srv): New macro. * config/rs6000/altivec.md (UNSPEC_VSLV): New value. (UNSPEC_VSRV): New value. (vslv): New insn. (vsrv): New insn. * config/rs6000/rs6000-builtin.def (vslv): New builtin definition. (vsrv): New builtin definition. * config/rs6000/rs6000-c.c (P9V_BUILTIN_VSLV): Macro expansion to define argument types for new builtin. (P9V_BUILTIN_VSRV): Macro expansion to define argument types for new builtin. * doc/extend.texi: Document the new vec_vslv and vec_srv built-in functions. 2016-06-01 Uros Bizjak Jocelyn Mayer PR target/67310 * config/i386/driver-i386.c (host_detect_local_cpu): Correctly detect processor family for signature_CENTAUR_ebx. : Pass c3, winchip2 or winchip-c6 for signature_CENTAUR_ebx. : Pass c3-2 for signature_CENTAUR_ebx. : Pass x86-64 for has_longmode. 2016-06-01 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_assemble_undefined_decl): Reject undefined weak. 2016-06-01 Richard Biener PR tree-optimization/71261 * tree-vect-patterns.c (check_bool_pattern): Gather a hash-set of stmts successfully put in the bool pattern. Remove single-use restriction. (adjust_bool_pattern_cast): Add cast at the use site via the pattern def sequence. (adjust_bool_pattern): Remove recursion, maintain a hash-map of patterned defs. Use the pattern def seqence instead of multiple independent patterns. (sort_after_uid): New qsort compare function. (adjust_bool_stmts): New function to process stmts in the bool pattern in IL order. (vect_recog_bool_pattern): Adjust. * tree-if-conv.c (ifcvt_split_def_stmt): Remove. (ifcvt_walk_pattern_tree): Likewise. (stmt_is_root_of_bool_pattern): Likewise. (ifcvt_repair_bool_pattern): Likewise. (tree_if_conversion): Do not call ifcvt_repair_bool_pattern. 2016-06-01 Jan Hubicka * loop-unroll.c (decide_unroll_constant_iterations, decide_unroll_runtime_iterations, decide_unroll_stupid): Use likely upper bounds. * loop-iv.c (find_simple_exit): Dump likely upper bounds. 2016-06-01 Thomas Schwinge * tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE_DEVICE_RESIDENT. Adjust all users. 2016-06-01 Kyrylo Tkachov * config/arm/sync.md (arm_store_exclusive): Use 'H' output modifier on operands[2] rather than creating a new entry in out-of-bounds memory of the operands array. (arm_store_release_exclusivedi): Likewise. 2016-06-01 Kyrylo Tkachov * config/arm/arm.c (arm_fusion_enabled_p): New function. * config/arm/arm-protos.h (arm_fusion_enabled_p): Declare prototype. * config/arm/crypto.md (crypto_, CRYPTO_UNARY): Add "=w,0" alternative. Enable it when AES/AESMC fusion is enabled. 2016-06-01 Eric Botcazou * tree-vect-loop.c (vect_determine_vectorization_factor): Also take into account live statements for mask producers. 2016-06-01 Richard Biener PR tree-optimization/71311 * match.pd (@0 < @1 && @0 < @2 -> @0 < min(@1,@2)): Add :c and restrict to non-INTEGER_CST @0. 2016-06-01 Richard Biener * match.pd ((A & B) - (A & ~B) -> B - (A ^ B)): Add missing :c. (relational patterns): Use :c to avoid pattern duplications. 2016-06-01 Richard Biener * genmatch.c (comparison_code_p): New predicate. (swap_tree_comparison): New function. (commutate): Add for_vec parameter to append new for entries. Support commutating relational operators by swapping it alongside operands. (lower_commutative): Adjust. (dt_simplify::gen): Do not pass artificial operators to gen functions. (decision_tree::gen): Do not add artificial operators as parameters. (parser::parse_expr): Verify operator commutativity when :c is applied. Allow :C to override this. * match.pd: Adjust patterns to use :C instead of :c where required. 2016-06-01 Patrick Palka PR tree-optimization/71077 * tree-ssa-threadedge.c (simplify_control_stmt_condition_1): In the combining step, use boolean_false_node and boolean_true_node as the designated false/true return values. 2016-05-31 Jan Hubicka * predict.def (PRED_LOOP_EXTRA_EXIT): Define. * predict.c (predict_iv_comparison): Also check PRED_LOOP_EXTRA_EXIT. (predict_extra_loop_exits): Use PRED_LOOP_EXTRA_EXIT instead of PRED_LOOP_EXIT. 2016-05-31 Jan Hubicka * doc/invoke.texi (-frename-registers): Drop -fpeel-loops from list of flags impliying the register renaming. * toplev.c (process_options): Do not imply flag_rename_registers with loop peeling. 2016-05-31 Oleg Endo * config/sh/sh.h (ASM_OUTPUT_SYMBOL_REF): Remove macro and use the default implementation. 2016-05-31 Nathan Sidwell * dwarf2out.c (cur_line_info_table): Add GTY marker. 2016-05-31 Oleg Endo * config/sh/constraints.md (b): Remove constraint. * config/sh/predicates.md (arith_reg_operand): Remove TARGET_REGISTER_P. * config/sh/sh-modes.def (PDI): Remove. * config/sh/sh.c (sh_target_reg_class, sh_optimize_target_register_callee_saved): Remove functions. (sh_option_override): Don't set MASK_SAVE_ALL_TARGET_REGS. (sh_expand_epilogue): Update comment. (sh_hard_regno_mode_ok, sh_register_move_cost, calc_live_regs, sh_secondary_reload): Remove TARGET_REGS related code. * config/sh/sh.h (FIRST_TARGET_REG, LAST_TARGET_REG, TARGET_REGISTER_P): Remove macros. (SH_DBX_REGISTER_NUMBER, REG_ALLOC_ORDER): Remove target regs. * config/sh/sh.md (PR_MEDIA_REG, T_MEDIA_REG, FR23_REG, TR0_REG, TR1_REG, TR2_REG): Remove constants. * config/sh/sh.opt (SAVE_ALL_TARGET_REGS): Remove. 2016-05-31 Oleg Endo * config/sh/sh.md (adddi3, subdi3, negdi2, abs2): Remove define_expand patterns. (adddi3_compact): Rename to adddi3. (subdi3_compact): Rename to subdi3. (*negdi2): Rename to negdi2. (*abs2): Rename to abs2. 2016-05-31 Oleg Endo * config/rx/rx.md (FETCHOP_NO_MINUS): New code iterator. (atomic__fetchsi): Extract minus operator into ... (atomic_sub_fetchsi): ... this new pattern. (mvtc): Add CC_REG clobber. 2016-05-31 Marek Polacek * gimplify.c (gimplify_switch_expr): Also handle GIMPLE_TRY. 2016-05-31 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Use aarch64_fusion_enabled_p to check for fusion capabilities. 2016-05-31 Richard Biener PR tree-optimization/71352 * tree-ssa-reassoc.c (zero_one_operation): Handle op equal to minus one and a negate. 2016-05-31 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_simd_attr_length_move): Delete. * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move): Delete prototype. * config/aarch64/iterators.md (insn_count): Add descriptive comment. * config/aarch64/aarch64-simd.md (*aarch64_mov, VSTRUCT modes): Remove use of aarch64_simd_attr_length_move, set length attribute directly. (*aarch64_be_movoi): Likewise. (*aarch64_be_movci): Likewise. (*aarch64_be_movxi): Likewise. 2016-05-31 Jan Hubicka * loop-init.c (gate): Do not enale RTL loop unroller with -fpeel-loops. It no longer does that. * toplev.c (process_options): Do not enable flag_web with -fpeel-loops. 2016-05-31 Wladimir J. van der Laan * config/aarch64/arm_neon.h (vdupb_laneq_s8): Remove spurious attribute __unused__. 2016-05-31 Thomas Preud'homme * config/arm/arm-protos.h (arm_arch_thumb1): Declare. * config/arm/arm.c (arm_arch_thumb1): Define. (arm_option_override): Initialize arm_arch_thumb1. * config/arm/arm.h (arm_arch_thumb1): Declare. (TARGET_ARM_ARCH_ISA_THUMB): Use arm_arch_thumb to determine if target support Thumb-1 ISA. 2016-05-31 Kirill Yukhin PR target/71346 * config/i386/sse.md (define_insn_and_split "*vec_extractv4sf_0"): Use `Yv' for scalar operand. 2016-05-31 Tom de Vries PR tree-optimization/69068 * graphite-isl-ast-to-gimple.c (copy_bb_and_scalar_dependences): Handle phis with more than two args. 2016-05-30 Andreas Tobler * config.gcc: Move hard float support for arm*hf*-*-freebsd* into armv6*-*-freebsd* for FreeBSD 11. Eliminate the arm*hf*-*-freebsd* target. 2016-05-30 Jose E. Marchesi * config.gcc (sparc*-*-*): Support cpu_32, cpu_64, tune_32 and tune_64. * doc/install.texi (--with-cpu-32, --with-cpu-64): Document support on SPARC. * config/sparc/linux64.h (OPTION_DEFAULT_SPECS): Add entries for cpu_32, cpu_64, tune_32 and tune_64. * config/sparc/sol2.h (OPTION_DEFAULT_SPECS): Likewise. 2016-05-30 Uros Bizjak * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)". 2016-05-30 Andi Kleen * auto-profile.c (read_profile): Replace asserts with errors when file does not exist. * gcov-io.c (gcov_read_words): Dito. 2016-05-30 Jan Hubicka * tree-cfg.c (print_loop): Print likely upper bounds. 2016-05-30 Jan Hubicka * doc/invoke.texi (-fpeel-loops,-O3): Update documentation. * opts.c (default_options): Enable peel loops at -O3. * tree-ssa-loop-ivcanon.c (peeled_loops): New static var. (try_peel_loop): Do not re-peel already peeled loops; use likely upper bounds; fix profile updating. (pass_complete_unroll::execute): Initialize peeled_loops. 2016-05-30 Martin Liska * tree-ssa-loop-ivopts.c (get_computation_cost_at): Scale computed costs by frequency of BB they belong to. (get_scaled_computation_cost_at): New function. 2016-05-30 Alexander Monakov Marc Glisse PR tree-optimization/71289 * match.pd (-1 / B < A, A > -1 / B): New transformations. 2016-05-30 Jan Hubicka * tree-vect-loop.c (vect_transform_loop): Update likely bounds. 2016-05-30 Jan Hubicka * tree-ssa-loop-ivcanon.c (try_peel_loop): Correctly set wont_exit for peeled copies; avoid underflow when updating estimates; correctly scale loop profile. 2016-05-30 Kugan Vivekanandarajah * tree-ssa-reassoc.ci (swap_ops_for_binary_stmt): Fix typo from commit r236875. Corrected oe3 to oe2 as obvious. 2016-05-30 Kugan Vivekanandarajah PR middle-end/71269 PR middle-end/71252 * tree-ssa-reassoc.c (insert_stmt_before_use): Use find_insert_point so that inserted stmt will not dominate stmts that defines its operand. (rewrite_expr_tree): Add stmt_to_insert before adding the use stmt. (rewrite_expr_tree_parallel): Likewise. 2016-05-30 Kugan Vivekanandarajah PR middle-end/71252 * tree-ssa-reassoc.c (swap_ops_for_binary_stmt): Fix swap such that all fields including stmt_to_insert are swapped. 2016-05-30 Jan Hubicka * predict.h (force_edge_cold): Declare. * predict.c (force_edge_cold): New function. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Fix profile updating. (canonicalize_loop_induction_variables): Fix formating. 2016-05-30 Eric Botcazou * config/visium/visium.c (visium_split_double_add): Minor tweaks. (visium_expand_copysign): Use gen_int_mode directly. (visium_compute_frame_size): Minor tweaks. 2016-05-30 Jan Hubicka * tree-vect-loop.c (vect_analyze_loop_2): Use likely_max_stmt_executions_int. 2016-05-30 Tom de Vries PR tree-optimization/69067 * graphite-isl-ast-to-gimple.c (get_def_bb_for_const): Remove assert. 2016-05-29 Uros Bizjak PR target/71245 * config/i386/sync.md (define_peephole2 atomic_storedi_fpu): New peepholes to remove unneeded fild/fistp pairs. (define_peephole2 atomic_loaddi_fpu): Ditto. 2016-05-27 Jan Hubicka * predict.c (maybe_hot_frequency_p): Avoid division. 2016-05-28 Gerald Pfeifer * doc/install.texi: Use https for shop.fsf.org. 2016-05-27 Jan Hubicka * tree-ssa-loop-ivopts.c (estimated_stmt_executions_int): Use likely_max_stmt_executions_int. 2016-05-27 Jan Hubicka * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use likely_max_stmt_executions_int. 2016-05-27 Jan Hubicka * profile.c (compute_branch_probabilities): Do not report hitrates here. (branch_prob): Report hitrates here. * predict.c (gimple_predict_edge): Do not assert profile status; fix formatting issues. 2016-05-27 Jan Hubicka * predict.c (edge_predicted_by_p): New function. (predict_paths_for_bb): Do not put multiple predictions of the same type on one edge. 2016-05-27 Jan Hubicka * tree-ssa-loop-niter.c (number_of_iterations_exit): Revert accidental commit. 2016-05-28 Alan Modra * dominance.c (verify_dominators): Don't segfault on NULL imm_bb. 2016-05-28 Alan Modra PR rtl-optimization/71275 * ira.c (ira): Free dominance info. 2016-05-27 Gerald Pfeifer * doc/sourcebuild.texi: New address for upstream Go repository. 2016-05-27 Thomas Preud'homme * config/arm/arm.h (TARGET_ARM_V6M): Remove. (TARGET_ARM_V7M): Likewise. 2016-05-26 Jeff Law * tree-ssa-threadedge.c: Remove include of tree-ssa-threadbackward.h. (thread_across_edge): Remove calls to find_jump_threads_backwards. * passes.def: Add jump threading passes before DOM/VRP. * tree-ssa-threadbackward.c (find_jump_threads_backwards): Change argument to a basic block from an edge. Remove tests which are handled elsewhere. (pass_data_thread_jumps, class pass_thread_jumps): New. (pass_thread_jumps::gate, pass_thread_jumps::execute): New. (make_pass_thread_jumps): Likewise. * tree-pass.h (make_pass_thread_jumps): Declare. 2016-05-27 Eric Botcazou * config/visium/visium-protos.h (split_double_move): Rename into... (visium_split_double_move): ...this. (visium_split_double_add): Declare. * config/visium/visium.c (split_double_move): Rename into... (visium_split_double_move): ...this. (visium_split_double_add): New function. (visium_expand_copysign): Renumber operands for consistency. * config/visium/visium.md (DImode move splitter): Adjust to renaming. (DFmode move splitter): Likewise. (*addi3_insn): Split by means of visium_split_double_add. (*adddi3_insn_flags): Delete. (*plus_plus_sltu): New insn. (*subdi3_insn): Split by means of visium_split_double_add. (subdi3_insn_flags): Delete. (*minus_minus_sltu): New insn. (*negdi2_insn): Split by means of visium_split_double_add. (*negdi2_insn_flags): Delete. 2016-05-27 Ulrich Weigand * configure.ac: Treat a --with-headers option without argument the same as the default (i.e. consult sys-include directory). * configure: Regenerate. 2016-05-27 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_fusion_enabled_p): New function. * config/aarch64/aarch64-protos.h (aarch64_fusion_enabled_p): Declare prototype. * config/aarch64/aarch64-simd.md (aarch64_crypto_aesv16qi): Add "=w,0" alternative. Enable it when AES/AESMC fusion is enabled. 2016-05-27 Jiong Wang PR target/63596 * config/aarch64/aarch64.c (aarch64_expand_builtin_va_start): Honor tree-stdarg analysis results. (aarch64_setup_incoming_varargs): Likewise. 2016-05-27 Jiong Wang * config/aarch64/aarch64.c (aarch64_build_builtin_va_list): Initialize va_list_gpr_counter_field and va_list_fpr_counter_field. 2016-05-27 Wilco Dijkstra PR67609 * config/aarch64/aarch64.h (CANNOT_CHANGE_MODE_CLASS): Remove. * config/aarch64/aarch64.c (aarch64_cannot_change_mode_class): Remove function. * config/aarch64/aarch64-protos.h (aarch64_cannot_change_mode_class): Remove. 2016-05-27 Jan Hubicka * cfgloop.c (record_niter_bound): Record likely upper bounds. (likely_max_stmt_executions_int, get_likely_max_loop_iterations, get_likely_max_loop_iterations_int): New. * cfgloop.h (struct loop): Add nb_iterations_likely_upper_bound, any_likely_upper_bound. (get_likely_max_loop_iterations_int, get_likely_max_loop_iterations): Declare. * cfgloopmanip.c (copy_loop_info): Copy likely upper bounds. * loop-unroll.c (unroll_loop_constant_iterations): Update likely upper bound. (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. * lto-streamer-in.c (input_cfg): Stream likely upper bounds. * lto-streamer-out.c (output_cfg): Likewise. * tree-ssa-loop-ivcanon.c (try_peel_loop): Update likely upper bounds. (canonicalize_loop_induction_variables): Dump likely upper bounds. * tree-ssa-loop-niter.c (record_estimate): Record likely upper bounds. (likely_max_loop_iterations): New. (likely_max_loop_iterations_int): New. (likely_max_stmt_executions): New. * tree-ssa-loop-niter.h (likely_max_loop_iterations, likely_max_loop_iterations_int, likely_max_stmt_executions_int, likely_max_stmt_executions): Declare. 2016-05-27 Marek Polacek PR middle-end/71308 * gimple-fold.c (gimple_fold_call): Check that LHS is not null. 2016-05-27 Andreas Krebbel * config/s390/s390.md (2x risbg splitters): Use reg_overlap_mentioned_p instead of rtx_equal_p. 2016-05-27 Dominik Vogt * combine.c (make_compound_operation): Take known zero bits into account when checking for possible zero_extend. 2016-05-27 Kyrylo Tkachov * config/aarch64/aarch64.md (ashl3, SHORT modes): Use const_int_operand for operand 2 predicate. Simplify expand code as a result. 2016-05-27 Ilya Enkovich PR middle-end/71279 * fold-const.c (fold_ternary_loc): Don't fold VEC_COND_EXPR into comparison. 2016-05-27 Kyrylo Tkachov * config/aarch64/aarch64-modes.def (CC_ZESWP, CC_SESWP): Delete. * config/aarch64/aarch64.c (aarch64_select_cc_mode): Remove condition that returns CC_SESWPmode and CC_ZESWPmode. (aarch64_get_condition_code_1): Remove handling of CC_SESWPmode and CC_SESWPmode. (aarch64_rtx_costs): Likewise. 2016-05-26 Michael Meissner * config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): New function for ISA 3.0 min/max support. (rs6000_emit_p9_fp_cmove): New function for ISA 3.0 floating point conditional move support. (rs6000_emit_cmove): Call rs6000_emit_p9_fp_minmax and rs6000_emit_p9_fp_cmove if the ISA 3.0 instructions are available. * config/rs6000/rs6000.md (SFDF2): New iterator to allow doing conditional moves where the comparison type is different from move type. (fp_minmax): New code iterator for smin/smax. (minmax): New code attributes for min/max. (SMINMAX): Likewise. (smax3): Combine min, max insns into one insn using the fp_minmax code iterator. Add support for ISA 3.0 min/max instructions that don't need -ffast-math. (s3): Likewise. (smax3_vsx): Likewise. (smin3): Likewise. (s3_vsx): Likewise. (smin3_vsx): Likewise. (pre-VSX min/max splitters): Likewise. (s3_fpr): Likewise. (movsfcc): Rewrite floating point conditional moves to combine SFmode/DFmode into a single insn. (movcc): Likewise. (movdfcc): Likewise. (fselsfsf4): Combine FSEL cases into a single insn, using SFDF and SFDF2 iterators to handle all combinations. (fseldfsf4): Likewise. (fsel4): Likewise. (fseldfdf4): Likewise. (fselsfdf4): Likewise. (movcc_p9): Add support for the ISA 3.0 comparison instructions that set a 0/-1 mask, and use it for floating point conditional move via XXSEL. (fpmask): Likewise. (xxsel): Likewise. * config/rs6000/predicates.md (min_max_operator): Delete, no longer used. (fpmask_comparison_operaton): New insn for ISA 3.0 comparison instructions that generate a 0/-1 mask for use with XXSEL. * config/rs6000/rs6000.h (TARGET_MINMAX_SF): New helper macros to say whether floating point min/max is available, either through FSEL, ISA 2.06 min/max, and ISA 3.0 min/max instrucitons. (TARGET_MINMAX_DF): Likewise. 2016-05-27 Alan Modra PR rtl-optimization/71275 * ira.c (ira): Call loop_optimizer_init to set up bb_loop_depth for update_equiv_regs and combine_and_move_insns. 2016-05-26 Uros Bizjak * config/i386/i386.md (*movqi_internal) : Use if_then_else or cond RTXes to calculate attribute value. * config/i386/mmx.md (*vec_extractv2sf_1) : Ditto. : Ditto. (*vec_extractv2sf_1) : Ditto. * config/i386/sse.md (sse_loadlps) : Ditto. (*vec_concatv2sf_sse4_1) : Ditto. : Ditto. : Ditto. : Ditto. : Ditto. : Ditto. (vec_set_0) : Ditto. : Ditto. : Ditto. : Ditto. (*vec_interleave_highv2df) : Ditto. (*vec_interleave_lowv2df) : Ditto. (sse2_storelpd) : Ditto. (sse2_loadhpd) : Ditto. (sse2_loadlpd) : Ditto. : Ditto. : Ditto. (sse2_movsd) : Ditto. : Ditto. (vec_concatv2df) : Ditto. : Ditto. (*vec_extractv4si) : Ditto. (*vec_extractv2di_1) : Ditto. : Ditto. : Ditto. : Ditto. : Ditto. (*vec_concatv2si_sse4_1) : Ditto. : Ditto. : Ditto. (vec_concatv2di) : Ditto. : Ditto. : Ditto. : Ditto. 2016-05-26 Martin Liska * tree-ssa-loop-ivopts.c (comp_cost::infinite_cost_p): New function. (operator+): Likewise. (operator-): Likewise. (comp_cost::operator+=): Likewise. (comp_cost::operator-=): Likewise. (comp_cost::operator/=): Likewise. (comp_cost::operator*=): Likewise. (operator<): Likewise. (operator==): Likewise. (operator<=): Likewise. (new_cost): Remove. (infinite_cost_p): Likewise. (add_costs): Likewise. (sub_costs): Likewise. (compare_costs): Likewise. (set_group_iv_cost): Use the newly introduced functions. (get_address_cost): Likewise. (get_shiftadd_cost): Likewise. (force_expr_to_var_cost): Likewise. (split_address_cost): Likewise. (ptr_difference_cost): Likewise. (difference_cost): Likewise. (get_computation_cost_at): Likewise. (determine_group_iv_cost_generic): Likewise. (determine_group_iv_cost_address): Likewise. (determine_group_iv_cost_cond): Likewise. (autoinc_possible_for_pair): Likewise. (determine_group_iv_costs): Likewise. (cheaper_cost_pair): Likewise. (iv_ca_recount_cost): Likewise. (iv_ca_set_no_cp): Likewise. (iv_ca_set_cp): Likewise. (iv_ca_cost): Likewise. (iv_ca_new): Likewise. (iv_ca_dump): Likewise. (iv_ca_narrow): Likewise. (iv_ca_prune): Likewise. (iv_ca_replace): Likewise. (try_add_cand_for): Likewise. (try_improve_iv_set): Likewise. (find_optimal_iv_set): Likewise. 2016-05-26 Richard Sandiford * tree-ssa-loop-ivopts.c (loop_body_includes_call): Don't assume that internal functions will clobber all caller-saved registers. 2016-05-26 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_case_values_threshold): Return a better case_values_threshold when optimizing. 2016-05-26 Wilco Dijkstra * config/aarch64/aarch64-simd.md (aarch64_combinez): Add ? to integer variant. (aarch64_combinez_be): Likewise. 2016-05-26 Jakub Jelinek * config/i386/sse.md (*vcvtps2ph_store): Use v constraint instead of x constraint. (vcvtps2ph256): Likewise. * config/i386/sse.md (*ssse3_palignr_perm): Add avx512bw alternative. Formatting fix. * config/i386/sse.md (avx512vl_shuf_32x4_1): Rename to ... (avx512vl_shuf_32x4_1): ... this. (*avx_vperm_broadcast_v4sf): Use v constraint instead of x. Use maybe_evex prefix instead of vex. (*avx_vperm_broadcast_): Use v constraint instead of x. Handle EXT_REX_SSE_REG_P (op0) case in the splitter. 2016-05-25 Jeff Law PR tree-optimization/71272 * tree-ssa-threadbackward.c (convert_and_register_jump_thread_path): Update comments. Add test for empty path. 2016-05-25 Bill Seurer * config/rs6000/altivec.h (vec_cmpne): Add #define for vec_cmpne. * config/rs6000/rs6000-builtin.def (vec_cmpne): Add vec_cmpne as a special case builtin. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add code for ALTIVEC_BUILTIN_VEC_CMPNE. * config/rs6000/rs6000.c (altivec_init_builtins): Add definition for __builtin_vec_cmpne. 2016-05-25 Eric Botcazou * tree-ssa-phiopt.c (factor_out_conditional_conversion): Remove redundant test and bail out if the type of the new operand is not a GIMPLE register type after stripping a VIEW_CONVERT_EXPR. 2016-05-25 Uros Bizjak * config/i386/i386.opt (ix86_target_flags_explicit): Remove. (x_ix86_target_flags_explicit): Remove. * config/i386/i386.c (ix86_function_specific_save): Do not copy x_ix86_target_flags_explicit. (ix86_function_specific_restore): Ditto. 2016-05-25 Uros Bizjak H.J. Lu PR target/70738 * common/config/i386/i386-common.c (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): New. (ix86_handle_option) : Disable MPX, MMX, SSE and x87 instructions for -mgeneral-regs-only. * config/i386/i386.opt (ix86_target_flags): Add new Variable. (-mgeneral-regs-only): Add new option. * config/i386/i386.c (ix86_option_override_internal): Don't enable x87 instructions if only general registers are allowed. (ix86_target_string): Add ix86_flags argument. Handle additional flags options through ix86_flags argument. Update all callers. * doc/invoke.texi (x86 Options): Document -mgeneral-regs-only. 2016-05-25 Kyrylo Tkachov PR rtl-optimization/66940 * ifcvt.c (noce_get_alt_condition): Check that incrementing or decrementing desired_val will not overflow before performing these operations. 2016-05-25 Ilya Verbin * config/i386/i386-builtin-types.def: Add V16SI_FTYPE_V16SF, V8DF_FTYPE_V8DF_ROUND, V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND. * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_CVTPS2DQ512_MASK, IX86_BUILTIN_FLOORPS512, IX86_BUILTIN_FLOORPD512, IX86_BUILTIN_CEILPS512, IX86_BUILTIN_CEILPD512, IX86_BUILTIN_TRUNCPS512, IX86_BUILTIN_TRUNCPD512, IX86_BUILTIN_CVTPS2DQ512, IX86_BUILTIN_VEC_PACK_SFIX512, IX86_BUILTIN_FLOORPS_SFIX512, IX86_BUILTIN_CEILPS_SFIX512, IX86_BUILTIN_ROUNDPS_AZ_SFIX512. (builtin_description bdesc_args): Add __builtin_ia32_floorps512, __builtin_ia32_ceilps512, __builtin_ia32_truncps512, __builtin_ia32_floorpd512, __builtin_ia32_ceilpd512, __builtin_ia32_truncpd512, __builtin_ia32_cvtps2dq512, __builtin_ia32_vec_pack_sfix512, __builtin_ia32_roundps_az_sfix512, __builtin_ia32_floorps_sfix512, __builtin_ia32_ceilps_sfix512. Change IX86_BUILTIN_CVTPS2DQ512 to IX86_BUILTIN_CVTPS2DQ512_MASK for __builtin_ia32_cvtps2dq512_mask. (ix86_expand_args_builtin): Handle V8DF_FTYPE_V8DF_ROUND, V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF. (ix86_builtin_vectorized_function): Handle builtins mentioned above. * config/i386/sse.md (avx512f_fix_notruncv16sfv16si): Rename to ... (avx512f_fix_notruncv16sfv16si): ... this. (avx512f_cvtpd2dq512): Rename to ... (avx512f_cvtpd2dq512): ... this. (avx512f_vec_pack_sfix_v8df): New define_expand. (avx512f_roundpd512): Rename to ... (avx512f_round512): ... this. Change iterator. (avx512f_roundps512_sfix): New define_expand. (round2_sfix): Change iterator. 2016-05-25 Nick Clifton * config/msp430/msp430.c (msp430_attr): Produce an error if a static interrupt handler is detected. * config/msp430/msp430.h (LIB_SPEC): Do not use msp430.ld as the default linker script. * config/msp430/msp430.md (movpsihi2_lo): New pattern for loading the low part of a symbolic pointer. 2016-05-25 Richard Biener PR tree-optimization/71261 * tree-if-conv.c (ifcvt_split_def_stmt): Walk uses on the interesting stmt instead of immediate uses when looking for the use operand to replace. 2016-05-25 Martin Liska * ipa-inline.c (edge_badness): Use 'w/' instead of 'w'. 2016-05-25 Richard Biener PR tree-optimization/71264 * tree-vect-stmts.c (vect_init_vector): Properly deal with vector type val. 2016-05-25 Martin Liska PR tree-optimization/71239 * tree.c (array_at_struct_end_p): Do not call operand_equal_p if DECL_SIZE is NULL. 2016-05-25 Richard Biener * timevar.def (TV_TREE_LOOP_IFCVT): Add. * tree-if-conv.c (pass_data_if_conversion): Use it. 2016-05-25 Bernd Edlinger * cgraph.c (cgraph_node::get_availability): Fix typo in comment. * symtab.c (symtab_node::binds_to_current_def_p): Likewise. * varpool.c (varpool_node::get_availability): Likewise. 2016-05-24 Michael Meissner * config/rs6000/altivec.md (VNEG iterator): New iterator for VNEGW/VNEGD instructions. (p9_neg2): New insns for ISA 3.0 VNEGW/VNEGD. (neg2): Add expander for V2DImode added in ISA 2.07, and support for ISA 3.0 VNEGW/VNEGD instructions. 2016-05-24 Cesar Philippidis * gimplify.c (omp_notice_variable): Use zero-length arrays for data pointers inside OACC_DATA regions. (gimplify_scan_omp_clauses): Prune firstprivate clause associated with OACC_DATA, OACC_ENTER_DATA and OACC_EXIT data regions. (gimplify_adjust_omp_clauses): Fix typo in comment. 2016-05-24 Michael Meissner * config/rs6000/altivec.md (VParity): New mode iterator for vector parity built-in functions. (p9v_ctz2): Add support for ISA 3.0 vector count trailing zeros. (p9v_parity2): Likewise. * config/rs6000/vector.md (VEC_IP): New mode iterator for vector parity. (ctz2): ISA 3.0 expander for vector count trailing zeros. (parity2): ISA 3.0 expander for vector parity. * config/rs6000/rs6000-builtin.def (BU_P9_MISC_1): New macros for power9 built-ins. (BU_P9_64BIT_MISC_0): Likewise. (BU_P9_MISC_0): Likewise. (BU_P9V_AV_1): Likewise. (BU_P9V_AV_2): Likewise. (BU_P9V_AV_3): Likewise. (BU_P9V_AV_P): Likewise. (BU_P9V_VSX_1): Likewise. (BU_P9V_OVERLOAD_1): Likewise. (BU_P9V_OVERLOAD_2): Likewise. (BU_P9V_OVERLOAD_3): Likewise. (VCTZB): Add vector count trailing zeros support. (VCTZH): Likewise. (VCTZW): Likewise. (VCTZD): Likewise. (VPRTYBD): Add vector parity support. (VPRTYBQ): Likewise. (VPRTYBW): Likewise. (VCTZ): Add overloaded vector count trailing zeros support. (VPRTYB): Add overloaded vector parity support. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add overloaded vector count trailing zeros and parity instructions. * config/rs6000/rs6000.md (wd mode attribute): Add V1TI and TI for vector parity support. * config/rs6000/altivec.h (vec_vctz): Add ISA 3.0 vector count trailing zeros support. (vec_cntlz): Likewise. (vec_vctzb): Likewise. (vec_vctzd): Likewise. (vec_vctzh): Likewise. (vec_vctzw): Likewise. (vec_vprtyb): Add ISA 3.0 vector parity support. (vec_vprtybd): Likewise. (vec_vprtybw): Likewise. (vec_vprtybq): Likewise. * doc/extend.texi (PowerPC AltiVec Built-in Functions): Document the ISA 3.0 vector count trailing zeros and vector parity built-in functions. 2016-05-24 Kugan Vivekanandarajah * tree-ssa-reassoc.c (sort_by_operand_rank): Skip checking gimple_bb when there is stmt_to_insert. 2016-05-24 Martin Sebor PR c++/71147 * tree.h (complete_or_array_type_p): New inline function. 2016-05-24 Jakub Jelinek * config/i386/i386.h (TARGET_AVOID_4BYTE_PREFIXES): Define. * config/i386/constraints.md (Yr): Test TARGET_AVOID_4BYTE_PREFIXES rather than X86_TUNE_AVOID_4BYTE_PREFIXES. * config/i386/sse.md (_round): Limit 1st alternative to noavx isa, split 2nd alternative into one noavx and one avx alternative, use *x and Bm in the former and x and m in the latter. * config/i386/sse.md (vec_set_0): Use sse4_noavx isa instead of sse4 for the first alternative, drop %v from the template and d operand modifier. Split second alternative into one sse4_noavx and one avx alternative, use *x instead of *v in the former and v instead of *v in the latter. (*sse4_1_extractps): Use noavx isa instead of * for the first alternative, drop %v from the template. Split second alternative into one noavx and one avx alternative, use *x instead of *v in the former and v instead of *v in the latter. (_movntdqa): Guard the first 2 alternatives with noavx and the last one with avx. (sse4_1_phminposuw): Guard first alternative with noavx isa, split the second one into one noavx and one avx alternative, use *x and Bm in the former and x and m in the latter one. (_ptest): Use noavx instead of * for the first two alternatives. * config/i386/sse.md (sse4_1_v8qiv8hi2): Limit first two alternatives to noavx, use *x instead of *v in the second one, add avx alternative without *. (sse4_1_v4qiv4si2, sse4_1_v4hiv4si2, sse4_1_v2qiv2di2, sse4_1_v2hiv2di2, sse4_1_v2siv2di2): Likewise. 2016-05-24 Jeff Law * tree-ssa-threadbackwards.c (convert_and_register_jump_thread_path): New function, extracted from... (fsm_find_control_statement_thread_paths): Here. Use the new function. Allow simple copies and constant initializations in the SSA chain. 2016-05-24 Marek Polacek PR c/71249 * gimplify.c (gimplify_switch_expr): Look into the innermost lexical scope. 2016-05-24 Jakub Jelinek PR c++/71257 * tree-vect-stmts.c (vectorizable_simd_clone_call): Handle SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP like SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP. Add SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP and SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP cases explicitly. 2016-05-24 Richard Biener PR tree-optimization/71240 * tree-ssa-math-opts.c (init_symbolic_number): Verify the source has integral type. 2016-05-24 Richard Biener PR tree-optimization/71230 * tree-ssa-reassoc.c (zero_one_operation): Handle negate special ops. 2016-05-24 Richard Sandiford * tree-vectorizer.h (vectorizable_comparison): Delete. * tree-vect-loop.c (vectorizable_reduction): Remove redundant PURE_SLP_STMT check. * tree-vect-stmts.c (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_store): Likewise. Assert that we don't have hybrid SLP. (vectorizable_comparison): Make static. Remove redundant PURE_SLP_STMT check. (vect_transform_stmt): Assert that we always have an slp_node if PURE_SLP_STMT. 2016-05-24 Kyrylo Tkachov * config/arm/neon.md (ashldi3_neon): Replace comparison of INTVAL of operands[2] against 1 with comparison against CONST1_RTX. (di3_neon): Likewise. * config/arm/predicates.md (const0_operand): Replace with comparison against CONST0_RTX. 2016-05-24 Kyrylo Tkachov * config/arm/arm.md (ashldi3): Replace comparison of INTVAL of operands[2] against 1 with comparison against CONST1_RTX. (ashrdi3): Likewise. (lshrdi3): Likewise. (ashlsi3): Replace cast of INTVAL to unsigned HOST_WIDE_INT with UINTVAL. (ashrsi3): Likewise. (lshrsi3): Likewise. (rotrsi3): Likewise. (define_split above *compareqi_eq0): Likewise. (define_split above "prologue"): Likewise. * config/arm/arm.c (thumb1_size_rtx_costs): Likewise. * config/arm/predicates.md (shift_operator): Likewise. (shift_nomul_operator): Likewise. (sat_shift_operator): Likewise. (thumb1_cmp_operand): Likewise. (const_neon_scalar_shift_amount_operand): Replace manual range check with IN_RANGE. * config/arm/thumb1.md (define_peephole2 above *thumb_subdi3): Replace cast of INTVAL to unsigned HOST_WIDE_INT with UINTVAL. 2016-05-24 Kyrylo Tkachov * config/arm/arm.md (andsi3): Replace cast of 1 to HOST_WIDE_INT with HOST_WIDE_INT_1. (insv): Likewise. * config/arm/arm.c (optimal_immediate_sequence): Replace cast of 1 to unsigned HOST_WIDE_INT with HOST_WIDE_INT_1U. (arm_canonicalize_comparison): Likewise. (thumb1_rtx_costs): Replace cast of 1 to HOST_WIDE_INT with HOST_WIDE_INT_1. (thumb1_size_rtx_costs): Likewise. (vfp_const_double_index): Replace cast of 1 to unsigned HOST_WIDE_INT with HOST_WIDE_INT_1U. (get_jump_table_size): Replace cast of 1 to HOST_WIDE_INT with HOST_WIDE_INT_1. (arm_asan_shadow_offset): Replace cast of 1 to unsigned HOST_WIDE_INT with HOST_WIDE_INT_1U. * config/arm/neon.md (vec_set): Replace cast of 1 to HOST_WIDE_INT with HOST_WIDE_INT_1. 2016-05-24 Marek Polacek * tree-cfg.h (should_remove_lhs_p): New predicate. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Use it. * gimplify.c (gimplify_modify_expr): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. * tree-cfgcleanup.c (fixup_noreturn_call): Likewise. * gimple-fold.c: Include "tree-cfg.h". (gimple_fold_call): Use should_remove_lhs_p. 2016-05-24 Richard Biener PR tree-optimization/71253 * cfganal.h (control_dependences): Make robust against edge and BB removal. (control_dependences::control_dependences): Remove edge_list argument. (control_dependences::get_edge): Remove. (control_dependences::get_edge_src): Add. (control_dependences::get_edge_dest): Likewise. (control_dependences::m_el): Make a vector of edge src/dest index. * cfganal.c (control_dependences::find_control_dependence): Adjust. (control_dependences::control_dependences): Likewise. (control_dependences::~control_dependence): Likewise. (control_dependences::get_edge): Remove. (control_dependences::get_edge_src): Add. (control_dependences::get_edge_dest): Likewise. * tree-ssa-dce.c (mark_control_dependent_edges_necessary): Use get_edge_src. (perform_tree_ssa_dce): Adjust. * tree-loop-distribution.c (create_edge_for_control_dependence): Use get_edge_src. (pass_loop_distribution::execute): Adjust. Do loop destroying conditional on changed. 2016-05-24 Kyrylo Tkachov PR target/69857 * config/arm/arm.c (gen_operands_ldrd_strd): Remove bogus early return. Reindent transformation comment and mention the ARM state behavior. 2016-05-24 Kugan Vivekanandarajah PR middle-end/71252 * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Add stmt_to_insert after build_and_add_sum creates new use stmt. 2016-05-24 Richard Sandiford * tree-vect-stmts.c (vectorizable_load): Reorder checks so that load_lanes/grouped_load classification comes first. Don't check whether the vectorization factor is a multiple of the group size for load_lanes. 2016-05-24 Richard Sandiford * tree-vect-data-refs.c (vect_analyze_group_access_1): Set GROUP_GAP for single-element interleaving. * tree-vect-stmts.c (vectorizable_load): Remove force_peeling variable. 2016-05-24 Richard Biener PR middle-end/70434 PR c/69504 * tree-ssa.c (non_rewritable_mem_ref_base): Make sure to mark bases which are accessed with non-invariant indices. * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Re-write constant index ARRAY_REFs of vectors into BIT_FIELD_REFs. 2016-05-24 Kugan Vivekanandarajah PR middle-end/71170 * tree-ssa-reassoc.c (struct operand_entry): Add field stmt_to_insert. (add_to_ops_vec): Add stmt_to_insert. (add_repeat_to_ops_vec): Init stmt_to_insert. (insert_stmt_before_use): New. (transform_add_to_multiply): Remove mult_stmt insertion and add it to ops vector. (get_ops): Init stmt_to_insert. (maybe_optimize_range_tests): Likewise. (rewrite_expr_tree): Insert stmt_to_insert before use stmt. (rewrite_expr_tree_parallel): Likewise. (reassociate_bb): Likewise. 2016-05-23 Michael Meissner PR target/71201 * config/rs6000/altivec.md (altivec_vperm__internal): Drop ISA 3.0 xxperm fusion alternative. (altivec_vperm_v8hiv16qi): Likewise. (altivec_vperm__uns_internal): Likewise. (vperm_v8hiv4si): Likewise. (vperm_v16qiv8hi): Likewise. 2016-05-23 Michael Meissner Kelvin Nilsen * config/rs6000/rs6000.c (rs6000_expand_vector_set): Generate vpermr/xxpermr on ISA 3.0. (altivec_expand_vec_perm_le): Likewise. * config/rs6000/altivec.md (UNSPEC_VPERMR): New unspec. (altivec_vpermr__internal): Add VPERMR/XXPERMR support for ISA 3.0. 2016-05-23 Uros Bizjak * config/i386/i386.h (IS_STACK_MODE): Enable for TARGET_MIX_SSE_I387. Rewrite using X87_FLOAT_MODE_P and SSE_FLOAT_MODE_P macros. * config/i386/i386.c (ix86_preferred_reload_class): Use IS_STACK_MODE, INTEGER_CLASS_P, FLOAT_CLASS_P and Q_CLASS_P macros. Cleanup regclass processing for CONST_DOUBLE_P. (ix86_preferred_output_reload_class): Use IS_STACK_MODE macro. (ix86_rtx_costs): Remove redundant TARGET_80387 check with IS_STACK_MODE macro. * config/i386/i386.md: Replace SSE_FLOAT_MODE_P (DFmode) with TARGET_SSE2. (*movdf_internal): Use IS_STACK_MODE macro. (*movsf_internal): Ditto. 2016-05-23 Marc Glisse * match.pd (a * (1 << b), ~x & ~y, ~X ^ ~Y, (X ^ Y) ^ Y, ~ (-A), ~ (A - 1), ~(~X >> Y), ~(~X >>r Y)): Relax constraints. 2016-05-23 Jeff Law * tree-ssa-threadbackward.c (profitable_jump_thread_path): New function extracted from ... (fsm_find_control_statement_thread_paths): Call it. 2016-05-23 Martin Jambor PR ipa/71234 * ipa-cp.c (ipa_get_indirect_edge_target_1): Only check value of from_global_constant if t is not NULL. 2016-05-23 Marek Polacek PR c/49859 * common.opt (Wswitch-unreachable): New option. * doc/invoke.texi: Document -Wswitch-unreachable. * gimplify.c (gimplify_switch_expr): Implement the -Wswitch-unreachable warning. 2016-05-23 Bin Cheng * tree-ssa-address.c (copy_ref_info): Check NULL TMR_STEP when TMR_INDEX is non-NULL. 2016-05-23 Richard Biener PR tree-optimization/71230 * tree-ssa-reassoc.c (acceptable_pow_call): Move initial condition... (try_special_add_to_ops): ... here. Always test for single-use. 2016-05-23 Martin Jambor * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Create an empty default block if a PHI node in the original one would be resized. 2016-05-23 Venkataramanan Kumar PR tree-optimization/58135 * tree-vect-slp.c: When group size is not multiple of vector size, allow splitting of store group at vector boundary. 2016-05-23 Christophe Lyon * config/arm/arm_neon.h (vtst_p16, vtstq_p16): New. 2016-05-22 Jakub Jelinek * config/i386/sse.md (vec_set_lo_, vec_set_hi_): Add && condition. For !TARGET_AVX512DQ, emit 32x4 instruction instead of 64x2. * config/i386/sse.md (vec_set_lo_v16hi, vec_set_hi_v16hi, vec_set_lo_v32qi, vec_set_hi_v32qi): Add alternative with v constraint instead of x and vinserti32x4 insn. * config/i386/sse.md (i128vldq): New mode iterator. (avx2_vbroadcasti128_, avx_vbroadcastf128_): Add avx512dq and avx512vl alternatives. * config/i386/sse.md (avx2_vec_dupv4df): Use v instead of x constraint, use maybe_evex prefix instead of vex. (vec_dupv4sf): Use v constraint instead of x for output operand except for noavx alternative, use Yv constraint instead of x for input. Use maybe_evex prefix instead of vex. (*vec_dupv4si): Likewise. (*vec_dupv2di): Likewise. 2016-05-22 Kugan Vivekanandarajah PR middle-end/40921 * tree-ssa-reassoc.c (try_special_add_to_ops): New. (linearize_expr_tree): Call try_special_add_to_ops. (reassociate_bb): Convert MULT_EXPR by (-1) to NEGATE_EXPR. 2016-05-21 Senthil Kumar Selvaraj * config/avr/avr.c (avr_expand_prologue): Add INCOMING_FRAME_SP_OFFSET to computed stack_usage. 2016-05-21 Pitchumani Sivanupandi PR target/71103 * config/avr/avr.md (define_expand "mov"): If the source operand is subreg (symbol_ref) then move the symbol ref to register. 2016-05-21 Jan Hubicka * tree.c (array_at_struct_end_p): Look through MEM_REF. 2016-05-21 Kugan Vivekanandarajah PR middle-end/71179 * tree-ssa-reassoc.c (transform_add_to_multiply): Disallow float VECTOR type. 2016-05-20 Eric Botcazou * tree-vrp.c (compare_values_warnv): Simplify handling of symbolic ranges by calling get_single_symbol and tidy up. Look more closely into NAME + CST1 vs CST2 comparisons if type overflow is undefined. 2016-05-20 Jeff Law * bitmap.c (bitmap_find_bit): Remove useless test. 2016-05-20 Segher Boessenkool * function.c (thread_prologue_and_epilogue_insns): Commit the insertion of the epilogue. 2016-05-20 Martin Jambor PR tree-optimization/70884 * tree-sra.c (initialize_constant_pool_replacements): Do not check should_scalarize_away_bitmap and cannot_scalarize_away_bitmap bits. (sort_and_splice_var_accesses): Do not consider multiple scalar reads of constant pool data as a reason for scalarization. 2016-05-20 Eric Botcazou * config/arm/arm.c (arm_expand_prologue): Set the stack usage to 0 for naked functions. (thumb1_expand_prologue): Likewise. 2016-05-20 Nathan Sidwell * config/nvptx/nptx.c (nvptx_option_override): Only set flag_toplevel_reorder, if not explicitly specified. Set flag_no_common, unless explicitly specified. 2016-05-20 David Malcolm * calls.c (can_implement_as_sibling_call_p): Mark param reg_parm_stack_space with ATTRIBUTE_UNUSED. 2016-05-20 Uros Bizjak * config/i386/i386.c (ix86_rtx_costs) : Use IS_STACK_MODE when calculating cost of standard 80387 constants. Fallthru to CONST_VECTOR case to calculate cost of standard SSE constants. : Calculate cost of (MEM (SYMBOL_REF)). (ix86_legitimate_constant_p): Use CASE_CONST_SCALAR_INT and CASE_CONST_ANY. 2016-05-20 Cesar Philippidis * config/nvptx/nvptx.md (sincossf3): New pattern. 2016-05-20 David Malcolm * calls.c (maybe_complain_about_tail_call): New function. (initialize_argument_information): Call maybe_complain_about_tail_call when clearing *may_tailcall. (can_implement_as_sibling_call_p): Call maybe_complain_about_tail_call when returning false. (expand_call): Read CALL_EXPR_MUST_TAIL_CALL and, if set, ensure try_tail_call is set. Call maybe_complain_about_tail_call if tail-call optimization fails. * cfgexpand.c (expand_call_stmt): Initialize CALL_EXPR_MUST_TAIL_CALL from gimple_call_must_tail_p. * gimple-pretty-print.c (dump_gimple_call): Dump gimple_call_must_tail_p. * gimple.c (gimple_build_call_from_tree): Call gimple_call_set_must_tail with the value of CALL_EXPR_MUST_TAIL_CALL. * gimple.h (enum gf_mask): Add GF_CALL_MUST_TAIL_CALL. (gimple_call_set_must_tail): New function. (gimple_call_must_tail_p): New function. * print-tree.c (print_node): Update printing of TREE_STATIC to reflect its use for CALL_EXPR_MUST_TAIL_CALL. * tree-core.h (struct tree_base): Add MUST_TAIL_CALL to the trailing comment listing applicable flags. * tree.h (CALL_EXPR_MUST_TAIL_CALL): New macro. 2016-05-20 David Malcolm * calls.c (expand_call): Move "Rest of purposes for tail call optimizations to fail" to... (can_implement_as_sibling_call_p): ...this new function, and split into multiple "if" statements. 2016-05-20 Jan Hubicka * cfgloop.h (expected_loop_iterations_unbounded, expected_loop_iterations): Unconstify. * cfgloopanal.c (expected_loop_iterations_unbounded): Sanity check the profile with known upper bound; return 3 when profile is absent. (expected_loop_iterations): Update. 2016-05-20 Jan Hubicka * loop-doloop.c (doloop_optimize): Use get_estimated_loop_iterations_int and get_max_loop_iterations_int. 2016-05-20 Jan Hubicka * tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can not produce realistic upper bounds here. 2016-05-20 Jakub Jelinek PR c++/71210 * gimple-fold.c (gimple_fold_call): Do not remove lhs of noreturn calls if the LHS is variable length or has addressable type. If targets[0]->decl is a noreturn call with void return type and zero arguments, adjust fntype and remove lhs in that case. 2016-05-20 Marc Glisse PR tree-optimization/71079 PR tree-optimization/71206 * match.pd ((X ^ Y) ^ (X ^ Z)): Convert the arguments. 2016-05-20 Prathamesh Kulkarni * tree-vectorizer.c (get_vec_alignment_for_decl): New static function. (get_vec_alignment_for_array_decl): Likewise. (get_vec_alignment_for_record_decl): Likewise. (increase_alignment::execute): Move code to find alignment to get_vec_alignment_for_array_decl and call get_vec_alignment_for_decl. (type_align_map): New hash_map. 2016-05-20 Richard Guenther PR tree-optimization/29756 * tree.def (BIT_INSERT_EXPR): New tcc_expression tree code. * expr.c (expand_expr_real_2): Handle BIT_INSERT_EXPR. * fold-const.c (operand_equal_p): Likewise. (fold_ternary_loc): Add constant folding of BIT_INSERT_EXPR. * gimplify.c (gimplify_expr): Handle BIT_INSERT_EXPR. * tree-inline.c (estimate_operator_cost): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-operands.c (get_expr_operands): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * gimple-pretty-print.c (dump_ternary_rhs): Likewise. * gimple.c (get_gimple_rhs_num_ops): Handle BIT_INSERT_EXPR. * tree-cfg.c (verify_gimple_assign_ternary): Verify BIT_INSERT_EXPR. * tree-ssa.c (non_rewritable_lvalue_p): We can rewrite vector inserts using BIT_FIELD_REF or MEM_REF on the lhs. (execute_update_addresses_taken): Do it. 2016-05-20 Richard Biener PR tree-optimization/71185 * tree-ssa-loop-prefetch.c (gather_memory_references): Drop register operations. 2016-05-20 Richard Biener * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Use gimple_seq_add_seq_without_update. (release_bb_predicate): Assert we have no operands to free. (if_convertible_loop_p_1): Calculate post dominators later. Do not free BB predicates here. (combine_blocks): Do not recompute BB predicates. (version_loop_for_if_conversion): Save BB predicates around loop versioning. 2016-05-19 Segher Boessenkool * function.c (make_epilogue_seq): Remove epilogue_end parameter. (thread_prologue_and_epilogue_insns): Remove bb_flags. Restructure code. Ignore sibcalls on EDGE_IGNORE edges. * shrink-wrap.c (handle_simple_exit): New function. Set EDGE_IGNORE on edges for sibcalls that run without prologue. The rest of the function is combined from... (fix_fake_fallthrough_edge): ... this, and ... (try_shrink_wrapping): ... a part of this. Remove the bb_with function argument, make it a local variable. 2016-05-19 Sandra Loosemore * config/i386/cygming.h (DWARF2_UNWIND_INFO): Allow --disable-sjlj-exceptions for TARGET_BI_ARCH to select DWARF-2 EH for 32-bit mode and SEH for 64-bit. * config/i386/mingw32.h (SHARED_LIBGCC_UNDEFS_SPEC): Handle TARGET_64BIT_DEFAULT. 2016-05-19 Ryan Burn * Makefile.in (GTFILES): Add cilk.h and cilk-common.c. * gengtype.c (open_base_files): Add cilk.h to ifiles. 2016-05-19 Uros Bizjak * sched-deps.c (sched_analyze_2) : Also force pending loads from memory. 2016-05-19 Kelvin Nilsen * config/rs6000/altivec.md (UNSPEC_DARN): New unspec constant. (UNSPEC_DARN_32): New unspec constant. (UNSPEC_DARN_RAW): New unspec constant. (darn_32): New instruction. (darn_raw): New instruction. (darn): New instruction. * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_0): Add support and documentation for this macro. (BU_P9_MISC_1): New macro definition. (BU_P9_64BIT_MISC_0): New macro definition. (BU_P9_MISC_0): New macro definition. (darn_32): New builtin definition. (darn_raw): New builtin definition. (darn): New builtin definition. * config/rs6000/rs6000.c: Add #define RS6000_BUILTIN_0 and #undef RS6000_BUILTIN_0 directives to surround each occurrence of #include "rs6000-builtin.def". (rs6000_builtin_mask_calculate): Add in the RS6000_BTM_MODULO and RS6000_BTM_64BIT flags to the returned mask, depending on configuration. (def_builtin): Correct an error in the assignments made to the debugging variable attr_string. (rs6000_expand_builtin): Add support for no-operand built-in functions. (builtin_function_type): Remove fatal_error assertion that is no longer valid. (rs6000_common_init_builtins): Add support for no-operand built-in functions. * config/rs6000/rs6000.h (RS6000_BTM_MODULO): New macro definition. (RS6000_BTM_PURE): Enhance comment to clarify intent of this flag definition. (RS6000_BTM_64BIT): New macro definition. * doc/extend.texi: Document __builtin_darn (void), __builtin_darn_raw (void), and __builtin_darn_32 (void) built-in functions. 2016-05-19 Jan Hubicka * tree-vect-loop.c (vect_analyze_loop_2): Use also max_loop_iterations_int. 2016-05-19 Marek Polacek PR tree-optimization/71031 * tree-vrp.c (extract_range_from_binary_expr_1): Turn assert into a condition and adjust the code a bit. 2016-05-19 Martin Liska * tree-vect-stmts.c (vectorizable_simd_clone_call): Utilize auto_vec instead of vec. 2016-05-19 Martin Liska * tree-parloops.c (oacc_entry_exit_ok): Release a vector. 2016-05-19 Martin Liska * tree-if-conv.c (ifcvt_repair_bool_pattern): Utilize auto_vecs. 2016-05-19 Martin Liska * ipa-pure-const.c (set_function_state): Remove an existing funct_state. (remove_node_data): Do not free it as it's released in set_function_state. 2016-05-19 Martin Liska * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Release bitmap. 2016-05-19 Martin Liska * omp-simd-clone.c (simd_clone_adjust): Release vector. 2016-05-19 Martin Liska * tree-ssa-reassoc.c (eliminate_duplicate_pair): Truncate an auto_vec instead of re-creating it. 2016-05-19 Martin Liska * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Use auto_vec instead of vec. 2016-05-19 Martin Liska * lto-section-in.c (lto_get_section_data): Call lto_check_version with additional argument. * lto-streamer.c (lto_check_version): Add new argument. * lto-streamer.h (lto_check_version): Likewise. 2016-05-19 Kyrylo Tkachov * config/arm/arm.c (arm_new_rtx_costs, SIGN_EXTEND case): Don't add cost of inner memory when handling sign-extended loads. 2016-05-19 Ilya Enkovich PR rtl-optimization/71148 * cse.c (cse_main): Free dominance info. (rest_of_handle_cse): Don't free dominance info. (rest_of_handle_cse2): Likewise. (rest_of_handle_cse_after_global_opts): Likewise. 2016-05-19 Kyrylo Tkachov PR target/71056 * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return NULL_TREE early if NEON is not available. Remove now redundant check in ARM_CHECK_BUILTIN_MODE. 2016-05-19 Maxim Ostapenko PR sanitizer/64354 * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add new builtin __SANITIZE_THREAD__ macros for fsanitize=thread switch. * doc/cpp.texi: Document new macros. 2016-05-19 Bin Cheng PR tree-optimization/69848 * tree-vect-loop.c (vectorizable_reduction): Don't factor comparison expr out of VEC_COND_EXPR for COND_REDUCTION. 2016-05-19 Segher Boessenkool * function.c (thread_prologue_and_epilogue_insn): Move the "goto epilogue_done" one block later. 2016-05-19 Richard Biener PR tree-optimization/70729 * passes.def: Move LIM pass before PRE. Remove no longer required copyprop and move first DCE out of the loop pipeline. 2016-05-18 David Malcolm PR driver/69265 * Makefile.in (GCC_OBJS): Move spellcheck.o to... (OBJS-libcommon-target): ...here. * opts-common.c: Include spellcheck.h. (cmdline_handle_error): Build a vec of valid options and use it to suggest provide hints for misspelled arguments. 2016-05-18 Jakub Jelinek PR c++/71100 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Don't drop lhs if it has TREE_ADDRESSABLE type. 2016-05-18 Uros Bizjak PR target/71145 * config/alpha/alpha.md (trap): Add (use (reg:DI 29)). (*exception_receiver_1): Return "#" for TARGET_EXPLICIT_RELOCS. 2016-05-18 Martin Jambor PR ipa/69708 * ipa-cp.c (ipa_get_jf_pass_through_result): Allow non-ip constant input for NOP_EXPR pass-through functions. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Allow aggregate global constant VAR_DECLs in constant jump functions. 2016-05-18 Martin Jambor PR ipa/69708 * ipa-prop.c (parm_preserved_before_stmt_p): Return true for loads from TREE_READONLY parameters. 2016-05-18 Martin Jambor PR ipa/69708 * cgraph.h (cgraph_indirect_call_info): New field guaranteed_unmodified. * ipa-cp.c (ipa_get_indirect_edge_target_1): Also pass parameter value to ipa_find_agg_cst_for_param, check guaranteed_unmodified when appropriate. * ipa-inline-analysis.c (evaluate_conditions_for_known_args): Also pass the parameter value to ipa_find_agg_cst_for_param. * ipa-prop.c (ipa_load_from_parm_agg): New parameter guaranteed_unmodified, store AA results there instead of bailing out if present. (ipa_note_param_call): Also initialize guaranteed_unmodified flag. (ipa_analyze_indirect_call_uses): Also set guaranteed_unmodified flag. (find_constructor_constant_at_offset): New function. (ipa_find_agg_cst_from_init): Likewise. (ipa_find_agg_cst_for_param): Also seearch for aggregate values in static initializers of contants, report back through a new paameter from_global_constant if that was the case. (try_make_edge_direct_simple_call): Also pass parameter value to ipa_find_agg_cst_for_param, check guaranteed_unmodified when appropriate. (ipa_write_indirect_edge_info): Stream new flag guaranteed_unmodified. (ipa_read_indirect_edge_info): Likewise. * ipa-prop.h (ipa_find_agg_cst_for_param): Update declaration. (ipa_load_from_parm_agg): Likewise. 2016-05-18 Jiong Wang PR rtl-optimization/71150 * lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P check. 2016-05-18 Michael Meissner PR target/70915 * config/rs6000/constraints.md (wE constraint): New constraint for a vector constant that can be loaded with XXSPLTIB. (wM constraint): New constraint for a vector constant of a 1's. (wS constraint): New constraint for a vector constant that can be loaded with XXSPLTIB and a vector sign extend instruction. * config/rs6000/predicates.md (xxspltib_constant_split): New predicates for wE/wS constraints. (xxspltib_constant_nosplit): Likewise. (easy_vector_constant): Add support for constants that can be loaded via XXSPLTIB. (all_ones_constant): New predicate for vector constant with all 1's set. (splat_input_operand): Add support for ISA 3.0 word splat operations. * config/rs6000/rs6000.c (xxspltib_constant_p): New function to return if a constant can be loaded with the ISA 3.0 XXSPLTIB instruction and possibly with a sign extension. (output_vec_const_move): Add support for XXSPLTIB. If we are loading up 0/-1 into Altivec registers, prefer using VSPLTISW instead of XXLXOR/XXLORC. (rs6000_expand_vector_init): Add support for ISA 3.0 word splat operations. (rs6000_legitimize_reload_address): Likewise. (rs6000_output_move_128bit): Use output_vec_const_move to emit constants. * config/rs6000/vsx.md (VSX_M): Add TImode (if -mvsx-timode) and combine VSX_M and VSX_M2 into one iterator. (VSX_M2): Likewise. (VSINT_84): New iterators for loading constants with XXSPLTIB. (VSINT_842): Likewise. (UNSPEC_VSX_SIGN_EXTEND): New UNSPEC. (xxspltib_v16qi): New insns to load up constants with the ISA 3.0 XXSPLTIB instruction. (xxspltib__nosplit): Likewise. (xxspltib__split): New insn to load up constants with XXSPLTIB and a sign extend instruction. (vsx_mov): Replace single move that handled all vector types with separate 32-bit and 64-bit moves. Combine the movti_ moves (when -mvsx-timode is in effect) into the main vector moves. Eliminate separate moves for , where the preferred register class () is listed first, and the secondary register class () is listed second with a '?' to discourage use. Prefer loading 0/-1 in any VSX register for ISA 3.0, and Altivec registers for ISA 2.06/2.07 (PR target/70915) so that if the register was involved in a slow operation, the clear/set operation does not wait for the slow operation to finish. Adjust the length attributes for 32-bit mode. Use rs6000_output_move_128bit and drop the use of the string instructions for 32-bit movti when -mvsx-timode is in effect. Use spacing so that the alternatives and attributes don't generate long lines, and put things in columns, so that it is easier to match up the operands and attributes with the insn alternatives. (vsx_mov_64bit): Likewise. (vsx_mov_32bit): Likewise. (vsx_movti_64bit): Fold movti into normal vector moves. (vsx_movti_32bit): Likewise. (vsx_splat_, V4SI/V4SF modes): Add support for ISA 3.0 word splat instructions. (vsx_splat_v4si_internal): Likewise. (vsx_splat_v4sf_internal): Likewise. (vector fusion peepholes): Use VSX_M instead of VSX_M2. (vsx_sign_extend_qi_): New ISA 3.0 instructions to sign extend vector elements. (vsx_sign_extend_hi_): Likewise. (vsx_sign_extend_si_v2di): Likewise. * config/rs6000/rs6000-protos.h (xxspltib_constant_p): Add declaration. * doc/md.texi (PowerPC constraints): Document the wE, wM, and wS constraints. Add trailing period to wL documentation. 2016-05-18 Richard Sandiford PR middle-end/71020 * tree-dfa.h (replace_abnormal_ssa_names): Declare. * tree-dfa.c (replace_abnormal_ssa_names): New function. * tree-call-cdce.c: Include tree-dfa.h. (can_guard_call_p): New function, extracted from... (can_use_internal_fn): ...here. (shrink_wrap_one_built_in_call_with_conds): Remove failure path and return void. (shrink_wrap_one_built_in_call): Likewise. (use_internal_fn): Likewise. (shrink_wrap_conditional_dead_built_in_calls): Update accordingly and return void. Call replace_abnormal_ssa_names. (pass_call_cdce::execute): Check can_guard_call_p during the initial walk. Assume shrink_wrap_conditional_dead_built_in_calls will always change something. 2016-05-18 Martin Jambor PR ipa/70646 * ipa-prop.c (determine_locally_known_aggregate_parts): Bail out early if parameter PARAM_IPA_MAX_AGG_ITEMS is zero. 2016-05-18 Martin Jambor PR ipa/70646 * ipa-inline.h (condition): New field size. * ipa-inline-analysis.c (add_condition): New parameter SIZE, use it for comaprison and store it into the new condition. (evaluate_conditions_for_known_args): Use condition size to check access sizes for all but CHANGED conditions. (unmodified_parm_1): New parameter size_p, store access size into it. (unmodified_parm): Likewise. (unmodified_parm_or_parm_agg_item): Likewise. (eliminated_by_inlining_prob): Pass NULL to unmodified_parm as size_p. (set_cond_stmt_execution_predicate): Extract access sizes and store them to conditions. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_expr_predicate): Likewise. (will_be_nonconstant_predicate): Likewise. (inline_read_section): Stream condition size. (inline_write_summary): Likewise. 2016-05-18 Richard Biener * tree-ssa-loop-im.c (determine_max_movement): Properly add condition cost to PHI cost instead of total_cost. 2016-05-18 Martin Liska PR fortran/70856 * ipa-icf.c (sem_variable::merge): Set DECL_PT_UID for merged variables. 2016-05-18 Richard Biener * lto-streamer.h (LTO_major_version): Bump to 6. 2016-05-18 Segher Boessenkool * function.c (make_split_prologue_seq, make_prologue_seq, make_epilogue_seq): New functions, factored out from... (thread_prologue_and_epilogue_insns): Here. 2016-05-18 Segher Boessenkool * function.c (rest_of_handle_thread_prologue_and_epilogue): Call cleanup_cfg with CLEANUP_EXPENSIVE after shrink-wrapping instead of before. Add a comment. 2016-05-18 Bin Cheng * tree-ssa-loop-ivopts.c (get_computation_cost_at): Check invariant expression pointer, not pointer to the pointer. 2016-05-18 Jakub Jelinek * config/i386/sse.md (pbroadcast_evex_isa): New mode attr. (avx2_pbroadcast): Add another alternative with v instead of x constraints in it, using isa. (avx2_pbroadcast_1): Similarly, add two such alternatives. * config/i386/sse.md (_palignr): Use constraint x instead of v in second alternative, add avx512bw alternative. * config/i386/sse.md (_pshufb3): Use constraint x instead of v in second alternative, add avx512bw alternative. * config/i386/sse.md (*_pmulhrsw3): Use constraint x instead of v in second alternative, add avx512bw alternative. * config/i386/sse.md (avx2_pmaddubsw256, ssse3_pmaddubsw128): Add avx512bw alternative. 2016-05-18 Kirill Yukhin * config/i386/sse.md (define_insn "*andnot3"): Extend static array to 128 chars. (define_insn "*andnottf3"): Ditto. (define_insn "*3"/any_logic): Ditto. (define_insn "*tf3"/any_logic): Ditto. (define_insn "sse2_storehpd"): Use Yv constraint for scalar operand to block AVX-512VL insn variant emit when it is not enabled. 2016-05-18 Kirill Yukhin * config/i386/sse.md (define_insn "*vec_concatv2sf_sse4_1"): Use 'Yv' constraint fot SF mode. 2016-05-18 Petr Murzin Kirill Yukhin * config/i386/sse.md (define_insn "srcp14"): Use proper operand modifiers. (define_insn "rsqrt14"): Ditto. (define_insn "avx512dq_cvtps2qqv2di"): Ditto. (define_insn "fix_truncv2sfv2di2"): Ditto. (define_insn "avx512f_v8div16qi2_mask_store"): Ditto. (define_insn "vec_set_hi_"): Ditto. (define_insn "avx512dq_broadcast"): Ditto. (define_insn "*avx512f_gatherdi"): Ditto. (define_insn "*avx512f_scatterdi"): Ditto. * config/i386/i386.c (ix86_print_operand): Expand check for size override codes for Intel syntax. 2016-05-18 Richard Biener PR tree-optimization/71168 * tree-loop-distribution.c (distribute_loop): Move *destroy_p initialization earlier. 2016-05-18 James Greenhalgh * config/aarch64/aarch64-simd.md (aarch64_reduc_plus_internal): Rename to... (reduc_plus_scal): ...This, and remove previous implementation. 2016-05-18 Richard Biener * passes.def: Put late dse and cd_dce in canonical order. 2016-05-17 Jan Hubicka * ipa-inline-transform.c (preserve_function_body_p): Look for first non-thunk clone. (save_function_body): Save into first non-thunk. * lto-cgraph.c (lto_output_edge): When streaming thunk do not look up call stmt id. (lto_output_node): Inline thunks don't need body in every partition. * lto-streamer-in.c: Do not fixup thunk clones. * cgraphclones.c (cgraph_node::create_edge_including_clone): Skip thunks. * tree-inline.c (copy_bb): Be prepared for target node to be new after folding suceeds. 2016-05-17 Kugan Vivekanandarajah PR middle-end/63586 * tree-ssa-reassoc.c (transform_add_to_multiply): New. (reassociate_bb): Call transform_add_to_multiply. 2016-05-17 Kugan Vivekanandarajah * config/aarch64/aarch64.c (all_extensions): Removed unused static variable. 2016-05-17 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_function_arg_boundary): New. (TARGET_FUNCTION_ARG_BOUNDARY): Override. 2016-05-17 Mikhail Maltsev PR tree-optimization/54579 PR middle-end/55299 * match.pd (~(~X >> Y), ~(~X >>r Y), ~(~X < PR ipa/71146 * tree-inline.c (expand_call_inline): Call maybe_remove_unused_call_args. 2016-05-17 Jim Wilson * doc/cpp.texi (__GNUC__): Major version changes are no longer rare. * doc/invoke.texi (-mnan=2008): Change signalling to signaling. * doc/md.texi (fmin@var{m}3): Likewise. 2016-05-17 Marc Glisse * match.pd (X & C): New transformation. 2016-05-17 Marc Glisse * match.pd (~X & Y): New transformation. 2016-05-17 Marc Glisse * tree-vrp.c (simplify_truth_ops_using_ranges): Set range information for new SSA_NAME. (simplify_conversion_using_ranges): Get range through get_range_info instead of get_value_range. 2016-05-17 Jiong Wang * config/aarch64/arm_neon.h (vmvn_s8): Reimplement using C operator. Remove inline assembly. (vmvn_s16): Likewise. (vmvn_s32): Likewise. (vmvn_u8): Likewise. (vmvn_u16): Likewise. (vmvn_u32): Likewise. (vmvnq_s8): Likewise. (vmvnq_s16): Likewise. (vmvnq_s32): Likewise. (vmvnq_u8): Likewise. (vmvnq_u16): Likewise. (vmvnq_u32): Likewise. (vmvn_p8): Likewise. (vmvnq_p16): Likewise. 2016-05-17 Jiong Wang * config/aarch64/aarch64-simd.md (vmul_n_f32): Remove inline assembly. Use builtin. (vmul_n_s16): Likewise. (vmul_n_s32): Likewise. (vmul_n_u16): Likewise. (vmul_n_u32): Likewise. (vmulq_n_f32): Likewise. (vmulq_n_f64): Likewise. (vmulq_n_s16): Likewise. (vmulq_n_s32): Likewise. (vmulq_n_u16): Likewise. (vmulq_n_u32): Likewise. 2016-05-17 Jiong Wang * config/aarch64/aarch64-simd.md (*aarch64_mul3_elt_to_128df): Extend to all supported modes. Rename to "*aarch64_mul3_elt_from_dup". 2016-05-17 Jiong Wang * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_to_128df): Rename to *aarch64_fma4_elt_from_dup. (*aarch64_fnma4_elt_to_128df): Rename to *aarch64_fnma4_elt_from_dup. * config/aarch64/arm_neon.h (vfma_n_f64): New. (vfms_n_f32): Likewise. (vfms_n_f64): Likewise. (vfmsq_n_f32): Likewise. (vfmsq_n_f64): Likewise. 2016-05-17 Gerald Pfeifer * wide-int.h: Change fixed_wide_int_storage from class to struct. 2016-05-17 Richard Biener PR tree-optimization/71132 * tree-loop-distribution.c (create_rdg_cd_edges): Pass in loop. Only add control dependences for blocks in the loop. (build_rdg): Adjust. (generate_code_for_partition): Return whether loop should be destroyed and delay that. (distribute_loop): Likewise. (pass_loop_distribution::execute): Record loops to be destroyed and perform delayed destroying of loops. 2016-05-17 Kyrylo Tkachov PR target/70809 * config/aarch64/aarch64-simd.md (aarch64_vmls): Delete. 2016-05-17 James Greenhalgh * config/aarch64/aarch64-elf.h (ASM_OUTPUT_DEF): Delete. 2016-05-17 Ilya Enkovich PR target/71114 * config/i386/i386.c (dimode_scalar_chain::convert_op): Fix insertion point for instructions generated by validize_mem. 2016-05-17 James Greenhalgh * config/aarch64/aarch64.c (SHIFT_COUNT_TRUNCATED): Wrap definition in brackets. 2016-05-17 James Greenhalgh * config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate): Make "buf_size" a variable rather than a macro. 2016-05-16 Wilco Dijkstra * doc/invoke.texi (AArch64 Options): Various updates. 2016-05-16 Jan Hubicka * ipa-inline-analysis.c (compute_inline_parameters): Disable inlinig into instrumentation thunks. * cif-code.def (CIF_CHKP): New. 2016-05-16 Uros Bizjak * config/i386/xopintrin.h: Correct "unsinged" typo in the comments. 2016-05-16 Martin Jambor * hsa-gen.c (fillup_for_decl): Increase alignment to natural one. (get_symbol_for_decl): Sorry if a global symbol in under-aligned. 2016-05-16 Marek Polacek * gimple.c (maybe_remove_unused_call_args): Fix typos in the commentary. 2016-05-16 Martin Jambor PR hsa/70857 * omp-low.c (grid_expand_target_grid_body): Copy RESULT_DECL of the outlined kernel function. 2016-05-16 Robert Suchanek * config/mips/mips.h (ISA_HAS_LSA): Enable for -mmsa. (ISA_HAS_DLSA): Ditto. 2016-05-16 Matthew Fortune * config/mips/m5100.md (m51_int_load): Update the latency to 2. 2016-05-16 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_mangle_decl_assembler_name): Revert. (nvptx_name_replacement): Restore. Add comment. (write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn): Restore (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Delete. 2016-05-16 Wilco Dijkstra * config/aarch64/aarch64.md (add3_compareC_cconly_imm): Remove use of %w. (add3_compareC_imm): Likewise. (si3_uxtw): Split into register and immediate variants. (andsi3_compare0_uxtw): Likewise. (and3_compare0): Likewise. (and3nr_compare0): Likewise. (stack_protect_test_): Don't use %x for memory operands. 2016-05-16 Matthew Fortune * config/mips/mips-cpus.def (p5600): Add multi-line brackets. 2016-05-16 Wilco Dijkstra * config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_3): Split integer shifts into shift_reg and bfm. (aarch64_lshr_sisd_or_int_3): Likewise. (aarch64_ashr_sisd_or_int_3): Likewise. (ror3_insn): Likewise. (si3_insn_uxtw): Likewise. (3_insn): Change to rotate_imm. (extr5_insn_alt): Likewise. (extrsi5_insn_uxtw): Likewise. (extrsi5_insn_uxtw_alt): Likewise. 2016-05-16 Matthew Wahab * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_INVALID_PARAMETER_TYPE): Remove. (TARGET_INVALID_RETURN_TYPE): Remove. * system.h: Poison TARGET_INVALID_PARAMETER_TYPE and TARGET_INVALID_RETURN_TYPE. * target.def (invalid_parameter_type): Remove. (invalid_return_type): Remove. 2016-05-16 Jan Hubicka * ipa-inline-analysis.c (compute_inline_parameters): Be more reailistic on estimating thunk bodies; do not set inline_failed to CIF_THUNK for calls from thunk. * ipa-inline-transform.c (inline_call): When inlining into thunk produce gimple body. (preserve_function_body_p): No need to preserve function body * cif-codes.def (CIF_THUNK): Remove. * cgraphclones.c (duplicate_thunk_for_node): Thunks calls are inlinable. 2016-05-16 Jan Hubicka * tree-inline.c (expand_call_inline): recurse after inlining thunk. 2016-05-16 Jan Hubicka * tree.c (free_lang_data_in_decl): Also set target/optimization flags for thunks. 2016-05-16 Jan Hubicka * ipa-inline.c (report_inline_failed_reason): Look into thunks, too (inline_small_functions): Do not look for function symbol when resetting caches. 2016-05-16 Jan Hubicka * lto-cgraph.c (compute_ltrans_boundary, output_symtab): Fix handling of inline thunks 2016-05-16 Matthew Wahab Ramana Radhakrishnan Jiong Wang * config/arm/arm-c.c (arm_cpu_builtins): Use def_or_undef_macro for __ARM_FP16_FORMAT_IEEE and __ARM_FP16_FORMAT_ALTERNATIVE. Define __ARM_FP16_ARGS when appropriate. * config/arm/arm.c (arm_invalid_parameter_type): Remove declaration. (arm_invalid_return_type): Likewise. (TARGET_INVALID_PARAMETER_TYPE): Remove. (TARGET_INVALID_RETURN_TYPE): Remove. (aapcs_vfp_sub_candidate): Allow HFmode. (aapcs_vfp_allocate): Add comment. Support HFmode. (aapcs_vfp_allocate_return_reg): Likewise. (struct aapcs_cp_arg_layout): Slightly reword comments for is_return_candidate and allocate_return_reg. (output_mov_vfp): Update assert. (arm_hard_regno_mode_ok): Remove comment, update HF-mode condition. (arm_invalid_parameter_type): Remove. (amr_invalid_return_type): Remove. * config/arm/arm.h (TARGET_NEON_FP16): Fix definition. * config/arm/arm.md (*arm32_movhf): Disable for TARGET_VFP. * config/arm/vfp.md (*movhf_vfp): Enable for TARGET_VFP. 2016-05-16 Matthew Wahab * config/aarch64/aarch64.h (LEGITIMIZE_RELOAD_ADDRESS): Remove. * config/aarch64/arch64-protos.h (aarch64_legitimize_reload_address): Remove. * config/aarch64/aarch64.c (aarch64_legitimize_reload_address): Remove. 2016-05-16 Eric Botcazou * configure.ac: Add ACX_NONCANONICAL_HOST. * configure: Regenerate. * Makefile.in: Set host_noncanonical. 2016-05-14 Uros Bizjak PR target/71097 * config/i386/i386.md (*movtf_internal): Before register allocation, do not allow FP constants for CM_MEDIUM memory model, allow only standard FP constants for CM_LARGE and CM_LARGE_PIC models. (*movxf_internal): Ditto. (*movdf_internal): Ditto. (*movsf_internal): Ditto. 2016-05-13 Segher Boessenkool PR rtl-optimization/67483 * combine.c (make_compound_operation): Don't call extract_left_shift with negative shift amounts. 2016-05-13 Jakub Jelinek PR bootstrap/71071 * fold-const.c (fold_checksum_tree): Allow modification of TYPE_ALIAS_SET during folding. * config/i386/i386.c (ix86_compute_frame_layout, ix86_expand_prologue, ix86_expand_split_stack_prologue): Use HOST_WIDE_INT_C macro. (ix86_split_to_parts): Likewise. Fix up formatting. 2016-05-13 H.J. Lu * tree-ssa-loop-ivopts.c (create_new_ivs): Cast to unsigned HOST_WIDE_INT with HOST_WIDE_INT_PRINT_UNSIGNED in printf format. 2016-05-13 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_mangle_decl_assembler_name): New. (nvptx_name_replacement): Delete. (write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn): Remove nvptx_name_replacement call. (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Override. * langhooks.c (add_builtin_funcction_common): Call targetm.mangle_decl_assembler_name. * config/nvptx/nvptx.c (write_fn_proto): Handle BUILT_IN_ATOMIC_COMPARE_EXCHANGE_n oddity. 2016-05-13 Martin Liska * tree-ssa-loop-ivopts.c (create_new_ivs): Use HOST_WIDE_INT_PRINT_DEC and PRIu64 in printf format. 2016-05-13 Kyrylo Tkachov * tree-ssa-loop-ivanon.c (try_unroll_loop_completely): Typo fix in comment. 2016-05-13 Kyrylo Tkachov * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Change --param max-completely-peeled-times to --param max-completely-peel-times in dump file printing. 2016-05-13 Richard Biener PR tree-optimization/42587 * tree-ssa-math-opts.c (perform_symbolic_merge): Handle BIT_FIELD_REF. (find_bswap_or_nop_1): Likewise. (bswap_replace): Likewise. 2016-05-13 Martin Liska * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Initialize a variable with default value. 2016-05-13 Martin Liska * doc/invoke.texi: Enhance explanation of error recovery of sanitizers. 2016-05-13 Martin Liska * tree-ssa-loop-ivopts.c (avg_loop_niter): Fix coding style. (struct cost_pair): Change inv_expr_id (int) to inv_expr (iv_inv_expr_ent *). (struct iv_inv_expr_ent): Comment struct fields. (sort_iv_inv_expr_ent): New function. (struct ivopts_data): Rename inv_expr_id to max_inv_expr_id. (struct iv_ca): Replace used_inv_expr and num_used_inv_expr with a hash_map between iv_inv_expr_ent and number of usages. (niter_for_exit): Fix coding style. (tree_ssa_iv_optimize_init): Use renamed variable. (determine_base_object): Fix coding style. (alloc_iv): Likewise. (find_interesting_uses_outside): Likewise. (add_candidate_1): Likewise. (add_standard_iv_candidates): Likewise. (set_group_iv_cost): Replace inv_expr_id with inv_expr. (prepare_decl_rtl): Fix coding style. (get_address_cost): Likewise. (get_shiftadd_cost): Likewise. (force_expr_to_var_cost): Likewise. (compare_aff_trees): Likewise. (get_expr_id): Restructure the function. (get_loop_invariant_expr_id): Renamed to get_loop_invariant_expr. (get_computation_cost_at): Replace usage of inv_expr_id with inv_expr. (get_computation_cost): Likewise. (determine_group_iv_cost_generic): Likewise. (determine_group_iv_cost_address): Likewise. (iv_period): Fix coding style. (iv_elimination_compare_lt): Likewise. (may_eliminate_iv): Likewise. (determine_group_iv_cost_cond): Replace usage of inv_expr_id with inv_expr. (determine_group_iv_costs): Dump invariant expressions. (iv_ca_recount_cost): Use the newly added hash_map. (iv_ca_set_remove_invariants): Fix coding style. (iv_ca_set_add_invariants): Fix coding style. (iv_ca_set_no_cp): Utilize the newly added hash_map for used invariants. (iv_ca_set_cp): Likewise. (iv_ca_new): Initialize the newly added hash_map and remove initialization of fields. (iv_ca_free): Delete the hash_map. (iv_ca_dump): Dump invariant expressions. (iv_ca_extend): Fix coding style. (try_add_cand_for): Likewise. (create_new_ivs): Dump information about # of avg iterations and # of used invariant expressions. (rewrite_use_compare): Fix coding style. (free_loop_data): Set default value for max_inv_expr_id. 2016-05-13 Ilya Enkovich * cse.c (rest_of_handle_cse): Use cleanup_cfg returned value cse_cfg_altered computation. (rest_of_handle_cse2): Likewise. (rest_of_handle_cse_after_global_opts): Likewise. 2016-05-13 Ramana Radhakrishnan PR target/53440 * config/arm/arm.c (arm32_output_mi_thunk): New. (arm_output_mi_thunk): Rename to arm_thumb1_mi_thunk. Rework to split Thumb1 vs TARGET_32BIT functionality. (arm_thumb1_mi_thunk): New. 2016-05-13 Ramana Radhakrishnan * config/aarch64/aarch64.c (TARGET_OMIT_STRUCT_RETURN_REG): Set to true. 2016-05-13 Rainer Orth PR target/71080 * config/i386/i386.c (ix86_in_large_data_p): Guard against NULL exp. 2016-05-13 Eric Botcazou * builtins.c (expand_builtin_memcmp): Do not emit the call here. (expand_builtin_trap): Emit a regular call. (set_builtin_user_assembler_name): Remove obsolete cases. * dse.c (scan_insn): Adjust. * except.c: Include calls.h. (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is defined, emit a regular call to setjmp. * expr.c (emit_block_move_hints): Call emit_block_copy_via_libcall. (block_move_libcall_safe_for_call_parm): Use memcpy builtin. (emit_block_move_via_libcall): Delete. (block_move_fn): Delete. (init_block_move_fn): Likewise. (emit_block_move_libcall_fn): Likewise. (emit_block_op_via_libcall): New function. (set_storage_via_libcall): Tidy up and use memset builtin. (block_clear_fn): Delete. (init_block_clear_fn): Likewise. (clear_storage_libcall_fn): Likewise. (expand_assignment): Call emit_block_move_via_libcall. Do not include gt-expr.h. * expr.h (emit_block_op_via_libcall): Declare. (emit_block_copy_via_libcall): New inline function. (emit_block_move_via_libcall): Likewise. (emit_block_comp_via_libcall): Likewise. (block_clear_fn): Delete. (init_block_move_fn): Likewise. (init_block_clear_fn): Likewise. (emit_block_move_via_libcall): Likewise. (set_storage_via_libcall): Add default parameter value. * libfuncs.h (enum libfunc_index): Remove obsolete values. (abort_libfunc): Delete. (memcpy_libfunc): Likewise. (memmove_libfunc): Likewise. (memcmp_libfunc): Likewise. (memset_libfunc): Likewise. (setbits_libfunc): Likewise. (setjmp_libfunc): Likewise. (longjmp_libfunc): Likewise. (profile_function_entry_libfunc): Likewise. (profile_function_exit_libfunc): Likewise. (gcov_flush_libfunc): Likewise. * optabs-libfuncs.c (build_libfunc_function): Set DECL_ARTIFICIAL and DECL_VISIBILITY on the declaration. (init_optabs): Do not initialize obsolete libfuncs. * optabs.c (prepare_cmp_insn): Call emit_block_comp_via_libcall. * tree-core.h (ECF_RET1): Define. (ECF_TM_PURE): Adjust. (ECF_TM_BUILTIN): Likewise. * tree.c (set_call_expr_flags): Deal with ECF_RET1. (build_common_builtin_nodes): Initialize abort builtin. Add ECF_RET1 on memcpy, memmove and memset builtins. Pass final flags for alloca and alloca_with_align builtins. * config/alpha/alpha.c (alpha_init_libfuncs): Do not initialize obsolete builtins. * config/ia64/ia64.c (ia64_vms_init_libfuncs): Likewise. * config/i386/i386.c (ix86_expand_set_or_movmem): Adjust call to set_storage_via_libcall and call emit_block_copy_via_libcall. 2016-05-12 Uros Bizjak * config/i386/i386.md (*call_got_x32): Change operand 0 to DImode before it is passed to ix86_output_call_operand. (*call_value_got_x32): Ditto for operand 1. 2016-05-12 Jiong Wang PR rtl-optimization/70904 * lra-constraint.c (process_addr_reg): Relax the restriction on subreg reload for wide mode. 2016-05-12 Marek Polacek PR c/70756 * langhooks-def.h (lhd_incomplete_type_error): Adjust declaration. * langhooks.c (lhd_incomplete_type_error): Add location parameter. * langhooks.h (incomplete_type_error): Likewise. * tree.c (size_in_bytes_loc): Renamed from size_in_bytes. Add location parameter, pass it down to incomplete_type_error. * tree.h (size_in_bytes): New inline overload. (size_in_bytes_loc): Renamed from size_in_bytes. 2016-05-12 Richard Biener PR tree-optimization/71059 * tree-ssa-pre.c (phi_translate_1): Fully fold translated nary before looking up or entering the expression into the VN hashes. * tree-ssa-sccvn.c (vn_nary_build_or_lookup): Fix comment typo. Make sure to re-use NARYs without result as inserted by phi-translation. 2016-05-12 Richard Biener PR tree-optimization/71062 * tree-ssa-alias.h (struct pt_solution): Add vars_contains_restrict field. * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_restrict if the var is a restrict tag. * tree-ssa-alias.c (ptrs_compare_unequal): If vars_contains_restrict do not disambiguate pointers against it. (dump_points_to_solution): Re-structure and adjust for new vars_contains_restrict flag. * gimple-pretty-print.c (pp_points_to_solution): Likewise. 2016-05-12 Martin Liska * doc/invoke.texi: Explain connection between -fsanitize-recover=address and ASAN_OPTIONS="halt_on_error=1". 2016-05-12 Ilya Enkovich PR tree-optimization/71006 * tree-vect-loop.c (vect_determine_vectorization_factor): Don't consider COND_EXPR as a mask producer. 2016-05-12 Marek Polacek PR driver/71063 * opts.c (common_handle_option): Detect missing argument for --help^. 2016-05-12 Kyrylo Tkachov PR target/70830 * config/arm/arm.c (arm_output_multireg_pop): Avoid POP instruction when popping the PC and within an interrupt handler routine. Add missing tab to output of "ldmfd". (output_return_instruction): Output LDMFD with SP update rather than POP when returning from interrupt handler. 2016-05-12 Jakub Jelinek * config/i386/i386.md (isa): Add x64_avx512dq, enable if TARGET_64BIT && TARGET_AVX512DQ. * config/i386/sse.md (*vec_extract): Add avx512bw alternatives. (*vec_extract_zext): Add avx512bw alternative. (*vec_extract_0, *vec_extractv4si_0_zext, *vec_extractv2di_0_sse): Use v constraint instead of x constraint. (*vec_extractv4si): Add avx512dq and avx512bw alternatives. (*vec_extractv4si_zext): Add avx512dq alternative. (*vec_extractv2di_1): Add x64_avx512dq and avx512bw alternatives, use v instead of x constraint in other alternatives where possible. * config/i386/sse.md (sse2_loadld): Use v instead of x constraint in alternatives 0,1,4. * config/i386/sse.md (pinsr_evex_isa): New mode attr. (_pinsr): Add 2 alternatives with v constraints instead of x and isa attribute. PR target/71019 * config/i386/sse.md (_packssdw, _packusdw): Make sure EVEX encoded insn is not emitted unless TARGET_AVX512BW. (_packuswb, _packsswb): Likewise. For TARGET_AVX512BW, use "=v" constraint instead of "=x" for the result operand. * config/i386/sse.md (*vec_setv4sf_sse4_1, sse4_1_insertps): Use v constraint instead of x in avx alternatives. Use maybe_evex instead of vex prefix. * config/i386/constraints.md (Yv): New constraint. * config/i386/i386.h (VALID_AVX512VL_128_REG_MODE): Allow TFmode and V1TImode in xmm16+ registers for TARGET_AVX512VL. * config/i386/i386.md (avx512fvecmode): New mode attr. (*pushtf): Use v constraint instead of x. (*movtf_internal): Likewise. For TARGET_AVX512VL and xmm16+ registers, use vmovdqu64 or vmovdqa64 instructions. (*absneg2): Use Yv constraint instead of x constraint. (*absnegtf2_sse): Likewise. (copysign3_const, copysign3_var): Likewise. * config/i386/sse.md (*andnot3): Add avx512vl and avx512f alternatives. (*andnottf3, *3, *tf3): Likewise. 2016-05-12 Richard Biener PR tree-optimization/71060 * tree-data-ref.c (initialize_data_dependence_relation): Do not require exact match of DR_BASE_OBJECT but only matching address and type. 2016-05-12 Richard Biener PR tree-optimization/70986 * cfganal.c: Include cfgloop.h. (dfs_find_deadend): Prefer to take edges exiting loops. 2016-05-11 Bill Schmidt * gcc.target/powerpc/pr70963.c: Require at least power8 at both compile and run time. 2016-05-11 Mikhail Maltsev PR c/43651 * doc/invoke.texi (Wduplicate-decl-specifier): Document new option. 2016-05-11 Uros Bizjak * config/i386/i386.c (legitimize_pic_address): Use copy_to_suggested_reg instead of gen_movsi. 2016-05-11 Michael Meissner * config/rs6000/predicates.md (quad_memory_operand): Move most of the code into quad_address_p and call it to share code with vsx_quad_dform_memory_operand. (vsx_quad_dform_memory_operand): New predicate for ISA 3.0 vector d-form support. * config/rs6000/rs6000.opt (-mlra): Switch to being an option mask bit instead of being a separate word. Split -mpower9-dform into two switches, -mpower9-dform-scalar and -mpower9-dform-vector. * config/rs6000/rs6000.c (RELOAD_REG_QUAD_OFFSET): New addr_mask for the register class supporting 128-bit quad word memory offsets. (mode_supports_vsx_dform_quad): Helper function to return if the register class uses quad word memory offsets. (rs6000_debug_addr_mask): Add support for quad word memory offsets. (rs6000_debug_reg_global): Always print if we are using LRA or not. (rs6000_setup_reg_addr_masks): If ISA 3.0 vector d-form instructions are enabled, set up the appropriate addr_masks for 128-bit types. (rs6000_init_hard_regno_mode_ok): wb constraint is now based on -mpower9-dform-scalar, instead of -mpower9-dform. (rs6000_option_override_internal): Split -mpower9-dform into two switches, -mpower9-dform-scalar and -mpower9-dform-vector. The -mpower9-dform switch sets or clears both. If we are not using the LRA register allocator, do not enable -mpower9-dform-vector by default. If we are using LRA, enable -mpower9-dform-vector and -mvsx-timode if it is appropriate. Issue a warning if either -mpower9-dform-vector or -mvsx-timode are explicitly used without enabling LRA. (quad_address_offset_p): New helper function to return if the offset is legal for quad word memory instructions. (quad_address_p): New function to determin if GPR or vector register quad word memory addresses are legal. (mem_operand_gpr): Validate quad word address offsets. (reg_offset_addressing_ok_p): Add support for ISA 3.0 vector d-form (register + offset) instructions. (offsettable_ok_by_alignment): Likewise. (rs6000_legitimate_offset_address_p): Likewise. (legitimate_lo_sum_address_p): Likewise. (rs6000_legitimize_address): Likewise. (rs6000_legitimize_reload_address): Add more debug statements for -mdebug=addr. (rs6000_legitimate_address_p): Add support for ISA 3.0 vector d-form instructions. (rs6000_secondary_reload_memory): Add support for ISA 3.0 vector d-form instructions. Distinguish different cases in debug output. (rs6000_secondary_reload_inner): Add support for ISA 3.0 vector d-form instructions. (rs6000_preferred_reload_class): Likewise. (rs6000_output_move_128bit): Add support for ISA 3.0 d-form instructions. If ISA 3.0 is available, generate lxvx/stxvx instead of the ISA 2.06 indexed memory instructions. (rs6000_emit_prologue): If we have ISA 3.0 d-form instructions, use them to save/restore the saved vector registers instead of using Altivec instructions. (rs6000_emit_epilogue): Likewise. (rs6000_lra_p): Use TARGET_LRA instead of the old option word. (rs6000_opt_masks): Split -mpower9-dform into -mpower9-dform-scalar and -mpower9-dform-vector. (rs6000_print_options_internal): Print -mno- if was not selected. * config/rs6000/vsx.md (p9_vecload_): Delete hack to emit ISA 3.0 vector indexed memory instructions, and fold the code into the normal mov patterns. (p9_vecstore_): Likewise. (vsx_mov): Add support for ISA 3.0 vector d-form instructions. (vsx_movti_64bit): Likewise. (vsx_movti_32bit): Likewise. * config/rs6000/constraints.md (wO constraint): New constraint for ISA 3.0 vector d-form support. * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Use -mpower9-dform-scalar instead of -mpower9-dform. Add note not to include -mpower9-dform-vector until we switch over to LRA. (POWERPC_MASKS): Add -mlra. Split -mpower9-dform into two. switches, -mpower9-dform-scalar and -mpower9-dform-vector. * config/rs6000/rs6000-protos.h (quad_address_p): Add declaration. * doc/invoke.texi (RS/6000 and PowerPC Options): Add documentation for -mpower9-dform and -mlra. * doc/md.texi (wO constraint): Document wO constraint. 2016-05-11 Alexander Monakov * genattr.c (main): Change 'rtx' to 'rtx_insn *' in prototypes of 'insn_latency', 'maximal_insn_latency', 'min_insn_conflict_delay'. * genautomata.c (output_internal_insn_code_evaluation): Simplify. Move handling of non-insn arguments inline into the sole user: (output_trans_func): ...here. (output_min_insn_conflict_delay_func): Change 'rtx' to 'rtx_insn *' in emitted function prototype. (output_internal_insn_latency_func): Ditto. Simplify. (output_internal_maximal_insn_latency_func): Ditto. Delete always-unused argument. (output_insn_latency_func): Ditto. (output_maximal_insn_latency_func): Ditto. 2016-05-11 Richard Biener PR tree-optimization/71055 * tree-ssa-sccvn.c (vn_reference_lookup_3): When native-interpreting sth with precision not equal to access size verify we don't chop off bits. 2016-05-11 Richard Biener PR debug/71057 * dwarf2out.c (retry_incomplete_types): Set early_dwarf. (dwarf2out_finish): Move retry_incomplete_types call ... (dwarf2out_early_finish): ... here. 2016-05-11 Richard Biener PR middle-end/71002 * alias.c (reference_alias_ptr_type): Preserve alias-set zero if the langhook insists on it. * fold-const.c (make_bit_field_ref): Add arg for the original reference and preserve its alias-set. (decode_field_reference): Take exp by reference and adjust it to the original memory reference. (optimize_bit_field_compare): Adjust callers. (fold_truth_andor_1): Likewise. * gimplify.c (gimplify_expr): Adjust in-SSA form test. 2016-05-11 Ilya Enkovich PR middle-end/70807 * cfgrtl.h (delete_insn_and_edges): Now return bool. * cfgrtl.c (delete_insn_and_edges): Likewise. * config/i386/i386.c (convert_scalars_to_vector): Remove redundant code. * cse.c (cse_insn): Compute cse_cfg_altered. (delete_trivially_dead_insns): Likewise. (cse_cc_succs): Likewise. (rest_of_handle_cse): Free dominance info if required. (rest_of_handle_cse2): Likewise. (rest_of_handle_cse_after_global_opts): Likewise. 2016-05-11 Alan Modra * config/rs6000/rs6000.c (is_complex_IBM_long_double, abi_v4_pass_in_fpr): New functions. (rs6000_function_arg_boundary): Exclude complex IBM long double from 64-bit alignment when ABI_V4. (rs6000_function_arg, rs6000_function_arg_advance_1, rs6000_gimplify_va_arg): Use abi_v4_pass_in_fpr. 2016-05-10 Segher Boessenkool PR rtl-optimization/71028 * cfgcleanup.c (try_optimize_cfg): Do not flip a conditional jump with just a return in the fallthrough block if the branch block contains just a return as well. 2016-05-10 Marc Glisse * fold-const.c (fold_binary_loc) [(X ^ Y) & Y]: Remove and merge with... * match.pd ((X & Y) ^ Y): ... this. ((X & Y) & Y, (X | Y) | Y, (X ^ Y) ^ Y, (X & Y) & (X & Z), (X | Y) | (X | Z), (X ^ Y) ^ (X ^ Z)): New transformations. 2016-05-10 David Malcolm * read-md.c (require_char_ws): New function. (read_string): Simplify using require_char_ws. (handle_constants): Likewise. (handle_enum): Likewise. (handle_file): Likewise. * read-md.h (require_char_ws): New declaration. * read-rtl.c (read_conditions): Simplify using require_char_ws. (read_mapping): Likewise. (read_rtx_code): Likewise. (read_nested_rtx): Likewise. 2016-05-10 James Norris * config/rs6000/sysv4.h (CRTOFFLOADBEGIN): Define. Add crtoffloadbegin.o if offloading is enabled and -fopenacc or -fopenmp is specified. (CRTOFFLOADEND): Likewise. (STARTFILE_LINUX_SPEC): Add CRTOFFLOADBEGIN. (ENDFILE_LINUX_SPEC): Add CRTOFFLOADEND. 2016-05-10 Uros Bizjak * config/i386/i386.c (legitimize_pic_address): Merge 64-bit and 32-bit gotoff_operand code paths. Use copy_to_suggested_regs and expand_simple_binop where appropriate. Cleanup. 2016-05-10 Ilya Enkovich PR target/70799 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Allow integer constants. (dimode_scalar_chain::vector_const_cost): New. (dimode_scalar_chain::compute_convert_gain): Handle constants. (dimode_scalar_chain::convert_op): Likewise. (dimode_scalar_chain::convert_insn): Likewise. 2016-05-10 Pierre-Marie de Rodat * dwarf2out.c (resolve_args_picking_1): Consider DW_OP_neg as an unary operation, not a binary one. 2016-05-10 Ilya Enkovich PR middle-end/70877 * tree-chkp.c (chkp_add_bounds_to_call_stmt): Handle calls with type casted fndecl. 2016-05-10 Ilya Enkovich PR tree-optimization/70786 * tree-chkp.c (chkp_find_bounds_1): Support WITH_SIZE_EXPR. * calls.c (initialize_argument_information): Bind bounds with corresponding args passed by reference. 2016-05-10 Jakub Jelinek PR target/70927 * config/i386/sse.md (_andnot3), *3): For !TARGET_AVX512DQ and EVEX encoding, use vp*[dq] instead of v*p[sd] instructions and adjust mode attribute accordingly. 2016-05-10 Bill Schmidt PR target/70963 * config/rs6000/vsx.md (vsx_xvcvdpsxds_scale): Generate correct code for a zero scale factor. (vsx_xvcvdpuxds_scale): Likewise. 2016-05-10 David Malcolm * diagnostic-show-locus.c (layout::layout): Call show_ruler if show_ruler_p was set on the context. (layout::show_ruler): New method. * diagnostic.h (struct diagnostic_context): Add field "show_ruler_p". 2016-05-10 Richard Biener PR tree-optimization/71039 * tree-ssa-phiprop.c: Include tree-ssa-loop.h. (chk_uses): New function. (propagate_with_phi): Verify we can safely replicate the lhs of an aggregate assignment on all incoming edges. 2016-05-10 Oleg Endo * config/rx/rx-protos.h (is_interrupt_func, is_fast_interrupt_func): Forward declare. (rx_atomic_sequence): New class. * config/rx/rx.c (rx_print_operand): Use symbolic names for PSW bits. (is_interrupt_func, is_fast_interrupt_func): Make non-static and non-inline. (rx_atomic_sequence::rx_atomic_sequence, rx_atomic_sequence::~rx_atomic_sequence): New functions. * config/rx/rx.md (CTRLREG_PSW, CTRLREG_USP, CTRLREG_FPSW, CTRLREG_CPEN, CTRLREG_BPSW, CTRLREG_BPC, CTRLREG_ISP, CTRLREG_FINTV, CTRLREG_INTB): New constants. (FETCHOP): New code iterator. (fethcop_name, fetchop_name2): New iterator code attributes. (QIHI): New mode iterator. (atomic_exchange, atomic_exchangesi, xchg_mem, atomic_fetch_si, atomic_fetch_nandsi, atomic__fetchsi, atomic_nand_fetchsi): New patterns. 2016-05-10 Martin Liska * tree-inline.c (remap_dependence_clique): Do not remap debugging statements. 2016-05-10 Andreas Krebbel * config/s390/s390.md ("*vec_cmpdf_cconly") ("*fixuns_truncdfdi2_z13") ("*fixuns_trunc2_z196") ("*fix_truncdfdi2_bfp_z13", "*floatunsdidf2_z13") ("*extendsfdf2_z13"): Replace TARGET_Z13 with TARGET_VX. 2016-05-10 Richard Biener PR tree-optimization/70497 PR tree-optimization/28367 * tree-ssa-sccvn.c (vn_nary_build_or_lookup): New function split out from ... (visit_reference_op_load): ... here. (vn_reference_lookup_3): Use it to handle subreg-like accesses with simplified BIT_FIELD_REFs. * tree-ssa-pre.c (eliminate_insert): Handle inserting BIT_FIELD_REFs. * tree-complex.c (extract_component): Handle BIT_FIELD_REFs correctly. 2016-05-10 Pierre-Marie de Rodat * dwarf2out.c (add_abstract_origin_attribute): Adjust documentation comment. For BLOCK nodes, add a DW_AT_abstract_origin attribute that points to the DIE generated for the origin BLOCK. (gen_lexical_block_die): Call add_abstract_origin_attribute for blocks from inlined functions. 2016-05-10 Alan Modra PR target/70947 * config/rs6000/rs6000.c (rs6000_expand_split_stack_prologue): Stop regrename modifying insns saving lr before __morestack call. * config/rs6000/rs6000.md (split_stack_return): Similarly for insns restoring lr after __morestack call. 2016-05-09 Jakub Jelinek * config/i386/i386.md (set_got, set_got_labelled, lwp_llwpcb, lwp_lwpval3, lwp_lwpins3): Remove constraints from expanders. * config/i386/sse.md (vec_interleave_high, vec_interleave_low, _vpermi2var3_maskz, _vpermt2var3_maskz): Likewise. 2016-05-04 Aaron Sawdey * config/rs6000/rs6000.c (rs6000_reassociation_width): Add function for TARGET_SCHED_REASSOCIATION_WIDTH to enable parallel reassociation for power8 and forward. 2016-05-09 Uros Bizjak * config/i386/i386.md (absneg splitters with general regs): Use general_reg_operand predicate. (btsq peephole2): Use x86_64_immediate_operand to check if new value is suitable for immediate operand. Generate emitted insn using RTL expressions. (btcq peephole2): Ditto. (btrq peephole2): Ditto. Generate correct immediate operand for AND masking. 2016-05-09 Richard Sandiford * cfgexpand.c (expand_debug_expr): Fix address offset for negative bitpos. 2016-05-09 Richard Sandiford * tree-affine.c (wide_int_constant_multiple_p): Add missing pointer dereference. 2016-05-09 Richard Biener PR tree-optimization/70985 * match.pd (BIT_FIELD_REF -> (type)): Disable on GIMPLE when op0 isn't a gimple register. 2016-05-09 Prachi Godbole * config/mips/i6400.md (i6400_fpu_intadd, i6400_fpu_logic) (i6400_fpu_div, i6400_fpu_cmp, i6400_fpu_float, i6400_fpu_store) (i6400_fpu_long_pipe, i6400_fpu_logic_l, i6400_fpu_float_l) (i6400_fpu_mult): New cpu units. (i6400_msa_add_d, i6400_msa_int_add, i6400_msa_short_logic3) (i6400_msa_short_logic2, i6400_msa_short_logic, i6400_msa_move) (i6400_msa_cmp, i6400_msa_short_float2, i6400_msa_div_d) (i6400_msa_div_w, i6400_msa_div_h, i6400_msa_div_b) (i6400_msa_copy, i6400_msa_branch, i6400_fpu_msa_store) (i6400_fpu_msa_load, i6400_fpu_msa_move, i6400_msa_long_logic1) (i6400_msa_long_logic2, i6400_msa_mult, i6400_msa_long_float2) (i6400_msa_long_float4, i6400_msa_long_float5) (i6400_msa_long_float8, i6400_msa_fdiv_df) (i6400_msa_fdiv_sf): New reservations. * config/mips/p5600.md (p5600_fpu_intadd, p5600_fpu_cmp) (p5600_fpu_float, p5600_fpu_logic_a, p5600_fpu_logic_b) (p5600_fpu_div, p5600_fpu_logic, p5600_fpu_float_a) (p5600_fpu_float_b, p5600_fpu_float_c, p5600_fpu_float_d) (p5600_fpu_mult, p5600_fpu_fdiv, p5600_fpu_load): New cpu units. (msa_short_int_add, msa_short_logic, msa_short_logic_move_v) (msa_short_cmp, msa_short_float2, msa_short_logic3) (msa_short_store4, msa_long_load, msa_short_store) (msa_long_logic, msa_long_float2, msa_long_float4) (msa_long_float5, msa_long_float8, msa_long_mult) (msa_long_fdiv, msa_long_div): New reservations. 2016-05-09 Robert Suchanek Sameera Deshpande Matthew Fortune Graham Stott Chao-ying Fu * config.gcc: Add MSA header file for mips*-*-* target. * config/mips/constraints.md (YI, YC, YZ, Unv5, Uuv5, Usv5, Uuv6) (Ubv8i, Urv8): New constraints. * config/mips/mips-ftypes.def: Add function types for MSA builtins. * config/mips/mips-modes.def (V16QI, V8HI, V4SI, V2DI, V4SF) (V2DF, V32QI, V16HI, V8SI, V4DI, V8SF, V4DF): New modes. * config/mips/mips-msa.md: New file. * config/mips/mips-protos.h (mips_split_128bit_const_insns): New prototype. (mips_msa_idiv_insns): Likewise. (mips_split_128bit_move): Likewise. (mips_split_128bit_move_p): Likewise. (mips_split_msa_copy_d): Likewise. (mips_split_msa_insert_d): Likewise. (mips_split_msa_fill_d): Likewise. (mips_expand_msa_branch): Likewise. (mips_const_vector_same_val_p): Likewise. (mips_const_vector_same_bytes_p): Likewise. (mips_const_vector_same_int_p): Likewise. (mips_const_vector_shuffle_set_p): Likewise. (mips_const_vector_bitimm_set_p): Likewise. (mips_const_vector_bitimm_clr_p): Likewise. (mips_msa_vec_parallel_const_half): Likewise. (mips_msa_output_division): Likewise. (mips_ldst_scaled_shift): Likewise. (mips_expand_vec_cond_expr): Likewise. * config/mips/mips.c (enum mips_builtin_type): Add MIPS_BUILTIN_MSA_TEST_BRANCH. (mips_gen_const_int_vector_shuffle): New prototype. (mips_const_vector_bitimm_set_p): New function. (mips_const_vector_bitimm_clr_p): Likewise. (mips_const_vector_same_val_p): Likewise. (mips_const_vector_same_bytes_p): Likewise. (mips_const_vector_same_int_p): Likewise. (mips_const_vector_shuffle_set_p): Likewise. (mips_symbol_insns): Forbid loading symbols via immediate for MSA. (mips_valid_offset_p): Limit offset to 10-bit for MSA loads and stores. (mips_valid_lo_sum_p): Forbid loadings symbols via %lo(base) for MSA. (mips_lx_address_p): Add support load indexed address for MSA. (mips_address_insns): Add calculation of instructions needed for stores and loads for MSA. (mips_const_insns): Move CONST_DOUBLE below CONST_VECTOR. Handle CONST_VECTOR for MSA and let it fall through. (mips_ldst_scaled_shift): New function. (mips_subword_at_byte): Likewise. (mips_msa_idiv_insns): Likewise. (mips_legitimize_move): Validate MSA moves. (mips_rtx_costs): Add UNGE, UNGT, UNLE, UNLT cases. Add calculation of costs for MSA division. (mips_split_move_p): Check if MSA moves need splitting. (mips_split_move): Split MSA moves if necessary. (mips_split_128bit_move_p): New function. (mips_split_128bit_move): Likewise. (mips_split_msa_copy_d): Likewise. (mips_split_msa_insert_d): Likewise. (mips_split_msa_fill_d): Likewise. (mips_output_move): Handle MSA moves. (mips_expand_msa_branch): New function. (mips_print_operand): Add 'E', 'B', 'w', 'v' and 'V' modifiers. Reinstate 'y' modifier. (mips_file_start): Add MSA .gnu_attribute. (mips_hard_regno_mode_ok_p): Allow TImode and 128-bit vectors in FPRs. (mips_hard_regno_nregs): Always return 1 for MSA supported mode. (mips_class_max_nregs): Add register size for MSA supported mode. (mips_cannot_change_mode_class): Allow conversion between MSA vector modes and TImode. (mips_mode_ok_for_mov_fmt_p): Allow MSA to use move.v instruction. (mips_secondary_reload_class): Force MSA loads/stores via memory. (mips_preferred_simd_mode): Add preffered modes for MSA. (mips_vector_mode_supported_p): Add MSA supported modes. (mips_autovectorize_vector_sizes): New function. (mips_msa_output_division): Likewise. (MSA_BUILTIN, MIPS_BUILTIN_DIRECT_NO_TARGET) (MSA_NO_TARGET_BUILTIN, MSA_BUILTIN_TEST_BRANCH): New macros. (CODE_FOR_msa_adds_s_b, CODE_FOR_msa_adds_s_h) (CODE_FOR_msa_adds_s_w, CODE_FOR_msa_adds_s_d) (CODE_FOR_msa_adds_u_b, CODE_FOR_msa_adds_u_h) (CODE_FOR_msa_adds_u_w, CODE_FOR_msa_adds_u_du (CODE_FOR_msa_addv_b, CODE_FOR_msa_addv_h, CODE_FOR_msa_addv_w) (CODE_FOR_msa_addv_d, CODE_FOR_msa_and_v, CODE_FOR_msa_bmnz_v) (CODE_FOR_msa_bmnzi_b, CODE_FOR_msa_bmz_v, CODE_FOR_msa_bmzi_b) (CODE_FOR_msa_bnz_v, CODE_FOR_msa_bz_v, CODE_FOR_msa_bsel_v) (CODE_FOR_msa_bseli_b, CODE_FOR_msa_ceqi_h, CODE_FOR_msa_ceqi_w) (CODE_FOR_msa_ceqi_d, CODE_FOR_msa_clti_s_b) (CODE_FOR_msa_clti_s_h, CODE_FOR_msa_clti_s_w) (CODE_FOR_msa_clti_s_d, CODE_FOR_msa_clti_u_b) (CODE_FOR_msa_clti_u_h, CODE_FOR_msa_clti_u_w) (CODE_FOR_msa_clti_u_d, CODE_FOR_msa_clei_s_b) (CODE_FOR_msa_clei_s_h, CODE_FOR_msa_clei_s_w) (CODE_FOR_msa_clei_s_d, CODE_FOR_msa_clei_u_b) (CODE_FOR_msa_clei_u_h, CODE_FOR_msa_clei_u_w) (CODE_FOR_msa_clei_u_d, CODE_FOR_msa_div_s_b) (CODE_FOR_msa_div_s_h, CODE_FOR_msa_div_s_w) (CODE_FOR_msa_div_s_d, CODE_FOR_msa_div_u_b) (CODE_FOR_msa_div_u_h, CODE_FOR_msa_div_u_w) (CODE_FOR_msa_div_u_d, CODE_FOR_msa_fadd_w, CODE_FOR_msa_fadd_d) (CODE_FOR_msa_fexdo_w, CODE_FOR_msa_ftrunc_s_w) (CODE_FOR_msa_ftrunc_s_d, CODE_FOR_msa_ftrunc_u_w) (CODE_FOR_msa_ftrunc_u_d, CODE_FOR_msa_ffint_s_w) (CODE_FOR_msa_ffint_s_d, CODE_FOR_msa_ffint_u_w) (CODE_FOR_msa_ffint_u_d, CODE_FOR_msa_fsub_w) (CODE_FOR_msa_fsub_d, CODE_FOR_msa_fmsub_d, CODE_FOR_msa_fmadd_w) (CODE_FOR_msa_fmadd_d, CODE_FOR_msa_fmsub_w, CODE_FOR_msa_fmul_w) (CODE_FOR_msa_fmul_d, CODE_FOR_msa_fdiv_w, CODE_FOR_msa_fdiv_d) (CODE_FOR_msa_fmax_w, CODE_FOR_msa_fmax_d, CODE_FOR_msa_fmax_a_w) (CODE_FOR_msa_fmax_a_d, CODE_FOR_msa_fmin_w, CODE_FOR_msa_fmin_d) (CODE_FOR_msa_fmin_a_w, CODE_FOR_msa_fmin_a_d) (CODE_FOR_msa_fsqrt_w, CODE_FOR_msa_fsqrt_d) (CODE_FOR_msa_max_s_b, CODE_FOR_msa_max_s_h) (CODE_FOR_msa_max_s_w, CODE_FOR_msa_max_s_d) (CODE_FOR_msa_max_u_b, CODE_FOR_msa_max_u_h) (CODE_FOR_msa_max_u_w, CODE_FOR_msa_max_u_d) (CODE_FOR_msa_min_s_b, CODE_FOR_msa_min_s_h) (CODE_FOR_msa_min_s_w, CODE_FOR_msa_min_s_d) (CODE_FOR_msa_min_u_b, CODE_FOR_msa_min_u_h) (CODE_FOR_msa_min_u_w, CODE_FOR_msa_min_u_d) (CODE_FOR_msa_mod_s_b, CODE_FOR_msa_mod_s_h) (CODE_FOR_msa_mod_s_w, CODE_FOR_msa_mod_s_d) (CODE_FOR_msa_mod_u_b, CODE_FOR_msa_mod_u_h) (CODE_FOR_msa_mod_u_w, CODE_FOR_msa_mod_u_d) (CODE_FOR_msa_mod_s_b, CODE_FOR_msa_mod_s_h) (CODE_FOR_msa_mod_s_w, CODE_FOR_msa_mod_s_d) (CODE_FOR_msa_mod_u_b, CODE_FOR_msa_mod_u_h) (CODE_FOR_msa_mod_u_w, CODE_FOR_msa_mod_u_d) (CODE_FOR_msa_mulv_b, CODE_FOR_msa_mulv_h, CODE_FOR_msa_mulv_w) (CODE_FOR_msa_mulv_d, CODE_FOR_msa_nlzc_b, CODE_FOR_msa_nlzc_h) (CODE_FOR_msa_nlzc_w, CODE_FOR_msa_nlzc_d, CODE_FOR_msa_nor_v) (CODE_FOR_msa_or_v, CODE_FOR_msa_ori_b, CODE_FOR_msa_nori_b) (CODE_FOR_msa_pcnt_b, CODE_FOR_msa_pcnt_h, CODE_FOR_msa_pcnt_w) (CODE_FOR_msa_pcnt_d, CODE_FOR_msa_xor_v, CODE_FOR_msa_xori_b) (CODE_FOR_msa_sll_b, CODE_FOR_msa_sll_h, CODE_FOR_msa_sll_w) (CODE_FOR_msa_sll_d, CODE_FOR_msa_slli_b, CODE_FOR_msa_slli_h) (CODE_FOR_msa_slli_w, CODE_FOR_msa_slli_d, CODE_FOR_msa_sra_b) (CODE_FOR_msa_sra_h, CODE_FOR_msa_sra_w, CODE_FOR_msa_sra_d) (CODE_FOR_msa_srai_b, CODE_FOR_msa_srai_h, CODE_FOR_msa_srai_w) (CODE_FOR_msa_srai_d, CODE_FOR_msa_srl_b, CODE_FOR_msa_srl_h) (CODE_FOR_msa_srl_w, CODE_FOR_msa_srl_d, CODE_FOR_msa_srli_b) (CODE_FOR_msa_srli_h, CODE_FOR_msa_srli_w, CODE_FOR_msa_srli_d) (CODE_FOR_msa_subv_b, CODE_FOR_msa_subv_h, CODE_FOR_msa_subv_w) (CODE_FOR_msa_subv_d, CODE_FOR_msa_subvi_b, CODE_FOR_msa_subvi_h) (CODE_FOR_msa_subvi_w, CODE_FOR_msa_subvi_d, CODE_FOR_msa_move_v) (CODE_FOR_msa_vshf_b, CODE_FOR_msa_vshf_h, CODE_FOR_msa_vshf_w) (CODE_FOR_msa_vshf_d, CODE_FOR_msa_ilvod_d, CODE_FOR_msa_ilvev_d) (CODE_FOR_msa_pckod_d, CODE_FOR_msa_pckdev_d, CODE_FOR_msa_ldi_b) (CODE_FOR_msa_ldi_hi, CODE_FOR_msa_ldi_w) (CODE_FOR_msa_ldi_d): New code_aliasing macros. (mips_builtins): Add MSA sll_b, sll_h, sll_w, sll_d, slli_b, slli_h, slli_w, slli_d, sra_b, sra_h, sra_w, sra_d, srai_b, srai_h, srai_w, srai_d, srar_b, srar_h, srar_w, srar_d, srari_b, srari_h, srari_w, srari_d, srl_b, srl_h, srl_w, srl_d, srli_b, srli_h, srli_w, srli_d, srlr_b, srlr_h, srlr_w, srlr_d, srlri_b, srlri_h, srlri_w, srlri_d, bclr_b, bclr_h, bclr_w, bclr_d, bclri_b, bclri_h, bclri_w, bclri_d, bset_b, bset_h, bset_w, bset_d, bseti_b, bseti_h, bseti_w, bseti_d, bneg_b, bneg_h, bneg_w, bneg_d, bnegi_b, bnegi_h, bnegi_w, bnegi_d, binsl_b, binsl_h, binsl_w, binsl_d, binsli_b, binsli_h, binsli_w, binsli_d, binsr_b, binsr_h, binsr_w, binsr_d, binsri_b, binsri_h, binsri_w, binsri_d, addv_b, addv_h, addv_w, addv_d, addvi_b, addvi_h, addvi_w, addvi_d, subv_b, subv_h, subv_w, subv_d, subvi_b, subvi_h, subvi_w, subvi_d, max_s_b, max_s_h, max_s_w, max_s_d, maxi_s_b, maxi_s_h, maxi_s_w, maxi_s_d, max_u_b, max_u_h, max_u_w, max_u_d, maxi_u_b, maxi_u_h, maxi_u_w, maxi_u_d, min_s_b, min_s_h, min_s_w, min_s_d, mini_s_b, mini_s_h, mini_s_w, mini_s_d, min_u_b, min_u_h, min_u_w, min_u_d, mini_u_b, mini_u_h, mini_u_w, mini_u_d, max_a_b, max_a_h, max_a_w, max_a_d, min_a_b, min_a_h, min_a_w, min_a_d, ceq_b, ceq_h, ceq_w, ceq_d, ceqi_b, ceqi_h, ceqi_w, ceqi_d, clt_s_b, clt_s_h, clt_s_w, clt_s_d, clti_s_b, clti_s_h, clti_s_w, clti_s_d, clt_u_b, clt_u_h, clt_u_w, clt_u_d, clti_u_b, clti_u_h, clti_u_w, clti_u_d, cle_s_b, cle_s_h, cle_s_w, cle_s_d, clei_s_b, clei_s_h, clei_s_w, clei_s_d, cle_u_b, cle_u_h, cle_u_w, cle_u_d, clei_u_b, clei_u_h, clei_u_w, clei_u_d, ld_b, ld_h, ld_w, ld_d, st_b, st_h, st_w, st_d, sat_s_b, sat_s_h, sat_s_w, sat_s_d, sat_u_b, sat_u_h, sat_u_w, sat_u_d, add_a_b, add_a_h, add_a_w, add_a_d, adds_a_b, adds_a_h, adds_a_w, adds_a_d, adds_s_b, adds_s_h, adds_s_w, adds_s_d, adds_u_b, adds_u_h, adds_u_w, adds_u_d, ave_s_b, ave_s_h, ave_s_w, ave_s_d, ave_u_b, ave_u_h, ave_u_w, ave_u_d, aver_s_b, aver_s_h, aver_s_w, aver_s_d, aver_u_b, aver_u_h, aver_u_w, aver_u_d, subs_s_b, subs_s_h, subs_s_w, subs_s_d, subs_u_b, subs_u_h, subs_u_w, subs_u_d, subsuu_s_b, subsuu_s_h, subsuu_s_w, subsuu_s_d, subsus_u_b, subsus_u_h, subsus_u_w, subsus_u_d, asub_s_b, asub_s_h, asub_s_w, asub_s_d, asub_u_b, asub_u_h, asub_u_w, asub_u_d, mulv_b, mulv_h, mulv_w, mulv_d, maddv_b, maddv_h, maddv_w, maddv_d, msubv_b, msubv_h, msubv_w, msubv_d, div_s_b, div_s_h, div_s_w, div_s_d, div_u_b, div_u_h, div_u_w, div_u_d, hadd_s_h, hadd_s_w, hadd_s_d, hadd_u_h, hadd_u_w, hadd_u_d, hsub_s_h, hsub_s_w, hsub_s_d, hsub_u_h, hsub_u_w, hsub_u_d, mod_s_b, mod_s_h, mod_s_w, mod_s_d, mod_u_b, mod_u_h, mod_u_w, mod_u_d, dotp_s_h, dotp_s_w, dotp_s_d, dotp_u_h, dotp_u_w, dotp_u_d, dpadd_s_h, dpadd_s_w, dpadd_s_d, dpadd_u_h, dpadd_u_w, dpadd_u_d, dpsub_s_h, dpsub_s_w, dpsub_s_d, dpsub_u_h, dpsub_u_w, dpsub_u_d, sld_b, sld_h, sld_w, sld_d, sldi_b, sldi_h, sldi_w, sldi_d, splat_b, splat_h, splat_w, splat_d, splati_b, splati_h, splati_w, splati_d, pckev_b, pckev_h, pckev_w, pckev_d, pckod_b, pckod_h, pckod_w, pckod_d, ilvl_b, ilvl_h, ilvl_w, ilvl_d, ilvr_b, ilvr_h, ilvr_w, ilvr_d, ilvev_b, ilvev_h, ilvev_w, ilvev_d, ilvod_b, ilvod_h, ilvod_w, ilvod_d, vshf_b, vshf_h, vshf_w, vshf_d, and_v, andi_b, or_v, ori_b, nor_v, nori_b, xor_v, xori_b, bmnz_v, bmnzi_b, bmz_v, bmzi_b, bsel_v, bseli_b, shf_b, shf_h, shf_w, bnz_v, bz_v, fill_b, fill_h, fill_w, fill_d, pcnt_b, pcnt_h, pcnt_w, pcnt_d, nloc_b, nloc_h, nloc_w, nloc_d, nlzc_b, nlzc_h, nlzc_w, nlzc_d, copy_s_b, copy_s_h, copy_s_w, copy_s_d, copy_u_b, copy_u_h, copy_u_w, copy_u_d, insert_b, insert_h, insert_w, insert_d, insve_b, insve_h, insve_w, insve_d, bnz_b, bnz_h, bnz_w, bnz_d, bz_b, bz_h, bz_w, bz_d, ldi_b, ldi_h, ldi_w, ldi_d, fcaf_w, fcaf_d, fcor_w, fcor_d, fcun_w, fcun_d, fcune_w, fcune_d, fcueq_w, fcueq_d, fceq_w, fceq_d, fcne_w, fcne_d, fclt_w, fclt_d, fcult_w, fcult_d, fcle_w, fcle_d, fcule_w, fcule_d, fsaf_w, fsaf_d, fsor_w, fsor_d, fsun_w, fsun_d, fsune_w, fsune_d, fsueq_w, fsueq_d, fseq_w, fseq_d, fsne_w, fsne_d, fslt_w, fslt_d, fsult_w, fsult_d, fsle_w, fsle_d, fsule_w, fsule_d, fadd_w, fadd_d, fsub_w, fsub_d, fmul_w, fmul_d, fdiv_w, fdiv_d, fmadd_w, fmadd_d, fmsub_w, fmsub_d, fexp2_w, fexp2_d, fexdo_h, fexdo_w, ftq_h, ftq_w, fmin_w, fmin_d, fmin_a_w, fmin_a_d, fmax_w, fmax_d, fmax_a_w, fmax_a_d, mul_q_h, mul_q_w, mulr_q_h, mulr_q_w, madd_q_h, madd_q_w, maddr_q_h, maddr_q_w, msub_q_h, msub_q_w, msubr_q_h, msubr_q_w, fclass_w, fclass_d, fsqrt_w, fsqrt_d, frcp_w, frcp_d, frint_w, frint_d, frsqrt_w, frsqrt_d, flog2_w, flog2_d, fexupl_w, fexupl_d, fexupr_w, fexupr_d, ffql_w, ffql_d, ffqr_w, ffqr_d, ftint_s_w, ftint_s_d, ftint_u_w, ftint_u_d, ftrunc_s_w, ftrunc_s_d, ftrunc_u_w, ftrunc_u_d, ffint_s_w, ffint_s_d, ffint_u_w, ffint_u_d, ctcmsa, cfcmsa, move_v builtins. (mips_get_builtin_decl_index): New array. (MIPS_ATYPE_QI, MIPS_ATYPE_HI, MIPS_ATYPE_V2DI, MIPS_ATYPE_V4SI) (MIPS_ATYPE_V8HI, MIPS_ATYPE_V16QI, MIPS_ATYPE_V2DF) (MIPS_ATYPE_V4SF, MIPS_ATYPE_UV2DI, MIPS_ATYPE_UV4SI) (MIPS_ATYPE_UV8HI, MIPS_ATYPE_UV16QI): New. (mips_init_builtins): Initialize mips_get_builtin_decl_index array. (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Define target hook. (mips_expand_builtin_insn): Prepare operands for CODE_FOR_msa_addvi_b, CODE_FOR_msa_addvi_h, CODE_FOR_msa_addvi_w, CODE_FOR_msa_addvi_d, CODE_FOR_msa_clti_u_b, CODE_FOR_msa_clti_u_h, CODE_FOR_msa_clti_u_w, CODE_FOR_msa_clti_u_d, CODE_FOR_msa_clei_u_b, CODE_FOR_msa_clei_u_h, CODE_FOR_msa_clei_u_w, CODE_FOR_msa_clei_u_d, CODE_FOR_msa_maxi_u_b, CODE_FOR_msa_maxi_u_h, CODE_FOR_msa_maxi_u_w, CODE_FOR_msa_maxi_u_d, CODE_FOR_msa_mini_u_b, CODE_FOR_msa_mini_u_h, CODE_FOR_msa_mini_u_w, CODE_FOR_msa_mini_u_d, CODE_FOR_msa_subvi_b, CODE_FOR_msa_subvi_h, CODE_FOR_msa_subvi_w, CODE_FOR_msa_subvi_d, CODE_FOR_msa_ceqi_b, CODE_FOR_msa_ceqi_h, CODE_FOR_msa_ceqi_w, CODE_FOR_msa_ceqi_d, CODE_FOR_msa_clti_s_b, CODE_FOR_msa_clti_s_h, CODE_FOR_msa_clti_s_w, CODE_FOR_msa_clti_s_d, CODE_FOR_msa_clei_s_b, CODE_FOR_msa_clei_s_h, CODE_FOR_msa_clei_s_w, CODE_FOR_msa_clei_s_d, CODE_FOR_msa_maxi_s_b, CODE_FOR_msa_maxi_s_h, CODE_FOR_msa_maxi_s_w, CODE_FOR_msa_maxi_s_d, CODE_FOR_msa_mini_s_b, CODE_FOR_msa_mini_s_h, CODE_FOR_msa_mini_s_w, CODE_FOR_msa_mini_s_d, CODE_FOR_msa_andi_b, CODE_FOR_msa_ori_b, CODE_FOR_msa_nori_b, CODE_FOR_msa_xori_b, CODE_FOR_msa_bmzi_b, CODE_FOR_msa_bmnzi_b, CODE_FOR_msa_bseli_b, CODE_FOR_msa_fill_b, CODE_FOR_msa_fill_h, CODE_FOR_msa_fill_w, CODE_FOR_msa_fill_d, CODE_FOR_msa_ilvl_b, CODE_FOR_msa_ilvl_h, CODE_FOR_msa_ilvl_w, CODE_FOR_msa_ilvl_d, CODE_FOR_msa_ilvr_b, CODE_FOR_msa_ilvr_h, CODE_FOR_msa_ilvr_w, CODE_FOR_msa_ilvr_d, CODE_FOR_msa_ilvev_b, CODE_FOR_msa_ilvev_h, CODE_FOR_msa_ilvev_w, CODE_FOR_msa_ilvod_b, CODE_FOR_msa_ilvod_h, CODE_FOR_msa_ilvod_w, CODE_FOR_msa_pckev_b, CODE_FOR_msa_pckev_h, CODE_FOR_msa_pckev_w, CODE_FOR_msa_pckod_b, CODE_FOR_msa_pckod_h, CODE_FOR_msa_pckod_w, CODE_FOR_msa_slli_b, CODE_FOR_msa_slli_h, CODE_FOR_msa_slli_w, CODE_FOR_msa_slli_d, CODE_FOR_msa_srai_b, CODE_FOR_msa_srai_h, CODE_FOR_msa_srai_w, CODE_FOR_msa_srai_d, CODE_FOR_msa_srli_b, CODE_FOR_msa_srli_h, CODE_FOR_msa_srli_w, CODE_FOR_msa_srli_d, CODE_FOR_msa_insert_b, CODE_FOR_msa_insert_h, CODE_FOR_msa_insert_w, CODE_FOR_msa_insert_d, CODE_FOR_msa_insve_b, CODE_FOR_msa_insve_h, CODE_FOR_msa_insve_w, CODE_FOR_msa_insve_d, CODE_FOR_msa_shf_b, CODE_FOR_msa_shf_h, CODE_FOR_msa_shf_w, CODE_FOR_msa_shf_w_f, CODE_FOR_msa_vshf_b, CODE_FOR_msa_vshf_h, CODE_FOR_msa_vshf_w, CODE_FOR_msa_vshf_d. (mips_expand_builtin): Add case for MIPS_BULTIN_MSA_TEST_BRANCH. (mips_set_compression_mode): Disallow MSA with MIPS16 code. (mips_option_override): -mmsa requires -mfp64 and -mhard-float. These are set implicitly and an error is reported if overridden. (mips_expand_builtin_msa_test_branch): New function. (mips_expand_msa_shuffle): Likewise. (MAX_VECT_LEN): Increase maximum length of a vector to 16 bytes. (TARGET_SCHED_REASSOCIATION_WIDTH): Define target hook. (TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_SIZES): Likewise. (mips_expand_vec_unpack): Add support for MSA. (mips_expand_vector_init): Likewise. (mips_expand_vi_constant): Use CONST0_RTX (element_mode) instead of const0_rtx. (mips_msa_vec_parallel_const_half): New function. (mips_gen_const_int_vector): Likewise. (mips_gen_const_int_vector_shuffle): Likewise. (mips_expand_msa_cmp): Likewise. (mips_expand_vec_cond_expr): Likewise. * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add __mips_msa and __mips_msa_width. (OPTION_DEFAULT_SPECS): Ignore --with-fp-32 if -mmsa is specified. (ASM_SPEC): Pass mmsa and mno-msa to the assembler. (ISA_HAS_MSA): New macro. (UNITS_PER_MSA_REG): Likewise. (BITS_PER_MSA_REG): Likewise. (BIGGEST_ALIGNMENT): Redefine using ISA_HAS_MSA. (MSA_REG_FIRST): New macro. (MSA_REG_LAST): Likewise. (MSA_REG_NUM): Likewise. (MSA_REG_P): Likewise. (MSA_REG_RTX_P): Likewise. (MSA_SUPPORTED_MODE_P): Likewise. (HARD_REGNO_CALL_PART_CLOBBERED): Redefine using TARGET_MSA. (ADDITIONAL_REGISTER_NAMES): Add named registers $w0-$w31. * config/mips/mips.md: Include mips-msa.md. (alu_type): Add simd_add. (mode): Add V2DI, V4SI, V8HI, V16QI, V2DF, V4SF. (type): Add simd_div, simd_fclass, simd_flog2, simd_fadd, simd_fcvt, simd_fmul, simd_fmadd, simd_fdiv, simd_bitins, simd_bitmov, simd_insert, simd_sld, simd_mul, simd_fcmp, simd_fexp2, simd_int_arith, simd_bit, simd_shift, simd_splat, simd_fill, simd_permute, simd_shf, simd_sat, simd_pcnt, simd_copy, simd_branch, simd_cmsa, simd_fminmax, simd_logic, simd_move, simd_load, simd_store. Choose "multi" for moves for "qword_mode". (qword_mode): New attribute. (insn_count): Add instruction count for quad moves. Increase the count for MIPS SIMD division. (UNITMODE): Add UNITMODEs for vector types. (addsub): New code iterator. * config/mips/mips.opt (mmsa): New option. * config/mips/msa.h: New file. * config/mips/mti-elf.h: Don't infer -mfpxx if -mmsa is specified. * config/mips/mti-linux.h: Likewise. * config/mips/predicates.md (const_msa_branch_operand): New constraint. (const_uimm3_operand): Likewise. (const_uimm4_operand): Likewise. (const_uimm5_operand): Likewise. (const_uimm8_operand): Likewise. (const_imm5_operand): Likewise. (aq10b_operand): Likewise. (aq10h_operand): Likewise. (aq10w_operand): Likewise. (aq10d_operand): Likewise. (const_m1_operand): Likewise. (reg_or_m1_operand): Likewise. (const_exp_2_operand): Likewise. (const_exp_4_operand): Likewise. (const_exp_8_operand): Likewise. (const_exp_16_operand): Likewise. (const_vector_same_val_operand): Likewise. (const_vector_same_simm5_operand): Likewise. (const_vector_same_uimm5_operand): Likewise. (const_vector_same_uimm6_operand): Likewise. (const_vector_same_uimm8_operand): Likewise. (par_const_vector_shf_set_operand): Likewise. (reg_or_vector_same_val_operand): Likewise. (reg_or_vector_same_simm5_operand): Likewise. (reg_or_vector_same_uimm6_operand): Likewise. * doc/extend.texi (MIPS SIMD Architecture Functions): New section. * doc/invoke.texi (-mmsa): Document new option. 2016-05-09 Rainer Orth * configure.ac (enable_vtable_verify): Handle --enable-vtable-verify. * configure: Regenerate. * config.in: Regenerate. * gcc.c (VTABLE_VERIFICATION_SPEC) [!ENABLE_VTABLE_VERIFY]: Error on -fvtable-verify. * config/sol2.h [!ENABLE_VTABLE_VERIFY] (STARTFILE_VTV_SPEC): Define. (ENDFILE_VTV_SPEC): Define. 2016-05-09 Kaushik Phatak * config/rl78/rl78.c (rl78_expand_prologue): Save the MDUC related registers in all interrupt handlers if necessary. (rl78_option_override): Add warning. (MUST_SAVE_MDUC_REGISTERS): New macro. (rl78_expand_epilogue): Restore the MDUC registers if necessary. * config/rl78/rl78.c (check_mduc_usage): New function. (mduc_regs): New structure to hold MDUC register data. * config/rl78/rl78.md (is_g13_muldiv_insn): New attribute. (mulsi3_g13): Add is_g13_muldiv_insn attribute. (udivmodsi4_g13): Add is_g13_muldiv_insn attribute. (mulhi3_g13): Add is_g13_muldiv_insn attribute. * config/rl78/rl78.opt (msave-mduc-in-interrupts): New option. * doc/invoke.texi (RL78 Options): Add -msave-mduc-in-interrupts. 2016-05-09 Bin Cheng * tree-if-conv.c (tree-ssa-loop.h): Include header file. (tree-ssa-loop-niter.h): Ditto. (idx_within_array_bound, ref_within_array_bound): New functions. (ifcvt_memrefs_wont_trap): Check if array ref is within bound. Factor out check on writable base object to ... (base_object_writable): ... here. 2016-05-09 Kyrylo Tkachov * config/arm/arm.md (probe_stack): Add modes to set source and destination. 2016-05-09 Bernd Schmidt * regrename.c (base_reg_class_for_rename): New static function. (scan_rtx_address, scan_rtx): Use it instead of base_reg_class. 2016-05-08 Jan Hubicka * cgraph.c (thunk_adjust): Export. * cgraphclones.c (cgraph_node::create_clone): Clone thunk info. * cgraphunit.c (thunk_adjust): Export. (cgraph_node::assemble_thunks_and_aliases): Do not assemble inlined thunks. * ipa-inline-analyssi.c (compute_inline_parameters): Thunks are inlinable. * tree-inline.c (expand_call_inline): Expand thunks inline. 2016-05-08 Uros Bizjak PR target/70998 * config/i386/sse.md (*sse2_vd_cvtsd2ss): New insn pattern. (*sse2_vd_cvtss2sd): Ditto. * config/i386/i386.md (TARGET_SSE_PARTIAL_REG_DEPENDENCY float_truncate df->sf splitter): Generate *sse2_vd_cvtsd2ss pattern. (TARGET_SSE_PARTIAL_REG_DEPENDENCY float_extend sf->df splitter): Generate *sse2_vd_cvtss2sd pattern. 2016-05-08 Oleg Endo * config/sh/sh.h (GET_SH_ARG_CLASS): Convert macro into ... * config/sh/sh.c (get_sh_arg_class): ... this new function. Update its users. 2016-05-08 Oleg Endo * config/sh/sh-protos.h (sh_media_register_for_return): Remove. * config/sh/sh.c: Define and declare variables on first use throughout the file. (current_function_interrupt): Change to bool type. (frame_insn): Rename to emit_frame_insn and update users. (push_regs): Use bool for 'interrupt_handler' argument. (save_schedule_s): Remove. (TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_ALIGNED_DI_OP): Remove. (sh_option_override): Don't nullify targetm.asm_out.aligned_op.di and targetm.asm_out.unaligned_op.di. (gen_far_branch): Remove redundant forward declaration. (sh_media_register_for_return, MAX_SAVED_REGS, save_entry_s, save_entry, MAX_TEMPS, save_schedule_ssave_schedule): Remove. (sh_set_return_address, sh_function_ok_for_sibcall, scavenge_reg): Update comments. (sh_builtin_saveregs): Use TRAGET_FPU_ANY condition. (sh2a_get_function_vector_number, sh2a_function_vector_p): Use for loop. (sh_attr_renesas_p): Remove unnecessary parentheses. (branch_dest): Simplify. * config/sh/sh.h (sh_args): Remove byref, byref_regs, stack_regs fields. Change force_mem, prototype_p, outgoing, renesas_abi fields to bool. (CUMULATIVE_ARGS): Change macro to typedef. (current_function_interrupt): Change to bool type. (sh_arg_class, sh_args, CUMULATIVE_ARGS, current_function_interrupt): Surround with __cplusplus ifdef. (sh_compare_op0, sh_compare_op1): Remove. (EPILOGUE_USES): Use TARGET_FPU_ANY condition. 2016-05-07 Jim Wilson * config/arm/arm.md (arch): Add neon. (arch_enabled): Return yes for arch neon when TARGET_NEON. * config/arm/vfp.md (movdf_vfp): Add w/G as alternative 3. Add neon_move as type for alt 3. Add arch attr enabling alt 3 for neon. Emit vmov.i64 for alt 3. Renumber alternatives 3 to 8. Adjust attributes for alt renumbering. Mark alt 3 as non-predicable. (thumb2_movdf_vfp): Likewise. 2016-05-07 Uros Bizjak * config/i386/i386.md (*addqi_1): Add preferred_for_speed attribute to disparage alternatives 3 and 4 for TARGET_PARTIAL_REG_STALL targets. (*andqi_1): Add preferred_for_speed attribute to disparage alternative 2 for TARGET_PARTIAL_REG_STALL targets. (*qi_1): Ditto. (*one_cmplqi2_1): Add preferred_for_speed attribute to disparage alternative 1 for TARGET_PARTIAL_REG_STALL targets. (*ashlqi3_1): Ditto. (*swap): Merge from *swap_1 and *swap_2 patterns. Add preferred_for_size attribute to disparage alternative 0 and preferred_for_speed attribute to disparage alternative 1 for TARGET_PARTIAL_REG_STALL targets. 2016-05-07 Tom de Vries PR tree-optimization/70956 * graphite-scop-detection.c (build_cross_bb_scalars_def): Handle NULL def. 2016-05-07 Oleg Endo * config/sh/sh-protos.h (sh_cbranch_distance): Declare new function. * config/sh/sh.c (sh_cbranch_distance): Implement it. * config/sh/sh.md (branch_zero): Remove define_attr. (define_delay): Disable delay slot if branch distance is one insn. 2016-05-06 Uros Bizjak * config/i386/i386.md (LEAMODE): New mode attribute. (plus to LEA splitter): Rewrite splitter using LEAMODE mode attribute. (ashift to LEA splitter): Rewrte splitter using SWI mode iterator and LEAMODE mode attribute. Use VOIDmode const_0_to_3_operand as operand 2 predicate. (*lea_general_2): Use VOIDmode for const248_operand. (*lea_general_3): Ditto. (*lea_general_4): Use VOIDmode for const_0_to_3_operand. 2016-05-06 Jakub Jelinek * genmddump.c (main): Convert argv from char ** to const char **. 2016-05-06 David Malcolm * coretypes.h (OVERRIDE): New macro. (FINAL): New macro. 2016-05-06 Eric Botcazou * tree-ssa-coalesce.c (gimple_can_coalesce_p): In the optimized case, allow coalescing if the types are compatible. 2016-05-06 David Malcolm * pass_manager.h (pass_manager::register_pass_name): New method. (pass_manager::get_pass_by_name): New method. (pass_manager::create_pass_tab): New method. (pass_manager::m_name_to_pass_map): New field. * passes.c (name_to_pass_map): Delete global in favor of field "m_name_to_pass_map" of pass_manager. (register_pass_name): Rename from a function to... (pass_manager::register_pass_name): ...this method, updating for renaming of global "name_to_pass_map" to field "m_name_to_pass_map". (create_pass_tab): Rename from a function to... (pass_manager::create_pass_tab): ...this method, updating for renaming of global "name_to_pass_map" to field. (get_pass_by_name): Rename from a function to... (pass_manager::get_pass_by_name): ...this method. (enable_disable_pass): Convert use of get_pass_by_name to a method call, locating the pass_manager singleton. 2016-05-06 David Malcolm * genattr-common.c (main): Convert argv from char ** to const char **. * genattr.c (main): Likewise. * genattrtab.c (main): Likewise. * genautomata.c (initiate_automaton_gen): Likewise. (main): Likewise. * gencodes.c (main): Likewise. * genconditions.c (main): Likewise. * genconfig.c (main): Likewise. * genconstants.c (main): Likewise. * genemit.c (main): Likewise. * genenums.c (main): Likewise. * genextract.c (main): Likewise. * genflags.c (main): Likewise. * genmddeps.c (main): Likewise. * genopinit.c (main): Likewise. * genoutput.c (main): Likewise. * genpeep.c (main): Likewise. * genpreds.c (main): Likewise. * genrecog.c (main): Likewise. * gensupport.c (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args): Likewise. * gensupport.h (init_rtx_reader_args_cb): Likewise. (init_rtx_reader_args): Likewise. * gentarget-def.c (main): Likewise. * read-md.c (read_md_files): Likewise. * read-md.h (read_md_files): Likewise. 2016-05-06 Uros Bizjak * config/i386/i386.md (int cmove peephole2s): Use general_reg_operand instead of register_and_not_any_fp_reg_operand as operand 0 predicate. * config/i386/predicates.md (register_and_not_any_fp_reg_operand): Remove unused predicate. (register_and_not_fp_reg_operand): Ditto. 2016-05-06 Martin Liska * tree-if-conv.c (ifcvt_split_critical_edges): Use auto_vec instead of vec as the vector is local to the function. 2016-05-06 Jakub Jelinek * config/i386/sse.md (*v8hi3, *v16qi3): Add avx512bw alternative. * config/i386/sse.md (ashr3): Move before the ashr3 pattern. * config/i386/sse.md (*avx2_pmaddwd, *sse2_pmaddwd): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (*vec_extractv4sf_0, *sse4_1_extractps, *vec_extractv4sf_mem, vec_extract_lo_v16hi, vec_extract_hi_v16hi, vec_extract_lo_v32qi, vec_extract_hi_v32qi): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (*vec_concatv2sf_sse4_1, *vec_concatv4sf): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (sse_shufps_, sse_storehps, sse_loadhps, sse_storelps, sse_movss, avx2_vec_dup, avx2_vec_dupv8sf_1, sse2_shufpd_, sse2_storehpd, sse2_storelpd, sse2_loadhpd, sse2_loadlpd, sse2_movsd): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (vec_interleave_lowv4sf, *vec_interleave_highv2df, *vec_interleave_lowv2df): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (sse_movhlps, sse_movlhps): Use v instead of x in vex or maybe_vex alternatives, use maybe_evex instead of vex in prefix. * config/i386/sse.md (*avx_cvtpd2dq256_2, *avx_cvtps2pd256_2): Use v constraint instead of x. 2016-05-06 Nathan Sidwell * gimple.c (gimple_call_same_target_p): Unique functions are eq. * tree-ssa-tail-merge.c (same_succ::equal): Check pointer eq equality first. 2016-05-06 Richard Biener PR tree-optimization/70948 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Properly clobber all fields of va_list for __builtin_va_start. 2016-05-06 Yuri Rumyantsev PR debug/70935 * tree-ssa-loop-unswitch.c (find_loop_guard): Reject guard edge with loop latch destination. 2016-05-06 Martin Liska * tree-ssa-uninit.c: Apply manual changes to the GNU coding style. (prune_uninit_phi_opnds): Rename from prune_uninit_phi_opnds_in_unrealizable_paths. 2016-05-06 Oleg Endo * config/sh/sh.opt (madjust-unroll, minvalid-symbols, msoft-atomic, mspace): Remove deprecated options. * doc/invoke.texi (SH options): Remove -mspace. 2016-05-06 Oleg Endo * config/sh/sh.md (ic_invalidate_line_sh4a): Fix insn length. 2016-05-06 Oleg Endo * config/sh/sh.md (*cmpeqsi_t): Remove combine insn pattern and similar corresponding combine split pattern. 2016-05-06 Oleg Endo PR target/58219 * config/sh/predicates.md (long_displacement_mem_operand): New. * config/sh/sh.md (movsi_i): Allow for SH2A, disallow for any FPU. Add movi20, movi20s alternatives. Adjust length attribute for alternatives. (movsi_ie): Allow for any FPU. Adjust length attribute for alternatives. (movsi_i_lowpart): Add movi20, movi20s alternatives. Adjust length attribute for alternatives. (*mov): Use long_displacement_mem_operand for length attribute. (*movdi_i, movdf_k, movdf_i4, movsf_i, movsf_ie, movsf_ie_ra): Adjust length attribute for alternatives. 2016-05-06 Richard Biener PR tree-optimization/70960 * tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops. 2016-05-06 Oleg Endo PR target/52933 * config/sh/sh.md (*cmp_div0s_7, *cmp_div0s_8): Add div0s variants. * config/sh/sh.c (sh_rtx_costs): Add another div0s case. 2016-05-06 Marek Polacek PR sanitizer/70875 * ubsan.c (get_ubsan_type_info_for_type): Remove assert. 2016-05-06 Oleg Endo PR target/54089 * config/sh/sh.md (*rotcr): Add another variant. 2016-05-06 Richard Biener PR middle-end/70931 * dwarf2out.c (native_encode_initializer): Skip zero-sized fields. 2016-05-06 Richard Biener PR middle-end/70941 * fold-const.c (split_tree): Always convert to the original type before negating. 2016-05-06 Richard Biener * fwprop.c (fwprop): Remove duplicate cleanup_cfg call. (fwprop_addr): Likewise. 2016-05-06 Uros Bizjak PR target/70873 * config/i386/i386-protos.h (ix86_standard_x87sse_constant_load_p): New prototype. * config/i386/i386.c (ix86_standard_x87sse_constant_load_p): New. * config/i386/i386.md (push mem splitter): Use find_constant_src in the splitter condition. (FP load splitter): Use ix86_standard_x87sse_constant_load_p in the splitter condition. (FP float_extend load splitter): Ditto. 2016-05-05 Uros Bizjak * config/i386/i386.md (peehole2 patterns): Change true_regnum to REGNO in all peephole2 patterns. (post-reload splitters): Change true_regnum to REGNO in post-reload splitters. (zero_extend splitters): Use general_reg_operand and nonimmediate_gr_operand predicates. 2016-05-05 Jakub Jelinek * config/i386/sse.md (_fmadd__mask3): Use v constraint instead of x. 2016-05-05 Alan Modra PR target/68662 * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't set OPTION_MASK_RELOCATABLE when flag_pic == 2. Set TARGET_NO_FP_IN_TOC for -mrelocatable. (MINIMAL_TOC_SECTION_ASM_OP): Remove redundant TARGET_RELOCATABLE test. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/linux64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/freebsd64.h (MINIMAL_TOC_SECTION_ASM_OP): Likewise. (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise. (ASM_PREFERRED_EH_DATA_FORMAT): Likewise. * config/rs6000/predicates.md (easy_fp_constant): Likewise. * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op): Likewise. (rs6000_assemble_integer): Update TARGET_RELOCATABLE test. (rs6000_stack_info): Likewise. (rs6000_elf_asm_out_constructor): Likewise. (rs6000_elf_asm_out_destructor): Likewise. (rs6000_elf_declare_function_name): Likewise. * config/rs6000/rs6000.md (load_toc_aix_di): Likewise. * config/rs6000/rs6000.h (MASK_RELOCATABLE, MASK_MINIMAL_TOC): Don't define. 2016-05-05 Alan Modra * config/rs6000/rs6000.c (rs6000_frame_related): Rewrite. 2016-05-05 Alan Modra * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use out-of-line gpr restore for one or two regs if that would add a save of lr. 2016-05-04 Uros Bizjak PR target/70873 * config/i386/i386.md (TARGET_SSE_PARTIAL_REG_DEPENDENCY float_extend sf->df peephole2): Change to post-epilogue_completed late splitter. Use sse_reg_operand as operand 0 predicate. (TARGET_SSE_PARTIAL_REG_DEPENDENCY float_truncate df->sf peephole2): Ditto. (TARGET_SSE_PARTIAL_REG_DEPENDENCY float {si,di}->{sf,df} peephole2): Ditto. Emit the pattern using RTX. (TARGET_USE_VECTOR_FP_CONVERTS float_extend sf->df splitter): Use sse_reg_opreand as operand 0 predicate. Do not use true_regnum in the post-reload splitter. Use lowpart_subreg instead of gen_rtx_REG. (TARGET_USE_VECTOR_FP_CONVERTS float_truncate df->sf splitter): Ditto. (TARGET_USE_VECTOR_CONVERTS float si->{sf,df} splitter): Use sse_reg_operand as operand 0 predicate. (TARGET_SPLIT_MEM_OPND_FOR_FP_CONVERTS float_extend sf->df peephole2): Use sse_reg_opreand as operand 0 predicate. Use lowpart_subreg instead of gen_rtx_REG. (TARGET_SPLIT_MEM_OPND_FOR_FP_CONVERTS float_truncate sf->df peephole2): Ditto. 2016-05-04 Segher Boessenkool * function.c (emit_use_return_register_into_block): Delete. (gen_return_pattern): Delete. (emit_return_into_block): Delete. (active_insn_between): Delete. (convert_jumps_to_returns): Delete. (emit_return_for_exit): Delete. (thread_prologue_and_epilogue_insns): Delete all code dealing with simple_return for shrink-wrapped blocks. * shrink-wrap.c (try_shrink_wrapping): Insert simple_return at the end of blocks that need one. (get_unconverted_simple_return): Delete. (convert_to_simple_return): Delete. * shrink-wrap.c (get_unconverted_simple_return): Delete declaration. (convert_to_simple_return): Ditto. 2016-05-04 Segher Boessenkool * cfgcleanup.c (bb_is_just_return): New function. (try_optimize_cfg): Simplify jumps to return, branches to return, and branches around return. 2016-05-04 Segher Boessenkool * cfgcleanup.c (try_simplify_condjump): Don't try to simplify a branch to a return. 2016-05-04 Jakub Jelinek PR c++/70906 PR c++/70933 * tree-core.h (enum operand_equal_flag): Add OEP_HASH_CHECK. * tree.c (inchash::add_expr): If !IS_EXPR_CODE_CLASS (tclass), assert flags & OEP_HASH_CHECK, instead of asserting it never happens. Handle TARGET_EXPR. * fold-const.c (operand_equal_p): For hash verification, or in OEP_HASH_CHECK into flags. 2016-05-04 Eric Botcazou * tree-ssa-coalesce.c (gimple_can_coalesce_p): Fix reference in head comment. (compute_samebase_partition_bases): Fix typo. 2016-05-04 Jakub Jelinek * config/i386/sse.md (vec_interleave_highv8sf, vec_interleave_lowv8sf, vec_interleave_highv4df, vec_interleave_lowv4df): Remove constraints from expanders. * config/i386/sse.md (sse2_movq128): Use v constraint instead of x. 2016-05-04 Jan Hubicka * tree-inline.c (expand_call_inline): Fix path dealing with making lhs of call statement undefined. 2016-05-04 Jan Hubicka * cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Check availability on NODE, too. * cgraph.h (symtab_node::call_for_symbol_and_aliases): Likewise. (cgraph_node::call_for_symbol_and_aliases): Likewise. (varpool_node::call_for_symbol_and_aliase): Likewise. * ipa-pure-const.c (add_new_function): Analyze all bodies. (propagate_pure_const): Propagate across interposable functions, too. (skip_function_for_local_pure_const): Do not skip interposable bodies with aliases. (pass_local_pure_const::execute): Update. 2016-05-04 Marek Polacek * doc/invoke.texi: Document -Wdangling-else. 2016-05-04 Thomas Preud'homme * config.gcc: Error out when conflicting multilib is detected. Do not loop over multilibs since no combination is legal. 2016-05-04 Alan Modra * config/rs6000/rs6000.h (PIC_OFFSET_TABLE_REGNUM): Correct. * config/rs6000/sysv4.h (TARGET_TOC): Simplify. * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op): Align .toc. 2016-05-04 Matthew Fortune * config/mips/mips-cpus.def (p5600): Avoid IMADD by default. Clean up p5600 comments. 2016-05-04 Richard Biener * match.pd: Add BIT_FIELD_REF canonicalizations and vector constructor simplifications. * fold-const.c (fold_ternary_loc): Remove duplicate functionality here. 2016-05-04 Oleg Endo * config/sh/predicates (post_inc_mem, pre_dec_mem): New predicates. * config/sh/sh-protos.h (sh_find_set_of_reg): Return null result if result.set_rtx is null instead of aborting. * config/sh/sh.h (USE_LOAD_POST_INCREMENT, USE_STORE_PRE_DECREMENT): Always enable. (USE_LOAD_PRE_DECREMENT, USE_STORE_POST_INCREMENT): Enable for SH2A. * config/sh/sh.md (*extendsi2_predec, *mov_load_predec, *mov_store_postinc): New patterns. 2016-05-04 Marc Glisse * match.pd ((A | B) & (A | C)): Generalize to BIT_XOR_EXPR. Mark as commutative. Check both conversions are NOP. ((A & B) OP (C & B)): Remove. 2016-05-04 Alan Modra * combine.c (simplify_set): Correct WORD_REGISTER_OPERATIONS test. 2016-05-04 Alan Modra PR target/70866 * config/rs6000/rs6000.c (rs6000_stack_info): Don't set cr_save_p when cr2,3,4 are all fixed regs. 2016-05-04 Bernd Schmidt PR rtl-optimization/57193 * opts.c (default_options_table): Revert OPT_frename_registers change. * doc/invoke.texi (-frename-registers, -O2): Likewise. 2016-05-03 Martin Sebor PR c++/66561 * builtins.c (fold_builtin_FILE): New function. (fold_builtin_FUNCTION, fold_builtin_LINE): New functions. (fold_builtin_0): Call them. * gimplify.c (gimplify_call_expr): Remove the handling of BUILT_IN_FILE, BUILT_IN_FUNCTION, and BUILT_IN_LINE. PR c++/66561 * doc/extend.texi (Other Builtins): Update __builtin_FILE, __builtin_FUNCTION, and __builtin_LINE to reflect they yield constants. PR c++/66639 * doc/extend.texi (Function Names as Strings): Update __func__, __FUNCTION__, __PRETTY_FUNCTION__ to reflect they evaluate to constants. 2016-05-03 Jakub Jelinek Richard Biener PR tree-optimization/70916 * tree-if-conv.c: Include cfganal.h. (pass_if_conversion::execute): Call connect_infinite_loops_to_exit and remove_fake_exit_edges around the optimization pass. 2016-05-03 Jan Hubicka * cgraph.c (symbol_table::create_edge): Set inline_failed. (cgraph_edge::make_direct): Likewise. (cgraph_edge::dump_edge_flags): Dump call_stmt_cannot_inline_p. * cgraphclones.c (duplicate_thunk_for_node): Set inline_failed. * cif-code.def (CIF_LTO_MISMATCHED_DECLARATIONS): New code (CIF_THUNK): New code. * ipa-inline-analysis.c (initialize_inline_failed): Preserve CIF_FINAL_ERROR codes; do not deal with call_stmt_cannot_inline_p. (compute_inline_parameters): Set inline_failed for thunks. (inline_analyze_function): Cleanup. * ipa-inline.c (can_inline_edge_p): Do not deal with call_stmt_cannot_inline_p. (can_early_inline_edge_p): Likewise. (early_inliner): Initialize inline_failed. * lto-cgraph.c (lto_output_edge): Sanity check inline_failed. 2016-05-03 Uros Bizjak * config/i386/predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand. (nonimm_ssenomem_operand): New predicate. * config/i386/i386.md (extendsfdf2): Use nonimm_ssenomem_operand as operand 0 predicate. (*extendsfdf2): Merge from *extendsfdf2_mixed and *extendsfdf2_i387. Disable unsupported alternatives using "enabled" attribute. Use register_ssemem_operand as operand 0 predicate. (*fop__1): Use x87nonimm_ssenomem_operand as operand 1 predicate. 2016-05-03 Marek Polacek PR c/70859 * input.c (expansion_point_location): New function. * input.h (expansion_point_location): Declare. 2016-05-03 Pierre-Marie de Rodat * dwarf2out.c (resolve_args_picking_1): Replace the frame_offset occurence with frame_offset_ ones. 2016-05-03 Alan Modra PR rtl-optimization/70890 * ira.c (combine_and_move_insns): When moving def_insn, remove equivs on use_insn. 2016-05-03 Dominik Vogt * config/s390/s390.md ("*rsbg__sll") ("*rsbg__srl"): New define_insns. ("*rsbg__srl_bitmask"): Rename by adding "_bitmask". ("*rsbg__sll_bitmask"): Likewise. 2016-05-03 Alan Modra * config/rs6000/rs6000.c (rs6000_savres_strategy): Correct condition for SAVE_MULTIPLE/STORE_MULTIPLE. 2016-05-03 Jakub Jelinek * config/i386/i386.md (*truncdfsf_mixed, *truncdfsf_i387, *truncxfsf2_mixed, *truncxfdf2_mixed): Use v constraint instead of x. 2016-05-03 Richard Biener * gimplify.h (get_initialized_tmp_var): Add allow_ssa parameter default true. (gimplify_arg): Likewise. * gimplify.c (gimplify_expr): Add overload with allow_ssa parameter, re-writing the result to a decl if required. (internal_get_tmp_var): Add allow_ssa parameter and override into_ssa with it. (get_formal_tmp_var): Adjust. (get_initialized_tmp_var): Add allow_ssa parameter. (gimplify_arg): Add allow_ssa parameter and avoid generating SSA names for the result false. (gimplify_call_expr): If the call may return twice do not gimplify parameters into SSA. (prepare_gimple_addressable): Do not allow an SSA name as temporary. (gimplify_modify_expr): Adjust assert. For noreturn calls with a SSA name LHS adjust its def. (gimplify_save_expr): Do not allow an SSA name as save-expr result. (gimplify_one_sizepos): Do not allow an SSA name as a sizepos. (gimplify_body): Init GIMPLE SSA data structures and gimplify into-SSA. (gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands. (gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise for OMP_FOR_COND, OMP_FOR_INCR and OMP_CLAUSE_LINEAR_STEP. (optimize_target_teams): Do not allow SSA names for clause operands. (gimplify_expr): Likewise for where we mark the result addressable. * passes.def (pass_init_datastructures): Remove. * tree-into-ssa.c (mark_def_sites): Ignore existing SSA names. (rewrite_stmt): Likewise. * tree-inline.c (initialize_cfun): Properly transfer SSA state. (replace_locals_op): Replace SSA names. (copy_gimple_seq_and_replace_locals): Init src_cfun. * gimple-low.c (lower_builtin_setjmp): Deal with SSA. * cgraph.c (release_function_body): Free CFG annotations only when we have a CFG. Simplify. * gimple-fold.c (gimplify_and_update_call_from_tree): Use force_gimple_operand instead of get_initialized_tmp_var. * tree-pass.h (make_pass_init_datastructures): Remove. * tree-ssa.c (execute_init_datastructures): Remove. (pass_data_init_datastructures): Likewise. (class pass_init_datastructures): Likewise. (make_pass_init_datastructures): Likewise. * omp-low.c (create_omp_child_function): Init SSA data structures. (grid_expand_target_grid_body): Likewise. * tree-cfg.c (move_block_to_fn): Double-check the DEF is an SSA name before adding it to names_to_release. (remove_bb): Always release SSA defs. * tree-ssa-ccp.c (get_default_value): Check SSA_NAME_VAR before dereferencing it. * cgraphunit.c (init_lowered_empty_function): Always int SSA data structures. * tree-ssanames.c (release_defs): Remove assert that we are in SSA form. * trans-mem.c (diagnose_tm_1): Handle SSA name function. 2016-05-03 Jakub Jelinek Uros Bizjak PR rtl-optimization/70467 * config/i386/predicates.md (x86_64_hilo_int_operand, x86_64_hilo_general_operand): New predicates. * config/i386/constraints.md (Wd): New constraint. * config/i386/i386.md (mode attr di): Use Wd instead of e. (general_hilo_operand): New mode attr. (add3, sub3): Use instead of . (*add3_doubleword, *sub3_doubleword): Use x86_64_hilo_general_operand instead of . 2016-05-03 Jakub Jelinek PR tree-optimization/70916 * tree-if-conv.c (constant_or_ssa_name): Removed. (fold_build_cond_expr): Use is_gimple_val instead of constant_or_ssa_name. PR tree-optimization/70916 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Give up if COND_EXPR rhs1 is neither SSA_NAME nor COMPARISON_CLASS_P. PR target/49244 * tree-ssa-ccp.c: Include stor-layout.h and optabs-query.h. (optimize_atomic_bit_test_and): New function. (pass_fold_builtins::execute): Use it. * optabs.def (atomic_bit_test_and_set_optab, atomic_bit_test_and_complement_optab, atomic_bit_test_and_reset_optab): New optabs. * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_BIT_TEST_AND_RESET): New ifns. * builtins.h (expand_ifn_atomic_bit_test_and): New prototype. * builtins.c (expand_ifn_atomic_bit_test_and): New function. * internal-fn.c (expand_ATOMIC_BIT_TEST_AND_SET, expand_ATOMIC_BIT_TEST_AND_COMPLEMENT, expand_ATOMIC_BIT_TEST_AND_RESET): New functions. * doc/md.texi (atomic_bit_test_and_set@var{mode}, atomic_bit_test_and_complement@var{mode}, atomic_bit_test_and_reset@var{mode}): Document. * config/i386/sync.md (atomic_bit_test_and_set, atomic_bit_test_and_complement, atomic_bit_test_and_reset): New expanders. (atomic_bit_test_and_set_1, atomic_bit_test_and_complement_1, atomic_bit_test_and_reset_1): New insns. 2016-05-03 Richard Sandiford PR rtl-optimization/70687 * combine.c (change_zero_ext): Check for scalar modes. Use wide_int instead of unsigned HOST_WIDE_INT. 2016-05-03 Bernd Schmidt PR rtl-optimization/44281 * hard-reg-set.h (struct target_hard_regs): New field x_fixed_nonglobal_reg_set. (fixed_nonglobal_reg_set): New macro. * reginfo.c (init_reg_sets_1): Initialize it. * ira.c (setup_alloc_regs): Use fixed_nonglobal_reg_set instead of fixed_reg_set. * df-scan.c (df_insn_refs_collect): Asms may reference global regs. 2016-05-03 Bin Cheng PR tree-optimization/56541 * doc/invoke.texi (@item max-tree-if-conversion-phi-args): New item. * params.def (PARAM_MAX_TREE_IF_CONVERSION_PHI_ARGS): new param. * tree-if-conv.c (MAX_PHI_ARG_NUM): new macro. (any_complicated_phi): new static variable. (aggressive_if_conv): delete. (if_convertible_phi_p): support phis with more than two arguments. (if_convertible_bb_p): remvoe check on aggressive_if_conv and critical pred edges. (ifcvt_split_critical_edges): support phis with more than two arguments by checking new parameter. only split critical edges if needed. (tree_if_conversion): handle simd pragma marked loop using new local variable aggressive_if_conv. check any_complicated_phi. 2016-05-03 Bin Cheng * tree-ssa-loop-ivopts.c (get_computation_cost_at): Check depends_on before using it. 2016-05-03 Bin Cheng * tree-ssa-loop-ivopts.c (get_computation_cost_at): Don't clobber cbase. 2016-05-03 Oleg Endo * config/sh/sh.md (udivsi3, divsi3, mulsi3): Simplify. (mulhisi3, umulhisi3, (smulsi3_highpart, umulsi3_highpart): Convert to define_insn_and_split. (mulsi3_i): New define_insn_and_split. (mulsi3_call): Convert to define_insn. (mulsidi3, mulsidi3_compact, umulsidi3, umulsidi3_compact): Remove constraints. 2016-05-02 Michael Meissner * machmode.h (mode_complex): Add support to give the complex mode for a given mode. (GET_MODE_COMPLEX_MODE): Likewise. * stor-layout.c (layout_type): For COMPLEX_TYPE, use the mode stored by build_complex_type and gfc_build_complex_type instead of trying to figure out the appropriate mode based on the size. Raise an assertion error, if the type was not set. * genmodes.c (struct mode_data): Add field for the complex type of the given type. (blank_mode): Likewise. (make_complex_modes): Remember the complex mode created in the base type. (emit_mode_complex): Write out the mode_complex array to map a type mode to the complex version. (emit_insn_modes_c): Likewise. * tree.c (build_complex_type): Set the complex type to use before calling layout_type. * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add support for __float128 complex datatypes. (rs6000_hard_regno_mode_ok): Likewise. (rs6000_setup_reg_addr_masks): Likewise. (rs6000_complex_function_value): Likewise. * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Likewise. __float128 and __ibm128 complex. (FLOAT128_IBM_P): Likewise. (ALTIVEC_ARG_MAX_RETURN): Likewise. * doc/extend.texi (Additional Floating Types): Document that -mfloat128 must be used to enable __float128. Document complex __float128 and __ibm128 support. 2016-05-02 Jakub Jelinek PR target/49244 * gimple.c (gimple_builtin_call_types_compatible_p): Allow char/short arguments promoted to int because of promote_prototypes. 2016-05-02 Uros Bizjak * config/i386/predicates.md (register_ssemem_operand): New predicate. * config/i386/i386.md (*cmpi): Merge from *cmpi_mixed and *cmpi_i387. Disable unsupported alternatives using "enabled" attribute. Use register_ssemem_operand as operand 1 predicate. (*cmpixf_i387): Split XFmode pattern from *cmpi_i387. (*absneg2): Merge from *absneg2_mixed and *absneg2_i387. Disable unsupported alternatives using "enabled" attribute. (*absnegxf2_i387): Split XFmode pattern from *absneg2_i387. 2016-05-02 Nathan Sidwell * omp-low.c (lower_oacc_head_tail): Assert there is at least one marker. (oacc_loop_process): Check mask for loop termination. 2016-05-02 Jan Hubicka * cif-code.def (CIF_THUNK): Add. * ipa-inline-analsysis.c (evaluate_conditions_for_known_args): Revert accidental change. 2016-05-02 Jan Hubicka * ipa-inline-analysis.c (reset_inline_summary): Clear fp_expressions (dump_inline_summary): Dump it. (fp_expression_p): New predicate. (estimate_function_body_sizes): Use it. (inline_merge_summary): Merge fp_expressions. (inline_read_section): Read fp_expressions. (inline_write_summary): Write fp_expressions. * ipa-inline.c (can_inline_edge_p): Permit inlining across fp math codegen boundary if either caller or callee is !fp_expressions. * ipa-inline.h (inline_summary): Add fp_expressions. * ipa-inline-transform.c (inline_call): When inlining !fp_expressions to fp_expressions be sure the fp generation flags are updated. 2016-05-02 Jakub Jelinek PR rtl-optimization/70467 * cse.c (cse_insn): Handle no-op MEM moves after folding. PR rtl-optimization/70467 * ipa-pure-const.c (check_call): Handle internal calls even in ipa mode like in local mode. 2016-05-02 Bernd Edlinger * doc/install.texi: Document supported in-tree gmp/mpfr/mpc versions. 2016-05-02 Marc Glisse * match.pd (X u< X, X u> X): New transformations. 2016-05-02 Marc Glisse * flag-types.h (enum warn_strict_overflow_code): Move ... * coretypes.h: ... here. * fold-const.h (fold_overflow_warning): Declare. * fold-const.c (fold_overflow_warning): Make non-static. (fold_comparison): Move the transformation of X +- C1 CMP C2 into X CMP C2 -+ C1 ... * match.pd: ... here. * gimple-fold.c (fold_stmt_1): Protect with fold_defer_overflow_warnings. 2016-05-02 Nathan Sidwell * omp-low.c (struct oacc_loop): Add 'inner' field. (new_oacc_loop_raw): Initialize it to zero. (oacc_loop_fixed_partitions): Initialize it. (oacc_loop_auto_partitions): Partition outermost loop to outermost available partitioning. 2016-05-02 Claudiu Zissulescu * config/arc/arc.md (mulsidi3): Change operand 0 predicate to register_operand. (umulsidi3): Likewise. (indirect_jump): Fix jump instruction assembly patterns. 2016-05-02 Thomas Schwinge PR target/70860 * config/nvptx/nvptx.c (nvptx_libcall_value): Handle NULL cfun. (nvptx_function_value): Assert non-NULL cfun. 2016-05-02 Eric Botcazou PR rtl-optimization/70886 * sched-deps.c (estimate_dep_weak): Canonicalize cselib values. * cselib.h (rtx_equal_for_cselib_1): Declare. (rtx_equal_for_cselib_p: New inline function. * cselib.c (rtx_equal_for_cselib_p): Delete. (rtx_equal_for_cselib_1): Make public. 2016-05-02 Uros Bizjak * config/i386/predicates.md (nonimm_ssenomem_operand): New predicate. (register_mixssei387nonimm_operand): Remove predicate. * config/i386/i386.md (*fop__comm): Merge from *fop__comm_mixed and *fop__comm_i387. Disable unsupported alternatives using "enabled" attribute. Also check X87_ENABLE_ARITH for TARGET_MIX_SSE_I387 alternatives. (*fop__1): Merge from *fop__1_mixed and *fop__1_i387. Disable unsupported alternatives using "enabled" attribute. Use nonimm_ssenomem_operand as operand 1 predicate. Also check X87_ENABLE_ARITH for TARGET_MIX_SSE_I387 alternatives. 2016-05-02 Richard Sandiford * tree.c (cst_and_fits_in_hwi): Simplify. 2016-05-02 Richard Sandiford * tree.h (wi::to_wide): New function. * expr.c (expand_expr_real_1): Use wi::to_wide. * fold-const.c (int_const_binop_1): Likewise. (extract_muldiv_1): Likewise. 2016-05-02 Richard Sandiford * wide-int.h: Update offset_int and widest_int documentation. (WI_SIGNED_SHIFT_RESULT): New macro. (wi::binary_shift): Define signed_shift_result_type for shifts on offset_int- and widest_int-like types. (generic_wide_int): Support <<= and >>= if << and >> are supported. * tree.h (int_bit_position): Use shift operators instead of wi:: shifts. * alias.c (adjust_offset_for_component_ref): Likewise. * expr.c (get_inner_reference): Likewise. * fold-const.c (fold_comparison): Likewise. * gimple-fold.c (fold_nonarray_ctor_reference): Likewise. * gimple-ssa-strength-reduction.c (restructure_reference): Likewise. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise. (stmt_kills_ref_p): Likewise. * tree-ssa-ccp.c (bit_value_binop_1): Likewise. * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. (ao_ref_init_from_vn_reference): Likewise. 2016-05-02 Richard Sandiford * wide-int.h: Update offset_int and widest_int documentation. (WI_SIGNED_BINARY_PREDICATE_RESULT): New macro. (wi::binary_traits): Allow ordered comparisons between offset_int and offset_int, between widest_int and widest_int, and between either of these types and basic C types. (operator <, <=, >, >=): Define for the same combinations. * tree.h (tree_int_cst_lt): Use comparison operators instead of wi:: comparisons. (tree_int_cst_le): Likewise. * gimple-fold.c (fold_array_ctor_reference): Likewise. (fold_nonarray_ctor_reference): Likewise. * gimple-ssa-strength-reduction.c (record_increment): Likewise. * tree-affine.c (aff_comb_cannot_overlap_p): Likewise. * tree-parloops.c (try_transform_to_exit_first_loop_alt): Likewise. * tree-sra.c (completely_scalarize): Likewise. * tree-ssa-alias.c (stmt_kills_ref_p): Likewise. * tree-ssa-reassoc.c (extract_bit_test_mask): Likewise. * tree-vrp.c (extract_range_from_binary_expr_1): Likewise. (check_for_binary_op_overflow): Likewise. (search_for_addr_array): Likewise. * ubsan.c (ubsan_expand_objsize_ifn): Likewise. 2016-05-02 Claudiu Zissulescu * config/arc/arc.c (arc_preferred_simd_mode): Remove enum keyword. (arc_save_restore): Likewise. (arc_dwarf_register_span): Likewise. (arc_output_pic_addr_const): Initialize suffix variable. 2016-05-02 Martin Liska * symbol-summary.h (function_summary::function_summary): Remove checking assert for all cgraph nodes. (function_summary::get): Check summary_uid. (symtab_insertion): Check summary_uid. 2016-05-02 Claudiu Zissulescu * config/arc/arc-protos.h (compact_memory_operand_p): Declare. * config/arc/arc.c (arc_output_commutative_cond_exec): Consider bmaskn instruction. (arc_dwarf_register_span): Remove enum keyword. (compact_memory_operand_p): New function. * config/arc/arc.h (reg_class): Add code density register classes. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. * config/arc/arc.md (*movqi_insn): Add code density instructions. (*movhi_insn, *movsi_insn, *movsf_insn): Likewise. (*extendhisi2_i, andsi3_i, cmpsi_cc_insn_mixed): Likewise. (*cmpsi_cc_c_insn, *movsi_ne): Likewise. * config/arc/constraints.md (C2p, Uts, Cm1, Cm3, Ucd): New constraints. (h, Rcd, Rsd, Rzd): New register constraints. (T): Use compact_memory_operand_p function. * config/arc/predicates.md (compact_load_memory_operand): Remove. 2016-05-02 Oleg Endo * config/sh/sh.md (*negnegt, *movtt): Remove. 2016-05-02 Marek Polacek Tom de Vries PR tree-optimization/70700 * tree-ssa-structalias.c (dump_pred_graph): Fix getting varinfo for ids bigger than FIRST_REF_NODE. 2016-05-02 Oleg Endo PR target/52898 * config/sh/sh.c (sh_option_override): Remove TARGET_CBRANCHDI4, TARGET_CMPEQDI_T. (prepare_cbranch_operands): Don't use scratch register. Assume that function is used when pseudos can be created. (expand_cbranchdi4): Likewise. Remove unused TARGET_CMPEQDI_T paths. * config/sh/sh.md (cbranchsi4): Allow only when pseudos can be created. (cbranchdi4, cbranchdi4_i): Simplify to single cbranchdi4 define_expand. Allow it only when pseudos can be created. * config/sh/sh.opt (mcbranchdi, mcmpeqdi): Delete. 2016-05-01 Uros Bizjak * config/i386/constraints.md (BC): Only allow -1 operands. * config/i386/sse.md (mov_internal): Add (v,C) alternative. Add "enabled" attribute. Update XI mode attribute calculation. * config/i386/i386.md (*movxi_internal_avx512f): Add (v,C) alternative. (*movoi_internal_avx): Update XI mode attribute calculation. (*movti_internal): Ditto. 2016-05-01 Oleg Endo * config/sh/sh.md (push, pop, ic_invalidate_line, cstoresi4, cstoredi4, cstoresf4, cstoredf4, fix_truncsfsi2): Remove constraints. 2016-05-01 Eric Botcazou * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Do not use switch statement on instruction code. Remove trailing spaces. (altivec_expand_stv_builtin): Likewise. 2016-05-01 Oleg Endo * config/sh/sh.h (TARGET_SH4): Remove and use default implementation. (TARGET_FPU_DOUBLE): Simplify. (BASE_ARG_REG, DOUBLE_TYPE_SIZE, OPTIMIZE_MODE_SWITCHING): Replace 'TARGET_SH4 || TARGET_SH2A_DOUBLE' conditions with 'TARGET_FPU_DOUBLE'. * config/sh/sh.c: Replace 'TARGET_SH4 || TARGET_SH2A_DOUBLE' conditions with 'TARGET_FPU_DOUBLE'. * config/sh/sh.md: Likewise. 2016-05-01 Yoshinori Sato * config/sh/linux.h (SH_DIV_STRATEGY_DEFAULT, SH_DIV_STR_FOR_SIZE): Remove. * config/sh/netbsd-elf.h (SH_DIV_STRATEGY_DEFAULT, SH_DIV_STR_FOR_SIZE): Remove. 2016-05-01 Oleg Endo * config/sh/predicates.md (any_register_operand, zero_extend_operand, logical_reg_operand): Delete. (arith_operand, arith_reg_dest, arith_or_int_operand, cmpsi_operand, arith_reg_or_0_operand, arith_reg_or_0_or_1_operand, logical_operand, logical_and_operand, movsrc_no_disp_mem_operand): Rewrite using match_operand and match_test. (sh_const_vec, sh_1el_vec): Remove redundant checks. Declare local variables on their first use. Return bool values. * config/sh/sh.h (LOAD_EXTEND_OP): Update comment. * config/sh/sh.md (andsi3, iorsi3): Use arith_reg_dest for result and arith_reg_operand for input operand. Remove empty constraints. (xorsi3): Delete. (*xorsi3_compact): Rename to xorsi3. (zero_extendsi2): Use arith_reg_operand for input operand. (*zero_extendsi2_disp_mem): Update comment. (mov_nop): Delete. 2016-04-30 Oleg Endo * config/sh/t-sh: Remove SH5 support. * config.gcc: Likewise. * configure: Likewise. 2016-04-30 Rainer Orth * config/darwin.h (LINK_COMMAND_SPEC_A): Handle -fcilkplus. 2016-04-30 Oleg Endo * config/sh/sh.c (register_sh_passes, sh_option_override, sh_print_operand, prepare_move_operands, sh_can_follow_jump): Remove TARGET_SH1 checks. * config/sh/sh.h (TARGET_VARARGS_PRETEND_ARGS, VALID_REGISTER_P, PROMOTE_MODE): Likewise. * config/sh/sh.md (adddi3, addsi3, subdi3, subsi3, andsi3, movdi): Likewise. 2016-04-30 Alan Modra * config/rs6000/rs6000.c (rs6000_savres_strategy): Force inline restoring when fixed_reg_p, but allow out-of-line or stmw save. Check for user regs later to avoid unnecessary looping over regs. Merge user reg check with non-saved reg check. Don't force inline VR restore when static chain used. (rs6000_frame_related): Omit eh_frame info for user regs when saving. (fixed_regs_p): Delete. 2016-04-30 Alan Modra * config/rs6000/rs6000.c (SAVRES_MULTIPLE): Replace with.. (SAVE_STRATEGY, REST_STRATEGY): ..this. Renumber and sort enum. Update all uses. 2016-04-30 Alan Modra PR target/69645 * config/rs6000/rs6000.c (fixed_reg_p): New function. (fixed_regs_p): Rename from global_regs_p. Call fixed_reg_p. Update all uses. 2016-04-30 Alan Modra * config/rs6000/rs6000.c (rs6000_conditional_register_usage): Remove redundant PIC_OFFSET_TABLE_REGNUM test. Replace with flag_pic test for Darwin. 2016-04-30 Alan Modra * regs.h (struct reg_info_t): Delete freq_calls_crossed and throw_calls_crossed. (REG_FREQ_CALLS_CROSSED): Delete. (REG_N_THROWING_CALLS_CROSSED): Delete. * regstat.c (regstat_bb_compute_ri): Don't calculate REG_FREQ_CALLS_CROSSED and REG_N_THROWING_CALLS_CROSSED. (dump_reg_info): Don't print call cross frequency. * ira.c (combine_and_move_insns): Don't set REG_FREQ_CALLS_CROSSED and REG_N_THROWING_CALLS_CROSSED. 2016-04-30 Alan Modra * regs.h (struct reg_info_t): Delete live_length. (REG_LIVE_LENGTH): Delete macro. * regstat.c (regstat_bb_compute_ri): Delete artificial_uses, local_live, local_processed and local_live_last_luid params. Replace bb_index param with bb. Don't set REG_LIVE_LENGTH. Formatting fixes. (regstat_compute_ri): Adjust for above. Don't set REG_LIVE_LENGTH. (dump_reg_info): Don't print live length. * ira.c (update_equiv_regs): Replace test of REG_LIVE_LENGTH with test of setjmp_crosses. Don't set REG_LIVE_LENGTH. Localize loop_depth var. 2016-04-30 Alan Modra * ira.c (enum valid_equiv): New. (validate_equiv_mem): Return enum. (update_equiv_mem): Create replacement in more cases. (add_store_equivs): Update validate_equiv_mem call. 2016-04-30 Alan Modra * ira.c (combine_and_move_insns): Rather than scanning insns, use DF infrastucture to find use and def insns. 2016-04-30 Alan Modra ira.c (combine_and_move_insns): Move invariant conditions.. (ira.c): ..to here. Call combine_and_move_insns before add_store_equivs. Call grow_reg_equivs later. Allocate req_equiv later using max_reg_num() rather than global max_regno. (contains_replace_regs): Delete. (add_store_equivs): Remove contains_replace_regs test. 2016-04-30 Alan Modra * ira.c (struct equiv_mem_data): New. (equiv_mem, equiv_mem_modified): Delete static vars. (validate_equiv_mem_from_store): Use "data" param to communicate.. (validate_equiv_mem): ..from here. 2016-04-30 Alan Modra * ira.c (add_store_equivs, combine_and_move_insns): New functions, split out from.. (update_reg_equivs): ..here. Move allocation and freeing of reg_equiv, and calls to grow_reg_equivs, init_alias_analysis, end_alias_analysis to.. (ira): ..here. 2016-04-30 Alan Modra * ira.c (pdx_subregs): Delete. (struct equivalence): Add pdx_subregs field. (set_paradoxical_subreg): Remove pdx_subregs param. Update pdx_subregs access. (update_equiv_regs): Don't create or free pdx_subregs. Update pdx_subregs access. 2016-04-29 Bill Schmidt * config/rs6000/altivec.h: Change definitions of vec_xl and vec_xst. * config/rs6000/rs6000-builtin.def (LD_ELEMREV_V2DF): New. (LD_ELEMREV_V2DI): New. (LD_ELEMREV_V4SF): New. (LD_ELEMREV_V4SI): New. (LD_ELEMREV_V8HI): New. (LD_ELEMREV_V16QI): New. (ST_ELEMREV_V2DF): New. (ST_ELEMREV_V2DI): New. (ST_ELEMREV_V4SF): New. (ST_ELEMREV_V4SI): New. (ST_ELEMREV_V8HI): New. (ST_ELEMREV_V16QI): New. (XL): New. (XST): New. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add descriptions for VSX_BUILTIN_VEC_XL and VSX_BUILTIN_VEC_XST. * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Map from TARGET_P9_VECTOR to RS6000_BTM_P9_VECTOR. (altivec_expand_builtin): Add handling for VSX_BUILTIN_ST_ELEMREV_ and VSX_BUILTIN_LD_ELEMREV_. (rs6000_invalid_builtin): Add error-checking for RS6000_BTM_P9_VECTOR. (altivec_init_builtins): Define builtins used to implement vec_xl and vec_xst. (rs6000_builtin_mask_names): Define power9-vector. * config/rs6000/rs6000.h (MASK_P9_VECTOR): Define. (RS6000_BTM_P9_VECTOR): Define. (RS6000_BTM_COMMON): Include RS6000_BTM_P9_VECTOR. * config/rs6000/vsx.md (vsx_ld_elemrev_v2di): New define_insn. (vsx_ld_elemrev_v2df): Likewise. (vsx_ld_elemrev_v4sf): Likewise. (vsx_ld_elemrev_v4si): Likewise. (vsx_ld_elemrev_v8hi): Likewise. (vsx_ld_elemrev_v16qi): Likewise. (vsx_st_elemrev_v2df): Likewise. (vsx_st_elemrev_v2di): Likewise. (vsx_st_elemrev_v4sf): Likewise. (vsx_st_elemrev_v4si): Likewise. (vsx_st_elemrev_v8hi): Likewise. (vsx_st_elemrev_v16qi): Likewise. * doc/extend.texi: Add prototypes for vec_xl and vec_xst. Correct grammar. 2016-04-29 Patrick Palka * tree-ssa-threadedge.c (simplify_control_stmt_condition): Split out into ... (simplify_control_stmt_condition_1): ... here. Recurse into BIT_AND_EXPRs and BIT_IOR_EXPRs. 2016-04-29 David Edelsohn PR target/69810 * config/rs6000/rs6000.md (EXTQI): Don't allow extension to HImode. (zero_extendqi2_dot): Revert earlier conversion from define_insn_and_split to define_insn. (zero_extendqi2_dot2): Same. (extendqi2_dot): Same. (extendqi2_dot2): Same. 2016-04-29 Uros Bizjak * config/i386/i386.md (unspec): Add UNSPEC_PROBE_STACK. (probe_stack): New expander. (probe_stack_): New insn pattern. 2016-04-29 Uros Bizjak * config/i386/i386.md (operations with memory inputs setting flags peephole2): Remove uneeded REG_P checks. Cleanup pattern generation. 2016-04-29 Ilya Enkovich * tree-vect-loop.c (vect_transform_loop): Fix nb_iterations_upper_bound computation for vectorized loop. 2016-04-29 Marek Polacek Jakub Jelinek PR sanitizer/70342 * fold-const.c (tree_single_nonzero_warnv_p): For TARGET_EXPR, use TARGET_EXPR_SLOT as a base. 2016-04-29 Andrew Burgess * config/arc/arc.md (*loadqi_update): Replace use of 'rI' constraint with 'rCm2' constraints to limit possible immediate size. (*load_zeroextendqisi_update): Likewise. (*load_signextendqisi_update): Likewise. (*loadhi_update): Likewise. (*load_zeroextendhisi_update): Likewise. (*load_signextendhisi_update): Likewise. (*loadsi_update): Likewise. (*loadsf_update): Likewise. 2016-04-29 Uros Bizjak * config/i386/predicates.md (constm1_operand): Fix comparison. 2016-04-29 Claudiu Zissulescu * testsuite/gcc.target/arc/ieee_eq.c: New test. 2016-04-29 Oleg Endo * common/config/sh/sh-common.c (sh_option_optimization_table): Remove remaining SH5 related settings. * config/sh/sh-protos.h (shmedia_cleanup_truncate, shmedia_prepare_call_address): Delete. * config/sh/sh.c (sh_print_operand, output_stack_adjust, DWARF_CIE_DATA_ALIGNMENT, LOCAL_ALIGNMENT): Update comments. * config/sh/sh.h (SUBTARGET_ASM_RELAX_SPEC, UNSUPPORTED_SH2A): Remove m5 checks. (sh_divide_strategy_e): Remove SH5 division strategies. (TARGET_PTRMEMFUNC_VBIT_LOCATION): Remove and use default. * config/sh/sh.md (divsf3): Reinstate define_expand pattern. 2016-04-29 Dominik Vogt * config/s390/s390.c (s390_rtx_costs): Update documentation. 2016-04-29 Andreas Krebbel * config/s390/2964.md ("z13_unit_fxu", "z13_0"): Remove lder. * config/s390/s390.md ("movsi_larl", "*movsi_esa", "mov"): Change lder to ldr. * config/s390/vector.md ("mov"): Likewise. 2016-04-29 Ulrich Weigand * config/s390/constraints.md ("U", "W"): Invoke s390_mem_constraint with "ZR" and "ZT". * config/s390/s390.c (s390_check_qrst_address): Reject invalid addresses when using LRA. Accept also short displacements for S and T constraints. Do not check for long displacement target for S and T constraints. (s390_mem_constraint): Remove handling of U and W constraints. * config/s390/s390.md (various patterns): Remove the short displacement constraints (Q and R) if a long displacement constraint is present. Add longdisp as required CPU capability. * config/s390/vector.md: Likewise. * config/s390/vx-builtins.md: Likewise. 2016-04-29 Senthil Kumar Selvaraj PR target/60040 * reload1.c (reload): Call finish_spills before restarting reload loop. Skip select_reload_regs if update_eliminables_and_spill returns true. 2016-04-29 Claudiu Zissulescu * config/arc/arc.h (UNSIGNED_INT12, UNSIGNED_INT16): Define. * config/arc/arc.md (umulhisi3): Use arc_short_operand predicate. (umulhisi3_imm): Update predicates and constraint letters. (umulhisi3_reg): Declare instruction as commutative. * config/arc/constraints.md (J12, J16): New constraints. * config/arc/predicates.md (short_unsigned_const_operand): New predicate. (arc_short_operand): Likewise. * testsuite/gcc.target/arc/umulsihi3_z.c: New file. 2016-04-29 Richard Biener PR tree-optimization/13962 PR tree-optimization/65686 * tree-ssa-alias.h (ptrs_compare_unequal): Declare. * tree-ssa-alias.c (ptrs_compare_unequal): New function using PTA to compare pointers. * match.pd: Add pattern for pointer equality compare simplification using ptrs_compare_unequal. 2016-04-29 Richard Biener * stor-layout.c (layout_type): Do not build a pointer-to-element type for arrays. 2016-04-29 Uros Bizjak * config/i386/i386.md (Load+RegOp to Mov+MemOp peephole2): Use SWI mode iterator. Use general_reg_operand predicate. (Load+RegOp to Mov+MemOp peephole2 with vector regs): Split peephole to MMX and SSE part. Use mmx_reg_operand and sse_reg_operand predicates. 2016-04-29 Jakub Jelinek PR middle-end/70843 * fold-const.c (operand_equal_p): Don't verify hash value equality if arg0 == arg1. * tree.c (inchash::add_expr): Handle STATEMENT_LIST. Ignore BLOCK and OMP_CLAUSE. 2016-04-28 Jakub Jelinek PR target/70858 * config/i386/i386.c (bdesc_special_args): Add | OPTION_MASK_ISA_64BIT to __builtin_ia32_lwpval64 and __builtin_ia32_lwpins64. (bdesc_args): Add | OPTION_MASK_ISA_64BIT to __builtin_ia32_bextr_u64, __builtin_ia32_bextri_u64, __builtin_ia32_bzhi_di, __builtin_ia32_pdep_di and __builtin_ia32_pext_di. 2016-04-28 Segher Boessenkool * config/rs6000/rs6000.c (compute_save_world_info): Rename info_ptr to info. Don't initialize separate fields to 0. Clean up formatting a bit. 2016-04-28 Uros Bizjak * config/i386/i386.md (peephole2s for operations with memory inputs): Use SWI mode iterator. (peephole2s for operations with memory outputs): Ditto. Do not check for stack checking probe. (probe_stack): Remove expander. 2016-04-28 Joern Rennecke Andrew Burgess * config/arc/arc.c (arc_print_operand): Print integer 'H' / 'L' operands as 32-bits. 2016-04-28 Jason Merrill * gdbinit.in: Skip line-map.h. 2016-04-28 Joern Rennecke Andrew Burgess * config/arc/arc.c (arc_conditional_register_usage): Take TARGET_RRQ_CLASS into account. (arc_print_operand): Support printing 'p' and 's' operands. * config/arc/arc.h (TARGET_NPS_BITOPS_DEFAULT): Provide default as 0. (TARGET_RRQ_CLASS): Define. (IS_POWEROF2_OR_0_P): Define. * config/arc/arc.md (*movsi_insn): Add w/Clo, w/Chi, and w/Cbi alternatives. (*tst_movb): New define_insn. (*tst): Avoid recognition if it could prevent '*tst_movb' combination; replace c/CnL with c/Chs alternative. (*tst_bitfield_tst): New define_insn. (*tst_bitfield_asr): New define_insn. (*tst_bitfield): New define_insn. (andsi3_i): Add Rrq variant. (extzv): New define_expand. (insv): New define_expand. (*insv_i): New define_insn. (*movb): New define_insn. (*movb_signed): New define_insn. (*movb_high): New define_insn. (*movb_high_signed): New define_insn. (*movb_high_signed + 1): New define_split pattern. (*mrgb): New define_insn. (*mrgb + 1): New define_peephole2 pattern. (*mrgb + 2): New define_peephole2 pattern. * config/arc/arc.opt (mbitops): New option for nps400, uses TARGET_NPS_BITOPS_DEFAULT. * config/arc/constraints.md (q): Make register class conditional. (Rrq): New register constraint. (Chs): New constraint. (Clo): New constraint. (Chi): New constraint. (Cbf): New constraint. (Cbn): New constraint. (C18): New constraint. (Cbi): New constraint. 2016-04-28 Segher Boessenkool * cfganal.c (bitmap_intersection_of_succs): Delete assert checking dst->popcount. (bitmap_intersection_of_preds): Ditto. (bitmap_union_of_succs): Ditto. (bitmap_union_of_preds): Ditto. * sbitmap.c (do_popcount): Delete. (BITMAP_DEBUGGING): Delete. (sbitmap_verify_popcount): Delete. (sbitmap_alloc): Don't initialize the popcount field. (sbitmap_alloc_with_popcount): Delete. (sbitmap_resize): Don't resize the popcount array. (sbitmap_vector_alloc): Don't initialize the popcount field. (bitmap_copy): Don't copy the popcount array. (bitmap_clear): Don't clear the popcount array. (bitmap_clear): Delete the popcount array handling. (bitmap_ior_and_compl): Delete the popcount assert. (bitmap_not): Ditto. (bitmap_and_compl): Ditto. (bitmap_and): Delete the popcount array handling. (bitmap_xor): Ditto. (bitmap_ior): Ditto. (bitmap_or_and): Delete the popcount assert. (bitmap_and_or): Ditto. (popcount_table): Delete. (sbitmap_elt_popcount): Delete. * sbitmap.h (simple_bitmap_def): Delete the popcount field. (bitmap_set_bit): Delete the popcount assert. (bitmap_clear_bit): Ditto. (sbitmap_free): Don't free the popcount array. (sbitmap_alloc_with_popcount): Delete declaration. (sbitmap_popcount): Ditto. 2016-04-28 Joern Rennecke Andrew Burgess * config/arc/arc.h (SYMBOL_FLAG_CMEM): Define. (TARGET_NPS_CMEM_DEFAULT): Provide default definition. * config/arc/arc.c (arc_address_cost): Return 0 for cmem_address. (arc_encode_section_info): Set SYMBOL_FLAG_CMEM where indicated. * config/arc/arc.opt (mcmem): New option. * config/arc/arc.md (*extendqihi2_i): Add r/Uex alternative, supply length for r/m alternative. (*extendqisi2_ac): Likewise. (*extendhisi2_i): Add r/Uex alternative, supply length for r/m and r/Uex alternative. (movqi_insn): Add r/Ucm and Ucm/?Rac alternatives. (movhi_insn): Likewise. (movsi_insn): Add r/Ucm,Ucm/w alternatives. (*zero_extendqihi2_i): Add r/Ucm alternative. (*zero_extendqisi2_ac): Likewise. (*zero_extendhisi2_i): Likewise. * config/arc/constraints.md (Uex): New memory constraint. (Ucm): New define_constraint. * config/arc/predicates.md (long_immediate_loadstore_operand): Return 0 for MEM with cmem_address address. (cmem_address_0): New predicates. (cmem_address_1): Likewise. (cmem_address_2): Likewise. (cmem_address): Likewise. 2016-04-28 Segher Boessenkool * config/rs6000/rs6000.c (machine_function): Rename insn_chain_scanned_p to spe_insn_chain_scanned_p. (rs6000_stack_info): Adjust. 2016-04-28 Joern Rennecke Andrew Burgess * config/arc/constraints.md (Usd): Convert to define_constraint. (Us<): Likewise. (Us>): Likewise. 2016-04-28 Jakub Jelinek PR target/70821 * config/i386/sync.md (define_peephole2 *atomic_fetch_add_cmp): Add new peephole2 where the first insn is *mov_or instead of *mov_internal. 2016-04-28 Segher Boesssenkool * tracer.c (bb_seen): Make static. 2016-04-28 Andrew Burgess * common/config/arc/arc-common.c (arc_handle_option): Add NPS400 support, setup defaults. * config/arc/arc-opts.h (enum processor_type): Add NPS400. * config/arc/arc.c (arc_init): Add NPS400 support. * config/arc/arc.h (CPP_SPEC): Add NPS400 defines. (TARGET_ARC700): NPS400 is also an ARC700. * config/arc/arc.opt: Add NPS400 options to -mcpu=. 2016-04-28 Segher Boessenkool PR target/70668 * config/nds32/nds32.md (casesi): Don't access the operands array out of bounds. 2016-04-28 Uros Bizjak * config/i386/i386.md (zeroing peephole2): Use general_reg_operand. (or $-1,reg peephole2): Ditto. (strict_low_part zeroing peephole2): Use SWI12 mode iterator. 2016-04-28 Markus Trippelsdorf * doc/extend.texi (Common Function Attributes) [optimize]: Discourage use of the optimize attribute. 2016-04-28 Bill Seurer * config/rs6000/rs6000-builtin.def (vec_adde): Change vec_adde to a special case builtin. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove ALTIVEC_BUILTIN_VEC_ADDE. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add support for ALTIVEC_BUILTIN_VEC_ADDE. * config/rs6000/rs6000.c (altivec_init_builtins): Add definition for __builtin_vec_adde. 2016-04-28 Jakub Jelinek * config/i386/i386.md (sse4_1_round2): Add avx512f alternative. * config/i386/sse.md (sse4_1_round): Likewise. 2016-04-28 Rainer Orth PR testsuite/70595 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes): Document cilkplus_runtime. 2016-04-28 Martin Jambor * tree-cfg.c (verify_expr): Verify that local declarations belong to this function. Call verify_expr on MEM_REFs and bases of other handled_components. 2016-04-28 Kyrylo Tkachov * internal-fn.c (expand_arith_overflow): Convert preprocessor check for WORD_REGISTER_OPERATIONS to runtime check. 2016-04-28 Claudiu Zissulescu * config/arc/arc.h (ASM_SPEC): Pass mfpuda to assembler. 2016-04-28 Claudiu Zissulescu * config/arc/arc.c (arc_process_double_reg_moves): Fix for big-endian compilation. * config/arc/arc.md (addf3): Likewise. (subdf3): Likewise. (muldf3): Likewise. 2016-04-28 Richard Biener PR tree-optimization/70840 * match.pd: powi(-x, y) and powi(|x|,y) -> powi(x,y) if y is even; Fix pow(copysign(x, y), z) -> pow(x, z) and add powi variant; Mark x * pow(x,c) -> pow(x,c+1) commutative. Add powi(x,y) * powi(z,y) -> powi(x*z,y). 2015-04-28 Kyrylo Tkachov * config/aarch64/aarch64.h (WORD_REGISTER_OPERATIONS): Define to 0 and explain why in a comment. 2016-04-28 Claudiu Zissulescu * config/arc/arc.md (cpu_facility): Add fpx variant. (subdf3): Prohibit use reverse sub when assist operations option is enabled. * config/arc/fpx.md (subdf3_insn, *dsubh_peep2_insn): Allow drsub instructions only when FPX is enabled. * testsuite/gcc.target/arc/trsub.c: New test. 2016-04-28 Uros Bizjak * config/i386/i386.md (*fop__1_mixed): Do not check for mult_operator when calculating "type" attribute. (*fop__1_i387): Ditto. (*fop_xf_1_i387): Ditto. (x87 stack loads peephole2): Add "reg = op (mem, reg)" peephole2. Use std::swap to swap operands. Use RTL expressions to generate converted pattern. 2016-04-28 Claudiu Zissulescu Joern Rennecke * config/arc/arc-protos.h (arc_legitimize_pic_address): Remove declaration. (emit_pic_move): Remove. (arc_eh_uses, insn_is_tls_gd_dispatch): Declare. * config/arc/arc.c (emit_pic_move): Removed. (TARGET_HAVE_TLS): Define. (arc_conditional_register_usage): Test for arc_tp_regno. (arc_print_operand, arc_print_operand_address): Handle TLS unspecs. (arc_needs_pcl_p): New function. (arc_legitimate_pc_offset_p): Use arc_needs_pcl_p. (arc_legitimate_pic_addr_p): Handle TLS unspecs. (arc_raw_symbolic_reference_mentioned_p): Likewise. (arc_get_tp, arc_emit_call_tls_get_addr): New function. (arc_legitimize_tls_address): Likewise. (DTPOFF_ZERO_SYM): Define. (arc_legitimize_pic_address): Make it static, handle TLS cases. (arc_output_pic_addr_const): Print TLS unspecs. (prepare_pic_move): New function, replaces emit_pic_move. (arc_legitimate_constant_p): Handle TLS unspecs. (arc_legitimate_address_p): Likewise. (arc_rewrite_small_data_p): Use assert for TLS constants. (prepare_move_operands): Use prepare_pic_move. (arc_legitimize_address): Legitimize tls addresses. (arc_epilogue_uses): Check for arc_tp_regno. (arc_eh_uses, insn_is_tls_gd_dispatch): New function. * config/arc/arc.h [DEFAULT_LIBC != LIBC_UCLIBC] (EXTRA_SPECS): Define. [DEFAULT_LIBC != LIBC_UCLIBC] (ARC_TLS_EXTRA_START_SPEC): Likewise. [DEFAULT_LIBC != LIBC_UCLIBC] (STARTFILE_SPEC): Add %(arc_tls_extra_start_spec). (TARGET_CPU_CPP_BUILTINS): Define __ARC_TLS_REGNO__. (REGNO_OK_FOR_BASE_P): Check for arc_tp_regno. (EH_USES): Define. (INSN_REFERENCES_ARE_DELAYED): Use insn_is_tls_gd_dispatch. * config/arc/arc.md (UNSPEC_TLS_GD, UNSPEC_TLS_LD, UNSPEC_TLS_IE) (UNSPEC_TLS_OFF): Add. (R10_REG): Define. (tls_load_tp_soft, tls_gd_load, tls_gd_get_addr, tls_gd_dispatch) (get_thread_pointersi): New patterns. * config/arc/arc.opt (mtp-regno): New option. * config/arc/predicates.md (move_src_operand): Handle TLS symbols. (move_dest_operand): Likewise. * configure: Regenerate. * configure.ac: Add arc*-*-* case to test for tls. * doc/invoke.texi (ARC options): Document mtp-regno. 2016-04-28 Claudiu Zissulescu