1 2018-10-29 Olivier Hainque <hainque@adacore.com>
3 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4 ports configuration macro, defaults to "gnu".
5 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
6 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
8 2018-10-29 Richard Biener <rguenther@suse.de>
10 PR tree-optimization/87790
11 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
12 (vect_make_slp_decision): Adjust.
13 (vect_slp_analyze_bb_1): Likewise.
14 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
17 2018-10-29 Richard Biener <rguenther@suse.de>
19 PR tree-optimization/87785
20 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
22 (vect_build_slp_tree): Likewise.
23 (vect_gather_slp_loads): New function.
24 (vect_analyze_slp_instance): Gather loads separately from the
27 2018-10-29 Martin Liska <mliska@suse.cz>
29 * Makefile.in: Make dependency to json.o.
30 * doc/gcov.texi: Document new JSON format, remove
31 old intermediate format documentation.
32 * gcov.c (struct function_info): Come up with m_name and
34 (function_info::function_info): Initialize it.
35 (function_info::~function_info): Release it.
36 (main): Rename flag_intermediate_format to flag_json_format.
37 (print_usage): Describe --json-format.
38 (process_args): Set flag_json_format.
39 (output_intermediate_line): Remove.
40 (output_intermediate_json_line): Likewise.
41 (get_gcov_intermediate_filename): Return new extension
43 (output_intermediate_file): Implement JSON emission.
44 (output_json_intermediate_file): Implement JSON emission.
45 (generate_results): Use ::get_name for function name.
46 Handle JSON output file.
47 (read_graph_file): Use ::get_name instead of cplus_demangle.
48 (read_count_file): Likewise.
49 (solve_flow_graph): Likewise.
50 (add_line_counts): Likewise.
51 (accumulate_line_counts): Use new flag_json_format.
52 (output_function_details): Use ::get_name instead of cplus_demangle.
53 (output_lines): Likewise.
54 * json.cc (test_writing_literals): Add new tests.
55 * json.h (class literal): Add new boolean constructor.
57 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
59 PR rtl-optimization/87701
60 PR rtl-optimization/87780
61 * combine.c (make_more_copies): Rewrite.
63 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
65 * doc/generic.texi (ABSU_EXPR): Document.
66 * match.pd (absu(x)*absu(x) -> x*x): Handle.
67 (absu(absu(X)) -> absu(X)): Likewise.
68 (absu(-X) -> absu(X)): Likewise.
69 (absu(X) where X is nonnegative -> X): Likewise.
71 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
73 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
74 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
75 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
76 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
77 (s-tm-texi): Also check timestamp on d-target.def.
78 (generated_files): Add TM_D_H and d-target-hooks-def.h.
79 (build/genhooks.o): Also depend on D_TARGET_DEF.
80 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
82 * config/aarch64/aarch64-d.c: New file.
83 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
85 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
87 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
88 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
89 * config/arm/arm-d.c: New file.
90 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
91 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
92 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
93 * config/arm/t-arm (arm-d.o): New rule.
94 * config/default-d.c: New file.
95 * config/glibc-d.c: New file.
96 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
97 * config/i386/i386-d.c: New file.
98 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
99 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
100 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
101 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
102 * config/i386/t-i386 (i386-d.o): New rule.
103 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
104 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
105 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
106 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
107 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
108 * config/mips/mips-d.c: New file.
109 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
110 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
111 * config/mips/t-mips (mips-d.o): New rule.
112 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
113 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
114 * config/powerpcspe/powerpcspe-d.c: New file.
115 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
117 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
118 Support GNU D by using 0 as the language type.
119 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
120 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
121 * config/riscv/riscv-d.c: New file.
122 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
124 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
125 * config/riscv/t-riscv (riscv-d.o): New rule.
126 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
127 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
128 * config/rs6000/rs6000-d.c: New file.
129 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
131 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
132 Support GNU D by using 0 as the language type.
133 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
134 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
135 * config/s390/s390-d.c: New file.
136 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
137 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
138 * config/s390/t-s390 (s390-d.o): New rule.
139 * config/sparc/sparc-d.c: New file.
140 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
142 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
143 * config/sparc/t-sparc (sparc-d.o): New rule.
144 * config/t-glibc (glibc-d.o): New rule.
145 * configure: Regenerated.
146 * configure.ac (tm_d_file): New variable.
147 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
148 * doc/contrib.texi (Contributors): Add self for the D frontend.
149 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
150 * doc/install.texi (Configuration): Mention libphobos as an option for
151 --enable-shared. Mention d as an option for --enable-languages.
152 (Testing): Mention check-d as a target.
153 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
154 name suffixes. Mention d as a -x option.
155 * doc/sourcebuild.texi (Top Level): Mention libphobos.
156 * doc/standards.texi (Standards): Add section on D language.
157 * doc/tm.texi: Regenerated.
158 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
159 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
160 * dwarf2out.c (is_dlang): New function.
161 (gen_compile_unit_die): Use DW_LANG_D for D.
162 (declare_in_namespace): Return module die for D, instead of adding
163 extra declarations into the namespace.
164 (gen_namespace_die): Generate DW_TAG_module for D.
165 (gen_decl_die): Handle CONST_DECLSs for D.
166 (dwarf2out_decl): Likewise.
167 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
168 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
170 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
171 * genhooks.c: Include d/d-target.def.
173 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
176 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
177 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
178 (STACK_DYNAMIC_OFFSET): Likewise.
180 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
183 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
186 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
188 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
189 return type and other typos.
191 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
193 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
194 a shorter sequence with fewer branches.
195 (emit_final_str_compare_gpr): Ditto.
197 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
199 * config/rs6000/tmmintrin.h: New file.
200 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
202 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
204 * config/rs6000/mmintrin.h: Enable 32bit compilation.
205 * config/rs6000/xmmintrin.h: Likewise.
207 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
209 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
211 2018-10-26 Richard Biener <rguenther@suse.de>
213 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
215 (vect_mark_slp_stmts_relevant): Likewise.
216 (vect_detect_hybrid_slp_stmts): Likewise.
217 (vect_bb_slp_scalar_cost): Likewise.
218 (vect_remove_slp_scalar_calls): Likewise.
220 2018-10-26 Jan Hubicka <jh@suse.cz>
222 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
223 (warn_types_mismatch): Fix walk of DECL_NAME.
224 (odr_types_equivalent_p): Fix overactive assert.
226 2018-10-26 Richard Biener <rguenther@suse.de>
228 PR tree-optimization/87105
229 * tree-vectorizer.h (_slp_tree::refcnt): New member.
230 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
232 (vect_create_new_slp_node): Initialize refcnt to one.
234 (scalar_stmts_set_t, bst_fail): Remove.
235 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
236 (vect_build_slp_tree): Add bst_map argument and lookup
237 already created SLP nodes.
238 (vect_print_slp_tree): Handle a SLP graph, print SLP node
240 (vect_slp_rearrange_stmts): Handle a SLP graph.
241 (vect_analyze_slp_instance): Adjust and free SLP nodes from
242 the CSE map. Fix indenting.
243 (vect_schedule_slp_instance): Add short-cut.
245 2018-10-26 Martin Liska <mliska@suse.cz>
248 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
249 addr_expr and not with pointers.
251 2018-10-26 Jan Hubicka <jh@suse.cz>
253 * tree.c (free_lang_data_in_type): Only check main variants.
254 * ipa-devirt.c (warn_odr): Make static.
255 (types_same_for_odr): Drop strict variant.
256 (types_odr_comparable): Likewise.
257 (odr_or_derived_type_p): Look for main variants.
258 (odr_name_hasher::equal): Cleanup comment.
259 (odr_subtypes_equivalent): Add warn and warned arguments; check main
261 (type_variants_equivalent_p): break out from ...
262 (odr_types_equivalent): ... here; go for main variants where needed.
263 (warn_odr): ... here; turn static.
264 (warn_types_mismatch): Compare mangled names of main variants.
265 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
266 (type_with_linkage_p): Sanity check that we look at main variant.
267 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
268 * tree.h (types_same_for_odr): Drop strict argument.
270 2018-10-26 Richard Biener <rguenther@suse.de>
272 PR tree-optimization/87746
273 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
274 Simplify and fix WRT strided store groups with size not
275 equal to step in element count.
276 (vect_analyze_group_access_1): Dump the whole group.
278 2018-10-25 Carl Love <cel@us.ibm.com>
280 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
281 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
282 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
283 precicion entry for each overloaded builtin.
284 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
285 VSCEDPUO): Rename overloaded name.
286 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
287 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
288 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
289 define_expand for xscmpexqp instruction.
290 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
292 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
293 Jinsong Ji <jji@us.ibm.com>
295 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
296 function with vec_sl.
297 (_mm_slli_epi32): Likewise.
298 (_mm_slli_epi64): Likewise.
299 (_mm_srai_epi16): Replace deprecated function with vec_sra.
300 (_mm_srai_epi32): Likewise.
301 (_mm_srli_epi16): Replace deprecated function with vec_sr.
302 (_mm_srli_epi32): Likewise.
303 (_mm_srli_epi64): Likewise.
304 (_mm_sll_epi16): Replace deprecated function with vec_sl.
305 (_mm_sll_epi32): Likewise.
306 (_mm_sll_epi64): Likewise.
307 (_mm_sra_epi16): Replace deprecated function with vec_sra.
308 (_mm_sra_epi32): Likewise.
309 (_mm_srl_epi16): Replace deprecated function with vec_sr.
310 (_mm_srl_epi32): Likewise.
311 (_mm_srl_epi64): Likewise.
313 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
314 Jinsong Ji <jji@us.ibm.com>
316 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
317 comparison operators with vec_cmp* for compatibility due to
318 unfortunate history; clean up formatting and use types more
320 (_mm_sll_epi32): Likewise.
321 (_mm_sll_epi64): Likewise.
322 (_mm_srl_epi16): Likewise.
323 (_mm_srl_epi32): Likewise.
324 (_mm_srl_epi64): Likewise.
326 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
327 Jinsong Ji <jji@us.ibm.com>
329 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
330 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
331 __vector __bool int. Use vec_cmpgt in preference to deprecated
332 function vec_vcmpgtfp.
333 (_mm_max_ps): Likewise.
335 2018-10-25 Jeff Law <law@redhat.com>
337 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
340 2018-10-25 Martin Sebor <msebor@redhat.com>
342 * doc/extend.texi (aligned): Expand attribute description.
343 (Alignment): Rename section. Discuss function arguments.
345 2018-10-25 Jan Hubicka <jh@suse.cz>
347 * ipa-devirt.c (main_odr_variant): Remove.
348 (hash_odr_name, types_same_for_odr, types_odr_comparable,
349 odr_name_hasher::equal, odr_subtypes_equivalent_p):
350 Drop use of main_odr_variant.
351 (add_type_duplicate): Silence confused warnings on integer types.
352 (get_odr_type): Always look for main variant.
353 (register_odr_type): Simplify.
355 2018-10-25 Richard Biener <rguenther@suse.de>
357 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
358 Initialize ng to silence error with release checking bootstrap.
360 2018-10-25 Richard Biener <rguenther@suse.de>
362 * tree-if-conv.c: Include tree-ssa-sccvn.h.
363 (tree_if_conversion): Run CSE on the if-converted loop body.
365 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
367 * config/s390/constraints.md (ZL): New constraint.
368 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
370 * config/s390/s390.md (movdi_larl): Remove.
371 (movdi_64): Add the LARL alternative.
373 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
376 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
377 (RTX_CODE_HWINT_P): New macro.
378 (rtx_code_size): Use RTX_CODE_HWINT_P ().
380 2018-10-25 Jan Hubicka <jh@suse.cz>
382 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
385 2018-10-25 Richard Biener <rguenther@suse.de>
387 PR tree-optimization/87665
388 PR tree-optimization/87745
389 * tree-vectorizer.h (get_earlier_stmt): Remove.
390 (get_later_stmt): Pick up UID from the original non-pattern stmt.
392 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
394 * options.texi (Deprecated): Move list to Var section.
396 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
397 Jinsong Ji <jji@us.ibm.com>
399 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
400 __vector long to __vector long long.
401 (_mm_cvtpd_ps): Likewise.
402 (_mm_cvttpd_epi32): Likewise.
403 (_mm_cvtpi32_pd): Likewise.
404 (_mm_unpackhi_epi64): Likewise.
405 (_mm_unpacklo_epi64): Likewise.
407 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
409 PR rtl-optimization/87720
410 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
412 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
414 * gimple-ssa-isolate-paths.c
415 (find_implicit_erroneous_behavior): Do not change code if the
416 pass is running for warnings only.
417 (find_explicit_erroneous_behavior): Likewise.
419 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
421 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
422 Define as rs6000_mangle_decl_assembler_name.
423 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
424 long double to IEEE long double, switch the names of the long
425 double built-in functions to be <func>f128 instead of <func>l.
427 2018-10-24 Martin Sebor <msebor@redhat.com>
429 * doc/extend.texi (nonnull): List no-argument form. Reference
430 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
432 2018-10-24 Richard Biener <rguenther@suse.de>
434 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
436 2018-10-24 Martin Liska <mliska@suse.cz>
438 PR tree-optimization/84436
439 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
441 (switch_conversion::contains_linear_function_p): New.
442 (switch_conversion::build_one_array): Support linear
443 transformation on input.
444 * tree-switch-conversion.h (struct switch_conversion): Add
445 contains_linear_function_p declaration.
447 2018-10-24 Richard Biener <rguenther@suse.de>
449 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
450 if its argument is CONSTANT_CLASS_P.
452 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
454 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
455 it is wrong for forward declarations.
457 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
459 * config/s390/s390.c (s390_check_qrst_address): Add the missing
460 SYMBOL_REF_P () check.
462 2018-10-24 Richard Biener <rguenther@suse.de>
464 PR tree-optimization/87105
465 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
467 (vect_analyze_data_ref_accesses): Handle duplicate loads and
468 stores by splitting the affected group after the fact.
469 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
470 fail the SLP build because of size constraints.
472 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
474 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
475 * configure: Regenerate.
476 * config.in: Regenerate.
477 * varasm.c (mergeable_string_section): Use readonly_data_section
478 if linker doesn't support SHF_MERGE with alignment > 8.
479 (mergeable_constant_section): Likewise.
481 2018-10-24 Richard Biener <rguenther@suse.de>
483 PR tree-optimization/84013
484 * tree-ssa-structalias.c (struct msdi_data): New struct for
485 marshalling data to walk_stmt_load_store_ops.
486 (maybe_set_dependence_info): Refactor as callback for
487 walk_stmt_load_store_ops.
488 (compute_dependence_clique): Set restrict info on all stmt kinds.
490 2018-10-24 Martin Liska <mliska@suse.cz>
492 * cgraph.c (cgraph_node::dump):
493 Remove reduntant dumps and make tp_first_run dump more compact.
495 2018-10-24 Richard Biener <rguenther@suse.de>
497 PR tree-optimization/87665
498 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
501 2018-10-12 Jeff Law <law@redhat.com>
503 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
506 2018-10-23 Richard Biener <rguenther@suse.de>
508 * tree-vrp.c (add_assert_info): Guard dump_printf with
510 * gimple-ssa-evrp-analyze.c
511 (evrp_range_analyzer::record_ranges_from_incoming_edge):
512 Use value_range::ignore_equivs_equal_p.
514 2018-10-23 Richard Biener <rguenther@suse.de>
516 PR tree-optimization/87105
517 PR tree-optimization/87608
518 * passes.def (pass_all_early_optimizations): Add early phi-opt
520 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
521 addition to debug stmts.
522 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
523 and abs replacement early.
524 * tree-cfg.c (gimple_empty_block_p): Likewise.
526 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
529 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
530 specified to configure.
531 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
533 2018-10-23 Richard Biener <rguenther@suse.de>
535 PR tree-optimization/87700
536 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
538 2018-10-23 Jakub Jelinek <jakub@redhat.com>
541 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
542 second argument from __mmask16 to __mmask8.
543 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
544 _mm_mask_packs_epi32): Likewise.
545 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
547 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
549 2018-10-23 Richard Biener <rguenther@suse.de>
551 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
553 2018-10-23 Richard Biener <rguenther@suse.de>
555 PR tree-optimization/86144
556 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
559 2018-10-23 Richard Biener <rguenther@suse.de>
561 PR tree-optimization/87693
562 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
563 the case we do not find the taken edge.
565 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
566 Jinsong Ji <jji@us.ibm.com>
568 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
569 (_mm_store_pd): Use unaligned vector type for pointer cast.
570 (_mm_maskmoveu_si128): Likewise.
571 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
572 (_mm_store_ps): Use unaligned vector type for pointer cast.
574 2018-10-22 Paul Koning <ni1d@arrl.net>
576 * symtab.c (symtab_node::increase_alignment): Correct max
579 2018-10-22 Yury Gribov <tetra2005@gmail.com>
581 PR tree-optimization/87633
582 * match.pd: Do not generate unordered integer comparisons.
584 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
586 PR rtl-optimization/87600
587 * combine.c: Add include of expr.h.
588 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
589 register to a pseudo.
590 (make_more_copies): New function, add a copy to a new pseudo after
591 the moves from hard registers into pseudos.
592 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
593 later. Call make_more_copies.
595 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
597 * lra-constraints.c (process_alt_operands): New local array,
598 matching_early_clobber. Check matching_early_clobber before
599 decrementing reject, and set matching_early_clobber after.
601 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
604 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
605 call output_addr_const and hope for the best.
607 2018-10-22 Richard Biener <rguenther@suse.de>
609 * gimple-ssa-evrp-analyze.c
610 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
611 smarter about what ranges to use.
612 * tree-vrp.c (add_assert_info): Dump here.
613 (register_edge_assert_for_2): Instead of here at multiple but
616 * gcc.dg/tree-ssa/evrp12.c: New testcase.
617 * gcc.dg/predict-6.c: Adjust.
618 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
619 * gcc.dg/tree-ssa/vrp02.c: Likewise.
620 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
622 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
623 Richard Biener <rguenther@suse.de>
625 * bitmap.h: Update data structure documentation, including a
626 description of bitmap views as either linked-lists or splay trees.
627 (struct bitmap_element_def): Update comments for splay tree bitmaps.
628 (struct bitmap_head_def): Likewise.
629 (bitmap_list_view, bitmap_tree_view): New prototypes.
630 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
632 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
633 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
634 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
635 released bitmap element here.
636 (bitmap_element_free): Remove.
637 (bitmap_elt_clear_from): Work on splay tree bitmaps.
638 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
639 this function similar ones such that linked-list bitmap implementation
640 functions are grouped.
641 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
642 and moved for grouping.
643 (bitmap_list_insert_element_after): Renamed from
644 bitmap_elt_insert_after, and moved for grouping.
645 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
646 (bitmap_tree_link_left, bitmap_tree_link_right,
647 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
648 bitmap_tree_link_element, bitmap_tree_unlink_element,
649 bitmap_tree_find_element): New functions for splay-tree bitmap
651 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
652 Renamed and moved, see above entries.
653 (bitmap_tree_listify_from): New function to convert part of a splay
654 tree bitmap to a linked-list bitmap.
655 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
656 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
657 (bitmap_find_bit): Remove.
658 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
659 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
660 Handle splay tree bitmaps.
661 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
662 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
663 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
664 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
665 bitmap_intersect_compl_p, bitmap_ior_and_compl,
666 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
667 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
668 corresponding changes to use linked-list specific bitmap_element
669 manipulation functions as applicable for efficiency.
670 (bitmap_tree_to_vec): New function.
671 (debug_bitmap_elt_file): New function split out from ...
672 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
673 (bitmap_print): Likewise.
675 PR tree-optimization/63155
676 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
678 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
681 2018-10-22 Martin Liska <mliska@suse.cz>
683 PR tree-optimization/87686
685 2018-08-29 Martin Liska <mliska@suse.cz>
687 * tree-switch-conversion.c (switch_conversion::expand):
688 Strenghten assumption about gswitch statements.
690 2018-10-22 Martin Liska <mliska@suse.cz>
692 * ipa-icf.c (sem_item::compare_attributes): Remove.
693 (sem_item::compare_referenced_symbol_properties): Use
694 attribute_list_equal instead.
695 (sem_function::equals_wpa): Likewise.
696 * ipa-icf.h: Remove compare_attributes.
698 2018-10-22 Richard Biener <rguenther@suse.de>
701 * mem-stats.h (mem_usage::operator==): Fix pasto.
703 2018-10-22 Richard Biener <rguenther@suse.de>
705 PR tree-optimization/87640
706 * tree-vrp.c (set_value_range_with_overflow): Decompose
708 (extract_range_from_binary_expr_1): Adjust.
710 2018-10-22 Martin Jambor <mjambor@suse.cz>
712 * tree-eh.h (stmt_could_throw_p): Add function parameter.
713 (stmt_can_throw_external): Likewise.
714 (stmt_can_throw_internal): Likewise.
715 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
716 (lower_eh_constructs_2): Likewise.
717 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
718 (stmt_can_throw_external): Likewise.
719 (stmt_can_throw_internal): Likewise.
720 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
721 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
722 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
723 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
724 (pass_lower_eh_dispatch::execute): Pass cfun to
725 stmt_can_throw_external.
726 (cleanup_empty_eh): Likewise.
727 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
728 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
729 stmt_can_throw_external instead of pushing it to cfun.
730 (symbol_table::create_edge): Likewise.
731 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
732 stmt_can_throw_internal.
733 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
734 to stmt_could_throw_p.
735 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
736 stmt_can_throw_internal.
737 (pass_store_merging::execute): Likewise.
738 * gimple-ssa-strength-reduction.c
739 (find_candidates_dom_walker::before_dom_children): Pass cfun to
741 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
742 stmt_can_throw_internal.
743 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
744 to stmt_can_throw_external.
745 (check_stmt): Pass cfun to stmt_could_throw_p.
746 (check_stmt): Pass cfun to stmt_can_throw_external.
747 (pass_nothrow::execute): Likewise.
748 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
749 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
750 stmt_can_throw_internal.
751 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
752 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
753 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
754 * tree-complex.c (expand_complex_libcall): Pass cfun to
755 stmt_could_throw_p and to stmt_can_throw_internal.
756 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
757 * tree-inline.c (copy_edges_for_bb): Likewise.
758 (maybe_move_debug_stmts_to_successors): Likewise.
759 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
761 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
762 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
763 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
764 stmt_can_throw_internal.
765 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
766 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
768 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
769 stmt_can_throw_internal.
770 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
771 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
773 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
774 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
775 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
776 (convert_mult_to_fma_1): Likewise.
777 (convert_to_divmod): Likewise.
778 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
779 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
780 * tree-ssa-propagate.c
781 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
782 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
783 (maybe_optimize_range_tests): Likewise.
784 (linearize_expr_tree): Likewise.
785 (reassociate_bb): Likewise.
786 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
787 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
788 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
789 (handle_char_store): Likewise.
790 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
791 stmt_can_throw_internal.
792 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
794 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
795 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
796 (vectorizable_simd_clone_call): Likewise.
797 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
798 (gimple_stringop_fixed_value): Likewise.
800 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
802 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
803 literal pool references.
804 (s390_check_qrst_address): Adapt to the new behavior of
805 s390_loadrelative_operand_p ().
807 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
810 * config/i386/sse.md (*andnot<mode>3_bcst): New.
812 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
815 * config/i386/sse.md (*<code><mode>3_bcst): New.
817 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
820 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
821 V4DI, V16SI and V8DI.
822 (*sub<mode>3<mask_name>_bcst): New.
823 (*add<mode>3<mask_name>_bcst): Likewise.
825 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
826 Jinsong Ji <jji@us.ibm.com>
828 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
829 __m64 with __vector unsigned long long for compatibility.
830 (_mm_movemask_epi8): Likewise.
831 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
832 (_mm_cvttps_pi32): Likewise.
833 (_mm_cvtpi32_ps): Likewise.
834 (_mm_cvtps_pi16): Likewise.
835 (_mm_loadh_pi): Likewise.
836 (_mm_storeh_pi): Likewise.
837 (_mm_movehl_ps): Likewise.
838 (_mm_movelh_ps): Likewise.
839 (_mm_loadl_pi): Likewise.
840 (_mm_storel_pi): Likewise.
841 (_mm_movemask_ps): Likewise.
842 (_mm_shuffle_pi16): Likewise.
844 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
847 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
848 __builtin_ia32_vfnmsubpd512_mask.
849 (_mm512_mask_fnmsub_round_pd): Likewise.
850 (_mm512_fnmsub_pd): Likewise.
851 (_mm512_mask_fnmsub_pd): Likewise.
852 (_mm512_maskz_fnmsub_round_pd): Use
853 __builtin_ia32_vfnmsubpd512_maskz.
854 (_mm512_maskz_fnmsub_pd): Likewise.
855 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
856 (_mm512_mask_fnmsub_round_ps): Likewise.
857 (_mm512_fnmsub_ps): Likewise.
858 (_mm512_mask_fnmsub_ps): Likewise.
859 (_mm512_maskz_fnmsub_round_ps): Use
860 __builtin_ia32_vfnmsubps512_maskz.
861 (_mm512_maskz_fnmsub_ps): Likewise.
862 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
863 __builtin_ia32_vfnmsubpd256_mask.
864 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
865 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
866 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
867 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
868 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
869 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
870 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
871 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
872 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
873 __builtin_ia32_vfnmsubpd.
874 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
875 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
876 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
877 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
878 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
879 * config/i386/i386-builtin.def: Add
880 __builtin_ia32_vfnmsubpd256_mask,
881 __builtin_ia32_vfnmsubpd256_maskz,
882 __builtin_ia32_vfnmsubpd128_mask,
883 __builtin_ia32_vfnmsubpd128_maskz,
884 __builtin_ia32_vfnmsubps256_mask,
885 __builtin_ia32_vfnmsubps256_maskz,
886 __builtin_ia32_vfnmsubps128_mask,
887 __builtin_ia32_vfnmsubps128_maskz,
888 __builtin_ia32_vfnmsubpd512_mask,
889 __builtin_ia32_vfnmsubpd512_maskz,
890 __builtin_ia32_vfnmsubps512_mask,
891 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
892 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
893 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
894 __builtin_ia32_vfnmsubpd256.
895 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
896 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
897 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
899 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
901 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
903 (fmai_vmfnmsub_<mode><round_name>): Likewise.
905 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
908 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
909 __builtin_ia32_vfnmaddpd512_mask.
910 (_mm512_mask_fnmadd_round_pd): Likewise.
911 (_mm512_fnmadd_pd): Likewise.
912 (_mm512_mask_fnmadd_pd): Likewise.
913 (_mm512_maskz_fnmadd_round_pd): Use
914 __builtin_ia32_vfnmaddpd512_maskz.
915 (_mm512_maskz_fnmadd_pd): Likewise.
916 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
917 (_mm512_mask_fnmadd_round_ps): Likewise.
918 (_mm512_fnmadd_ps): Likewise.
919 (_mm512_mask_fnmadd_ps): Likewise.
920 (_mm512_maskz_fnmadd_round_ps): Use
921 __builtin_ia32_vfnmaddps512_maskz.
922 (_mm512_maskz_fnmadd_ps): Likewise.
923 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
924 __builtin_ia32_vfnmaddpd256_mask.
925 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
926 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
927 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
928 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
929 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
930 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
931 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
932 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
933 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
934 __builtin_ia32_vfnmaddpd.
935 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
936 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
937 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
938 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
939 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
940 * config/i386/i386-builtin.def: Add
941 __builtin_ia32_vfnmaddpd256_mask,
942 __builtin_ia32_vfnmaddpd256_maskz,
943 __builtin_ia32_vfnmaddpd128_mask,
944 __builtin_ia32_vfnmaddpd128_maskz,
945 __builtin_ia32_vfnmaddps256_mask,
946 __builtin_ia32_vfnmaddps256_maskz,
947 __builtin_ia32_vfnmaddps128_mask,
948 __builtin_ia32_vfnmaddps128_maskz,
949 __builtin_ia32_vfnmaddpd512_mask,
950 __builtin_ia32_vfnmaddpd512_maskz,
951 __builtin_ia32_vfnmaddps512_mask,
952 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
953 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
954 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
955 __builtin_ia32_vfnmaddpd256.
956 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
957 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
958 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
960 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
962 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
964 (fmai_vmfnmadd_<mode><round_name>): Likewise.
966 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
969 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
970 __builtin_ia32_vfmsubpd512_mask.
971 (_mm512_mask_fmsub_round_pd): Likewise.
972 (_mm512_fmsub_pd): Likewise.
973 (_mm512_mask_fmsub_pd): Likewise.
974 (_mm512_maskz_fmsub_round_pd): Use
975 __builtin_ia32_vfmsubpd512_maskz.
976 (_mm512_maskz_fmsub_pd): Likewise.
977 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
978 (_mm512_mask_fmsub_round_ps): Likewise.
979 (_mm512_fmsub_ps): Likewise.
980 (_mm512_mask_fmsub_ps): Likewise.
981 (_mm512_maskz_fmsub_round_ps): Use
982 __builtin_ia32_vfmsubps512_maskz.
983 (_mm512_maskz_fmsub_ps): Likewise.
984 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
985 __builtin_ia32_vfmsubpd256_mask.
986 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
987 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
988 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
989 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
990 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
991 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
992 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
993 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
994 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
995 __builtin_ia32_vfmsubpd.
996 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
997 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
998 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
999 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1000 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1001 * config/i386/i386-builtin.def: Add
1002 __builtin_ia32_vfmsubpd256_mask,
1003 __builtin_ia32_vfmsubpd256_maskz,
1004 __builtin_ia32_vfmsubpd128_mask,
1005 __builtin_ia32_vfmsubpd128_maskz,
1006 __builtin_ia32_vfmsubps256_mask,
1007 __builtin_ia32_vfmsubps256_maskz,
1008 __builtin_ia32_vfmsubps128_mask,
1009 __builtin_ia32_vfmsubps128_maskz,
1010 __builtin_ia32_vfmsubpd512_mask,
1011 __builtin_ia32_vfmsubpd512_maskz,
1012 __builtin_ia32_vfmsubps512_mask,
1013 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1014 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1015 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1016 __builtin_ia32_vfmsubpd256.
1017 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1018 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1019 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1021 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1023 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1025 (fmai_vmfmsub_<mode><round_name>): Likewise.
1027 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1029 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1030 Remove plus. Renamed to ...
1031 (*sub<mode>3<mask_name>_bcst): This.
1032 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1033 (*add<mode>3<mask_name>_bcst): This.
1035 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1038 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1040 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1043 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1044 (_mm_or_epi32): Likewise.
1045 (_mm256_xor_epi32): Likewise.
1046 (_mm_xor_epi32): Likewise.
1047 (_mm256_or_epi64): Likewise.
1048 (_mm_or_epi64): Likewise.
1049 (_mm256_xor_epi64): Likewise.
1050 (_mm_xor_epi64): Likewise.
1052 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1055 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1057 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1060 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1062 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1064 * doc/ux.texi: Move @section directly after @node.
1066 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1070 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1071 depend closely nested inside of loop with ordered clause with
1074 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1076 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1077 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1078 * doc/ux.texi: New file.
1080 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1082 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1083 be the first CR field allocated.
1085 2018-10-19 Richard Biener <rguenther@suse.de>
1088 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1089 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1091 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1094 * config/i386/sse.md
1095 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1096 (*add<mode>3<mask_name>_bcst_2): Likewise.
1098 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1100 * config/i386/sse.md
1101 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1102 Replace nonimmediate_operand with register_operand.
1103 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1105 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1108 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1110 PR rtl-optimization/87596
1111 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1112 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1113 for instructions in FROM..TO range.
1115 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1117 * cfgexpand.c (expand_one_var): Use specific wording in error message
1118 for non-local frame variables.
1119 * stor-layout.c (layout_decl): Do not issue a warning for them.
1121 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1123 * haifa-sched.c (priority): Add force_recompute parameter.
1124 (apply_replacement): Call priority () with force_recompute = true.
1125 (restore_pattern): Likewise.
1127 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1129 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1130 HOST_BITS_PER_WIDE_INT.
1131 (test_vector_ops_duplicate): Likewise.
1133 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1136 * config/i386/sse.md (VF_AVX512): New.
1137 (avx512bcst): Likewise.
1138 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1140 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1142 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1145 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1147 * doc/invoke.texi (-dumpversion): Improve grammar.
1148 (-dumpfullversion): Make more consistent with -dumpversion.
1150 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1152 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1153 Set JUMP_LABEL to the jump insn.
1154 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1155 Predict emitted jump and add label to jump insn.
1157 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1159 PR tree-optimization/87562
1160 * input.c (get_substring_ranges_for_loc): Use
1161 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1162 getting the linemap for the endpoint. Verify that it's either
1163 in the same linemap as the start point's spelling location, or
1164 at least in the same file.
1166 2018-10-18 Richard Biener <rguenther@suse.de>
1168 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1169 feed width-specific load/store costs through ix86_vec_cost.
1170 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1171 (k8_cost): Likewise.
1172 (bdver_cost): Likewise.
1173 (znver1_cost): Likewise.
1174 (btver1_cost): Likewise.
1175 (btver2_cost): Likewise.
1177 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1179 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1180 to simplify subreg of vec_merge.
1182 2018-10-18 Richard Biener <rguenther@suse.de>
1184 * config/i386/i386.c: Fix costing of vector FMA.
1186 2018-10-18 Richard Biener <rguenther@suse.de>
1188 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1190 (ix86_builtin_vectorization_cost): For vec_construct properly
1191 cost insertion into SSE regs.
1192 (...): Adjust calls to ix86_vec_cost.
1194 2018-10-18 Richard Biener <rguenther@suse.de>
1198 2018-02-07 Richard Biener <rguenther@suse.de>
1200 PR tree-optimization/84204
1201 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1204 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1207 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1209 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1210 VEC_MERGE of a VEC_DUPLICATE.
1212 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1214 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1215 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1216 * doc/standards.texi (C Language): Document C2X.
1217 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1218 (rl78_option_override): Handle "GNU C2X" language name.
1220 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1222 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1223 Document C17 as published in 2018.
1225 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1228 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1229 bail out if both sides do not have the same storage order.
1231 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1233 * bitmap.c (bitmap_head::dump): New.
1234 * bitmap.h (bitmap_head): Add dump().
1235 * gimple-ssa-evrp-analyze.c
1236 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1237 (evrp_range_analyzer::set_ssa_range_info): Same.
1238 (evrp_range_analyzer::record_ranges_from_phis): Same.
1239 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1240 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1241 * gimple-ssa-sprintf.c (get_int_range): Same.
1242 (format_integer): Same.
1243 (sprintf_dom_walker::handle_gimple_call): Same.
1244 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1245 (ipcp_vr_lattice::top_p): Same.
1246 (ipcp_vr_lattice::bottom_p): Same.
1247 (ipcp_vr_lattice::set_to_bottom): Same.
1248 (ipa_vr_operation_and_type_effects): Same.
1249 (propagate_vr_across_jump_function): Same.
1250 (ipcp_store_vr_results): Same.
1251 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1252 (ipa_print_node_jump_functions_for_edge): Same.
1253 (ipa_get_value_range): Same.
1254 (ipa_compute_jump_functions_for_edge): Same.
1255 (ipa_write_jump_function): Same.
1256 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1257 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1259 * vr-values.c (set_value_range_to_nonnegative): Same.
1260 (set_value_range_to_truthvalue): Same.
1261 (vr_values::get_value_range): Same.
1262 (vr_values::set_defs_to_varying): Same.
1263 (vr_values::update_value_range): Same.
1264 (symbolic_range_based_on_p): Same.
1265 (vr_values::op_with_boolean_value_range_p): Same.
1266 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1267 (vr_values::extract_range_from_ssa_name): Same.
1268 (vr_values::extract_range_from_binary_expr): Same.
1269 (vr_values::extract_range_from_unary_expr): Same.
1270 (vr_values::extract_range_from_cond_expr): Same.
1271 (vr_values::extract_range_from_comparison): Same.
1272 (vr_values::check_for_binary_op_overflow): Same.
1273 (vr_values::extract_range_basic): Same.
1274 (vr_values::extract_range_from_assignment): Same.
1275 (compare_ranges): Same.
1276 (compare_range_with_value): Same.
1277 (vr_values::adjust_range_with_scev): Same.
1278 (vrp_valueize): Same.
1279 (vrp_valueize_1): Same.
1280 (vr_values::get_vr_for_comparison): Same.
1281 (vr_values::compare_name_with_value): Same.
1282 (vr_values::compare_names): Same.
1283 (vr_values::vrp_evaluate_conditional): Same.
1284 (find_case_label_ranges): Same.
1285 (vr_values::vrp_visit_switch_stmt): Same.
1286 (vr_values::extract_range_from_phi_node): Same.
1287 (vr_values::simplify_div_or_mod_using_ranges): Same.
1288 (vr_values::simplify_bit_ops_using_ranges): Same.
1289 (test_for_singularity): Same.
1290 (range_fits_type_p): Same.
1291 (vr_values::simplify_cond_using_ranges_1): Same.
1292 (vr_values::simplify_switch_using_ranges): Same.
1293 (vr_values::simplify_float_conversion_using_ranges): Same.
1294 (vr_values::two_valued_val_range_p): Same.
1295 (vr_values::add_equivalence): Move to value_range::equiv_add.
1296 * vr-values.h (vr_values::add_equivalence): Remove.
1297 (VR_INITIALIZER): Remove.
1298 * tree-vrp.c (value_range::set): New.
1299 (value_range::equiv_add): New.
1300 (value_range::value_range): New.
1301 (value_range::deep_copy): New.
1302 (value_range::check): New.
1303 (value_range::equal_p): New.
1304 (value_range::ignore_equivs_equal_p): New.
1305 (value_range::operator==): New.
1306 (value_range::operator!=): New.
1307 (value_range::symbolic_p): New.
1308 (value_range::numeric_p): New.
1309 (value_range::set_undefined): New.
1310 (value_range::set_varying): New.
1311 (value_range::may_contain_p): New.
1312 (value_range::equiv_clear): New.
1313 (value_range::singleton_p): New.
1314 (value_range::intersect): New.
1315 (value_range::dump): New.
1316 (value_range::set_and_canonicalize): New.
1317 (set_value_range): Adjust for value_range API.
1318 (set_value_range_to_undefined): Same.
1319 (set_value_range_to_varying): Same.
1320 (set_and_canonicalize_value_range): Same.
1321 (set_value_range_to_nonnull): Same.
1322 (set_value_range_to_null): Same.
1323 (range_is_null): Same.
1324 (range_is_nonnull): Same.
1325 (range_int_cst_p): Same.
1326 (range_int_cst_singleton_p): Same.
1327 (symbolic_range_p): Same.
1328 (range_includes_zero_p): Same.
1329 (value_range_constant_singleton): Same.
1330 (vrp_set_zero_nonzero_bits): Same.
1331 (ranges_from_anti_range): Same.
1332 (extract_range_into_wide_ints): Same.
1333 (extract_range_from_multiplicative_op): Same.
1334 (set_value_range_with_overflow): Same.
1335 (extract_range_from_binary_expr_1): Same.
1336 (extract_range_from_unary_expr): Same.
1337 (dump_value_range): Same.
1338 (debug_value_range): Same.
1339 (vrp_prop::check_array_ref): Same.
1340 (vrp_prop::check_mem_ref): Same.
1341 (vrp_prop::vrp_initialize): Same.
1342 (vrp_prop::visit_stmt): Same.
1343 (intersect_ranges): Same.
1344 (vrp_prop::visit_phi): Same.
1345 (vrp_prop::vrp_finalize): Same.
1346 (determine_value_range_1): Same.
1347 (determine_value_range): Same.
1348 (vrp_intersect_ranges_1): Rename to...
1349 (vrp_intersect_1): this.
1350 (vrp_intersect_ranges): Rename to...
1351 (value_range::intersect_helper): ...this.
1352 (vrp_meet_1): Rename to...
1353 (value_range::union_helper): ...this.
1354 (vrp_meet): Rename to...
1355 (value_range::union_): ...this.
1356 (copy_value_range): Remove.
1357 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1358 (value_range::vrtype): New.
1359 (value_range::type): New.
1360 (value_range::equiv): New.
1361 (value_range::min): New.
1362 (value_range::max): New.
1363 (value_range::varying_p): New.
1364 (value_range::undefined_p): New.
1365 (value_range::null_p): New.
1366 (value_range::equiv_add): New.
1367 (copy_value_range): Remove.
1369 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1371 * Makefile.in (SELFTEST_TARGETS): New.
1372 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1373 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1374 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1376 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1377 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1379 * configure: Regenerate.
1380 * configure.ac (selftest_languages): New.
1382 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1384 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1385 overflow wraps argument.
1386 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1387 wide_int_range_multiplicative_op.
1388 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1389 overflow wraps argument.
1390 (wide_int_range_multiplicative_op): Same.
1391 (wide_int_range_lshift): Same.
1392 (wide_int_range_div): Same.
1393 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1394 (wide_int_range_lshift): Same.
1395 (wide_int_range_div): Same.
1397 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1399 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1400 use sign as argument.
1401 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1402 wide_int_range_shift_undefined_p.
1404 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1406 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1408 (@despeculate_copy<ALLI_TI:mode>): ... This.
1409 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1412 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1414 * config.gcc: Obsolete *-*-solaris2.10*.
1415 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1417 2018-10-12 Jeff Law <law@redhat.com>
1419 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1420 reg + sym +- const_int addressing modes.
1422 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1424 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1425 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1427 (layout::start_annotation_line): Only print up to 3 of the
1428 margin character, to avoid touching the left-hand side.
1429 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1430 minimum margin width, as set by test_diagnostic_context's ctor.
1431 (selftest::test_fixit_insert_containing_newline): Likewise.
1432 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1433 (selftest::test_line_numbers_multiline_range): Clear
1434 dc.min_margin_width.
1435 * diagnostic.c (diagnostic_initialize): Initialize
1437 * diagnostic.h (struct diagnostic_context): Add field
1439 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1440 * opts.c (common_handle_option): Handle
1441 OPT_fdiagnostics_minimum_margin_width_.
1442 * selftest-diagnostic.c
1443 (selftest::test_diagnostic_context::test_diagnostic_context):
1444 Initialize min_margin_width to 6.
1445 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1447 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1449 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1450 Fix usage of "error_at_rich_loc" in the comment.
1452 2018-10-15 Renlin Li <renlin.li@arm.com>
1455 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1456 if-conversioned loop when it contains ifn with types not
1457 supported by backend.
1458 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1459 (direct_internal_fn_supported_p): New helper function.
1460 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1462 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1465 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1466 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1467 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1469 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1471 PR tree-optimization/87022
1472 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1473 bits in dist vector rather than the first one.
1475 2018-10-15 Richard Biener <rguenther@suse.de>
1478 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1479 (visit_loadstore): When a used restrict tag escaped verify that
1480 the points-to solution of "other" pointers do not include
1482 (compute_dependence_clique): If a used restrict tag escaped
1483 communicated that down to visit_loadstore.
1485 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1487 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1488 into reg if it isn't a general operand.
1490 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1493 * config/i386/sse.md (*vec_dupv2di): Add register source to
1496 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1499 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1500 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1501 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1502 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1504 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1506 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1507 (notice_args_size): Set it in the current trace if no insn that can
1508 throw internally has been seen yet.
1509 (connect_traces): When connecting args_size between traces, allow the
1510 incoming values not to match if there is an insn setting it before the
1511 first insn that can throw internally; in that case, force the creation
1512 of a CFI note on this latter insn.
1514 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1516 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1517 the base class, because using the injected-class-name was not clearly
1518 specified until DR 176.
1520 2018-10-12 Paul Koning <ni1d@arrl.net>
1522 * config/pdp11/pdp11.md (doloop_end): New expander.
1523 (doloop_end_insn): renamed from "doloop_end".
1524 (addqi3): New pattern.
1525 (subqi3): New pattern.
1526 * config/pdp11/predicates.md (incdec_operand): New predicate.
1528 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1531 * real.c (format_helper::can_represent_integral_type_p): New function
1532 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1533 * match.pd: New pattern.
1535 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1537 * configure.ac: Introduce --enable-large-address-aware
1538 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1539 * doc/install.texi: Document it.
1540 * configure, config.in: Rebuilt.
1541 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1542 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1543 (LINK_SPEC): Insert it.
1544 * config/i386/mingw-264.h: Likewise.
1546 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1548 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1550 PR rtl-optimization/87600
1551 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1553 2018-10-12 Paul Koning <ni1d@arrl.net>
1555 * doc/md.texi (doloop_end): Document that the pattern code may
1556 need to check operand mode.
1558 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1560 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1561 to zero-extend between int and floating-point registers.
1562 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1563 ldp into floating-point registers. Add type and arch attributes.
1564 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1565 Use f_loads for type attribute.
1567 2018-10-11 Martin Sebor <msebor@redhat.com>
1569 * doc/extend.texi (attribute packed): Correct typos.
1571 2018-10-11 Martin Sebor <msebor@redhat.com>
1573 * doc/extend.texi (attribute flatten): Mention interaction with
1576 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1579 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1580 Set new_decl virtual flag to zero.
1582 2018-10-11 Martin Sebor <msebor@redhat.com>
1585 * doc/extend.texi (attribute format_arg): Discuss using multiple
1586 attributes on a single function.
1588 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1590 PR tree-optimization/86829
1591 * match.pd (sin (atan (x))): New simplification rules.
1592 (cos (atan (x))): Likewise.
1593 * real.c (build_sinatan_real): New function.
1594 * real.h (build_sinatan_real): Prototype.
1596 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1598 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1600 (fold_mergeeo_helper): New helper function.
1601 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1602 intrinsics. Correct some whitespace indentation issues.
1604 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1607 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1608 Use HOST_WIDE_INT_1U for shift.
1610 2018-10-11 Doug Rupp <rupp@adacore.com>
1611 Olivier Hainque <hainque@adacore.com>
1613 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1614 Pass --relax to the linker for RTPs.
1615 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1617 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1618 Jan Hubicka <jh@suse.cz>
1619 Martin Jambor <mjambor@suse.cz>
1621 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1622 the same elements are repeated rather than printing all of them.
1623 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1624 "repeated" elements.
1625 * read-rtl-function.c (test_loading_repeat): New function.
1626 (read_rtl_function_c_tests): Call test_loading_repeat.
1627 * rtl-tests.c (test_dumping_repeat): New function.
1628 (rtl_tests_c_tests): Call test_dumping_repeat.
1630 2018-10-11 Richard Biener <rguenther@suse.de>
1632 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1633 bdver?_cost): Unify to ...
1634 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1635 * config/i386/i386.c (processor_cost_table): Adjust.
1637 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1640 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1641 the thunk when expanding to GIMPLE.
1643 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1645 * varasm.c (mergeable_string_section): Don't try to move zero-length
1646 strings to the merge section.
1648 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1651 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1653 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1656 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1657 to special_args set.
1659 2018-10-10 Richard Biener <rguenther@suse.de>
1661 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1662 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1663 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1664 and recursing and pattern terminating the recursion on SSE
1665 vector width using ix86_expand_reduc.
1666 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1667 width and recursing and SSE2 vector variant doing the final
1668 reduction with ix86_expand_reduc.
1669 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1670 with terminating the recursion at AVX level, splitting that
1673 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1675 * genmatch.c (error_cb): Rename to...
1676 (diagnostic_cb): ...this, converting int params to enums.
1677 (fatal_at): Update for renaming.
1678 (warning_at): Likewise.
1680 * input.c (selftest::ebcdic_execution_charset::apply):
1681 Update for renaming of...
1682 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1684 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1685 converting level and reason to enums.
1686 (class selftest::lexer_error_sink): Rename to...
1687 (class selftest::lexer_test_options): ...this, renaming field
1688 "m_errors" to "m_diagnostics".
1689 (selftest::lexer_test_options::apply): Update for renaming of...
1690 (selftest::lexer_test_options::on_error): ...this, renaming to...
1691 (selftest::lexer_test_options::on_diagnostic): ...this
1692 converting level and reason to enums.
1693 (selftest::test_lexer_string_locations_raw_string_unterminated):
1694 Update for renamings.
1695 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1698 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1700 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1701 * config/rs6000/pmmintrin.h: New file.
1703 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1705 PR tree-optimization/86659
1706 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1708 2018-10-09 Richard Biener <rguenther@suse.de>
1710 PR tree-optimization/63155
1711 * tree-ssa-structalias.c: Include tree-ssa.h.
1712 (get_constraint_for_ssa_var): For undefs return nothing_id.
1713 (find_func_aliases): Cleanup PHI handling.
1715 2018-10-09 Richard Biener <rguenther@suse.de>
1717 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1720 2018-10-09 Martin Liska <mliska@suse.cz>
1722 * asan.c (asan_emit_stack_protection): If a stack variable
1723 is located in a same file as current function, then emit
1724 line info into variable definition string.
1726 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1728 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1731 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1733 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1736 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1738 PR tree-optimization/86659
1739 * gimple-match.h (struct gimple_match_op): Add reverse field.
1740 (gimple_match_op::set_op): New overloaded method.
1741 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1742 the REF_REVERSE_STORAGE_ORDER flag on the value.
1743 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1744 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1746 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1749 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1750 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1752 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
1755 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1756 Defined with __builtin_ia32_vfmaddsubpd512_mask.
1758 2018-10-08 Richard Biener <rguenther@suse.de>
1760 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1761 cost the same as AVX128 ones.
1763 2018-10-08 Paul Koning <ni1d@arrl.net>
1765 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1766 (expand_block_move): New function.
1767 * config/pdp11/pdp11.c (output_block_move): Remove.
1768 (expand_block_move): New function.
1769 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1770 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1771 (*movmemhi1): Remove.
1773 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
1775 * config/s390/2827.md: Increase latencies for some FP instructions.
1777 2018-10-08 Richard Biener <rguenther@suse.de>
1779 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1781 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1782 * tree-vectorizer.h (dump_stmt_cost): Adjust.
1783 (add_stmt_cost): Dump return value of the hook.
1785 2018-10-08 Richard Biener <rguenther@suse.de>
1787 PR tree-optimization/63155
1788 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1789 (ssa_propagation_engine::ssa_propagate): Remove redundant
1790 bitmap bit clearing.
1792 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
1794 PR rtl-optimization/86939
1795 PR rtl-optimization/87479
1796 * ira.h (non_conflicting_reg_copy_p): New prototype.
1797 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1798 (make_hard_regno_dead): Don't add conflicts for register
1799 ignore_reg_for_conflicts.
1800 (make_object_dead): Likewise.
1801 (non_conflicting_reg_copy_p): New function.
1802 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1803 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1804 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1805 (make_hard_regno_dead): Don't add conflicts for register
1806 ignore_reg_for_conflicts. Remove special conflict handling of
1807 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
1808 check_pic_pseudo_p and update callers.
1809 (mark_pseudo_dead): Don't add conflicts for register
1810 ignore_reg_for_conflicts.
1811 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1813 2018-10-05 Andrew Waterman <andrew@sifive.com>
1814 Jim Wilson <jimw@sifive.com>
1816 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1817 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
1818 new pattern using HONOR_SNANS that emits one extra instruction.
1820 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1822 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1823 patterns): Merge SI and DI patterns to a GPR pattern.
1824 (unnamed define_insn and define_split for record form of that): Merge
1825 to a single define_insn_and_split pattern.
1827 2018-10-05 David Malcolm <dmalcolm@redhat.com>
1830 * input.c (expand_location_to_spelling_point): Add param "aspect"
1831 and use rather than hardcoding LOCATION_ASPECT_CARET.
1832 (get_substring_ranges_for_loc): Handle the case of a single token
1833 within a macro expansion.
1834 * input.h (expand_location_to_spelling_point): Add "aspect" param,
1835 defaulting to LOCATION_ASPECT_CARET.
1837 2018-10-05 Paul Koning <ni1d@arrl.net>
1839 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1840 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1841 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1842 (pdp11_guard_type): New function.
1844 2018-10-05 Paul Koning <ni1d@arrl.net>
1846 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1847 * config/pdp11/pdp11.opt (mfloat32): Remove.
1849 * doc/invoke.texi (pdp11 -mfloat32): Remove:
1850 (pdp11 -mfloat64): Remove.
1852 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1854 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1855 (*cmp<mode>_cc_i387): Ditto.
1856 (*cmpu<mode>_cc_i387): Ditto.
1857 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1858 * config/i386/i386.c (ix86_expand_fp_compare): Remove
1860 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1861 Emit x86_sahf_1 pattern.
1862 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1863 (ix86_expand_carry_flag_compare): Ditto.
1865 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1867 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1868 to reg_or_0_operand. Add "C" constraint.
1869 (*cmpxf_cc_i387): Ditto.
1870 (*cmp<mode>_i387): Change operand 2 predicate
1871 to nonimm_or_0_operand. Add "C" constraint.
1872 (*cmp<mode>_cc_i387): Ditto.
1873 (*cmp<mode>_0_i387): Remove insn pattern.
1874 (*cmp<mode>_0_cc_i387): Ditto.
1876 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1878 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1879 * config/i386/predicates.md (nonimm_or_0_operand): Rename
1880 from vector_move_operand. Update all uses.
1882 2018-10-05 Martin Sebor <msebor@redhat.com>
1884 PR tree-optimization/87490
1885 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1888 2018-10-05 Richard Biener <rguenther@suse.de>
1890 PR tree-optimization/63155
1891 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1892 vertical space in dumpfiles.
1893 * tree-ssa-propagate.h
1894 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1895 * tree-ssa-propagate.c (cfg_blocks_back): New global.
1896 (ssa_edge_worklist_back): Likewise.
1897 (curr_order): Likewise.
1898 (cfg_blocks_get): Remove abstraction.
1899 (cfg_blocks_add): Likewise.
1900 (cfg_blocks_empty_p): Likewise.
1901 (add_ssa_edge): Add to current or next worklist based on
1903 (add_control_edge): Likewise.
1904 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1906 (ssa_propagation_engine::ssa_propagate): ... here. Unify
1907 iteration from CFG and SSA edge worklist so we process
1908 everything in RPO order, prioritizing forward progress
1910 (ssa_prop_init): Allocate new worklists, do not dump
1912 (ssa_prop_fini): Free new worklists.
1914 2018-10-05 Richard Biener <rguenther@suse.de>
1916 * tree-core.h (tree_block::abstract_flag): Remove.
1917 (tree_block::block_num): Make full 32bits.
1918 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1919 * tree.h (BLOCK_ABSTRACT): Remove.
1920 * dwarf2out.c (gen_lexical_block_die): Remove dead code
1921 resulting from BLOCK_ABSTRACT being always false.
1922 (gen_inlined_subroutine_die): Likewise.
1923 (gen_block_die): Likewise.
1924 * tree.c (block_ultimate_origin): Likewise.
1925 * tree-pretty-print.c (dump_block_node): Remove code dealing
1926 with BLOCK_ABSTRACT.
1927 * tree-ssa-live.c (dump_scope_block): Likewise.
1928 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1929 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1931 2018-10-05 Richard Biener <rguenther@suse.de>
1933 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1934 is asked for initialize mode to the component mode of the
1937 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
1940 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1941 assembler for -mavx.
1942 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1944 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1947 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1949 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1950 to be DImode. When using mffscrn, force the operand to a register.
1952 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
1954 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1955 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1956 X87MODEF mode iterator.
1957 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1958 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1959 X87MODEF mode iterator.
1961 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1963 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1964 -Wno-prio-ctor-dtor.
1966 2018-10-04 David Malcolm <dmalcolm@redhat.com>
1968 * Makefile.in (OBJS): Add opt-problem.o.
1969 * dump-context.h: Include "selftest.h.
1970 (selftest::temp_dump_context): New forward decl.
1971 (class dump_context): Make friend of class
1972 selftest::temp_dump_context.
1973 (dump_context::dump_loc_immediate): New decl.
1974 (class dump_pretty_printer): Move here from dumpfile.c.
1975 (class temp_dump_context): Move to namespace selftest.
1976 (temp_dump_context::temp_dump_context): Add param
1977 "forcibly_enable_dumping".
1978 (selftest::verify_dumped_text):
1979 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1980 (selftest::verify_item):
1981 (ASSERT_IS_TEXT): Move here from dumpfile.c.
1982 (ASSERT_IS_TREE): Likewise.
1983 (ASSERT_IS_GIMPLE): Likewise.
1984 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1986 (dump_context::dump_loc_immediate): ...this new function.
1987 (class dump_pretty_printer): Move to dump-context.h.
1988 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1989 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1990 (temp_dump_context::temp_dump_context): Move to "selftest"
1991 namespace. Add param "forcibly_enable_dumping", and use it to
1992 conditionalize the use of m_pp;
1993 (selftest::verify_dumped_text): Make non-static.
1994 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1995 (selftest::verify_item): Make non-static.
1996 (ASSERT_IS_TEXT): Move to dump-context.h.
1997 (ASSERT_IS_TREE): Likewise.
1998 (ASSERT_IS_GIMPLE): Likewise.
1999 (selftest::test_capture_of_dump_calls): Pass "true" for new
2000 param of temp_dump_context.
2001 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2002 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2004 * opt-problem.cc: New file.
2005 * opt-problem.h: New file.
2006 * optinfo-emit-json.cc
2007 (selftest::test_building_json_from_dump_calls): Pass "true" for
2008 new param of temp_dump_context.
2009 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2010 (optinfo::emit_for_opt_problem): New function.
2011 (optinfo::emit): Clarity which emit_item is used.
2012 * optinfo.h (optinfo::get_dump_location): New accessor.
2013 (optinfo::emit_for_opt_problem): New decl.
2014 (optinfo::emit): Make const.
2015 * selftest-run-tests.c (selftest::run_tests): Call
2016 selftest::opt_problem_cc_tests.
2017 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2018 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2019 bool to opt_result, converting fprintf messages to
2020 opt_result::failure_at calls. Add "stmt" param for use by the
2022 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2023 (runtime_alias_check_p): Convert return type from bool to
2024 opt_result, converting dump_printf calls to
2025 opt_result::failure_at, using the statement DDR_A for their
2027 (find_data_references_in_stmt): Convert return type from bool to
2028 opt_result, converting "return false" to opt_result::failure_at
2030 * tree-data-ref.h: Include "opt-problem.h".
2031 (dr_analyze_innermost): Convert return type from bool to opt_result,
2032 and add a const gimple * param.
2033 (find_data_references_in_stmt): Convert return type from bool to
2035 (runtime_alias_check_p): Likewise.
2036 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2037 dr_analyze_innermost.
2038 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2039 Convert return type from bool to opt_result, adding a message for
2040 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2041 (vect_analyze_data_ref_dependence): Convert return type from bool
2042 to opt_result. Change sense of return type from "false"
2043 effectively meaning "no problems" to "false" meaning a problem,
2044 so that "return false" becomes "return opt_result::success".
2045 Convert "return true" calls to opt_result::failure_at, using
2046 the location of statement A rather than vect_location.
2047 (vect_analyze_data_ref_dependences): Convert return type from bool
2049 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2050 calls to opt_result::failure_at, using the stmt location rather
2052 (vect_verify_datarefs_alignment): Convert return type from bool
2054 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2055 into multiple more-tightly-scoped copies.
2056 (vect_analyze_data_refs_alignment): Convert return type from bool
2058 (vect_analyze_data_ref_accesses): Likewise, converting a
2059 "return false" to a "return opt_result::failure_at", adding a
2061 (vect_prune_runtime_alias_test_list): Convert return type from
2062 bool to opt_result, converting dump_printf_loc to
2063 opt_result::failure_at. Add a %G to show the pertinent statement,
2064 and use the stmt's location rather than vect_location.
2065 (vect_find_stmt_data_reference): Convert return type from
2066 bool to opt_result, converting dump_printf_loc to
2067 opt_result::failure_at, using stmt's location.
2068 (vect_analyze_data_refs): Convert return type from bool to
2069 opt_result. Convert "return false" to "return
2070 opt_result::failure_at", adding messages as needed.
2071 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2072 type from bool to opt_result.
2073 (vect_determine_vf_for_stmt): Likewise.
2074 (vect_determine_vectorization_factor): Likewise, converting
2075 dump_printf_loc to opt_result::failure_at, using location of phi
2076 rather than vect_location.
2077 (vect_analyze_loop_form_1): Convert return type from bool to
2078 opt_result, converting dump_printf_loc calls, retaining the use of
2080 (vect_analyze_loop_form): Convert return type from loop_vec_info
2081 to opt_loop_vec_info.
2082 (vect_analyze_loop_operations): Convert return type from bool to
2083 opt_result, converting dump_printf_loc calls, using the location
2084 of phi/stmt rather than vect_location where available. Convert
2085 various "return false" to "return opt_result::failure_at" with
2086 "unsupported phi" messages.
2087 (vect_get_datarefs_in_loop): Convert return type from bool to
2088 opt_result. Add a message for the
2089 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2090 (vect_analyze_loop_2): Convert return type from bool to
2091 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2092 each "goto again;", adding new messages where needed.
2093 Add "unsupported grouped {store|load}" messages.
2094 (vect_analyze_loop): Convert return type from loop_vec_info to
2096 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2098 * tree-vect-stmts.c (process_use): Likewise, converting
2099 dump_printf_loc call and using stmt location, rather than
2101 (vect_mark_stmts_to_be_vectorized): Likeise.
2102 (vect_analyze_stmt): Likewise, adding a %G.
2103 (vect_get_vector_types_for_stmt): Convert return type from bool to
2104 opt_result, converting dump_printf_loc calls and using stmt
2105 location, rather than vect_location.
2106 (vect_get_mask_type_for_stmt): Convert return type from tree to
2107 opt_tree, converting dump_printf_loc calls and using stmt location.
2108 * tree-vectorizer.c: Include "opt-problem.h.
2109 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2110 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2111 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2112 enabled, use it to report at the top level "couldn't vectorize
2113 loop" followed by the problem.
2114 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2115 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2117 (vect_analyze_stmt): Likewise.
2118 (vect_get_vector_types_for_stmt): Likewise.
2119 (tree vect_get_mask_type_for_stmt): Likewise.
2120 (vect_analyze_data_ref_dependences): Likewise.
2121 (vect_enhance_data_refs_alignment): Likewise.
2122 (vect_analyze_data_refs_alignment): Likewise.
2123 (vect_verify_datarefs_alignment): Likewise.
2124 (vect_analyze_data_ref_accesses): Likewise.
2125 (vect_prune_runtime_alias_test_list): Likewise.
2126 (vect_find_stmt_data_reference): Likewise.
2127 (vect_analyze_data_refs): Likewise.
2128 (vect_analyze_loop): Convert return type from loop_vec_info to
2130 (vect_analyze_loop_form): Likewise.
2131 (vect_analyze_slp): Convert return type from bool to opt_result.
2133 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2135 * doc/invoke.texi (-fopt-info): Document new "internals"
2137 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2138 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2140 (optinfo_verbosity_options): Add "internals".
2141 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2142 (dump_context::apply_dump_filter_p): New member function.
2143 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2144 explicitly masking the dump_kind.
2145 (dump_context::begin_scope): Increment the scope depth first. Use
2146 apply_dump_filter_p rather than explicitly masking the dump_kind.
2147 (dump_context::emit_item): Use apply_dump_filter_p rather than
2148 explicitly masking the dump_kind.
2149 (dump_dec): Likewise.
2150 (dump_hex): Likewise.
2151 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2152 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2153 (opt_info_switch_p): Update handling of default
2154 MSG_OPTIMIZED_LOCATIONS to cope with default of
2155 MSG_PRIORITY_USER_FACING.
2156 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2157 masking the dump_kind.
2158 (selftest::test_capture_of_dump_calls): Update test_dump_context
2159 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2160 than MSG_ALL. Generalize scope test to be run at all four
2161 combinations of with/without MSG_PRIORITY_USER_FACING and
2162 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2163 for each of the two values.
2164 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2165 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2166 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2167 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2168 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2169 with MSG_PRIORITY_*.
2170 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2171 dump messages as MSG_PRIORITY_USER_FACING.
2172 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2173 about the interaction with MSG_PRIORITY_*.
2175 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2177 * varasm.c (output_constant): Add new parameter merge_strings.
2178 Make strings properly zero terminated in merge string sections.
2179 (mergeable_string_section): Don't fail if the last char is non-zero.
2180 (assemble_variable_contents): Handle merge string sections.
2181 (assemble_variable): Likewise.
2182 (assemble_constant_contents): Likewise.
2183 (output_constant_def_contents): Likewise.
2184 (output_constructor_array_range,
2185 output_constructor_regular_field): Adjust call to output_constant.
2186 (output_object_block): Adjust call to assemble_constant_contents
2187 and assemble_variable_contents.
2189 2018-10-04 Martin Liska <mliska@suse.cz>
2192 * cgraphunit.c (process_function_and_variable_attributes):
2193 Warn about a function with alias attribute and a body.
2195 2018-10-04 Martin Liska <mliska@suse.cz>
2198 * multiple_target.c (redirect_to_specific_clone): New function.
2199 (ipa_target_clone): Use it.
2200 * tree-inline.c: Fix comment.
2202 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2204 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2206 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2207 (gcc::dump_manager::register_pass): New member function, adapted
2208 from loop body in gcc::pass_manager::register_pass, adding a
2209 call to update_dfi_for_opt_info.
2210 (gcc::dump_manager::opt_info_enable_passes): Store the
2211 -fopt-info options into the new fields. Move the loop
2213 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2215 * dumpfile.h (struct opt_pass): New forward decl.
2216 (gcc::dump_manager::register_pass): New decl.
2217 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2218 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2219 "m_optinfo_flags", and "m_optinfo_filename".
2220 * passes.c (gcc::pass_manager::register_pass): Move all of the
2221 dump-handling code to gcc::dump_manager::register_pass.
2223 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2225 PR rtl-optimization/87466
2226 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2227 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2228 * doc/tm.texi: Regenerate.
2229 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2230 * lra-lives.c (process_bb_lives): Likewise.
2231 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2234 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2236 * params.c (add_params): Fix initialization.
2238 2018-10-04 Martin Liska <mliska@suse.cz>
2240 PR gcov-profile/84107
2241 * tree-profile.c (init_ic_make_global_vars):
2242 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2243 Come up with new ic_tuple* variables. Emit
2244 __gcov_indirect_call{,_topn} variables.
2245 (gimple_gen_ic_profiler): Access the variable
2247 (gimple_gen_ic_func_profiler): Access
2248 __gcov_indirect_call.callee field.
2249 (gimple_init_gcov_profiler): Use ptr_type_node.
2250 * value-prof.c (gimple_ic): Use ptr_type_node.
2252 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2254 PR tree-optimization/85787
2255 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2256 into this function and add support for detecting multiple phis.
2257 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2259 2018-10-04 Martin Liska <mliska@suse.cz>
2262 * ipa-inline.c (inline_to_all_callers_1):
2263 Call ultimate_alias_target for node being inlined.
2265 2018-10-03 Jeff Law <law@redhat.com>
2267 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2269 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2270 * tree.h (get_typenode_from_name): Prototype.
2272 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2274 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2275 Change operand 2 predicate to nonimmediate_operand.
2276 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2278 2018-10-03 Martin Sebor <msebor@redhat.com>
2279 Jeff Law <law@redhat.com>
2281 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2283 (get_string_length): Detect unterminated arrays.
2284 (format_string): Same.
2285 (format_directive): Warn about unterminated arrays.
2286 (handle_gimple_call): Mark statements with no_warning as needed.
2288 2018-10-03 Jim Wilson <jimw@sifive.com>
2290 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2291 also define __riscv_abi_rve. Delete trailing white space.
2293 2018-10-03 Paul Koning <ni1d@arrl.net>
2295 Enable LRA register allocator for PDP11.
2296 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2299 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2300 * config/pdp11/pdp11.opt (-mlra): New option.
2301 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2303 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2305 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2306 (*<absneg:code>extend<mode>xf2): Ditto.
2308 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2310 PR tree-optimization/87415
2311 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2314 2018-10-02 Jeff Law <law@redhat.com>
2316 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2317 an unterminated string is discovered. Bubble up range
2318 even for unterminated strings.
2319 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2320 indicates the string was not terminated via NONSTR.
2322 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2324 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2325 pointer conversions.
2326 Do not do anything special for anti-ranges.
2328 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2330 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2331 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2333 2018-10-03 Martin Liska <mliska@suse.cz>
2335 PR gcov-profile/86109
2336 * coverage.c (coverage_begin_function): Do not
2337 mark lambdas as artificial.
2338 * tree-core.h (struct GTY): Remove tm_clone_flag
2339 and introduce new lambda_function.
2340 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2342 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2345 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2346 P8_VECTOR and VSX are enabled.
2348 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2350 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2351 0x3907 as CPU model number.
2353 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2355 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2356 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2357 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2358 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2359 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2360 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2361 value from arch12 to z14.
2363 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2365 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2367 (isinf<mode>2): Ditto.
2369 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2371 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2372 before emitting fxam. Perform calculations in XFmode.
2374 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2376 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2378 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2381 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2382 * tree.c (signed_or_unsigned_type_for): Handle complex.
2384 2018-10-02 Jeff Law <law@redhat.com>
2386 * gimple-fold.c (get_range_strlen): Remove dead code.
2388 2018-10-02 Martin Sebor <msebor@redhat.com>
2389 Jeff Law <law@redhat.com>
2391 * builtins.c (unterminated_array): Add new arguments.
2392 If argument is not terminated, bubble up size and exact
2394 (expand_builtin_strnlen): Detect, avoid expanding
2395 and diagnose unterminated arrays.
2396 (c_strlen): Fill in offset of start of unterminated strings.
2397 * builtins.h (unterminated_array): Update prototype.
2399 2018-10-02 Richard Biener <rguenther@suse.de>
2401 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2402 of haddv4df, first reduce to SSE width and exploit the fact
2403 that we only need element zero with the reduction result.
2404 (reduc_plus_scal_v2df): Likewise.
2406 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2408 * dojump.h (do_jump): Delete.
2409 (do_jump_1): Likewise.
2410 (split_comparison): Move around.
2411 * dojump.c (do_jump): Make static.
2412 (do_jump_1): Likewise.
2413 (jumpifnot): Move around.
2414 (jumpifnot_1): Likewise.
2416 (jumpif_1): Likewise.
2417 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2419 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2421 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2422 insns in the delay slot and add_insn_after for the jump insn.
2424 2018-10-02 Richard Biener <rguenther@suse.de>
2426 * tree-inline.c (expand_call_inline): Use the location of
2427 the callee declaration for the inline-entry marker.
2428 * final.c (notice_source_line): Remove special-casing of
2429 NOTE_INSN_INLINE_ENTRY.
2431 2018-10-01 Carl Love <cel@us.ibm.com>
2434 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2435 (__builtin_mtfsb0): New.
2436 (__builtin_mtfsb1): New.
2437 ( __builtin_set_fpscr_rn): New.
2438 (__builtin_set_fpscr_drn): New.
2439 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2440 (rs6000_expand_set_fpscr_rn_builtin): Add.
2441 (rs6000_expand_set_fpscr_drn_builtin): Add.
2442 (rs6000_expand_builtin): Add case statement entries for
2443 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2444 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2445 RS6000_BUILTIN_MFFSL.
2446 (rs6000_init_builtins): Add ftype initialization and def_builtin
2447 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2448 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2449 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2450 rs6000_mffscdrn): Add define_insn.
2451 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2452 * doc/extend.texi: Add documentation for the builtins.
2454 2018-10-01 Richard Biener <rguenther@suse.de>
2456 PR tree-optimization/87465
2457 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2458 causing branch miscounts.
2460 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2462 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2463 aarch64_option_default_param): New.
2464 (params.h): Include.
2465 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2466 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2467 stack-clash protection validation code.
2469 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2471 * params.c (validate_param): New.
2472 (add_params): Use it.
2473 (set_param_value): Refactor param validation into validate_param.
2474 (diagnostic.h): Include.
2475 * diagnostic.h (diagnostic_ready_p): New.
2477 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2479 * params.c (set_param_value):
2480 Add index of parameter being validated.
2481 * common/common-target.def (option_validate_param): New.
2482 * common/common-targhooks.h (default_option_validate_param): New.
2483 * common/common-targhooks.c (default_option_validate_param): New.
2484 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2485 * doc/tm.texi: Regenerate.
2487 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2490 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2491 Add validation for stack-clash parameters and set defaults.
2493 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2496 * configure.ac: Add stack-clash-protection-guard-size.
2497 * doc/install.texi: Document it.
2498 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2499 * params.def: Update comment for guard-size.
2500 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2501 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2502 * configure: Regenerate.
2504 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2507 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2508 STACK_DYNAMIC_OFFSET): New.
2509 * config/aarch64/aarch64.c (aarch64_layout_frame):
2510 Update outgoing args size.
2511 (aarch64_stack_clash_protection_alloca_probe_range,
2512 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2514 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2517 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2519 * target.def (stack_clash_protection_alloca_probe_range): New.
2520 (stack_clash_protection_final_dynamic_probe): Remove.
2521 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2522 (default_stack_clash_protection_final_dynamic_probe): Remove.
2523 * targhooks.c: Likewise.
2524 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2525 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2526 * doc/tm.texi: Regenerate.
2528 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2531 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2532 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2533 aarch64_clamp_to_uimm12_shift): New.
2534 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2535 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2537 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2540 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2542 2018-10-01 Jeff Law <law@redhat.com>
2543 Richard Sandiford <richard.sandiford@linaro.org>
2544 Tamar Christina <tamar.christina@arm.com>
2547 * config/aarch64/aarch64.md
2548 (probe_stack_range): Add k (SP) constraint.
2549 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2550 STACK_CLASH_MAX_UNROLL_PAGES): New.
2551 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2552 stack probes for stack clash.
2553 (aarch64_allocate_and_probe_stack_space): New.
2554 (aarch64_expand_prologue): Use it.
2555 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2556 (aarch64_sub_sp): Add emit_move_imm optional param.
2558 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2560 PR tree-optimization/87261
2561 * match.pd: Remove trailing whitespace.
2562 Add (x & y) | ~(x | y) -> ~(x ^ y),
2563 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2565 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2567 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2569 (ashlsi3_insn): Update instruction constraints.
2570 (ashrsi3_insn): Likewise.
2571 (rotrsi3): Likewise.
2572 (add_shift): Likewise.
2573 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2574 avoids placing in the limm field small constants which, otherwise,
2575 could end into a small instruction.
2577 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2579 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2580 destination register is not odd-even.
2581 (umaddsidi4_split): Likewise.
2583 2018-10-01 Richard Biener <rguenther@suse.de>
2585 * tree-inline.c (expand_call_inline): Store origin of fn
2586 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2587 * tree.c (block_ultimate_origin): Simplify and do some
2590 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2592 * config/i386/mmx.md (EMMS): New int iterator.
2593 (emms): New int attribute.
2594 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2595 EMMS int iterator. Explicitly declare clobbers.
2596 (mmx_emms): Remove expander.
2598 * config/i386/predicates.md (emms_operation): Remove predicate.
2599 (vzeroall_pattern): New predicate.
2600 (vzeroupper_pattern): Rename from vzeroupper_operation.
2601 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2602 vzeroupper_pattern and vzeroall_pattern predicates.
2604 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2606 PR rtl-optimization/86939
2607 * ira-lives.c (make_hard_regno_born): Rename from this...
2608 (make_hard_regno_live): ... to this. Remove update to conflict
2609 information. Update function comment.
2610 (make_hard_regno_dead): Add conflict information update. Update
2612 (make_object_born): Rename from this...
2613 (make_object_live): ... to this. Remove update to conflict information.
2614 Update function comment.
2615 (make_object_dead): Add conflict information update. Update function
2617 (mark_pseudo_regno_live): Call make_object_live.
2618 (mark_pseudo_regno_subword_live): Likewise.
2619 (mark_hard_reg_dead): Update function comment.
2620 (mark_hard_reg_live): Call make_hard_regno_live.
2621 (process_bb_node_lives): Likewise.
2622 * lra-lives.c (make_hard_regno_born): Rename from this...
2623 (make_hard_regno_live): ... to this. Remove update to conflict
2624 information. Remove now uneeded check_pic_pseudo_p argument.
2625 Update function comment.
2626 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2627 to conflict information. Update function comment.
2628 (mark_pseudo_live): Remove update to conflict information. Update
2630 (mark_pseudo_dead): Add conflict information update.
2631 (mark_regno_live): Call make_hard_regno_live.
2632 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2633 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2635 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2638 * config/i386/i386.c (construct_container): Use TImode for
2639 BLKmode values in 2 integer registers.
2641 2018-09-29 Jeff Law <law@redhat.com>
2643 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2644 c_strlen rather than just a tree *.
2645 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2646 Update recursive calls appropriately. If caller did not provide a
2647 suitable data pointer, create a local one. When a non-terminated
2648 string is discovered, bubble up information about the string via the
2649 c_strlen_data object.
2650 * builtins.h (c_strlen): Update prototype.
2651 (c_strlen_data): New structure.
2652 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2653 For a type 2 call, if c_strlen indicates a non-terminated string
2654 use the length of the non-terminated string.
2655 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2657 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2660 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2661 __m512d type for __A argument rather than __m512.
2663 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2665 * match.pd (simple_comparison): Don't optimize if either operand is
2666 a function pointer when target needs function pointer canonicalization.
2668 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2670 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2671 power5 .. power9 to remove indirection.
2672 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2673 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2674 ASM_CPU_476_SPEC): Delete.
2675 (ASM_CPU_SPEC): Adjust.
2676 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2677 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2679 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2681 * config.in: Delete HAVE_AS_DCI.
2682 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2683 * config/rs6000/rs6000.h: Ditto.
2684 * configure.ac: Delete HAVE_AS_DCI.
2685 * configure: Regenerate.
2687 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2689 * config.in (HAVE_AS_LWSYNC): Delete.
2690 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2691 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2693 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2694 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2696 * configure.ac: Delete HAVE_AS_LWSYNC.
2697 * configure: Regenerate.
2699 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2700 Pierre-Marie de Rodat <derodat@adacore.com>
2702 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2703 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2704 (cgraph_node::create_thunk): Add indirect_offset parameter.
2705 (thunk_adjust): Likewise.
2706 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2707 and initialize the corresponding field with it.
2708 (cgraph_node::dump): Dump indirect_offset field.
2709 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2710 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2711 (thunk_adjust): Add indirect_offset parameter and deal with it.
2712 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2713 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2714 or if the thunk is external or local. Fix formatting. Do not chain
2715 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2716 if any, in the GIMPLE representation.
2717 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2718 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2719 (input_node): Read indirect_offset field.
2720 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2721 call to thunk_adjust.
2722 * tree-nested.c (struct nesting_info): Add thunk_p field.
2723 (create_nesting_tree): Set it.
2724 (convert_all_function_calls): Copy static chain from targets to thunks.
2725 (finalize_nesting_tree_1): Return early for thunks.
2726 (unnest_nesting_tree_1): Do not finalize thunks.
2727 (gimplify_all_functions): Do not gimplify thunks.
2729 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2731 * opt-suggestions.c (option_proposer::build_option_suggestions):
2732 Release "option_values".
2734 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2736 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2737 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2738 * dumpfile.c (kind_as_string): New function.
2739 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2740 kind_as_string to vary the prefix based on dump_kind.
2741 (selftest::test_capture_of_dump_calls): Update for above.
2743 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2745 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2746 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2748 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2750 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2751 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2752 INVALID_REGNUM instead of FPSR_REG.
2753 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2754 * config/i386/i386.md: Update comment of FP compares.
2755 (fldenv): Do not clobber FPSR_REG.
2757 2018-09-28 Richard Biener <rguenther@suse.de>
2759 * tree.h (BLOCK_ORIGIN): New.
2760 * omp-expand.c (grid_expand_target_grid_body): Assign
2761 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2762 * tree-inline.c (remap_block): Likewise.
2763 * auto-profile.c (get_function_decl_from_block): Simplify
2764 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2765 * langhooks.c (lhd_print_error_function): Likewise.
2766 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2768 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2769 * tree.c (block_nonartificial_location): Likewise.
2770 (block_ultimate_origin): Likewise.
2771 * tree-pretty-print.c (percent_K_format): Likewise. Remove
2772 no longer needed LTO case.
2774 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
2775 Jan Hubicka <jh@suse.cz>
2776 Martin Jambor <mjambor@suse.cz>
2778 * simplify-rtx.c (simplify_merge_mask): New function.
2779 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2780 same masks are used in op1 or op2.
2781 (test_vec_merge): New function.
2782 (test_vector_ops): Call test_vec_merge.
2784 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2786 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2787 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2788 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2789 (cypress_costs): Set it.
2790 (supersparc_costs): Likewise.
2791 (hypersparc_costs): Likewise.
2792 (leon_cost): Likewise.
2793 (leon3_costs): Likewise.
2794 (sparclet_costs): Likewise.
2795 (ultrasparc_costs): Likewise.
2796 (ultrasparc_costs): Likewise.
2797 (niagara_costs): Likewise.
2798 (niagara2_costs): Likewise.
2799 (niagara3_costs): Likewise.
2800 (niagara4_costs): Likewise.
2801 (niagara7_costs): Likewise.
2802 (m8_costs): Likewise.
2803 (TARGET_CAN_FOLLOW_JUMP): Define.
2804 (pass_work_around_errata::gate): Minor tweak.
2805 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2806 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2807 Automaitcally clear MASK_FSMULD mask for V7 processors.
2808 (sparc_can_follow_jump): New static function.
2809 (output_ubranch): Deal with CROSSING_JUMP_P.
2810 (sparc_use_sched_lookahead): Rewrite using switch statement.
2811 (sparc_issue_rate): Reorder.
2812 (sparc_branch_cost): New function.
2814 2018-09-27 Martin Sebor <msebor@redhat.com>
2816 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2817 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2818 (int_fits_type_p): Same.
2820 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
2822 * config/i386/i386.md (FPCR_REG): Remove.
2823 (UNSPEC_FLDCW): Remove.
2824 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2825 (x86_fldcw_1): Remove insn pattern.
2826 (fnstenv): Do not clobber FPCR_REG.
2828 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2829 (CALL_USED_REGISTERS): Ditto.
2830 (REG_ALLOC_ORDER): Ditto.
2831 (REG_CLASS_CONTENTS): Ditto.
2832 (HI_REGISTER_NAMES): Ditto.
2833 (ADDITIONAL_REGISTER_NAMES): Use defines instead
2834 of numerical constants.
2835 * config/i386/i386.c (regclass_map): Remove fpsr register.
2836 (dbx_register_map): Ditto.
2837 (dbx64_register_map): Ditto.
2838 (svr4_dbx_register_map): Ditto.
2839 (print_reg): Do not handle FPCR_REG.
2841 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
2844 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2845 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2846 Delete, always treat as true.
2847 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2848 Ditto. Simplify remaining code.
2849 * config/powerpcspe/powerpcspe.h: Ditto.
2850 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2851 Simplify remaining code.
2852 (rs6000_expand_builtin): Ditto.
2853 * config/rs6000/rs6000.h: Ditto.
2854 * configure.ac: Ditto.
2855 * configure: Regenerate.
2857 2018-09-27 Martin Liska <mliska@suse.cz>
2859 * coverage.c (get_coverage_counts): Revert the formatting
2860 of missing profile opt info.
2862 2018-09-27 Richard Biener <rguenther@suse.de>
2866 * dwarf2out.c (set_block_origin_self): Do not mark outermost
2867 block as we do not output that.
2868 (gen_inlined_subroutine_die): Elide the originally outermost
2869 block, matching what we do for concrete instances.
2870 (decls_for_scope): Add parameter specifying whether to recurse
2873 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
2874 Tom de Vries <tom@codesourcery.com>
2878 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2879 STORE_FLAG_VALUE == 1.
2881 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
2883 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2884 constant definitions.
2885 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2886 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2887 ("speculation_barrier"): New expander definition.
2889 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
2891 PR gcov-profile/86957
2892 * common.opt: New warning option -Wmissing-profile.
2893 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2894 * doc/invoke.texi: Document -Wmissing-profile.
2896 2018-09-26 Jim Wilson <jimw@sifive.com>
2898 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2899 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2901 2018-09-26 Martin Sebor <msebor@redhat.com>
2903 * tree.c (zerop): Change return type to bool.
2904 (integer_zerop, integer_onep, integer_each_onep): Same.
2905 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2906 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2907 (real_onep, real_minus_onep, chain_index): Same.
2908 (print_type_hash_statistics, type_list_equal): Same.
2909 * tree.h (zerop): Same.
2910 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2911 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2912 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2913 (real_onep, real_minus_onep, chain_index): Same.
2914 (print_type_hash_statistics, type_list_equal): Same.
2916 2018-09-26 Jim Wilson <jimw@sifive.com>
2918 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2920 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2923 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2924 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2927 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
2929 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2931 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
2933 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2934 and FP_SECOND_SSE_REGS.
2935 (REG_CLASS_NAMES): Ditto.
2936 (REG_CLASS_CONTENTS): Ditto.
2937 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2938 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2939 (ix86_preferred_output_reload_class): Ditto.
2940 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2941 clobber constraint to "=&f".
2942 (fix_truncdi_i387): Ditto.
2943 (lrintxfdi2): Ditto.
2944 (fistdi2_<rounding>): Ditto.
2945 (fpremxf4_i387): Change "=u" constraint to "=f".
2946 (fprem1xf4_i387): Ditto.
2948 (fptanxf4_i387): Ditto.
2949 (fxtractxf3_i387): Ditto.
2950 (fscalexf4_i387): Ditto.
2951 (atan2xf3): Change "u" constraint to "f".
2952 (fyl2xxf3_i387): Ditto.
2953 (fyl2xp1xf3_i387): Ditto.
2955 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
2958 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2959 for removed I387_MASK_PM entity.
2962 2018-09-26 Jeff Law <law@redhat.com>
2964 2018-09-26 Alexey Neyman <stilor@att.net>
2966 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2967 headers are no longer pulled in by <isl/val.h>.
2969 2018-09-26 Richard Biener <rguenther@suse.de>
2972 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2973 or concrete instance DIE to the tree. Create abstract origin
2974 attributes also for concrete instances.
2976 2018-09-26 Alexey Neyman <stilor@att.net>
2978 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2979 headers are no longer pulled in by <isl/val.h>.
2981 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
2983 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2984 Use new helper functions.
2985 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2986 Use new helper functions.
2987 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2988 aarch_mm_needs_release): New declarations.
2989 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2990 aarch_mm_needs_release): New.
2992 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
2994 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2995 (arm32_output_mi_thunk): Deal with long calls.
2997 2018-09-26 Richard Biener <rguenther@suse.de>
3001 * tree-inline.c (expand_call_inline): When the location
3002 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3003 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3004 the inserted BLOCK to make inlined_function_outer_scope_p
3006 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3007 coords for reserved locations.
3009 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3011 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3012 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3013 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3014 (*sibcall_nonlocal_sysv<mode>): Ditto.
3015 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3016 (<bd>_<mode>): Ditto.
3017 (<bd>tf_<mode>): Ditto.
3019 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3021 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3022 control string as a list of templates instead of as C code.
3023 (*altivec_movti): Ditto.
3024 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3026 2018-09-25 Jim Wilson <jimw@sifive.com>
3028 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3029 when target symbol is weak.
3031 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3034 * builtins.c (unterminated_array): Simplify.
3035 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3036 where pointer arithmetic is safe.
3038 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3041 * config/rs6000/altivec.md (altivec_vspltb): Use
3042 const_0_to_15_operand instead of u5bit_cint_operand.
3043 (*altivec_vspltb_internal): Ditto.
3044 (altivec_vspltb_direct): Ditto.
3045 (altivec_vsplth): Use const_0_to_7_operand instead of
3047 (*altivec_vsplth_internal): Ditto.
3048 (altivec_vsplth_direct): Ditto.
3049 (altivec_vspltw): Use const_0_to_3_operand instead of
3051 (*altivec_vspltw_internal): Ditto.
3052 (altivec_vspltw_direct): Ditto.
3053 (altivec_vspltsf): Ditto.
3054 (*altivec_vspltsf_internal): Ditto.
3055 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3056 various splats with the proper size immediate. Reorder the various
3057 cases by ascending size of immediate, and put all such together.
3059 2018-09-25 Richard Biener <rguenther@suse.de>
3062 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3064 (maybe_create_die_with_external_ref): Do not create
3065 DW_TAG_imported_unit here.
3066 (add_abstract_origin_attribute): Handle external BLOCK refs.
3067 (dwarf2out_abstract_function): Simplify LTO case.
3068 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3069 rather than using maybe_create_die_with_external_ref.
3071 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3074 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3075 (frndintxf2_mask_pm_i387): Ditto.
3076 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3077 Enable for !flag_trapping_math.
3078 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3079 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3080 Change operand 1 predicate to nonimmediate_operand.
3081 (attr "i387_cw"): Remove mask_pm.
3082 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3083 (enum ix86_entity): Remove I387_MASK_PM.
3084 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3085 handle I387_MASK_PM.
3086 (ix86_mode_needed): Ditto.
3087 (ix86_mode_after): Ditto.
3088 (ix86_mode_entry): Ditto.
3089 (ix86_mode_exit): Ditto.
3090 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3092 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3094 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3095 to_update_switch_stmts to vNULL instead of calling create on them
3098 2018-09-25 Richard Biener <rguenther@suse.de>
3100 PR tree-optimization/87402
3101 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3102 (visit_phi): Re-instantiate handling of supposed to be VARYING
3103 but non-VARYING backedge value.
3105 2018-09-25 Richard Biener <rguenther@suse.de>
3108 * dwarf2out.c (struct sym_off_pair): New.
3109 (external_die_map): New global.
3110 (lookup_decl_die): When in LTO create DIEs lazily from the
3112 (lookup_block_die): New function, create DIEs lazily in LTO.
3113 (equate_block_to_die): New function.
3114 (dwarf2out_die_ref_for_decl): During WPA get the association
3115 from the external DIE map.
3116 (dwarf2out_register_external_die): Record mapping into the
3118 (maybe_create_die_with_external_ref): New function split out from
3119 DIE generation part of old dwarf2out_register_external_die.
3120 (add_abstract_origin_attribute): Do not return the DIE. When
3121 in LTO reference externals directly.
3122 (dwarf2out_abstract_function): When in LTO ignore calls for
3123 decls with external DIEs (already present abstract instances).
3124 (gen_call_site_die): Adjust.
3125 (add_high_low_attributes): Likewise.
3126 (gen_lexical_block_die): Likewise.
3127 (gen_inlined_subroutine_die): Likewie.
3128 (gen_block_die): Likewise.
3129 (dwarf2out_inline_entry): Likewise.
3130 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3133 2018-09-25 Martin Liska <mliska@suse.cz>
3135 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3136 integers and not by a float value.
3138 2018-09-25 Martin Liska <mliska@suse.cz>
3141 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3143 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3144 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3145 * godump.c (go_format_type): Remove extra parenthesis.
3147 2018-09-25 Martin Liska <mliska@suse.cz>
3149 * alias.c (set_dest_equal_p): Remove unused function.
3150 * config/i386/i386.c (def_builtin_pure2): Likewise.
3151 * diagnostic-show-locus.c (class layout): Remove
3153 (layout::layout): Likewise here.
3154 * dump-context.h (class temp_dump_context): Likewise.
3155 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3156 (add_AT_loclistsptr): Likewise.
3157 (add_AT_offset): Likewise.
3158 (get_AT_hi_pc): Likewise.
3159 (is_comdat_die): Likewise.
3160 (type_is_enum): Likewise.
3161 (ceiling): Likewise.
3162 (add_AT_vms_delta): Likewise.
3163 (is_class_die): Likewise.
3164 * edit-context.c (class line_event): Remove unused field.
3165 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3167 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3168 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3169 (ok_for_base_p_nonstrict): Likewise.
3170 * tree-chrec.c (is_not_constant_evolution): Likewise.
3171 (chrec_fold_poly_cst): Likewise.
3172 * tree-if-conv.c (has_pred_critical_p): Likewise.
3173 * tree-ssa-coalesce.c (print_exprs): Likewise.
3174 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3175 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3176 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3177 (value_range_nonnegative_p): Likewise.
3179 2018-09-25 Martin Liska <mliska@suse.cz>
3181 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3182 Do not handle "GNU Pascal".
3183 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3185 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3186 from documentation. Likewise.
3187 * dbxout.c (dbxout_range_type): Likewise.
3188 * doc/cpp.texi: Likewise.
3189 * doc/extend.texi: Likewise.
3190 * doc/frontends.texi: Likewise.
3191 * doc/invoke.texi: Remove Pascal entry.
3192 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3193 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3195 2018-09-25 Martin Liska <mliska@suse.cz>
3198 * doc/invoke.texi: Document all parameters and remove default
3201 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3204 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3205 contains HOST_WIDE_INTs when computing its size.
3207 2018-09-24 Jim Wilson <jimw@sifive.com>
3210 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3212 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3214 2018-09-24 Andrew Pinski <apinski@marvell.com>
3216 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3217 access prev before checking it for NULLness in the
3218 AARCH64_FUSE_CMP_BRANCH case.
3220 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3223 * config/i386/i386.c (rest_of_insert_endbranch): Set
3224 endbr_queued_at_entrance to true and don't insert ENDBR if
3225 x86_function_profiler will be called.
3226 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3228 * config/i386/i386.h (machine_function): Add
3229 endbr_queued_at_entrance.
3231 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3233 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3234 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3236 (check_attr_test): Use alternative_mask.
3237 (get_attr_value): Likewise.
3238 (compute_alternative_mask): Use alternative_mask and XWINT.
3239 (make_alternative_compare): Use alternative_mask.
3240 (attr_alt_subset_p): Use XWINT.
3241 (attr_alt_subset_of_compl_p): Likewise.
3242 (attr_alt_intersection): Use alternative_mask and XWINT.
3243 (attr_alt_union): Likewise.
3244 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3245 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3246 (simplify_test_exp): Use alternative_mask and XWINT.
3247 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3248 number calculation to support 64 bits. Generate code that
3249 checks 64-bit masks.
3250 (main): Use alternative_mask.
3251 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3253 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3256 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3257 RETURN+USE when returning via %r14.
3259 2018-09-24 Martin Liska <mliska@suse.cz>
3261 * gcov.c (output_lines): Print colorization legend
3262 for both flag_use_colors and flag_use_hotness_colors.
3265 2018-09-24 Martin Liska <mliska@suse.cz>
3267 * coverage.c (get_coverage_counts): Use warning_at
3268 with current_function_decl location. Use %qD in warning
3271 2018-09-24 Martin Liska <mliska@suse.cz>
3273 * memory-block.h (memory_block_pool::release): Annotate with
3274 valgrind that the memory is not accessible.
3276 2018-09-24 Martin Liska <mliska@suse.cz>
3279 * asan.c: Make asan_handled_variables extern.
3281 * cfgexpand.c (expand_stack_vars): Make sure
3282 a representative is unpoison if another
3283 variable in the partition is handled by
3284 use-after-scope sanitization.
3286 2018-09-24 Richard Biener <rguenther@suse.de>
3288 PR tree-optimization/63155
3289 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3290 the worklist when the edge of the respective argument isn't
3293 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3295 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3296 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3297 (MASK_CLASS_P): Update for rename.
3298 (MAYBE_MASK_CLASS_P): Ditto.
3299 (REG_CLASS_NAMES): Update.
3300 (REG_CLASS_CONTENT): Update.
3301 * config/i386/i386.c (regclass_map): Update for MASK_REG
3302 and ALL_MASK_REGS rename.
3303 * config/i386/constraints.md (Yk): Update for rename.
3306 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3308 * config/i386/i386.h (enum reg_class): Remove
3309 EVEX_SSE_REGS and MOD4_SSE_REGS.
3310 (REG_CLASS_NAMES): Update.
3311 (REG_CLASS_CONTENT): Update.
3312 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3313 registers as ALL_SSE_REGS.
3314 (ix86_additional_allocno_class_p): Remove.
3315 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3316 (ix86_register_priority): Lower priority of EVEX SSE registers.
3317 Use IN_RANGE macro where appropriate.
3318 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3319 AVX-5124VNNIW checks.
3320 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3321 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3322 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3323 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3324 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3325 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3326 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3327 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3328 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3329 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3330 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3331 * config/i386/constraints.md (Yh): Remove.
3333 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3335 * config/i386/i386.c (regclass_map): Declare integer REX registers
3338 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3340 * doc/service.texi (Service): Switch the fsf.org link to https.
3342 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3345 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3346 Define to speculation_safe_value_not_needed.
3348 2018-09-21 Florian Weimer <fweimer@redhat.com>
3351 * doc/extend.texi (Common Function Attributes): Mention that
3352 noreturn suppresses tail call optimization.
3354 2018-09-21 Jeff Law <law@redhat.com>
3356 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3357 vr_values::cleanup_edges_and_switches.
3358 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3360 (identify_jump_threads): Remove EDGE_IGNORE handling.
3361 (execute_vrp): Move handling of to_remove_edges and
3362 to_update_switch_stmts into vr_values class member functions.
3363 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3364 (to_update_switch_stmts): Likewise.
3365 * vr-values.c: Include cfghooks.h.
3366 (vr_values::vr_values): Initialize to_remove_edges and
3367 to_update_switch_stmts.
3368 (vr_values::~vr_values): Verify to_remove_edges and
3369 to_update_switch_stmts are empty.
3370 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3371 (vr_values::cleanup_edges_and_switches): New member function.
3372 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3373 function. Add new data members.
3375 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3377 PR tree-optimization/87309
3378 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3379 calls with pflags and alt_flags.
3380 (selftest::test_capture_of_dump_calls): Add test of interaction of
3381 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3383 2018-09-21 Olivier Hainque <hainque@adacore.com>
3385 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3387 2018-09-21 Olivier Hainque <hainque@adacore.com>
3389 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3391 2018-09-21 Olivier Hainque <hainque@adacore.com>
3393 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3394 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3395 (VXWORKS_LIBS_RTP): Minor reordering.
3397 2018-09-21 Olivier Hainque <hainque@adacore.com>
3399 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3400 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3402 2018-09-21 Olivier Hainque <hainque@adacore.com>
3404 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3405 (PTRDIFF_TYPE): Likewise.
3407 2018-09-21 Olivier Hainque <hainque@adacore.com>
3409 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3410 triplet, similar to support for VxWorks7.
3411 * config/vxworks-dummy.h: Provide a default definition
3412 of TARGET_VXWORKS64 to 0.
3414 2018-09-21 Olivier Hainque <hainque@adacore.com>
3416 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3417 * config/vxworks-dummy.h: here.
3419 2018-09-21 Olivier Hainque <hainque@adacore.com>
3421 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3423 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3424 Bo Zhou <zbo.zhou@hisilicon.com>
3426 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3427 * config/aarch64/aarch64-tune.md: Regenerated.
3428 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3429 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3430 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3432 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3433 Julian Brown <julian@codesourcery.com>
3435 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3437 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3439 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3440 if the call takes a static chain.
3442 2018-09-21 Martin Liska <mliska@suse.cz>
3444 * auto-profile.c (autofdo_source_profile::read): Do not
3446 (read_profile): Do not add working sets.
3447 (read_autofdo_file): Remove sum_all.
3448 (afdo_callsite_hot_enough_for_early_inline): Remove const
3450 * coverage.c (struct counts_entry): Remove gcov_summary.
3451 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3452 do not support GCOV_TAG_PROGRAM_SUMMARY.
3453 (get_coverage_counts): Remove summary and expected
3455 * coverage.h (get_coverage_counts): Likewise.
3456 * doc/gcov-dump.texi: Remove -w option.
3457 * gcov-dump.c (dump_working_sets): Remove.
3458 (main): Do not support '-w' option.
3459 (print_usage): Likewise.
3460 (tag_summary): Likewise.
3461 * gcov-io.c (gcov_write_summary): Do not dump
3463 (gcov_read_summary): Likewise.
3464 (gcov_histo_index): Remove.
3465 (gcov_histogram_merge): Likewise.
3466 (compute_working_sets): Likewise.
3467 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3469 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3470 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3471 (GCOV_HISTOGRAM_SIZE): Remove.
3472 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3473 (struct gcov_summary): Simplify rapidly just
3474 to runs and sum_max fields.
3475 (gcov_histo_index): Remove.
3476 (NUM_GCOV_WORKING_SETS): Likewise.
3477 (compute_working_sets): Likewise.
3478 * gcov-tool.c (print_overlap_usage_message): Remove
3479 trailing empty line.
3480 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3481 (output_lines): Remove program related line.
3482 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3483 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3485 (input_profile_summary): Do not read it.
3486 (merge_profile_summaries): And do not merge it.
3487 (input_symtab): Do not call removed function.
3488 * modulo-sched.c (sms_schedule): Do not print sum_max.
3489 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3490 removed when histogram method was invented.
3491 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3493 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3495 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3496 and dump selected value.
3497 * profile.c (add_working_set): Remove.
3498 (get_working_sets): Likewise.
3499 (find_working_set): Likewise.
3500 (get_exec_counts): Do not work with working sets.
3501 (read_profile_edge_counts): Do not inform as sum_max is removed.
3502 (compute_branch_probabilities): Likewise.
3503 (compute_value_histograms): Remove argument for call of
3504 get_coverage_counts.
3505 * profile.h: Do not make gcov_summary const.
3507 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3509 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3511 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3513 PR tree-optimization/86990
3514 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3515 Check that the entire merged store group is made of constants only for
3518 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3520 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3521 (VTABLE_VERIFICATION_SPEC): Likewise.
3522 (SANITIZER_EARLY_SPEC): Likewise.
3523 (SANITIZER_SPEC): Likewise.
3524 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3525 * doc/invoke.texi (Link Options): Document -r.
3527 2018-09-20 Richard Biener <rguenther@suse.de>
3530 * gimplify.c (gimplify_expr): Retain alignment of
3531 addressable lvalue in dereference.
3533 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3536 * configure.ac: Check for .loc is_stmt support.
3537 * configure, config.in: Rebuilt.
3538 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3541 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3543 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3544 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3547 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3549 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3551 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3554 2018-09-20 Marek Polacek <polacek@redhat.com>
3556 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3558 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3560 PR tree-optimization/87288
3561 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3562 into account when determining PEELING_FOR_NITERS.
3564 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3566 PR tree-optimization/86877
3567 * tree-vect-loop.c (vect_analyze_loop_2): Call
3568 vect_verify_datarefs_alignment.
3570 2018-09-19 Marek Polacek <polacek@redhat.com>
3572 * doc/invoke.texi: Document -Wclass-conversion.
3574 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3576 * config/pa/pa.c (pa_adjust_priority): Delete.
3577 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3579 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3580 (atomic_storehi): Likewise.
3581 (atomic_storesi): Likewise.
3582 (atomic_loaddi): Restore compare and swap exchange loop code.
3584 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3586 PR rtl-optimization/86902
3587 * combine.c (try_combine): When changing the CC mode used, don't change
3588 an unrelated mode in other_insn to that new CC mode.
3590 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3592 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3593 with %T in place of calls to dump_generic_expr.
3594 (prune_runtime_alias_test_list): Likewise.
3595 (create_runtime_alias_checks): Likewise.
3596 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3597 (vect_analyze_data_ref_dependence): Likewise.
3598 (vect_slp_analyze_data_ref_dependence): Likewise.
3599 (vect_record_base_alignment): Likewise. Use %G in place of call
3600 to dump_gimple_stmt.
3601 (vect_compute_data_ref_alignment): Likewise.
3602 (verify_data_ref_alignment): Likewise.
3603 (vect_find_same_alignment_drs): Likewise.
3604 (vect_analyze_group_access_1): Likewise.
3605 (vect_analyze_data_ref_accesses): Likewise.
3606 (dependence_distance_ge_vf): Likewise.
3607 (dump_lower_bound): Likewise.
3608 (vect_prune_runtime_alias_test_list): Likewise.
3609 (vect_find_stmt_data_reference): Likewise.
3610 (vect_analyze_data_refs): Likewise.
3611 (vect_create_addr_base_for_vector_ref): Likewise.
3612 (vect_create_data_ref_ptr): Likewise.
3613 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3614 (vect_can_advance_ivs_p): Likewise.
3615 (vect_update_ivs_after_vectorizer): Likewise.
3616 (vect_gen_prolog_loop_niters): Likewise.
3617 (vect_prepare_for_masked_peels): Likewise.
3618 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3619 (vect_determine_vectorization_factor): Likewise.
3620 (vect_is_simple_iv_evolution): Likewise.
3621 (vect_analyze_scalar_cycles_1): Likewise.
3622 (vect_analyze_loop_operations): Likewise.
3623 (report_vect_op): Likewise.
3624 (vect_is_slp_reduction): Likewise.
3625 (check_reduction_path): Likewise.
3626 (vect_is_simple_reduction): Likewise.
3627 (vect_create_epilog_for_reduction): Likewise.
3628 (vect_finalize_reduction:): Likewise.
3629 (vectorizable_induction): Likewise.
3630 (vect_transform_loop_stmt): Likewise.
3631 (vect_transform_loop): Likewise.
3632 (optimize_mask_stores): Likewise.
3633 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3634 (vect_split_statement): Likewise.
3635 (vect_recog_over_widening_pattern): Likewise.
3636 (vect_recog_average_pattern): Likewise.
3637 (vect_determine_min_output_precision_1): Likewise.
3638 (vect_determine_precisions_from_range): Likewise.
3639 (vect_determine_precisions_from_users): Likewise.
3640 (vect_mark_pattern_stmts): Likewise.
3641 (vect_pattern_recog_1): Likewise.
3642 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3643 (vect_record_max_nunits): Likewise.
3644 (vect_build_slp_tree_1): Likewise.
3645 (vect_build_slp_tree_2): Likewise.
3646 (vect_print_slp_tree): Likewise.
3647 (vect_analyze_slp_instance): Likewise.
3648 (vect_detect_hybrid_slp_stmts): Likewise.
3649 (vect_detect_hybrid_slp_1): Likewise.
3650 (vect_slp_analyze_operations): Likewise.
3651 (vect_slp_analyze_bb_1): Likewise.
3652 (vect_transform_slp_perm_load): Likewise.
3653 (vect_schedule_slp_instance): Likewise.
3654 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3655 (vect_mark_stmts_to_be_vectorized): Likewise.
3656 (vect_init_vector_1): Likewise.
3657 (vect_get_vec_def_for_operand): Likewise.
3658 (vect_finish_stmt_generation_1): Likewise.
3659 (vect_check_load_store_mask): Likewise.
3660 (vectorizable_call): Likewise.
3661 (vectorizable_conversion): Likewise.
3662 (vectorizable_operation): Likewise.
3663 (vectorizable_load): Likewise.
3664 (vect_analyze_stmt): Likewise.
3665 (vect_is_simple_use): Likewise.
3666 (vect_get_vector_types_for_stmt): Likewise.
3667 (vect_get_mask_type_for_stmt): Likewise.
3668 * tree-vectorizer.c (increase_alignment): Likewise.
3670 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3672 * doc/rtl.texi: Adjust vec_select description.
3673 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3674 non-constant selectors.
3676 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3678 * config/aarch64/aarch64-protos.h
3679 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3680 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3681 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3682 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3683 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3684 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3685 (AARCH64_ISA_RCPC8_4): New flag.
3686 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3687 to aarch64_offset_9bit_signed_unscaled_p.
3688 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3690 * config/aarch64/constraints.md (Ust): New constraint.
3691 * config/aarch64/predicates.md.
3692 (aarch64_9bit_offset_memory_operand): New predicate.
3693 (aarch64_rcpc_memory_operand): New predicate.
3695 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3697 PR rtl-optimization/87361
3698 * rtlanal.c (nonzero_bits1): Revert accidental change.
3700 2018-09-19 Richard Biener <rguenther@suse.de>
3702 PR tree-optimization/87349
3703 PR tree-optimization/87342
3704 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3706 2018-09-18 Marek Polacek <polacek@redhat.com>
3708 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3709 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3711 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3713 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3715 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3717 PR rtl-optimization/86882
3718 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3720 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3722 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3723 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3725 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3728 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3730 2018-09-18 Richard Biener <rguenther@suse.de>
3733 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3734 (compute_samebase_partition_bases): Likewise.
3735 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3736 (gimple_can_coalesce_p): Simplify.
3738 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3740 Handle a library implementation of ffs calling __builtin_ffs.
3741 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3742 (mmix_init_libfuncs): New function: make __builtin_ffs expand
3745 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3747 * diagnostic-show-locus.c (class layout_range): Add field
3749 (layout_range::layout_range): Add "original_idx" param and use it
3750 to initialize new field.
3751 (make_range): Use 0 for original_idx.
3752 (layout::layout): Pass in index to calls to
3753 maybe_add_location_range.
3754 (layout::maybe_add_location_range): Add param "original_idx" and
3755 pass it on to layout_range.
3756 (layout::print_any_labels): Pass on range->m_original_idx to
3758 (gcc_rich_location::add_location_if_nearby): Use 0 for
3760 * gcc-rich-location.h (text_range_label::get_text): Update for new
3762 (range_label_for_type_mismatch::get_text): Likewise.
3764 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3766 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3768 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3770 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3771 format_string_diagnostic_t.
3772 (fmtwarn_n): Likewise.
3773 * substring-locations.c
3774 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3775 (format_warning_n_va): Convert to...
3776 (format_string_diagnostic_t::emit_warning_n_va): ...this.
3777 (format_warning_va): Convert to...
3778 (format_string_diagnostic_t::emit_warning_va): ...this.
3779 (format_warning_at_substring): Convert to...
3780 (format_string_diagnostic_t::emit_warning): ...this.
3781 (format_warning_at_substring_n): Convert to...
3782 (format_string_diagnostic_t::emit_warning_n): ...this.
3783 * substring-locations.h (class format_string_diagnostic_t): New
3785 (format_warning_va): Convert to
3786 format_string_diagnostic_t::emit_warning_va.
3787 (format_warning_n_va): Convert to
3788 format_string_diagnostic_t::emit_warning_n_va.
3789 (format_warning_at_substring): Convert to
3790 format_string_diagnostic_t::emit_warning.
3791 (format_warning_at_substring_n): Convert to
3792 format_string_diagnostic_t::emit_warning_n.
3794 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
3795 Bernd Schmidt <bernds_cb1@t-online.de>
3797 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3800 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3802 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3803 operand 0 predicate to nonimmediate operand.
3804 (rint<mode>2_frndint): Remove insn pattern.
3805 (rint<mode>2): Change operand 1 predicate to general_operand.
3806 Extend operand 1 to XFmode and generate rintxf2 insn.
3807 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3808 Do not use X87MODEF mode macro.
3809 (frndintxf2_<rounding>_i387): Rename from
3810 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
3811 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3812 to XFmode and generate significandxf3 insn.
3814 2018-09-17 Richard Biener <rguenther@suse.de>
3816 PR tree-optimization/87328
3817 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3818 visiting unexecutable backedges when not iterating.
3819 (do_rpo_vn): Mark all edges not executable even when not
3822 2018-09-17 Martin Jambor <mjambor@suse.cz>
3825 * doc/invoke.texi (Warning Options): Likewise.
3827 2018-09-17 Richard Biener <rguenther@suse.de>
3829 PR tree-optimization/87301
3830 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3831 clean EH info from leftover copy assignments.
3833 2018-09-17 Martin Liska <mliska@suse.cz>
3835 PR gcov-profile/85871
3836 * gcov.c (output_intermediate_file): Fix out of bounds
3839 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
3841 * config/arc/arc.c: Object attributes for core4 not reflected
3843 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3846 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
3848 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3850 2018-09-17 Martin Liska <mliska@suse.cz>
3852 * doc/gcov.texi: Document new option --use-hotness-colors.
3853 * gcov.c (struct source_info): Declare new field.
3854 (source_info::source_info): Set default for maximum_count.
3855 (print_usage): Add new -q option.
3856 (process_args): Process it.
3857 (accumulate_line_info): Save src->maximum_count.
3858 (output_line_beginning): Make color line number if
3859 flag_use_hotness_colors is set.
3860 (output_line_details): Pass default argument value.
3861 (output_lines): Pass src->maximum_count.
3863 2018-09-17 Martin Liska <mliska@suse.cz>
3865 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3866 Use processor_names table.
3867 * config/i386/i386.c (ix86_default_align): Use
3868 processor_cost_table for alignment values.
3869 (ix86_option_override_internal): Use processor_names.
3870 (ix86_function_specific_print): Likewise.
3871 * config/i386/i386.h (struct processor_costs):
3872 Add alignment values.
3873 (struct ptt): Remove and replace with const char *.
3874 * config/i386/x86-tune-costs.h (struct processor_costs):
3875 Declare default alignments for all costs.
3877 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
3879 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3880 symbolics or VR_VARYING ranges for ABS_EXPR.
3881 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3882 when range will wrap.
3884 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
3887 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3888 before and after a JUMP_TABLE_DATA.
3890 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
3893 * dojump.c (do_compare_and_jump): Canonicalize function pointers
3894 when one operand is a function pointer. Use POINTER_TYPE_P and
3895 FUNC_OR_METHOD_TYPE_P.
3896 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3897 * fold-const.c (build_range_check): Likewise.
3898 * match.pd (simple_comparison): Likewise.
3900 2018-09-14 David Malcolm <dmalcolm@redhat.com>
3903 * spellcheck.c (get_edit_distance_cutoff): New function.
3904 (selftest::test_edit_distance_unit_test_oneway): Rename to...
3905 (selftest::test_get_edit_distance_one_way): ...this.
3906 (selftest::test_get_edit_distance_unit): Rename to...
3907 (selftest::test_get_edit_distance_both_ways): ...this.
3908 (selftest::test_edit_distances): Move tests to this new function,
3909 and test some more pairs of strings. Update for above renaming.
3910 (selftest::get_old_cutoff): New function.
3911 (selftest::test_get_edit_distance_cutoff): New function.
3912 (selftest::assert_suggested_for): New function.
3913 (ASSERT_SUGGESTED_FOR): New macro.
3914 (selftest::assert_not_suggested_for): New function.
3915 (ASSERT_NOT_SUGGESTED_FOR): New macro.
3916 (selftest::test_suggestions): New function.
3917 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3918 tests to selftest::test_edit_distances and call it. Add calls to
3919 selftest::test_get_edit_distance_cutoff and
3920 selftest::test_suggestions.
3921 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3922 (best_match::consider): Replace hard-coded cutoff calculation with
3924 (best_match::get_cutoff): New declaration.
3925 (best_match::get_best_meaningful_candidate): Likewise.
3927 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3929 * builtins.c (fold_builtin_strlen): Remove TODO comment.
3931 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3934 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3936 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3937 terminated string literal.
3939 2018-09-14 Martin Sebor <msebor@redhat.com>
3941 * builtins.c (unterminated_array): Handle ARRAY_REF.
3942 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3943 * builtins.h (unterminated_array): Declare extern.
3944 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3946 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3949 2018-09-14 Martin Sebor <msebor@redhat.com>
3950 Jeff Law <law@redhat.com>
3952 * builtins.c (unterminated_array): New.
3953 (expand_builtin_strcpy): Adjust.
3954 (expand_builtin_strcpy_args): Detect unterminated arrays.
3955 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
3956 unterminated arrays.
3957 * gimple-fold.h (get_maxval_strlen): Add argument.
3958 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3960 * gimple-fold.c (get_range_strlen): Add argument.
3961 (get_maxval_strlen): Adjust.
3962 * gimple-fold.h (get_range_strlen): Add argument.
3964 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
3966 * config/i386/movdirintrin.h: Fix copyright year.
3968 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
3970 * reg-stack.c: Include regs.h.
3971 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3972 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3973 FIRST_STACK_REG, not DFmode.
3974 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3975 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
3976 (change stack): Default register mode to the reg_raw_mode of
3977 FIRST_STACK_REG, not DFmode.
3978 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3979 (*swapxf): Rename from swapxf.
3981 2018-09-14 Carl Love <cel@us.ibm.com>
3983 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3984 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3986 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
3989 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3992 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
3995 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3997 2018-09-14 Jason Merrill <jason@redhat.com>
3999 Fix --enable-gather-detailed-mem-stats.
4000 * hash-table.c (hash_table_usage): Change from variable to function.
4001 * hash-table.h: Adjust.
4002 * Makefile.in: Add missing dependencies on hash-table.h.
4004 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4006 PR tree-optimization/87259
4008 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4009 execute_cse_reciprocals_1 has tried transforming.
4011 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4013 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4014 VR_VARYING for PLUS/MINUS_EXPR.
4016 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4018 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4021 2018-09-14 Richard Biener <rguenther@suse.de>
4024 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4025 bits for the merged partition.
4027 2018-09-13 Martin Sebor <msebor@redhat.com>
4028 Bernd Edlinger <bernd.edlinger@hotmail.de>
4030 * builtins.h (c_srlen): Add argument.
4031 * builtins.c (warn_string_no_nul): New function.
4032 (c_strlen): Add argument and use it. Update recursive calls.
4033 Pass DECL argument to string_constant to get info on non
4034 terminated strings. Update *NONSTR as needed.
4035 (fold_builtin_strlen): Add argument to calls to c_strlen.
4036 Warn for unterminated arrays.
4037 (warn_string_no_null): Add prototype.
4038 * expr.c (string_constant): Update arguments. Update recursive
4039 calls appropriately. Detect missing NUL terminator and outermost
4040 declaration its missing in.
4041 Improve checks for arrays with nonzero lower bound or elements
4042 that are not a single byte. Simplify offset computation.
4043 Simplify checks for non-NUL terminated strings.
4044 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4045 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4047 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4049 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4051 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4052 argument. Fix range checks.
4053 * fold-const.h (c_getstr): Adjust protoype.
4054 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4055 string is constant but contains no NUL byte.
4057 * expr.c (string_constant): Adjust function comment.
4058 Remove bogus check for zero termination.
4060 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4062 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4063 (get_constant_size): Don't make STRING_CSTs larger than they are.
4064 (check_string_literal): New check function for STRING_CSTs.
4065 (output_constant): Use it.
4067 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4070 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4072 2018-09-13 Richard Biener <rguenther@suse.de>
4074 PR tree-optimization/87263
4075 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4076 (struct unwind_state): Add max_rpo field.
4077 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4078 Compute max_rpo, the max RPO number a block can be backwards reached
4079 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4080 separating it from the iterating mode.
4082 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4084 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4085 (rfs_decision): New scheduling decision.
4087 2018-09-13 Richard Biener <rguenther@suse.de>
4090 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4091 (vn_nary_op_insert_pieces_predicated): Do not write useless
4092 valid_dominated_by_p entry outside of the allocated storage.
4094 2018-09-13 Omar Sandoval <osandov@osandov.com>
4095 Tom de Vries <tdevries@suse.de>
4098 * dwarf2out.c (is_c): New function.
4099 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4101 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4104 * config/aarch64/aarch64.md (*aarch64_bfxil):
4106 * config/aarch64/constraints.md (Ulc): Define.
4107 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4109 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4112 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4114 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4115 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4116 aarch64_layout_frame call.
4117 (aarch64_expand_epilogue): Likewise.
4118 (aarch64_initial_elimination_offset): Likewise.
4119 (aarch64_get_separate_components): Likewise.
4120 (aarch64_use_return_insn_p): Likewise.
4121 (aarch64_layout_frame): Remove unneeded check.
4123 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4125 * configure.ac: Only append
4126 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4127 gcc_config_arguments if it was never reconfigured or last reconfigure
4128 was with different arguments.
4129 * configure: Regenerated.
4131 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4132 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4135 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4136 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4138 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4140 PR tree-optimization/87287
4141 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4142 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4143 * match.pd (X % C == 0): ... here. New optimization.
4145 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4148 * expr.h (maybe_optimize_mod_cmp): Declare.
4149 * expr.c (mod_inv): New function.
4150 (maybe_optimize_mod_cmp): New function.
4151 (do_store_flag): Use it.
4152 * cfgexpand.c (expand_gimple_cond): Likewise.
4154 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4155 Julian Brown <julian@codesourcery.com>
4158 * gimplify.c (gimplify_scan_omp_clauses): Set
4159 target_firstprivatize_array_bases in OpenACC parallel and kernels
4160 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4161 OpenACC data regions.
4163 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4165 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4166 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4168 2018-09-12 Richard Biener <rguenther@suse.de>
4170 PR tree-optimization/87280
4171 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4172 edge but unreachable target.
4173 (do_rpo_vn): For conservatively handling a PHI only mark
4174 the backedge executable but not the block reachable.
4176 2018-09-12 Richard Biener <rguenther@suse.de>
4178 PR tree-optimization/87266
4179 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4182 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4184 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4186 ("trunc<BFP:mode><DFP_ALL:mode>2")
4187 ("trunc<DFP_ALL:mode><BFP:mode>2")
4188 ("extend<BFP:mode><DFP_ALL:mode>2")
4189 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4190 according to the target operand type.
4192 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4193 Andreas Krebbel <krebbel@linux.ibm.com>
4195 PR tree-optimization/86844
4196 * gimple-ssa-store-merging.c
4197 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4198 there are any overlapping stores in between them, make sure they are
4199 also coalesced or we give up completely.
4201 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4204 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4205 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4207 2018-09-12 Tom de Vries <tdevries@suse.de>
4209 * common.opt (gdescribe-dies): Add option.
4210 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4211 attribute for artifical and nameless decls.
4212 (dwarf2out_register_external_die): Add description attribute to
4213 external reference die.
4214 (add_desc_attribute): New functions.
4215 (gen_subprogram_die): Add description attribute to
4216 DW_TAG_call_site_parameter.
4217 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4218 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4219 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4221 (@item -gdescribe-dies): Add.
4223 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4225 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4226 (extract_range_from_binary_expr_1: Call
4227 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4228 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4231 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4233 * gimple-ssa-warn-alloca.c
4234 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4235 field for ALLOCA_BOUND_*_LARGE.
4237 2018-09-11 Nathan Sidwell <nathan@acm.org>
4239 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4241 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4243 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4244 for clobbers. Remove obsolete comment.
4246 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4248 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4249 mpxchk, mpxld and mpxst types.
4250 (define_attr length_immediate): Remove all processing of mpx types.
4251 (define_attr prefix_0f): Ditto.
4252 (define_attr memory): Ditto.
4254 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4256 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4257 (log<mode>2): Change operand 1 predicate to general_operand.
4258 Extend operand 1 to XFmode and generate logxf3 insn.
4259 (log10<mode>2): Change operand 1 predicate to general_operand.
4260 Extend operand 1 to XFmode and generate log10xf3 insn.
4261 (log2<mode>2): Change operand 1 predicate to general_operand.
4262 Extend operand 1 to XFmode and generate log2xf3 insn.
4263 (fyl2xp1_extend<mode>xf3_i387): Remove.
4264 (log1p<mode>2): Change operand 1 predicate to general_operand.
4265 Extend operand 1 to XFmode and generate log1pxf3 insn.
4266 (fxtract_extend<mode>xf3_i387): Remove.
4267 (logb<mode>2): Change operand 1 predicate to general_operand.
4268 Extend operand 1 to XFmode and generate logbxf3 insn.
4269 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4270 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4271 (significand<mode>2): Change operand 1 predicate to general_operand.
4272 Extend operand 1 to XFmode and generate significandxf3 insn.
4274 2018-09-11 Nathan Sidwell <nathan@acm.org>
4276 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4277 (load_specs): Use fatal_error.
4278 (DELETE_IF_ORDINARY, process_command): Use error.
4279 (execute, run_attempt): Use fatal_error.
4281 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4283 * diagnostic-core.h (sorry_at): New prototype.
4284 * diagnostic.c (sorry_at): New function.
4286 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4288 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4289 by zero as VR_UNDEFINED.
4291 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4293 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4294 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4295 (<sincos>mode2): New expander.
4296 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4297 (sincos -> sin, cos splitters): Remove splitter patterns.
4298 (sincos<mode>3): Change operand 2 predicate to general_operand.
4299 Extend operand 2 to XFmode and generate sincosxf3 insn.
4300 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4301 Change operand 3 predicate to const1_operand.
4302 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4303 (tanxf2): Update operands in the call to fptanxf4_i387.
4304 (tan<mode>2): Change operand 1 predicate to general_operand.
4305 Extend operand 1 to XFmode and generate tanxf3 insn.
4306 (atan2xf3): Rename from *fpatanxf3_i387.
4307 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4308 (atan2xf3): Remove expander.
4309 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4310 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4311 (atan<mode>2): Change operand 1 predicate to general_operand.
4312 Extend operand 1 to XFmode and generate atanxf3 insn.
4314 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4316 * config/i386/i386.md (x87/SSE constant load splitter): Use
4317 memory_operand instead of nonimmediate_operand for input operand
4320 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4322 * config/i386/i386.md (float partial SSE register stall splitter): Move
4323 splitter near its instruction pattern.
4324 (float_extend partial SSE register stall splitter): Ditto.
4325 (float_truncate partial SSE register stall splitter): Ditto.
4327 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4330 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4331 to speculation_safe_value_not_needed.
4334 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4335 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4336 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4337 leaf_function_p, instead use has_hard_reg_initial_val.
4339 2018-09-09 Nathan Sidwell <nathan@acm.org>
4341 * gcc.h (pfatal_with_name): Don't declare here.
4342 * gcc.c (pfatal_with_name): Make static.
4344 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4346 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4349 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4351 PR rtl-optimization/85458
4352 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4353 priority hook to reduce the priority of EXPR.
4355 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4357 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4358 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4359 with X87_ENABLE_FLOAT. Remove preparation code.
4360 (*float<SWI48:mode><MODEF:mode>2): Rename from
4361 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4362 math using "enabled" attribute.
4363 (*floatdi<MODEF:mode>2_i387): Rename from
4364 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4365 enable for 32bit targets only.
4366 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4368 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4369 as operand 1 predicate. Rewrite as define_insn_and_split.
4370 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4372 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4374 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4375 to fallthru to FLOAT case.
4377 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4380 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4381 around folding of vec_sl to handle out of range shift values.
4383 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4385 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4386 Update callers to gen_fix_trunc<mode>_i387_fisttp
4387 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4388 nonimmediate_operand.
4389 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4390 and corresponding splitters.
4391 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4392 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4393 (fix_truncdi_i387_with_temp): Remove insn pattern
4394 and corresponding splitters.
4395 (fix_trunc<mode>_i387): Change operand 0 predicate to
4396 nonimmediate_operand.
4397 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4398 and corresponding splitters.
4399 (*fistdi2_1): Remove.
4401 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4402 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4403 (*fist<mode>2_1): Remove.
4404 (fist<mode>2): Ditto.
4405 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4407 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4408 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4409 (fistdi2_<rounding>): Change operand 0 predicate to
4410 nonimmediate_operand.
4411 (fistdi2_<rounding>_with_temp): Remove insn pattern
4412 and corresponding splitters.
4413 (fist<mode>2_<rounding>): Change operand 0 predicate to
4414 nonimmediate_operand.
4415 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4416 and corresponding splitters.
4418 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4420 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4422 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4425 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4427 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4428 early gimple folding of vec_splat().
4429 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4430 * gimple-fold.h: Add an extern define for tree_vec_extract().
4432 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4434 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4435 wrappers around TREE_TYPE comparisons.
4437 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4440 * config/s390/predicates.md: Add nonsym_memory_operand.
4441 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4442 contains a SYMBOL_REF, load it into an intermediate pseudo.
4443 (s390_emit_compare_and_swap): Legitimize operand.
4444 * config/s390/s390.md: Use the new nonsym_memory_operand
4445 with UNSPECV_CAS patterns.
4447 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4450 * config/s390/s390-passes.def: New file.
4451 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4453 (make_pass_s390_early_mach): Add declaration.
4454 * config/s390/s390.c (make_pass_s390_early_mach):
4455 (s390_option_override): Remove dynamic registration.
4456 * config/s390/t-s390: Add s390-passes.def.
4458 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4460 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4461 Remove UNSPEC_LTREL_BASE check.
4462 (annotate_constant_pool_refs): Likewise.
4463 (find_constant_pool_ref): Likewise.
4464 (find_ltrel_base): Removed.
4465 (replace_ltrel_base): Removed.
4466 (s390_mainpool_finish): Remove replace_ltrel_base call.
4467 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4468 (s390_chunkify_finish): Remove replace_ltrel_base call.
4469 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4471 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4474 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4475 to speculation_safe_value_not_needed.
4477 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4478 Bernd Schmidt <bernds_cb1@t-online.de>
4480 * config/nvptx/nvptx-opts.h: New file.
4481 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4482 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4484 (TARGET_SM35): New macro.
4485 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4487 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4489 (misa=): New option.
4490 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4492 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4494 * config/i386/i386.md (truncdfsf2): Remove expander.
4495 (truncdfsf2_with_temp): Ditto.
4496 (truncxf<mode>2): Ditto.
4497 (*truncdfsf_fast_mixed): Remove insn pattern.
4498 (*truncdfsf_fast_i387): Ditto.
4499 (*truncdfsf_mixed): Ditto.
4500 (*truncdfsf_i387): Ditto.
4501 (*truncdfsf2_i387_1): Ditto.
4502 (*truncxfsf2_mixed): Ditto.
4503 (*truncxfdf2_mixed): Ditto.
4504 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4505 to call gen_truncxf<mode>2 instead.
4506 (*truncxf<mode>2_i387): Remove.
4507 (reg->reg splitters): Remove splitter pattern.
4508 (reg->mem splitters): Ditto.
4510 (truncdfsf2): New insn pattern.
4511 (truncxf<mode>2): Ditto.
4513 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4515 * tree-ssa-math-opts.c (is_mult_by): New function.
4516 (is_square_of): Use the above.
4517 (optimize_recip_sqrt): New function.
4518 (pass_cse_reciprocals::execute): Use the above.
4520 2018-09-05 Richard Biener <rguenther@suse.de>
4523 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4524 to zero-init the emplaced vec.
4526 2018-09-05 Martin Liska <mliska@suse.cz>
4528 PR tree-optimization/87205
4529 * tree-switch-conversion.c (pass_lower_switch::execute):
4530 Group cases for switch statements.
4532 2018-09-05 Richard Biener <rguenther@suse.de>
4534 PR tree-optimization/87217
4535 * tree-ssa-sccvn.c (vuse_valueize): New.
4536 (vn_reference_lookup_pieces): Use it.
4537 (vn_reference_lookup): Likewise.
4539 2018-09-05 Nathan Sidwell <nathan@acm.org>
4542 * stor-layout.c (place_field): Scan forwards to check last
4543 bitfield when ms_bitfield_placement is in effect.
4545 2018-09-05 Richard Biener <rguenther@suse.de>
4548 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4551 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4552 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4554 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4555 * config.gcc (extra_objs): Build it.
4556 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4558 * config/aarch64/aarch64-passes.def
4559 (pass_tag_collision_avoidance): New pass.
4560 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4561 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4562 (aarch64_classify_address): Remove static qualifier.
4563 (aarch64_address_info, aarch64_address_type): Move to...
4564 * config/aarch64/aarch64-protos.h: ... here.
4565 (make_pass_tag_collision_avoidance): New function.
4566 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4569 2018-09-05 Martin Liska <mliska@suse.cz>
4571 * doc/gcov.texi: Update documentation of humar
4573 * gcov.c (format_count): Print one decimal place, it provides
4574 more fine number of situations like '1G' vs. '1.4G'.
4576 2018-09-05 Martin Liska <mliska@suse.cz>
4579 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4580 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4581 to generate a MASK value.
4583 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4586 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4587 if frame pointer isn't used.
4588 (compute_frame_pointer_to_fb_displacement): Likewise.
4590 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4593 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4594 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4595 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4596 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4597 and OPTION_MASK_ISA_XSAVEC_UNSET.
4599 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4601 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4602 XOR operations in NAND case.
4604 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4606 * wide-int-range.cc (wide_int_range_convert): New.
4607 * wide-int-range.h (wide_int_range_convert): New.
4608 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4609 code into wide_int_range_convert.
4610 (extract_range_into_wide_ints): Do not munge anti range constants
4611 into the entire domain. Just return the range back.
4613 2018-09-04 Martin Liska <mliska@suse.cz>
4615 * genmatch.c (output_line_directive): Add new argument
4617 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4619 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4621 * doc/invoke.texi (Option Summary): Add whitespace.
4623 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4625 2018-09-04 Richard Biener <rguenther@suse.de>
4627 PR tree-optimization/87211
4628 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4629 backedge value we're supposed to treat as VARYING also number
4630 the PHI to VARYING in case it got a different value-number already.
4632 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4634 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4635 (extract_range_from_binary_expr_1): Do not call
4636 vrp_can_optimize_bit_op.
4637 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4639 (wide_int_range_get_mask_and_bounds): New.
4640 (wide_int_range_optimize_bit_op): New.
4641 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4642 (wide_int_range_bit_and): Same.
4643 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4644 (wide_int_range_optimize_bit_op): New.
4645 (wide_int_range_get_mask_and_bounds): New.
4647 2018-09-04 Richard Biener <rguenther@suse.de>
4649 PR tree-optimization/87176
4650 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4651 variable. When value-numbering a virtual PHI node make sure
4652 to not value-number to the backedge value.
4654 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4656 * doc/extend.texi (Long Long, Hex Floats): Document support for
4657 long long and hex floats in more recent versions of ISO C++.
4659 2018-09-03 Richard Biener <rguenther@suse.de>
4661 PR tree-optimization/87177
4662 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4665 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4667 * bb-reorder.c (edge_order): Convert to C-qsort-style
4668 tri-state comparator.
4669 (reorder_basic_blocks_simple): Change std::stable_sort to
4672 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4674 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4675 tri-state comparator.
4676 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4678 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4680 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4681 (mergesort): ... here as maximum count for using netsort.
4682 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4683 (gcc_stablesort): New.
4684 * system.h (gcc_stablesort): Declare.
4686 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4688 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4689 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4690 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4692 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4694 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4695 lxsdx and stxsdx alternatives.
4696 (*mov<mode>_hardfloat64): Ditto.
4697 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4699 2018-09-03 Richard Biener <rguenther@suse.de>
4701 PR tree-optimization/87200
4702 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4705 2018-09-03 Martin Liska <mliska@suse.cz>
4707 PR tree-optimization/87201
4708 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4709 Fix parenthesis in an expression.
4711 2018-09-03 Richard Biener <rguenther@suse.de>
4713 PR tree-optimization/87197
4714 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4715 visited. CSE the VN_INFO hashtable lookup.
4717 PR tree-optimization/87169
4718 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4719 iterating make sure there's no extra backedges from irreducible
4720 regions feeding the header. Mark the destination block
4723 2018-09-03 Martin Liska <mliska@suse.cz>
4726 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4727 * common/common-targhooks.c (default_get_valid_option_values):
4729 * common/common-targhooks.h (default_get_valid_option_values):
4731 * common/config/i386/i386-common.c: Move processor_target_table
4733 (ix86_get_valid_option_values): New function.
4734 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4735 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4736 (PTA_*): Move all defined masks into i386-common.c.
4737 (ix86_function_specific_restore): Use new processor_cost_table.
4738 * config/i386/i386.h (struct ptt): Moved from i386.c.
4739 (struct pta): Likewise.
4740 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4741 * doc/tm.texi.in: Likewise.
4742 * opt-suggestions.c (option_proposer::suggest_option):
4743 Pass prefix to build_option_suggestions.
4744 (option_proposer::get_completions): Likewise.
4745 (option_proposer::build_option_suggestions): Use the new target
4747 * opts.c (struct option_help_tuple): New struct.
4748 (print_filtered_help): Use the new target hook.
4750 2018-09-03 Martin Liska <mliska@suse.cz>
4753 * predict.c (set_even_probabilities): Add likely_edges
4754 argument and handle cases where we have precisely one
4756 (combine_predictions_for_bb): Catch also likely_edges.
4757 (tree_predict_by_opcode): Handle gswitch statements.
4758 * tree-cfg.h (find_case_label_for_value): New declaration.
4759 (find_taken_edge_switch_expr): Likewise.
4760 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4761 Find pivot in decision tree based on probabily, not by number of
4764 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
4766 * doc/standards.texi (Standards): Update Objective-C reference.
4768 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4770 * doc/install.texi (Prerequisites): Update link for MPC.
4772 2018-09-01 Michael Matz <matz@suse.de>
4774 PR tree-optimization/87074
4775 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4776 PHIs for outer-loop uses.
4778 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4780 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4781 * doc/invoke.texi (C Dialect Options): Ditto.
4783 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4785 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4787 2018-08-31 Richard Biener <rguenther@suse.de>
4789 PR tree-optimization/87168
4790 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4791 (rpo_elim::eliminate_avail): When OP was not visited it must
4794 2018-08-31 David Malcolm <dmalcolm@redhat.com>
4796 * tree-vrp.c (copy_value_range): Convert param "from" from
4797 "value_range *" to "const value_range *".
4798 (range_is_null): Likewise for param "vr".
4799 (range_int_cst_p): Likewise.
4800 (range_int_cst_singleton_p): Likewise.
4801 (symbolic_range_p): Likewise.
4802 (value_ranges_intersect_p): Likewise for both params.
4803 (value_range_nonnegative_p): Likewise for param "vr".
4804 (value_range_constant_singleton): Likewise.
4805 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4806 (extract_range_into_wide_ints): Likewise for param "vr".
4807 (extract_range_from_multiplicative_op): Likewise for params "vr0"
4809 (vrp_can_optimize_bit_op): Likewise.
4810 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4812 (extract_range_from_unary_expr): Likewise.
4813 (debug_value_range): Likewise for param "vr".
4814 (value_range::dump): Add "const" qualifier.
4815 (vrp_prop::check_array_ref): Convert local "vr" from
4816 "value_range *" to "const value_range *".
4817 (vrp_prop::check_mem_ref): Likewise.
4818 (vrp_prop::visit_stmt): Likewise for local "old_vr".
4819 (vrp_intersect_ranges_1): Likewise for param "vr_1".
4820 (vrp_intersect_ranges): Likewise.
4821 (simplify_stmt_for_jump_threading): Likewise for local "vr".
4822 (vrp_prop::vrp_finalize): Likewise.
4823 * tree-vrp.h (value_range::dump): Add "const" qualifier.
4824 (vrp_intersect_ranges): Add "const" qualifier to params as above.
4825 (extract_range_from_unary_expr): Likewise.
4826 (value_range_constant_singleton): Likewise.
4827 (symbolic_range_p): Likewise.
4828 (copy_value_range): Likewise.
4829 (extract_range_from_binary_expr_1): Likewise.
4830 (range_int_cst_p): Likewise.
4831 (vrp_set_zero_nonzero_bits): Likewise.
4832 (range_int_cst_singleton_p): Likewise.
4834 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
4836 * config/aarch64/arm_neon.h (vabsd_s64): New.
4837 (vnegd_s64): Likewise.
4839 2018-08-31 Martin Jambor <mjambor@suse.cz>
4841 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4843 2018-08-31 Martin Liska <mliska@suse.cz>
4845 * ipa-icf.c (sem_item::add_type): Use
4846 sem_item::m_type_hash_cache.
4847 * ipa-icf.h: Move the cache from sem_item_optimizer
4850 2018-08-31 Nathan Sidwell <nathan@acm.org>
4852 * doc/extend.texi (Backwards Compatibility): Remove implicit
4853 extern C leeway of () being (...).
4855 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4857 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4859 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
4863 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4865 2018-08-31 Jakub Jelinek <jakub@redhat.com>
4868 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4869 gen_int_mode. Formatting fixes.
4871 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
4873 * target.def (custom_function_descriptors): Improve documentation.
4874 * doc/tm.texi.in (Trampolines): Expand discussion of function
4875 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4876 beginning of the section.
4877 * doc/tm.texi: Regenerated.
4879 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
4881 * cfg.h (class auto_edge_flag): Spell out the template-id of the
4882 base class in the initializer list. This is a workaround for
4883 building with older GCC.
4884 (class auto_bb_flag): Likewise.
4886 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4888 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4889 (altivec_vcmpequ<VI_char>_p): Remove star.
4890 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4892 (expand_strncmp_vec_sequence): New function.
4893 (emit_final_str_compare_vec): New function.
4894 (expand_strn_compare): Add support for vector strncmp.
4895 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4896 length specification to bytes.
4897 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4898 (vcmpnezb_p): New pattern.
4899 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4900 for option -mstring-compare-inline-limit.
4902 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
4904 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4905 (PTA_SKYLAKE): Add PTA_AES.
4906 (PTA_GOLDMONT): Likewise.
4908 2018-08-29 Jan Hubicka <jh@suse.cz>
4911 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4912 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4914 2018-08-29 Jan Hubicka <jh@suse.cz>
4916 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4918 (hash_tree): Do not visit TYPE_STUB_DECL.
4919 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4920 stream TYPE_STUB_DECL.
4921 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4922 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4923 after free_lang_data.
4924 (type_in_anonymous_namespace_p): Likewise.
4926 2018-08-29 Jan Hubicka <jh@suse.cz>
4928 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4929 comment that it has to be even number.
4930 (class sreal): Change m_sig type to int32_t.
4931 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4932 int64_t for temporary calculations.
4933 (sreal_verify_basics): Drop one bit from minimum and maximum.
4935 2018-08-30 Richard Biener <rguenther@suse.de>
4937 PR tree-optimization/87147
4938 * tree-ssa-sccvn.c (SSA_VISITED): New function.
4939 (visit_phi): When the degenerate result is from the backedge and
4940 we didn't visit its definition yet drop to VARYING.
4941 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4943 2018-08-29 Jan Hubicka <jh@suse.cz>
4945 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4947 (hash_tree): Likewise.
4949 2018-08-29 Jan Hubicka <jh@suse.cz>
4951 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4952 and TYPE_NEXT_REF_TO.
4954 2018-08-29 Jan Hubicka <jh@suse.cz>
4956 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4957 comment that it has to be even number.
4958 (class sreal): Change m_sig type to int32_t.
4959 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4960 int64_t for temporary calculations.
4961 (sreal_verify_basics): Drop one bit from minimum and maximum.
4963 2018-08-30 Tamar Christina <tamar.christina@arm.com>
4965 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4967 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
4970 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4971 if to_add is negative.
4973 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
4976 * builtins.c (c_strlen): Improve range checks.
4978 2018-08-29 Martin Sebor <msebor@redhat.com>
4979 Jeff Law <law@redhat.com>
4981 PR tree-optimization/86714
4982 PR tree-optimization/86711
4983 * builtins.c (c_strlen): Add arguments to call to string_constant.
4984 * expr.c (string_constant): Add argument. Detect missing nul
4985 terminator and outermost declaration it's missing in.
4986 * expr.h (string_constant): Add argument.
4987 * fold-const.c (read_from_constant_string): Add arguments to call to
4989 (c_getstr): Likewise.
4990 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4992 * tree-ssa-strlen.c (get_stridx): Likewise.
4994 2018-08-29 Jan Hubicka <jh@suse.cz>
4996 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4997 Do not stream DECL_VINDEX.
4998 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4999 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5000 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5002 2018-08-29 Richard Biener <rguenther@suse.de>
5004 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5005 virtual operands that are not default defs to honor region
5007 (rpo_vn_valueize): Remove ineffective code here.
5009 2018-08-29 Richard Biener <rguenther@suse.de>
5011 PR tree-optimization/87132
5012 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5013 when skipping defs reachable over backedges.
5015 2018-08-29 Richard Biener <rguenther@suse.de>
5017 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5018 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5019 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5020 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5021 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5022 (vn_reference_lookup_3): Remove use of const_parms.
5023 (free_rpo_vn): Do not free const_parms.
5024 (do_rpo_vn): Do not call init_const_parms.
5025 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5026 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5027 (call_may_clobber_ref_p_1): Likewise.
5029 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5032 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5034 (-ftree-scev-cprop): Document.
5036 2018-08-29 Jan Hubicka <jh@suse.cz>
5038 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5040 (sreal constructor): Update.
5041 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5042 sreal:operator/): Update.
5044 2018-08-29 Martin Liska <mliska@suse.cz>
5046 * tree-switch-conversion.c (switch_conversion::expand):
5047 Strenghten assumption about gswitch statements.
5049 2018-08-29 Richard Biener <rguenther@suse.de>
5051 PR tree-optimization/87117
5052 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5053 re-value-number released SSA VDEFs.
5055 2018-08-29 Richard Biener <rguenther@suse.de>
5057 PR tree-optimization/87126
5058 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5060 2018-08-28 Jim Wilson <jimw@sifive.com>
5062 * config/riscv/pic.md: Rewrite.
5063 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5065 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5066 (SOFTF, default_load, softload, softstore): New.
5068 2018-08-28 Jeff Law <law@redhat.com>
5070 * fold-const.c (fold_binary_loc): Remove recently added assert.
5072 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5074 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5075 to OP parmeter of generated function.
5077 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5079 PR tree-optimization/87009
5080 * match.pd: Add boolean optimizations.
5082 2018-08-28 Martin Sebor <msebor@redhat.com>
5085 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5086 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5087 (pass_walloca::gate): Use it.
5088 (alloca_call_type): Same.
5089 (pass_walloca::execute): Same.
5090 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5092 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5094 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5095 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5098 2018-08-28 Richard Biener <rguenther@suse.de>
5100 PR tree-optimization/87124
5101 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5102 constants before looking up avail.
5104 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5107 * calls.c (maybe_warn_nonstring_arg): Punt early if
5108 warn_stringop_overflow is zero. Don't call get_range_strlen
5109 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5110 Swap comparison operands to have constants on rhs. Only use
5111 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5112 increment lenrng[0].
5114 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5116 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5117 use of tree_to_shwi. Remove duplicated test for the size being
5118 a whole number of bytes.
5120 2018-08-28 Richard Biener <rguenther@suse.de>
5122 PR tree-optimization/87117
5123 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5124 Handle removed stmt without LHS (GIMPLE_NOP).
5126 2018-08-28 Richard Biener <rguenther@suse.de>
5128 PR tree-optimization/87117
5129 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5130 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5132 2018-08-28 Richard Biener <rguenther@suse.de>
5134 PR tree-optimization/87117
5135 * tree-ssa-pre.c (compute_avail): Do not make expressions
5136 with predicated values available.
5137 (get_expr_value_id): Assert we do not run into predicated value
5140 2018-08-28 Richard Biener <rguenther@suse.de>
5142 PR tree-optimization/87117
5143 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5144 get virtual operands.
5145 (get_expr_operands): Handle STRING_CST like other decls.
5147 2018-08-28 Martin Liska <mliska@suse.cz>
5149 * tree.h: Update documentation of fndecl_built_in_p
5153 2018-08-27 Jeff Law <law@redhat.com>
5154 PR tree-optimization/87110
5155 * tree-ssa-dse.c (compute_trims): Handle non-constant
5158 2018-08-27 Martin Sebor <msebor@redhat.com>
5160 PR tree-optimization/86914
5161 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5163 2018-08-27 Martin Sebor <msebor@redhat.com>
5165 PR tree-optimization/87112
5166 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5167 the type of the bound argument.
5169 2018-08-27 Jeff Law <law@redhat.com>
5171 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5172 type does not have a TYPE_SIZE_UNIT.
5174 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5176 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5177 with include of backend.h.
5179 2018-08-27 Richard Biener <rguenther@suse.de>
5181 PR tree-optimization/86927
5182 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5183 use const cond reduction code.
5185 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5187 PR tree-optimization/85758
5188 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5190 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5193 * diagnostic-show-locus.c (class layout_range): Update for
5194 conversion of show_caret_p to a tri-state.
5195 (layout_range::layout_range): Likewise.
5196 (make_range): Likewise.
5197 (layout::maybe_add_location_range): Likewise.
5198 (layout::should_print_annotation_line_p): Don't show annotation
5199 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5200 (layout::get_state_at_point): Update for conversion of
5201 show_caret_p to a tri-state. Bail out early for
5202 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5203 underlining or source colorization.
5204 (gcc_rich_location::add_location_if_nearby): Update for conversion
5205 of show_caret_p to a tri-state.
5206 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5207 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5209 (selftest::test_one_liner_labels): Likewise.
5210 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5211 conversion of show_caret_p to a tri-state.
5212 * pretty-print.c (text_info::set_location): Likewise.
5213 * pretty-print.h (text_info::set_location): Likewise.
5214 * substring-locations.c (format_warning_n_va): Likewise.
5215 * tree-diagnostic.c (default_tree_printer): Likewise.
5216 * tree-pretty-print.c (newline_and_indent): Likewise.
5218 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5221 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5222 line above for line-insertion fix-it hints.
5223 (selftest::test_fixit_insert_containing_newline): Update the
5224 expected results, and add a test with line-numbering enabled.
5226 2018-08-27 Martin Liska <mliska@suse.cz>
5229 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5230 params with DECL_HAS_VALUE_EXPR_P.
5232 2018-08-27 Martin Liska <mliska@suse.cz>
5234 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5235 selected expansion strategy.
5237 2018-08-27 Martin Liska <mliska@suse.cz>
5239 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5240 * builtins.c (is_builtin_fn): Likewise.
5241 * attribs.c (diag_attr_exclusions): Use new function
5242 fndecl_built_in_p and remove check for FUNCTION_DECL if
5244 (builtin_mathfn_code): Likewise.
5245 (fold_builtin_expect): Likewise.
5246 (fold_call_expr): Likewise.
5247 (fold_builtin_call_array): Likewise.
5248 (fold_call_stmt): Likewise.
5249 (set_builtin_user_assembler_name): Likewise.
5250 (is_simple_builtin): Likewise.
5251 * calls.c (gimple_alloca_call_p): Likewise.
5252 (maybe_warn_nonstring_arg): Likewise.
5253 * cfgexpand.c (expand_call_stmt): Likewise.
5254 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5255 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5256 (cgraph_node::verify_node): Likewise.
5257 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5258 (cgraph_node::create_clone): Likewise.
5259 * config/arm/arm.c (arm_insert_attributes): Likewise.
5260 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5261 * dse.c (scan_insn): Likewise.
5262 * expr.c (expand_expr_real_1): Likewise.
5263 * fold-const.c (operand_equal_p): Likewise.
5264 (fold_binary_loc): Likewise.
5265 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5266 * gimple-low.c (lower_stmt): Likewise.
5267 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5268 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5270 * gimple.c (gimple_build_call_from_tree): Likewise.
5271 (gimple_call_builtin_p): Likewise.
5272 (gimple_call_combined_fn): Likewise.
5273 * gimplify.c (gimplify_call_expr): Likewise.
5274 (gimple_boolify): Likewise.
5275 (gimplify_modify_expr): Likewise.
5276 (gimplify_addr_expr): Likewise.
5277 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5278 * ipa-cp.c (determine_versionability): Likewise.
5279 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5280 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5281 * ipa-split.c (visit_bb): Likewise.
5282 (split_function): Likewise.
5283 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5284 * lto-cgraph.c (input_node): Likewise.
5285 * lto-streamer-out.c (write_symbol): Likewise.
5286 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5287 (lower_omp_1): Likewise.
5288 * predict.c (strip_predict_hints): Likewise.
5289 * print-tree.c (print_node): Likewise.
5290 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5291 * trans-mem.c (is_tm_irrevocable): Likewise.
5292 (is_tm_load): Likewise.
5293 (is_tm_simple_load): Likewise.
5294 (is_tm_store): Likewise.
5295 (is_tm_simple_store): Likewise.
5296 (is_tm_abort): Likewise.
5297 (tm_region_init_1): Likewise.
5298 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5299 * tree-cfg.c (verify_gimple_call): Likewise.
5300 (move_stmt_r): Likewise.
5301 (stmt_can_terminate_bb_p): Likewise.
5302 * tree-eh.c (lower_eh_constructs_2): Likewise.
5303 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5304 * tree-inline.c (remap_gimple_stmt): Likewise.
5305 (copy_bb): Likewise.
5306 (estimate_num_insns): Likewise.
5307 (fold_marked_statements): Likewise.
5308 * tree-sra.c (scan_function): Likewise.
5309 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5310 (optimize_stack_restore): Likewise.
5311 (pass_fold_builtins::execute): Likewise.
5312 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5313 (mark_all_reaching_defs_necessary_1): Likewise.
5314 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5315 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5316 (pass_forwprop::execute): Likewise.
5317 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5318 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5319 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5320 * tree-ssa-strlen.c (get_string_length): Likewise.
5321 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5322 (find_func_aliases_for_call): Likewise.
5323 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5324 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5325 * tree-tailcall.c (find_tail_calls): Likewise.
5326 * tree.c (need_assembler_name_p): Likewise.
5327 (free_lang_data_in_decl): Likewise.
5328 (get_call_combined_fn): Likewise.
5329 * ubsan.c (is_ubsan_builtin_p): Likewise.
5330 * varasm.c (incorporeal_function_p): Likewise.
5331 * tree.h (DECL_BUILT_IN): Remove and replace with
5333 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5334 (fndecl_built_in_p): New.
5336 2018-08-27 Martin Liska <mliska@suse.cz>
5338 PR tree-optimization/86847
5339 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5340 Dump also subtree probability.
5341 (switch_decision_tree::do_jump_if_equal): New function.
5342 (switch_decision_tree::emit_case_nodes): Handle special
5343 situations in balanced tree that can be emitted much simpler.
5344 Fix calculation of probabilities that happen in tree expansion.
5345 * tree-switch-conversion.h (struct cluster): Add
5347 (struct simple_cluster): Likewise.
5348 (struct case_tree_node): Add new function has_child.
5349 (do_jump_if_equal): New.
5351 2018-08-27 Martin Liska <mliska@suse.cz>
5353 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5354 Add new argument to bit_test_cluster constructor.
5355 (bit_test_cluster::emit): Set bits really number of values
5357 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5358 probability argument.
5359 * tree-switch-conversion.h (struct bit_test_cluster):
5360 Add m_handles_entire_switch.
5362 2018-08-27 Martin Liska <mliska@suse.cz>
5364 PR tree-optimization/86702
5365 * tree-switch-conversion.c (jump_table_cluster::emit):
5366 Make probabilities even for values in jump table
5367 according to number of cases handled.
5368 (switch_decision_tree::compute_cases_per_edge): Pass
5369 argument to reset_out_edges_aux function.
5370 (switch_decision_tree::analyze_switch_statement): Likewise.
5371 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5374 2018-08-27 Martin Liska <mliska@suse.cz>
5376 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5377 cfun argument explicitly.
5378 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5379 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5380 function gimple_switch_default_bb.
5381 (convert_switch_statements):
5383 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5384 * stmt.c (label_to_block_fn): Use label_to_block and pass
5385 cfun argument explicitly and use gimple_switch_label_bb.
5386 (expand_case): Likewise.
5387 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5388 cfun argument explicitly. Likewise.
5389 (make_edges_bb): Likewise.
5390 (make_cond_expr_edges): Likewise.
5391 (get_cases_for_edge): Likewise.
5392 (make_gimple_switch_edges): Likewise.
5393 (label_to_block_fn): Likewise.
5394 (label_to_block): Likewise.
5395 (make_goto_expr_edges): Likewise.
5396 (make_gimple_asm_edges): Likewise.
5397 (main_block_label): Likewise.
5398 (group_case_labels_stmt): Likewise.
5399 (find_taken_edge_computed_goto): Likewise.
5400 (find_taken_edge_switch_expr): Likewise.
5401 (gimple_verify_flow_info): Likewise.
5402 (gimple_redirect_edge_and_branch): Likewise.
5403 (gimple_switch_label_bb): New function.
5404 (gimple_switch_default_bb): Likewise.
5405 (gimple_switch_edge): Likewise.
5406 (gimple_switch_default_edge): Likewise.
5407 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5408 (label_to_block): ... with this.
5409 (gimple_switch_label_bb): New.
5410 (gimple_switch_default_bb): Likewise.
5411 (gimple_switch_edge): Likewise.
5412 (gimple_switch_default_edge): Likewise.
5413 * tree-cfgcleanup.c (convert_single_case_switch): Use
5414 new gimple functions and pass new argument to label_to_block.
5415 (cleanup_control_flow_bb):
5416 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5417 cfun argument explicitly.
5418 (make_eh_edges): Likewise.
5419 (redirect_eh_dispatch_edge): Likewise.
5420 (lower_resx): Likewise.
5421 (lower_eh_dispatch): Likewise.
5422 (maybe_remove_unreachable_handlers): Likewise.
5423 (unsplit_eh): Likewise.
5424 (cleanup_empty_eh): Likewise.
5425 (verify_eh_edges): Likewise.
5426 (verify_eh_dispatch_edge): Likewise.
5427 * tree-ssa-dom.c (record_edge_info): Likewise.
5428 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5429 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5430 (thread_through_normal_block): Likewise.
5431 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5432 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5433 * tree-switch-conversion.c (switch_conversion::collect): Use new
5435 (switch_conversion::check_final_bb): Likewise.
5436 (switch_conversion::gather_default_values): Pass new argument
5438 (switch_conversion::build_constructors): Likewise.
5439 (switch_decision_tree::compute_cases_per_edge): Use new
5440 gimple_switch_edge function.
5441 (switch_decision_tree::analyze_switch_statement): Pass new argument
5443 (switch_decision_tree::try_switch_expansion): Use
5444 gimple_switch_default_edge.
5445 * tree-vrp.c (find_switch_asserts): Pass new argument
5447 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5448 (vr_values::simplify_switch_using_ranges): Likewise.
5450 2018-08-27 Richard Biener <rguenther@suse.de>
5452 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5453 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5455 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5456 (struct vn_nary_op_s): Add unwind_to member. Add
5457 predicated_values flag and put result into a union together
5458 with a linked list of vn_pval.
5459 (struct vn_ssa_aux): Add name member to make maintaining
5460 a map of SSA name to vn_ssa_aux possible. Remove no longer
5461 needed info, dfsnum, low, visited, on_sccstack, use_processed
5462 and range_info_anti_range_p members.
5463 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5464 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5466 (vn_valueize): New global.
5467 (vn_context_bb): Likewise.
5468 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5469 VN_INFO_PTR_INFO): Remove.
5470 * tree-ssa-sccvn.c: ... (rewrite)
5471 (pass_fre::execute): For -O2+ initialize loops and run
5472 RPO VN in optimistic mode (iterating). For -O1 and -Og
5473 run RPO VN in non-optimistic mode.
5474 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5475 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5476 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5477 (rpo-vn-max-loop-depth): Document.
5478 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5479 when valuezing the VUSE signals we walked out of the region.
5480 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5481 (phi_translate): Set VN context block to use for availability
5483 (compute_avail): Likewise.
5484 (pre_valueize): New function.
5485 (pass_pre::execute): Adjust to the RPO VN API.
5487 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5488 (propagate_constants_for_unrolling): Remove.
5489 (tree_unroll_loops_completely): Perform value-numbering
5490 on the unrolled bodies loop parent.
5492 2018-08-27 Richard Biener <rguenther@suse.de>
5494 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5495 for partial antic compute.
5497 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5499 PR rtl-optimization/87065
5500 * combine.c (simplify_if_then_else): Formatting fix.
5501 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5503 (known_cond): Don't return const_true_rtx for vector modes. Use
5504 CONST0_RTX instead of const0_rtx. Formatting fixes.
5506 2018-08-27 Martin Liska <mliska@suse.cz>
5508 PR gcov-profile/87069
5509 * gcov.c (process_file): Record files already processed
5510 and warn about a file being processed multiple times.
5512 2018-08-27 Martin Liska <mliska@suse.cz>
5515 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5516 Set default values for x_aarch64_*_string strings.
5517 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5518 prefix. For -mabi do not print '=ABI' in help and use
5519 <option_value> format for -msve-vector-bits and -moverride
5522 2018-08-26 Jeff Law <law@redhat.com>
5524 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5527 2018-08-26 Marek Polacek <polacek@redhat.com>
5529 PR c++/87029, Implement -Wredundant-move.
5530 * doc/invoke.texi: Document -Wredundant-move.
5532 2018-08-25 Martin Sebor <msebor@redhat.com>
5534 PR tree-optimization/87059
5535 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5536 to the same type as the other.
5537 * fold-const.c (fold_binary_loc): Assert expectation.
5539 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5541 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5542 extraneous parentheses, dead code section and formatting.
5544 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5547 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5548 wide enough for jumps in the line-numbering to be visible.
5549 (layout::print_gap_in_line_numbering): New member function.
5550 (layout::calculate_line_spans): When using line numbering, merge
5551 line spans that are only 1 line apart.
5552 (diagnostic_show_locus): When printing line numbers, show gaps in
5553 line numbering directly, rather than printing headers.
5554 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5555 line-numbering with multiple line spans.
5556 (selftest::test_fixit_insert_containing_newline_2): Add test of
5557 line-numbering, in which the spans are close enough to be merged.
5559 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5561 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5562 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5563 * tree-vrp.c (range_is_nonnull): Remove.
5564 (range_includes_zero_p): Accept value_range instead of min/max.
5565 (extract_range_from_binary_expr_1): Do not early bail on
5567 Use range_includes_zero_p instead of range_is_nonnull.
5568 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5569 of range_is_nonnull.
5570 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5571 special case VR_ANTI_RANGE.
5572 (vrp_finalize): Same.
5573 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5575 (range_is_nonnull): Remove.
5576 * vr-values.c (vrp_stmt_computes_nonzero): Use
5577 range_includes_zero_p instead of range_is_nonnull.
5578 (extract_range_basic): Pass value_range to range_includes_zero_p
5579 instead of range_is_nonnull.
5581 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5583 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5584 * emit-rtl.h (rtl_data): Remove return_bnd.
5585 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5586 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5587 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5588 (POINTER_BOUNDS_MODE): Remove definition.
5589 (make_pointer_bounds_mode): Remove.
5590 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5591 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5592 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5593 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5594 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5595 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5596 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5598 * config/i386/i386-modes.def (BND32, BND64): Remove.
5599 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5600 (dbx64_register_map): Ditto.
5601 (svr4_dbx_register_map): Ditto.
5602 (indirect_thunk_bnd_needed): Remove.
5603 (indirect_thunks_bnd_used): Ditto.
5604 (indirect_return_bnd_needed): Ditto.
5605 (indirect_return_via_cx_bnd): Ditto.
5606 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5607 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5608 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5609 (output_indirect_thunk_function): Remove handling of
5610 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5611 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5612 (ix86_save_reg): Remove handling of crtl->return_bnd.
5613 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5614 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5615 and UNSPEC_BNDLX_ADDR.
5616 (ix86_output_indirect_branch_via_reg): Remove handling of
5617 indirect_thunk_prefix_bnd.
5618 (ix86_output_indirect_branch_via_push): Ditto.
5619 (ix86_output_function_return): Ditto.
5620 (ix86_output_indirect_function_return): Ditto.
5621 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5622 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5623 (CALL_USED_REGISTERS): Ditto.
5624 (REG_ALLOC_ORDER): Update for removal of bound registers.
5625 (HI_REGISTER_NAMES): Ditto.
5626 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5627 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5628 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5629 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5630 (FIRST_PSEUDO_REG): Update.
5631 (BND): Remove mode iterator.
5632 * config/i386/predicates.md (bnd_mem_operator): Remove.
5634 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5636 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5639 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5641 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5642 the case in which the permute needs only a single element and
5643 repeats for every vector of the result. Extend that case to
5644 handle variable-length vectors.
5645 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5647 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5650 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5651 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5653 2018-08-24 Richard Biener <rguenther@suse.de>
5655 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5656 bb_flags_allocated members.
5657 (auto_flag): New RAII class for allocating flags.
5658 (auto_edge_flag): New RAII class for allocating edge flags.
5659 (auto_bb_flag): New RAII class for allocating bb flags.
5660 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5662 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5663 in favor of temporarily allocated BB flag.
5664 * hsa-brig.c: Re-order includes.
5665 * hsa-dump.c: Likewise.
5666 * hsa-regalloc.c: Likewise.
5667 * print-rtl.c: Likewise.
5668 * profile-count.c: Likewise.
5670 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5673 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5676 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5679 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5680 from wide_int_range_multiplicative_op.
5682 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5684 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5687 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5689 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5692 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5694 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5695 full GENERIC expression used for replacement.
5697 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5699 * tree-vrp.c (abs_extent_range): Remove.
5700 (extract_range_into_wide_ints): Pass wide ints by reference.
5701 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5702 Pass wide ints by reference in all calls to
5703 extract_range_into_wide_ints.
5704 * wide-int-range.cc (wide_int_range_div): New.
5705 * wide-int-range.h (wide_int_range_div): New.
5706 (wide_int_range_includes_zero_p): New.
5707 (wide_int_range_zero_p): New.
5709 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5711 * config/aarch64/aarch64.md (arches): New enum.
5712 (arch): New enum attr.
5713 (arch_enabled): New attr.
5714 (enabled): Now uses arch_enabled only.
5715 (simd, sve, fp16): Removed attribute.
5716 (fp): Attr now defined in terms of 'arch'.
5717 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5718 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5719 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5720 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5721 attributes into 'arch'.
5722 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5723 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5724 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5725 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5726 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5727 'simd' attribute into 'arch'.
5728 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5729 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5730 Convert use of 'fp' attribute to 'arch'.
5731 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5732 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5734 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5735 (different modes) Merge 'fp' and 'simd' into 'arch'.
5736 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5739 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5741 PR rtl-optimization/87026
5742 * expmed.c (canonicalize_comparison): If we can no longer create
5743 pseudoregisters, don't.
5745 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
5748 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5750 * config/arm/arm.c (speculation_barrier_libfunc): New static
5752 (arm_init_libfuncs): Initialize it.
5753 (arm_emit_speculation_barrier): New function.
5754 * config/arm/arm.md (speculation_barrier): Call
5755 arm_emit_speculation_barrier for architectures that do not have
5757 (speculation_barrier_insn): Only match on Armv7 or later.
5759 2018-08-23 Richard Biener <rguenther@suse.de>
5762 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5765 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5767 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5768 of single-vector TBLs.
5769 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5772 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5775 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5776 aarch64_evpc_tbl guard.
5778 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
5780 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5783 2018-08-22 Martin Sebor <msebor@redhat.com>
5786 * tree-pretty-print.c (pretty_print_string): Add argument.
5787 (dump_generic_node): Call to pretty_print_string with string size.
5789 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
5791 PR rtl-optimization/86771
5792 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5793 of two SETs into those two SETs, one to be placed at i2, if that SETs
5794 destination is modified between i2 and i3.
5796 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5798 PR tree-optimization/86725
5799 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5801 (vect_analyze_scalar_cycles_1): Check it.
5803 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5805 PR tree-optimization/86725
5806 * tree-vect-loop.c (vect_is_simple_reduction): When treating
5807 an outer loop phi as a double reduction, make sure that the
5808 single user of the phi result is an inner loop phi.
5810 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5812 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5813 grouped stores with gaps to a strided group.
5815 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5817 * tree-vect-stmts.c (get_group_load_store_type)
5818 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5819 first statement in a group.
5821 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5823 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5824 the sequence used in gcc/gcc.c.
5826 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5829 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5832 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5834 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5835 Darwin10-specific unwinder-shim.
5836 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5837 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5838 New to cater for Darwin10 Rosetta.
5840 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5842 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5843 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5845 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5850 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5851 (dwarf2out_switch_text_section): Generate a local label for the
5852 second function sub-section and apply it as the second FDE start
5854 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5855 second sub-section start.
5857 2018-08-22 Richard Biener <rguenther@suse.de>
5859 PR tree-optimization/86988
5860 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5862 2018-08-22 Richard Biener <rguenther@suse.de>
5864 PR tree-optimization/86945
5865 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5867 2018-08-22 Alexandre Oliva <oliva@adacore.com>
5869 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5870 a comment about how uses of r2 for .sdata2 come about.
5872 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
5874 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5876 2018-08-21 Marek Polacek <polacek@redhat.com>
5878 PR c++/86981, Implement -Wpessimizing-move.
5879 * doc/invoke.texi: Document -Wpessimizing-move.
5881 2018-08-21 Jan Hubicka <jh@suse.cz>
5883 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5884 * tree.h (is_redundant_typedef): Remove.
5885 * dwarf2out.c (is_redundant_typedef): Turn into static function.
5887 2018-08-21 Jan Hubicka <jh@suse.cz>
5889 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5892 2018-08-21 Tamar Christina <tamar.christina@arm.com>
5894 * expmed.c (extract_low_bits): Reject invalid subregs early.
5896 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5899 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5902 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5904 * config/vxworks.h: Guard vxworks_asm_out_constructor and
5905 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5906 * config/vxworks.c: Likewise.
5908 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5910 * config/vxworks.c: Set targetm.have_ctors_dtors
5911 if HAVE_INITFINI_ARRAY_SUPPORT.
5912 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5913 if HAVE_INITFINI_ARRAY_SUPPORT.
5915 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5917 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5918 default search path for VxWorks < 7.
5920 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5922 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5923 (get_format_string): Refer to c_getstr.
5925 2018-08-21 Tom de Vries <tdevries@suse.de>
5927 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5928 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5929 (debuginfo_early_stop): Declare.
5930 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5931 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5932 (debuginfo_early_stop): New function.
5933 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5934 and debuginfo_early_stop.
5935 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5936 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5937 (general_init): Call debuginfo_early_init.
5938 (finalize): Call debuginfo_fini.
5939 (do_compile): Call debuginfo_init.
5940 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5942 (@item -fdump-debug, @item -fdump-earlydebug): Add.
5944 2018-08-21 Tom de Vries <tdevries@suse.de>
5946 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5947 flag_dump_noaddr and flag_dump_unnumbered.
5949 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
5951 * wide-int-range.cc (wide_int_range_abs): New.
5952 (wide_int_range_order_set): Rename from wide_int_range_min_max.
5953 * wide-int-range.h (wide_int_range_abs): New.
5954 (wide_int_range_min_max): New.
5955 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5956 case to call wide_int_range_abs.
5957 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5958 (extract_range_from_abs_expr): Delete.
5960 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
5963 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5964 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5967 2018-08-20 Nathan Sidwell <nathan@acm.org>
5968 Jeff Law <law@redhat.com>
5970 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5971 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5973 2018-08-20 David Malcolm <dmalcolm@redhat.com>
5976 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5977 (decl_attributes): Likewise.
5978 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5980 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5981 * diagnostic-core.h (class auto_diagnostic_group): New class.
5982 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5983 (diagnostic_report_diagnostic): Handle the first diagnostics within
5985 (emit_diagnostic): Add auto_diagnostic_group instance.
5987 (inform_n): Likewise.
5988 (warning): Likewise.
5989 (warning_at): Likewise.
5990 (warning_n): Likewise.
5991 (pedwarn): Likewise.
5992 (permerror): Likewise.
5994 (error_n): Likewise.
5995 (error_at): Likewise.
5997 (fatal_error): Likewise.
5998 (internal_error): Likewise.
5999 (internal_error_no_backtrace): Likewise.
6000 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6001 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6002 * diagnostic.h (struct diagnostic_context): Add fields
6003 "diagnostic_group_nesting_depth",
6004 "diagnostic_group_emission_count", "begin_group_cb",
6006 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6007 Add auto_diagnostic_group instance(s).
6008 (find_explicit_erroneous_behavior): Likewise.
6009 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6010 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6011 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6012 (gimplify_va_arg_expr): Likewise.
6013 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6014 (HSA_SORRY_AT): Likewise.
6015 * ipa-devirt.c (compare_virtual_tables): Likewise.
6016 (warn_odr): Likewise.
6017 * multiple_target.c (expand_target_clones): Likewise.
6018 * opts-common.c (cmdline_handle_error): Likewise.
6019 * reginfo.c (globalize_reg): Likewise.
6020 * substring-locations.c (format_warning_n_va): Likewise.
6021 * tree-inline.c (expand_call_inline): Likewise.
6022 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6023 * tree-ssa-loop-niter.c
6024 (do_warn_aggressive_loop_optimizations): Likewise.
6025 * tree-ssa-uninit.c (warn_uninit): Likewise.
6026 * tree.c (warn_deprecated_use): Likewise.
6028 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6031 * config/i386/i386.md (eh_return): Always update EH return
6032 address in word_mode.
6034 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6036 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6037 TARGET_SPLIT_COMPLEX_ARG is defined.
6039 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6041 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6043 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6046 * expr.c (expand_assignment): Assert that bitpos is positive.
6047 (store_field): Likewise
6048 (expand_expr_real_1): Make sure that bitpos is positive.
6049 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6052 2018-08-20 Nathan Sidwell <nathan@acm.org>
6054 * Makefile.in (CPP_ID_DATA_H): Delete.
6055 (CPP_INTERNAL_H): Don't add it.
6056 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6057 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6059 2018-08-20 Richard Biener <rguenther@suse.de>
6061 PR tree-optimization/78655
6062 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6063 pointer + offset nonnull if either operand is nonnull work.
6065 2018-08-20 Tom de Vries <tdevries@suse.de>
6067 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6068 unless the referenced die describes the added property using
6069 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6070 Otherwise, add a DW_AT_location to the referenced die.
6072 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6075 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6076 register_operand when calling ix86_set_reg_reg_cost.
6077 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6078 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6079 predicate and to 1 otherwise.
6081 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6083 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6084 emit a diagnostic that it is not supported and reset the option.
6085 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6086 supported and consume the option. (ASM_FINAL_SPEC): New.
6088 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6090 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6093 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6095 C-SKY port: Documentation
6097 * doc/extend.texi (C-SKY Function Attributes): New section.
6098 * doc/invoke.texi (Option Summary): Add C-SKY options.
6099 (C-SKY Options): New section.
6100 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6102 2018-08-17 Jojo <jijie_rong@c-sky.com>
6103 Huibin Wang <huibin_wang@c-sky.com>
6104 Sandra Loosemore <sandra@codesourcery.com>
6105 Chung-Lin Tang <cltang@codesourcery.com>
6107 C-SKY port: Backend implementation
6109 * config/csky/*: New.
6110 * common/config/csky/*: New.
6112 2018-08-17 Jojo <jijie_rong@c-sky.com>
6113 Huibin Wang <huibin_wang@c-sky.com>
6114 Sandra Loosemore <sandra@codesourcery.com>
6115 Chung-Lin Tang <cltang@codesourcery.com>
6116 Andrew Jenner <andrew@codesourcery.com>
6118 C-SKY port: Configury
6120 * config.gcc (csky-*-*): New.
6121 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6122 * configure: Regenerated.
6124 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6126 * dump-context.h: Include "dumpfile.h".
6127 (dump_context::dump_printf_va): Convert final param from va_list
6128 to va_list *. Convert from ATTRIBUTE_PRINTF to
6129 ATTRIBUTE_GCC_DUMP_PRINTF.
6130 (dump_context::dump_printf_loc_va): Likewise.
6131 * dumpfile.c: Include "stringpool.h".
6132 (make_item_for_dump_printf_va): Delete.
6133 (make_item_for_dump_printf): Delete.
6134 (class dump_pretty_printer): New class.
6135 (dump_pretty_printer::dump_pretty_printer): New ctor.
6136 (dump_pretty_printer::emit_items): New member function.
6137 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6139 (dump_pretty_printer::emit_item): New member function.
6140 (dump_pretty_printer::stash_item): New member function.
6141 (dump_pretty_printer::format_decoder_cb): New member function.
6142 (dump_pretty_printer::decode_format): New member function.
6143 (dump_context::dump_printf_va): Reimplement in terms of
6144 dump_pretty_printer.
6145 (dump_context::dump_printf_loc_va): Convert final param from va_list
6147 (dump_context::begin_scope): Reimplement call to
6148 make_item_for_dump_printf.
6149 (dump_printf): Update for change to dump_printf_va.
6150 (dump_printf_loc): Likewise.
6151 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6152 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6153 with %T, %E, and %G.
6154 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6155 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6156 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6157 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6158 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6159 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6160 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6161 within a dump_printf_loc call to "%wu".
6162 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6163 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6164 missing space after "=".
6165 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6166 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6167 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6168 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6169 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6170 duplicate "vectorized" from message.
6172 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6174 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6175 polyNxK_t element's TYPE_STRING_FLAG.
6177 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6179 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6180 (they were unnamed before). Fix comments.
6182 2018-08-17 Nathan Sidwell <nathan@acm.org>
6184 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6186 2018-08-17 Richard Biener <rguenther@suse.de>
6188 PR tree-optimization/86841
6189 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6191 2018-08-17 Martin Liska <mliska@suse.cz>
6193 * common.opt: Remove Warn, Init and Report for options with
6194 Ignore/Deprecated flag. Warning is done automatically for
6196 * config/i386/i386.opt: Likewise.
6197 * config/ia64/ia64.opt: Likewise.
6198 * config/rs6000/rs6000.opt: Likewise.
6199 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6200 Remove usage of flag_check_pointer_bounds.
6201 * lto-wrapper.c (merge_and_complain): Do not handle
6202 OPT_fcheck_pointer_bounds.
6203 (append_compiler_options): Likewise.
6204 * opt-functions.awk: Do not handle Deprecated.
6205 * optc-gen.awk: Check that Var, Report and Init are not
6206 used for an option with Ignore/Deprecated flag.
6207 * opts-common.c (decode_cmdline_option): Do not report
6209 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6211 * opts.h (struct cl_option): Remove cl_deprecated flag.
6212 (CL_ERR_DEPRECATED): Remove error enum value.
6214 2018-08-17 Richard Biener <rguenther@suse.de>
6217 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6218 across a va-arg-pack using call adjust its return value accordingly.
6220 2018-08-16 Martin Sebor <msebor@redhat.com>
6222 PR tree-optimization/86853
6223 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6224 (struct fmtresult): Add member and initialize it in ctors.
6225 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6226 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6227 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6228 (parse_directive): Handle %C same as %c.
6229 (sprintf_dom_walker::compute_format_length): Adjust.
6230 (is_call_safe): Adjust.
6232 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6234 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6235 for determining how to count the elements.
6236 * builtins.h (c_strlen): Adjust prototype.
6237 * expr.c (string_constant): Add new parameter mem_size.
6238 Set *mem_size appropriately.
6239 * expr.h (string_constant): Adjust protoype.
6240 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6241 * gimple-fold.h (get_range_strlen): Adjust prototype.
6242 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6243 (format_string): Call get_string_length with eltsize.
6245 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6247 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6248 to emit the span, rather than setting it as the prefix.
6250 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6252 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6253 "margin_char" parameter, defaulting to space. Use it in place
6254 of pp_space for the initial part of the margin.
6255 (layout::print_leading_fixits): Use '+' when filling the margin
6256 of line-insertion fix-it hints.
6258 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6260 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6263 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6265 * config/rs6000/altivec.md: Don't set length attribute to the default
6267 * config/rs6000/darwin.md: Ditto.
6268 * config/rs6000/dfp.md: Ditto.
6269 * config/rs6000/htm.md: Ditto.
6270 * config/rs6000/rs6000.md: Ditto.
6271 * config/rs6000/sync.md: Ditto.
6272 * config/rs6000/vsx.md: Ditto.
6274 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6276 * config/rs6000/altivec.md: Don't set length attribute to the default
6277 value, for branch instructions.
6278 * config/rs6000/darwin.md: Ditto.
6279 * config/rs6000/rs6000.md: Ditto.
6281 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6283 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6284 (unnamed conditional branch define_insn): Set length to 4 or 8
6285 depending on offset.
6286 (<bd>_<mode>): Similar, for alternative 0.
6287 (<bd>tf_<mode>): Ditto.
6289 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6291 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6293 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6295 * doc/rtl.texi: Replace old RTX class names with new names.
6298 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6300 * expmed.h (canonicalize_comparison): New declaration.
6301 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6302 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6303 * optabs.c (prepare_cmp_insn): Likewise.
6304 * rtl.h (unsigned_condition_p): New function which checks if a
6305 comparison operator is unsigned.
6307 2018-08-16 Nathan Sidwell <nathan@acm.org>
6309 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6310 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6312 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6315 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6316 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6317 (mov<mov>): ..this and enable unconditionally.
6319 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6321 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6323 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6325 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6326 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6327 "Common" with "Target".
6329 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6331 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6332 * doc/invoke.texi (mmitigate-rop): Remove.
6333 * config/i386/i386.c: Do not include "regrename.h".
6334 (ix86_rop_should_change_byte_p, reg_encoded_number)
6335 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6337 (ix86_reorg): Remove call to ix86_mitigate_rop.
6338 * config/i386/i386.md (attr "modrm_class"): Remove.
6339 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6340 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6341 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6343 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6345 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6346 allow folding of mergeh() and mergel() for the float and double types.
6347 (fold_mergehl_helper): Rework to handle building a permute tree
6350 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6352 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6355 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6357 * common.opt (fdiagnostics-show-labels): New option.
6358 * diagnostic-show-locus.c (class layout_range): Add field
6360 (class layout): Add field "m_show_labels_p".
6361 (layout_range::layout_range): Add param "label" and use it to
6363 (make_range): Pass in NULL for new "label" param of layout_range's
6365 (layout::layout): Initialize m_show_labels_p.
6366 (layout::maybe_add_location_range): Pass in loc_range->m_label
6367 when constructing layout_range instances.
6368 (struct line_label): New struct.
6369 (layout::print_any_labels): New member function.
6370 (layout::print_line): Call it if label-printing is enabled.
6371 (selftest::test_one_liner_labels): New test.
6372 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6373 * diagnostic.c (diagnostic_initialize): Initialize
6374 context->show_labels_p.
6375 * diagnostic.h (struct diagnostic_context): Add field
6377 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6378 -fno-diagnostics-show-labels.
6379 * dwarf2out.c (gen_producer_string): Add
6380 OPT_fdiagnostics_show_labels to the ignored options.
6381 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6383 (gcc_rich_location::maybe_add_expr): Likewise.
6384 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6385 label" param, defaulting to NULL.
6386 (gcc_rich_location::add_expr): Add "label" param.
6387 (gcc_rich_location::maybe_add_expr): Likewise.
6388 (class text_range_label): New class.
6389 (class range_label_for_type_mismatch): New class.
6390 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6391 of format_warning_va.
6392 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6393 * lto-wrapper.c (merge_and_complain): Add
6394 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6395 (append_compiler_options): Likewise to the dropped options.
6396 (append_diag_options): Likewise to the passed-on options.
6397 * opts.c (common_handle_option): Handle the new option.
6398 * selftest-diagnostic.c
6399 (test_diagnostic_context::test_diagnostic_context): Enable
6401 * substring-locations.c: Include "gcc-rich-location.h".
6402 (format_warning_n_va): Add "fmt_label" and "param_label" params
6403 and use them as appropriate.
6404 (format_warning_va): Add "fmt_label" and "param_label" params,
6405 passing them on to format_warning_n_va.
6406 (format_warning_at_substring): Likewise.
6407 (format_warning_at_substring_n): Likewise.
6408 * substring-locations.h (format_warning_va): Add "fmt_label" and
6409 "param_label" params.
6410 (format_warning_n_va): Likewise.
6411 (format_warning_at_substring): Likewise.
6412 (format_warning_at_substring_n): Likewise.
6413 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6415 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6418 * builtins.c (expand_builtin_memcmp): Do not expand the call
6419 when overflow is detected.
6421 2018-08-15 Martin Sebor <msebor@redhat.com>
6423 PR tree-optimization/71625
6424 * config/aarch64/aarch64-builtins.c
6425 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6427 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6429 * config/s390/s390.c (s390_reorg): Remove loop.
6431 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6434 (darwin_function_switched_text_sections): Delete.
6435 * gcc/config/darwin.h
6436 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6438 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6441 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6442 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6443 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6445 2018-08-15 Martin Liska <mliska@suse.cz>
6447 PR tree-optimization/86925
6448 * predict.c (expr_expected_value_1): When taking
6449 later predictor, assign also probability.
6450 Use fold_build2_initializer_loc in order to fold
6451 the expression in -frounding-math.
6453 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6455 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6457 (expand_vec_perm_1): Try the new method.
6459 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6462 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6463 Check whether lra_live_max_point is 0 before dividing.
6465 2018-08-14 Martin Sebor <msebor@redhat.com>
6467 PR tree-optimization/86650
6468 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6469 (vrp_prop::check_mem_ref): Same.
6471 2018-08-13 Liu Hao <lh_mouse@126.com>
6473 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6474 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6475 and clear it thereafter, as it only works for DBCS.
6477 2018-08-13 Liu Hao <lh_mouse@126.com>
6479 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6480 handle returned by _get_osf_handle().
6482 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6484 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6485 for folding vec_perm.
6487 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6489 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6490 Add support for gimple-folding of vec_pack() and vec_unpack()
6493 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6495 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6496 vec_xst variants to the list.
6497 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6498 vector loads and stores.
6500 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6502 * config.gcc (rs6000-ibm-aix4.x): Delete.
6503 (rs6000-ibm-aix5.1): Delete.
6504 (rs6000-ibm-aix5.2): Delete.
6505 (rs6000-ibm-aix5.3): Delete.
6506 * config/rs6000/aix43.h: Delete.
6507 * config/rs6000/aix51.h: Delete.
6508 * config/rs6000/aix52.h: Delete.
6509 * config/rs6000/t-aix43: Delete.
6511 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6513 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6515 (s390_decompose_address): Factor out constant pool ref
6518 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6520 * config/nds32/nds32-predicates.c
6521 (nds32_can_use_bclr_p): Change return type as bool.
6522 (nds32_can_use_bset_p): Ditto.
6523 (nds32_can_use_btgl_p): Ditto.
6524 (nds32_can_use_bitci_p): Ditto.
6525 * config/nds32/nds32-protos.h
6526 (nds32_can_use_bclr_p): Change declaration.
6527 (nds32_can_use_bset_p): Ditto.
6528 (nds32_can_use_btgl_p): Ditto.
6529 (nds32_can_use_bitci_p): Ditto.
6531 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6533 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6534 Support -msched-prolog-epilog option.
6535 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6537 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6539 * common/config/nds32/nds32-common.c
6540 (nds32_option_optimization_table): Enalbe -malways-align.
6542 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6544 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6546 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6547 OPT_misr_secure_ case.
6548 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6549 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6550 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6552 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6553 (nds32_isr_info): New field security_level.
6554 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6555 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6556 * config/nds32/nds32.opt (misr-secure): New option.
6557 * config/nds32/nds32_init.inc: New file.
6558 * config/nds32/nds32_isr.h: New file.
6560 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6562 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6563 Update comment for atomic instructions.
6564 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6565 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6567 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6568 load for __ATOMIC_SEQ_CST model.
6569 (atomic_loaddi_1): Remove float register target.
6570 (atomic_storedi): Handle CONST_INT values.
6571 (atomic_storedi_1): Remove float register source. Add special case
6573 (memory_barrier): New expander and insn.
6575 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6577 PR tree-optimization/86835
6578 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6579 new_stmt after def_gsi, make sure to insert new_square_stmt after
6580 that stmt, not 2 stmts before it.
6582 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6585 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6588 2018-08-10 Martin Liska <mliska@suse.cz>
6591 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6593 * builtins.c (expand_builtin_expect_with_probability):
6595 (expand_builtin_expect_with_probability): New function.
6596 (build_builtin_expect_predicate): Add new argumnet probability
6597 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6598 (fold_builtin_expect):
6601 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6602 * builtins.h (fold_builtin_expect): Set new argument.
6603 * doc/extend.texi: Document __builtin_expect_with_probability.
6604 * doc/invoke.texi: Likewise.
6605 * gimple-fold.c (gimple_fold_call): Pass new argument.
6606 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6607 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6608 * predict.c (get_predictor_value): New function.
6609 (expr_expected_value): Add new argument probability. Assume
6610 that predictor and probability are always non-null.
6611 (expr_expected_value_1): Likewise. For __builtin_expect and
6612 __builtin_expect_with_probability set probability. Handle
6613 combination in binary expressions.
6614 (tree_predict_by_opcode): Simplify code by simply calling
6615 get_predictor_value.
6616 (pass_strip_predict_hints::execute): Add handling of
6617 BUILT_IN_EXPECT_WITH_PROBABILITY.
6618 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6620 * tree.h (DECL_BUILT_IN_P): New function.
6622 2018-08-10 Martin Liska <mliska@suse.cz>
6624 PR tree-optimization/85799
6625 * passes.def: Add argument for pass_strip_predict_hints.
6626 * predict.c (class pass_strip_predict_hints): Add new argument
6628 (strip_predictor_early): New function.
6629 (pass_strip_predict_hints::execute): Call the function to
6631 (strip_predict_hints): New function.
6632 * predict.def: Fix comment.
6634 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6636 * Makefile.in: Clarify which tm.texi to copy over to assert the
6637 right to grant a GFDL license for all.
6639 2018-08-09 Jeff Law <law@redhat.com>
6641 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6644 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6646 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6649 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6651 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6652 reductions for variable-length vectors.
6654 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6657 * common.opt (fdiagnostics-show-line-numbers): New option.
6658 * diagnostic-show-locus.c (class layout): Add fields
6659 "m_show_line_numbers_p" and "m_linenum_width";
6660 (num_digits): New function.
6661 (test_num_digits): New function.
6662 (layout::layout): Initialize new fields. Update m_x_offset
6663 logic to handle any left margin.
6664 (layout::print_source_line): Print line number when requested.
6665 (layout::start_annotation_line): New member function.
6666 (layout::print_annotation_line): Call it.
6667 (layout::print_leading_fixits): Likewise.
6668 (layout::print_trailing_fixits): Likewise. Update calls to
6669 move_to_column for new parameter.
6670 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6671 it to potentially call start_annotation_line.
6672 (layout::show_ruler): Call start_annotation_line.
6673 (selftest::test_line_numbers_multiline_range): New selftest.
6674 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6675 and selftest::test_line_numbers_multiline_range.
6676 * diagnostic.c (diagnostic_initialize): Initialize
6677 show_line_numbers_p.
6678 * diagnostic.h (struct diagnostic_context): Add field
6679 "show_line_numbers_p".
6680 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6681 -fno-diagnostics-show-line-numbers.
6682 * dwarf2out.c (gen_producer_string): Add
6683 OPT_fdiagnostics_show_line_numbers to the ignored options.
6684 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6685 one setting" options.
6686 (append_compiler_options): Likewise to the dropped options.
6687 (append_diag_options): Likewise to the passed-on options.
6688 * opts.c (common_handle_option): Handle the new option.
6689 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6691 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6693 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6694 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6695 third argument of type "const signed char" to descriptions of
6696 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6697 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6698 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6699 __builtin_bcdsub_ov functions.
6701 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6703 PR tree-optimization/86858
6704 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6705 flow_bb_inside_loop_p calls.
6707 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6709 PR tree-optimization/86871
6710 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6711 instead of gimple_assign_lhs.
6713 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6716 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6717 register constraint to operand 0.
6718 (add<mode>3_carryinC): Likewise.
6719 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6721 2018-08-09 Martin Liska <mliska@suse.cz>
6724 * common.opt: Remove extra line.
6726 2018-08-09 Martin Liska <mliska@suse.cz>
6728 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6729 at the end of a line, make first letter capital and end up
6730 a sentence with a dot.
6731 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6732 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6733 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6734 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6735 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6736 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6737 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6738 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6739 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6740 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6741 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6742 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6743 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6744 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6745 (PARAM_TREE_REASSOC_WIDTH): Likewise.
6746 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6747 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6748 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6750 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
6753 * config/s390/s390.c (s390_option_override_internal): Reduce the
6754 stack-clash-protection-probe-interval param if it would be too big
6757 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
6760 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6761 * config/m68k/m68k.c (handle_move_double): Don't call
6762 m68k_final_prescan_insn.
6763 (m68k_adjust_decorated_operand): Renamed from
6764 m68k_final_prescan_insn, remove first and third operand and
6766 (print_operand): Call it.
6767 (print_operand_address): Call it.
6769 2018-08-08 Nathan Sidwell <nathan@acm.org>
6771 * diagnostic.c (diagnostic_report_current_module): Use
6772 linemap_included_from & linemap_included_from_linemap.
6774 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
6776 * config/aarch64/aarch64-cores.def: Add phecda core.
6777 * config/aarch64/aarch64-tune.md: Regenerate.
6778 * doc/invoke.texi: Add phecda core.
6780 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6783 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6785 * config/s390/s390.md ("movti"): Add more alternatives for
6786 constant to GPR copies.
6788 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6790 * config/s390/s390.c: Fix whitespace damage throughout the file.
6791 * config/s390/s390.h: Likewise.
6792 * config/s390/tpf.h: Likewise.
6794 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6796 * config/s390/s390.c (s390_loadrelative_operand_p):
6797 Remove TARGET_CPU_ZARCH usages.
6798 (s390_rtx_costs): Likewise.
6799 (s390_legitimate_constant_p): Likewise.
6800 (s390_cannot_force_const_mem): Likewise.
6801 (legitimate_reload_constant_p): Likewise.
6802 (s390_preferred_reload_class): Likewise.
6803 (legitimize_pic_address): Likewise.
6804 (legitimize_tls_address): Likewise.
6805 (s390_split_branches): Removed.
6806 (s390_add_execute): Removed.
6807 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6808 (s390_mainpool_start): Likewise.
6809 (s390_mainpool_finish): Likewise.
6810 (s390_mainpool_cancel): Removed.
6811 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6812 (s390_chunkify_cancel): Likewise.
6813 (s390_return_addr_rtx): Likewise.
6814 (s390_register_info): Remove split_branches_pending_p uages.
6815 (s390_optimize_register_info): Likewise.
6816 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6817 split_branches_pending_p usages.
6818 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6819 (s390_load_got): Likewise.
6820 (s390_expand_split_stack_prologue): Likewise.
6821 (output_asm_nops): Likewise.
6822 (s390_function_profiler): Likewise.
6823 (s390_emit_call): Likewise.
6824 (s390_conditional_register_usage): Likewise.
6825 (s390_optimize_prologue): Likewise.
6826 (s390_reorg): Remove TARGET_CPU_ZARCH and
6827 split_branches_pending_p usages.
6828 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6830 (s390_output_indirect_thunk_function): Likewise.
6831 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6832 (TARGET_CPU_ZARCH_P): Removed.
6833 (struct machine_function): Remove split_branches_pending_p.
6834 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6836 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6838 * common/config/s390/s390-common.c (processor_flags_table):
6840 * config.gcc: Remove with_arch/with_tune support.
6841 * config/s390/2064.md: Remove cpu attribute comparisons.
6842 * config/s390/driver-native.c (s390_host_detect_local_cpu):
6844 * config/s390/linux.h (ASM_SPEC):
6845 Remove -march support.
6846 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6847 Use a table to get an arch level.
6848 * config/s390/s390-opts.h (enum processor_type):
6850 * config/s390/s390.c
6851 (processor_table): Remove entries, add arch_level values.
6852 (s390_issue_rate): Remove cases.
6853 (s390_option_override): Adjust
6854 s390_option_override_internal() call.
6855 (s390_option_override_internal): Remove deprecation warning.
6856 (s390_valid_target_attribute_tree): Adjust
6857 s390_option_override_internal() call.
6858 * config/s390/s390.h (struct s390_processor):
6859 Share with s390-c.c, add arch_level field.
6860 * config/s390/s390.md:
6861 Remove occurrences in cpu attribute.
6862 * config/s390/s390.opt: Remove -march/-mtune support.
6863 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6864 * doc/invoke.texi: Remove deprecation warning.
6866 2018-08-08 Luis Machado <luis.machado@linaro.org>
6868 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6870 (qdf24xx_tunings): Set vector cost structure to
6871 qdf24xx_vector_cost.
6873 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6874 <register_sextend>: Set to 3.
6876 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
6879 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6880 * config/aarch64/aarch64-simd.md
6881 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6882 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6883 (aarch64_frecpx<mode>): ...this new pattern.
6884 * config/aarch64/aarch64-simd-builtins.def: Remove comment
6885 about aarch64_frecp<FRECP:frecp_suffix><mode>.
6887 2018-08-07 Martin Liska <mliska@suse.cz>
6890 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6891 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6892 * predict.def (PRED_MALLOC_NONNULL): New predictor.
6893 * doc/extend.texi: Document that malloc attribute adds
6896 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
6899 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6900 Define to speculation_safe_value_not_needed.
6902 2018-08-06 Jeff Law <law@redhat.com>
6904 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6905 the vr_values instance to cprop_into_stmt.
6906 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6907 (cprop_operand): Also query EVRP to determine if OP is a constant.
6909 2018-08-06 Nathan Sidwell <nathan@acm.org>
6911 * diagnostic.c (diagnostic_report_current_module): Reroll
6912 included-at loop. Translate text.
6914 2018-08-06 David Malcolm <dmalcolm@redhat.com>
6916 * function-tests.c (selftest::test_expansion_to_rtl): Call
6917 free_after_compilation.
6919 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6921 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6923 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
6925 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6926 loops with memory block operations from getting unrolled.
6928 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
6931 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6932 Define to speculation_safe_value_not_needed.
6934 2018-08-06 Jeff Law <law@redhat.com>
6936 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6939 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6942 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6943 with all enabled __intN types.
6945 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6947 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6949 * alias.c (record_set): Check for clobber high.
6950 * cfgexpand.c (expand_gimple_stmt): Likewise.
6951 * combine-stack-adj.c (single_set_for_csa): Likewise.
6952 * combine.c (find_single_use_1): Likewise.
6953 (set_nonzero_bits_and_sign_copies): Likewise.
6954 (get_combine_src_dest): Likewise.
6955 (is_parallel_of_n_reg_sets): Likewise.
6956 (try_combine): Likewise.
6957 (record_dead_and_set_regs_1): Likewise.
6958 (reg_dead_at_p_1): Likewise.
6959 (reg_dead_at_p): Likewise.
6960 * dce.c (deletable_insn_p): Likewise.
6961 (mark_nonreg_stores_1): Likewise.
6962 (mark_nonreg_stores_2): Likewise.
6963 * df-scan.c (df_find_hard_reg_defs): Likewise.
6964 (df_uses_record): Likewise.
6965 (df_get_call_refs): Likewise.
6966 * dwarf2out.c (mem_loc_descriptor): Likewise.
6967 * haifa-sched.c (haifa_classify_rtx): Likewise.
6968 * ira-build.c (create_insn_allocnos): Likewise.
6969 * ira-costs.c (scan_one_insn): Likewise.
6970 * ira.c (equiv_init_movable_p): Likewise.
6971 (rtx_moveable_p): Likewise.
6972 (interesting_dest_for_shprep): Likewise.
6973 * jump.c (mark_jump_label_1): Likewise.
6974 * postreload-gcse.c (record_opr_changes): Likewise.
6975 * postreload.c (reload_cse_simplify): Likewise.
6976 (struct reg_use): Add source expr.
6977 (reload_combine): Check for clobber high.
6978 (reload_combine_note_use): Likewise.
6979 (reload_cse_move2add): Likewise.
6980 (move2add_note_store): Likewise.
6981 * print-rtl.c (print_pattern): Likewise.
6982 * recog.c (decode_asm_operands): Likewise.
6983 (store_data_bypass_p): Likewise.
6984 (if_test_bypass_p): Likewise.
6985 * regcprop.c (kill_clobbered_value): Likewise.
6986 (kill_set_value): Likewise.
6987 * reginfo.c (reg_scan_mark_refs): Likewise.
6988 * reload1.c (maybe_fix_stack_asms): Likewise.
6989 (eliminate_regs_1): Likewise.
6990 (elimination_effects): Likewise.
6991 (mark_not_eliminable): Likewise.
6992 (scan_paradoxical_subregs): Likewise.
6993 (forget_old_reloads_1): Likewise.
6994 * reorg.c (find_end_label): Likewise.
6995 (try_merge_delay_insns): Likewise.
6996 (redundant_insn): Likewise.
6997 (own_thread_p): Likewise.
6998 (fill_simple_delay_slots): Likewise.
6999 (fill_slots_from_thread): Likewise.
7000 (dbr_schedule): Likewise.
7001 * resource.c (update_live_status): Likewise.
7002 (mark_referenced_resources): Likewise.
7003 (mark_set_resources): Likewise.
7004 * rtl.c (copy_rtx): Likewise.
7005 * rtlanal.c (reg_referenced_p): Likewise.
7006 (single_set_2): Likewise.
7007 (noop_move_p): Likewise.
7008 (note_stores): Likewise.
7009 * sched-deps.c (sched_analyze_reg): Likewise.
7010 (sched_analyze_insn): Likewise.
7012 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7014 * cse.c (invalidate_reg): New function extracted from...
7015 (invalidate): ...here.
7016 (canonicalize_insn): Check for clobber high.
7017 (invalidate_from_clobbers): invalidate clobber highs.
7018 (invalidate_from_sets_and_clobbers): Likewise.
7019 (count_reg_usage): Check for clobber high.
7020 (insn_live_p): Likewise.
7021 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7022 (cselib_invalidate_regno): Check for clobber in setter.
7023 (cselib_invalidate_rtx): Pass through setter.
7024 (cselib_invalidate_rtx_note_stores):
7025 (cselib_process_insn): Check for clobber high.
7026 * cselib.h (cselib_invalidate_rtx): Add operand.
7028 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7030 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7031 (mark_not_eliminable): Likewise.
7032 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7033 * lra-lives.c (process_bb_lives): Check for clobber high.
7034 * lra.c (new_insn_reg): Remember clobber highs.
7035 (collect_non_operand_hard_regs): Check for clobber high.
7036 (lra_set_insn_recog_data): Likewise.
7037 (add_regs_to_insn_regno_info): Likewise.
7038 (lra_update_insn_regno_info): Likewise.
7040 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7042 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7043 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7045 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7047 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7048 (copy_insn_1): Likewise.
7049 (gen_hard_reg_clobber_high): New gen function.
7050 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7051 * genemit.c (gen_exp): Likewise.
7052 (gen_emit_seq): Pass through info.
7053 (gen_insn): Check for CLOBBER_HIGH.
7054 (gen_expand): Pass through info.
7055 (gen_split): Likewise.
7056 (output_add_clobbers): Likewise.
7057 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7058 (remove_clobbers): Likewise.
7059 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7061 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7063 * doc/rtl.texi (clobber_high): Add.
7064 (parallel): Add in clobber high
7065 * rtl.c (rtl_check_failed_code3): Add function.
7066 * rtl.def (CLOBBER_HIGH): Add expression.
7067 * rtl.h (RTL_CHECKC3): Add macro.
7068 (rtl_check_failed_code3): Add declaration.
7069 (XC3EXP): Add macro.
7071 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7074 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7075 cfun->machine->max_used_stack_alignment if needed.
7077 2018-08-04 Martin Sebor <msebor@redhat.com>
7079 PR tree-optimization/86571
7080 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7083 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7086 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7089 2018-08-03 Jeff Law <law@redhat.com>
7092 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7093 Define to speculation_safe_value_not_needed.
7095 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7097 * doc/gcov.texi (-x): Remove duplicate "to".
7098 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7099 (-Wif-not-aligned): Remove duplicate "is".
7100 (-flto): Remove duplicate "the".
7101 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7102 duplicate "v5.00.b".
7103 (MSP430 Options): Remove duplicate "and" from the description
7104 of "-mgprel-sec=regexp".
7105 (x86 Options): Remove duplicate copies of "vmldLog102" and
7106 vmlsLog104 from description of "-mveclibabi=type".
7108 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7110 * internal-fn.h (first_commutative_argument): Declare.
7111 * internal-fn.c (first_commutative_argument): New function.
7112 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7113 restrictions for pattern statements. Use first_commutative_argument
7114 to look for commutative operands in calls to internal functions.
7116 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7118 * Makefile.in (wide-int-range.o): New.
7119 * tree-vrp.c: Move all the wide_int_* functions to...
7120 * wide-int-range.cc: ...here.
7121 * tree-vrp.h: Move all the wide_int_* prototypes to...
7122 * wide-int-range.h: ...here.
7124 2018-08-03 Tom de Vries <tdevries@suse.de>
7126 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7128 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7129 * except.c (output_function_exception_table): Do early exit if
7130 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7132 2018-08-03 Martin Liska <mliska@suse.cz>
7134 * predict.c (dump_prediction): Change to 2 digits
7137 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7139 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7141 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7143 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7145 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7146 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7147 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7148 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7149 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7151 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7153 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7154 pp_take_prefix when saving the existing prefix.
7155 * diagnostic.c (diagnostic_append_note): Likewise.
7156 * langhooks.c (lhd_print_error_function): Likewise.
7157 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7158 param's type. Free the existing prefix.
7159 (pp_take_prefix): New function.
7160 (pretty_printer::pretty_printer): Drop the prefix parameter.
7161 Rename the length parameter to match the comment.
7162 (pretty_printer::~pretty_printer): Free the prefix.
7163 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7165 (struct pretty_printer): Drop the "const" from "prefix" field's
7166 type and clarify memory management.
7167 (pp_set_prefix): Drop the "const" from the 2nd param.
7168 (pp_take_prefix): New decl.
7170 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7172 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7173 for word_mode_ok here instead of passing as argument.
7174 (expand_block_compare): Change select_block_compare_mode() call.
7175 (expand_strncmp_gpr_sequence): New function.
7176 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7178 2018-08-02 Jeff Law <law@redhat.com>
7181 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7182 Define to speculation_safe_value_not_needed.
7185 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7186 Define to speculation_safe_value_not_needed.
7188 2018-08-02 Tom de Vries <tdevries@suse.de>
7191 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7192 function. Return UI_TARGET unconditionally.
7193 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7194 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7196 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7198 * genemit.c (print_overload_test): Fix typo.
7200 2018-08-02 Richard Biener <rguenther@suse.de>
7202 PR tree-optimization/86816
7203 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7204 which checks for value availability before querying it.
7205 (gvn_uses_equal): Use it.
7206 (same_succ_hash): Likewise.
7207 (gimple_equal_p): Likewise.
7209 2018-08-02 Nick Clifton <nickc@redhat.com>
7212 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7213 Define to speculation_safe_value_not_needed.
7216 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7217 Define to speculation_safe_value_not_needed.
7220 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7221 Define to speculation_safe_value_not_needed.
7224 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7225 Define to speculation_safe_value_not_needed.
7228 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7229 Define to speculation_safe_value_not_needed.
7232 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7233 Define to speculation_safe_value_not_needed.
7236 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7237 Define to speculation_safe_value_not_needed.
7240 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7241 Define to speculation_safe_value_not_needed.
7244 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7245 speculation_safe_value_not_needed.
7248 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7249 to speculation_safe_value_not_needed.
7251 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7253 * doc/md.texi: Expand the documentation of instruction names
7254 to mention port-local uses. Document '@' in pattern names.
7255 * read-md.h (overloaded_instance, overloaded_name): New structs.
7257 (md_reader::handle_overloaded_name): New member function.
7258 (md_reader::get_overloads): Likewise.
7259 (md_reader::m_first_overload): New member variable.
7260 (md_reader::m_next_overload_ptr): Likewise.
7261 (md_reader::m_overloads_htab): Likewise.
7262 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7263 m_next_overload_ptr and m_overloads_htab.
7264 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7265 (get_mode_token, get_code_token, get_int_token): New functions.
7266 (map_attr_string): Add an optional argument that passes back
7267 the associated iterator.
7268 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7269 (md_reader::handle_overloaded_name, add_overload_instance): New
7271 (apply_iterators): Handle '@' names. Report an error if '@'
7272 is used without iterators.
7273 (initialize_iterators): Initialize the new iterator_group fields.
7274 * genopinit.c (handle_overloaded_code_for)
7275 (handle_overloaded_gen): New functions.
7276 (main): Use them to print declarations of maybe_code_for_* and
7277 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7278 * genemit.c (print_overload_arguments, print_overload_test)
7279 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7280 (main): Use it to print definitions of maybe_code_for_* and
7281 maybe_gen_* functions.
7282 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7283 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7284 instead of explicit mode checks.
7285 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7286 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7287 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7288 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7289 (aarch64_expand_compare_and_swap): Likewise
7290 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7291 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7292 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7293 (aarch64_constant_pool_reload_icode): Delete.
7294 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7295 instead of aarch64_constant_pool_reload_icode. Use
7296 code_for_aarch64_reload_mov instead of explicit mode checks.
7297 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7298 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7299 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7300 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7301 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7302 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7303 (aarch64_atomic_load_op_code): Delete.
7304 (aarch64_emit_atomic_load_op): Likewise.
7305 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7306 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7307 instead of aarch64_emit_atomic_load_op.
7308 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7309 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7310 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7311 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7312 character before the pattern name.
7313 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7314 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7315 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7316 (aarch64_frecps<mode>): Likewise.
7317 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7318 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7319 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7320 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7321 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7323 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7325 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7326 Allow HFmode constants if TARGET_FP_F16INST.
7328 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7331 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7332 No longer check last store for clobber of address register.
7334 2018-08-02 Martin Liska <mliska@suse.cz>
7336 PR gcov-profile/86817
7337 * gcov.c (process_all_functions): New function.
7339 (process_file): Move functions processing to
7340 process_all_functions.
7342 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7344 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7345 "const" to the "gimple *" and "rtx_insn *" parameters.
7346 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7348 (dump_location_t::dump_location_t): Likewise.
7350 2018-08-01 Martin Sebor <msebor@redhat.com>
7352 PR tree-optimization/86650
7353 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7354 rather than a "gcall *". Directly pass the data of interest
7355 to percent_K_format, rather than building a temporary CALL_EXPR
7357 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7358 (gimple_fold_builtin_strncat): Adjust.
7359 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7360 gcall* argument with gimple*.
7361 * gimple-ssa-warn-restrict.c (check_call): Same.
7362 (wrestrict_dom_walker::before_dom_children): Same.
7363 (builtin_access::builtin_access): Same.
7364 (check_bounds_or_overlap): Same
7365 (maybe_diag_overlap): Same.
7366 (maybe_diag_offset_bounds): Same.
7367 * tree-diagnostic.c (default_tree_printer): Move usage of
7368 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7370 * tree-pretty-print.c (percent_K_format): Add argument.
7371 * tree-pretty-print.h: Add argument.
7372 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7373 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7374 (maybe_diag_stxncpy_trunc): Same.
7375 (handle_builtin_stxncpy): Same.
7376 (handle_builtin_strcat): Same.
7378 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7380 * match.pd: Optimise pointer range checks.
7382 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7384 PR tree-optimization/86758
7385 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7386 to remove pattern statements.
7388 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7390 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7391 result of dfs_enumerate_from when constructing stmt_vec_infos,
7392 instead of additionally calling get_loop_body.
7394 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7396 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7398 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7399 When creating an iv, assert that the step is not known to be zero.
7400 (vect_setup_realignment): Update call accordingly.
7401 * tree-vect-stmts.c (vectorizable_store): Likewise.
7402 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7404 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7406 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7407 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7408 (vectorizable_reduction): Likewise.
7409 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7410 (vect_detect_hybrid_slp_stmts): Likewise.
7411 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7413 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7415 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7416 (wide_int_set_zero_nonzero_bits): ...this.
7417 (zero_nonzero_bits_from_vr): Rename to...
7418 (vrp_set_zero_nonzero_bits): ...this.
7419 (extract_range_from_multiplicative_op_1): Abstract wide int
7421 (wide_int_range_multiplicative_op): ...here.
7422 (extract_range_from_binary_expr_1): Extract wide int binary
7423 operations into their own functions.
7424 (wide_int_range_lshift): New.
7425 (wide_int_range_can_optimize_bit_op): New.
7426 (wide_int_range_shift_undefined_p): New.
7427 (wide_int_range_bit_xor): New.
7428 (wide_int_range_bit_ior): New.
7429 (wide_int_range_bit_and): New.
7430 (wide_int_range_trunc_mod): New.
7431 (extract_range_into_wide_ints): New.
7432 (vrp_shift_undefined_p): New.
7433 (extract_range_from_multiplicative_op): New.
7434 (vrp_can_optimize_bit_op): New.
7435 * tree-vrp.h (value_range::dump): New.
7436 (wide_int_range_multiplicative_op): New.
7437 (wide_int_range_lshift):New.
7438 (wide_int_range_shift_undefined_p): New.
7439 (wide_int_range_bit_xor): New.
7440 (wide_int_range_bit_ior): New.
7441 (wide_int_range_bit_and): New.
7442 (wide_int_range_trunc_mod): New.
7443 (zero_nonzero_bits_from_bounds): Rename to...
7444 (wide_int_set_zero_nonzero_bits): ...this.
7445 (zero_nonzero_bits_from_vr): Rename to...
7446 (vrp_set_zero_nonzero_bits): ...this.
7447 (range_easy_mask_min_max): Rename to...
7448 (wide_int_range_can_optimize_bit_op): this.
7449 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7450 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7452 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7454 * tree-vectorizer.h (vect_orig_stmt): New function.
7455 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7456 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7457 (vect_create_epilog_for_reduction): Likewise.
7458 (vectorizable_live_operation): Likewise.
7459 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7460 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7461 * tree-vect-stmts.c (vectorizable_call): Likewise.
7462 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7464 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7466 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7468 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7469 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7470 (vect_transform_loop): Likewise.
7471 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7473 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7475 * tree-vectorizer.h (vect_schedule_slp): Return void.
7476 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7477 (vect_schedule_slp): Likewise.
7479 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7481 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7483 (vect_transform_loop): Update calls accordingly. Schedule SLP
7484 instances before the main loop, if any exist.
7486 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7488 PR tree-optimization/86749
7489 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7490 If the lhs is used in a COND_EXPR, check that it is being used
7491 as the "then" or "else" value.
7493 2018-08-01 Tom de Vries <tdevries@suse.de>
7496 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7497 speculation_safe_value_not_needed.
7499 2018-08-01 Richard Biener <rguenther@suse.de>
7501 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7504 2018-08-01 Martin Liska <mliska@suse.cz>
7506 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7507 format how successful transformation is dumped.
7508 (gimple_mod_pow2_value_transform): Likewise.
7509 (gimple_mod_subtract_transform): Likewise.
7510 (gimple_stringops_transform): Likewise.
7512 2018-08-01 Martin Liska <mliska@suse.cz>
7515 * value-prof.c (interesting_stringop_to_profile_p):
7516 Simplify the code and add BUILT_IN_MEMMOVE.
7517 (gimple_stringops_transform): Likewise.
7519 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7521 * config/aarch64/aarch64-simd.md
7522 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7523 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7524 use GPI iterator instead of SI mode.
7526 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7528 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7529 rs6000_speculation_barrier.
7530 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7531 new barrier pattern name.
7533 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7535 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7536 (speculation_barrier): New insn.
7538 2018-08-01 Richard Biener <rguenther@suse.de>
7541 * graphite.h: Include isl/id.h and isl/space.h to allow build
7544 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7547 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7548 mode for COFF targets.
7549 * defaults.h (TARGET_COFF): Define.
7550 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7551 TARGET_COFF): Define.
7552 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7553 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7554 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7556 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7558 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7559 * gimple-streamer-out.c (output_bb): Save it.
7560 * lto-streamer-in.c (input_struct_function_base): Restore
7561 instance discriminator if available. Create map on demand.
7562 * lto-streamer-out.c (output_struct_function_base): Save it if
7564 * final.c (decl_to_instance_map): Document LTO strategy.
7566 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7567 Olivier Hainque <hainque@adacore.com>
7569 * debug.h (decl_to_instance_map_t): New type.
7570 (decl_to_instance_map): Declare.
7571 (maybe_create_decl_to_instance_map): New inline function.
7572 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7573 to track basic block discriminators.
7574 (final_start_function_1): Initialize them.
7575 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7577 (decl_to_instance_map): New variable.
7578 (map_decl_to_instance, maybe_set_discriminator): New functions.
7579 (notice_source_line): Set discriminator.
7581 2018-07-31 Ian Lance Taylor <iant@golang.org>
7583 * targhooks.c (default_have_speculation_safe_value): Add
7586 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7588 * dump-context.h: Include "pretty-print.h".
7589 (dump_context::refresh_dumps_are_enabled): New decl.
7590 (dump_context::emit_item): New decl.
7591 (class dump_context): Add fields "m_test_pp" and
7593 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7594 (temp_dump_context::get_dumped_text): New decl.
7595 (class temp_dump_context): Add field "m_pp".
7596 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7597 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7599 (set_dump_file): Update for above change.
7600 (set_alt_dump_file): Likewise.
7601 (dump_loc): New overload, taking a pretty_printer *.
7602 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7603 to any test pretty-printer.
7604 (make_item_for_dump_gimple_stmt): New function, adapted from
7605 optinfo::add_gimple_stmt.
7606 (dump_context::dump_gimple_stmt): Call it, and use the result,
7607 eliminating the direct usage of dump_file and alt_dump_file in
7608 favor of indirectly using them via emit_item.
7609 (make_item_for_dump_gimple_expr): New function, adapted from
7610 optinfo::add_gimple_expr.
7611 (dump_context::dump_gimple_expr): Call it, and use the result,
7612 eliminating the direct usage of dump_file and alt_dump_file in
7613 favor of indirectly using them via emit_item.
7614 (make_item_for_dump_generic_expr): New function, adapted from
7616 (dump_context::dump_generic_expr): Call it, and use the result,
7617 eliminating the direct usage of dump_file and alt_dump_file in
7618 favor of indirectly using them via emit_item.
7619 (make_item_for_dump_printf_va): New function, adapted from
7620 optinfo::add_printf_va.
7621 (make_item_for_dump_printf): New function.
7622 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7623 and use the result, eliminating the direct usage of dump_file and
7624 alt_dump_file in favor of indirectly using them via emit_item.
7625 (make_item_for_dump_dec): New function.
7626 (dump_context::dump_dec): Call it, and use the result,
7627 eliminating the direct usage of dump_file and alt_dump_file in
7628 favor of indirectly using them via emit_item.
7629 (make_item_for_dump_symtab_node): New function, adapted from
7630 optinfo::add_symtab_node.
7631 (dump_context::dump_symtab_node): Call it, and use the result,
7632 eliminating the direct usage of dump_file and alt_dump_file in
7633 favor of indirectly using them via emit_item.
7634 (dump_context::begin_scope): Reimplement, avoiding direct usage
7635 of dump_file and alt_dump_file in favor of indirectly using them
7637 (dump_context::emit_item): New member function.
7638 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7639 Set up test pretty-printer on the underlying context. Call
7640 refresh_dumps_are_enabled.
7641 (temp_dump_context::~temp_dump_context): Call
7642 refresh_dumps_are_enabled.
7643 (temp_dump_context::get_dumped_text): New member function.
7644 (selftest::verify_dumped_text): New function.
7645 (ASSERT_DUMPED_TEXT_EQ): New macro.
7646 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7647 and then without optinfo enabled. Add uses of
7648 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7649 * dumpfile.h: Update comment for the dump_* API.
7650 * optinfo-emit-json.cc
7651 (selftest::test_building_json_from_dump_calls): Update for new
7652 param for temp_dump_context ctor.
7653 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7654 and "m_owned" field.
7655 (optinfo_item::~optinfo_item): Likewise.
7656 (optinfo::add_item): New member function.
7657 (optinfo::emit): Update comment.
7658 (optinfo::add_string): Delete.
7659 (optinfo::add_printf): Delete.
7660 (optinfo::add_printf_va): Delete.
7661 (optinfo::add_gimple_stmt): Delete.
7662 (optinfo::add_gimple_expr): Delete.
7663 (optinfo::add_tree): Delete.
7664 (optinfo::add_symtab_node): Delete.
7665 (optinfo::add_dec): Delete.
7666 * optinfo.h (class dump_context): New forward decl.
7667 (optinfo::add_item): New decl.
7668 (optinfo::add_string): Delete.
7669 (optinfo::add_printf): Delete.
7670 (optinfo::add_printf_va): Delete.
7671 (optinfo::add_gimple_stmt): Delete.
7672 (optinfo::add_gimple_expr): Delete.
7673 (optinfo::add_tree): Delete.
7674 (optinfo::add_symtab_node): Delete.
7675 (optinfo::add_dec): Delete.
7676 (optinfo::add_poly_int): Delete.
7677 (optinfo_item::optinfo_item): Remove "owned" param.
7678 (class optinfo_item): Remove field "m_owned".
7680 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7683 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7684 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7685 requested variable alignment.
7686 (expand_one_ssa_partition): Likewise.
7687 (expand_one_var): Likewise.
7689 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7691 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7692 to speculation_safe_value_not_needed.
7694 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7696 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7697 * targhooks.c (speculation_safe_value_not_needed): New function.
7698 * target.def (have_speculation_safe_value): Update documentation.
7699 * doc/tm.texi: Regenerated.
7701 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7703 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7704 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7706 (despeculate_copy<ALLI:mode>_insn): New insn.
7707 (despeculate_copyti_insn): New insn.
7708 (despeculate_simple<ALLI:mode>): New insn
7709 (despeculate_simpleti): New insn.
7710 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7712 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7713 aarch64_speculation_safe_value.
7714 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7716 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7718 * config/aarch64/aarch64-speculation.cc: New file.
7719 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7720 before pass_reorder_blocks.
7721 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7723 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7724 X14 and X15 when tracking speculation.
7725 * config/aarch64/aarch64.md (register name constants): Add
7726 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7727 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7728 (speculation_barrier): New insn attribute.
7729 (cmp<mode>): Allow SP in comparisons.
7730 (speculation_tracker): New insn.
7731 (speculation_barrier): Add speculation_barrier attribute.
7732 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7733 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7734 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7736 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7738 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7739 aarch64_track_speculation is true.
7740 (tb<optab><mode>1): Likewise.
7741 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7742 generate CB[N]Z when tracking speculation.
7743 (aarch64_split_compare_and_swap): Likewise.
7744 (aarch64_split_atomic_op): Likewise.
7746 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7748 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7750 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7752 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7753 (speculation_barrier): New insn.
7755 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7757 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7758 * config/arm/arm.md (speculation_barrier): New expand.
7759 (speculation_barrier_insn): New pattern.
7761 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7763 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7764 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7765 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7766 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7768 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7769 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7770 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7771 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7772 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7773 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7774 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7775 * builtins.c (expand_speculation_safe_value): New function.
7776 (expand_builtin): Call it.
7777 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7778 * doc/extend.texi: Document __builtin_speculation_safe_value.
7779 * doc/md.texi: Document "speculation_barrier" pattern.
7780 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7781 TARGET_HAVE_SPECULATION_SAFE_VALUE.
7782 * doc/tm.texi: Regenerated.
7783 * target.def (have_speculation_safe_value, speculation_safe_value): New
7785 * targhooks.c (default_have_speculation_safe_value): New function.
7786 (default_speculation_safe_value): New function.
7787 * targhooks.h (default_have_speculation_safe_value): Add prototype.
7788 (default_speculation_safe_value): Add prototype.
7790 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7792 * dump-context.h (dump_context::dump_loc): New decl.
7793 * dumpfile.c (dump_context::dump_loc): New member function.
7794 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7795 and dump_gimple_stmt.
7796 (dump_context::dump_gimple_expr_loc): Likewise, using
7798 (dump_context::dump_generic_expr_loc): Likewise, using
7800 (dump_context::dump_printf_loc_va): Likewise, using
7802 (dump_context::begin_scope): Explicitly using the global function
7803 "dump_loc", rather than the member function.
7805 2018-07-31 Martin Sebor <msebor@redhat.com>
7807 PR tree-optimization/86741
7808 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7810 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
7812 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7813 depend on whether prefetch instructions will be emitted or not.
7814 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7815 will be emitted or not.
7816 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7817 (TARGET_SETMEM_PFD): New macros.
7819 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7821 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7822 (NULL_STMT_VEC_INFO): Delete.
7823 (stmt_vec_info::operator*): Likewise.
7824 (stmt_vec_info::operator gimple *): Likewise.
7825 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7826 of NULL_STMT_VEC_INFO.
7827 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7828 (vect_reassociating_reduction_p): Likewise.
7829 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7830 (vectorizable_store): Likewise.
7831 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7832 (vec_info::free_stmt_vec_infos): Likewise.
7834 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7836 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7837 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7839 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7841 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7842 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7843 (vec_info::free_stmt_vec_info): New private member functions.
7844 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7845 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7846 * tree-parloops.c (gather_scalar_reductions): Remove calls to
7847 set_stmt_vec_info_vec and free_stmt_vec_infos.
7848 * tree-vect-loop.c (_loop_vec_info): Remove call to
7849 set_stmt_vec_info_vec.
7850 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7851 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7852 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7853 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7854 (vec_info::free_stmt_vec_info): ...these new functions. Remove
7855 assignments in {vec_info::,}new_stmt_vec_info that are redundant
7856 with the clearing in the xcalloc.
7857 (stmt_vec_info_vec): Delete.
7858 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7859 (vectorize_loops): Likewise.
7860 (vec_info::~vec_info): Remove argument from call to
7861 free_stmt_vec_infos.
7862 (vec_info::add_stmt): Remove vinfo argument from call to
7865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7867 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7868 rather than a gimple stmt.
7869 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
7870 information for pattern statements when passed the original
7871 statement; instead wait to be passed the pattern statement itself.
7872 Don't call set_vinfo_for_stmt here.
7873 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7874 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7875 stmt_vec_infos here.
7876 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7877 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7878 stmt_vec_infos entry.
7880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7882 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7883 * tree-vectorizer.c (vec_info::replace_stmt): New function.
7884 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7885 * tree-vect-stmts.c (vectorizable_call): Likewise.
7886 (vectorizable_simd_clone_call): Likewise.
7888 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7890 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7891 * tree-vectorizer.c (vec_info::remove_stmt): New function.
7892 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7893 * tree-vect-loop.c (vect_transform_loop): Likewise.
7894 * tree-vect-slp.c (vect_schedule_slp): Likewise.
7895 * tree-vect-stmts.c (vect_remove_stores): Likewise.
7897 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7899 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7900 (vect_dr_stmt): Delete.
7901 * tree-vectorizer.c (vec_info::lookup_dr): New function.
7902 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7904 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7905 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7906 (vect_verify_datarefs_alignment, vect_peeling_supportable)
7907 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7908 (vect_analyze_data_refs): Likewise.
7909 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
7911 (vect_find_same_alignment_drs): Likewise.
7912 (vect_slp_analyze_node_dependences): Update calls accordingly.
7913 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7914 instead of DR_VECT_AUX.
7915 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7916 of a vector data references. Use vec_info::lookup_dr instead of
7918 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7919 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7920 instead of DR_VECT_AUX.
7922 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7924 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7926 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7928 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7929 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7930 (vect_gen_prolog_loop_niters): Likewise.
7932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7934 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7935 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7936 (vect_known_alignment_in_bytes, vect_dr_behavior)
7937 (vect_get_scalar_dr_size): Take references as dr_vec_infos
7938 instead of data_references. Update calls to other routines for
7939 which the same change has been made.
7940 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7941 dr_vec_infos instead of stmt_vec_infos.
7942 (vect_analyze_data_ref_dependence): Update call accordingly.
7943 (vect_slp_analyze_data_ref_dependence)
7944 (vect_record_base_alignments): Use DR_VECT_AUX.
7945 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7946 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7947 (vector_alignment_reachable_p, vect_get_data_access_cost)
7948 (vect_peeling_supportable, vect_analyze_group_access_1)
7949 (vect_analyze_group_access, vect_analyze_data_ref_access)
7950 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7951 (vect_compile_time_alias, vect_small_gap_p)
7952 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7953 (vect_supportable_dr_alignment): Take references as dr_vec_infos
7954 instead of data_references. Update calls to other routines for
7955 which the same change has been made.
7956 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7957 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7958 (vect_slp_analyze_and_verify_node_alignment)
7959 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7960 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7961 (vect_setup_realignment): Use dr_vec_infos. Update calls after
7963 (_vect_peel_info::dr): Replace with...
7964 (_vect_peel_info::dr_info): ...this new field.
7965 (vect_peeling_hash_get_most_frequent)
7966 (vect_peeling_hash_choose_best_peeling): Update accordingly.
7967 (vect_peeling_hash_get_lowest_cost):
7968 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
7969 routines for which the same change has been made.
7970 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
7972 * tree-vect-loop-manip.c (get_misalign_in_elems)
7973 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
7975 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7976 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7977 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7978 (get_group_load_store_type, get_negative_load_store_type)
7979 (vect_get_data_ptr_increment, vectorizable_store)
7980 (vectorizable_load): Likewise.
7981 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7982 Update calls to other routines for which the same change has been made.
7984 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7986 * tree-vectorizer.h (vec_info::move_dr): New member function.
7987 (dataref_aux): Rename to...
7988 (dr_vec_info): ...this and add "dr" and "stmt" fields.
7989 (_stmt_vec_info::dr_aux): Update accordingly.
7990 (_stmt_vec_info::data_ref_info): Delete.
7991 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7992 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7993 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7994 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7996 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
7997 (STMT_VINFO_DR_INFO): New macro.
7998 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7999 (set_dr_misalignment): Update after rename of dataref_aux.
8000 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8001 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8002 initialization of STMT_VINFO_DATA_REF.
8003 * tree-vectorizer.c (vec_info::move_dr): New function.
8004 * tree-vect-patterns.c (vect_recog_bool_pattern)
8005 (vect_recog_mask_conversion_pattern)
8006 (vect_recog_gather_scatter_pattern): Use it.
8007 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8008 the "dr" and "stmt" fields of dr_vec_info instead of
8009 STMT_VINFO_DATA_REF.
8011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8013 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8014 (is_pattern_stmt_p): Use it.
8015 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8016 on pattern statements.
8018 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8020 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8021 original stmt as a stmt_vec_info rather than a gimple stmt.
8022 (vect_pattern_recog_1): Take the statement directly as a
8023 stmt_vec_info, rather than via a gimple_stmt_iterator.
8024 Update call to vect_mark_pattern_stmts.
8025 (vect_pattern_recog): Update calls accordingly.
8027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8029 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8030 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8031 a vect_def_type for the first argument.
8032 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8033 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8034 operand if it isn't defined by a vectorized statement.
8035 (vect_build_gather_load_calls): Remove the mask_dt argument and
8036 update calls to vect_get_vec_def_for_stmt_copy.
8037 (vectorizable_bswap): Likewise the dt argument.
8038 (vectorizable_call): Update calls to vectorizable_bswap and
8039 vect_get_vec_def_for_stmt_copy.
8040 (vectorizable_simd_clone_call, vectorizable_assignment)
8041 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8042 (vectorizable_comparison): Update calls to
8043 vect_get_vec_def_for_stmt_copy.
8044 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8046 (vect_get_loop_based_defs): Remove dt argument and update call
8047 to vect_get_vec_def_for_stmt_copy.
8048 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8049 and vect_get_vec_def_for_stmt_copy.
8050 (vectorizable_load): Update calls to vect_build_gather_load_calls
8051 and vect_get_vec_def_for_stmt_copy.
8052 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8053 (vectorizable_reduction, vectorizable_live_operation): Update calls
8054 to vect_get_vec_def_for_stmt_copy.
8056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8058 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8059 and gimple stmt arguments with a stmt_vec_info.
8060 (vect_record_base_alignments): Update calls accordingly.
8061 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8062 and gimple stmt arguments with a stmt_vec_info.
8063 (vect_build_slp_tree_1): Remove vinfo argument and update call
8064 to vect_record_max_nunits.
8065 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8066 and vect_record_max_nunits.
8068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8070 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8071 file and take a stmt_vec_info instead of a gimple stmt.
8072 (supportable_widening_operation, vect_finish_replace_stmt)
8073 (vect_finish_stmt_generation, vect_get_store_rhs)
8074 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8075 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8076 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8077 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8078 (vect_create_data_ref_ptr, bump_vector_ptr)
8079 (vect_permute_store_chain, vect_setup_realignment)
8080 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8081 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8082 (vectorizable_reduction, vectorizable_induction)
8083 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8084 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8085 than gimple stmts as arguments.
8086 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8087 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8088 (can_group_stmts_p, vect_check_gather_scatter)
8089 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8090 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8091 (vect_permute_load_chain, vect_shift_permute_load_chain)
8092 (vect_transform_grouped_load)
8093 (vect_record_grouped_load_vectors): Likewise.
8094 * tree-vect-loop.c (vect_fixup_reduc_chain)
8095 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8096 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8097 (vectorizable_reduction, vectorizable_induction)
8098 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8099 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8100 (vect_get_load_store_mask): Likewise.
8101 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8102 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8103 * tree-vect-stmts.c (vect_mark_relevant)
8104 (is_simple_and_all_uses_invariant)
8105 (exist_non_indexing_operands_for_use_p, process_use)
8106 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8107 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8108 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8109 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8110 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8111 (get_negative_load_store_type, get_load_store_type)
8112 (vect_check_load_store_mask, vect_check_store_rhs)
8113 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8114 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8115 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8116 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8117 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8118 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8119 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8120 (supportable_widening_operation): Likewise.
8122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8124 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8125 a stmt_vec_info instead of a gcall.
8126 (vect_check_gather_scatter): Update call accordingly.
8127 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8129 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8130 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8131 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8132 instead of a gimple stmt.
8133 (vect_transform_loop): Update calls accordingly.
8134 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8135 stmt_vec_infos instead of gimple stmts.
8136 (vect_analyze_slp_instance): Update use accordingly.
8137 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8138 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8139 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8140 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8141 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8142 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8143 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8144 down to subroutines.
8146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8148 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8149 of the worklist from a vector of gimple stmts to a vector of
8151 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8152 (vect_mark_stmts_to_be_vectorized): Likewise
8154 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8156 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8157 statement before passing it to vect_analyze_stmt.
8158 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8159 the chain of phi vector definitions. Track the exit phi via its
8161 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8162 STMT_VINFO_REDUC_DEF.
8163 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8164 stmt_vec_infos to handle the statement chains.
8165 (vect_get_slp_defs): Record the first statement in the node
8166 using a stmt_vec_info.
8167 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8168 statements here and pass their stmt_vec_info down to subroutines.
8169 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8170 down to vect_finish_stmt_generation.
8171 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8172 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8173 stmt_vec_infos to subroutines.
8174 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8177 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8179 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8180 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8181 (vect_permute_store_chain, vect_setup_realignment)
8182 (vect_permute_load_chain, vect_shift_permute_load_chain)
8183 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8184 stmts internally, and when passing values to other vectorizer routines.
8185 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8186 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8187 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8188 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8189 (vectorizable_reduction, vectorizable_induction)
8190 (vectorizable_live_operation, vect_transform_loop_stmt)
8191 (vect_transform_loop): Likewise.
8192 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8193 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8194 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8195 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8196 (vect_slp_analyze_node_operations_1): Likewise.
8197 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8198 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8199 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8200 (vect_finish_stmt_generation_1, get_group_load_store_type)
8201 (get_load_store_type, vect_build_gather_load_calls)
8202 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8203 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8204 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8205 (vectorizable_store, vectorizable_load, vectorizable_condition)
8206 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8207 (supportable_widening_operation): Likewise.
8208 (vect_get_vector_types_for_stmt): Likewise.
8209 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8211 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8213 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8214 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8215 (vect_permute_store_chain, vect_permute_load_chain)
8216 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8217 repeated stmt_vec_info lookups.
8218 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8219 (vect_update_ivs_after_vectorizer): Likewise.
8220 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8221 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8222 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8223 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8224 (vect_bb_slp_scalar_cost): Likewise.
8225 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8227 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8229 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8230 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8231 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8232 to get gassigns and gcalls, rather than operating on generc gimple
8234 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8235 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8236 (vectorizable_load, vect_analyze_stmt): Likewise.
8237 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8239 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8241 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8242 return stmt_vec_infos rather than gimple stmts. Do not accept
8244 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8246 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8247 Update use of get_later_stmt.
8248 (vect_get_constant_vectors): Update call accordingly.
8249 (vect_schedule_slp_instance): Likewise
8250 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8251 (vect_slp_analyze_instance_dependence): Likewise.
8252 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8254 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8256 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8257 (stmt_info_for_cost::stmt_info): ...this new field.
8258 (add_stmt_costs): Update accordingly.
8259 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8260 (vect_get_known_peeling_cost): Likewise.
8261 (vect_estimate_min_profitable_iters): Likewise.
8262 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8264 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8266 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8267 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8268 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8270 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8272 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8274 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8275 a gimple stmt to a stmt_vec_info.
8276 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8278 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8280 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8281 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8282 (_loop_vec_info::reduction_chains): Likewise.
8283 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8285 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8287 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8289 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8290 a gimple stmt to a stmt_vec_info.
8291 (_stmt_vec_info::next_element): Likewise.
8292 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8293 (vect_slp_analyze_and_verify_node_alignment)
8294 (vect_analyze_group_access_1, vect_analyze_group_access)
8295 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8296 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8297 (vect_supportable_dr_alignment): Update accordingly.
8298 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8299 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8300 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8301 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8302 * tree-vect-slp.c (vect_build_slp_tree_1)
8303 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8304 (vect_split_slp_store_group, vect_analyze_slp_instance)
8305 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8306 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8307 (get_group_load_store_type, get_load_store_type)
8308 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8309 (vect_transform_stmt, vect_remove_stores): Likewise.
8311 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8313 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8315 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8316 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8317 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8318 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8319 (vector_alignment_reachable_p, vect_get_data_access_cost)
8320 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8321 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8322 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8323 (vect_analyze_group_access_1, vect_analyze_group_access)
8324 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8325 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8326 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8327 result of vect_dr_stmt and use the stmt_vec_info instead of
8328 the associated gimple stmt.
8329 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8330 (vect_gen_prolog_loop_niters): Likewise.
8331 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8333 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8335 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8336 to a vec<stmt_vec_info>.
8337 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8338 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8340 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8341 to a vec<stmt_vec_info>.
8342 (bst_traits::value_type, bst_traits::value_type): Likewise.
8343 (bst_traits::hash): Update accordingly.
8344 (vect_get_and_check_slp_defs): Change the stmts parameter from
8345 a vec<gimple *> to a vec<stmt_vec_info>.
8346 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8347 (vect_build_slp_tree): Likewise.
8348 (vect_build_slp_tree_2): Likewise. Update uses of
8349 SLP_TREE_SCALAR_STMTS.
8350 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8351 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8352 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8353 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8354 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8355 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8356 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8357 (vect_get_constant_vectors, vect_get_slp_defs)
8358 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8359 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8360 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8361 instead of gimple stmts.
8362 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8363 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8364 (vect_slp_analyze_instance_dependence): Update uses of
8365 SLP_TREE_SCALAR_STMTS.
8366 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8367 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8368 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8369 (get_initial_defs_for_reduction): Likewise.
8370 (vect_create_epilog_for_reduction): Likewise.
8371 (vectorize_fold_left_reduction): Likewise.
8372 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8373 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8374 (can_vectorize_live_stmts): Likewise.
8376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8378 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8379 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8380 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8382 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8384 (gather_scalar_reductions): Update after above interface changes.
8385 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8386 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8388 (vect_force_simple_reduction): Likewise.
8389 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8390 LOOP_VINFO_REDUCTIONS.
8391 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8393 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8395 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8396 a gimple stmt to a stmt_vec_info.
8397 * tree-vect-loop.c (vect_active_double_reduction_p)
8398 (vect_force_simple_reduction, vectorizable_reduction): Update
8401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8403 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8404 vec<gimple *> to a vec<stmt_vec_info>.
8405 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8406 the reduction_phis argument from a vec<gimple *> to a
8408 (vectorizable_reduction): Likewise the phis local variable that
8409 is passed to vect_create_epilog_for_reduction. Update for new type
8410 of SLP_TREE_VEC_STMTS.
8411 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8412 (vectorizable_live_operation): Likewise.
8413 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8414 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8418 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8419 a gimple stmt to a stmt_vec_info.
8420 (vectorizable_condition, vectorizable_live_operation)
8421 (vectorizable_reduction, vectorizable_induction): Pass back the
8422 vectorized statement as a stmt_vec_info.
8423 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8424 use of STMT_VINFO_VEC_STMT.
8425 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8426 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8427 as stmt_vec_infos rather than gimple stmts.
8428 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8430 (vectorizable_live_operation): Likewise.
8431 (vectorizable_reduction, vectorizable_induction): Likewise,
8432 updating use of STMT_VINFO_VEC_STMT.
8433 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8434 of STMT_VINFO_VEC_STMT.
8435 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8436 (vectorizable_simd_clone_call, vectorizable_conversion)
8437 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8438 (vectorizable_store, vectorizable_load, vectorizable_condition)
8439 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8440 from a gimple stmt to a stmt_vec_info.
8441 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8442 pointer to a stmt_vec_info to the vectorizable_* routines.
8444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8446 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8447 a gimple stmt to a stmt_vec_info.
8448 (is_pattern_stmt_p): Update accordingly.
8449 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8450 (vect_record_grouped_load_vectors): Likewise.
8451 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8452 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8453 (vect_model_reduction_cost): Likewise.
8454 (vect_create_epilog_for_reduction): Likewise.
8455 (vectorizable_reduction, vectorizable_induction): Likewise.
8456 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8457 Return the stmt_vec_info for the pattern statement.
8458 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8459 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8460 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8461 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8462 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8463 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8464 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8465 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8469 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8470 (vect_finish_stmt_generation): Likewise.
8471 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8472 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8473 (vect_build_gather_load_calls): Use the return value of the above
8474 functions instead of a separate call to vinfo_for_stmt. Use narrow
8475 scopes for the input gimple stmt and wider scopes for the associated
8476 stmt_vec_info. Use vec_info::lookup_def when setting these
8477 stmt_vec_infos from an SSA_NAME definition.
8478 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8479 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8480 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8481 (vectorizable_store, vectorizable_load, vectorizable_condition)
8482 (vectorizable_comparison): Likewise.
8483 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8484 (vectorizable_reduction): Likewise.
8486 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8488 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8489 stmt_vec_info * parameter before the optional gimple **.
8490 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8491 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8492 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8493 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8494 (vectorizable_live_operation): Likewise.
8495 * tree-vect-patterns.c (type_conversion_p): Likewise.
8496 (vect_look_through_possible_promotion): Likewise.
8497 (vect_recog_rotate_pattern): Likewise.
8498 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8502 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8503 a typedef to a wrapper class.
8504 (NULL_STMT_VEC_INFO): New macro.
8505 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8506 (stmt_vec_info::operator*): New function.
8507 (stmt_vec_info::operator gimple *): Likewise.
8508 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8509 (add_stmt_costs): Likewise.
8510 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8511 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8512 (vect_get_known_peeling_cost): Likewise.
8513 (vect_estimate_min_profitable_iters): Likewise.
8514 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8515 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8516 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8517 (vectorizable_store, free_stmt_vec_infos): Likewise.
8518 (new_stmt_vec_info): Change return type of xcalloc to
8521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8523 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8524 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8525 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8526 a single_imm_use-based sequence.
8527 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8529 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8531 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8532 * tree-vectorizer.c (vec_info::lookup_def): New function.
8533 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8534 (vect_widened_op_tree): Likewise.
8535 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8536 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8537 (vectorizable_reduction): Likewise.
8538 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8540 (vect_is_slp_reduction): Update calls accordingly. Use
8541 vec_info::lookup_def.
8542 (vect_is_simple_reduction): Likewise
8543 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8545 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8547 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8548 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8549 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8551 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8552 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8553 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8554 (vect_is_slp_reduction, vectorizable_induction)
8555 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8556 * tree-vect-patterns.c (vect_init_pattern_stmt):
8557 (vect_determine_min_output_precision_1, vect_determine_precisions)
8558 (vect_pattern_recog): Likewise.
8559 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8560 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8561 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8562 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8563 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8564 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8565 info field from a loop to a loop_vec_info.
8567 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8569 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8570 (vec_info::add_stmt): Declare.
8571 * tree-vectorizer.c (vec_info::add_stmt): New function.
8572 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8573 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8574 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8575 (vectorizable_induction): Likewise.
8576 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8577 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8578 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8579 (vectorizable_load): Likewise.
8580 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8581 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8582 (vect_recog_gather_scatter_pattern): Likewise.
8583 (append_pattern_def_seq): Likewise. Remove a check that is
8584 performed by add_stmt itself.
8586 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8588 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8589 which make_ssa_name was called with new_stmt before new_stmt
8592 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8594 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8596 (vect_is_slp_reduction): ...here...
8597 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8598 that are already known to be false.
8600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8602 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8603 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8604 STMT_VINFO_NUM_SLP_USES when it's true.
8605 (vect_free_slp_instance): Add a final_p parameter and pass it to
8607 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8608 (vect_analyze_slp_instance): Likewise.
8609 (vect_slp_analyze_operations): Likewise.
8610 (vect_slp_analyze_bb_1): Likewise.
8611 * tree-vectorizer.c (vec_info): Likewise.
8612 * tree-vect-loop.c (vect_transform_loop): Likewise.
8614 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8616 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8617 function is not called for second and subsequent members of
8620 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8622 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8623 cases for nested loops from here to ...
8624 (vect_create_epilog_for_reduction): ...here. Only call
8625 vect_is_simple_use for inner-loop reductions.
8627 2018-07-31 Martin Liska <mliska@suse.cz>
8629 PR gcov-profile/85338
8630 PR gcov-profile/85350
8631 PR gcov-profile/85372
8632 * profile.c (struct location_triplet): New.
8633 (struct location_triplet_hash): Likewise.
8634 (output_location): Do not output a BB that
8635 is already recorded for a line.
8636 (branch_prob): Use streamed_locations.
8638 2018-07-31 Martin Liska <mliska@suse.cz>
8640 PR gcov-profile/85370
8641 * coverage.c (coverage_begin_function): Do not mark target
8642 clones as artificial functions.
8644 2018-07-31 Martin Liska <mliska@suse.cz>
8646 PR gcov-profile/83813
8647 PR gcov-profile/84758
8648 PR gcov-profile/85217
8649 PR gcov-profile/85332
8650 * profile.c (branch_prob): Do not record GOTO expressions
8651 for GIMPLE statements which locations are already streamed.
8653 2018-07-31 Olivier Hainque <hainque@adacore.com>
8655 * gcc.c (handle_spec_function): Accept a soft_matched_part
8656 argument, as do_spec_1. Pass it down to ...
8657 (eval_spec_function): Accept a soft_matched_part argument,
8658 and pass it down to ...
8659 (do_spec_2): Accept a soft_matched_part argument, and pass
8660 it down to do_spec_1.
8661 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8662 (handle_braces): Update call to handle_spec_function.
8663 (driver::set_up_specs): Update calls to do_spec_2.
8664 (compare_debug_dump_opt_spec_function): Likewise.
8665 (compare_debug_self_opt_spec_function): Likewise.
8667 2018-07-31 Olivier Hainque <hainque@adacore.com>
8669 * common.opt (nolibc): New option.
8670 * doc/invoke.texi (Link Options): Document it.
8671 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8672 * config/alpha/linux.h: Likewise.
8673 * config/arc/elf.h: Likewise.
8674 * config/arm/uclinux-elf.h: Likewise.
8675 * config/arm/unknown-elf.h: Likewise.
8676 * config/avr/avrlibc.h: Likewise.
8677 * config/bfin/bfin.h: Likewise.
8678 * config/bfin/linux.h: Likewise.
8679 * config/bfin/uclinux.h: Likewise.
8680 * config/darwin.h: Likewise.
8681 * config/darwin10.h: Likewise.
8682 * config/darwin12.h: Likewise.
8683 * config/gnu-user.h: Likewise.
8684 * config/lm32/uclinux-elf.h: Likewise.
8685 * config/pa/pa-hpux11.h: Likewise.
8686 * config/pa/pa64-hpux.h: Likewise.
8687 * config/sparc/sparc.h: Likewise.
8689 2018-07-31 Olivier Hainque <hainque@adacore.com>
8691 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8692 undefined variables.
8694 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8697 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8700 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8702 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8703 terminated string literal.
8705 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8707 PR rtl-optimization/85160
8708 * combine.c (is_just_move): New function.
8709 (try_combine): Allow combining two instructions into two if neither of
8710 the original instructions was a move.
8712 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8715 * doc/extend.texi (Global Register Variables): Discourage use of type
8717 (Local Register Variables): Likewise.
8719 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8721 PR tree-optimization/86506
8722 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8724 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8727 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8728 hard_regno, make sure no insn between `from` and `to` clobbers it.
8730 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8731 Tom de Vries <tdevries@suse.de>
8733 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8734 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8735 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8736 PTX_DEFAULT_RUNTIME_DIM.
8737 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8739 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8741 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8742 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8743 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8745 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
8747 * config/rs6000/constraints.md (wG constraint): Delete, no longer
8749 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8750 predicate to reflect toc fusion has been deleted.
8751 (toc_fusion_mem_raw): Delete, no longer used.
8752 (toc_fusion_mem_wrapped): Likewise.
8753 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8755 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8756 Delete, no longer used.
8757 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8758 meant to be used for toc fusion.
8759 (rs6000_debug_print_mode): Delete toc fusion debugging.
8760 (rs6000_debug_reg_global): Likewise.
8761 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8762 fusion and secondary reload support that were never used.
8763 (rs6000_option_override_internal): Delete TOC fusion, that was only
8764 partially defined, and it did not work unless you also used the
8766 (rs6000_legitimate_address_p): Delete TOC fusion support.
8767 (rs6000_opt_masks): Likewise.
8768 (fusion_wrap_memory_address): Delete function, no longer used.
8769 (fusion_split_address); Delete TOC fusion support.
8770 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8771 longer used with toc fusion being deleted.
8772 (TARGET_TOC_FUSION_FP): Likewise.
8773 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8775 (toc fusion spliter): Delete TOC fusion support.
8776 (toc_fusionload_<mode>): Likewise.
8777 (toc_fusionload_di): Likewise.
8778 (fusion_gpr_load_<mode>): Delete generator function, this insn no
8779 longer needs to be named. Rename predicate to delete TOC fusion.
8780 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8781 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8782 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8783 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8784 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8786 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
8788 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8789 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
8790 __int128 in built-in function prototypes.
8791 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8792 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8794 2018-07-27 Martin Sebor <msebor@redhat.com>
8796 PR tree-optimization/86696
8797 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8798 types, including enums.
8799 (handle_char_store): Be prepared for the above function to fail.
8801 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
8803 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8804 when optimization level is lower than 2 or optimize for size.
8806 2018-07-26 Martin Sebor <msebor@redhat.com>
8808 PR tree-optimization/86043
8809 PR tree-optimization/86042
8810 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8811 (get_string_cst_length): Rename...
8812 (get_min_string_length): ...to this. Add argument.
8813 (handle_char_store): Extend to handle multi-character stores by
8815 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
8816 * tree.h (initializer_zerop): Add argument.
8818 2018-07-26 Jakub Jelinek <jakub@redhat.com>
8821 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8822 declare target to variables if they have always,{to,from,tofrom} map
8825 2018-07-26 Martin Liska <mliska@suse.cz>
8828 * lto-wrapper.c: Add linker_output as prefix
8829 for ltrans_output_file.
8831 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
8833 PR rtl-optimization/85805
8834 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8835 value for hard registers if that was written in the same mode.
8837 2018-07-26 Martin Liska <mliska@suse.cz>
8839 PR gcov-profile/86536
8840 * gcov.c (format_gcov): Use printf format %.*f directly
8841 and do not handle special values.
8843 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8845 * common/config/arc/arc-common.c (arc_option_optimization_table):
8846 Update default optimizations for size.
8848 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8850 * config/arc/arc.md (movsf_insn): Add short instruction selection.
8851 * config/arc/constraints.md (CfZ): New constraint.
8852 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8853 (subsf3_fpu): Likewise.
8854 (cmpsf_fpu): Likewise.
8855 (cmpsf_fpu_uneq): Likewise.
8857 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8859 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8861 (arc_is_uncached_mem_p): uncached applies to both the variable and
8864 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8866 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8869 2018-07-25 David Malcolm <dmalcolm@redhat.com>
8871 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8872 field "m_scopes" from vec to auto_vec.
8874 2018-07-25 Martin Liska <mliska@suse.cz>
8876 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8879 2018-07-25 Richard Biener <rguenther@suse.de>
8882 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8883 special wrt context_die late.
8884 (gen_subprogram_die): Re-use DIEs in local scope.
8886 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
8888 PR tree-optimization/86644
8889 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
8891 2018-07-25 Martin Liska <mliska@suse.cz>
8894 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8895 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8897 2018-07-25 Martin Liska <mliska@suse.cz>
8900 * params.def: Explain ASan abbreviation and provide
8901 a documentation link.
8903 2018-07-24 Martin Sebor <msebor@redhat.com>
8905 PR tree-optimization/86622
8906 PR tree-optimization/86532
8907 * builtins.h (string_length): Declare.
8908 * builtins.c (c_strlen): Correct handling of non-constant offsets.
8909 (check_access): Be prepared for non-constant length ranges.
8910 (string_length): Make extern.
8911 * expr.c (string_constant): Only handle the minor non-constant
8912 array index. Use string_constant to compute the length of
8913 a generic string constant.
8915 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
8917 PR tree-optimization/86618
8918 * tree-vect-stmts.c (vectorizable_call): Don't take the address
8919 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8921 2018-07-24 David Malcolm <dmalcolm@redhat.com>
8923 PR tree-optimization/86636
8924 * json.cc (json::object::set): Fix comment. Add assertions.
8925 (json::array::append): Move here from json.h. Add comment and an
8927 (json::string::string): Likewise.
8928 * json.h (json::array::append): Move to json.cc.
8929 (json::string::string): Likewise.
8930 * optinfo-emit-json.cc
8931 (optrecord_json_writer::impl_location_to_json): Assert that we
8932 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8933 wrapper around it. Expand the location once, rather than three
8935 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8936 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8938 (optrecord_json_writer::optinfo_to_json): Likewise, in four
8939 places. Fix some overlong lines.
8941 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
8943 * config/aarch64/aarch64-simd.md
8944 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8945 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8946 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8947 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8948 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8949 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8950 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8951 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8952 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8954 2018-07-24 Jakub Jelinek <jakub@redhat.com>
8957 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8958 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
8959 and abs_d == d, do the power of two handling if profitable.
8961 2018-07-24 Richard Biener <rguenther@suse.de>
8963 * match.pd: Add BIT_FIELD_REF canonicalizations.
8965 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8968 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8970 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8972 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8973 terminated STRING_CST object.
8975 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
8977 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8979 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
8981 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8982 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8983 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8984 the elements into a register.
8985 (rs6000_split_v4si_init_di_reg): Delete.
8986 (rs6000_split_v4si_init): Delete.
8987 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8988 (vsx_init_v4si): Rewrite as a define_expand.
8990 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
8992 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8993 zero_extend argument from memory): New.
8995 2018-07-22 Martin Sebor <msebor@redhat.com>
8998 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8999 diagnosing calls with unknown arguments unless -Walloca-larger-than
9000 is restricted to less than PTRDIFF_MAX bytes.
9002 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9004 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9006 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9008 * pretty-print.c (text_info::set_location): Remove redundant
9009 "line_table" parameter from call to rich_location::set_range.
9011 2018-07-20 Martin Sebor <msebor@redhat.com>
9014 * builtins.c (expand_builtin_alloca): Adjust.
9015 * calls.c (alloc_max_size): Simplify.
9016 * cgraphunit.c (cgraph_node::expand): Adjust.
9017 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9019 (frame_larger_than_size): Same.
9020 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9021 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9023 * doc/invoke.texi (GCC Command Options): Document option arguments.
9024 Explain byte-size arguments and suffixes.
9025 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9026 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9027 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9028 * doc/options.texi (UInteger): Expand.
9029 (Host_Wide_Int, ByteSize): Document new properties.
9030 * final.c (final_start_function_1): Include sizes in an error message.
9031 * function.c (frame_offset_overflow): Same.
9032 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9033 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9034 Diagnose unbounded alloca calls only for limits of less than
9036 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9037 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9039 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9040 only for limits of less than PTRDIFF_MAX.
9041 * langhooks-def.h (lhd_handle_option): Change function argument
9043 * langhooks.c (lhd_handle_option): Same.
9044 * langhooks.h (handle_option): Same.
9045 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9047 (var_type, var_type_struct): Same.
9048 (var_set): Handle ByteSize flag.
9049 * optc-gen.awk: Add comments to output to ease debugging. Make
9050 use of HOST_WIDE_INT where appropriate.
9051 * opts-gen-save.awk: Use %lx to format unsigned long.
9052 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9053 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9054 arguments. Parse bytes-size suffixes.
9055 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9056 (enum_value_to_arg): Same.
9057 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9058 (handle_option): Adjust.
9059 (generate_option): Change function argument to HOST_WIDE_INT.
9060 (cmdline_handle_error): Adjust.
9061 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9062 (set_option): Change function argument to HOST_WIDE_INT.
9063 (option_enabled): Handle cl_host_wide_int.
9064 (get_option_state): Handle CLVC_SIZE.
9065 (control_warning_option): Same.
9066 * opts.c (common_handle_option): Change function argument to
9067 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9068 OPT_Wvla_larger_than_.
9069 * opts.h (enum cl_var_type): Add an enumerator.
9070 * stor-layout.c (layout_decl): Print a more meaningful warning.
9071 * toplev.c (output_stack_usage): Adjust.
9073 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9075 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9076 call to inline_expand_builtin_string_cmp.
9077 (expand_builtin_strcmp): Likewise.
9078 (expand_builtin_strncmp): Likewise.
9079 (inline_string_cmp): Delete the last parameter, change char_type_node
9080 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9082 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9083 the inlining expansion on target where the type of the call has same or
9084 narrower precision than unsigned char.
9086 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9088 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9089 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9090 * common.opt (fsave-optimization-record): New option.
9091 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9092 * doc/invoke.texi (-fsave-optimization-record): New option.
9093 * dumpfile.c: Include "optinfo-emit-json.h".
9094 (struct kv_pair): Move to coretypes.h.
9095 (optgroup_options): Make non-static.
9096 (dump_context::end_scope): Call
9097 optimization_records_maybe_pop_dump_scope.
9098 * dumpfile.h (optgroup_options): New decl.
9099 * json.cc: New file.
9101 * optinfo-emit-json.cc: New file.
9102 * optinfo-emit-json.h: New file.
9103 * optinfo.cc: Include "optinfo-emit-json.h".
9104 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9105 (optinfo_enabled_p): Check optimization_records_enabled_p.
9106 (optinfo_wants_inlining_info_p): Likewise.
9107 * optinfo.h: Update comment.
9108 * profile-count.c (profile_quality_as_string): New function.
9109 * profile-count.h (profile_quality_as_string): New decl.
9110 (profile_count::quality): New accessor.
9111 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9112 and optinfo_emit_json_cc_tests.
9113 * selftest.h (selftest::json_cc_tests): New decl.
9114 (selftest::optinfo_emit_json_cc_tests): New decl.
9115 * toplev.c: Include "optinfo-emit-json.h".
9116 (compile_file): Call optimization_records_finish.
9117 (do_compile): Call optimization_records_start.
9118 * tree-ssa-live.c: Include optinfo.h.
9119 (remove_unused_scope_block_p): Retain inlining information if
9120 optinfo_wants_inlining_info_p returns true.
9122 2018-07-20 Richard Biener <rguenther@suse.de>
9125 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9126 to cover -flto-partition=none.
9128 2018-07-20 Martin Liska <mliska@suse.cz>
9130 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9131 (get_decl_source_range): Remove unused function.
9133 2018-07-20 Richard Biener <rguenther@suse.de>
9135 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9136 (struct vn_phi_s): Likewise.
9137 (struct vn_reference_s): Likewise.
9138 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9139 for searching the slot of an entry known to be in the hash itself.
9140 (vn_phi_hasher::equal): Likewise.
9141 (vn_reference_hasher::equal): Likewise.
9142 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9144 (optimistic_info, current_info): Remove, keeping only valid_info.
9145 (vn_reference_lookup_1): Remove fallback lookup.
9146 (vn_reference_lookup_2): Likewise.
9147 (vn_nary_op_lookup_1): Likewise.
9148 (vn_phi_lookup): Likewise.
9149 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9151 (vn_reference_insert): Adjust, chain the inserted hash element
9152 at last_inserted_ref.
9153 (vn_reference_insert_pieces): Likewise.
9154 (visit_reference_op_call): Likewise.
9155 (vn_nary_op_insert_into): Chain the inserted hash element at
9157 (vn_nary_op_insert_pieces): Adjust.
9158 (vn_nary_op_insert): Likewise.
9159 (vn_nary_op_insert_stmt): Likewise.
9160 (vn_phi_insert): Adjust, chain the inserted hash element at
9162 (process_scc): Remove clearing and copying the optimistic
9163 table. Instead remove elements inserted during an optimistic
9164 iteration from the single table we maintain.
9165 (init_scc_vn): Adjust.
9166 (free_scc_vn): Likewise.
9167 (sccvn_dom_walker::record_cond): Likewise.
9168 (sccvn_dom_walker::after_dom_children): Likewise.
9170 2018-07-19 Martin Sebor <msebor@redhat.com>
9172 PR tree-optimization/84047
9173 PR tree-optimization/83776
9174 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9175 (check_array_bounds): Call it.
9177 2018-07-19 Martin Sebor <msebor@redhat.com>
9179 * align.h (align_flags): Use member initialization.
9181 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9183 * Makefile.in (OBJS): Add optinfo.o.
9184 * coretypes.h (class symtab_node): New forward decl.
9185 (struct cgraph_node): New forward decl.
9186 (class varpool_node): New forward decl.
9187 * dump-context.h: New file.
9188 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9190 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9191 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9192 (set_alt_dump_file): Likewise.
9193 (dump_context::~dump_context): New dtor.
9194 (dump_gimple_stmt): Move implementation to...
9195 (dump_context::dump_gimple_stmt): ...this new member function.
9196 Add the stmt to any pending optinfo, creating one if need be.
9197 (dump_gimple_stmt_loc): Move implementation to...
9198 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9199 Start a new optinfo and add the stmt to it.
9200 (dump_gimple_expr): Move implementation to...
9201 (dump_context::dump_gimple_expr): ...this new member function.
9202 Add the stmt to any pending optinfo, creating one if need be.
9203 (dump_gimple_expr_loc): Move implementation to...
9204 (dump_context::dump_gimple_expr_loc): ...this new member function.
9205 Start a new optinfo and add the stmt to it.
9206 (dump_generic_expr): Move implementation to...
9207 (dump_context::dump_generic_expr): ...this new member function.
9208 Add the tree to any pending optinfo, creating one if need be.
9209 (dump_generic_expr_loc): Move implementation to...
9210 (dump_context::dump_generic_expr_loc): ...this new member
9211 function. Add the tree to any pending optinfo, creating one if
9213 (dump_printf): Move implementation to...
9214 (dump_context::dump_printf_va): ...this new member function. Add
9215 the text to any pending optinfo, creating one if need be.
9216 (dump_printf_loc): Move implementation to...
9217 (dump_context::dump_printf_loc_va): ...this new member function.
9218 Start a new optinfo and add the stmt to it.
9219 (dump_dec): Move implementation to...
9220 (dump_context::dump_dec): ...this new member function. Add the
9221 value to any pending optinfo, creating one if need be.
9222 (dump_context::dump_symtab_node): New member function.
9223 (dump_context::get_scope_depth): New member function.
9224 (dump_context::begin_scope): New member function.
9225 (dump_context::end_scope): New member function.
9226 (dump_context::ensure_pending_optinfo): New member function.
9227 (dump_context::begin_next_optinfo): New member function.
9228 (dump_context::end_any_optinfo): New member function.
9229 (dump_context::s_current): New global.
9230 (dump_context::s_default): New global.
9231 (dump_scope_depth): Delete global.
9232 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9233 (dump_symtab_node): New function.
9234 (get_dump_scope_depth): Reimplement in terms of dump_context.
9235 (dump_begin_scope): Likewise.
9236 (dump_end_scope): Likewise.
9237 (selftest::temp_dump_context::temp_dump_context): New ctor.
9238 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9239 (selftest::verify_item): New function.
9240 (ASSERT_IS_TEXT): New macro.
9241 (ASSERT_IS_TREE): New macro.
9242 (ASSERT_IS_GIMPLE): New macro.
9243 (selftest::test_capture_of_dump_calls): New test.
9244 (selftest::dumpfile_c_tests): Call it.
9245 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9246 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9247 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9248 descriptive comment.
9249 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9250 (dump_node, dump_bb): Move these unrelated decls.
9251 (class dump_manager): Add leading comment.
9252 * optinfo.cc: New file.
9253 * optinfo.h: New file.
9255 2018-07-19 Michael Collison <michael.collison@arm.com>
9256 Richard Henderson <rth@redhat.com>
9258 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9259 (subti): Handle op1 zero.
9260 (subvti4, usub4ti4): New.
9261 (*sub<GPI>3_compare1_imm): New.
9262 (sub<GPI>3_carryinCV): New.
9263 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9264 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9266 2018-07-19 Michael Collison <michael.collison@arm.com>
9267 Richard Henderson <rth@redhat.com>
9269 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9270 (addti3): Create simpler code if low part is already known to be 0.
9271 (addvti4, uaddvti4): New.
9272 (*add<GPI>3_compareC_cconly_imm): New.
9273 (*add<GPI>3_compareC_cconly): New.
9274 (*add<GPI>3_compareC_imm): New.
9275 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9276 handle constants within this pattern..
9277 (*add<GPI>3_compareV_cconly_imm): New.
9278 (*add<GPI>3_compareV_cconly): New.
9279 (*add<GPI>3_compareV_imm): New.
9280 (add<GPI>3_compareV): New.
9281 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9282 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9283 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9284 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9285 with 'comparison' operator.
9286 (*add<GPI>3_compareV_cconly_imm): Ditto.
9287 (*add<GPI>3_compareV_cconly): Ditto.
9288 (*add<GPI>3_compareV_imm): Ditto.
9289 (add<GPI>3_compareV): Ditto.
9290 (add<mode>3_carryinC): Ditto.
9291 (*add<mode>3_carryinC_zero): Ditto.
9292 (*add<mode>3_carryinC): Ditto.
9293 (add<mode>3_carryinV): Ditto.
9294 (*add<mode>3_carryinV_zero): Ditto.
9295 (*add<mode>3_carryinV): Ditto.
9297 2018-07-19 Michael Collison <michael.collison@arm.com>
9298 Richard Henderson <rth@redhat.com>
9300 * config/aarch64/aarch64-modes.def (CC_V): New.
9301 * config/aarch64/aarch64-protos.h
9302 (aarch64_addti_scratch_regs): Declare
9303 (aarch64_subvti_scratch_regs): Declare.
9304 (aarch64_expand_subvti): Declare.
9305 (aarch64_gen_unlikely_cbranch): Declare
9306 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9307 for signed overflow using CC_Vmode.
9308 (aarch64_get_condition_code_1): Handle CC_Vmode.
9309 (aarch64_gen_unlikely_cbranch): New function.
9310 (aarch64_addti_scratch_regs): New function.
9311 (aarch64_subvti_scratch_regs): New function.
9312 (aarch64_expand_subvti): New function.
9314 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9316 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9318 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9319 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9322 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9325 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9326 address check not strict.
9328 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9330 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9332 (store_pair_lanes<mode>): Likewise.
9333 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9334 enum value 'ADDR_QUERY_LDP_STP_N'.
9335 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9336 (aarch64_print_address_internal): Add declaration.
9337 (aarch64_print_ldpstp_address): Remove.
9338 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9339 (aarch64_print_operand): Change printing of 'y'.
9340 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9341 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9342 'true' rather than '1'.
9343 * config/aarch64/constraints.md (Uml): Likewise.
9344 (Uml): Rename to Umn.
9347 2018-07-19 Richard Biener <rguenther@suse.de>
9349 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9351 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9352 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9353 (vn_reference_hasher): Likewise.
9354 (struct vn_tables_s): Remove obstack and alloc-pool members.
9355 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9356 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9357 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9358 (vn_reference_insert_pieces): Likewise.
9359 (alloc_vn_nary_op_noinit): Adjust.
9360 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9361 (vn_phi_eq): Adjust.
9362 (shared_lookup_phiargs): Remove.
9363 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9364 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9365 (visit_reference_op_call): Likewise.
9366 (copy_nary, copy_phi, copy_reference): Remove.
9367 (process_scc): Rewind the obstack when iterating. Do not
9368 copy the elements to valid_info but just move them from one
9369 hashtable to the other.
9370 (allocate_vn_table): Adjust.
9371 (free_vn_table): Likewise.
9372 (init_scc_vn): Likewise.
9373 (free_scc_vn): Likewise.
9375 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9378 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9379 indirect_return as function type attribute.
9380 (ix86_attribute_table): Change indirect_return to function
9382 * doc/extend.texi: Update indirect_return attribute.
9384 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9386 * wide-int.h (widest2_int): New.
9387 * gimple-fold.c (arith_overflowed_p): Use it.
9388 * tree.h (widest2_int_cst): New.
9389 * tree-vrp.c (wide_int_binop_overflow): Rename from
9390 vrp_int_const_binop.
9391 Rewrite to work on trees.
9392 (extract_range_from_multiplicative_op_1): Abstract code to...
9393 (wide_int_range_min_max): ...here.
9394 (wide_int_range_cross_product): ...and here.
9395 (extract_range_from_binary_expr_1): Abstract overflow code to...
9396 (wide_int_range_mult_wrapping): ...here.
9397 * tree-vrp.h (wide_int_range_cross_product): New.
9398 (wide_int_range_mult_wrapping): New.
9400 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9401 Julia Koval <julia.koval@intel.com>
9403 * config/i386/x86-tune-costs.h (skylake_memcpy,
9404 skylake_memset): Replace rep_prefix with unrolling for size 512.
9406 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9409 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9410 comparision with EQ_EXPR in last stmt.
9412 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9414 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9415 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9416 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9417 previously known as "PowerPC AltiVec Built-in Functions". Move
9418 some material to new subsubsections "PowerPC AltiVec Built-in
9419 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9421 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9422 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9423 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9424 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9426 2018-07-18 Richard Biener <rguenther@suse.de>
9428 PR tree-optimization/86557
9429 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9432 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9434 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9436 2018-07-17 Jeff Law <law@redhat.com>
9438 * config/arm/arm.c (get_label_padding): Update for recent
9439 changes to label_to_alignment.
9441 PR tree-optimization/86010
9442 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9444 * config/mips/mips.c (vr4130_align_insns): Update for recent
9445 changes to label_to_alignment.
9447 * config/frv/frv.c (frv_label_align): Update for recent changes
9448 to label_to_alignment.
9450 * config/nios2/nios2.c (nios2_label_align): Update for recent
9451 changes which dropped ALIGN_LABELS_LOG.
9453 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9455 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9456 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9458 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9460 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9461 deprecated align_labels_log.
9463 2018-07-17 Richard Biener <rguenther@suse.de>
9466 * dwarf2out.c (init_sections_and_labels): Always generate
9467 a debug_line_str_section for early LTO debug.
9468 (dwarf2out_finish): Reset debug_line_str_hash output early.
9469 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9471 (dwarf2out_early_finish): Output debug_line_str.
9473 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9475 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9476 index register on z196 or later.
9478 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9480 * config/s390/s390.c (s390_default_align): Set default function
9482 (s390_override_options_after_change): Call s390_default align.
9483 (s390_option_override_internal): Call s390_default_align.
9484 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9486 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9489 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9490 to _looptemp_ clauses, other than the first two.
9492 2018-07-17 Martin Liska <mliska@suse.cz>
9494 * opts.c: Do not enable OPT_falign_* for -Os.
9496 2018-07-17 Martin Liska <mliska@suse.cz>
9498 * align.h (MAX_CODE_ALIGN): New.
9499 (MAX_CODE_ALIGN_VALUE): New.
9500 * common/config/i386/i386-common.c (ix86_handle_option):
9501 (MAX_CODE_ALIGN): Moved to align.h.
9502 * final.c (MAX_CODE_ALIGN): Likewise.
9503 * opts.c (parse_and_check_align_values):
9504 (MAX_CODE_ALIGN): Likewise.
9505 (MAX_CODE_ALIGN_VALUE): Likewise.
9507 2018-07-17 Martin Liska <mliska@suse.cz>
9509 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9510 in order to fulfil coding style.
9511 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9512 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9513 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9514 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9515 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9516 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9517 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9518 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9519 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9521 2018-07-17 Martin Liska <mliska@suse.cz>
9523 * align.h: New file.
9524 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9526 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9527 align_flags of label_to_alignment.
9528 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9530 * config/m68k/m68k.c: Do not use removed align_labels_value and
9532 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9533 (LOOP_ALIGN): Likewise.
9534 (LABEL_ALIGN): Likewise.
9535 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9536 Remove not used macro.
9537 (rs6000_loop_align): Change return type to align_flags.
9538 (rs6000_loop_align_max_skip): Remove.
9539 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9540 Change return type to align_flags.
9541 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9542 Remove not used macro.
9543 (rs6000_loop_align): Change return type to align_flags.
9544 (rs6000_loop_align_max_skip): Remove.
9545 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9546 * config/rx/rx-protos.h (rx_align_for_label): Make it
9548 * config/rx/rx.c (rx_align_for_label): Change return type
9550 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9552 into align_flags class.
9553 (LABEL_ALIGN): Likewise.
9554 (LOOP_ALIGN): Likewise.
9555 * config/s390/s390.c (s390_label_align): Use align_flags
9557 (s390_asm_output_function_label): Likewise.
9558 * config/sh/sh.c (sh_override_options_after_change):
9559 Use align_flags class directly without macros.
9560 (find_barrier): Likewise.
9561 (barrier_align): Likewise.
9562 (sh_loop_align): Likewise.
9563 * config/spu/spu.c (spu_option_override):
9564 Use align_flags_tuple::get_value instead of removed macros.
9565 (spu_sched_init): Likewise.
9566 * config/spu/spu.h (GTY): Likewise.
9567 * config/visium/visium.c (visium_option_override):
9568 Set "8" as default secondary alignment.
9569 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9570 in order to guarantee secondary alignment of 8.
9571 * coretypes.h: Include align.h header file.
9572 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9573 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9574 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9575 * doc/tm.texi.in: Likewise.
9576 * final.c (struct label_alignment): Remove not used structure.
9577 (LABEL_ALIGN): Change type to align_flags.
9578 (LOOP_ALIGN): Likewise.
9579 (JUMP_ALIGN): Likewise.
9580 (default_loop_align_max_skip): Remove.
9581 (default_label_align_max_skip): Likewise.
9582 (default_jump_align_max_skip): Likewise.
9583 (default_label_align_after_barrier_max_skip):
9584 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9585 (LABEL_TO_MAX_SKIP): Remove.
9586 (label_to_alignment): Return align_flags type instead of integer.
9587 (label_to_max_skip): Remove.
9588 (align_fuzz): Use align_flags type.
9589 (compute_alignments): Use align_flags type and use align_flags::max
9590 to combine multiple alignments.
9591 (grow_label_align): Grow vec instead of C array.
9592 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9593 (shorten_branches): Use align_flags type and use align_flags::max
9594 to combine multiple alignments.
9595 (final_scan_insn_1): Remove usage of secondary alignment that comes
9596 from label alignment, but instead use proper secondary alignment
9597 which is computed in grow_label_align.
9598 * flags.h (struct align_flags_tuple): Move to align.h.
9599 (struct align_flags): Likewise.
9600 (state_align_loops): Rename to align_loops.
9601 (state_align_jumps): Rename to align_jumps.
9602 (state_align_labels): Rename to align_labels.
9603 (state_align_functions): Rename to align_functions.
9604 (align_loops_log): Remove.
9605 (align_jumps_log): Remove.
9606 (align_labels_log): Remove.
9607 (align_functions_log): Remove.
9608 (align_loops_max_skip): Remove.
9609 (align_jumps_max_skip): Remove.
9610 (align_labels_max_skip): Remove.
9611 (align_functions_max_skip): Remove.
9612 (align_loops_value): Remove.
9613 (align_jumps_value): Remove.
9614 (align_labels_value): Remove.
9615 (align_functions_value): Remove.
9616 * output.h (label_to_alignment): Change return type to align_flags.
9617 (label_to_max_skip): Remove.
9618 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9619 jump_align_max_skip macros.
9620 * targhooks.h (default_loop_align_max_skip): Remove.
9621 (default_label_align_max_skip): Likewise.
9622 (default_jump_align_max_skip): Likewise.
9623 (default_label_align_after_barrier_max_skip): Remove.
9624 * toplev.c (read_log_maxskip): Use ::normalize function.
9625 (parse_N_M): Remove not used argument and also call ::normalize.
9626 (parse_alignment_opts): Do not pass unused arguments.
9627 * varasm.c (assemble_start_function): Use directly align_functions
9628 instead of removed macros.
9629 * system.h: Do not poison removed macros.
9631 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9634 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9635 and cond temporaries don't have reference type if iterator has
9636 pointer type. For init use &for_pre_body instead of pre_p if
9637 for_pre_body is non-empty.
9639 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9641 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9642 double-double modes to SFmode directly directly.
9643 (trunc<mode>sf2_fprs): Delete.
9645 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9647 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9648 for conversions between IFmode and the decimal floating point modes.
9649 (init_float128_ieee): Use the correct names for conversions between
9650 KFmode and the decimal floating point modes.
9652 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9654 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9655 for the conversions between TDmode and IFmode.
9656 (init_float128_ieee): Use more correct names for the conversions
9657 between TDmode and KFmode.
9659 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9661 PR tree-optimization/86526
9662 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9663 (inline_expand_builtin_string_cmp): Likewise.
9664 (inline_string_cmp): Likewise. Use c_readstr instead of
9665 builtin_memcpy_read_str. Add unit_mode temporary.
9667 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9670 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9671 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9673 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9675 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9676 Alphabetize prototypes of built-in functions, separating out
9677 built-in functions that are listed in this section but should be
9678 described elsewhere.
9680 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9683 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9684 conditional move when trapping comparison was split to a
9685 non-trapping one (and vice versa).
9687 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9689 * config/s390/s390.c (s390_function_profiler): Generate nops
9690 instead of profiler call sequences.
9691 * config/s390/s390.opt: Add the new option.
9693 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9695 * config/s390/s390.c (s390_function_profiler): Generate
9696 __mcount_loc section.
9697 * config/s390/s390.opt: Add the new option.
9699 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9701 * common.opt: Add the new warning.
9702 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9703 %r0,__fentry__" when -mfentry is specified.
9704 (s390_option_override_internal): Disallow -mfentry for 31-bit
9706 * config/s390/s390.opt: Add the new option.
9708 2018-07-16 Richard Biener <rguenther@suse.de>
9711 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9712 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9714 2018-07-16 Martin Liska <mliska@suse.cz>
9717 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9720 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9722 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9724 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9726 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9728 * config/arc/arc-cpus.def (hs4x): New cpu.
9730 * config/arc/arc-tables.opt: Regenerate.
9731 * config/arc/arc.c (arc_sched_issue_rate): New function.
9732 (TARGET_SCHED_ISSUE_RATE): Define.
9733 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9734 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9736 (attr tune): Add ARCHS4x tune values.
9737 (attr tune_dspmpy): Define.
9738 (*tst): Correct instruction type.
9739 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9740 * config/arc/arcHS4x.md: New file.
9741 * config/arc/fpu.md: Update instruction type attributes.
9742 * config/arc/t-multilib: Regenerate.
9744 2018-07-16 Tom de Vries <tdevries@suse.de>
9747 * var-tracking.c (vt_initialize): Fix pre_dec handling.
9749 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9751 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9754 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
9756 PR tree-optimization/86514
9757 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9758 conversion to a boolean type from a type with greater precision.
9760 2018-07-16 Tom de Vries <tdevries@suse.de>
9762 * var-tracking.c (vt_initialize): Print adjusted insn slim if
9763 dump_flags request TDF_SLIM.
9765 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
9767 * fold-const.c (int_const_binop_1): Abstract...
9768 (wide_int_binop): ...wide int code here.
9769 (poly_int_binop): ...poly int code here.
9770 Abstract the rest of int_const_binop_1 into int_const_binop.
9771 * fold-const.h (wide_int_binop): New.
9772 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9773 Remove useless PLUS/MINUS_EXPR case.
9774 (zero_nonzero_bits_from_vr): Move wide int code...
9775 (zero_nonzero_bits_from_bounds): ...here.
9776 (extract_range_from_binary_expr_1): Move mask optimization code...
9777 (range_easy_mask_min_max): ...here.
9778 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9779 (range_easy_mask_min_max): New.
9781 2018-07-15 Jeff Law <law@redhat.com>
9784 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9787 2018-07-14 Jim Wilson <jimw@sifive.com>
9789 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9791 2018-07-14 Paul Koning <ni1d@arrl.net>
9793 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9795 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
9797 * lto-streamer-out.c (copy_function_or_variable): Dump info about
9800 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
9801 Steve Munroe <munroesj52@gmail.com>
9803 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9804 (_mm_andnot_si128): Likewise.
9805 (_mm_or_si128): Likewise.
9806 (_mm_xor_si128): Likewise.
9808 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
9811 * builtins.c (expand_builtin_memcmp): Inline the calls first
9812 when result_eq is false.
9813 (expand_builtin_strcmp): Inline the calls first.
9814 (expand_builtin_strncmp): Likewise.
9815 (inline_string_cmp): New routine. Expand a string compare
9816 call by using a sequence of char comparison.
9817 (inline_expand_builtin_string_cmp): New routine. Inline expansion
9818 a call to str(n)cmp/memcmp.
9819 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9821 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9823 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
9825 * config/arm/driver-arm.c: Include arm-native.h.
9826 (host_detect_local_cpu): Use auto-generated data tables.
9827 (vendors, arm_cpu_table): Delete. Move part information to ...
9828 * config/arm/arm-cpus.in: ... here.
9829 * config/arm/parsecpu.awk (gen_native): New function.
9830 (vendor, part): New CPU fields.
9831 (END): Add support for building the native CPU detection tables.
9832 * config/arm/t-arm (arm-native.h): Add build rule.
9833 (driver-arm.o): Add dependency on arm-native.h.
9835 2018-07-13 Richard Biener <rguenther@suse.de>
9838 * match.pd (addr1 - addr2): Allow either of the operand to
9841 2018-07-13 Tom de Vries <tdevries@suse.de>
9843 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9846 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
9848 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9849 arrays instead of numbered variables.
9851 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
9853 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9854 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9856 2018-07-13 Richard Biener <rguenther@suse.de>
9859 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9860 instead of get_context_die.
9862 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
9863 Richard Biener <rguenther@suse.de>
9866 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9867 that the loop latch destination where phi is defined.
9869 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
9871 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9872 (riscv_expand_epilogue): Add assertion to check interrupt mode.
9873 (riscv_set_current_function): Extract getting interrupt type to new
9875 (riscv_get_interrupt_type): New function.
9876 (riscv_merge_decl_attributes): New function, checking interrupt type is
9878 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9880 2018-07-12 Paul Koning <ni1d@arrl.net>
9882 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9885 2018-07-12 Paul Koning <ni1d@arrl.net>
9887 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9888 zero reference, add doloop_end instead.
9889 * doc/md.texi (decrement_and_branch_until_zero): Remove.
9890 (Looping patterns): Remove decrement_and_branch_until_zero. Add
9891 detail for doloop_end.
9893 2018-07-12 Martin Sebor <msebor@redhat.com>
9896 * attribs.c (decl_attributes): Reject conflicting attributes before
9897 calling attribute handlers.
9899 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
9901 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9903 (gcc::dump_manager::get_dump_file_name): likewise.
9904 (dump_begin): Likewise.
9905 * dumpfile.h (dump_begin): Update prototype.
9906 (gcc::dump_manager::get_dump_file_name,
9907 gcc::dump_manager::get_dump_file_name): Update prototype.
9909 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9911 * internal-fn.h (vectorizable_internal_fn_p): New function.
9912 * tree-vect-slp.c (compatible_calls_p): Likewise.
9913 (vect_build_slp_tree_1): Remove nops argument. Handle calls
9914 to internal functions.
9915 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9917 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9919 * fold-const.h (inverse_conditions_p): Declare.
9920 * fold-const.c (inverse_conditions_p): New function.
9921 * match.pd: Use inverse_conditions_p. Add folds of view_converts
9922 that test the inverse condition of a conditional internal function.
9923 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9924 * internal-fn.c (internal_fn_mask_index): Handle conditional
9926 (vectorized_internal_fn_supported_p): New function.
9927 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9928 (any_pred_load_store): Replace with...
9929 (need_to_predicate): ...this new variable.
9930 (redundant_ssa_names): New variable.
9931 (ifcvt_can_use_mask_load_store): Move initial checks to...
9932 (ifcvt_can_predicate): ...this new function. Handle tree codes
9933 for which a conditional internal function exists.
9934 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9935 instead of ifcvt_can_use_mask_load_store. Update after variable
9937 (predicate_load_or_store): New function, split out from
9938 predicate_mem_writes.
9939 (check_redundant_cond_expr): New function.
9940 (value_available_p): Likewise.
9941 (predicate_rhs_code): Likewise.
9942 (predicate_mem_writes): Rename to...
9943 (predicate_statements): ...this. Use predicate_load_or_store
9944 and predicate_rhs_code.
9945 (combine_blocks, tree_if_conversion): Update after above name changes.
9946 (ifcvt_local_dce): Handle redundant_ssa_names.
9947 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9948 general conditional functions.
9949 * tree-vect-stmts.c (vectorizable_call): Likewise.
9951 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9952 Alan Hayward <alan.hayward@arm.com>
9953 David Sherwood <david.sherwood@arm.com>
9955 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9956 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9957 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9958 plus and minus and convert them into IFN_COND_FMA-based sequences.
9959 (convert_mult_to_fma): Handle conditional plus and minus.
9961 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9963 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9964 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9965 (cond_fnms_optab): New optabs.
9966 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9968 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9969 * internal-fn.h (get_conditional_internal_fn): Declare.
9970 (get_unconditional_internal_fn): Likewise.
9971 * internal-fn.c (cond_ternary_direct): New macro.
9972 (expand_cond_ternary_optab_fn): Likewise.
9973 (direct_cond_ternary_optab_supported_p): Likewise.
9974 (FOR_EACH_COND_FN_PAIR): Likewise.
9975 (get_conditional_internal_fn): New function.
9976 (get_unconditional_internal_fn): Likewise.
9977 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9978 (gimple_match_op::gimple_match_op): Add a new overload for 5
9980 (gimple_match_op::set_op): Likewise.
9981 (gimple_resimplify5): Declare.
9982 * genmatch.c (decision_tree::gen): Generate simplifications for
9984 * gimple-match-head.c (gimple_simplify): Define an overload for
9985 5 operands. Handle calls with 5 arguments in the top-level overload.
9986 (convert_conditional_op): Handle conversions from unconditional
9987 internal functions to conditional ones.
9988 (gimple_resimplify5): New function.
9989 (build_call_internal): Pass a fifth operand.
9990 (maybe_push_res_to_seq): Likewise.
9991 (try_conditional_simplification): Try converting conditional
9992 internal functions to unconditional internal functions.
9993 Handle 3-operand unconditional forms.
9994 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9995 Define ternary equivalents of the current rules for binary conditional
9997 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9999 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10000 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10001 (optab): Handle them.
10002 (SVE_COND_FP_TERNARY): New int iterator.
10003 (sve_fmla_op, sve_fmad_op): New int attributes.
10004 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10005 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10006 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10008 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10010 * target.def (preferred_else_value): New target hook.
10011 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10012 * doc/tm.texi: Regenerate.
10013 * targhooks.h (default_preferred_else_value): Declare.
10014 * targhooks.c (default_preferred_else_value): New function.
10015 * internal-fn.h (conditional_internal_fn_code): Declare.
10016 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10017 (get_conditional_internal_fn): Use it.
10018 (conditional_internal_fn_code): New function.
10019 * gimple-match.h (gimple_match_cond): New struct.
10020 (gimple_match_op): Add a cond member function.
10021 (gimple_match_op::gimple_match_op): Update all forms to take a
10023 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10024 for the suboperation, but don't specify a particular else_value.
10025 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10026 (visit_nary_op, visit_reference_op_load): Pass
10027 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10028 * gimple-match-head.c: Include tree-eh.h
10029 (convert_conditional_op): New function.
10030 (maybe_resimplify_conditional_op): Likewise.
10031 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10032 (gimple_resimplify2): Likewise.
10033 (gimple_resimplify3): Likewise.
10034 (gimple_resimplify4): Likewise.
10035 (maybe_push_res_to_seq): Return null for conditional operations.
10036 (try_conditional_simplification): New function.
10037 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10039 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10041 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10043 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10045 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10047 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10049 (hash_tree): Do not hash DECL_FCONTEXT
10050 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10051 Do not stream DECL_FCONTEXT.
10052 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10053 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10055 2018-07-12 Richard Biener <rguenther@suse.de>
10058 * dwarf2out.c (gen_block_die): Only output blocks when they have
10059 at least one !DECL_IGNORED_P variable.
10061 2018-07-12 Richard Biener <rguenther@suse.de>
10064 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10065 Remove -mieee-fp handling.
10067 2018-07-12 Richard Biener <rguenther@suse.de>
10069 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10070 left-over from last patch.
10072 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10074 PR tree-optimization/86492
10075 * gimple-ssa-store-merging.c
10076 (imm_store_chain_info::coalesce_immediate_stores): Call
10077 check_no_overlap even for the merge_overlapping case. Formatting fix.
10079 2018-07-12 Richard Biener <rguenther@suse.de>
10081 PR middle-end/86479
10082 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10083 move possibly trapping operations into the conditional.
10085 2018-07-12 Richard Biener <rguenther@suse.de>
10087 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10088 (vn_lookup_simplify_result): Remove recursion limit applied
10090 (vn_nary_build_or_lookup_1): Adjust.
10091 (try_to_simplify): Likewise.
10092 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10094 (gimple_resimplify2): Likewise.
10095 (gimple_resimplify3): Likewise.
10096 (gimple_resimplify4): Likewise.
10098 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10100 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10101 Use __mmask64 type instead of __mmask8 for __M argument.
10102 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10103 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10105 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10106 __mmask16 for __M argument.
10107 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10108 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10109 to __mmask16 instead of __mmask8.
10110 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10111 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10112 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10113 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10114 instead of __mmask16 for __U argument.
10115 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10116 __mmask16 instead of __mmask8 for __U argument.
10117 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10119 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10121 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10123 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10125 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10127 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10129 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10131 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10133 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10135 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10137 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10138 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10139 return type as well as __M argument type and all casts from __mmask8
10141 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10142 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10143 return type as well as __M argument type and all casts from __mmask8
10145 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10146 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10147 return type as well as __M argument type and all casts from __mmask8
10149 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10150 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10151 return type as well as __M argument type and all casts from __mmask8
10153 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10154 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10157 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10159 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10160 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10163 2018-07-11 Paul Koning <ni1d@arrl.net>
10165 * doc/md.texi (define_subst): Document how multiple occurrences of
10166 the same argument in the replacement pattern are handled.
10168 2018-07-11 Paul Koning <ni1d@arrl.net>
10170 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10171 alphabetical order.
10172 (Common Type Attributes): Add "mode" attribute.
10174 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10176 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10177 stream DECL_ORIGINAL_TYPE.
10178 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10179 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10180 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10181 Do not walk original type.
10182 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10184 (write_ts_decl_non_common_tree_pointers): Do not stream
10186 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10187 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10189 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10191 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10192 thread twice from the same starting edge.
10194 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10196 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10197 * gimple.c (gimple_call_nonnull_result_p): ...here...
10198 (gimple_call_nonnull_arg): ...and here.
10199 * gimple.h (gimple_call_nonnull_result_p): New.
10200 (gimple_call_nonnull_arg): New.
10202 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10204 * config/arm/arm-cpus.in: Move information from fpu field of each
10205 cpu definition to the isa field.
10206 * config/arm/parsecpu.awk (fpu): Delete match rule.
10207 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10209 2018-07-11 Richard Biener <rguenther@suse.de>
10212 * dwarf2out.c (init_sections_and_labels): Use
10213 output_asm_line_debug_info consistently.
10214 (dwarf2out_early_finish): Likewise.
10215 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10218 2018-07-11 Richard Biener <rguenther@suse.de>
10220 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10221 Rework father_bb setting in a way to avoid propagating constants
10222 multiple times on a loop body.
10224 2018-07-10 Mark Wielaard <mark@klomp.org>
10227 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10229 2018-07-10 Richard Biener <rguenther@suse.de>
10231 * hash-map.h (hash_map::iterator::operator*): Return
10232 references to key and value.
10234 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10237 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10238 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10239 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10240 (gimplify_omp_for): For composite loops, move outer
10241 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10242 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10243 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10244 TREE_LIST for both the original class iterator and the "last" helper
10245 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10246 loop, remember has_decl_expr from outer composite loops for the
10247 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10249 2018-07-09 Martin Sebor <msebor@redhat.com>
10251 PR middle-end/77357
10252 PR middle-end/86428
10253 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10254 accessing implicitly initialized array elements.
10255 * expr.c (string_constant): Handle string initializers of
10256 character arrays within aggregates.
10257 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10258 Store element offset. As a special case, handle zero size.
10259 (fold_nonarray_ctor_reference): Same.
10260 (fold_ctor_reference): Add argument. Store subobject offset.
10261 * gimple-fold.h (fold_ctor_reference): Add argument.
10263 2018-07-09 Paul Koning <ni1d@arrl.net>
10265 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10266 (pdp11_insn_cost): New function.
10267 (pdp11_md_asm_adjust): New function.
10268 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10269 (pdp11_rtx_costs): Update to match machine better.
10270 (output_addr_const_pdp11): Correct format mismatch warnings.
10271 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10272 * config/pdp11/pdp11.md: General change to add base_cost and/or
10273 length attributes for use by new pdp11_insn_cost function.
10274 (MIN_BRANCH): Correct definition.
10276 (doloop_end): Use standard pattern name for looping pattern.
10277 (doloop_end_nocc): New.
10278 (movsf): Add another constraint alternative.
10279 (zero_extendqihi2): Add constraint alternatives for not in place
10281 (zero_extendhisi2): Remove.
10282 (shift patterns): Add CC handling variants.
10286 (define_peephole2): New peephole to recognize mov that sets CC for
10289 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10291 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10292 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10295 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10298 * real.c (real_nextafter): Return true if result is denormal.
10300 2018-07-09 Martin Liska <mliska@suse.cz>
10302 * common.opt: Add back wrongly removed attribute.
10304 2018-07-09 Richard Biener <rguenther@suse.de>
10307 * dwarf2out.c (gen_block_die): For an early generated DIE
10308 always output high/low PC attributes.
10310 2018-07-09 Tom de Vries <tdevries@suse.de>
10312 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10313 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10314 onto VAR_DECL with abstract origin.
10316 2018-07-07 Jim Wilson <jimw@sifive.com>
10318 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10320 2018-07-07 Tom de Vries <tdevries@suse.de>
10322 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10324 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10326 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10328 (combine_bound): Use wide-int overflow calculation instead of
10330 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10332 * fold-const.c (int_const_binop_2): Same.
10333 (extract_muldiv_1): Same.
10334 (fold_div_compare): Same.
10335 (fold_abs_const): Same.
10337 * poly-int.h (add): Same.
10341 * predict.c (predict_iv_comparison): Same.
10342 * profile-count.c (slow_safe_scale_64bit): Same.
10343 * simplify-rtx.c (simplify_const_binary_operation): Same.
10344 * tree-chrec.c (tree_fold_binomial): Same.
10345 * tree-data-ref.c (split_constant_offset_1): Same.
10346 * tree-if-conv.c (idx_within_array_bound): Same.
10347 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10348 * tree-ssa-phiopt.c (minmax_replacement): Same.
10349 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10350 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10351 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10352 * wide-int.cc (wi::add_large): Same.
10353 (wi::mul_internal): Same.
10354 (wi::sub_large): Same.
10355 (wi::divmod_internal): Same.
10356 * wide-int.h: Change overflow type to overflow_type for neg, add,
10357 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10358 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10359 mul_internal, divmod_internal.
10360 (overflow_type): New enum.
10361 (accumulate_overflow): New.
10363 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10365 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10366 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10368 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10370 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10371 argument is checked for zero before entering loop, avoid checking again.
10373 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10375 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10376 * gimplify.h (generic_expr_could_trap_p): Likwise.
10377 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10379 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10381 PR tree-optimization/86401
10382 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10383 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10384 (fold_bit_and_mask): ... here. New helper function for match.pd.
10385 * fold-const.h (fold_bit_and_mask): Declare.
10386 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10388 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10391 * target.def (translate_mode_attribute): New hook.
10392 * targhooks.h (default_translate_mode_attribute): Declare.
10393 * targhooks.c (default_translate_mode_attribute): New function.
10394 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10395 * doc/tm.texi: Regenerate.
10396 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10397 (rs6000_translate_mode_attribute): New function.
10399 2018-07-06 Paul Koning <ni1d@arrl.net>
10401 * doc/md.texi (define_split): Document DONE and FAIL.
10402 (define_peephole2): Ditto.
10404 2018-07-05 Jeff Law <law@redhat.com>
10406 PR tree-optimization/86010
10407 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10408 both the head and tail of mem* and str* calls.
10410 2018-07-05 Jim Wilson <jimw@sifive.com>
10412 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10414 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10416 * config/aarch64/aarch64-simd.md: correct flags text for
10417 MIN_EXPR replacement.
10419 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10421 * configure: Regenerated.
10423 2018-07-05 Carl Love <cel@us.ibm.com>
10425 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10426 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10427 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10428 VSX_BUILTIN_DOUBLEL_V4SF.
10430 2018-07-05 Martin Sebor <msebor@redhat.com>
10433 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10434 than its domain to compute its the upper bound of a char array.
10436 2018-07-05 Nathan Sidwell <nathan@acm.org>
10438 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10439 * doc/cpp.texi: Update comment.
10440 * doc/tm.texi: Rebuilt.
10441 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10442 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10443 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10444 headers affected by extern "C".
10445 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10446 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10447 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10448 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10449 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10450 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10451 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10452 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10453 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10454 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10455 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10456 config/sparc/sp64-elf.h, config/spu/spu.h,
10457 config/stormy16/stormy16.h, config/v850/v850.h,
10458 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10459 define NO_IMPLICIT_EXTERN_C.
10460 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10462 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10465 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10466 instead of GET_MODE_SIZE when comparing Units.
10468 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10471 * rtlanal.c (set_noop_p): Constrain on mode change,
10472 include hard-reg-set.h
10474 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10476 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10478 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10481 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10484 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10486 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10488 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10491 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10493 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10495 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10497 PR middle-end/86380
10498 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10500 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10502 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10503 neg_*_op* variables.
10505 2018-07-04 Martin Liska <mliska@suse.cz>
10507 * tree-switch-conversion.c: Define
10508 max_ratio_for_speed and max_ratio_for_size constants.
10510 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10511 Martin Liska <mliska@suse.cz>
10513 PR middle-end/66240
10516 * common.opt: Rename align options with 'str_' prefix.
10517 * common/config/i386/i386-common.c (set_malign_value): New
10519 (ix86_handle_option): Use it to set -falign-* options/
10520 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10521 type from int to string.
10522 * config/aarch64/aarch64.c: Update default values from int
10524 * config/alpha/alpha.c (alpha_override_options_after_change):
10526 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10527 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10528 max skip conditionally.
10529 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10530 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10531 max skip conditionally.
10532 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10533 max skip conditionally.
10534 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10535 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10536 max skip conditionally.
10537 * config/i386/i386.c (struct ptt): Change type from int to
10539 (ix86_default_align): Set default values.
10540 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10541 max skip conditionally.
10542 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10543 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10544 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10545 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10546 max skip conditionally.
10547 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10548 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10549 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10550 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10551 max skip conditionally.
10552 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10553 * config/ia64/ia64.c (ia64_option_override): Set default values
10554 for alignment options.
10555 * config/m68k/m68k.c: Handle new str_align_* options.
10556 * config/mips/mips.c (mips_set_compression_mode): Change
10558 (mips_option_override): Set default values for options.
10559 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10561 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10563 * config/rx/rx.c (rx_option_override): Likewise.
10564 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10565 (LABEL_ALIGN): Use align_labels_log.
10566 (LOOP_ALIGN): Use align_loops_align.
10567 * config/s390/s390.c (s390_asm_output_function_label): Use new
10569 * config/sh/sh.c (sh_override_options_after_change):
10570 Change type of constants.
10571 * config/spu/spu.c (spu_sched_init): Likewise.
10572 * config/sparc/sparc.c (sparc_option_override): Set default
10573 values for options.
10574 * config/visium/visium.c (visium_option_override): Likewise.
10575 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10576 emit p2align format with last argument if it's not needed.
10577 * doc/invoke.texi: Document extended format of -falign-*.
10578 * final.c: Use align_labels alignment.
10579 * flags.h (struct target_flag_state): Change type to use
10581 (struct align_flags_tuple): New.
10582 (struct align_flags): Likewise.
10583 (align_loops_log): Redefine macro to use new types.
10584 (align_loops_max_skip): Redefine macro to use new types.
10585 (align_jumps_log): Redefine macro to use new types.
10586 (align_jumps_max_skip): Redefine macro to use new types.
10587 (align_labels_log): Redefine macro to use new types.
10588 (align_labels_max_skip): Redefine macro to use new types.
10589 (align_functions_log): Redefine macro to use new types.
10590 (align_loops): Redefine macro to use new types.
10591 (align_jumps): Redefine macro to use new types.
10592 (align_labels): Redefine macro to use new types.
10593 (align_functions): Redefine macro to use new types.
10594 (align_functions_max_skip): Redefine macro to use new types.
10595 (align_loops_value): New macro.
10596 (align_jumps_value): New macro.
10597 (align_labels_value): New macro.
10598 (align_functions_value): New macro.
10599 * function.c (invoke_set_current_function_hook): Propagate
10600 alignment values from flags to global variables default in
10602 * ipa-icf.c (sem_function::equals_wpa): Use
10603 cl_optimization_option_eq instead of memcmp.
10604 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10606 (cl_optimization_stream_in): Likewise.
10607 * optc-save-gen.awk: Support strings in cl_optimization.
10608 * opth-gen.awk: Likewise.
10609 * opts.c (finish_options): Remove error checking of invalid
10611 (MAX_CODE_ALIGN): Remove.
10612 (MAX_CODE_ALIGN_VALUE): Likewise.
10613 (parse_and_check_align_values): New function.
10614 (check_alignment_argument): Likewise.
10615 (common_handle_option): Use check_alignment_argument.
10616 * opts.h (parse_and_check_align_values): Declare.
10617 * toplev.c (init_alignments): Remove.
10618 (read_log_maxskip): New.
10619 (parse_N_M): Likewise.
10620 (parse_alignment_opts): Likewise.
10621 (backend_init_target): Remove usage of init_alignments.
10622 * toplev.h (parse_alignment_opts): Declare.
10623 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10625 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10626 * tree.c (cl_option_hasher::equal): New.
10627 * varasm.c: Use new global macros.
10629 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10631 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10632 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10633 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10634 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10635 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10636 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10637 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10638 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10639 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10640 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10641 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10642 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10643 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10645 2018-07-04 Martin Liska <mliska@suse.cz>
10646 Jonathan Wakely <jwakely@redhat.com>
10648 * coverage.c: Use correct type.
10649 * doc/invoke.texi: Language correction.
10651 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10654 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10655 ENDBRANCH for non-tail call which may return via indirect branch.
10656 * doc/extend.texi: Document indirect_return attribute.
10658 2018-07-03 Martin Sebor <msebor@redhat.com>
10660 PR tree-optimization/86274
10661 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10663 (format_floating): Correct handling of infinities and NaNs.
10665 2018-07-03 Martin Sebor <msebor@redhat.com>
10667 * print-tree.c (print_real_cst): New function.
10668 (print_node_brief): Call it.
10669 (print_node): Ditto.
10671 2018-07-03 Jeff Law <law@redhat.com>
10673 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10674 into a single pattern.
10676 * config/h8300/h8300.md (ors code_iterator): New.
10677 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10678 a single pattern and single splitter.
10679 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10680 (iorqi3_1, xorqi3_1): Likewise.
10681 (iorqi3, xorqi3 expanders): Similarly.
10683 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10684 (movmd_internal) into a single pattern using the P mode iterator.
10685 (movmd splitters): Similarly.
10686 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10687 (movsd splitters): Similarly.
10689 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10690 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10691 right table based on the size of the operand.
10692 * config/h8300/h8300.md (length_table): Corresponding changes. All
10693 references to "addb", "addw" and "addl" changed to "add".
10694 (btst patterns): Merge two variants into a single pattern.
10695 (tstqi, tsthi): Likewise.
10696 (addhi3_incdec, addsi3_incdec): Likewise.
10697 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10698 (mulhi3, mulsi3): Likewise.
10699 (udivhi3, udivsi3): Likewise.
10700 (divhi3, divsi3): Likewise.
10701 (andorqi3, andorhi3, andorsi3): Likewise.
10703 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10706 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10707 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10709 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10711 PR tree-optimization/85694
10712 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10713 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10715 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10716 (<u>avg<mode>3_ceil): New patterns.
10718 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10720 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10721 scan-tree-dump directive.
10722 * gcc.dg/vect/slp-perm-2.c: Likewise.
10723 * gcc.dg/vect/slp-perm-3.c: Likewise.
10724 * gcc.dg/vect/slp-perm-5.c: Likewise.
10725 * gcc.dg/vect/slp-perm-6.c: Likewise.
10726 * gcc.dg/vect/slp-perm-7.c: Likewise.
10727 * gcc.dg/vect/slp-perm-8.c: Likewise.
10729 2018-07-03 Marek Polacek <polacek@redhat.com>
10731 PR middle-end/86202
10732 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10734 2018-07-03 Richard Biener <rguenther@suse.de>
10737 * tree-ssa-structalias.c (find_func_clobbers): Properly
10738 handle indirect calls.
10740 2018-07-03 Jeff Law <law@redhat.com>
10742 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10743 (shifts): New code iterator.
10744 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10745 expander. Fix HImode handling on H8/SX.
10746 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10747 (subqi3, subhi3, subsi3 expanders): Likewise.
10748 (andqi3, andhi3, andsi3 expanders): Likewise.
10749 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10750 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10751 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10752 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10753 (zero_extendqihi2, zero_extendqisi2): Likewise.
10754 (extendqihi2, extendqisi2): Likewise.
10755 (rotlqi3, rotlhi3, rotlsi3): Likewise.
10756 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10757 (rotlqi3_1, rotlhi3_1): Likewise.
10758 (logicalhi3_sn, logicalsi3_sn): Likewise.
10759 (logicalhi3, logicalsi3): Likewise.
10761 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10763 * tree-vect-patterns.c (vect_recog_rotate_pattern)
10764 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10765 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10766 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10767 type to append_pattern_def_seq instead of creating a stmt_vec_info
10769 (build_mask_conversion): Likewise. Remove vinfo argument.
10770 (vect_add_conversion_to_patterm): Likewise, renaming to...
10771 (vect_add_conversion_to_pattern): ...this.
10772 (vect_recog_mask_conversion_pattern): Update call to
10773 build_mask_conversion. Pass the vector type to
10774 append_pattern_def_seq here too.
10775 (vect_recog_gather_scatter_pattern): Update call to
10776 vect_add_conversion_to_pattern.
10778 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10780 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10781 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10782 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10783 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10784 STMT_VINFO_PATTERN_DEF_SEQ to null here.
10785 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10786 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10787 append_pattern_def_seq instead of new_pattern_def_seq.
10788 (vect_recog_divmod_pattern): Do both of the above.
10789 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10792 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10794 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10795 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10796 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10797 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10798 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10799 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10800 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10801 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10802 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10803 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10804 parameter with a single stmt_vec_info.
10805 (vect_recog_func_ptr): Likewise.
10806 (vect_recog_gather_scatter_pattern): Likewise, folding in...
10807 (vect_try_gather_scatter_pattern): ...this.
10808 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10809 the stmt_vec_info of the statement to be matched. Don't clear
10810 STMT_VINFO_RELATED_STMT.
10811 (vect_pattern_recog): Update call accordingly.
10813 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10815 PR tree-optimization/85694
10816 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10817 (uavgM3_ceil): Document new optabs.
10818 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10819 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10821 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10822 (savg_ceil_optab): New optabs.
10823 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10824 (vect_vect_recog_func_ptrs): Add it.
10825 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10826 constant directly from the associated lhs.
10828 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10830 * tree-vect-patterns.c (vect_split_statement): New function.
10831 (vect_convert_input): Use it to try to split an existing cast.
10833 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10835 * poly-int.h (print_hex): New function.
10836 * dumpfile.h (dump_dec, dump_hex): Declare.
10837 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10838 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10839 min_input_precision, operation_precision and operation_sign.
10840 * tree-vect-patterns.c (vect_get_range_info): New function.
10841 (vect_same_loop_or_bb_p, vect_single_imm_use)
10842 (vect_operation_fits_smaller_type): Delete.
10843 (vect_look_through_possible_promotion): Add an optional
10844 single_use_p parameter.
10845 (vect_recog_over_widening_pattern): Rewrite to use new
10846 stmt_vec_info infomration. Handle one operation at a time.
10847 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10848 (vect_truncatable_operation_p, vect_set_operation_type)
10849 (vect_set_min_input_precision): New functions.
10850 (vect_determine_min_output_precision_1): Likewise.
10851 (vect_determine_min_output_precision): Likewise.
10852 (vect_determine_precisions_from_range): Likewise.
10853 (vect_determine_precisions_from_users): Likewise.
10854 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10855 (vect_vect_recog_func_ptrs): Put over_widening first.
10857 (vect_pattern_recog): Call vect_determine_precisions.
10859 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10861 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10862 statements that have been replaced by further pattern statements.
10863 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10865 2018-07-03 Richard Biener <rguenther@suse.de>
10867 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10868 always set *dt. Dump vectype in vectype overload.
10869 * dumpfile.h (dump_gimple_expr): New function.
10870 (dump_gimple_expr_loc): Likewise.
10871 * dumpfile.c (dump_gimple_expr): New function.
10872 (dump_gimple_expr_loc): Likewise.
10874 2018-07-02 Jeff Law <law@redhat.com>
10876 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10877 the H8/300, H8/300H and H8/S variants into a single pattern.
10878 (movhi_h8300, movqi_h8300hs): Similarly.
10879 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10880 (QHI mode iterator): New.
10882 * config/h8300/h8300.md: Remove trailing whitespace.
10884 2018-07-02 Jim Wilson <jimw@sifive.com>
10886 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10887 instead of emit_insn for interrupt returns.
10888 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10889 (riscv_sret, riscv_uret): Likewise.
10891 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10893 * pretty-print.c (selftest::test_pp_format): Move save and restore
10894 of quotes to class auto_fix_quotes, and add an instance.
10895 * selftest.c: Include "intl.h".
10896 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10897 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10898 * selftest.h (selftest::auto_fix_quotes): New class.
10900 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
10902 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10903 (aarch64_sve_prepare_conditional_op): Remove.
10904 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10905 Allow aarch64_simd_reg_or_zero as select operand; remove
10906 the aarch64_sve_prepare_conditional_op call.
10907 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10908 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10909 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10910 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10911 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10912 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10913 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10914 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10915 and a splitters to match all of the *_any patterns.
10916 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10918 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10919 (SVE_COND_FP_BINARY_REV): Remove.
10920 (sve_int_op_rev, sve_fp_op_rev): New.
10921 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10922 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10923 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10924 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10925 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10926 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10927 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10928 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10929 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10931 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10932 Remove match_dup 1 from the inner unspec.
10933 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10935 * config/aarch64/aarch64.md (movprfx): New attr.
10936 (length): Default movprfx to 8.
10937 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10938 (*madd<SVE_I>, *msub<SVE_I): Likewise.
10939 (*<su>mul<SVE_I>3_highpart): Likewise.
10940 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10941 (*v<ASHIFT><SVE_I>3): Likewise.
10942 (*<su><MAXMIN><SVE_I>3): Likewise.
10943 (*<su><MAXMIN><SVE_F>3): Likewise.
10944 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10945 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10946 (*div<SVE_F>4): Likewise.
10948 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
10950 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10953 2018-07-02 Richard Biener <rguenther@suse.de>
10955 PR tree-optimization/86363
10956 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10957 memset argument refers to a non-variable address.
10959 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
10961 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10962 {PLUS,MINUS}_EXPR code to...
10963 (adjust_symbolic_bound): ...here,
10964 (combine_bound): ...here,
10965 (set_value_range_with_overflow): ...and here.
10967 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
10969 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10971 (extract_range_from_abs_expr): ...here.
10973 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
10975 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10976 -fno-omit-frame-pointer when not optimizing.
10978 2018-07-02 Martin Liska <mliska@suse.cz>
10981 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10982 (propagate_nothrow): Likewise.
10984 2018-07-02 Martin Liska <mliska@suse.cz>
10987 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10989 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10991 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10992 function in r262149, changing "loc" param from source_location to
10993 const dump_location_t &.
10994 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10995 declaration, as above.
10997 2018-07-01 Paul Koning <ni1d@arrl.net>
10999 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11000 -munit-asm, -mgnu-asm, -mdec-asm.
11001 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11002 (pdp11_output_labelref): New.
11003 (pdp11_output_def): New.
11004 (pdp11_output_addr_vec_elt): New.
11005 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11006 %# and %@ format codes.
11007 (pdp11_option_override): New.
11008 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11009 (pdp11_output_ident): New.
11010 (pdp11_asm_named_section): New.
11011 (pdp11_asm_init_sections): New.
11012 (pdp11_file_start): New.
11013 (pdp11_file_end): New.
11014 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11015 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11016 %o, like %c but octal.
11017 (pdp11_option_override): New.
11018 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11020 (DATA_SECTION_ASM_OP): Ditto.
11021 (READONLY_DATA_SECTION_ASM_OP): New.
11022 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11023 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11024 (ASM_OUTPUT_LABELREF): Ditto.
11025 (ASM_OUTPUT_DEF): Ditto.
11026 (ASM_OUTPUT_EXTERNAL): New.
11027 (ASM_OUTPUT_SOURCE_FILENAME): New.
11028 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11029 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11030 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11031 %# and %@ format codes.
11032 * config/pdp11/pdp11.opt (mgnu-asm): New.
11033 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11034 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11035 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11037 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11039 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11040 dereferencing path[] beyond its length.
11042 (debug_all_paths): New.
11043 (rewire_first_differing_edge): New.
11044 (adjust_paths_after_duplication): New.
11045 (duplicate_thread_path): Call adjust_paths_after_duplication.
11047 (thread_through_all_blocks): Add new argument to
11048 duplicate_thread_path.
11050 2018-06-30 Jim Wilson <jimw@sifive.com>
11052 * config/riscv/predicates.md (p2m1_shift_operand): New.
11053 (high_mask_shift_operand): New.
11054 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11055 pattern using p2m1_shift_operand.
11056 (lshsi3_zero_extend_3+2): New combiner pattern using
11057 high_mask_shift_operand.
11059 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11061 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11063 (vect_recog_rotate_pattern): ...here.
11064 (vect_convert_input): Try to insert casts of invariants in the
11066 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11067 preheader to be empty.
11069 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11071 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11072 vector type. If given, install it in the new statement's
11073 STMT_VINFO_VECTYPE.
11074 (vect_element_precision): New function.
11075 (vect_unpromoted_value): New struct.
11076 (vect_unpromoted_value::vect_unpromoted_value): New function.
11077 (vect_unpromoted_value::set_op): Likewise.
11078 (vect_look_through_possible_promotion): Likewise.
11079 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11080 (vect_widened_op_tree, vect_convert_input): Likewise.
11081 (vect_convert_inputs, vect_convert_output): Likewise.
11082 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11083 to handle the optional cast of the multiplication result and
11084 vect_widened_op_tree to detect the widened multiplication itself.
11085 Do not require the input and output of promotion casts to have
11086 the same sign, but base the signedness of the operation on the
11087 input rather than the result. If the pattern includes two
11088 promotions, check that those promotions have the same sign.
11089 Do not restrict the MULT_EXPR handling to a double-width result;
11090 handle quadruple-width results and wider. Use vect_convert_inputs
11091 to convert the inputs to the common type.
11092 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11093 to handle the optional cast of the ABS result. Also allow a sign
11094 change or a sign extension between the ABS and MINUS.
11095 Use vect_widened_op_tree to detect the widened subtraction and use
11096 vect_convert_inputs to convert the inputs to the common type.
11097 (vect_handle_widen_op_by_const): Delete.
11098 (vect_recog_widen_op_pattern): New function.
11099 (vect_recog_widen_mult_pattern): Use it.
11100 (vect_recog_widen_shift_pattern): Likewise.
11101 (vect_recog_widen_sum_pattern): Use
11102 vect_look_through_possible_promotion to handle the promoted
11105 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11107 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11108 the containing gimple_seq *.
11109 * gimple-iterator.h (gsi_for_stmt): Declare it.
11110 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11111 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11112 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11113 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11114 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11116 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11118 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11119 statement being replaced is part of an existing pattern
11120 definition sequence, inserting the new pattern statements before
11122 (vect_pattern_recog_1): Don't return a bool. If the statement
11123 is already part of a pattern, instead apply pattern matching
11124 to the pattern definition statements. Don't clear the
11125 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11126 (vect_pattern_recog): Don't break after the first match;
11127 continue processing the pattern definition statements instead.
11128 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11130 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11132 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11133 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11134 (vect_recog_widen_sum_pattern): Use it.
11136 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11138 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11139 phi is not a pattern statement and has not been replaced by
11140 a pattern statement.
11141 * tree-vect-patterns.c (type_conversion_p): Don't check
11142 STMT_VINFO_IN_PATTERN_P.
11143 (vect_recog_vector_vector_shift_pattern): Likewise.
11144 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11145 the pattern statement rather than the original statement; check
11146 directly for a WIDEN_MULT_EXPR here.
11147 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11148 vect_is_simple_use to return the pattern statement rather
11149 than the original statement; use is_pattern_stmt_p to check
11150 for such a pattern statement.
11151 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11152 to return the pattern statement rather than the original statement;
11153 don't do the same transformation here.
11154 (vect_is_simple_use): If the defining statement has been replaced
11155 by a pattern statement, return the pattern statement instead.
11156 Remove the corresponding (local) transformation from the vectype
11159 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11161 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11162 end and default to null.
11163 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11164 (vectorizable_reduction): Update calls accordingly, dropping the
11165 gimple ** argument if the passed-back statement isn't needed.
11166 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11167 (vect_recog_rotate_pattern): Likewise.
11168 (vect_recog_mask_conversion_pattern): Likewise.
11169 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11170 (vect_mask_constant_operand_p): Likewise.
11171 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11172 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11173 (get_group_load_store_type, get_load_store_type): Likewise.
11174 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11175 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11176 (vectorizable_conversion, vectorizable_assignment): Likewise.
11177 (vectorizable_shift, vectorizable_operation): Likewise.
11178 (vectorizable_store, vect_is_simple_cond): Likewise.
11179 (vectorizable_condition, vectorizable_comparison): Likewise.
11180 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11181 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11182 and move it to the end. Cope with null def_stmt_outs.
11184 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11186 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11188 2018-06-29 Jeff Law <law@redhat.com>
11190 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11191 displacements for TARGET_V850E2V3 and newer.
11192 (TARGET_LRA_P): Remove. Defaults to LRA now.
11193 * config/v850/v850.md (sign23byte_load): Remove.
11194 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11195 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11197 2018-06-29 Martin Liska <mliska@suse.cz>
11200 * coverage.c (coverage_init): Mangle full path name.
11201 * doc/invoke.texi: Document the change.
11202 * gcov-io.c (mangle_path): New.
11203 * gcov-io.h (mangle_path): Likewise.
11204 * gcov.c (mangle_name): Use mangle_path for path mangling.
11206 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11208 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11209 if starting source register is not even.
11211 2018-06-29 Martin Liska <mliska@suse.cz>
11213 PR tree-optimization/86263
11214 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11215 Make edge redirection.
11217 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11219 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11220 (dump_scope_depth): New variable.
11221 (get_dump_scope_depth): New function.
11222 (dump_begin_scope): New function.
11223 (dump_end_scope): New function.
11224 * dumpfile.h (get_dump_scope_depth): New declaration.
11225 (dump_begin_scope): New declaration.
11226 (dump_end_scope): New declaration.
11227 (class auto_dump_scope): New class.
11228 (AUTO_DUMP_SCOPE): New macro.
11229 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11232 2018-06-29 Richard Biener <rguenther@suse.de>
11234 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11235 compute_all_dependences succeeds.
11236 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11237 exceed --param loop-max-datarefs-for-datadeps.
11239 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11241 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11243 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11246 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11247 alternative 0 in preferred_for_speed attribute.
11249 2018-06-28 Paul Koning <ni1d@arrl.net>
11251 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11252 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11253 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11254 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11255 for shift insn patterns.
11257 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11259 * cgraph.c (cgraph_node::get_body): Replace assignments to
11260 "dump_file" with calls to set_dump_file.
11261 * dumpfile.c (alt_dump_file): Make static, and group with...
11262 (alt_flags): ...this definition.
11263 (dumps_are_enabled): New variable.
11264 (refresh_dumps_are_enabled): New function.
11265 (set_dump_file): New function.
11266 (set_alt_dump_file): New function.
11267 (gcc::dump_manager::dump_start): Replace assignments to
11268 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11270 (gcc::dump_manager::dump_finish): Likewise.
11271 * dumpfile.h (alt_dump_file): Delete decl.
11272 (dumps_are_enabled): New variable decl.
11273 (set_dump_file): New function decl.
11274 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11276 * tree-nested.c (lower_nested_functions): Replace assignments to
11277 "dump_file" with calls to set_dump_file.
11279 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11281 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11282 goto_locus of each outgoing edge of each basic block.
11284 2018-06-28 Richard Biener <rguenther@suse.de>
11286 * dwarf2out.c (decl_scope_table): Remove.
11287 (push_decl_scope): Likewise.
11288 (pop_decl_scope): Likewise.
11289 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11290 (gen_struct_or_union_type_die): Likewise.
11291 (gen_tagged_type_die): Likewise.
11292 (dwarf2out_init): Do not initialize decl_scope_table.
11293 (dwarf2out_c_finalize): Do not free it.
11295 2018-06-28 Richard Biener <rguenther@suse.de>
11297 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11298 deciding whether to not re-use a DIE.
11300 2018-06-28 Richard Biener <rguenther@suse.de>
11302 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11303 DW_AT_abstract_origin attribute.
11305 2018-06-28 Martin Liska <mliska@suse.cz>
11307 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11308 Use newly introduced constants.
11309 * tree-switch-conversion.h (struct jump_table_cluster):
11310 Define max_ratio_for_size and max_ratio_for_speed.
11312 2018-06-28 Martin Liska <mliska@suse.cz>
11314 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11315 Add new checking assert to catch invalid state.
11316 (jump_table_cluster::can_be_handled): Handle single case
11318 (jump_table_cluster::is_beneficial): Bail out for such case.
11319 (bit_test_cluster::find_bit_tests):
11320 Add new checking assert to catch invalid state.
11321 (bit_test_cluster::can_be_handled): Handle single case
11323 (bit_test_cluster::is_beneficial): Bail out for such case.
11324 (switch_decision_tree::analyze_switch_statement):
11327 2018-06-28 Martin Liska <mliska@suse.cz>
11329 * common.opt: Introduce -completion option.
11330 * gcc.c (driver_handle_option): Handle it.
11331 (driver::main): Print completions if completion
11333 * opt-suggestions.c (option_proposer::get_completions):
11335 (option_proposer::suggest_completion): Likewise.
11336 (option_proposer::find_param_completions): Likewise.
11337 (verify_autocompletions): Likewise.
11338 (test_completion_valid_options): Likewise.
11339 (test_completion_valid_params): Likewise.
11340 (in_completion_p): Likewise.
11341 (empty_completion_p): Likewise.
11342 (test_completion_partial_match): Likewise.
11343 (test_completion_garbage): Likewise.
11344 (opt_proposer_c_tests): Likewise.
11345 * opt-suggestions.h: Declare new functions.
11346 * opts.c (common_handle_option): Handle OPT__completion_.
11347 * selftest-run-tests.c (selftest::run_tests): Add
11348 opt_proposer_c_tests.
11349 * selftest.c (assert_str_startswith): New.
11350 * selftest.h (assert_str_startswith): Likewise.
11351 (opt_proposer_c_tests): New.
11352 (ASSERT_STR_STARTSWITH): Likewise.
11354 2018-06-28 Martin Liska <mliska@suse.cz>
11356 * Makefile.in: Add opt-suggestions.o.
11357 * gcc-main.c: Include opt-suggestions.h.
11358 * gcc.c (driver::driver): Likewise.
11359 (driver::~driver): Remove m_option_suggestions.
11360 (driver::build_option_suggestions): Moved to option_proposer.
11361 (driver::suggest_option): Likewise.
11362 (driver::handle_unrecognized_options): Use option_proposer.
11363 * gcc.h (class driver): Add new memver m_option_proposer.
11364 * opt-suggestions.c: New file.
11365 * opt-suggestions.h: New file.
11367 2018-06-28 Martin Liska <mliska@suse.cz>
11369 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11370 (auto_string_vec::~auto_string_vec): Likewise.
11372 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11374 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11375 prevent_decl_creation_for_types fields up and add reset_location field.
11376 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11377 statement if id->reset_location is true.
11378 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11379 id->reset_location is true.
11380 (copy_phis_for_bb): Force input_location on the arguments if
11381 id->reset_location is true.
11382 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11383 is set on the function to be inlined.
11385 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11387 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11389 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11391 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11392 registers for Pmode.
11393 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11394 hard registers for the clobbered pseudo.
11396 2018-06-27 Paul Koning <ni1d@arrl.net>
11398 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11399 mutually exclusive options.
11400 * config/pdp11/constraints.md (h): New constraint.
11401 (O): Update definition to match shift code generation.
11402 (D): New constraint.
11403 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11405 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11407 (output_jump): Change arguments.
11408 (pdp11_fixed_cc_regs): New function.
11409 (pdp11_cc_mode): Ditto.
11410 (pdp11_expand_shift): Ditto.
11411 (pdp11_assemble_shift): Ditto.
11412 (pdp11_small_shift): Ditto.
11413 (pdp11_branch_cost): Remove.
11414 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11416 (pdp11_register_move_cost): Update for CC registers.
11417 (pdp11_rtx_costs): Add case for LSHIFTRT.
11418 (pdp11_output_jump): Add CCNZ mode conditional branches.
11419 (notice_update_cc_on_set): Remove.
11420 (pdp11_cc_mode): New function.
11421 (simple_memory_operand): Correct pre/post decrement case.
11422 (no_side_effect_operand): New function.
11423 (pdp11_regno_reg_class): Add CC_REGS class.
11424 (pdp11_fixed_cc_regs): New function.
11425 (pdp11_small_shift): New function.
11426 (pdp11_expand_shift): New function to expand shift insns.
11427 (pdp11_assemble_shift): New function to output shifts.
11428 (pdp11_branch_cost): Remove.
11429 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11430 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11431 (WCHAR_TYPE): Ditto.
11432 (PTRDIFF_TYPE): Ditto.
11433 (ADJUST_INSN_LENGTH): New macro.
11434 (FIXED_REGISTERS): Add CC registers.
11435 (CALL_USED_REGISTERS): Ditto.
11436 (reg_class): Ditto.
11437 (REG_CLASS_NAMES): Ditto.
11438 (REG_CLASS_CONTENTS): Ditto.
11439 (SELECT_CC_MODE): Use new function.
11440 (TARGET_FLAGS_REGNUM): New macro.
11441 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11442 (cc0_reg_rtx): Remove.
11443 (CC_STATUS_MDEP): Remove.
11444 (CC_STATUS_MDEFP_INIT): Remove.
11445 (CC_IN_FPU): Remove.
11446 (NOTICE_UPDATE_CC): Remove.
11447 (REGISTER_NAMES): Add CC registers.
11448 (BRANCH_COST): Change to constant 1.
11449 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11451 * config/pdp11/pdp11.opt (mbcopy): Remove.
11452 (mbcopy-builtin): Remove.
11453 (mbranch-cheap): Remove.
11454 (mbranch-expensive): Remove.
11455 * config/pdp11/predicates.md (expand_shift_operand): Update to
11456 match shift code generation.
11457 (ccnz_operator): New predicate.
11458 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11459 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11460 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11462 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11463 description of O constraint.
11465 2018-06-27 Jeff Law <law@redhat.com>
11466 Austin Law <austinklaw@gmail.com>
11468 * config/v850/v850.md (addsi3_set_flags): New pattern.
11469 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11470 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11471 (zero_extendhisi2_v850_set_flags): Likewise.
11472 (zero_extendqisi2_v850_set_flags): Likewise.
11473 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11474 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11475 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11477 * config/v850/v850-protos.h (notice_update_cc): Remove.
11478 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11479 (v850_print_operand): Handle 'D' and "d".
11480 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11481 Add handling of arithmetic/logical operations compared against zero.
11482 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11483 Do not look at v850_compare_op, instead get mode from last argument.
11484 (v850_gen_compare): Remove
11485 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11486 after reload for prologue insns.
11487 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11489 (construct_save_jarl): Likewise.
11490 (TARGET_FLAGS_REGNUM): Define.
11491 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11492 (NOTICE_UPDATE_CC): Remove.
11493 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11494 than cc0. Conditionalize on reload_completed.
11495 (cmpsi_insn, setfcc_insn): Likewise.
11496 (tst1 splitter): Turn into define_and_split which sets the flags
11498 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11499 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11500 (cstoresf4, cstoredf4): Clobber the flags.
11501 (cmpsi, cmpsf, cmpdf): Remove expanders.
11502 (setf_insn): Remove pattern.
11503 (addsi3): Turn into define_and_split which clobbers the flags after
11504 reload and a suitable pattern (addsi3_clobber_flags) for use after
11506 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11507 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11508 (ashrsi3, ashrsi3_v850e2): Likewise.
11509 (bins): Clobber the flags.
11510 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11511 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11512 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11513 (call_value_internal_short, call_value_internal_long): Likewise.
11514 (callt_save_interrupt, callt_return_interrupt): Likewise.
11515 (save_interrupt, return_interrupt): Likewise.
11516 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11517 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11518 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11519 (All FP comparisons): Only allow after reload has completed.
11521 (divh, divhu): Tweak output template.
11522 (branch_z_normal, branch_z_invert): Remove
11523 (branch_nz_normal, branch_nz_invert): Likewise.
11524 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11526 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11527 * config/v850/v850.c (notice_update_cc): Remove.
11528 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11529 (CC_NO_CARRY): Likewise.
11530 (NOTICE_UPDATE_CC): Define to nothing.
11531 * config/v850/v850.md: Remove block comment on cc0 handling
11532 Remove "cc" attribute from all patterns. Remove cc_status handling
11533 from all patterns. Minor formatting fixes.
11535 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11537 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11538 (cortex-a76.cortex-a55): Likewise.
11539 * config/aarch64/aarch64-tune.md: Regenerate.
11540 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11541 cortex-a76.cortex-a55.
11543 2018-06-27 Jeff Law <law@redhat.com>
11545 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11546 (MULTILIB_DIRNAMES): Similarly.
11548 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11550 * gimple.h (gimple_return_retbnd): Delete.
11551 (gimple_return_set_retbnd): Likewise.
11552 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11553 gimple_return_set_retbnd.
11554 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11555 gimple_return_retbnd and adjust.
11556 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11557 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11558 Explicitly return NULL in a couple more cases. Move assertion
11559 on debug statements and remove unreachable code.
11560 (reset_debug_binding): Do not test id->retbnd.
11561 (expand_call_inline): Do not set it.
11563 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11565 * configure.ac: Add --disable-gcov option.
11566 * configure: Regenerate.
11567 * Makefile.in: Honour @enable_gcov@.
11568 * doc/install.texi: Document --disable-gcov.
11570 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11572 * config/arm/arm-cpus.in (cortex-a76): New entry.
11573 (cortex-a76.cortex-a55): Likewise.
11574 * config/arm/arm-tables.opt: Regenerate.
11575 * config/arm/arm-tune.md: Likewise.
11576 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11577 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11578 cortex-a76.cortex-a55.
11580 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11583 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11585 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11587 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11589 (EPILOGUE_USES): Likewise.
11591 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11593 * tree-inline.c (remap_location): New function extracted from...
11594 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11595 (copy_phis_for_bb): ...here. Call remap_location.
11596 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11598 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11600 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11601 unaligned vsx for 16B memset.
11603 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11606 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11607 ieee128_float_type_node to long_double_type_node unless
11608 TARGET_LONG_DOUBLE_128 is set.
11610 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11612 * cfgloop.c (get_loop_location): Convert return type from
11613 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11614 by implicit construction from rtx_insn *, and using
11615 dump_user_location_t::from_function_decl for the fallback case.
11616 * cfgloop.h (get_loop_location): Convert return type from
11617 location_t to dump_user_location_t.
11618 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11619 dump_printf_loc to pass in a dump_location_t rather than a
11620 location_t, via the gimple stmt.
11621 * coverage.c (get_coverage_counts): Update calls to
11622 dump_printf_loc to pass in dump_location_t rather than a
11624 * doc/optinfo.texi (Dump types): Convert example of
11625 dump_printf_loc from taking "locus" to taking "insn". Update
11626 description of the "_loc" calls to cover dump_location_t.
11627 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11629 (dump_user_location_t::dump_user_location_t): New constructors,
11630 from gimple *stmt and rtx_insn *.
11631 (dump_user_location_t::from_function_decl): New function.
11632 (dump_loc): Make static.
11633 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11634 const dump_location_t &.
11635 (dump_generic_expr_loc): Delete.
11636 (dump_printf_loc): Convert param "loc" from location_t to
11637 const dump_location_t &.
11638 (selftest::test_impl_location): New function.
11639 (selftest::dumpfile_c_tests): New function.
11640 * dumpfile.h: Include "profile-count.h".
11641 (class dump_user_location_t): New class.
11642 (struct dump_impl_location_t): New struct.
11643 (class dump_location_t): New class.
11644 (dump_printf_loc): Convert 2nd param from source_location to
11645 const dump_location_t &.
11646 (dump_generic_expr_loc): Delete.
11647 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11648 const dump_location_t &.
11649 * gimple-fold.c (fold_gimple_assign): Update call to
11650 dump_printf_loc to pass in a dump_location_t rather than a
11651 location_t, via the gimple stmt.
11652 (gimple_fold_call): Likewise.
11653 * gimple-loop-interchange.cc
11654 (loop_cand::analyze_iloop_reduction_var): Update for change to
11655 check_reduction_path.
11656 (tree_loop_interchange::interchange): Update for change to
11657 find_loop_location.
11658 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11659 change in return-type of find_loop_location.
11660 (graphite_regenerate_ast_isl): Likewise.
11661 * graphite-optimize-isl.c (optimize_isl): Likewise.
11662 * graphite.c (graphite_transform_loops): Likewise.
11663 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11664 pass in a dump_location_t rather than a location_t, via the
11666 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11667 * ipa.c (walk_polymorphic_call_targets): Likewise.
11668 * loop-unroll.c (report_unroll): Convert "locus" param from
11669 location_t to dump_location_t.
11670 (decide_unrolling): Update for change to get_loop_location's
11672 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11673 location_t to dump_user_location_t.
11674 (grid_find_single_omp_among_assignments_1): Updates calls to
11675 dump_printf_loc to pass in a dump_location_t rather than a
11676 location_t, via the gimple stmt.
11677 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11678 location_t to dump_location_t. Updates calls to dump_printf_loc
11679 to pass in a dump_location_t rather than a location_t, via the
11681 (grid_inner_loop_gridifiable_p): Likewise.
11682 (grid_dist_follows_simple_pattern): Likewise.
11683 (grid_gfor_follows_tiling_pattern): Likewise.
11684 (grid_target_follows_gridifiable_pattern): Likewise.
11685 (grid_attempt_target_gridification): Convert initialization
11686 of local "grid" from memset to zero-initialization; FIXME: does
11687 this require C++11? Update call to dump_printf_loc to pass in a
11688 optinfo_location rather than a location_t, via the gimple stmt.
11689 * profile.c (read_profile_edge_counts): Updates call to
11690 dump_printf_loc to pass in a dump_location_t rather than a
11692 (compute_branch_probabilities): Likewise.
11693 * selftest-run-tests.c (selftest::run_tests): Call
11695 * selftest.h (dumpfile_c_tests): New decl.
11696 * tree-loop-distribution.c (pass_loop_distribution::execute):
11697 Update for change in return type of find_loop_location.
11698 * tree-parloops.c (parallelize_loops): Likewise.
11699 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11700 "locus" from location_t to dump_user_location_t.
11701 (canonicalize_loop_induction_variables): Likewise.
11702 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11703 for change in return type of find_loop_location.
11704 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11705 to dump_printf_loc to pass in a dump_location_t rather than a
11706 location_t, via the stmt.
11707 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11709 * tree-vect-loop-manip.c (find_loop_location): Convert return
11710 type from source_location to dump_user_location_t.
11711 (vect_do_peeling): Update for above change.
11712 (vect_loop_versioning): Update for change in type of
11714 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11715 from location_t to dump_user_location_t.
11716 (vect_estimate_min_profitable_iters): Update for change in type
11718 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11719 location_t to dump_location_t.
11720 (vect_slp_bb): Update for change in type of vect_location.
11721 * tree-vectorizer.c (vect_location): Convert from source_location
11722 to dump_user_location_t.
11723 (try_vectorize_loop_1): Update for change in vect_location's type.
11724 (vectorize_loops): Likewise.
11725 (increase_alignment): Likewise.
11726 * tree-vectorizer.h (vect_location): Convert from source_location
11727 to dump_user_location_t.
11728 (find_loop_location): Convert return type from source_location to
11729 dump_user_location_t.
11730 (check_reduction_path): Convert 1st param from location_t to
11731 dump_user_location_t.
11732 * value-prof.c (check_counter): Update call to dump_printf_loc to
11733 pass in a dump_user_location_t rather than a location_t; update
11734 call to error_at for change in type of "locus".
11735 (check_ic_target): Update call to dump_printf_loc to
11736 pass in a dump_user_location_t rather than a location_t, via the
11739 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11741 * config/s390/s390.h (enum processor_flags): Do not use
11742 default tune parameter when -march was specified.
11744 2018-06-26 Jakub Jelinek <jakub@redhat.com>
11747 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11748 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11751 2018-06-26 Richard Biener <rguenther@suse.de>
11753 PR tree-optimization/86287
11755 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11756 (vect_analyze_loop): Initialize n_stmts.
11758 2018-06-26 Richard Biener <rguenther@suse.de>
11760 PR middle-end/86271
11761 * fold-const.c (fold_convertible_p): Pointer extension
11764 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
11767 * dwarf2out.c (loc_list_has_views): Adjust comments.
11768 (dw_loc_list): Split single cross-partition range with
11771 2018-06-25 Jeff Law <law@redhat.com>
11773 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11774 on -mbig-switch by default.
11776 * config/v850/predicates.md (const_float_1_operand): Fix match_code
11778 (const_float_0_operand): Remove unused predicate.
11779 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11780 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11781 (recipsf2): New expander. Original pattern now called
11783 (recipdf2, recipdf2_insn): Similarly.
11784 (rsqrtsf2, rsqrtsf2_insn): Similarly
11785 (rsqrtdf2, rsqrtdf2_insn): Similarly
11787 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
11789 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11790 Simplify logic for FreeBSD (twice).
11792 2018-06-25 Martin Sebor <msebor@redhat.com>
11794 PR tree-optimization/86204
11795 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11796 a strnlen result if it's less than the length of the string.
11798 2018-06-25 Martin Sebor <msebor@redhat.com>
11800 PR tree-optimization/85700
11801 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11802 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11803 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11805 2018-06-25 Martin Sebor <msebor@redhat.com>
11807 * doc/extend.texi (Zero-length arrays): Update and clarify.
11809 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
11811 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11812 added IEEE/IBM long double multilib support on PowerPC little
11813 endian Linux systems.
11814 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11815 (MULTILIB_DEFAULTS): Likewise.
11816 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11818 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11819 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11820 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11822 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
11824 PR middle-end/86311
11825 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11826 (REORDER_45): Likewise.
11828 2018-06-25 Jeff Law <law@redhat.com>
11830 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11831 dividend to 32 bits. Adjust length.
11832 (udivmodhi4): Cleanup output template. Fix length.
11834 2018-06-25 Carl Love <cel@us.ibm.com>
11836 * config/rs6000/vsx.md: Change word selector to prefered location.
11838 2018-06-25 Richard Biener <rguenther@suse.de>
11840 PR tree-optimization/86304
11841 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11842 epilogue-if-converted loops as well.
11844 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
11846 * lto-section-out.c (lto_begin_section): Do not print section
11847 name for noaddr and unnumbered dumps.
11849 2018-06-25 Richard Biener <rguenther@suse.de>
11851 * tree-vectorizer.h (struct vec_info_shared): New structure
11852 with parts split out from struct vec_info and loop_nest from
11853 struct _loop_vec_info.
11854 (struct vec_info): Adjust accordingly.
11855 (struct _loop_vec_info): Likewise.
11856 (LOOP_VINFO_LOOP_NEST): Adjust.
11857 (LOOP_VINFO_DATAREFS): Likewise.
11858 (LOOP_VINFO_DDRS): Likewise.
11859 (struct _bb_vec_info): Likewise.
11860 (BB_VINFO_DATAREFS): Likewise.
11861 (BB_VINFO_DDRS): Likewise.
11862 (struct _stmt_vec_info): Add dr_aux member.
11863 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11864 (DR_MISALIGNMENT_UNINITIALIZED): New.
11865 (set_dr_misalignment): Adjust.
11866 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11867 (vect_analyze_loop): Adjust prototype.
11868 (vect_analyze_loop_form): Likewise.
11869 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11870 Compute dependences lazily.
11871 (vect_record_base_alignments): Use shared datarefs/ddrs.
11872 (vect_verify_datarefs_alignment): Likewise.
11873 (vect_analyze_data_refs_alignment): Likewise.
11874 (vect_analyze_data_ref_accesses): Likewise.
11875 (vect_analyze_data_refs): Likewise.
11876 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11877 constructor parameter for shared part.
11878 (vect_analyze_loop_form): Pass in shared part and adjust.
11879 (vect_analyze_loop_2): Pass in storage for the number of
11880 stmts. Move loop nest finding to the caller. Compute
11882 (vect_analyze_loop): Pass in shared part.
11883 (vect_transform_loop): Verify shared datarefs are unchanged.
11884 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11885 constructor parameter for shared part.
11886 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11887 (vect_slp_bb): Verify shared datarefs are unchanged before
11889 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11891 (new_stmt_vec_info): Initialize DR_AUX misalignment to
11892 DR_MISALIGNMENT_UNINITIALIZED.
11893 * tree-vectorizer.c (vec_info::vec_info): Add constructor
11894 parameter for shared part.
11895 (vec_info::~vec_info): Adjust.
11896 (vec_info_shared::vec_info_shared): New.
11897 (vec_info_shared::~vec_info_shared): Likewise.
11898 (vec_info_shared::save_datarefs): Likewise.
11899 (vec_info_shared::check_datarefs): Likewise.
11900 (try_vectorize_loop_1): Construct shared part live for analyses
11901 of a single loop for multiple vector sizes.
11902 * tree-parloops.c (gather_scalar_reductions): Adjust.
11904 2018-06-25 Richard Biener <rguenther@suse.de>
11906 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11907 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11908 (vect_analyze_data_refs): Remove similar code from here and
11909 simplify accordingly.
11911 2018-06-25 Richard Biener <rguenther@suse.de>
11913 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11914 for reverse storage order accesses rather than asserting
11915 they cannot happen here.
11917 2018-06-25 Tom de Vries <tdevries@suse.de>
11920 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11921 Use data16 instead of .byte for insn prefix.
11923 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
11926 * parser.c (make_char_string_pack): Pass this literal chars
11927 through cpp_interpret_string.
11928 (cp_parser_userdef_numeric_literal): Check the result of
11929 make_char_string_pack.
11931 2018-06-24 Maya Rashish <coypu@sdf.org>
11933 * ginclude/stddef.h: Simplify conditions around avoiding
11934 re-definition of __size_t.
11936 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11938 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11939 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11941 2018-06-22 Maya Rashish <coypu@sdf.org>
11943 * doc/invoke.texi (mno-fancy-math-387): Update for changes
11944 made to OpenBSD and NetBSD through the years.
11946 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11948 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11949 behavior of vec_pack (vector double, vector double) to match
11950 behavior of vec_float2 (vector double, vector double).
11952 2018-06-22 Olivier Hainque <hainque@adacore.com>
11954 * gimplify.c (gimplify_function_tree): Prevent creation
11955 of a trampoline for the address of the current function
11956 passed to entry/exit instrumentation hooks.
11958 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
11961 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11964 2018-06-22 Martin Liska <mliska@suse.cz>
11966 PR tree-optimization/86263
11967 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11968 Bail out if is_enabled is false.
11969 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11971 (jump_table_cluster::is_enabled): New function.
11973 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11975 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11976 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11977 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11978 (lto_input_ts_binfo_tree_pointers): Likewise.
11979 * tree-streamer-out.c (streamer_write_tree_bitfields,
11980 write_ts_binfo_tree_pointers): Likewise.
11981 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11983 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11985 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11987 2018-06-22 Martin Liska <mliska@suse.cz>
11989 * symbol-summary.h (get): Make it pure and inline move
11990 functionality from ::get function.
11991 (get): Remove and inline into ::get and ::get_create.
11992 (get_create): Move code from ::get function.
11994 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11997 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11998 -x assembler-with-cpp.
12000 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12002 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12003 _FILE_OFFSET_BITS=64 for C++.
12005 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12007 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12008 conversion insn that shows up when pr85657-3.c is compiled using
12009 IEEE 128-bit long double.
12010 (neg<mode>2_internal): Use the correct mode to check whether the
12011 mode is IBM extended.
12012 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12013 multiply and divide external functions from being created more
12016 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12018 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12020 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12021 the edge can be forwarded.
12022 (cfg_layout_merge_blocks): Likewise.
12024 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12026 * except.c (finish_eh_generation): Commit edge insertions only after
12027 the EH edges have been redirected from post-landing to landing pads.
12029 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12031 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12032 create_tmp_var_for to create the FRAME decl.
12033 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12035 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12037 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12038 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12039 debug statement when resetting its value.
12040 (expand_call_inline): Copy the locus of the call onto the assignment
12041 of the return value, if any. Use local variable in more cases.
12043 2018-06-21 Martin Liska <mliska@suse.cz>
12045 * ipa-pure-const.c (propagate_nothrow): Use
12046 funct_state_summaries->get.
12047 (dump_malloc_lattice): Likewise.
12048 (propagate_malloc): Likewise.
12050 2018-06-21 Richard Biener <rguenther@suse.de>
12052 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12053 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12054 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12056 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12057 BLOCK_ABSTRACT_ORIGIN unconditionally.
12059 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12061 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12063 * ipa-reference.c (ipa_reference_c_finalize): Delete
12064 ipa_ref_opt_sum_summaries and set it to NULL.
12066 2018-06-21 Tom de Vries <tdevries@suse.de>
12068 PR tree-optimization/85859
12069 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12070 test with comment from bb_no_side_effects_p.
12072 2018-06-21 Richard Biener <rguenther@suse.de>
12074 PR tree-optimization/86232
12075 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12076 max for constant niter.
12078 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12080 * config/aarch64/aarch64-simd.md
12081 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12083 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12085 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12086 Make opernads of the unspec commutative.
12088 2018-06-21 Richard Biener <rguenther@suse.de>
12090 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12091 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12092 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12093 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12095 (vect_record_base_alignments): Do not record base alignment
12096 for gathers or scatters.
12097 (vect_compute_data_ref_alignment): Drop return value that is always
12098 true. Bail out early for gathers or scatters.
12099 (vect_enhance_data_refs_alignment): Bail out early for gathers
12101 (vect_find_same_alignment_drs): Likewise.
12102 (vect_analyze_data_refs_alignment): Remove dead code.
12103 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12104 (vect_analyze_data_refs): For possible gathers or scatters do
12105 not create an alternate DR, just check their possible validity
12106 and mark them. Adjust DECL_NONALIASED handling to not rely
12107 on DR_BASE_ADDRESS.
12108 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12109 update inits of gathers or scatters.
12110 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12111 Also copy gather/scatter flag to pattern vinfo.
12113 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12115 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12116 behavior of vec_packsu (vector unsigned long long, vector unsigned
12117 long long) to match behavior of vec_packs with same signature.
12119 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12120 Thomas Schwinge <thomas@codesourcery.com>
12121 Cesar Philippidis <cesar@codesourcery.com>
12123 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12124 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12125 (gimplify_adjust_omp_clauses): Likewise.
12126 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12127 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12128 (gimplify_omp_target_update): Update handling of acc update and
12130 * omp-low.c (install_var_field): Remove unused parameter
12131 base_pointers_restrict.
12132 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12133 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12135 (omp_target_base_pointers_restrict_p): Delete.
12136 (scan_omp_target): Update call to scan_sharing_clauses.
12137 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12139 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12140 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12141 (convert_local_omp_clauses): Likewise.
12142 * tree-pretty-print.c (dump_omp_clause): Likewise.
12143 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12145 (omp_clause_code_name): Likewise.
12147 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12150 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12153 PR tree-optimization/86231
12154 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12155 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12157 2018-06-20 Tom de Vries <tdevries@suse.de>
12159 PR tree-optimization/86097
12160 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12161 iv type if signedness of iv type is not the same as that of *nit.
12163 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12165 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12166 EDGE_EH edges, verify they are all EDGE_EH.
12168 2018-06-20 Maya Rashish <coypu@sdf.org>
12170 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12172 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12174 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12175 * config/aarch64/aarch64.c (xgene1_tunings): Add
12176 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12177 (aarch64_mode_valid_for_sched_fusion_p):
12178 Allow 16-byte modes.
12179 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12180 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12182 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12184 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12185 * config/aarch64/iterators.md (VQ2): New mode iterator.
12187 2018-06-20 Martin Liska <mliska@suse.cz>
12189 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12190 Change default ratio from 10 to 8.
12192 2018-06-20 Martin Liska <mliska@suse.cz>
12194 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12196 (bit_test_cluster::find_bit_tests): Likewise.
12197 (switch_decision_tree::analyze_switch_statement): Find clusters.
12198 * tree-switch-conversion.h (struct jump_table_cluster): Document
12201 2018-06-20 Martin Liska <mliska@suse.cz>
12203 * tree-switch-conversion.c (switch_conversion::collect):
12204 Record m_uniq property.
12205 (switch_conversion::expand): Bail out for special conditions.
12206 (group_cluster::~group_cluster): New.
12207 (group_cluster::group_cluster): Likewise.
12208 (group_cluster::dump): Likewise.
12209 (jump_table_cluster::emit): New.
12210 (switch_decision_tree::fix_phi_operands_for_edges): New.
12211 (struct case_node): Remove struct.
12212 (jump_table_cluster::can_be_handled): New.
12213 (case_values_threshold): Moved to header.
12214 (reset_out_edges_aux): Likewise.
12215 (jump_table_cluster::is_beneficial): New.
12216 (bit_test_cluster::can_be_handled): Likewise.
12217 (add_case_node): Remove.
12218 (bit_test_cluster::is_beneficial): New.
12219 (case_bit_test::cmp): New.
12220 (bit_test_cluster::emit): New.
12221 (expand_switch_as_decision_tree_p): Remove.
12222 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12223 (fix_phi_operands_for_edge): Likewise.
12224 (switch_decision_tree::analyze_switch_statement): New.
12225 (compute_cases_per_edge): Move ...
12226 (switch_decision_tree::compute_cases_per_edge): ... here.
12227 (try_switch_expansion): Likewise.
12228 (switch_decision_tree::try_switch_expansion): Likewise.
12229 (record_phi_operand_mapping): Likewise.
12230 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12231 (emit_case_decision_tree): Likewise.
12232 (switch_decision_tree::emit): Likewise.
12233 (balance_case_nodes): Likewise.
12234 (switch_decision_tree::balance_case_nodes): Likewise.
12235 (dump_case_nodes): Likewise.
12236 (switch_decision_tree::dump_case_nodes): Likewise.
12237 (emit_jump): Likewise.
12238 (switch_decision_tree::emit_jump): Likewise.
12239 (emit_cmp_and_jump_insns): Likewise.
12240 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12241 (emit_case_nodes): Likewise.
12242 (switch_decision_tree::emit_case_nodes): Likewise.
12243 (conditional_probability): Remove.
12244 * tree-switch-conversion.h (enum cluster_type): New.
12246 (struct cluster): Likewise.
12247 (cluster::cluster): Likewise.
12248 (struct simple_cluster): Likewise.
12249 (simple_cluster::simple_cluster): Likewise.
12250 (struct group_cluster): Likewise.
12251 (struct jump_table_cluster): Likewise.
12252 (struct bit_test_cluster): Likewise.
12253 (struct min_cluster_item): Likewise.
12254 (struct case_tree_node): Likewise.
12255 (case_tree_node::case_tree_node): Likewise.
12256 (jump_table_cluster::case_values_threshold): Likewise.
12257 (struct case_bit_test): Likewise.
12258 (struct switch_decision_tree): Likewise.
12259 (struct switch_conversion): Likewise.
12260 (switch_decision_tree::reset_out_edges_aux): Likewise.
12262 2018-06-20 Martin Liska <mliska@suse.cz>
12264 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12265 (hoist_edge_and_branch_if_true): Likewise.
12266 (expand_switch_using_bit_tests_p): Likewise.
12267 (struct case_bit_test): Likewise.
12268 (case_bit_test_cmp): Likewise.
12269 (emit_case_bit_tests): Likewise.
12270 (switch_conversion::switch_conversion): New class.
12271 (struct switch_conv_info): Remove old struct.
12272 (collect_switch_conv_info): More to ...
12273 (switch_conversion::collect): ... this.
12274 (check_range): Likewise.
12275 (switch_conversion::check_range): Likewise.
12276 (check_all_empty_except_final): Likewise.
12277 (switch_conversion::check_all_empty_except_final): Likewise.
12278 (check_final_bb): Likewise.
12279 (switch_conversion::check_final_bb): Likewise.
12280 (create_temp_arrays): Likewise.
12281 (switch_conversion::create_temp_arrays): Likewise.
12282 (free_temp_arrays): Likewise.
12283 (gather_default_values): Likewise.
12284 (switch_conversion::gather_default_values): Likewise.
12285 (build_constructors): Likewise.
12286 (switch_conversion::build_constructors): Likewise.
12287 (constructor_contains_same_values_p): Likewise.
12288 (switch_conversion::contains_same_values_p): Likewise.
12289 (array_value_type): Likewise.
12290 (switch_conversion::array_value_type): Likewise.
12291 (build_one_array): Likewise.
12292 (switch_conversion::build_one_array): Likewise.
12293 (build_arrays): Likewise.
12294 (switch_conversion::build_arrays): Likewise.
12295 (gen_def_assigns): Likewise.
12296 (switch_conversion::gen_def_assigns): Likewise.
12297 (prune_bbs): Likewise.
12298 (switch_conversion::prune_bbs): Likewise.
12299 (fix_phi_nodes): Likewise.
12300 (switch_conversion::fix_phi_nodes): Likewise.
12301 (gen_inbound_check): Likewise.
12302 (switch_conversion::gen_inbound_check): Likewise.
12303 (process_switch): Use the newly created class.
12304 (switch_conversion::expand): New.
12305 (switch_conversion::~switch_conversion): New.
12306 * tree-switch-conversion.h: New file.
12308 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12310 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12311 tree-vect-patterns.c.
12312 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12313 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12314 (vect_recog_sad_pattern): Likewise.
12315 (vect_recog_widen_sum_pattern): Likewise.
12316 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12317 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12318 (vect_recog_rotate_pattern): Likewise.
12319 (vect_recog_mult_pattern): Likewise.
12320 (vect_recog_vector_vector_shift_pattern): Likewise.
12321 (vect_recog_divmod_pattern): Likewise.
12322 (vect_recog_mixed_size_cond_pattern): Likewise.
12323 (vect_recog_bool_pattern): Likewise.
12324 (vect_recog_mask_conversion_pattern): Likewise.
12325 (vect_try_gather_scatter_pattern): Likewise.
12326 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12327 (vect_recog_over_widening_pattern): Likewise.
12328 (vect_recog_gather_scatter_pattern): Likewise.
12329 (vect_recog_func_ptr): Move from tree-vectorizer.h
12330 (vect_vect_recog_func_ptrs): Move further down the file.
12331 (vect_recog_func): Likewise. Remove the third argument.
12332 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12333 (vect_pattern_recog_1): Expect the pattern function to do any
12334 necessary target tests. Also expect it to provide a vector type.
12335 Remove the type_in handling.
12337 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12339 * tree-vect-patterns.c (vect_pattern_detected): New function.
12340 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12341 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12342 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12343 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12344 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12345 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12346 (vect_recog_mask_conversion_pattern)
12347 (vect_try_gather_scatter_pattern): Likewise.
12349 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12351 * tree-vect-patterns.c (vect_get_internal_def): New function.
12352 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12353 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12354 (search_type_for_mask_1): Use it.
12356 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12358 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12359 redundant WIDEN_SUM_EXPR handling.
12360 (vect_recog_sad_pattern): Likewise.
12362 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12364 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12365 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12366 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12367 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12368 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12370 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12372 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12373 use the stmt_vec_info of the original bb statement for the
12374 new zero assignment, even if the call is part of a pattern.
12376 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12378 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12379 that the sequence is attached to the original statement rather
12380 than the pattern statement.
12381 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12382 PATTERN_DEF_SEQ from the original statement rather than
12383 the main pattern statement.
12384 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12385 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12386 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12388 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12390 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12391 definition statements before the early exit for statements that aren't
12393 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12395 (vect_transform_loop): ...here. Process pattern definition
12396 statements without first checking whether the main pattern
12397 statement is live or relevant.
12399 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12401 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12402 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12404 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12406 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12407 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12408 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12409 (expand_block_compare): Change select_block_compare_mode call.
12410 (expand_strncmp_align_check): Use new functions, fix comment.
12411 (emit_final_str_compare_gpr): New function.
12412 (expand_strn_compare): Refactor and clean up code.
12413 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12415 2018-06-19 Tony Reix <tony.reix@atos.com>
12416 Damien Bergamini <damien.bergamini@atos.com>
12417 David Edelsohn <dje.gcc@gmail.com>
12419 * collect2.c (static_obj): New variable.
12420 (static_libs): New variable.
12421 (is_in_list): Uncomment declaration.
12422 (main): Track AIX libraries linked statically.
12423 (is_in_list): Uncomment definition.
12424 (scan_prog_file): Don't add AIX shared libraries initializer
12425 to constructor list if linking statically.
12427 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12429 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12431 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12433 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12435 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12438 2018-06-19 Martin Liska <mliska@suse.cz>
12440 * config/i386/i386.c (ix86_can_inline_p): Do not use
12441 ipa_fn_summaries::get_create.
12442 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12444 (devirtualization_time_bonus): Likewise.
12445 (ipcp_propagate_stage): Likewise.
12446 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12447 (edge_set_predicate): Likewise.
12448 (evaluate_conditions_for_known_args): Likewise.
12449 (evaluate_properties_for_edge): Likewise.
12450 (ipa_call_summary::reset): Tranform to ...
12451 (ipa_call_summary::~ipa_call_summary): ... this.
12452 (ipa_fn_summary::reset): Transform to ...
12453 (ipa_fn_summary::~ipa_fn_summary): ... this.
12454 (ipa_fn_summary_t::remove): Rename to ...
12455 (ipa_fn_summary_t::remove_callees): ... this.
12456 (ipa_fn_summary_t::duplicate): Use placement new
12457 instead of memory copy.
12458 (ipa_call_summary_t::duplicate): Likewise.
12459 (ipa_call_summary_t::remove): Remove.
12460 (dump_ipa_call_summary): Change get_create to get.
12461 (ipa_dump_fn_summary): Dump only when summary exists.
12462 (analyze_function_body): Use symbol_summary::get instead
12464 (compute_fn_summary): Likewise.
12465 (estimate_edge_devirt_benefit): Likewise.
12466 (estimate_edge_size_and_time): Likewise.
12467 (inline_update_callee_summaries): Likewise.
12468 (remap_edge_change_prob): Likewise.
12469 (remap_edge_summaries): Likewise.
12470 (ipa_merge_fn_summary_after_inlining): Likewise.
12471 (write_ipa_call_summary): Likewise.
12472 (ipa_fn_summary_write): Likewise.
12473 (ipa_free_fn_summary): Likewise.
12474 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12475 (struct ipa_call_summary): Likewise.
12476 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12478 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12479 (estimate_size_after_inlining): Likewise.
12480 (estimate_growth): Likewise.
12481 (growth_likely_positive): Likewise.
12482 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12483 (inline_call): Likewise.
12484 * ipa-inline.c (caller_growth_limits): Likewise.
12485 (can_inline_edge_p): Likewise.
12486 (can_inline_edge_by_limits_p): Likewise.
12487 (compute_uninlined_call_time): Likewise.
12488 (compute_inlined_call_time): Likewise.
12489 (want_inline_small_function_p): Likewise.
12490 (edge_badness): Likewise.
12491 (update_caller_keys): Likewise.
12492 (update_callee_keys): Likewise.
12493 (inline_small_functions): Likewise.
12494 (inline_to_all_callers_1): Likewise.
12495 (dump_overall_stats): Likewise.
12496 (early_inline_small_functions): Likewise.
12497 (early_inliner): Likewise.
12498 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12499 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12500 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12501 * ipa-split.c (execute_split_functions): Likewise.
12502 * symbol-summary.h: Likewise.
12503 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12505 2018-06-19 Richard Biener <rguenther@suse.de>
12507 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12508 (vectorize_loops): ... here. Fix dbgcnt handling.
12509 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12511 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12514 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12515 ieee128 argument takes up only one (vector) register, not two (floating
12518 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12520 * gimplify.c (gimplify_init_constructor): Really never clear for an
12521 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12523 2018-06-19 Richard Biener <rguenther@suse.de>
12525 PR tree-optimization/86179
12526 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12527 after failed recognition.
12529 2018-06-18 Martin Sebor <msebor@redhat.com>
12531 PR middle-end/85602
12532 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12533 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12534 Handle integer subtraction.
12535 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12536 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12538 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12540 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12541 param from rtx to rtx_insn *.
12542 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12544 (frv_ifcvt_modify_insn): Likwise.
12545 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12546 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12547 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12548 as_a <rtx_insn *> cast to local "unprotected_region" once
12549 it's been established that it's not NULL or pc_rtx.
12550 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12551 param "sethi" from rtx to rtx_insn *.
12552 (nds32_group_float_insns): Likewise for param "insn".
12553 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12555 (vax_output_int_subtract): Likewise.
12556 * config/vax/vax.c (vax_output_int_add): Likewise for param
12558 (vax_output_int_subtract): Likewise.
12559 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12560 (emit_pattern_after): Likewise for param "after".
12561 (emit_insn_after): Likewise.
12562 (emit_jump_insn_after): Likewise.
12563 (emit_call_insn_after): Likewise.
12564 (emit_debug_insn_after): Likewise.
12565 (emit_pattern_before): Likewise for param "before".
12566 (emit_insn_before): Likewise.
12567 (emit_jump_insn_before): Likewise.
12568 * final.c (get_insn_template): Likewise for param "insn", removing
12570 * output.h (get_insn_template): Likewise for 2nd param.
12571 * rtl.h (emit_insn_before): Likewise.
12572 (emit_jump_insn_before): Likewise.
12573 (emit_debug_insn_before_noloc): Likewise.
12574 (emit_insn_after): Likewise.
12575 (emit_jump_insn_after): Likewise.
12576 (emit_call_insn_after): Likewise.
12577 (emit_debug_insn_after): Likewise.
12578 (set_insn_deleted): Likewise for param.
12580 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12583 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12584 floating point modes, so that IFmode is numerically greater than
12585 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12586 to declare the ordering. This prevents IFmode from being
12587 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12588 machine. Include rs6000-modes.h to share the fractional values
12589 between genmodes* and the rest of the compiler.
12590 (IFmode): Likewise.
12591 (KFmode): Likewise.
12592 (TFmode): Likewise.
12593 * config/rs6000/rs6000-modes.h: New file.
12594 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12595 meaning of rs6000_long_double_size so that 126..128 selects an
12596 appropriate 128-bit floating point type.
12597 (rs6000_option_override_internal): Likewise.
12598 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12599 (TARGET_LONG_DOUBLE_128): Change the meaning of
12600 rs6000_long_double_size so that 126..128 selects an appropriate
12601 128-bit floating point type.
12602 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12603 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12604 source and destination to match the standard usage.
12605 (truncifkf2): Likewise.
12606 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12607 ISA 2.07 to use an explicit clobber, instead of passing in a
12609 (copysign<mode>3_soft): Likewise.
12611 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12613 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12614 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12615 (vect_slp_analyze_instance_dependence): Likewise.
12616 (vect_enhance_data_refs_alignment): Likewise.
12617 (vect_analyze_data_refs_alignment): Likewise.
12618 (vect_slp_analyze_and_verify_instance_alignment
12619 (vect_analyze_data_ref_accesses): Likewise.
12620 (vect_prune_runtime_alias_test_list): Likewise.
12621 (vect_analyze_data_refs): Likewise.
12622 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12623 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12624 (vect_analyze_scalar_cycles_1): Likewise.
12625 (vect_get_loop_niters): Likewise.
12626 (vect_analyze_loop_form_1): Likewise.
12627 (vect_update_vf_for_slp): Likewise.
12628 (vect_analyze_loop_operations): Likewise.
12629 (vect_analyze_loop): Likewise.
12630 (vectorizable_induction): Likewise.
12631 (vect_transform_loop): Likewise.
12632 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12633 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12634 (vect_make_slp_decision): Likewise.
12635 (vect_detect_hybrid_slp): Likewise.
12636 (vect_slp_analyze_operations): Likewise.
12637 (vect_slp_bb): Likewise.
12638 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12639 (vectorizable_bswap): Likewise.
12640 (vectorizable_call): Likewise.
12641 (vectorizable_simd_clone_call): Likewise.
12642 (vectorizable_conversion): Likewise.
12643 (vectorizable_assignment): Likewise.
12644 (vectorizable_shift): Likewise.
12645 (vectorizable_operation): Likewise.
12646 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12648 2018-06-18 Martin Sebor <msebor@redhat.com>
12650 PR tree-optimization/81384
12651 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12652 * builtins.c (expand_builtin_strnlen): New function.
12653 (expand_builtin): Call it.
12654 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12655 * builtins.def (BUILT_IN_STRNLEN): New.
12656 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12657 Warn for bounds in excess of maximum object size.
12658 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12659 single-value ranges. Handle strnlen.
12660 (handle_builtin_strlen): Handle strnlen.
12661 (strlen_check_and_optimize_stmt): Same.
12662 * doc/extend.texi (Other Builtins): Document strnlen.
12664 2018-06-18 Maya Rashish <coypu@sdf.org>
12666 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12667 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12668 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12670 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12672 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12674 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12676 * tree.c (escaped_string::escape): Replace cast to char * by
12677 const_cast<char *> (unescaped).
12679 2018-06-18 Nick Clifton <nickc@redhat.com>
12682 * tree.c (escaped_string): New class. Converts an unescaped
12683 string into its escaped equivalent.
12684 (warn_deprecated_use): Use the new class to convert the
12685 deprecation message, if present.
12686 (test_escaped_strings): New self test.
12687 (test_c_tests): Add test_escaped_strings.
12688 * doc/extend.texi (deprecated): Add a note that the
12689 deprecation message is affected by the -fmessage-length
12690 option, and that control characters will be escaped.
12691 (#pragma GCC error): Document this pragma.
12692 (#pragma GCC warning): Likewise.
12693 * doc/invoke.texi (-fmessage-length): Document this option's
12694 effect on the #warning and #error preprocessor directives and
12695 the deprecated attribute.
12697 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12699 * tree.c (decl_value_expr_lookup): Revert latest change.
12700 (decl_value_expr_insert): Likewise.
12702 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12704 * gimplify.c (nonlocal_vlas): Delete.
12705 (nonlocal_vla_vars): Likewise.
12706 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12708 (gimplify_body): Do not create and destroy nonlocal_vlas.
12709 * tree-nested.c: Include diagnostic.h.
12710 (use_pointer_in_frame): Tweak.
12711 (lookup_field_for_decl): Add assertion and declare the transformation.
12712 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12713 internal error when the reference is in a wrong context. Do not
12714 create a debug decl by default.
12715 (note_nonlocal_block_vlas): Delete.
12716 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12717 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12718 create a debug decl by default.
12719 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12720 call is in a wrong context.
12721 (fixup_vla_decls): New function.
12722 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12723 debug variables were created.
12724 * tree.c (decl_value_expr_lookup): Add checking assertion.
12725 (decl_value_expr_insert): Likewise.
12727 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12729 PR middle-end/82479
12730 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12731 * tree-scalar-evolution.c (interpret_expr): Likewise.
12732 (expression_expensive_p): Likewise.
12733 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12734 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12735 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12736 (ssa_defined_by_minus_one_stmt_p): New.
12738 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12740 PR middle-end/64946
12741 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12742 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12743 * dojump.c (do_jump): Likewise.
12744 * expr.c (expand_expr_real_2): Check operand type's sign.
12745 * fold-const.c (const_unop): Handle ABSU_EXPR.
12746 (fold_abs_const): Likewise.
12747 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12748 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12749 (strip_sign_op_1): Likesise.
12750 * match.pd: Add new pattern to generate ABSU_EXPR.
12751 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12752 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12753 * tree-eh.c (operation_could_trap_helper_p): Likewise.
12754 * tree-inline.c (estimate_operator_cost): Likewise.
12755 * tree-pretty-print.c (dump_generic_node): Likewise.
12756 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12757 * tree.def (ABSU_EXPR): New.
12759 2018-06-16 Jakub Jelinek <jakub@redhat.com>
12761 PR middle-end/86095
12762 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12763 documented as preserved for backward compatibility only.
12764 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12766 PR rtl-optimization/86108
12767 * bb-reorder.c (create_forwarder_block): Renamed to ...
12768 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
12769 jump from new landing pad to the second part.
12770 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12773 2018-06-15 Jakub Jelinek <jakub@redhat.com>
12775 PR middle-end/85878
12776 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12777 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12778 Only call store_expr for halves if the mode is the same.
12780 PR middle-end/86123
12781 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12782 Fix up comment formatting.
12784 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
12786 * typed-splay-tree.h (typed_splay_tree::remove): New function.
12787 (typed_splay_tree::closure,
12788 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12789 (typed_splay_tree::typed_splay_tree,
12790 typed_splay_tree::operator =): Declared private.
12791 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12792 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12793 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12794 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12795 typed_splay_tree::splay_tree_splay,
12796 typed_splay_tree::splay_tree_foreach_helper,
12797 typed_splay_tree::splay_tree_insert,
12798 typed_splay_tree::splay_tree_remove,
12799 typed_splay_tree::splay_tree_lookup,
12800 typed_splay_tree::splay_tree_predecessor,
12801 typed_splay_tree::splay_tree_successor,
12802 typed_splay_tree::splay_tree_min,
12803 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12804 (typed_splay_tree::root, typed_splay_tree::comp,
12805 typed_splay_tree::delete_key,
12806 typed_splay_tree::delete_value): New data members.
12807 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12808 typed_splay_tree::remove.
12810 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
12812 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12813 -mginv and -mno-ginv to the assembler.
12814 * config/mips/mips.opt (-mcrc): New option.
12815 (-mginv): Likewise.
12816 * doc/invoke.text (-mcrc): Document.
12817 (-mginv): Likewise.
12819 2018-06-15 Nick Clifton <nickc@redhat.com>
12822 * tree.c (escaped_string): New class. Converts an unescaped
12823 string into its escaped equivalent.
12824 (warn_deprecated_use): Use the new class to convert the
12825 deprecation message, if present.
12826 (test_escaped_strings): New self test.
12827 (test_c_tests): Add test_escaped_strings.
12828 * doc/extend.texi (deprecated): Add a note that the
12829 deprecation message is affected by the -fmessage-length
12830 option, and that control characters will be escaped.
12831 (#pragma GCC error): Document this pragma.
12832 (#pragma GCC warning): Likewise.
12833 * doc/invoke.texi (-fmessage-length): Document this option's
12834 effect on the #warning and #error preprocessor directives and
12835 the deprecated attribute.
12837 2018-06-15 Richard Biener <rguenther@suse.de>
12839 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12840 here, also noting vector size used.
12841 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
12842 size used in MSG_OPTIMIZED_LOCATIONS dump.
12843 (pass_slp_vectorize::execute): Adjust.
12845 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
12848 * config/arc/arc.c (arc_return_address_register): Fix
12851 2018-06-15 Richard Biener <rguenther@suse.de>
12853 PR middle-end/86159
12854 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12855 leave useless conversion stripping to force_gimple_operand_gsi.
12856 (gimplify_build2): Likewise.
12857 (gimplify_build1): Likewise.
12859 2018-06-15 Richard Biener <rguenther@suse.de>
12861 PR middle-end/86076
12862 * tree-cfg.c (move_stmt_op): unshare invariant addresses
12863 before adjusting their block.
12865 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
12867 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12868 multilibs for *-*-rtems*.
12869 * config/riscv/t-rtems: New file.
12871 2018-06-14 Jakub Jelinek <jakub@redhat.com>
12873 PR middle-end/86122
12874 * match.pd ((A +- CST1) +- CST2): Punt if last resort
12875 unsigned_type_for returns NULL.
12878 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12879 subregs of multi-word pseudos unless the float mode has word size.
12881 2018-06-14 Richard Biener <rguenther@suse.de>
12883 PR middle-end/86139
12884 * tree-vect-generic.c (build_word_mode_vector_type): Remove
12885 duplicate and harmful type_hash_canon.
12886 * tree.c (type_hash_canon): Assert we didn't find ourselves.
12888 2018-06-14 Richard Biener <rguenther@suse.de>
12891 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12894 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
12896 * config/rtems.h (STDINT_LONG32): Define.
12898 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
12899 Prachi Godbole <prachi.godbole@imgtec.com>
12901 * config/mips/mips-cpus.def: Define P6600.
12902 * config/mips/mips-tables.opt: Regenerate.
12903 * config/mips/mips.c (mips_ucbranch_type): New enum.
12904 (mips_rtx_cost_data): Add support for P6600.
12905 (mips_issue_rate): Likewise.
12906 (mips_multipass_dfa_lookahead): Likewise.
12907 (mips_avoid_hazard): Likewise.
12908 (mips_reorg_process_insns): Likewise.
12909 (mips_classify_branch_p6600): New function.
12910 * config/mips/mips.h (TUNE_P6600): New define.
12911 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12912 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12913 * config/mips/mips.md: Include p6600.md.
12914 (processor): Add p6600.
12915 * config/mips/p6600.md: New file.
12916 * doc/invoke.texi: Add p6600 to supported architectures.
12918 2018-06-13 Martin Sebor <msebor@redhat.com>
12920 PR tree-optimization/86114
12921 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12923 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12925 2018-06-13 Richard Biener <rguenther@suse.de>
12927 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12928 Properly set vector type of the intermediate stmt.
12929 * tree-vect-stmts.c (vectorizable_operation): The destination
12930 var always has vectype_out type.
12932 2018-06-13 Jeff Law <law@redhat.com>
12934 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12935 integer 0 for argument to print_rtl_with_bb.
12936 (rl78_reorg): Likewise.
12938 2018-06-13 David Malcolm <dmalcolm@redhat.com>
12940 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12941 from rtx to rtx_insn *.
12942 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12944 (add_sched_insns_for_speculation): Likewise for local "target",
12945 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12946 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12947 from rtx_insn ** to rtx_code_label **.
12948 (reorg_emit_nops): Likewise.
12949 (c6x_reorg): Likewise for local "call_labels".
12950 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12952 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12953 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12954 the loops over LABEL_REFS.
12955 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12957 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12958 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12959 (split_branches): Strengthen local "olabel" from rtx to
12960 rtx_insn *, adding a safe_as_a cast.
12961 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12963 (add_insn_after): Likewise for first two params.
12964 (add_insn_before): Likewise.
12965 (remove_insn): Likewise for param.
12966 (emit_pattern_before_noloc): Likewise for second and third params.
12967 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12968 (emit_call_insn_before_noloc): Likewise.
12969 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12971 (emit_barrier_before): Likewise.
12972 (emit_label_before): Strengthen "label" param from "rtx" to
12973 "rtx_code_label *". Strengthen "before" param from "rtx" to
12975 (emit_insn_after_1): Strengthen "after" param from "rtx" to
12977 (emit_pattern_after_noloc): Likewise.
12978 (emit_insn_after_noloc): Likewise.
12979 (emit_jump_insn_after_noloc): Likewise.
12980 (emit_call_insn_after_noloc): Likewise.
12981 (emit_debug_insn_after_noloc): Likewise.
12982 (emit_barrier_after): Likewise.
12983 (emit_label_after): Likewise for both params.
12984 (emit_pattern_after_setloc): Likewise for "after" param. Convert
12985 "loc" param from "int" to "location_t".
12986 (emit_insn_after_setloc): Likewise.
12987 (emit_jump_insn_after_setloc): Likewise.
12988 (emit_call_insn_after_setloc): Likewise.
12989 (emit_debug_insn_after_setloc): Likewise.
12990 (emit_pattern_before_setloc): Likewise for "before" param. Convert
12991 "loc" param from "int" to "location_t".
12992 (emit_pattern_before): Convert NULL_RTX to NULL.
12993 (emit_insn_before_setloc): Convert "loc" param from "int" to
12995 (emit_jump_insn_before_setloc): Likewise.
12996 (emit_call_insn_before_setloc): Likewise.
12997 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12998 rtx_insn *. Convert "loc" param from "int" to "location_t".
12999 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13000 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13001 Convert 3rd param from "int" to "location_t".
13002 (emit_barrier_before, emit_barrier_after, next_real_insn):
13003 Strengthen param from rtx to rtx_insn *.
13004 (emit_label_before): Strengthen 1st param from "rtx" to
13005 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13007 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13008 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13009 Strengthen 2nd param from "rtx" to "rtx_insn *".
13010 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13011 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13012 Likewise. Convert 3rd param from "int" to "location_t".
13013 (emit_label_after): Strengthen 1st param from "rtx" to
13014 "rtx_code_label *".
13015 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13017 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13018 from "rtx" to "rtx_insn *".
13020 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13022 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13023 bodies streamed in with -Q.
13024 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13025 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13026 * gimple-streamer-out.c: Include gimple-pretty-print.h
13027 (output_bb): Dump stmts streamed.
13028 * lto-section-out.c: Include print-tree.h
13029 (lto_begin_section): Dump sections created.
13030 (lto_output_decl_index): Dump decl encoded.
13031 * lto-streamer-out.c: Include print-tree.h
13032 (create_output_block): Dump output block created.
13033 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13034 (output_function): Dump function output.
13035 (output_constructor): Dump constructor streamed.
13036 (write_global_stream): Output indexes encoded.
13037 (produce_asm_for_decls): Dump streams encoded.
13038 * lto-streamer.c (streamer_dump_file): New global var.
13039 * lto-streamer.h (streamer_dump_file): Declare.
13040 * passes.c (ipa_write_summaries): Initialize streamer dump.
13041 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13044 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13047 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13048 offsets for register save directives. Emit a second batch of save
13049 directives, if need be, when the function accesses prior frames.
13051 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13053 * config/arc/fpu.md (fmasf4): Force operand to register.
13054 (fnmasf4): Likewise.
13056 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13058 * config/arc/arc-protos.h (arc_pad_return): Remove.
13059 * config/arc/arc.c (machine_function): Remove force_short_suffix
13061 (arc_print_operand): Adjust printing of '&'.
13062 (arc_verify_short): Remove conditional printing of short suffix.
13063 (arc_final_prescan_insn): Remove reference to size_reason.
13064 (pad_return): New function.
13065 (arc_reorg): Call pad_return.
13066 (arc_pad_return): Remove.
13067 (arc_init_machine_status): Remove reference to force_short_suffix.
13068 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13069 (attr length): When attribute iscompact is true force to 2
13070 regardless; in the case of maybe check if we want to force the
13071 instruction to have 4 bytes length.
13072 (nopv): Change it to generate 4 byte long nop as well.
13073 (blockage): New pattern.
13074 (simple_return): Remove call to arc_pad_return.
13075 (p_return_i): Likewise.
13077 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13079 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13081 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13083 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13086 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13088 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13089 for ARC700 and ARCv2.
13091 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13094 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13095 operands[2] instead of operands[1].
13098 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13100 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13101 case, check whether the outer register overlaps an unallocatable
13102 register, not just whether it fits the required class.
13104 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13106 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13108 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13109 (memrefs_conflict_p): Likewise.
13110 (init_alias_analysis): Likewise.
13111 * cfgexpand.c (expand_debug_expr): Likewise.
13112 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13113 * cse.c (fold_rtx): Likewise.
13114 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13115 * expr.c (emit_block_move_hints): Likewise.
13116 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13117 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13118 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13119 (emit_group_store): Likewise.
13120 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13121 to read the PRE/POST_MODIFY increment.
13122 * calls.c (store_one_arg): Use strip_offset.
13123 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13125 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13127 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13128 (simplify_binary_operation_1): Extend CONST_INT handling to
13130 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13131 than a HOST_WIDE_INT.
13132 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13134 (adjust_mems, add_stores): Update accodingly.
13135 (vt_canonicalize_addr): Track polynomial offsets.
13136 (emit_note_insn_var_location): Likewise.
13137 (vt_add_function_parameter): Likewise.
13138 (vt_initialize): Likewise.
13140 2018-06-12 Jeff Law <law@redhat.com>
13142 * config.gcc (alpha*-*-freebsd*): Remove.
13143 * config/alpha/freebsd.h: Remove.
13145 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13148 * spellcheck-tree.c (levenshtein_distance): Rename to...
13149 (get_edit_distance): ...this, and update for underlying renaming.
13150 * spellcheck-tree.h (levenshtein_distance): Rename to...
13151 (get_edit_distance): ...this.
13152 * spellcheck.c (levenshtein_distance): Rename to...
13153 (get_edit_distance): ...this. Convert from Levenshtein distance
13154 to Damerau-Levenshtein distance by supporting transpositions of
13155 adjacent characters. Rename "v1" to "v_next" and "v0" to
13157 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13158 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13159 update for underlying renaming.
13160 (selftest::levenshtein_distance_unit_test): Rename to...
13161 (selftest::test_get_edit_distance_unit): ...this, and update for
13162 underlying renaming.
13163 (selftest::test_find_closest_string): Add example from PR 69968
13164 where transposition helps
13165 (selftest::test_metric_conditions): Update for renaming.
13166 (selftest::test_metric_conditions): Likewise.
13167 (selftest::spellcheck_c_tests): Likewise.
13168 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13169 (get_edit_distance): ...this.
13170 (best_match::consider): Update for renaming.
13172 2018-06-12 Martin Sebor <msebor@redhat.com>
13174 PR tree-optimization/85259
13175 * builtins.c (compute_objsize): Handle constant offsets.
13176 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13177 true iff a warning has been issued.
13178 * gimple.h (gimple_nonartificial_location): New function.
13179 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13180 gimple_nonartificial_location and handle -Wno-system-headers.
13181 (handle_builtin_stxncpy): Same.
13183 2018-06-12 Martin Sebor <msebor@redhat.com>
13186 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13188 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13190 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13191 BUILTIN_VEC_XST entries for pointer to double and long long.
13193 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13196 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13198 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13201 2018-06-12 Martin Liska <mliska@suse.cz>
13203 * doc/options.texi: Document IntegerRange.
13205 2018-06-12 Martin Liska <mliska@suse.cz>
13207 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13208 * opt-functions.awk: Handle Deprecated flag.
13209 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13211 (read_cmdline_option): Report warning for a deprecated option.
13212 * opts.h (struct cl_option): Add new field cl_deprecated.
13213 (CL_ERR_DEPRECATED): New.
13215 2018-06-12 Martin Liska <mliska@suse.cz>
13217 * doc/options.texi: Document Deprecated option flag.
13219 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13221 * config/arc/arc-arch.h (arc_extras): New enum.
13222 (arc_cpu_t):Add field extra.
13223 (arc_cpu_types): Consider the extras.
13224 * config/arc/arc-cpus.def: Add extras info.
13225 * config/arc/arc-opts.h (processor_type): Consider extra field.
13226 * config/arc/arc.c (arc_override_options): Handle extra field.
13228 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13230 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13231 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13233 * config/arc/arc.c (arc_init): Update pic warning.
13234 (irq_range): Update irq range parsing warnings.
13235 (arc_override_options): Update various warning messages.
13236 (arc_handle_aux_attribute): Likewise.
13238 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13240 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13242 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13244 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13245 compiler messages directives.
13247 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13249 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13250 * config/mips/mips-tables.opt: Regenerate.
13251 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13253 * doc/invoke.texi: Document -march=i6500.
13255 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13257 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13258 (i6400_gpmul): Add cpu_unit.
13259 (i6400_gpdiv): Likewise.
13260 (i6400_msa_add_d): Update reservations.
13261 (i6400_msa_int_add) Likewise.
13262 (i6400_msa_short_logic3) Likewise.
13263 (i6400_msa_short_logic2) Likewise.
13264 (i6400_msa_short_logic) Likewise.
13265 (i6400_msa_move) Likewise.
13266 (i6400_msa_cmp) Likewise.
13267 (i6400_msa_short_float2) Likewise.
13268 (i6400_msa_div_d) Likewise.
13269 (i6400_msa_long_logic1) Likewise.
13270 (i6400_msa_long_logic2) Likewise.
13271 (i6400_msa_mult) Likewise.
13272 (i6400_msa_long_float2) Likewise.
13273 (i6400_msa_long_float4) Likewise.
13274 (i6400_msa_long_float5) Likewise.
13275 (i6400_msa_long_float8) Likewise.
13276 (i6400_fpu_fadd): Include frint type.
13277 (i6400_fpu_store): New define_insn_reservation.
13278 (i6400_fpu_load): Likewise.
13279 (i6400_fpu_move): Likewise.
13280 (i6400_fpu_fcmp): Likewise.
13281 (i6400_fpu_fmadd): Likewise.
13282 (i6400_int_mult): Include imul3nc type and update reservation.
13283 (i6400_int_div): Include idiv3 type and update reservation.
13284 (i6400_int_load): Update to check type not move_type.
13285 (i6400_int_store): Likewise.
13286 (i6400_int_prefetch): Set zero latency.
13288 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13290 * gcc.c: Document new %@{...} sequence.
13291 (LINK_COMMAND_SPEC): Use it for the -L switches.
13292 (cpp_unique_options): Use it for the -I switches.
13293 (at_file_argbuf): New global variable.
13294 (in_at_file): Likewise.
13295 (alloc_args): Create at_file_argbuf.
13296 (clear_args): Truncate at_file_argbuf.
13297 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13298 (open_at_file): New function.
13299 (close_at_file): Likewise.
13300 (create_at_file): Delete.
13301 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13304 (validate_switches_from_spec): Deal with %@{...} sequence.
13305 (validate_switches): Likewise.
13306 (driver::finalize): Call clear_args.
13308 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13310 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13312 2018-06-11 Martin Sebor <msebor@redhat.com>
13314 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13315 (Wno-class-memaccess): Add @opindex.
13316 (Wno-templates, Wno-multiple-inheritance): Same.
13317 (Wno-virtual-inheritance, Wno-namespaces): Same.
13318 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13319 (Wno-format-overflow, Wno-format-truncation): Same.
13320 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13321 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13322 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13323 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13324 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13325 (Wno-misspelled-isr): Same.
13327 2018-06-11 Martin Sebor <msebor@redhat.com>
13329 * PR tree-optimization/86083
13330 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13332 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13334 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13336 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13339 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13340 on the correct operand.
13341 (*movdi_internal64): Ditto.
13343 2018-06-11 Martin Liska <mliska@suse.cz>
13345 PR tree-optimization/86089
13346 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13348 2018-06-11 Julia Koval <julia.koval@intel.com>
13350 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13351 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13352 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13354 2018-06-11 Olivier Hainque <hainque@adacore.com>
13356 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13357 for Ada with strict dwarf2.
13359 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13362 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13365 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13367 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13369 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13371 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13374 2018-06-08 Martin Liska <mliska@suse.cz>
13376 * tree-cfg.h (debug_function): Fix argument type to match
13379 2018-06-08 Martin Liska <mliska@suse.cz>
13381 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13382 Remove usage of MPX-related (and removed) fields.
13383 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13385 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13387 * cfg.c (debug): Use TDF_NONE rather than 0.
13388 * cfghooks.c (debug): Likewise.
13389 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13390 (struct dump_option_value_info): Convert to...
13391 (struct kv_pair): ...this template type.
13392 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13394 (optinfo_verbosity_options): Likewise.
13395 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13397 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13398 than int for "optgroup_flags" param.
13399 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13401 (dump_dec): Likewise.
13402 (dump_finish): Use TDF_NONE rather than 0.
13403 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13404 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13405 than 0. Update for change to option_ptr.
13406 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13407 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13408 0. Update for changes to optinfo_verbosity_options and
13410 (opt_info_switch_p): Convert optgroup_flags from int to
13412 (dump_basic_block): Use dump_flags_t rather than int
13413 for "dump_kind" param.
13414 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13415 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13416 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13417 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13418 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13419 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13420 TDF_NONE): Convert from macros to...
13421 (enum dump_flag): ...this new enum.
13422 (dump_flags_t): Update to use enum.
13423 (operator|, operator&, operator~, operator|=, operator&=):
13424 Implement for dump_flags_t.
13425 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13426 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13427 Convert from macros to...
13428 (enum optgroup_flag): ...this new enum.
13429 (optgroup_flags_t): New typedef.
13430 (operator|, operator|=): Implement for optgroup_flags_t.
13431 (struct dump_file_info): Convert field "alt_flags" to
13432 dump_flags_t. Convert field "optgroup_flags" to
13434 (dump_basic_block): Use dump_flags_t rather than int for param.
13435 (dump_generic_expr_loc): Likewise.
13436 (dump_dec): Likewise.
13437 (dump_register): Convert param "optgroup_flags" to
13439 (opt_info_enable_passes): Likewise.
13440 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13442 * gimple-pretty-print.c (debug): Likewise.
13443 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13444 (merged_store_group::apply_stores): Likewise.
13445 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13446 * gimple.c (verify_gimple_pp): Likewise.
13447 * graphite-poly.c (print_pbb_body): Likewise.
13448 * passes.c (pass_manager::register_one_dump_file): Convert
13449 local "optgroup_flags" to optgroup_flags_t.
13450 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13452 (debug_body): Likewise.
13453 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13454 to optgroup_flags_t.
13455 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13457 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13458 (convert_mult_to_fma): Likewise.
13459 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13460 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13461 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13462 "dump_kind" to dump_flags_t.
13464 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13466 * config/rs6000/rs6000.c (min, max): Delete.
13468 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13470 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13471 -mabi=spe and -mabi=no-spe.
13473 2018-06-08 Martin Liska <mliska@suse.cz>
13475 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13476 where we expect an existing summary.
13478 2018-06-08 Martin Liska <mliska@suse.cz>
13480 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13481 * ipa-inline.h (estimate_edge_growth): Likewise.
13483 2018-06-08 Martin Liska <mliska@suse.cz>
13485 * cgraph.c (function_version_hasher::hash): Use
13486 cgraph_node::get_uid ().
13487 (function_version_hasher::equal):
13488 * cgraph.h (cgraph_node::get_uid): New method.
13489 * ipa-inline.c (update_caller_keys): Use
13490 cgraph_node::get_uid ().
13491 (update_callee_keys): Likewise.
13492 * ipa-utils.c (searchc): Likewise.
13493 (ipa_reduced_postorder): Likewise.
13494 * lto-cgraph.c (input_node): Likewise.
13495 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13496 * symbol-summary.h (symtab_insertion): Likewise.
13497 (symtab_removal): Likewise.
13498 (symtab_duplication): Likewise.
13499 * tree-pretty-print.c (dump_function_header): Likewise.
13500 * tree-sra.c (convert_callers_for_node): Likewise.
13502 2018-06-08 Martin Liska <mliska@suse.cz>
13504 * cgraph.c (symbol_table::create_edge): Always assign a new
13506 (symbol_table::free_edge): Do not recycle numbers.
13507 * cgraph.h (cgraph_edge::get): New method.
13508 * symbol-summary.h (symtab_removal): Use it.
13509 (symtab_duplication): Likewise.
13510 (call_summary::hashable_uid): Remove.
13512 2018-06-08 Martin Liska <mliska@suse.cz>
13514 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13515 (initialize_growth_caches): Remove.
13516 (free_growth_caches): Likewise.
13517 (do_estimate_edge_time): Use edge_growth_cache.
13518 (do_estimate_edge_size): Likewise.
13519 (do_estimate_edge_hints): Likewise.
13520 * ipa-inline.c (reset_edge_caches): Likewise.
13521 (recursive_inlining): Likewise.
13522 (inline_small_functions): Likewise.
13523 * ipa-inline.h (initialize_growth_caches): Remove.
13524 (estimate_edge_size): Likewise.
13525 (estimate_edge_time): Likewise.
13526 (estimate_edge_hints): Likewise.
13527 (reset_edge_growth_cache): Likewise.
13528 * symbol-summary.h (call_summary::remove): New method.
13530 2018-06-08 Martin Liska <mliska@suse.cz>
13532 * ipa-cp.c (class edge_clone_summary): New summary.
13533 (grow_edge_clone_vectors): Remove.
13534 (ipcp_edge_duplication_hook): Remove.
13535 (class edge_clone_summary_t): New call_summary class.
13536 (ipcp_edge_removal_hook): Remove.
13537 (edge_clone_summary_t::duplicate): New function.
13538 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13539 (create_specialized_node): Likewise.
13540 (ipcp_driver): Initialize edge_clone_summaries and do not
13543 2018-06-08 Martin Liska <mliska@suse.cz>
13545 * symbol-summary.h (get): New function.
13546 (call_summary::m_initialize_when_cloning): New class member.
13548 2018-06-08 Martin Liska <mliska@suse.cz>
13550 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13551 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13552 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13553 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13554 (remove_cgraph_node_from_order): Use the removed_nodes set.
13555 (do_per_function_toporder): Likwise.
13556 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13557 instead of summary_uid.
13558 (symtab_removal): Likewise.
13559 (symtab_duplication): Likewise.
13561 2018-06-08 Martin Liska <mliska@suse.cz>
13563 * ipa-cp.c (ipcp_store_bits_results): Use
13564 ipcp_transformation_sum.
13565 (ipcp_store_vr_results): Likewise.
13566 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13568 (ipcp_transformation_initialize): ... this.
13569 (ipa_set_node_agg_value_chain):
13570 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13571 (write_ipcp_transformation_info): Likewise.
13572 (read_ipcp_transformation_info): Likewise.
13573 (ipcp_update_bits): Likewise.
13574 (ipcp_update_vr): Likewise.
13575 (ipcp_transform_function): Likewise.
13576 * ipa-prop.h: Rename ipcp_transformation_summary to
13577 ipcp_transformation.
13578 (class ipcp_transformation_t): New function summary.
13579 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13580 (ipa_get_agg_replacements_for_node): Likewise.
13582 2018-06-08 Martin Liska <mliska@suse.cz>
13584 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13586 (class funct_state_summary_t): New function_summary class.
13587 (has_function_state): Remove.
13588 (get_function_state): Likewise.
13589 (set_function_state): Likewise.
13590 (add_new_function): Likewise.
13591 (funct_state_summary_t::insert): New function.
13592 (duplicate_node_data): Remove.
13593 (remove_node_data): Remove.
13594 (funct_state_summary_t::duplicate): New function.
13595 (register_hooks): Create new funct_state_summaries.
13596 (pure_const_generate_summary): Use it.
13597 (pure_const_write_summary): Likewise.
13598 (pure_const_read_summary): Likewise.
13599 (propagate_pure_const): Likewise.
13600 (propagate_nothrow): Likewise.
13601 (dump_malloc_lattice): Likewise.
13602 (propagate_malloc): Likewise.
13603 (execute): Do not register hooks, just remove summary
13605 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13608 2018-06-08 Martin Liska <mliska@suse.cz>
13610 * ipa-reference.c (remove_node_data): Remove.
13611 (duplicate_node_data): Likewise.
13612 (class ipa_ref_var_info_summary_t): New class.
13613 (class ipa_ref_opt_summary_t): Likewise.
13614 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13615 (get_reference_optimization_summary): Use
13616 ipa_ref_opt_sum_summaries.
13617 (set_reference_vars_info): Remove.
13618 (set_reference_optimization_summary): Likewise.
13619 (ipa_init): Create summaries.
13620 (init_function_info): Use function summary.
13621 (ipa_ref_opt_summary_t::duplicate): New function.
13622 (ipa_ref_opt_summary_t::remove): New function.
13623 (get_read_write_all_from_node): Fix GNU coding style.
13624 (propagate): Use function summary.
13625 (write_node_summary_p): Fix GNU coding style.
13626 (stream_out_bitmap): Likewise.
13627 (ipa_reference_read_optimization_summary): Use function summary.
13628 (ipa_reference_c_finalize): Do not release hooks.
13630 2018-06-08 Martin Liska <mliska@suse.cz>
13632 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13633 (analyze_function_body): Extract multiple calls of get_create.
13634 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13635 * ipa-inline.c (recursive_inlining): Use ::get method.
13636 * ipa-inline.h (estimate_edge_growth): Likewise.
13638 2018-06-08 Martin Liska <mliska@suse.cz>
13640 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13642 (hsa_function_summary::hsa_function_summary): Use the new enum
13644 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13645 * hsa-gen.c (hsa_get_host_function): Likewise.
13646 (get_brig_function_name): Likewise.
13647 * ipa-hsa.c (process_hsa_functions): Likewise.
13648 (ipa_hsa_write_summary): Likewise.
13649 * symbol-summary.h (symtab_duplication): Use ::get function/
13650 (get): New function.
13652 2018-06-08 Martin Liska <mliska@suse.cz>
13654 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13656 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13657 (hsa_register_kernel): Likewise.
13658 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13659 * hsa-gen.c (hsa_get_host_function): Likewise.
13660 (get_brig_function_name): Likewise.
13661 (generate_hsa): Likewise.
13662 (pass_gen_hsail::execute): Likewise.
13663 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13664 (devirtualization_time_bonus): Likewise.
13665 (ipcp_propagate_stage): Likewise.
13666 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13667 (edge_set_predicate): Likewise.
13668 (evaluate_conditions_for_known_args): Likewise.
13669 (evaluate_properties_for_edge): Likewise.
13670 (ipa_fn_summary::reset): Likewise.
13671 (ipa_fn_summary_t::duplicate): Likewise.
13672 (dump_ipa_call_summary): Likewise.
13673 (ipa_dump_fn_summary): Likewise.
13674 (analyze_function_body): Likewise.
13675 (compute_fn_summary): Likewise.
13676 (estimate_edge_devirt_benefit): Likewise.
13677 (estimate_edge_size_and_time): Likewise.
13678 (estimate_calls_size_and_time): Likewise.
13679 (estimate_node_size_and_time): Likewise.
13680 (inline_update_callee_summaries): Likewise.
13681 (remap_edge_change_prob): Likewise.
13682 (remap_edge_summaries): Likewise.
13683 (ipa_merge_fn_summary_after_inlining): Likewise.
13684 (ipa_update_overall_fn_summary): Likewise.
13685 (read_ipa_call_summary): Likewise.
13686 (inline_read_section): Likewise.
13687 (write_ipa_call_summary): Likewise.
13688 (ipa_fn_summary_write): Likewise.
13689 (ipa_free_fn_summary): Likewise.
13690 * ipa-hsa.c (process_hsa_functions): Likewise.
13691 (ipa_hsa_write_summary): Likewise.
13692 (ipa_hsa_read_section): Likewise.
13693 * ipa-icf.c (sem_function::merge): Likewise.
13694 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13695 (do_estimate_edge_time): Likewise.
13696 (estimate_size_after_inlining): Likewise.
13697 (estimate_growth): Likewise.
13698 (growth_likely_positive): Likewise.
13699 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13700 (inline_call): Likewise.
13701 * ipa-inline.c (caller_growth_limits): Likewise.
13702 (can_inline_edge_p): Likewise.
13703 (can_inline_edge_by_limits_p): Likewise.
13704 (compute_uninlined_call_time): Likewise.
13705 (compute_inlined_call_time): Likewise.
13706 (want_inline_small_function_p): Likewise.
13707 (edge_badness): Likewise.
13708 (update_caller_keys): Likewise.
13709 (update_callee_keys): Likewise.
13710 (recursive_inlining): Likewise.
13711 (inline_small_functions): Likewise.
13712 (inline_to_all_callers_1): Likewise.
13713 (dump_overall_stats): Likewise.
13714 (early_inline_small_functions): Likewise.
13715 (early_inliner): Likewise.
13716 * ipa-inline.h (estimate_edge_growth): Likewise.
13717 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13718 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13719 * ipa-prop.h (IPA_NODE_REF): Likewise.
13720 (IPA_EDGE_REF): Likewise.
13721 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13722 (propagate_malloc): Likewise.
13723 * ipa-split.c (execute_split_functions): Likewise.
13724 * symbol-summary.h: Rename get to get_create.
13726 (get_create): Likewise.
13727 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13729 2018-06-08 Martin Liska <mliska@suse.cz>
13731 * symbol-summary.h (release): Move definition out of class
13733 (symtab_removal): Likewise.
13734 (symtab_duplication): Likewise.
13736 2018-06-08 Martin Liska <mliska@suse.cz>
13738 * symbol-summary.h (function_summary): Move constructor
13739 implementation out of class declaration.
13740 (release): Likewise.
13741 (symtab_insertion): Likewise.
13742 (symtab_removal): Likewise.
13743 (symtab_duplication): Likewise.
13746 2018-06-08 Martin Liska <mliska@suse.cz>
13748 * Makefile.in: Remove support for MPX (macros, related functions,
13749 fields in cgraph_node, ...).
13750 * builtin-types.def (BT_BND): Likewise.
13751 (BT_FN_BND_CONST_PTR): Likewise.
13752 (BT_FN_CONST_PTR_BND): Likewise.
13753 (BT_FN_VOID_PTR_BND): Likewise.
13754 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13755 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13756 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13757 (expand_builtin_mempcpy_with_bounds): Likewise.
13758 (expand_builtin_memset_with_bounds): Likewise.
13759 (expand_builtin_memset_args): Likewise.
13760 (std_expand_builtin_va_start): Likewise.
13761 (expand_builtin): Likewise.
13762 (expand_builtin_with_bounds): Likewise.
13763 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13764 (DEF_LIB_BUILTIN_CHKP): Likewise.
13765 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13766 (DEF_CHKP_BUILTIN): Likewise.
13767 (BUILT_IN_MEMCPY): Likewise.
13768 (BUILT_IN_MEMMOVE): Likewise.
13769 (BUILT_IN_MEMPCPY): Likewise.
13770 (BUILT_IN_MEMSET): Likewise.
13771 (BUILT_IN_STPCPY): Likewise.
13772 (BUILT_IN_STRCAT): Likewise.
13773 (BUILT_IN_STRCHR): Likewise.
13774 (BUILT_IN_STRCPY): Likewise.
13775 (BUILT_IN_STRLEN): Likewise.
13776 (BUILT_IN_MEMCPY_CHK): Likewise.
13777 (BUILT_IN_MEMMOVE_CHK): Likewise.
13778 (BUILT_IN_MEMPCPY_CHK): Likewise.
13779 (BUILT_IN_MEMSET_CHK): Likewise.
13780 (BUILT_IN_STPCPY_CHK): Likewise.
13781 (BUILT_IN_STRCAT_CHK): Likewise.
13782 (BUILT_IN_STRCPY_CHK): Likewise.
13783 * calls.c (store_bounds): Likewise.
13784 (emit_call_1): Likewise.
13785 (special_function_p): Likewise.
13786 (maybe_warn_nonstring_arg): Likewise.
13787 (initialize_argument_information): Likewise.
13788 (finalize_must_preallocate): Likewise.
13789 (compute_argument_addresses): Likewise.
13790 (expand_call): Likewise.
13791 * cfgexpand.c (expand_call_stmt): Likewise.
13792 (expand_return): Likewise.
13793 (expand_gimple_stmt_1): Likewise.
13794 (pass_expand::execute): Likewise.
13795 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13796 (cgraph_node::remove): Likewise.
13797 (cgraph_node::dump): Likewise.
13798 (cgraph_node::verify_node): Likewise.
13799 * cgraph.h (chkp_function_instrumented_p): Likewise.
13800 (symtab_node::get_alias_target): Likewise.
13801 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13802 (cgraph_local_p): Likewise.
13803 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13804 (cgraph_edge::rebuild_references): Likewise.
13805 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13806 (walk_polymorphic_call_targets): Likewise.
13807 (cgraph_node::expand_thunk): Likewise.
13808 (symbol_table::output_weakrefs): Likewise.
13809 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13810 (ix86_handle_option): Likewise.
13811 * config/i386/constraints.md: Likewise.
13812 * config/i386/i386-builtin-types.def (BND): Likewise.
13816 * config/i386/i386-builtin.def (BDESC_END): Likewise.
13817 (BDESC_FIRST): Likewise.
13819 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13820 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13821 * config/i386/i386.c (enum reg_class): Likewise.
13822 (ix86_target_string): Likewise.
13823 (ix86_option_override_internal): Likewise.
13824 (ix86_conditional_register_usage): Likewise.
13825 (ix86_valid_target_attribute_inner_p): Likewise.
13826 (ix86_set_indirect_branch_type): Likewise.
13827 (ix86_set_current_function): Likewise.
13828 (ix86_function_arg_regno_p): Likewise.
13829 (init_cumulative_args): Likewise.
13830 (ix86_function_arg_advance): Likewise.
13831 (ix86_function_arg): Likewise.
13832 (ix86_pass_by_reference): Likewise.
13833 (ix86_function_value_regno_p): Likewise.
13834 (ix86_function_value_1): Likewise.
13835 (ix86_function_value_bounds): Likewise.
13836 (ix86_return_in_memory): Likewise.
13837 (ix86_setup_incoming_vararg_bounds): Likewise.
13838 (ix86_va_start): Likewise.
13839 (indirect_thunk_need_prefix): Likewise.
13840 (print_reg): Likewise.
13841 (ix86_print_operand): Likewise.
13842 (ix86_expand_call): Likewise.
13843 (ix86_output_function_return): Likewise.
13844 (reg_encoded_number): Likewise.
13845 (BDESC_VERIFYS): Likewise.
13846 (ix86_init_mpx_builtins): Likewise.
13847 (ix86_init_builtins): Likewise.
13848 (ix86_emit_cmove): Likewise.
13849 (ix86_emit_move_max): Likewise.
13850 (ix86_expand_builtin): Likewise.
13851 (ix86_builtin_mpx_function): Likewise.
13852 (ix86_get_arg_address_for_bt): Likewise.
13853 (ix86_load_bounds): Likewise.
13854 (ix86_store_bounds): Likewise.
13855 (ix86_load_returned_bounds): Likewise.
13856 (ix86_store_returned_bounds): Likewise.
13857 (ix86_class_likely_spilled_p): Likewise.
13858 (ix86_hard_regno_mode_ok): Likewise.
13859 (x86_order_regs_for_local_alloc): Likewise.
13860 (ix86_mitigate_rop): Likewise.
13861 (ix86_bnd_prefixed_insn_p): Likewise.
13862 (ix86_mpx_bound_mode): Likewise.
13863 (ix86_make_bounds_constant): Likewise.
13864 (ix86_initialize_bounds): Likewise.
13865 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13866 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13867 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13868 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13869 (TARGET_CHKP_BOUND_MODE): Likewise.
13870 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13871 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13872 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13873 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13874 * config/i386/i386.h (TARGET_MPX): Likewise.
13875 (TARGET_MPX_P): Likewise.
13876 (VALID_BND_REG_MODE): Likewise.
13877 (FIRST_BND_REG): Likewise.
13878 (LAST_BND_REG): Likewise.
13879 (enum reg_class): Likewise.
13880 (BND_REG_P): Likewise.
13881 (BND_REGNO_P): Likewise.
13882 (BNDmode): Likewise.
13883 (ADJUST_INSN_LENGTH): Likewise.
13884 * config/i386/i386.md: Likewise.
13885 * config/i386/i386.opt: Likewise.
13886 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13887 (defined): Likewise.
13888 (LINK_MPX): Likewise.
13889 (MPX_SPEC): Likewise.
13890 (LIBMPX_SPEC): Likewise.
13891 (LIBMPXWRAPPERS_SPEC): Likewise.
13892 (CHKP_SPEC): Likewise.
13893 * config/i386/predicates.md: Likewise.
13894 * dbxout.c (dbxout_type): Likewise.
13895 * doc/extend.texi: Likewise.
13896 * doc/invoke.texi: Likewise.
13897 * doc/md.texi: Likewise.
13898 * doc/tm.texi: Likewise.
13899 * doc/tm.texi.in: Likewise.
13900 * dwarf2out.c (is_base_type): Likewise.
13901 (gen_formal_types_die): Likewise.
13902 (gen_subprogram_die): Likewise.
13903 (gen_type_die_with_usage): Likewise.
13904 (gen_decl_die): Likewise.
13905 (dwarf2out_late_global_decl): Likewise.
13906 * expr.c (expand_assignment): Likewise.
13907 (emit_storent_insn): Likewise.
13908 (store_expr_with_bounds): Likewise.
13909 (store_expr): Likewise.
13910 (expand_expr_real_1): Likewise.
13911 * expr.h (store_expr_with_bounds): Likewise.
13912 * function.c (use_register_for_decl): Likewise.
13913 (struct bounds_parm_data): Likewise.
13914 (assign_parms_augmented_arg_list): Likewise.
13915 (assign_parm_find_entry_rtl): Likewise.
13916 (assign_parm_is_stack_parm): Likewise.
13917 (assign_parm_load_bounds): Likewise.
13918 (assign_bounds): Likewise.
13919 (assign_parms): Likewise.
13920 (expand_function_start): Likewise.
13921 * gcc.c (CHKP_SPEC): Likewise.
13922 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13923 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13924 (wrestrict_dom_walker::check_call): Likewise.
13925 * gimple.c (gimple_build_call_from_tree): Likewise.
13926 * gimple.h (enum gf_mask): Likewise.
13927 (gimple_call_with_bounds_p): Likewise.
13928 (gimple_call_set_with_bounds): Likewise.
13929 * gimplify.c (gimplify_init_constructor): Likewise.
13930 * ipa-cp.c (initialize_node_lattices): Likewise.
13931 (propagate_constants_across_call): Likewise.
13932 (find_more_scalar_values_for_callers_subset): Likewise.
13933 * ipa-hsa.c (process_hsa_functions): Likewise.
13934 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13935 * ipa-icf.c (sem_function::merge): Likewise.
13936 * ipa-inline.c (early_inliner): Likewise.
13937 * ipa-pure-const.c (warn_function_noreturn): Likewise.
13938 (warn_function_cold): Likewise.
13939 (propagate_pure_const): Likewise.
13940 * ipa-ref.h (enum GTY): Likewise.
13941 * ipa-split.c (find_retbnd): Likewise.
13942 (consider_split): Likewise.
13943 (split_function): Likewise.
13944 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13945 * ipa.c (walk_polymorphic_call_targets): Likewise.
13946 (symbol_table::remove_unreachable_nodes): Likewise.
13947 (process_references): Likewise.
13948 (cgraph_build_static_cdtor_1): Likewise.
13949 * lto-cgraph.c (lto_output_node): Likewise.
13950 (output_refs): Likewise.
13951 (compute_ltrans_boundary): Likewise.
13952 (input_overwrite_node): Likewise.
13953 (input_node): Likewise.
13954 (input_cgraph_1): Likewise.
13955 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13956 * passes.c (pass_manager::execute_early_local_passes): Likewise.
13957 (class pass_chkp_instrumentation_passes): Likewise.
13958 (make_pass_chkp_instrumentation_passes): Likewise.
13959 * passes.def: Likewise.
13960 * rtl.h (struct GTY): Likewise.
13961 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13962 * stor-layout.c (layout_type): Likewise.
13963 * symtab.c: Likewise.
13964 * target.def: Likewise.
13965 * targhooks.c (default_chkp_bound_type): Likewise.
13966 (default_chkp_bound_mode): Likewise.
13967 (default_builtin_chkp_function): Likewise.
13968 (default_chkp_function_value_bounds): Likewise.
13969 (default_chkp_make_bounds_constant): Likewise.
13970 (default_chkp_initialize_bounds): Likewise.
13971 * targhooks.h (default_chkp_bound_type): Likewise.
13972 (default_chkp_bound_mode): Likewise.
13973 (default_builtin_chkp_function): Likewise.
13974 (default_chkp_function_value_bounds): Likewise.
13975 (default_chkp_make_bounds_constant): Likewise.
13976 (default_chkp_initialize_bounds): Likewise.
13977 * toplev.c (compile_file): Likewise.
13978 (process_options): Likewise.
13979 * tree-core.h (DEF_BUILTIN): Likewise.
13980 (DEF_BUILTIN_CHKP): Likewise.
13981 * tree-inline.c (declare_return_variable): Likewise.
13982 (remap_gimple_stmt): Likewise.
13983 (copy_bb): Likewise.
13984 (initialize_inlined_parameters): Likewise.
13985 (expand_call_inline): Likewise.
13986 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13987 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13988 (make_pass_ipa_chkp_produce_thunks): Likewise.
13989 (make_pass_chkp): Likewise.
13990 (make_pass_chkp_opt): Likewise.
13991 (make_pass_chkp_instrumentation_passes): Likewise.
13992 * tree-pretty-print.c (dump_generic_node): Likewise.
13993 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13994 * tree-ssa-dce.c (propagate_necessity): Likewise.
13995 (eliminate_unnecessary_stmts): Likewise.
13996 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13997 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13998 * tree-ssa-sccvn.h: Likewise.
13999 * tree-ssa-strlen.c (get_string_length): Likewise.
14000 (valid_builtin_call): Likewise.
14001 (adjust_last_stmt): Likewise.
14002 (handle_builtin_strchr): Likewise.
14003 (handle_builtin_strcpy): Likewise.
14004 (handle_builtin_stxncpy): Likewise.
14005 (handle_builtin_memcpy): Likewise.
14006 (handle_builtin_strcat): Likewise.
14007 (strlen_check_and_optimize_stmt): Likewise.
14008 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14009 * tree-streamer-in.c: Likewise.
14010 * tree-streamer.c (record_common_node): Likewise.
14011 * tree.c (tree_code_size): Likewise.
14012 (wide_int_to_tree_1): Likewise.
14013 (type_contains_placeholder_1): Likewise.
14014 (build_common_tree_nodes): Likewise.
14015 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14016 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14017 (POINTER_BOUNDS_P): Likewise.
14018 (BOUNDED_TYPE_P): Likewise.
14019 (BOUNDED_P): Likewise.
14020 (CALL_WITH_BOUNDS_P): Likewise.
14021 (pointer_bounds_type_node): Likewise.
14022 * value-prof.c (gimple_ic): Likewise.
14023 * var-tracking.c (vt_add_function_parameters): Likewise.
14024 * varasm.c (make_decl_rtl): Likewise.
14025 (assemble_start_function): Likewise.
14026 (output_constant): Likewise.
14027 (maybe_assemble_visibility): Likewise.
14028 * varpool.c (ctor_for_folding): Likewise.
14029 * chkp-builtins.def: Remove.
14030 * ipa-chkp.c: Remove.
14031 * ipa-chkp.h: Remove.
14032 * rtl-chkp.c: Remove.
14033 * rtl-chkp.h: Remove.
14034 * tree-chkp-opt.c: Remove.
14035 * tree-chkp.c: Remove.
14036 * tree-chkp.h: Remove.
14038 2018-06-07 Carl Love <cel@us.ibm.com>
14040 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14041 vextract_fp_from_shortl): Add BE support.
14043 2018-06-07 Paul Koning <ni1d@arrl.net>
14045 * compare-elim.c (try_merge_compare): Don't merge compare if
14046 address contains a side effect.
14047 (try_eliminate_compare): Likewise.
14049 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14051 * config.gcc: Support "tremont".
14052 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14053 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14055 * config/i386/i386.c (m_TREMONT): Define.
14056 (processor_target_table): Add "tremont".
14057 (PTA_TREMONT): Define.
14058 (ix86_lea_outperforms): Add TARGET_TREMONT.
14059 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14060 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14061 and M_INTEL_GOLDMONT_PLUS.
14062 (fold_builtin_cpu): Add "tremont".
14063 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14064 (ix86_option_override_internal): Add "tremont".
14065 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14066 (processor_type): Add PROCESSOR_TREMONT.
14067 * config/i386/x86-tune.def: Add m_TREMONT.
14068 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14070 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14072 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14073 symbol defined for msp430i* devices to be lower case.
14075 2018-06-07 Richard Biener <rguenther@suse.de>
14077 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14078 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14079 Properly wrap signed arithmetic if overflow wraps.
14081 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14083 PR tree-optimization/69615
14084 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14085 of a cast from a same precision integral SSA_NAME in a bb dominated
14086 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14087 cast to utype if rhs2 has already a compatible type.
14089 2018-06-07 Richard Biener <rguenther@suse.de>
14091 PR tree-optimization/85935
14092 * graphite-scop-detection.c (find_params_in_bb): Analyze
14093 condition operands with respect to the correct loop. Assert
14094 the analysis doesn't fail.
14096 2018-06-04 Carl Love <cel@us.ibm.com>
14098 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14099 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14100 as it is slightly cheaper.
14101 (first_match_or_eos_index_<mode>):
14102 Calculate index using natural element order.
14103 (first_match_index_<mode>):
14104 Calculate index using natural element order.
14105 (first_match_or_eos_index_<mode>):
14106 Calculate index using natural order.
14107 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14108 for BE and LE modes.
14109 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14110 P9V_BUILTIN_VCLZLSBB_V16QI.
14111 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14114 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14116 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14117 indentation and line wrap for many prototypes. Add missing
14118 @smallexample directives around block of prototypes for vec_xl and
14121 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14123 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14124 track if we pass or return IEEE 128-bit floating point.
14125 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14126 C++ mangling that is compatible with GCC 8.1.
14127 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14128 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14129 floating point types.
14130 (rs6000_function_arg_advance_1): Likewise.
14131 (rs6000_mangle_type): Optionally generate mangled names that match
14132 what GCC 8.1 generated for IEEE 128-bit floating point types.
14133 (rs6000_globalize_decl_name): If we have an external function that
14134 passes or returns IEEE 128-bit types, generate a weak reference
14135 from the mangled name used in GCC 8.1 to the current mangled
14137 (rs6000_init_builtins): Make __ibm128 use the long double type if
14138 long double is IBM extended double. Make __float128 use the long
14139 double type if long double is IEEE 128-bit.
14142 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14143 macro for __ibm128 built-in functions.
14144 (PACK_IF): Add __ibm128 pack/unpack functions.
14145 (UNPACK_IF): Likewise.
14146 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14147 enable long double built-in functions if long double is IEEE
14148 128-bit floating point.
14149 (rs6000_invalid_builtin): Update long double built-in function
14151 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14152 functions, adjust the built-in function to use the long double
14153 built-in function if __ibm128 and long double are the same type.
14154 * doc/extend.texi (PowerPC builtins): Update documention for
14155 __builtin_{,un}pack_longdouble. Add documentation for
14156 __builtin_{,un}pack_ibm128.
14158 2018-06-06 Jim Wilson <jimw@sifive.com>
14160 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14161 (struct machine_function): New field interrupt_mode.
14162 (riscv_handle_type_attribute): New function. Add forward declaration.
14163 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14164 (riscv_expand_epilogue): Check interrupt_mode field.
14165 (riscv_set_current_function): Check interrupt attribute args and
14166 set interrupt_mode field.
14167 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14168 (riscv_sret, riscv_uret): New.
14169 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14170 new arguments to interrupt attribute.
14172 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14175 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14176 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14178 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14180 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14181 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14182 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14183 several redundant entries.
14185 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14187 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14188 type from "rtx" to "rtx_insn *".
14189 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14190 for local "call_insn", removing cast.
14191 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14193 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14195 PR tree-optimization/86066
14196 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14197 for BIT_INSERT_EXPR stores.
14199 2018-06-06 Richard Biener <rguenther@suse.de>
14201 PR tree-optimization/86062
14202 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14203 component refs ontop
14204 of to be offsetted base.
14206 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14208 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14209 to be static and remove check on interrupt attribute name.
14211 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14213 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14214 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14216 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14219 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14221 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14222 Remove second argument, change how error is called.
14223 (aarch64_layout_arg): Remove second argument from
14224 aarch64_err_no_fpadvsimd call.
14225 (aarch64_init_cumulative_args): Ditto.
14226 (aarch64_gimplify_va_arg_expr): Ditto.
14227 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14229 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14231 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14232 (*simple_return_indirect_internal<mode>): Rename from
14233 simple_return_indirect_internal. Use W mode iterator.
14234 (rstorssp): New expander.
14235 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14236 (clrssbsy): New expander.
14237 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14239 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14241 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14243 (cmse_check_pointed_object): Likewise.
14245 2018-06-05 Martin Liska <mliska@suse.cz>
14247 PR gcov-profile/47618
14248 * doc/invoke.texi: Document how -fprofile-dir format
14251 2018-06-05 Richard Biener <rguenther@suse.de>
14253 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14254 removal pretend DOM info isn't available so we do not update
14255 it and only remove edges, not dominated blocks. Actually free
14256 DOM info in case we removed something. Remove unreachable blocks.
14257 (mfb_keep_latches): Work with either DOM info or marked backedges.
14258 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14259 first. Mark backedges if DOM info isn't available.
14260 (Re-)compute DOM info after cleanup_control_flow_pre.
14262 2018-06-05 Richard Biener <rguenther@suse.de>
14264 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14265 (locus_discrim_hasher::hash): Adjust.
14266 (locus_discrim_hasher::equal): Likewise.
14267 (next_discriminator_for_locus): Work on line directly.
14268 (same_line_p): Pass in expanded locus1 as well.
14269 (assign_discriminators): Avoid redundant location expansions.
14271 2018-06-05 Richard Biener <rguenther@suse.de>
14273 PR tree-optimization/86046
14274 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14275 if required after clearing TREE_ADDRESSABLE.
14277 2018-06-05 Richard Biener <rguenther@suse.de>
14279 PR tree-optimization/86047
14280 * tree-ssa-loop.c (for_each_index): Glob handling of all
14281 decls and constants and really handle all of them.
14283 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14286 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14287 qualifier_void_pointer and qualifier_const_void_pointer.
14288 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14289 (arm_init_builtins): Handle the above.
14290 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14291 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14292 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14295 2018-06-05 Martin Liska <mliska@suse.cz>
14297 * auto-profile.c (read_autofdo_file): Do not use
14298 gcov_ctr_summary struct.
14299 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14300 * coverage.c (struct counts_entry): Likewise.
14301 (read_counts_file): Read just single summary entry.
14302 (get_coverage_counts): Use gcov_summary struct.
14303 * coverage.h (get_coverage_counts): Likewise.
14304 * gcov-dump.c (dump_working_sets): Likewise.
14305 (tag_summary): Dump just single summary.
14306 * gcov-io.c (gcov_write_summary): Write just histogram
14308 (gcov_read_summary): Read just single summary.
14309 (compute_working_sets): Use gcov_summary struct.
14310 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14311 of GCOV_COUNTERS_SUMMABLE.
14312 (GCOV_COUNTERS_SUMMABLE): Remove.
14313 (GCOV_FIRST_VALUE_COUNTER): Replace with
14314 GCOV_COUNTER_V_INTERVAL.
14315 (struct gcov_ctr_summary): Remove.
14316 (struct gcov_summary): Directly use fields of former
14318 (compute_working_sets): Use gcov_summary struct.
14319 * gcov.c (read_count_file): Do not use ctrs fields.
14320 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14322 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14324 * profile.c: Likewise.
14325 * profile.h: Likewise.
14327 2018-06-05 Martin Liska <mliska@suse.cz>
14329 PR gcov-profile/84846
14330 * gcov.c (output_lines): Print working directory only
14331 in intermediate format.
14333 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14335 * config/s390/s390-builtin-types.def: Add void function type.
14336 * config/s390/s390-builtins.def: Use the function type for the
14339 2018-06-04 Jim Wilson <jimw@sifive.com>
14341 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14343 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14344 and maybe_eh_return. Change regno to unsigned int. Use new args to
14345 handle EH_RETURN_DATA_REGNO registers properly.
14346 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14347 (riscv_expand_epilogue): Update comment. Change argument name and
14348 type. Update code to use new name and type. Pass new args to
14349 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14351 * config/riscv/riscv.md (NORMAL_RETURN): New.
14352 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14353 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14354 (eh_return): Call gen_eh_return_internal and emit barrier.
14355 (eh_return_internal): Call riscv_expand_epilogue.
14357 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14359 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14360 bit_insertion field and declare can_be_merged_into method.
14361 (merged_store_group::can_be_merged_into): New method.
14362 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14363 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14364 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14366 2018-06-04 Richard Biener <rguenther@suse.de>
14368 PR tree-optimization/85955
14369 * builtins.c (fold_builtin_sincos): Convert pointers to
14370 destination to appropriate type before dereferencing.
14372 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14374 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14376 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14378 * expr.c (expand_expr_real_1): Force the operand into memory if
14379 its TYPE_MODE is BLKmode and if there is no integer mode for
14380 the number of bits being extracted.
14382 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14386 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14387 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14389 2018-06-04 Richard Biener <rguenther@suse.de>
14391 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14392 (cleanup_tree_cfg_noloop): ... single caller. Do
14393 start_recording_case_labels later.
14395 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14397 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14398 to _IMMINTRIN_H_INCLUDED.
14399 * config/i386/pconfigintrin.h: Ditto.
14400 * config/i386/waitpkgintrin.h: Ditto.
14401 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14402 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14403 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14404 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14405 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14406 waitpkgintrin.h and cldemoteintrin.h.
14408 2018-06-04 Richard Biener <rguenther@suse.de>
14410 PR tree-optimization/86038
14411 * tracer.c (find_best_successor): Check probability for
14412 being initialized, bail out if not.
14414 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14417 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14418 of bits to ignore when comparing architectures.
14420 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14422 PR tree-optimization/69615
14423 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14424 maximum or minimum of the type, try to merge it also as if
14425 range1 is + [-, x - 1] or + [x + 1, -].
14428 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14430 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14432 PR tree-optimization/86034
14433 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14434 the unsigned bitfield type in a bit insertion sequence if it does not
14435 have a larger precision than the bitfield size.
14436 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14438 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14440 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14442 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14444 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14445 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14446 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14447 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14449 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14451 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14452 Disable -fdelete-null-pointer-checks for ELF toolchain.
14454 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14455 Kito Cheng <kito.cheng@gmail.com>
14457 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14458 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14459 (nds32*-*-*): Add glibc and uclibc conditions.
14460 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14461 (TARGET_EXCEPT_UNWIND_INFO): Define.
14462 * config/nds32/elf.h: New file.
14463 * config/nds32/linux.h: New file.
14464 * config/nds32/nds32-elf.opt: New file.
14465 * config/nds32/nds32-linux.opt: New file.
14466 * config/nds32/nds32-fp-as-gp.c
14467 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14468 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14470 (nds32_asm_file_end): Ditto.
14471 (nds32_print_operand): Ditto.
14472 (nds32_insert_attributes): Ditto.
14473 (nds32_init_libfuncs): New function.
14474 (TARGET_HAVE_TLS): Define.
14475 (TARGET_INIT_LIBFUNCS): Define.
14476 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14478 (TARGET_ELF): Apply different mcmodel setting.
14479 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14480 been migrated into elf.h and linux.h files.
14481 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14482 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14483 (mcmodel): The content has been migrated into nds32-elf.opt and
14484 nds32-linux.opt files.
14485 * config/nds32/t-elf: New file.
14486 * config/nds32/t-linux: New file.
14488 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14489 Shiva Chen <shiva0217@gmail.com>
14491 * config/nds32/constants.md (unspec_volatile_element): Add
14492 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14493 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14495 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14496 (make_pass_nds32_fp_as_gp): Declare.
14497 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14499 (nds32_asm_function_end_prologue): Remove unused asm output.
14500 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14501 (nds32_asm_file_start): Output necessary fp_as_gp information.
14502 (nds32_option_override): Adjust register usage.
14503 (nds32_expand_prologue): Consider fp_as_gp situation.
14504 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14505 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14508 (simple_return): Ditto.
14509 (omit_fp_begin): Output special directive for fp_as_gp.
14510 (omit_fp_end): Output special directive for fp_as_gp.
14511 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14512 mforbid-fp-as-gp): New options.
14514 2018-06-01 Mark Wielaard <mark@klomp.org>
14516 * dwarf2out.c (dwarf2out_finish): Remove generation of
14517 DW_AT_loclists_base.
14519 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14521 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14522 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14523 (struct merged_store_group): Add bit_insertion field.
14524 (dump_char_array): Use standard hexadecimal format.
14525 (merged_store_group::merged_store_group): Set bit_insertion to false.
14526 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14527 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14528 also print the mask in the dump file.
14529 (pass_store_merging::gate): Minor tweak.
14530 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14531 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14532 stores with INTEGER_CST stores.
14533 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14534 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14535 and use it throughout. Generate bit insertion sequences if need be.
14536 (pass_store_merging::process_store): Remove redundant condition.
14537 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14539 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14541 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14542 the 128-bit floating point types. Fix function comment.
14544 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14546 * config/aarch64/aarch64-simd.md
14547 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14549 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14552 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14554 PR tree-optimization/85989
14555 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14557 (backprop::intersect_uses): Check it when deciding whether this
14558 is a backedge reference.
14559 (backprop::process_block): Add each phi to m_visited_phis
14560 after visiting it, then clear it at the end.
14562 2018-06-01 Richard Biener <rguenther@suse.de>
14564 * tree-vectorizer.h (vect_dr_stmt): New function.
14565 (vect_get_load_cost): Adjust.
14566 (vect_get_store_cost): Likewise.
14567 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14568 Use vect_dr_stmt instead of DR_SMTT.
14569 (vect_record_base_alignments): Likewise.
14570 (vect_calculate_target_alignment): Likewise.
14571 (vect_compute_data_ref_alignment): Likewise and make static.
14572 (vect_update_misalignment_for_peel): Likewise.
14573 (vect_verify_datarefs_alignment): Likewise.
14574 (vector_alignment_reachable_p): Likewise.
14575 (vect_get_data_access_cost): Likewise. Pass down
14576 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14577 (vect_get_peeling_costs_all_drs): Likewise.
14578 (vect_peeling_hash_get_lowest_cost): Likewise.
14579 (vect_enhance_data_refs_alignment): Likewise.
14580 (vect_find_same_alignment_drs): Likewise.
14581 (vect_analyze_data_refs_alignment): Likewise.
14582 (vect_analyze_group_access_1): Likewise.
14583 (vect_analyze_group_access): Likewise.
14584 (vect_analyze_data_ref_access): Likewise.
14585 (vect_analyze_data_ref_accesses): Likewise.
14586 (vect_vfa_segment_size): Likewise.
14587 (vect_small_gap_p): Likewise.
14588 (vectorizable_with_step_bound_p): Likewise.
14589 (vect_prune_runtime_alias_test_list): Likewise.
14590 (vect_analyze_data_refs): Likewise.
14591 (vect_supportable_dr_alignment): Likewise.
14592 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14593 (vect_gen_prolog_loop_niters): Likewise.
14594 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14595 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14597 (vect_recog_mask_conversion_pattern): Likewise.
14598 (vect_try_gather_scatter_pattern): Likewise.
14599 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14600 to vect_get_store_cost.
14601 (vect_get_store_cost): Get stmt_info instead of DR.
14602 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14603 (vect_get_load_cost): Get stmt_info instead of DR.
14605 2018-06-01 Richard Biener <rguenther@suse.de>
14607 PR middle-end/86017
14608 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14609 vars wrapped in MEM_REFs.
14611 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14613 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14614 Fix subreg tests so that we only return a choice between
14615 GENERAL_REGS and FP_REGS if the original classes included both.
14617 2018-06-01 Richard Biener <rguenther@suse.de>
14620 * tree-ssa-structalias.c (get_function_part_constraint):
14621 Handle NULL fi->decl.
14622 (find_func_aliases_for_call): Properly handle indirect
14623 fi from direct call.
14624 (find_func_clobbers): Likewise.
14625 (ipa_pta_execute): Likewise.
14626 (create_variable_info_for): For functions that are ifunc_resolver
14627 resolve to a varinfo that contains the result of the resolver call.
14628 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14631 2018-05-31 Michael Collison <michael.collison@arm.com>
14633 * config/aarch64/aarch64.md:
14634 (*fix_to_zero_extenddfdi2): New pattern.
14635 * gcc.target/aarch64/fix_extend1.c: New testcase.
14637 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14639 PR middle-end/78809
14640 PR middle-end/83026
14641 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14642 and BUILT_IN_STRNCMP_EQ.
14643 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14644 BUILT_IN_STRNCMP_EQ.
14645 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14646 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14647 (gimple_fold_builtin): Likewise.
14648 * tree-ssa-strlen.c (compute_string_length): New function.
14649 (determine_min_obsize): New function.
14650 (handle_builtin_string_cmp): New function to handle calls to
14651 string compare functions.
14652 (strlen_optimize_stmt): Add handling to builtin string compare
14654 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14655 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14656 * tree.c (build_common_builtin_nodes): Add new defines of
14657 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14659 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14662 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14663 functions with naked attribute.
14665 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14667 * config/i386/sse.md (avx_vec_concat<mode>):
14668 Substitute concat_tg_mode mode attribute with xtg_mode.
14669 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14670 (concat_tg_mode): Remove mode attribute.
14672 2018-05-31 Martin Sebor <msebor@redhat.com>
14675 * calls.c (alloc_max_size): Correct a logic error/typo.
14676 Treat excessive arguments as infinite. Warn for invalid arguments.
14677 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14679 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14682 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14683 and movx for Haswell.
14685 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14686 Cesar Philippidis <cesar@codesourcery.com>
14688 PR middle-end/85879
14689 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14690 when emitting error on private/firstprivate reductions.
14691 * omp-low.c (lower_omp_target): Avoid reference-type processing
14692 on pointers for firstprivate clause.
14694 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14696 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14699 * config/aarch64/aarch64-simd.md
14700 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14701 (aarch64_ld1_x3_<mode>): Likewise
14702 (aarch64_st1x2<VALLDIF:mode>): Likewise
14703 (aarch64_st1_x2_<mode>): Likewise
14704 (aarch64_st1x3<VALLDIF:mode>): Likewise
14705 (aarch64_st1_x3_<mode>): Likewise
14706 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14707 (vld1_s8_x3): Likewise.
14708 (vld1_u16_x3): Likewise.
14709 (vld1_s16_x3): Likewise.
14710 (vld1_u32_x3): Likewise.
14711 (vld1_s32_x3): Likewise.
14712 (vld1_u64_x3): Likewise.
14713 (vld1_s64_x3): Likewise.
14714 (vld1_f16_x3): Likewise.
14715 (vld1_f32_x3): Likewise.
14716 (vld1_f64_x3): Likewise.
14717 (vld1_p8_x3): Likewise.
14718 (vld1_p16_x3): Likewise.
14719 (vld1_p64_x3): Likewise.
14720 (vld1q_u8_x3): Likewise.
14721 (vld1q_s8_x3): Likewise.
14722 (vld1q_u16_x3): Likewise.
14723 (vld1q_s16_x3): Likewise.
14724 (vld1q_u32_x3): Likewise.
14725 (vld1q_s32_x3): Likewise.
14726 (vld1q_u64_x3): Likewise.
14727 (vld1q_s64_x3): Likewise.
14728 (vld1q_f16_x3): Likewise.
14729 (vld1q_f32_x3): Likewise.
14730 (vld1q_f64_x3): Likewise.
14731 (vld1q_p8_x3): Likewise.
14732 (vld1q_p16_x3): Likewise.
14733 (vld1q_p64_x3): Likewise.
14734 (vst1_s64_x2): Likewise.
14735 (vst1_u64_x2): Likewise.
14736 (vst1_f64_x2): Likewise.
14737 (vst1_s8_x2): Likewise.
14738 (vst1_p8_x2): Likewise.
14739 (vst1_s16_x2): Likewise.
14740 (vst1_p16_x2): Likewise.
14741 (vst1_s32_x2): Likewise.
14742 (vst1_u8_x2): Likewise.
14743 (vst1_u16_x2): Likewise.
14744 (vst1_u32_x2): Likewise.
14745 (vst1_f16_x2): Likewise.
14746 (vst1_f32_x2): Likewise.
14747 (vst1_p64_x2): Likewise.
14748 (vst1q_s8_x2): Likewise.
14749 (vst1q_p8_x2): Likewise.
14750 (vst1q_s16_x2): Likewise.
14751 (vst1q_p16_x2): Likewise.
14752 (vst1q_s32_x2): Likewise.
14753 (vst1q_s64_x2): Likewise.
14754 (vst1q_u8_x2): Likewise.
14755 (vst1q_u16_x2): Likewise.
14756 (vst1q_u32_x2): Likewise.
14757 (vst1q_u64_x2): Likewise.
14758 (vst1q_f16_x2): Likewise.
14759 (vst1q_f32_x2): Likewise.
14760 (vst1q_f64_x2): Likewise.
14761 (vst1q_p64_x2): Likewise.
14762 (vst1_s64_x3): Likewise.
14763 (vst1_u64_x3): Likewise.
14764 (vst1_f64_x3): Likewise.
14765 (vst1_s8_x3): Likewise.
14766 (vst1_p8_x3): Likewise.
14767 (vst1_s16_x3): Likewise.
14768 (vst1_p16_x3): Likewise.
14769 (vst1_s32_x3): Likewise.
14770 (vst1_u8_x3): Likewise.
14771 (vst1_u16_x3): Likewise.
14772 (vst1_u32_x3): Likewise.
14773 (vst1_f16_x3): Likewise.
14774 (vst1_f32_x3): Likewise.
14775 (vst1_p64_x3): Likewise.
14776 (vst1q_s8_x3): Likewise.
14777 (vst1q_p8_x3): Likewise.
14778 (vst1q_s16_x3): Likewise.
14779 (vst1q_p16_x3): Likewise.
14780 (vst1q_s32_x3): Likewise.
14781 (vst1q_s64_x3): Likewise.
14782 (vst1q_u8_x3): Likewise.
14783 (vst1q_u16_x3): Likewise.
14784 (vst1q_u32_x3): Likewise.
14785 (vst1q_u64_x3): Likewise.
14786 (vst1q_f16_x3): Likewise.
14787 (vst1q_f32_x3): Likewise.
14788 (vst1q_f64_x3): Likewise.
14789 (vst1q_p64_x3): Likewise.
14791 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14793 * config/msp430/msp430.c (msp430_output_labelref): Prepend
14794 user_label_prefix to name.
14796 * tree-core.h: Update comment about the format of NAME string
14797 passed to handler in attribute_spec.
14799 * config/msp430/msp430.md: Remove erroneous subreg expression from
14800 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14801 zero_extend{q,h}isi2.
14803 2018-05-30 Borislav Petkov <bp@suse.de>
14805 * doc/extend.texi: Document some architecture specific
14806 constraints and sort entries.
14808 2018-05-30 Martin Sebor <msebor@redhat.com>
14810 PR middle-end/85369
14811 * builtins.c (expand_builtin_stpcpy_1): New function.
14812 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14813 only if the former succeeds.
14815 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14817 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14820 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14822 * doc/invoke.texi (-flinker-output): Document
14824 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14826 * passes.c (ipa_write_summaries): Only modify statements if body
14828 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14829 incrementally linking.
14830 (ipa_passes): Likewise.
14831 * lto-cgraph.c (lto_output_node): When incrementally linking do not
14832 pass down resolution info.
14833 * common.opt (flag_incremental_link): Update info.
14834 * gcc.c (plugin specs): Turn flinker-output=* to
14835 -plugin-opt=-linker-output-known
14836 * toplev.c (compile_file): Also cut compilation when doing incremental
14838 * flag-types. (enum lto_partition_model): Add
14839 LTO_LINKER_OUTPUT_NOLTOREL.
14840 (invoke.texi): Add -flinker-output docs.
14841 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14842 link same way as WPA; do not stream in dead initializers.
14844 * dwarf2out.c (dwarf2out_die_ref_for_decl,
14845 darf2out_register_external_decl): Support incremental link.
14847 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14849 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14851 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14853 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14854 it down to simple_object_copy_lto_debug_sections.
14855 (run_gcc): Determine incremental LTO link time and configure
14856 lto1 into non-wpa mode, disable renaming of debug sections.
14858 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
14860 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14861 descriptions of various incorrectly documented functions.
14863 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
14866 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14867 address check not strict.
14869 2018-05-30 Richard Biener <rguenther@suse.de>
14871 PR tree-optimization/85964
14872 * tracer.c (better_p): Drop initialized count check, we only
14873 call the function with initialized counts now.
14874 (find_best_successor): Do find a best edge if one
14875 has uninitialized count.
14876 (find_best_predecessor): Likewise. Do BB frequency check only
14877 if count is initialized.
14879 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
14881 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14882 (aarch64_ldrstr_offset_compare): New.
14883 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14884 load/store orderings.
14885 (aarch64_gen_adjusted_ldpstp): Likewise.
14887 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
14889 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14890 Check for subset of GENERAL_REGS and FP_REGS.
14891 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14894 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
14896 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14897 and wi::to_poly_offset. Add the current offset and then check
14898 whether the sum fits, rather than using an unchecked addition of
14899 a checked term. Check for a shwi rather than a uhwi.
14900 * expr.c (get_bit_range): Use tree_to_poly_uint64.
14901 (store_constructor): Use poly_int_tree_p.
14902 (expand_expr_real_1): Likewise.
14903 * function.c (assign_temp): Likewise.
14904 * fold-const.c (const_binop): Use poly_int_tree_p and
14905 wi::to_poly_offset.
14906 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
14908 * ipa-icf-gimple.c (func_checker::compare_operand): Use
14909 to_poly_offset for MEM offsets.
14910 * ipa-icf.c (sem_variable::equals): Likewise.
14911 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14912 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14913 wi::to_poly_offset for BIT_FIELD_REF offsets.
14914 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14915 wi::to_poly_offset.
14916 * var-tracking.c (emit_note_insn_var_location): Use
14917 tree_to_poly_uint64.
14919 2018-05-29 Jim Wilson <jimw@sifive.com>
14921 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14923 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
14926 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14927 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14929 (sse4_1_round<mode>2): Use nonimmediate_operand
14930 for operand 1 predicate.
14932 2018-05-29 Martin Sebor <msebor@redhat.com>
14933 Richard Biener <rguenther@suse.de>
14936 * calls.c (get_size_range): Call determine_value_range instead
14937 of get_value_range..
14938 * tree-vrp.h (determine_value_range): Declared new function.
14939 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14941 2018-05-29 Richard Biener <rguenther@suse.de>
14943 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14944 sure to use non-pattern stmts for get_earlier_stmt arguments.
14945 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14946 called on pattern stmts.
14947 (get_later_stmt): Likewise.
14949 2018-05-29 Martin Liska <mliska@suse.cz>
14951 PR gcov-profile/85759
14952 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14955 2018-05-29 Jakub Jelinek <jakub@redhat.com>
14957 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14959 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14963 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14964 VEC_PACK_FLOAT_EXPR): New tree codes.
14965 * tree-pretty-print.c (op_code_prio): Handle
14966 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14967 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14968 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14969 * tree-inline.c (estimate_operator_cost): Likewise.
14970 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14971 * fold-const.c (const_binop): Likewise.
14972 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14973 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14974 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14975 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14976 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14977 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14978 * expr.c (expand_expr_real_2): Likewise.
14979 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14980 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14981 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14983 * optabs.c (expand_widen_pattern_expr): For
14984 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14985 sign from result type rather than operand's type.
14986 (expand_binop_directly): For vec_packu_float_optab and
14987 vec_packs_float_optab allow result type to be different from operand's
14989 * optabs-tree.c (optab_for_tree_code): Handle
14990 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14991 VEC_PACK_FLOAT_EXPR. Formatting fixes.
14992 * tree-vect-generic.c (expand_vector_operations_1): Handle
14993 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14994 VEC_PACK_FLOAT_EXPR.
14995 * tree-vect-stmts.c (supportable_widening_operation): Handle
14997 (supportable_narrowing_operation): Handle FLOAT_EXPR.
14998 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14999 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15000 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15001 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15003 (vec_pack<floatprefix>_float_<mode>): New expander.
15004 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15006 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15007 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15008 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15009 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15010 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15012 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15013 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15014 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15015 VEC_PACK_FLOAT_EXPR): Document.
15017 2018-05-29 Richard Biener <rguenther@suse.de>
15019 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15021 (stmt_vec_info_vec): Make pointer.
15022 (init_stmt_vec_info_vec): Remove.
15023 (free_stmt_vec_info_vec): Likewise.
15024 (set_stmt_vec_info_vec): New function.
15025 (free_stmt_vec_infos): Likewise.
15026 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15027 (set_vinfo_for_stmt): Likewise.
15028 (get_earlier_stmt): Likewise.
15029 (get_later_stmt): Likewise.
15030 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15031 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15032 (vec_info::~vec_info): Free stmt_vec_infos.
15033 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15034 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15035 (pass_slp_vectorize::execute): Likewise.
15036 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15037 (free_stmt_vec_info_vec): Likewise.
15038 (set_stmt_vec_info_vec): New function.
15039 (free_stmt_vec_infos): Likewise.
15040 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15041 the global stmt_vec_info_vec.
15042 * tree-parloops.c (gather_scalar_reductions): Use
15043 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15046 2018-05-29 Richard Biener <rguenther@suse.de>
15048 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15050 2018-05-29 Martin Liska <mliska@suse.cz>
15051 David Malcolm <dmalcolm@redhat.com>
15053 * vec.c (test_reverse): New.
15054 (vec_c_tests): Add new test.
15055 * vec.h (vl_ptr>::reverse): New function.
15057 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15059 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15061 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15064 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15066 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15068 2018-05-28 Richard Biener <rguenther@suse.de>
15070 PR tree-optimization/85933
15071 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15072 look at stmts marked as vectorizable.
15074 2018-05-28 Richard Biener <rguenther@suse.de>
15076 PR tree-optimization/85934
15077 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15078 vector boolean check before scalar optimization.
15080 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15082 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15085 2018-05-28 Mark Wielaard <mark@klomp.org>
15087 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15088 if it is an expression containing a minus sign.
15090 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15092 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15094 2018-05-27 Paul Koning <ni1d@arrl.net>
15096 * config/pdp11/pdp11.md (truncsihi2): Remove.
15098 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15099 Chung-Ju Wu <jasonwucj@gmail.com>
15101 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15103 (unaligned_store_dw): Ditto.
15104 * config/nds32/nds32-memory-manipulation.c
15105 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15106 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15107 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15108 (emit_setmem_word_loop): Rename to ...
15109 (emit_setmem_doubleword_loop): ... this.
15110 (nds32_gen_dup_4_byte_to_word_value): New function.
15111 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15112 (nds32_expand_setmem_loop): Refine implementation.
15113 (nds32_expand_setmem_loop_v3m): Ditto.
15114 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15117 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15119 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15121 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15123 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15124 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15125 machine->attr_no_prologue_p.
15126 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15127 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15128 (nds32_expand_epilogue): Consider attr_naked_p.
15129 (nds32_expand_epilogue_v3pop): Likewise.
15130 (nds32_can_use_return_insn): Likewise.
15131 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15132 attr_no_prologue_p fields.
15133 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15135 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15138 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15140 * config/i386/sse.md
15141 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15143 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15145 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15147 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15149 (*<floatsuffix>floatv2div2sf2): Rename to ...
15150 (*float<floatunssuffix>v2div2sf2): ... this.
15151 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15152 (float<floatunssuffix>v2div2sf2_mask): ... this.
15153 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15154 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15155 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15157 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15159 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15161 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15163 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15165 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15167 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15168 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15169 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15170 gen_ufix_truncv8dfv8si2.
15171 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15172 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15173 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15174 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15175 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15176 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15177 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15178 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15180 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15184 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15186 2018-05-25 Jim Wilson <jimw@sifive.com>
15188 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15189 * config/riscv/riscv.c (struct machine_function): Add
15190 interrupt_handler_p and attribute_checked_p fields.
15191 (riscv_attribute_table): Add interrupt.
15192 (riscv_interrupt_type_p): New.
15193 (riscv_save_reg_p): Save extra regs for interrupt handler.
15194 (riscv_use_save_libcall): Return false for interrupt handler.
15195 (riscv_first_stack_step): Add forward declaration.
15196 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15197 for interrupt handler with large frame. Use it for saved reg list.
15198 (riscv_expand_prologue): Move flag_stack_usage_info support to
15199 eliminate duplication.
15200 (riscv_expand_epilogue): Generate mret for interrupt handler.
15201 (riscv_epilogue_uses): New.
15202 (riscv_can_use_return_insn): Return false for interrupt handler.
15203 (riscv_function_ok_for_sibcall): Likewise.
15204 (riscv_set_current_function): Add interrupt handler support.
15205 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15206 * config/riscv/riscv.md (UNSPECV_MRET): New.
15208 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15210 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15212 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15214 PR tree-optimization/85712
15215 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15216 this candidate has already been replaced in-situ by a copy.
15218 2018-05-25 Jason Merrill <jason@redhat.com>
15220 PR c++/80485 - inline function non-zero address.
15221 * symtab.c (nonzero_address): Check DECL_COMDAT.
15223 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15226 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15227 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15228 extension of SImode operation. Use const123_operand predicate.
15229 (*saddsi_1): Remove.
15230 (*saddl_se_1): Ditto.
15231 (*ssubsi_1): Ditto.
15232 (*ssubl_se_1): Ditto.
15233 * config/alpha/predicates.md (const123_operand): New predicate.
15234 * config/alpha/constraints.md (P): Use IN_RANGE.
15236 2018-05-25 Richard Biener <rguenther@suse.de>
15238 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15240 (ref_maybe_used_by_stmt_p): Likewise.
15241 (stmt_may_clobber_ref_p): Likewise.
15242 (stmt_may_clobber_ref_p_1): Likewise.
15243 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15245 (ref_maybe_used_by_stmt_p): Likewise.
15246 (stmt_may_clobber_ref_p): Likewise.
15247 (stmt_may_clobber_ref_p_1): Likewise.
15248 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15249 the alias oracle to disambiguate DRs with stmts DR analysis
15251 (vect_analyze_data_refs): Do not give up on not analyzable
15252 DRs for BB vectorization. Remove code truncating the dataref
15255 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15258 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15259 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15260 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15262 2018-05-25 Richard Biener <rguenther@suse.de>
15264 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15265 function, combining stmt data ref gathering and fatal analysis
15267 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15268 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15269 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15270 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15271 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15273 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15275 PR tree-optimization/85720
15276 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15277 SCC if all partitions are builtins.
15278 (version_loop_by_alias_check): New parameter. Generate cancelable
15279 runtime alias check if all partitions are builtins.
15280 (distribute_loop): Update call to above function.
15282 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15284 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15285 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15286 (parm_default_def_partition_arg): Ditto.
15287 (set_parm_default_def_partition): Ditto.
15288 (get_parm_default_def_partitions): Ditto and make it static.
15289 (get_undefined_value_partitions): Ditto and make it static.
15290 (remove_ssa_form): Refactor call to init_var_map here.
15291 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15292 computation for loop region.
15293 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15294 (register_default_def): Delete.
15295 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15296 (parm_default_def_partition_arg): Ditto.
15297 (set_parm_default_def_partition): Ditto.
15298 (get_parm_default_def_partitions): Ditto and make it static.
15299 (get_undefined_value_partitions): Ditto and make it static.
15300 (coalesce_with_default, coalesce_with_default): Update comment.
15301 (create_coalesce_list_for_region): New func factored out from
15302 create_outofssa_var_map.
15303 (populate_coalesce_list_for_outofssa): New func factored out from
15304 create_outofssa_var_map and coalesce_ssa_name.
15305 (create_outofssa_var_map): Delete.
15306 (coalesce_ssa_name): Refactor to support live range computation.
15307 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15308 (get_parm_default_def_partitions): Delete.
15309 (get_undefined_value_partitions): Ditto.
15310 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15311 computation for loop region.
15312 (new_tree_live_info, loe_visit_block): Ditto.
15313 (live_worklist, set_var_live_on_entry): Ditto.
15314 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15315 * tree-ssa-live.h (struct _var_map): New fields.
15316 (init_var_map): Change decl.
15317 (region_contains_p): New.
15319 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15321 * tree-ssa-live.h (live_merge_and_clear): Delete.
15323 2018-05-25 Richard Biener <rguenther@suse.de>
15326 * tree-dump.c (dequeue_and_dump): Remove access to removed
15327 operand 2 of a SWITCH_EXPR.
15329 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15331 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15332 multiplication and division.
15333 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15334 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15335 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15336 (cond_udiv_optab, cond_umod_optab): New optabs.
15337 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15338 (IFN_COND_RDIV): New internal functions.
15339 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15340 TRUNC_MOD_EXPR and RDIV_EXPR.
15341 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15342 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15344 (SVE_INT_BINARY): Include mult.
15345 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15346 (optab, sve_int_op): Handle mult.
15347 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15349 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15350 for SVE_INT_BINARY_SD.
15352 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15354 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15355 (optab, sve_int_op): Handle div and udiv.
15356 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15357 for SVE_INT_BINARY_SD.
15358 (*<optab><mode>3): New insn for the same.
15360 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15362 * tree-vect-patterns.c: Include predict.h.
15363 (vect_recog_divmod_pattern): Restrict check for division support
15364 to when optimizing for size.
15366 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15368 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15369 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15370 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15371 (gimple_match_op::set_op): Likewise.
15372 (gimple_resimplify4): Declare.
15373 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15374 (expr::gen_transform): Likewise.
15375 (decision_tree::gen): Generate a simplification routine for 4 operands.
15376 * gimple-match-head.c (gimple_simplify): Add an overload for
15377 4 operands. In the top-level function, handle up to 4 call
15378 arguments and call gimple_resimplify4.
15379 (gimple_resimplify4): New function.
15380 (build_call_internal): Pass a fourth operand.
15381 (maybe_push_to_seq): Likewise.
15382 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15383 Fold VEC_COND_EXPRs of an operation and a default value into
15384 an IFN_COND_* function if possible.
15385 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15387 (SVE_COND_FP_BINARY): Include them.
15388 (optab, sve_fp_op): Handle them.
15389 (SVE_INT_BINARY_REV): New code iterator.
15390 (SVE_COND_FP_BINARY_REV): New int iterator.
15391 (commutative): New int attribute.
15392 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15394 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15396 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15397 (*cond_<optab><mode>): New patterns for reversed operands.
15399 2018-05-25 Richard Biener <rguenther@suse.de>
15401 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15402 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15403 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15404 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15405 * tree-vect-data-refs.c (everywhere): Adjust users.
15406 * tree-vect-loop.c (everywhere): Likewise.
15407 * tree-vect-slp.c (everywhere): Likewise.
15408 * tree-vect-stmts.c (everywhere): Likewise.
15409 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15411 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15413 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15415 (gcc_cv_as_section_exclude): ... this.
15416 Try Solaris as #exclude syntax.
15417 * configure: Regenerate.
15418 * config.in: Regenerate.
15419 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15421 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15422 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15424 * varasm.c (default_elf_asm_named_section): Don't check if
15425 HAVE_GAS_SECTION_EXCLUDE is defined.
15427 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15429 * doc/md.texi: Update the documentation of the cond_* optabs
15430 to mention the new final operand. Fix GET_MODE_NUNITS call.
15431 Describe the scalar case too.
15432 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15433 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15435 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15436 (get_conditional_internal_fn): Update comment.
15437 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15438 accumulator value as a final argument to conditional functions.
15439 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15440 a define_expand and add an "else" operand. Assert for now that
15441 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15442 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15443 (*cond_<optab><mode>): New patterns.
15444 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15445 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15446 (UNSPEC_COND_EOR): Delete.
15447 (optab): Remove associated mappings.
15448 (SVE_INT_BINARY): New code iterator.
15449 (sve_int_op): Remove int attribute and add "minus" to the code
15451 (SVE_COND_INT_OP): Delete.
15452 (SVE_COND_FP_OP): Rename to...
15453 (SVE_COND_FP_BINARY): ...this.
15455 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15457 * optabs.c (can_reuse_operands_p): New function.
15458 (maybe_legitimize_operands): Try to reuse the results for
15461 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15463 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15464 Add {q} suffix to insn mnemonic.
15466 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15468 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15469 (msp430_warn_func_return): New.
15471 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15473 * fold-const.c (tree_nonzero_bits): New function.
15474 * fold-const.h (tree_nonzero_bits): Likewise.
15475 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15476 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15478 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15482 * varasm.c (assemble_alias): Check ifunc_resolver only on
15485 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15488 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15489 when memory input operand is handled.
15491 2018-05-24 Luis Machado <luis.machado@linaro.org>
15493 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15495 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15497 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15499 * match.pd: Delay FMA folds until after vectorization.
15501 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15504 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15505 address check not strict.
15507 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15509 * gimple-match.h (gimple_match_op): New class.
15510 (mprts_hook): Replace parameters with a gimple_match_op *.
15511 (maybe_build_generic_op): Likewise.
15512 (gimple_simplified_result_is_gimple_val): Replace parameters with
15513 a const gimple_match_op *.
15514 (gimple_simplify): Replace code_helper * and tree * parameters with
15515 a gimple_match_op * parameter.
15516 (gimple_resimplify1): Replace code_helper *, tree and tree *
15517 parameters with a gimple_match_op * parameter.
15518 (gimple_resimplify2): Likewise.
15519 (gimple_resimplify3): Likewise.
15520 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15521 parameters with a gimple_match_op * parameter.
15522 * gimple-match-head.c (gimple_simplify): Change prototypes of
15523 auto-generated functions to take a gimple_match_op * instead of
15524 separate code_helper * and tree * parameters. Make the same
15525 change in the top-level overload and update calls to the
15526 gimple_resimplify routines. Update calls to the auto-generated
15527 functions and to maybe_push_res_to_seq in the publicly-facing
15528 operation-specific gimple_simplify overloads.
15529 (gimple_match_op::MAX_NUM_OPS): Define.
15530 (gimple_resimplify1): Replace rcode and ops with a single res_op
15531 parameter. Update call to gimple_simplify.
15532 (gimple_resimplify2): Likewise.
15533 (gimple_resimplify3): Likewise.
15534 (mprts_hook): Replace parameters with a gimple_match_op *.
15535 (maybe_build_generic_op): Likewise.
15536 (build_call_internal): Replace type, nargs and ops with
15537 a gimple_match_op *.
15538 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15539 with a single gimple_match_op *. Update calls to mprts_hook,
15540 build_call_internal and gimple_simplified_result_is_gimple_val.
15541 Factor out code that is common to the tree_code and combined_fn cases.
15542 * genmatch.c (expr::gen_transform): Replace tem_code and
15543 tem_ops with a gimple_match_op called tem_op. Update calls
15544 to the gimple_resimplify functions and maybe_push_res_to_seq.
15545 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15546 res_ops. Update call to the gimple_resimplify functions.
15547 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15548 (decision_tree::gen): Make the functions take a gimple_match_op *
15549 called res_op instead of separate res_code and res_ops parameters.
15550 Update call accordingly.
15551 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15552 and ops with a single res_op parameter. Update calls to
15553 maybe_build_generic_op and maybe_push_res_to_seq.
15554 (fold_stmt_1): Update calls to gimple_simplify and
15555 replace_stmt_with_simplification.
15556 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15557 and gimple_simplified_result_is_gimple_val.
15558 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15560 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15561 with a gimple_match_op *.
15562 (vn_nary_build_or_lookup): Likewise. Update call to
15563 vn_nary_build_or_lookup_1.
15564 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15565 gimple_match_op *. Update calls to the gimple_resimplify routines
15566 and to gimple_simplified_result_is_gimple_val.
15567 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15568 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15569 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15570 (visit_nary_op): Likewise.
15571 (visit_reference_op_load): Likewise.
15573 2018-05-23 Luis Machado <luis.machado@linaro.org>
15575 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15576 modifier for printing the step amount.
15578 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15581 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15584 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15586 * doc/sourcebuild.texi (Endianness): New subsubsection.
15588 2018-05-23 Luis Machado <luis.machado@linaro.org>
15590 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15591 <prefetch_dynamic_strides>: New const bool field.
15592 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15593 prefetch_dynamic_strides.
15594 (exynosm1_prefetch_tune): Likewise.
15595 (thunderxt88_prefetch_tune): Likewise.
15596 (thunderx_prefetch_tune): Likewise.
15597 (thunderx2t99_prefetch_tune): Likewise.
15598 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15600 (aarch64_override_options_internal): Update to set
15601 PARAM_PREFETCH_DYNAMIC_STRIDES.
15602 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15603 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15604 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15605 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15606 prefetch-dynamic-strides setting.
15608 2018-05-23 Luis Machado <luis.machado@linaro.org>
15610 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15611 <minimum_stride>: New const int field.
15612 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15613 minimum_stride field defaulting to -1.
15614 (exynosm1_prefetch_tune): Likewise.
15615 (thunderxt88_prefetch_tune): Likewise.
15616 (thunderx_prefetch_tune): Likewise.
15617 (thunderx2t99_prefetch_tune): Likewise.
15618 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15619 <default_opt_level>: Set to 3.
15620 (aarch64_override_options_internal): Update to set
15621 PARAM_PREFETCH_MINIMUM_STRIDE.
15622 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15623 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15624 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15625 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15626 stride is constant and is below the minimum stride threshold.
15628 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15630 * config/arm/arm-cpus.in (mode26): Delete.
15631 (armv4): Delete mode26 reference.
15632 * config/arm/arm.c (arm_configure_build_target): Delete use of
15635 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15637 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15639 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15640 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15642 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15643 (floatunsdidf2): Ditto.
15645 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15647 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15648 (fixuns_trunc<mode>si2_avx512f): Ditto.
15649 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15650 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15651 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15653 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15655 PR rtl-optimization/79985
15656 * df-scan.c (df_insn_refs_collect): Remove special case for
15657 global registers and asm statements.
15659 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15661 * extend.texi (Global Register Variables): Rewrite the bullet list.
15662 Note that the register is available for allocation. Note that access
15663 via inline asm must use constraints. Add note about async-signal
15664 handlers. Remove paragraph about automagic register selection.
15666 2018-05-23 Richard Biener <rguenther@suse.de>
15668 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15669 of fixed offset from memset VN.
15671 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15673 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15674 first_interp field.
15675 (alloc_cand_and_find_basis): Initialize first_interp field.
15676 (slsr_process_mul): Modify first_interp field.
15677 (slsr_process_add): Likewise.
15678 (slsr_process_cast): Modify first_interp field for each new
15680 (slsr_process_copy): Likewise.
15681 (dump_candidate): Dump first_interp field.
15682 (replace_mult_candidate): Process all interpretations, not just
15684 (replace_rhs_if_not_dup): Likewise.
15685 (replace_one_candidate): Likewise.
15687 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15689 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15691 (aarch64_needs_frame_chain): New function.
15692 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15694 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15697 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15698 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15699 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15700 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15701 as true for strict-align.
15702 (aarch64_can_inline_p): Perform checks even when callee has no
15703 attributes to check for strict alignment.
15704 * doc/extend.texi (AArch64 Function Attributes): Document
15706 * doc/invoke.texi: (AArch64 Options): Likewise.
15708 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15710 PR tree-optimization/85853
15711 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15712 the handling of the root of the node to...
15713 (vect_slp_analyze_node_operations_1): ...this new function,
15714 and run the whole thing with the child nodes' def types
15715 set according to their SLP node's def type.
15717 2018-05-23 Richard Biener <rguenther@suse.de>
15719 PR middle-end/85874
15720 * tree-data-ref.c (create_runtime_alias_checks): Defer
15721 and ignore overflow warnings.
15723 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15725 PR tree-optimization/85822
15726 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15729 2018-05-23 Richard Biener <rguenther@suse.de>
15731 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15732 memset constants via native_interpret_expr.
15734 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15737 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15739 (cgraph_node::create_alias): Likewise.
15740 (cgraph_node::get_availability): Check ifunc_resolver instead
15741 of looking up ifunc attribute.
15742 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15743 * varasm.c (do_assemble_alias): Likewise.
15744 (assemble_alias): Likewise.
15745 (default_binds_local_p_3): Likewise.
15746 * cgraph.h (cgraph_node): Add ifunc_resolver.
15747 (cgraph_node::only_called_directly_or_aliased_p): Return false
15748 for IFUNC resolver.
15749 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15751 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15752 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15753 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15754 instead of looking up ifunc attribute.
15756 2018-05-22 Luis Machado <luis.machado@linaro.org>
15758 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15760 2018-05-22 Martin Sebor <msebor@redhat.com>
15762 PR middle-end/85359
15763 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15764 only when expasion succeeds.
15765 (expand_builtin_strcmp): Same.
15766 (expand_builtin_strncmp): Same.
15768 2018-05-22 Martin Sebor <msebor@redhat.com>
15770 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15772 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15773 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15775 * config/aarch64/aarch64-ldpstp.md: Replace uses of
15776 aarch64_mem_pair_operand with memory_operand and delete operand swapping
15778 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15779 Add check for legitimate_address.
15780 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15781 (aarch64_swap_ldrstr_operands): New.
15782 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15785 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15786 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15788 * config/aarch64/aarch64.md: New patterns to generate stp
15790 (store_pair_sw, store_pair_dw): New patterns to generate stp for
15791 single words and double words.
15792 (load_pair_sw, load_pair_dw): Likewise.
15793 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15795 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15797 * config/aarch64/aarch64-ldpstp.md: Modify peephole
15798 for different mode ldpstp and add peephole for merged zero stores.
15799 Likewise for loads.
15800 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15802 (aarch64_gen_store_pair): Rename calls to match new patterns.
15803 (aarch64_gen_load_pair): Rename calls to match new patterns.
15804 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15805 (load_pair<DREG:mode><DREG2:mode>): ... This.
15806 (store_pair<mode>): Rename to...
15807 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15808 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15809 New mode iterators.
15810 (V_INT_EQUIV): Handle SImode.
15811 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15814 2018-05-22 Martin Sebor <msebor@redhat.com>
15817 * calls.c (maybe_warn_nonstring_arg): Use string length to set
15818 or ajust the presumed bound on an operation to avoid unnecessary
15821 2018-05-22 Martin Sebor <msebor@redhat.com>
15823 PR tree-optimization/85826
15824 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15825 assuming that a DECL necesarily has a constant size.
15827 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
15829 PR middle-end/85862
15830 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15832 2018-05-22 Richard Biener <rguenther@suse.de>
15834 PR tree-optimization/85834
15835 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15836 non-constant and non-zero memset arguments.
15838 2018-05-22 Martin Liska <mliska@suse.cz>
15841 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15843 2018-05-22 Richard Biener <rguenther@suse.de>
15845 PR tree-optimization/85863
15846 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15847 comparisons when vectype is specified.
15848 (vectorizable_condition): Do not specify vectype for
15849 vect_is_simple_cond when SLP vectorizing.
15851 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
15854 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15855 define __ibm128 as long double.
15856 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15857 as a distinct type when IEEE 128-bit support is enabled.
15858 (init_float128_ieee): Fix up conversions between IFmode and IEEE
15859 128-bit types to use the correct functions.
15860 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15861 convert between 128-bit floating point types that have different
15862 modes but the same representation, instead of using gen_lowpart to
15864 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15866 (IFKF_reg): New attributes to give the register constraints for
15868 (extend<mode>tf2_internal): New insns to mark an explicit
15869 conversion between 128-bit floating point types that have a
15870 different mode but share the same representation.
15872 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
15874 PR tree-optimization/85814
15875 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15876 a null return from get_strinfo when unsharing the next
15877 strinfo in the chain.
15879 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15882 * varasm.c (weak_finish): Clean up weak_decls.
15884 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15886 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15887 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15888 UNSPEC_UADALP values.
15889 * config/aarch64/iterators.md (ABAL): New int iterator.
15892 (sur): Add mappings for the above.
15893 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15895 (aarch64_<sur>abal<mode>_4): Likewise.
15896 (aarch64_<sur>adalp<mode>_3): Likewise.
15897 (<sur>sadv16qi): New define_expand.
15899 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
15901 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15902 (*movdf_internal): Ditto.
15903 (*rcpsf2_sse): Ditto.
15904 (*rsqrtsf2_sse): Ditto.
15905 (*sqrt<mode>2_sse): Ditto.
15907 2018-05-21 Tamar Christina <tamar.christina@arm.com>
15909 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15911 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15912 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15913 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15914 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15916 * config/aarch64/arm_neon.h: Likewise.
15917 * config/aarch64/iterators.md (VQ_I): New.
15919 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
15921 * config.gcc: Add arc/t-multilib-linux to tmake_file for
15923 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15926 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
15928 * config/nds32/constraints.md (S): New constraint.
15929 * config/nds32/nds32.md (call_internal): Use constraint S.
15930 (call_value_internal): Likewise.
15931 (sibcall_internal): Likewise.
15932 (sibcall_value_internal): Likewise.
15934 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15935 Chung-Ju Wu <jasonwucj@gmail.com>
15937 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15938 into consideration.
15940 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15941 Chung-Ju Wu <jasonwucj@gmail.com>
15943 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15944 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15945 (nds32_rtx_costs_impl): Simplify.
15946 (nds32_address_cost_impl): Simplify.
15947 (nds32_init_rtx_costs): New function.
15948 (nds32_rtx_costs_speed_prefer): Likewise.
15949 (nds32_rtx_costs_size_prefer): Likewise.
15950 (nds32_address_cost_speed_prefer): Likewise.
15951 (nds32_address_cost_speed_fwprop): Likewise.
15952 (nds32_address_cost_size_prefer): Likewise.
15953 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15954 * config/nds32/nds32.c (nds32_option_override): Use
15955 nds32_init_rtx_costs function.
15957 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
15959 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15960 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15961 (TARGET_PIPELINE_N8): Likewise.
15962 (TARGET_PIPELINE_N10): Likewise.
15963 (TARGET_PIPELINE_N13): Likewise.
15964 (TARGET_PIPELINE_GRAYWOLF): Likewise.
15966 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
15968 * config/nds32/nds32-fpu.md: Update copyright year.
15970 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15972 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15974 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15976 * config/nds32/nds32.c
15977 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15978 * config/nds32/nds32.opt (minline-asm-r15): New option.
15980 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
15982 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15984 * config/nds32/nds32.md (abssi2): New pattern.
15986 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
15988 * config/i386/i386.md (rex64namesuffix): New mode attribute.
15989 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15990 Merge insn pattern from sse_cvtsi2ss<round_name> and
15991 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15992 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15993 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15994 using SWI48 mode iterator.
15995 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15996 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15997 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15998 pattern from sse_cvttss2si<round_saeonly_name>
15999 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16000 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16001 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16002 using SWI48 mode iterator.
16003 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16004 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16005 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16006 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16007 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16008 using SWI48 mode iterator.
16009 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16010 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16011 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16012 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16013 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16014 SWI48 mode iterator.
16015 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16016 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16017 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16018 pattern from sse_cvttsd2si<round_saeonly_name>
16019 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16021 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16023 * config/nds32/nds32-md-auxiliary.c
16024 (nds32_valid_smw_lwm_base_p): Refine.
16025 (nds32_output_smw_single_word): Refine.
16026 (nds32_output_smw_double_word): New.
16027 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16029 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16031 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16032 (nds32_output_stack_pop): Refine.
16033 (nds32_expand_unaligned_load): Refine.
16034 (nds32_expand_unaligned_store): Refine.
16036 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16037 Chung-Ju Wu <jasonwucj@gmail.com>
16039 * config/nds32/constants.md: Add TP_REGNUM constant.
16040 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16041 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16043 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16044 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16045 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16046 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16047 and PIC code generation.
16048 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16050 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16052 * config/nds32/nds32.md: Support TLS and PIC.
16053 * config/nds32/nds32.c: Support TLS and PIC.
16054 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16055 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16058 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16060 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16061 mode with E_ prefix.
16063 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16064 Chung-Ju Wu <jasonwucj@gmail.com>
16066 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16067 * config/nds32/nds32-md-auxiliary.c
16068 (symbolic_reference_mentioned_p): New.
16069 (nds32_legitimize_ict_address): New.
16070 (nds32_expand_ict_move): New.
16071 (nds32_indirect_call_referenced_p): New.
16072 (nds32_symbol_binds_local_p): Delete.
16073 (nds32_long_call_p): Modify.
16074 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16075 * config/nds32/nds32-protos.h
16076 (symbolic_reference_mentioned_p): Declare.
16077 (nds32_legitimize_ict_address): Declare.
16078 (nds32_expand_ict_move): Declare.
16079 (nds32_indirect_call_referenced_p): Declare.
16080 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16081 (nds32_relax_group): Use nds32_ict_const_p as condition.
16082 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16083 (nds32_asm_file_start): Output ict_model directive in asm code.
16084 (nds32_legitimate_address_p): Consider indirect call.
16085 (nds32_print_operand): Consider indirect call.
16086 (nds32_print_operand_address): Consider indirect call.
16087 (nds32_insert_attributes): Handle "indirect_call" attribute.
16088 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16089 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16090 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16091 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16092 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16093 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16094 (TARGET_ICT_MODEL_SMALL): Define.
16095 (TARGET_ICT_MODEL_LARGE): Define.
16096 * config/nds32/nds32.md (movsi): Consider ict model.
16097 (call, call_value): Consider ict model.
16098 (sibcall, sibcall_value): Consider ict model.
16099 * config/nds32/nds32.opt (mict-model): New option.
16100 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16103 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16104 Monk Chiang <sh.chiang04@gmail.com>
16105 Jim Wilson <jimw@sifive.com>
16107 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16108 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16109 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16110 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16111 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16112 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16113 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16114 compute save_libcall_adjustment properly.
16115 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16116 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16117 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16118 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16119 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16120 (ABI_SPEC): Handle mabi=ilp32e.
16121 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16122 (RVE): Add RVE mask.
16123 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16124 <-march>: Add rv32e as an example.
16126 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16129 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16130 (intra_create_variable_infos): Handle C++ constructors.
16132 2018-05-18 Martin Liska <mliska@suse.cz>
16134 * passes.def: Remove a redundant pass.
16136 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16139 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16141 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16143 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16145 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16147 (armv2, armv2a, armv3, armv3m): Delete architectures.
16148 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16149 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16150 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16152 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16153 (*mulsidi3adddi): Likewise.
16154 (mulsidi3): Likewise.
16155 (*mulsidi3_nov6): Likewise.
16156 (umulsidi3): Likewise.
16157 (umulsidi3_nov6): Likewise.
16158 (umaddsidi4): Likewise.
16159 (*umulsidi3adddi): Likewise.
16160 (smulsi3_highpart): Likewise.
16161 (*smulsi3_highpart_nov6): Likewise.
16162 (umulsi3_highpart): Likewise.
16163 (*umulsi3_highpart_nov6): Likewise.
16164 * config/arm/arm.h (arm_arch3m): Delete.
16165 * config/arm/arm.c (arm_arch3m): Delete.
16166 (arm_option_override_internal): Update armv3-related comment.
16167 (arm_configure_build_target): Delete use of isa_bit_mode32.
16168 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16169 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16170 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16171 (mulsa3): Likewise.
16172 (mulusa3): Likewise.
16173 * config/arm/arm-protos.h (arm_arch3m): Delete.
16174 * config/arm/arm-tables.opt: Regenerate.
16175 * config/arm/arm-tune.md: Likewise.
16176 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16177 deleted architectures.
16179 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16181 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16182 (armv5t, armv5te): New features.
16183 (ARMv5, ARMv5e): Delete fgroups.
16184 (ARMv5t, ARMv5te): Adjust for above changes.
16185 (ARMv6m): Likewise.
16186 (armv5, armv5e): Delete arches.
16187 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16189 (*call_reg_arm): Likewise.
16190 (*call_value_reg_armv5): Likewise.
16191 (*call_value_reg_arm): Likewise.
16192 (*call_symbol): Likewise.
16193 (*call_value_symbol): Likewise.
16194 (*sibcall_insn): Likewise.
16195 (*sibcall_value_insn): Likewise.
16196 (clzsi2): Likewise.
16197 (prefetch): Likewise.
16198 (define_split and define_peephole2 dependent on arm_arch5):
16200 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16202 (TARGET_ARM_QBIT): Likewise.
16203 (TARGET_DSP_MULTIPLY): Likewise.
16204 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16205 (arm_arch5, arm_arch5e): Delete.
16206 (arm_arch5t, arm_arch5te): Declare.
16207 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16208 (arm_arch5t): Declare.
16209 (arm_option_reconfigure_globals): Update for the above.
16210 (arm_options_perform_arch_sanity_checks): Update comment, replace
16211 use of arm_arch5 with arm_arch5t.
16212 (use_return_insn): Likewise.
16213 (arm_emit_call_insn): Likewise.
16214 (output_return_instruction): Likewise.
16215 (arm_final_prescan_insn): Likewise.
16216 (arm_coproc_builtin_available): Likewise.
16217 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16218 arm_arch5e with arm_arch5t and arm_arch5te.
16219 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16220 (arm_arch5t, arm_arch5te): Declare.
16221 * config/arm/arm-tables.opt: Regenerate.
16222 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16223 * config/arm/t-multilib: Likewise.
16224 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16225 instead of arm_arch5.
16226 (*call_reg_thumb1): Likewise.
16227 (*call_value_reg_thumb1_v5): Likewise.
16228 (*call_value_reg_thumb1): Likewise.
16229 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16231 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16233 2018-05-18 Martin Liska <mliska@suse.cz>
16235 PR gcov-profile/84846
16236 * doc/gcov.texi: Document -t option of gcov tool.
16238 2018-05-18 Martin Liska <mliska@suse.cz>
16240 PR gcov-profile/84846
16241 * gcov.c (print_usage): Add new -t option.
16242 (process_args): Handle the option.
16243 (generate_results): Use stdout as output when requested by
16246 2018-05-18 Martin Liska <mliska@suse.cz>
16248 PR gcov-profile/84846
16249 * coverage.c (coverage_init): Write PWD to .gcno file.
16250 * doc/gcov.texi: Document how working directory is printed.
16251 * gcov-dump.c (dump_gcov_file): Print PWD.
16252 * gcov.c (output_intermediate_file): Likewise.
16253 (read_graph_file): Read PWD string.
16254 (output_lines): Print PWD.
16256 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16258 PR middle-end/85817
16259 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16260 for retval and return false if all args to phi are zero.
16262 2018-05-18 Richard Biener <rguenther@suse.de>
16264 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16266 (evrp_dom_walker::before_dom_children): Call it.
16268 2018-05-18 Richard Biener <rguenther@suse.de>
16270 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16271 results when processing array refs with variable index.
16273 2018-05-18 Toon Moene <toon@moene.org>
16275 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16276 directly after that of -floop-interchange. Indicate that both
16277 options are enabled by default when specifying -O3.
16279 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16281 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16282 iterator. Delete separate integer-mode vec_set<mode> expander.
16283 (aarch64_simd_vec_setv2di): Delete.
16284 (vec_setv2di): Delete.
16285 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16286 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16287 the "w, r" alternative.
16289 2018-05-18 Martin Liska <mliska@suse.cz>
16291 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16292 * tree-pass.h (make_pass_lower_switch_O0): New function.
16293 * tree-switch-conversion.c (node_has_low_bound): Remove.
16294 (node_has_high_bound): Likewise.
16295 (node_is_bounded): Likewise.
16296 (class pass_lower_switch): Make it a template type and create
16298 (pass_lower_switch::execute): Add template argument.
16299 (make_pass_lower_switch): New function.
16300 (make_pass_lower_switch_O0): New function.
16301 (do_jump_if_equal): Remove.
16302 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16303 all the hard work to tree optimization passes.
16305 2018-05-18 Martin Liska <mliska@suse.cz>
16307 * dbgcnt.c (limit_low): Renamed from limit.
16308 (limit_high): New variable.
16309 (dbg_cnt_is_enabled): Check for upper limit.
16310 (dbg_cnt): Adjust dumping.
16311 (dbg_cnt_set_limit_by_index): Add new argument for high
16313 (dbg_cnt_set_limit_by_name): Likewise.
16314 (dbg_cnt_process_single_pair): Parse new format.
16315 (dbg_cnt_process_opt): Use strtok.
16316 (dbg_cnt_list_all_counters): Remove 'value' and add
16318 * doc/invoke.texi: Document changes.
16320 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16322 * doc/sourcebuild.texi (scalar_all_fma): Document.
16323 * tree.def (FMA_EXPR): Delete.
16324 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16325 * internal-fn.c (ternary_direct): New macro.
16326 (expand_ternary_optab_fn): Likewise.
16327 (direct_ternary_optab_supported_p): Likewise.
16328 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16329 * builtins.c (fold_builtin_fma): Delete.
16330 (fold_builtin_3): Don't call it.
16331 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16332 * expr.c (expand_expr_real_2): Likewise.
16333 * fold-const.c (operand_equal_p): Likewise.
16334 (fold_ternary_loc): Likewise.
16335 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16336 * gimple.c (DEFTREECODE): Likewise.
16337 * gimplify.c (gimplify_expr): Likewise.
16338 * optabs-tree.c (optab_for_tree_code): Likewise.
16339 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16340 * tree-eh.c (operation_could_trap_p): Likewise.
16341 (stmt_could_throw_1_p): Likewise.
16342 * tree-inline.c (estimate_operator_cost): Likewise.
16343 * tree-pretty-print.c (dump_generic_node): Likewise.
16344 (op_code_prio): Likewise.
16345 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16346 * tree-ssa-operands.c (get_expr_operands): Likewise.
16347 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16348 * fold-const-call.h (fold_fma): Delete.
16349 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16350 CFN_FNMA and CFN_FNMS.
16351 (fold_fma): Delete.
16352 * genmatch.c (combined_fn): New enum.
16353 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16354 (commutative_op): New function.
16355 (commutate): Use it. Handle more than 2 operands.
16356 (dt_operand::gen_gimple_expr): Use commutative_op.
16357 (parser::parse_expr): Allow :c to be used with non-binary
16358 operators if the commutative operand is known.
16359 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16360 CFN_FMS, CFN_FNMA and CFN_FNMS.
16361 (backprop::process_assign_use): Remove FMA_EXPR handling.
16362 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16363 (gen_hsa_fma): New function.
16364 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16365 IFN_FNMA and IFN_FNMS.
16366 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16367 * gimple-fold.h (follow_all_ssa_edges): Declare.
16368 * gimple-fold.c (follow_all_ssa_edges): New function.
16369 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16370 gimple_build interface and use follow_all_ssa_edges to fold the result.
16371 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16372 instead of checking for optabs directly.
16373 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16374 rather than FMA_EXPRs.
16375 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16376 call to IFN_FMA instead of an FMA_EXPR.
16378 2018-05-17 Jim Wilson <jimw@sifive.com>
16380 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16381 sign extended promoted subreg, and the range does not have the sign bit
16382 set, then do a sign extend.
16384 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16385 test, check for sign extended subreg and/or constant operands, and
16386 do a sign extend in that case.
16388 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16390 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16391 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16393 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16394 Change logics_shift_reg to logics_shift_imm.
16395 (thunderx2t99_fp_loadpair_basic): Delete.
16396 (thunderx2t99_fp_storepair_basic): Delete.
16397 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16398 (thunderx2t99_asimd_polynomial): Delete.
16399 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16400 and neon_fp_mul_d_scalar_q.
16401 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16402 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16403 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16404 (thunderx2t99_asimd_lut): Add missing tbl types.
16405 (thunderx2t99_asimd_ext): Delete.
16406 (thunderx2t99_asimd_load1_1_mult): Delete.
16407 (thunderx2t99_asimd_load1_2_mult): Delete.
16408 (thunderx2t99_asimd_load1_ldp): New.
16409 (thunderx2t99_asimd_load1): New.
16410 (thunderx2t99_asimd_load2): Add missing *load2* types.
16411 (thunderx2t99_asimd_load3): New.
16412 (thunderx2t99_asimd_load4): New.
16413 (thunderx2t99_asimd_store1_1_mult): Delete.
16414 (thunderx2t99_asimd_store1_2_mult): Delete.
16415 (thunderx2t99_asimd_store2_mult): Delete.
16416 (thunderx2t99_asimd_store2_onelane): Delete.
16417 (thunderx2t99_asimd_store_stp): New.
16418 (thunderx2t99_asimd_store1): New.
16419 (thunderx2t99_asimd_store2): New.
16420 (thunderx2t99_asimd_store3): New.
16421 (thunderx2t99_asimd_store4): New.
16423 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16425 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16426 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16428 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16429 Segher Boessenkool <segher@kernel.crashing.org>
16432 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16435 2018-05-17 Richard Biener <rguenther@suse.de>
16437 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16438 for pruning loop and prune defs feeding only already visited PHIs.
16440 2018-05-17 Richard Biener <rguenther@suse.de>
16442 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16444 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16445 Richard Biener <rguenther@suse.de>
16447 PR tree-optimization/85793
16448 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16449 for VMAT_ELEMENTWISE.
16451 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16453 * internal-fn.h (lookup_internal_fn): Declare
16454 * internal-fn.c (lookup_internal_fn): New function.
16455 * gimple.c (gimple_build_call_from_tree): Handle calls to
16456 internal functions.
16457 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16458 internal function names.
16459 * tree-pretty-print.c (dump_generic_node): Likewise.
16460 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16462 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16464 * gimple-fold.h (gimple_build): Make the function forms take
16465 combined_fn rather than built_in_function.
16466 (gimple_simplify): Likewise.
16467 * gimple-match-head.c (gimple_simplify): Likewise.
16468 * gimple-fold.c (gimple_build): Likewise.
16469 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16470 rather than gimple_build_call_internal.
16471 (get_initial_defs_for_reduction): Likewise.
16472 (vect_create_epilog_for_reduction): Likewise.
16473 (vectorizable_live_operation): Likewise.
16475 2018-05-17 Martin Liska <mliska@suse.cz>
16477 * gimple-ssa-sprintf.c (format_directive): Do not use
16478 space in between 'G_' and '('.
16480 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16483 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16484 even if the mask is not all ones.
16487 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16489 (ix86_gimple_fold_builtin): Likewise.
16492 * config/i386/i386.c: Include tree-vector-builder.h.
16493 (ix86_vector_shift_count): New function.
16494 (ix86_fold_builtin): Fold shift builtins by scalar count.
16495 (ix86_gimple_fold_builtin): Likewise.
16497 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16498 _mm512_setzero): New intrinsics.
16500 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16501 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16503 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16504 code generation for cases where splatting a value is not useful.
16505 * simplify-rtx.c (simplify_ternary_operation): Simplify
16506 vec_merge across a vec_duplicate and a paradoxical subreg forming
16507 a vector mode to a vec_concat.
16509 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16511 * config.gcc: Support "goldmont-plus".
16512 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16514 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16515 PROCESSOR_GOLDMONT_PLUS.
16516 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16517 (processor_target_table): Add "goldmont-plus".
16518 (PTA_GOLDMONT_PLUS): Define.
16519 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16520 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16521 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16522 (fold_builtin_cpu): Add "goldmont-plus".
16523 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16524 (ix86_option_override_internal): Add "goldmont-plus".
16525 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16526 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16527 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16528 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16530 2018-05-17 Richard Biener <rguenther@suse.de>
16532 PR tree-optimization/85757
16533 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16534 remove defs that only feed that PHI from further processing.
16536 2018-05-16 Jim Wilson <jimw@sifive.com>
16538 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16540 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16542 2018-05-16 Mark Wielaard <mark@klomp.org>
16544 * dwarf2out.c (count_index_strings): New function.
16545 (output_indirect_strings): Call count_index_strings and generate
16546 header for dwarf_version >= 5.
16548 2018-05-16 Mark Wielaard <mark@klomp.org>
16550 * dwarf2out.c (dwarf_FORM): New function.
16551 (set_indirect_string): Use dwarf_FORM.
16552 (reset_indirect_string): Likewise.
16553 (size_of_die): Likewise.
16554 (value_format): Likewise.
16555 (output_die): Likewise.
16556 (add_skeleton_AT_string): Likewise.
16557 (output_macinfo_op): Likewise.
16558 (index_string): Likewise.
16559 (output_index_string_offset): Likewise.
16560 (output_index_string): Likewise.
16561 (count_index_strings): Likewise.
16563 2018-05-16 Carl Love <cel@us.ibm.com>
16565 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16566 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16568 2018-05-16 Martin Jambor <mjambor@suse.cz>
16570 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16571 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16573 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16575 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16576 (fnma<mode>4): Likewise.
16577 (fms<mode>4): Likewise.
16578 (fnms<mode>4): Likewise.
16579 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16580 (aarch64_fnma<mode>4): Likewise.
16581 (aarch64_fms<mode>4): Likewise.
16582 (aarch64_fnms<mode>4): Likewise.
16583 (aarch64_fnmadd<mode>4): Likewise.
16585 2018-05-16 Jason Merrill <jason@redhat.com>
16587 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16589 2018-05-16 Richard Biener <rguenther@suse.de>
16591 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16592 (dump_stmt_cost): Declare.
16593 (add_stmt_cost): Dump cost we add.
16594 (add_stmt_costs): New function.
16595 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16596 No longer exported.
16597 (vect_analyze_stmt): Adjust prototype.
16598 (vectorizable_condition): Likewise.
16599 (vectorizable_live_operation): Likewise.
16600 (vectorizable_reduction): Likewise.
16601 (vectorizable_induction): Likewise.
16602 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16603 cost vector to pass to vectorizable_ and record afterwards.
16604 (vect_model_reduction_cost): Take cost vector argument and adjust.
16605 (vect_model_induction_cost): Likewise.
16606 (vectorizable_reduction): Likewise.
16607 (vectorizable_induction): Likewise.
16608 (vectorizable_live_operation): Likewise.
16609 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16610 SLP_TREE_NUMBER_OF_VEC_STMTS.
16611 (vect_analyze_slp_cost_1): Remove.
16612 (vect_analyze_slp_cost): Likewise.
16613 (vect_slp_analyze_node_operations): Take visited args and
16614 a target cost vector. Avoid processing already visited stmt sets.
16615 (vect_slp_analyze_operations): Use a local cost vector to gather
16616 costs and register those of non-discarded instances.
16617 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16618 (vect_schedule_slp_instance): Remove copying of
16619 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16621 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16622 adding cost. Record cost entry location.
16623 (vect_prologue_cost_for_slp_op): Function to compute cost of
16624 a constant or invariant generated for SLP vect in the prologue,
16625 split out from vect_analyze_slp_cost_1.
16626 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16627 (vect_model_promotion_demotion_cost): Likewise.
16628 (vect_model_store_cost): Likewise, make static.
16629 (vect_model_load_cost): Likewise.
16630 (vectorizable_bswap): Add cost vector arg and adjust.
16631 (vectorizable_call): Likewise.
16632 (vectorizable_simd_clone_call): Likewise.
16633 (vectorizable_conversion): Likewise.
16634 (vectorizable_assignment): Likewise.
16635 (vectorizable_shift): Likewise.
16636 (vectorizable_operation): Likewise.
16637 (vectorizable_store): Likewise.
16638 (vectorizable_load): Likewise.
16639 (vectorizable_condition): Likewise.
16640 (vectorizable_comparison): Likewise.
16641 (can_vectorize_live_stmts): Likewise.
16642 (vect_analyze_stmt): Likewise.
16643 (vect_transform_stmt): Adjust calls to vectorizable_*.
16644 * tree-vectorizer.c: Include gimple-pretty-print.h.
16645 (dump_stmt_cost): New function.
16647 2018-05-16 Richard Biener <rguenther@suse.de>
16649 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16650 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16651 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16652 (check_name): New callback.
16653 (dse_classify_store): Track cycles via a visited bitmap of PHI
16654 defs and simplify handling of in-loop and across loop dead stores
16655 and properly fail for loop-variant refs. Handle byte-tracking with
16656 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16659 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16661 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16662 (vect_get_mask_type_for_stmt): Likewise.
16663 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16665 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16666 to determine the statement's vector type and the vector type that
16667 should be used for calculating nunits. Deal with cases in which
16668 the type has to be deferred.
16669 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16670 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16671 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16672 (vect_determine_vf_for_stmt): New functions, split out from...
16673 (vect_determine_vectorization_factor): ...here.
16674 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16675 (vect_get_mask_type_for_stmt): New functions, split out from
16676 vect_determine_vectorization_factor.
16678 2018-05-16 Richard Biener <rguenther@suse.de>
16680 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16681 verify the [VEC_]COND_EXPR embedded comparison.
16683 2018-05-15 Martin Sebor <msebor@redhat.com>
16685 PR tree-optimization/85753
16686 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16687 RECORD_TYPE in addition to ARRAY_TYPE.
16689 2018-05-15 Martin Sebor <msebor@redhat.com>
16691 PR middle-end/85643
16692 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16694 2018-05-15 Richard Biener <rguenther@suse.de>
16696 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16697 add by_clobber_p one. Change algorithm to collect all defs
16698 representing uses we need to walk and try reducing them to
16699 a single one before failing.
16700 (dse_dom_walker::dse_optimize_stmt): Adjust.
16702 2018-05-13 Mark Wielaard <mark@klomp.org>
16704 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16705 (size_of_loc_descr): Likewise.
16706 (output_loc_operands): Likewise.
16707 (output_loc_operands_raw): Likewise.
16708 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16709 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16710 (hash_loc_operands): Likewise.
16711 (compare_loc_operands): Likewise.
16713 2018-05-14 Mark Wielaard <mark@klomp.org>
16715 * dwarf2out.c (count_index_addrs): New function.
16716 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16718 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16720 PR tree-optimization/83648
16721 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16722 return value as malloc candidate.
16724 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16727 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16728 param as true in call to suggest_attribute.
16730 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16732 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16733 -mreadonly-in-sdata.
16735 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16737 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16739 (aarch64_crypto_aesd_fused): Likewise.
16741 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16743 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16744 (movsi_aarch64): Likewise.
16745 (load_pairsi): Likewise.
16746 (load_pairdi): Likewise.
16747 (store_pairsi): Likewise.
16748 (store_pairdi): Likewise.
16749 (load_pairsf): Likewise.
16750 (load_pairdf): Likewise.
16751 (store_pairsf): Likewise.
16752 (store_pairdf): Likewise.
16753 (zero_extend): Likewise.
16754 (trunc): Swap alternatives.
16755 (fcvt_target): Add '?' to prefer w over r.
16757 2018-05-14 Jakub Jelinek <jakub@redhat.com>
16760 * config/i386/i386.md: Disallow non-commutative arithmetics in
16761 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16762 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
16763 in the peephole2 before it.
16765 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
16767 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16768 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16769 (ix86_handle_option): Handle -mcldemote.
16770 * config.gcc: New header.
16771 * config/i386/cldemoteintrin.h: New file.
16772 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16773 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16775 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16776 OPTION_MASK_ISA_CLDEMOTE.
16777 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16778 (ix86_valid_target_attribute_inner_p): Ditto.
16779 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16780 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16781 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16782 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16783 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16785 * config/i386/i386.opt: Add -mcldemote.
16786 * config/i386/x86intrin.h: New header.
16787 * doc/invoke.texi: Add -mcldemote.
16789 2018-05-14 Richard Biener <rguenther@suse.de>
16791 * doc/match-and-simplify.texi: Adjust :s documentation.
16793 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
16795 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16796 intended memcpy size.
16797 (REORDER_45): Likewise.
16799 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
16801 * sort.cc: New file.
16802 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16803 * vec.c (qsort_chk): Use gcc_qsort.
16804 * Makefile.in (OBJS-libcommon): Add sort.o.
16805 (build/sort.o): New target. Use it...
16806 (BUILD_RTL): ... here, and...
16807 (build/gencfn-macros): ... here, and...
16808 (build/genmatch): ... here.
16810 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16811 Chung-Ju Wu <jasonwucj@gmail.com>
16813 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16814 * config/nds32/nds32-graywolf.md: New file.
16815 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16816 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16818 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16819 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16820 * config/nds32/nds32.md (pipeline_model): Add graywolf.
16821 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16822 * config/nds32/pipelines.md: Include n15 settings.
16824 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16825 Chung-Ju Wu <jasonwucj@gmail.com>
16827 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16828 * config/nds32/nds32-n13.md: New file.
16829 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16830 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16832 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16833 * config/nds32/nds32.md (pipeline_model): Add n13.
16834 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16835 * config/nds32/pipelines.md: Include n13 settings.
16837 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16838 Chung-Ju Wu <jasonwucj@gmail.com>
16840 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16841 * config/nds32/nds32-n10.md: New file.
16842 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16843 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16845 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16846 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16847 * config/nds32/nds32.md (pipeline_model): Add n10.
16848 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16849 * config/nds32/pipelines.md: Include n10 settings.
16851 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
16852 Kito Cheng <kito.cheng@gmail.com>
16853 Chung-Ju Wu <jasonwucj@gmail.com>
16855 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16856 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16857 Add enum values for DSP extension instructions.
16858 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16860 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16861 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16862 New code iterators.
16863 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16864 * config/nds32/nds32-dspext.md: New file for DSP implementation.
16865 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16866 * config/nds32/nds32-intrinsic.md: Likewise.
16867 * config/nds32/nds32_intrinsic.h: Likewise.
16868 * config/nds32/nds32-md-auxiliary.c: Likewise.
16869 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16870 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16871 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16872 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16873 * config/nds32/nds32-protos.h: New declarations for DSP extension.
16874 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16875 TYPE_DMAC in switch statement.
16876 * config/nds32/nds32.c: New checking and implementation for DSP
16877 extension instructions.
16878 * config/nds32/nds32.h: Likewise.
16879 * config/nds32/nds32.md: Likewise.
16880 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16881 * config/nds32/predicates.md: Implement new predicates for DSP
16884 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16886 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16887 Reformat alternatives and attributes so it is easier to identify
16888 which constraints/attributes go with which instruction.
16889 (mov<mode>_hardfloat32, FMOVE64): Likewise.
16890 (mov<mode>_softfloat32, FMOVE64): Likewise.
16891 (mov<mode>_hardfloat64, FMOVE64): Likewise.
16892 (mov<mode>_softfloat64, FMOVE64): Likewise.
16894 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
16896 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16898 (Basic PowerPC Built-in Functions): The new name of the
16899 subsection previously known as "PowerPC Built-in Functions".
16900 (Basic PowerPC Built-in Functions Available on all Configurations):
16902 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16903 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16904 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16905 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16907 2018-05-11 Martin Jambor <mjambor@suse.cz>
16910 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16913 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16916 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16918 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
16920 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16921 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16922 (ix86_handle_option): Handle -mwaitpkg.
16923 * config.gcc: New header.
16924 * config/i386/cpuid.h (bit_WAITPKG): New bit.
16925 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16926 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16928 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16929 OPTION_MASK_ISA_WAITPKG.
16930 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16931 (ix86_option_override_internal): Add PTA_WAITPKG.
16932 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16933 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16934 IX86_BUILTIN_TPAUSE.
16935 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16936 __builtin_ia32_umwait and __builtin_ia32_tpause.
16937 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16938 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16939 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16940 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16941 UNSPECV_TPAUSE): New.
16942 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16943 * config/i386/i386.opt: Add -mwaitpkg.
16944 * config/i386/waitpkgintrin.h: New file.
16945 * config/i386/x86intrin.h: New header.
16946 * doc/invoke.texi: Add -mwaitpkg.
16948 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16951 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16953 (cortex-m0): Use armv6s-m isa.
16954 (cortex-m0plus): Likewise.
16955 (cortex-m1): Likewise.
16956 (cortex-m0.small-multiply): Likewise.
16957 (cortex-m0plus.small-multiply): Likewise.
16958 (cortex-m1.small-multiply): Likewise.
16960 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
16961 Jakub Jelinek <jakub@redhat.com>
16963 PR tree-optimization/85692
16964 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16965 source permute as well.
16967 2018-05-11 Martin Liska <mliska@suse.cz>
16970 * doc/extend.texi: Document LLVM style format for no_sanitize
16973 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
16975 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16976 mode_supports_vsx_dform_quad to mode_supports_dq_form.
16977 (mode_supports_vsx_dform_quad): Likewise.
16978 (mode_supports_vmx_dform): Move these functions to be next to the
16979 other mode_supports functions.
16980 (mode_supports_dq_form): Likewise.
16981 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16982 mode_supports_dq_form.
16983 (reg_offset_addressing_ok_p): Likewise.
16984 (offsettable_ok_by_alignment): Likewise.
16985 (rs6000_legitimate_offset_address_p): Likewise.
16986 (legitimate_lo_sum_address_p): Likewise.
16987 (rs6000_legitimize_address): Likewise.
16988 (rs6000_legitimize_reload_address): Likewise.
16989 (rs6000_secondary_reload_inner): Likewise.
16990 (rs6000_preferred_reload_class): Likewise.
16991 (rs6000_output_move_128bit): Likewise.
16993 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
16995 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16996 Generate SImode target register for null target.
16997 <case IX86_BUILTIN_XGETBV>: Ditto.
16998 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16999 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17001 2018-05-10 Carl Love <cel@us.ibm.com>
17003 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17004 dcbtt and dcbtstt if operands[2] is 0.
17006 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17009 * config/i386/sse.md (usadv64qi): New expander.
17011 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17013 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17014 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17015 -maltivec=be support.
17016 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17017 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17018 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17019 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17020 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17021 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17022 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17023 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17024 altivec_vsumsws): Adjust.
17025 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17026 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17027 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17029 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17030 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17031 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17032 (altivec_lve<VI_char>x): Delete expand.
17033 (*altivec_lve<VI_char>x_internal): Rename to...
17034 (altivec_lve<VI_char>x): ... this.
17035 (altivec_lvxl_<mode>): Delete expand.
17036 (*altivec_lvxl_<mode>_internal): Rename to ...
17037 (altivec_lvxl_<mode>): ... this.
17038 (altivec_stvxl_<mode>): Delete expand.
17039 (*altivec_stvxl_<mode>_internal): Rename to ...
17040 (altivec_stvxl_<mode>): ... this.
17041 (altivec_stve<VI_char>x): Delete expand.
17042 (*altivec_stve<VI_char>x_internal): Rename to ...
17043 (altivec_stve<VI_char>x): ... this.
17044 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17045 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17046 reduc_plus_scal_<mode>): Adjust.
17047 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17049 (rs6000_cpu_cpp_builtins): Adjust.
17050 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17051 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17052 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17053 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17054 -maltivec=be support.
17055 (rs6000_split_vec_extract_var): Adjust.
17056 (rs6000_split_v4si_init): Adjust.
17057 (swap_selector_for_mode): Delete.
17058 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17059 altivec_expand_stvex_be): Delete.
17060 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17061 -maltivec=be support.
17062 (rs6000_gimple_fold_builtin): Ditto.
17063 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17065 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17066 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17067 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17068 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17069 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17070 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17071 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17072 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17073 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17074 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17075 anonymous split): Adjust.
17076 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17077 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17079 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17081 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17082 when --with-gxx-include-dir is also specified.
17083 * configure: Regenerate.
17085 2018-05-09 Jim Wilson <jimw@sifive.com>
17088 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17089 * config/riscv/t-withmultilib: New.
17090 * config/riscv/withmultilib.h: New.
17091 * doc/install.texi: Document RISC-V --with-multilib-list support.
17093 2018-05-09 Richard Biener <rguenther@suse.de>
17095 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17097 (vect_bb_vectorization_profitable_p): Adjust. Compute
17098 actual scalar cost using the cost vector and the add_stmt_cost
17101 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17103 PR rtl-optimization/85645
17104 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17105 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17107 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17109 PR rtl-optimization/85645
17110 * shrink-wrap.c (spread_components): Return a boolean saying if
17111 anything was changed.
17112 (try_shrink_wrapping_separate): Iterate spread_components until
17113 nothing changes anymore.
17115 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17117 PR rtl-optimization/85645
17118 * regrename.c (build_def_use): Also kill the chains that include the
17119 destination of a REG_CFA_REGISTER note.
17121 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17123 PR rtl-optimization/85645
17124 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17125 insn that has a REG_CFA_REGISTER note.
17127 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17129 * cfgexpand.c (expand_clobber): New function.
17130 (expand_gimple_stmt_1): Use it.
17131 * tree-vect-stmts.c (vect_clobber_variable): New function,
17133 (vectorizable_simd_clone_call): ...here.
17134 (vectorizable_store): Emit a clobber either side of an
17135 IFN_STORE_LANES sequence.
17136 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17138 2018-05-09 Tom de Vries <tom@codesourcery.com>
17141 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17142 (define_insn "trap_if_false"): Add exit after trap.
17144 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17146 PR rtl-optimization/85638
17147 * bb-reorder.c: Include common/common-target.h.
17148 (create_forwarder_block): New function extracted from...
17149 (fix_up_crossing_landing_pad): ...here. Rename into...
17150 (dw2_fix_up_crossing_landing_pad): ...this.
17151 (sjlj_fix_up_crossing_landing_pad): New function.
17152 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17153 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17154 from both partitions and exit the loop after one iteration.
17156 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17159 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17161 (Basic PowerPC Built-in Functions): The new name of the
17162 subsection previously known as "PowerPC Built-in Functions".
17163 (Basic PowerPC Built-in Functions Available on all Configurations):
17165 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17167 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17169 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17171 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17174 2018-05-08 Jim Wilson <jimw@sifive.com>
17176 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17177 (LD_EMUL_SUFFIX): New.
17178 (LINK_SPEC): Use it.
17180 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17182 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17184 (Basic PowerPC Built-in Functions): The new name of the
17185 subsection previously known as "PowerPC Built-in Functions".
17186 (Basic PowerPC Built-in Functions Available on all Configurations):
17188 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17190 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17192 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17194 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17197 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17200 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17201 after cmpelim optimization.
17203 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17205 * config.gcc: Support "goldmont".
17206 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17207 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17208 PROCESSOR_GOLDMONT.
17209 * config/i386/i386.c (m_GOLDMONT): Define.
17210 (processor_target_table): Add "goldmont".
17211 (PTA_GOLDMONT): Define.
17212 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17213 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17214 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17215 (fold_builtin_cpu): Add "goldmont".
17216 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17217 (ix86_option_override_internal): Add "goldmont".
17218 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17219 (processor_type): Add PROCESSOR_GOLDMONT.
17220 * config/i386/i386.md: Add CPU "glm".
17221 * config/i386/glm.md: New file.
17222 * config/i386/x86-tune.def: Add m_GOLDMONT.
17223 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17225 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17228 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17230 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17231 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17232 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17235 * config/i386/i386.c (ix86_fold_builtin): Handle
17236 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17239 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17240 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17242 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17245 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17246 (check_arch): Likewise.
17247 (check_fpu): Return the result rather than printing it.
17248 (end arch): Fix operator precedence.
17249 (end cpu): Likewise.
17250 (END): Print the result from check_fpu.
17252 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17253 Alan Hayward <alan.hayward@arm.com>
17254 David Sherwood <david.sherwood@arm.com>
17256 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17257 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17258 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17259 (*fcmuo<mode>_and): New patterns.
17261 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17263 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17264 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17265 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17266 (cmp_op, sve_imm_con): New code attributes.
17267 (SVE_COND_INT_CMP, imm_con): Delete.
17268 (cmp_op): Remove above unspecs from int attribute.
17269 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17271 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17272 comparison-specific unspecs.
17273 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17274 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17275 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17276 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17277 (*vec_fcm<cmp_op><mode>): Rename to...
17278 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17279 (*vec_fcmuo<mode>): Rename to...
17280 (*fcmuo<mode>): ...this and adjust likewise.
17281 (*pred_fcm<cmp_op><mode>): New pattern.
17282 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17283 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17285 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17287 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17288 (aarch64_emit_sve_predicated_cond): New function.
17289 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17290 (aarch64_emit_unspec_cond_or): Replace with...
17291 (aarch64_emit_sve_or_conds): ...this new function. Use
17292 aarch64_emit_sve_ptrue_op for the individual comparisons and
17293 aarch64_emit_binop to OR them together.
17294 (aarch64_emit_inverted_unspec_cond): Replace with...
17295 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17296 aarch64_emit_sve_ptrue_op for the comparison and
17297 aarch64_emit_unop to invert the result.
17298 (aarch64_expand_sve_vec_cmp_float): Update after the above
17299 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17301 2018-05-07 Nathan Sidwell <nathan@acm.org>
17303 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17304 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17305 (Backwards Compatibility): Likewise.
17307 2018-05-07 Luis Machado <luis.machado@linaro.org>
17311 2018-05-07 Luis Machado <luis.machado@linaro.org>
17313 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17314 <prefetch_dynamic_strides>: New const bool field.
17315 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17316 prefetch_dynamic_strides.
17317 (exynosm1_prefetch_tune): Likewise.
17318 (thunderxt88_prefetch_tune): Likewise.
17319 (thunderx_prefetch_tune): Likewise.
17320 (thunderx2t99_prefetch_tune): Likewise.
17321 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17323 (aarch64_override_options_internal): Update to set
17324 PARAM_PREFETCH_DYNAMIC_STRIDES.
17325 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17326 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17327 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17328 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17329 prefetch-dynamic-strides setting.
17331 2018-05-07 Luis Machado <luis.machado@linaro.org>
17333 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17334 <minimum_stride>: New const int field.
17335 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17336 minimum_stride field.
17337 (exynosm1_prefetch_tune): Likewise.
17338 (thunderxt88_prefetch_tune): Likewise.
17339 (thunderx_prefetch_tune): Likewise.
17340 (thunderx2t99_prefetch_tune): Likewise.
17341 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17342 (aarch64_override_options_internal): Update to set
17343 PARAM_PREFETCH_MINIMUM_STRIDE.
17344 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17345 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17346 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17347 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17348 stride is constant and is below the minimum stride threshold.
17350 2018-05-07 Luis Machado <luis.machado@linaro.org>
17352 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17355 2018-05-07 Luis Machado <luis.machado@linaro.org>
17357 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17358 <prefetch_dynamic_strides>: New const bool field.
17359 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17360 prefetch_dynamic_strides.
17361 (exynosm1_prefetch_tune): Likewise.
17362 (thunderxt88_prefetch_tune): Likewise.
17363 (thunderx_prefetch_tune): Likewise.
17364 (thunderx2t99_prefetch_tune): Likewise.
17365 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17367 (aarch64_override_options_internal): Update to set
17368 PARAM_PREFETCH_DYNAMIC_STRIDES.
17369 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17370 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17371 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17372 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17373 prefetch-dynamic-strides setting.
17375 2018-05-07 Luis Machado <luis.machado@linaro.org>
17377 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17378 <minimum_stride>: New const int field.
17379 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17380 minimum_stride field.
17381 (exynosm1_prefetch_tune): Likewise.
17382 (thunderxt88_prefetch_tune): Likewise.
17383 (thunderx_prefetch_tune): Likewise.
17384 (thunderx2t99_prefetch_tune): Likewise.
17385 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17386 (aarch64_override_options_internal): Update to set
17387 PARAM_PREFETCH_MINIMUM_STRIDE.
17388 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17389 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17390 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17391 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17392 stride is constant and is below the minimum stride threshold.
17394 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17397 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17398 the type is addressable. Don't force op into register if it has
17401 2018-05-05 Roland McGrath <mcgrathr@google.com>
17404 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17405 any section for which we don't know a specific type it should have,
17406 regardless of name. Previously this was done only for the exact
17407 names ".init_array", ".fini_array", and ".preinit_array".
17408 (default_elf_asm_named_section): Add comment about
17409 relationship with default_section_type_flags and SECTION_NOTYPE.
17410 (get_section): Don't consider it a type conflict if one side has
17411 SECTION_NOTYPE and the other doesn't, as long as neither has the
17412 SECTION_BSS et al used in the default_section_type_flags logic.
17414 2018-05-05 Tom de Vries <tom@codesourcery.com>
17417 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17418 (workaround_barsyncs): New function.
17419 (nvptx_reorg): Use workaround_barsyncs.
17420 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17421 (define_expand "nvptx_membar_cta"): New define_expand.
17422 (define_insn "*nvptx_membar_cta"): New insn.
17424 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17426 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17427 To improve optimization opportunities.
17428 * builtin-types.def: The new needed builtin types for the above.
17430 2018-05-04 Richard Biener <rguenther@suse.de>
17432 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17433 * gimple-ssa-store-merging.c
17434 (imm_store_chain_info::output_merged_store): Remove redundant create,
17435 release split_store vector contents on failure.
17436 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17437 scalar stmt vector on cache hit.
17439 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17441 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17443 * config.gcc (powerpc-xilinx-eabi*): Remove.
17444 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17446 (fusion_addis_mem_combo_load): Ditto.
17447 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17449 (rs6000_cpu_cpp_builtins): Ditto.
17450 * config/rs6000/rs6000-linux.c
17451 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17452 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17453 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17455 (rs6000_setup_reg_addr_masks): Ditto.
17456 (rs6000_init_hard_regno_mode_ok): Ditto.
17457 (rs6000_option_override_internal): Ditto.
17458 (legitimate_lo_sum_address_p): Ditto.
17459 (rs6000_legitimize_address): Ditto.
17460 (rs6000_legitimize_reload_address): Ditto.
17461 (rs6000_legitimate_address_p): Ditto.
17462 (abi_v4_pass_in_fpr): Ditto.
17463 (setup_incoming_varargs): Ditto.
17464 (rs6000_gimplify_va_arg): Ditto.
17465 (rs6000_split_multireg_move): Ditto.
17466 (rs6000_savres_strategy): Ditto.
17467 (rs6000_emit_prologue_components): Ditto.
17468 (rs6000_emit_epilogue_components): Ditto.
17469 (rs6000_emit_prologue): Ditto.
17470 (rs6000_emit_epilogue): Ditto.
17471 (rs6000_elf_file_end): Ditto.
17472 (rs6000_function_value): Ditto.
17473 (rs6000_libcall_value): Ditto.
17474 * config/rs6000/rs6000.h: Ditto.
17475 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17476 (TARGET_MINMAX): ... this. New.
17477 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17478 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17479 (*movsi_internal1_single): Delete.
17480 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17481 mfpu=, mxilinx-fpu): Delete.
17482 * config/rs6000/singlefp.h: Delete.
17483 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17484 * config/rs6000/t-rs6000: Ditto.
17485 * config/rs6000/t-xilinx: Delete.
17486 * config/rs6000/titan.md: Adjust for fp_type removal.
17487 * config/rs6000/vsx.md: Remove Xilinx FP support.
17488 (VStype_simple): Delete.
17489 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17490 * config/rs6000/xfpu.h: Delete.
17491 * config/rs6000/xfpu.md: Delete.
17492 * config/rs6000/xilinx.h: Delete.
17493 * config/rs6000/xilinx.opt: Delete.
17494 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17495 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17497 2018-05-04 Tom de Vries <tom@codesourcery.com>
17500 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17503 2018-05-04 Richard Biener <rguenther@suse.de>
17505 PR middle-end/85627
17506 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17507 (expand_complex_div_wide): Likewise.
17508 (expand_complex_operations_1): Likewise.
17509 (expand_complex_libcall): Preserve EH info of the original stmt.
17510 (tree_lower_complex): Handle removed blocks.
17511 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17512 on complex multiplication and division libcall builtins.
17514 2018-05-04 Richard Biener <rguenther@suse.de>
17516 PR middle-end/85574
17517 * fold-const.c (negate_expr_p): Restrict negation of operand
17518 zero of a division to when we know that can happen without
17520 (fold_negate_expr_1): Likewise.
17522 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17525 * real.h (real_nextafter): Declare.
17526 * real.c (real_nextafter): New function.
17527 * fold-const-call.c (fold_const_nextafter): New function.
17528 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17529 CASE_CFN_NEXTTOWARD.
17530 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17531 even when arg1_mode is different from arg0_mode.
17533 2018-05-03 Nathan Sidwell <nathan@acm.org>
17535 * doc/extend.texi (Deprecated Features): Remove
17536 -ffriend-injection.
17537 (Backwards Compatibility): Likewise.
17538 * doc/invoke.texi (C++ Language Options): Likewise.
17539 (C++ Dialect Options): Likewise.
17541 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17544 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17545 _mm512_mask_mullox_epi64): New intrinsics.
17547 2018-05-03 Tom de Vries <tom@codesourcery.com>
17550 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17551 dump files): Add offload-tree.
17553 2018-05-03 Richard Biener <rguenther@suse.de>
17555 PR tree-optimization/85615
17556 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17557 to loops not nested in BBs loop father to avoid creating multi-entry
17560 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17562 PR tree-optimization/70291
17563 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17564 arguments. Change return type to tree. Emit libcall as a new
17565 statement rather than replacing existing one when inplace_p is true.
17566 (expand_complex_multiplication_components): New function.
17567 (expand_complex_multiplication): Expand floating-point complex
17568 multiplication using the above.
17569 (expand_complex_division): Rename inner_type parameter to type.
17570 Update expand_complex_libcall call-site.
17571 (expand_complex_operations_1): Update expand_complex_multiplication
17572 and expand_complex_division call-sites.
17574 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17577 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17578 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17579 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17580 the highest significant bit of the shift count mask is clear. In
17581 check whether and[sq]i3 is needed verify that all significant bits
17582 of the shift count other than the highest are set.
17584 2018-05-02 Tom de Vries <tom@codesourcery.com>
17587 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17588 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17589 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17590 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17591 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17592 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17593 __builtin_goacc_parlevel_size.
17595 2018-05-02 Richard Biener <rguenther@suse.de>
17597 PR tree-optimization/85597
17598 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17599 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17602 2018-05-02 Tom de Vries <tom@codesourcery.com>
17605 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17606 dump files): Add ltrans-tree.
17608 2018-05-02 Tom de Vries <tom@codesourcery.com>
17611 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17612 dump files): Add wpa-ipa.
17614 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17616 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17617 powerpc*-*-linux*paired* target.
17618 * config/rs6000/750cl.h: Delete.
17619 * config/rs6000/paired.h: Delete.
17620 * config/rs6000/paired.md: Delete.
17621 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17623 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17624 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17625 comment. Remove paired float support.
17626 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17627 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17629 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17630 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17632 * config/rs6000/rs6000.c: Remove paired float support.
17633 (paired_expand_vector_init, paired_expand_vector_move,
17634 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17635 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17636 paired_expand_builtin, paired_expand_predicate_builtin,
17637 paired_init_builtins): Delete.
17638 * config/rs6000/rs6000.h: Remove paired float support.
17639 * config/rs6000/rs6000.md: Remove paired float support.
17640 (move_from_CR_ov_bit): Delete.
17641 * config/rs6000/rs6000.opt (mpaired): Delete.
17642 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17643 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17645 2018-05-02 Richard Biener <rguenther@suse.de>
17647 PR middle-end/85567
17648 * gimplify.c (gimplify_save_expr): When in SSA form allow
17649 SAVE_EXPRs to compute to SSA vars.
17651 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17654 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17655 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17656 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17657 clobber operands[2], instead use a new pseudo. Formatting fixes.
17659 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17661 PR tree-optimization/85586
17662 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17663 exit early for statements in the same group if the accesses are
17666 2018-05-02 Tom de Vries <tom@codesourcery.com>
17669 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17672 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17674 PR tree-optimization/85143
17675 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17677 2018-05-01 Tom de Vries <tom@codesourcery.com>
17680 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17681 not found" error message.
17683 2018-05-01 Tom de Vries <tom@codesourcery.com>
17686 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17687 * vec.c (test_ordered_remove_if): New function.
17688 (vec_c_tests): Call test_ordered_remove_if.
17689 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17690 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17691 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17692 VEC_ORDERED_REMOVE_IF.
17694 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17696 PR tree-optimization/82665
17697 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17698 pointer subtraction where arguments come from a memchr call.
17700 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17702 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17703 --push-state --as-needed and --pop-state instead of --as-needed and
17704 --no-as-needed if ld supports it.
17705 * configure: Regenerated.
17708 * doc/install.texi2html: Replace _002d with - and _002a with * in
17709 generated html files using sed.
17711 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17714 * gcc-rich-location.c (blank_line_before_p): New function.
17715 (use_new_line): New function.
17716 (gcc_rich_location::add_fixit_insert_formatted): New function.
17717 * gcc-rich-location.h
17718 (gcc_rich_location::add_fixit_insert_formatted): New function.
17720 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17722 * selftest.c (assert_streq): Rename "expected" and "actual" to
17723 "val1" and "val2". Extend NULL-handling to cover both inputs
17724 symmetrically, while still requiring both to be non-NULL for a pass.
17725 * selftest.h (assert_streq): Rename "expected" and "actual" to
17727 (ASSERT_EQ): Likewise.
17728 (ASSERT_EQ_AT): Likewise.
17729 (ASSERT_KNOWN_EQ): Likewise.
17730 (ASSERT_KNOWN_EQ_AT): Likewise.
17731 (ASSERT_NE): Likewise.
17732 (ASSERT_MAYBE_NE): Likewise.
17733 (ASSERT_MAYBE_NE_AT): Likewise.
17734 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17735 the assertion to pass.
17736 (ASSERT_STREQ_AT): Likewise.
17738 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17740 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17741 interaction with -pie.
17743 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17745 * selftest.h: Fix alphabetization of per-source-file selftest
17748 2018-04-30 Jason Merrill <jason@redhat.com>
17750 PR c++/61982 - dead stores to destroyed objects.
17751 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17754 2018-04-30 Jason Merrill <jason@redhat.com>
17756 * tree.c (build_clobber): New.
17757 * tree.h: Declare it.
17758 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17760 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17762 * diagnostic-show-locus.c (layout::layout): Update for
17763 location_get_source_line returning a char_span.
17764 (struct char_span): Move to input.h.
17765 (struct correction): Update for fields in char_span becoming
17767 (struct source_line): Update for location_get_source_line
17768 returning a char_span.
17769 (layout::print_line): Likewise.
17770 * edit-context.c (edited_file::print_content): Likewise.
17771 (edited_file::print_diff_hunk): Likewise.
17772 (edited_file::print_run_of_changed_lines): Likewise.
17773 (edited_file::get_num_lines): Likewise.
17774 (edited_line::edited_line): Likewise.
17775 * final.c (asm_show_source): Likewise.
17776 * input.c (location_get_source_line): Convert return type
17777 from const char * to char_span, losing the final "line_len"
17779 (dump_location_info): Update for the above.
17780 (get_substring_ranges_for_loc): Likewise. Use a char_span
17781 when handling the literal within the line.
17782 (test_reading_source_line): Update for location_get_source_line
17783 returning a char_span.
17784 * input.h (class char_span): Move here from
17785 diagnostic-show-locus.c, converting from a struct to a class.
17786 Make data members private.
17787 (char_span::operator bool): New.
17788 (char_span::length): New.
17789 (char_span::get_buffer): New.
17790 (char_span::operator[]): New.
17791 (char_span::subspan): Make const.
17792 (char_span::xstrdup): New.
17793 (location_get_source_line): Convert return type from const char *
17794 to char_span, losing the final "line_size" param.
17796 2018-04-30 Jan Hubicka <jh@suse.cz>
17798 * lto-wrapper.c (ltrans_priorities): New static var.
17799 (cmp_priority): New.
17800 (run_gcc): Read priorities and if doing parallel build order
17801 the Makefile by them.
17803 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17805 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17807 2018-04-30 Richard Biener <rguenther@suse.de>
17809 * tree-cfg.c (verify_address): Remove base argument, add
17810 flag whether to check TREE_ADDRESSABLE and do that.
17811 (verify_expr): Remove.
17812 (verify_types_in_gimple_reference): Add pieces from verify_expr.
17813 (verify_gimple_assign_single): Likewise.
17814 (verify_gimple_switch): Likewise.
17815 (verify_expr_location_1): Dereference tp once. Add (disabled)
17816 piece from verify_expr.
17817 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17819 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17821 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17823 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17825 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17826 (small_data_pattern): Likewise.
17827 (arc_rewrite_small_data): Likewise.
17828 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17829 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17830 (get_symbol_alignment): New function.
17831 (legitimate_small_data_address_p): Likewise.
17832 (legitimate_scaled_address): Update, call
17833 legitimate_small_data_address_p.
17834 (output_sdata): New static variable.
17835 (arc_print_operand): Update how we handle small data operands.
17836 (arc_print_operand_address): Likewise.
17837 (arc_legitimate_address_p): Update, use
17838 legitimate_small_data_address_p.
17839 (arc_rewrite_small_data_p): Remove.
17840 (arc_rewrite_small_data_1): Likewise.
17841 (arc_rewrite_small_data): Likewise.
17842 (small_data_pattern): Likewise.
17843 (compact_sda_memory_operand): Update to use
17844 legitimate_small_data_address_p and get_symbol_alignment.
17845 (prepare_move_operands): Don't rewite sdata pattern.
17846 (prepare_extend_operands): Remove.
17847 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17849 (zero_extendqisi2): Likewise.
17850 (zero_extendhisi2): Likewise.
17851 (extendqihi2): Likewise.
17852 (extendqisi2): Likewise.
17853 (extendhisi2): Likewise.
17854 (addsi3): Likewise.
17855 (subsi3): Likewise.
17856 (andsi3): Likewise.
17857 * config/arc/constraints.md (Usd): Change it to memory constraint.
17859 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17861 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17862 as source of std instructions.
17863 * config/arc/arc.md (movsi_insn): Update pattern predicate to
17864 allow 6-bit constants as source for store instructions.
17865 (movdi_insn): Update instruction pattern to allow 6-bit constants
17866 as source for store instructions.
17868 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17870 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17872 2018-04-30 Nathan Sidwell <nathan@acm.org>
17873 Sandra Loosemore <sandra@codesourcery.com>
17875 * dumpfile.c (dump_open): Allow '-' for stdout.
17876 * doc/invoke.texi (Developer Options): Document dump filename
17877 determination early. Document stdin/stdout selection.
17879 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
17881 Microblaze Target: PIC data text relative
17883 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17884 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17886 * config/microblaze/microblaze.h (microblaze_constant_address_p):
17887 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17888 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17889 New addressing mode for data-text relative position indepenedent code.
17890 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17891 'ADDRESS_SYMBOLIC_TXT_REL'.
17892 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17893 (microblaze_legitimate_pic_operand): Exclude function calls from
17894 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17895 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17897 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17898 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17899 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17900 for 'address + offset'.
17901 (microblaze_expand_prologue): Add new function prologue call for
17903 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17904 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17905 table in case of TARGET_PIC_DATA_TEXT_REL.
17906 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17907 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17908 Add new macros 'UNSPEC_TEXT',
17909 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17910 + exclude function calls from 'UNSPEC_PLT' in case of data text
17912 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17913 new target hook for generating address diff vector tables in case of
17915 * doc/tm.texi : Regenerate.
17916 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17917 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17918 of addr diff vector generation.
17919 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17920 target hook definition.
17921 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17922 Add default function for generate_pic_addr_diff_vec -> flag_pic.
17923 * doc/invoke.texi (Add new pic option): Add new microblaze pic
17924 option for data text relative.
17926 2018-04-30 Richard Biener <rguenther@suse.de>
17928 * tree-chrec.h (evolution_function_is_constant_p): Remove
17930 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17932 2018-04-30 Richard Biener <rguenther@suse.de>
17935 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17937 2018-04-30 Richard Biener <rguenther@suse.de>
17939 PR tree-optimization/28364
17940 PR tree-optimization/85275
17941 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17942 copying first exit test.
17944 2018-04-28 Mark Wielaard <mark@klomp.org>
17946 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17947 dwarf_version >= 5.
17948 (dwarf_AT): Handle DW_AT_addr_base.
17949 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17951 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
17954 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17955 (*ashl<dwi>3_doubleword_mask_1): Ditto.
17956 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17957 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17959 2018-04-28 Richard Biener <rguenther@suse.de>
17961 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17962 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17963 to reflect use. Only add interesting stmts.
17965 2018-04-27 Martin Jambor <mjambor@suse.cz>
17968 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17969 the jump function allows for passing through aggregate values.
17971 2018-04-27 David Malcolm <dmalcolm@redhat.com>
17973 * input.h (in_system_header_at): Convert from macro to inline
17975 (from_macro_expansion_at): Likewise.
17976 (from_macro_definition_at): Likewise.
17978 2018-04-27 Jeff Law <law@redhat.com>
17980 * config.gcc: Mark tile* targets as deprecated/obsolete.
17982 2018-04-27 Richard Biener <rguenther@suse.de>
17984 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17987 2018-04-27 Richard Biener <rguenther@suse.de>
17989 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17991 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
17993 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17994 with Yd constraint. Set "preferred_for_speed" attribute from
17995 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17996 with Yd constraint.
17997 (*movdi_internal): Ditto.
17998 (movti_interunit splitters): Remove
17999 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18000 (movdi_interunit splitters): Ditto.
18001 * config/i386/constraints.md (Ye): Remove.
18002 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18004 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18007 * config/aarch64/constraints.md (Usg): Limit to 31.
18008 (Usj): Limit to 63.
18010 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18012 PR tree-optimization/85529
18013 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18014 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18015 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18016 zero extension or masking of the MSB bit.
18017 (optimize_range_tests): Add FIRST_BB argument, pass it through
18018 to optimize_range_tests_var_bound.
18019 (maybe_optimize_range_tests, reassociate_bb): Adjust
18020 optimize_range_tests callers.
18022 2018-04-26 Richard Biener <rguenther@suse.de>
18023 Jakub Jelinek <jakub@redhat.com>
18025 * cgraph.h (symbol_table): Just declare debug method here.
18026 * symtab.c (symbol_table::debug): Define.
18028 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18030 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18032 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18034 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18035 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18036 (*movdi_internal): Substitute Yi and Yj constraint with x
18037 and Ym and Yn constraint with y constraint. Update "isa"
18038 attribute and set "preferred_for_speed" attribute from
18039 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18040 (*movsi_internal): Ditto.
18041 (*movdf_internal): Ditto.
18042 (*movsf_internal): Ditto.
18043 (*zero_extendsidi2): Ditto.
18044 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18045 (sse2_loadld): Ditto.
18046 (*vec_extract<ssevecmodelower>_0): Ditto.
18047 (*vec_extractv4si_0_zext_sse4): Ditto.
18048 (vec_concatv2di): Ditto.
18049 (*vec_dup<mode>): Ditto.
18050 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18051 * config/i386/constraints.md (Yi): Remove.
18056 2018-04-26 Nathan Sidwell <nathan@acm.org>
18058 * dumpfile.c (dump_open): New.
18059 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18060 (dump_finish): Detect stdio/stderr by value not name.
18062 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18064 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18066 2018-04-26 Tom de Vries <tom@codesourcery.com>
18069 * config/nvptx/nvptx.c (verify_neutering_jumps)
18070 (verify_neutering_labels): New function
18071 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18073 2018-04-26 Tom de Vries <tom@codesourcery.com>
18076 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18077 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18080 2018-04-26 Richard Biener <rguenther@suse.de>
18081 Tom de Vries <tom@codesourcery.com>
18084 * lto-streamer-out.c (output_function): Fixup loops if required to match
18085 discovery done in the reader.
18087 2018-04-26 Richard Biener <rguenther@suse.de>
18089 PR tree-optimization/85116
18090 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18091 have a loop exit from the single latch predecessor. Remove
18092 case of header with just condition.
18093 (ch_base::copy_headers): Exclude infinite loops from any
18095 (pass_ch::execute): Record exits.
18097 2018-04-26 Richard Biener <rguenther@suse.de>
18099 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18100 prologue cost vector and pass it to vect_get_load_cost.
18101 (vect_get_peeling_costs_all_drs): Likewise.
18102 (vect_peeling_hash_get_lowest_cost): Likewise.
18103 (vect_enhance_data_refs_alignment): Likewise.
18105 2018-04-26 Richard Biener <rguenther@suse.de>
18107 PR middle-end/85450
18108 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18109 checking of integer<->pointer conversions.
18110 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18111 sign-/zero-extending pointer types.
18112 (expand_omp_for_static_chunk): Likewise.
18114 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18115 Jean Lee <xiaoyur347@gmail.com>
18117 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18118 (TARGET_ASAN_SHADOW_OFFSET): Define.
18119 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18120 true for -fsanitize=address.
18122 2018-04-25 Mark Wielaard <mark@klomp.org>
18124 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18127 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18129 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18130 than "alu", remove explicit "memory" and "imm_disp" attributes.
18131 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18133 PR middle-end/85414
18134 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18135 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18136 gen_lowpart_no_emit.
18138 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18141 * config/i386/i386.c (ix86_expand_builtin): Change memory
18142 operand to XI, extend p0 to Pmode.
18143 * config/i386/i386.md: Change unspec volatile and operand
18144 1 mode to XI, change operand 0 mode to P.
18146 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18148 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18149 GET_MODE_MASK before any checking.
18150 (nds32_can_use_bset_p): Likewise.
18151 (nds32_can_use_btgl_p): Likewise.
18153 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18155 * config/nds32/nds32-doubleword.md: New define_split pattern for
18156 illegal register number.
18158 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18160 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18162 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18164 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18166 2018-04-25 Richard Biener <rguenther@suse.de>
18168 * lto-streamer.h (LTO_major_version): Bump to 8.
18170 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18172 * BASE-VER: Set to 9.0.0.
18174 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18176 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18177 in __abskf2 and __powikf2.
18179 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18182 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18183 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18184 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18185 Use the above on operand 2. Reindent.
18186 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18188 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18191 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18193 * config/i386/i386.opt (mcet): Removed.
18194 * doc/install.texi: Remove -mcet documentation.
18195 * doc/invoke.texi: Likewise.
18197 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18200 * doc/install.texi: Remove -mcet from bootstrap-cet.
18202 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18205 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18206 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18210 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18211 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18212 containing a CONST_VECTOR.
18214 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18216 * doc/install.texi: Update newlib dependency for nvptx.
18218 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18221 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18222 instead of INTVAL when shifting x left.
18224 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18226 PR tree-optimization/85478
18227 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18228 vect_grouped_store_supported for single element vectors.
18230 2018-04-24 Richard Biener <rguenther@suse.de>
18233 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18234 load cost increase to the case of non-constant step.
18236 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18239 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18240 destination if any_malformed_asm.
18242 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18244 PR middle-end/85496
18245 * expr.c (store_field): In the bitfield case, if the value comes from
18246 a function call and is returned in registers by means of a PARALLEL,
18247 do not change the mode of the temporary unless BLKmode and VOIDmode.
18249 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18251 PR rtl-optimization/85423
18252 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18253 dependencies to debug insns when the previous insn is non-debug.
18255 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18257 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18258 enums into a single definition.
18259 (fls): Fix predicates and printing.
18262 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18264 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18265 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18266 and short u6 immediate.
18267 (check_if_valid_sleep_operand): Remove.
18268 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18270 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18272 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18273 flag_always_save_lp condition.
18274 * config/nds32/nds32.opt (malways-save-lp): New option.
18276 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18278 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18279 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18280 * config/nds32/nds32.h
18281 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18282 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18284 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18286 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18287 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18289 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18290 Chung-Ju Wu <jasonwucj@gmail.com>
18292 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18294 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18295 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18297 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18299 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18301 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18303 * config/nds32/nds32-protos.h (nds32_data_alignment,
18304 nds32_local_alignment): Declare.
18305 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18306 nds32_local_alignment): New functions.
18307 (TARGET_CONSTANT_ALIGNMENT): Define.
18308 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18310 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18312 * config/nds32/nds32.c
18313 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18314 (TARGET_MODES_TIEABLE_P): Likewise.
18316 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18318 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18319 level Ofast and Og.
18321 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18322 Chung-Ju Wu <jasonwucj@gmail.com>
18324 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18325 for unaligned access.
18326 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18328 * config/nds32/nds32-intrinsic.md: Likewise.
18329 * config/nds32/nds32_intrinsic.h: Likewise.
18330 * config/nds32/nds32.h (nds32_builtins): Likewise.
18331 * config/nds32/nds32.opt (munaligned-access): New option.
18332 * config/nds32/nds32.c (nds32_asm_file_start): Display
18333 flag_unaligned_access status.
18335 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18337 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18338 -mno-relax is present.
18339 * config/riscv/linux.h (LINK_SPEC): Ditto.
18341 2018-04-20 Martin Sebor <msebor@redhat.com>
18344 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18346 (gimple_fold_builtin_stxcpy_chk): Same.
18347 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18349 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18352 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18353 __powikf2 when long double is IEEE 128-bit.
18355 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18357 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18358 step to make sure stack always aligned.
18360 2018-04-20 Carl Love <cel@us.ibm.com>
18363 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18364 size check for arg0.
18366 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18367 Tom de Vries <tom@codesourcery.com>
18370 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18371 Emit insns for calls too.
18372 (nvptx_find_par): Always look for worker-level predecessor insn.
18373 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18375 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18376 (nvptx_process_pars): Propagate frames for calls.
18378 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18381 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18383 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18384 (ix86_handle_option): Don't handle OPT_mibt.
18385 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18387 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18389 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18390 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18391 (ix86_target_macros): Define __CET__ with flag_cf_protection
18392 for -fcf-protection.
18393 * config/i386/i386.c (isa2_opts): Remove -mibt.
18394 * config/i386/i386.h (TARGET_IBT): Removed.
18395 (TARGET_IBT_P): Likewise.
18396 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18397 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18398 * config/i386/i386.opt (mcet): Update help message.
18399 (mshstk): Likewise.
18401 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18402 -mcet as an alias for -mshstk.
18404 2018-04-20 Richard Biener <rguenther@suse.de>
18406 PR middle-end/85475
18407 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18408 complexity by forcing a single use of the multiply operand.
18410 2018-04-20 Martin Jambor <mjambor@suse.cz>
18413 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18414 recursion dependency to only apply to non-clones.
18416 2018-04-20 Martin Jambor <mjambor@suse.cz>
18419 * ipa-cp.c (create_specialized_node): Check that clones of
18420 self-recursive edges exist during IPA-CP.
18422 2018-04-19 Toon Moene <toon@moene.org>
18424 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18427 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18429 PR tree-optimization/85467
18430 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18431 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18432 VECTOR_CST element to type.
18434 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18437 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18438 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18439 (builtin_longjmp): Likewise.
18440 (save_stack_nonlocal): New pattern.
18441 (restore_stack_nonlocal): Likewise.
18443 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18446 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18447 Replace ASM_OUTPUT_LABEL with fprintf.
18449 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18452 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18453 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18454 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18455 define __IBT__ and __SHSTK__ for -fcf-protection.
18456 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18458 (ix86_trampoline_init): Likewise.
18459 (x86_output_mi_thunk): Likewise.
18460 (ix86_notrack_prefixed_insn_p): Likewise.
18461 (ix86_option_override_internal): Don't disallow -fcf-protection.
18462 * config/i386/i386.md (rdssp<mode>): Also enable for
18464 (incssp<mode>): Likewise.
18465 (nop_endbr): Likewise.
18466 * config/i386/i386.opt (mcet): Change help message to built-in
18469 (mshstk): Likewise.
18470 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18471 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18472 enable CET built-in functions.
18474 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18476 * common/config/i386/i386-common.c
18477 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18478 OPTION_MASK_ISA_MOVDIRI_UNSET,
18479 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18480 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18481 * config.gcc (movdirintrin.h): New header.
18482 * config/i386/cpuid.h (bit_MOVDIRI,
18483 bit_MOVDIR64B): New bits.
18484 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18486 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18487 (VOID, PVOID, PCVOID)): New function types.
18488 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18489 __builtin_ia32_directstoreu_u64,
18490 __builtin_ia32_movdir64b): New builtins.
18491 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18492 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18494 (ix86_valid_target_attribute_inner_p): Ditto.
18495 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18496 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18497 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18498 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18499 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18500 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18501 (movdiri<mode>, movdir64b_<mode>): New.
18502 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18503 * config/i386/immintrin.h: Include movdirintrin.h.
18504 * config/i386/movdirintrin.h: New file.
18505 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18507 2018-04-19 Richard Biener <rguenther@suse.de>
18509 PR middle-end/85455
18510 * cfg.c (clear_bb_flags): When loop state says we have
18511 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18513 2018-04-19 Richard Biener <rguenther@suse.de>
18515 PR tree-optimization/84737
18516 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18517 copying restrict info.
18518 (vect_setup_realignment): Use it.
18519 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18520 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18521 the first DR to all generated stores.
18522 (vectorizable_load): Likewise for loads.
18524 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18526 PR tree-optimization/85446
18527 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18528 the integral and pointer types to have the same precision.
18530 * doc/install.texi: Document --disable-cet being the default and
18533 2018-04-18 Martin Liska <mliska@suse.cz>
18535 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18538 2018-04-18 Martin Liska <mliska@suse.cz>
18541 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18544 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18545 arguments if they are comparable.
18547 2018-04-18 Martin Liska <mliska@suse.cz>
18550 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18553 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18556 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18559 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18560 ENDBR after calling __morestack.
18562 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18565 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18566 by using gcc_base_ver to generate a gcc_driver_version, and use
18567 it when generating GCC_DRIVER_NAME.
18568 * configure: Regenerate.
18570 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18573 * config.gcc: Obsolete powerpc*-*-*spe*.
18575 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18578 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18579 (stabstr_D): Change type of unum from unsigned int to
18580 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18583 2018-04-17 Jim Wilson <jimw@sifive.com>
18586 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18587 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18588 Set arg_pointer_offset after using pretend_args_size.
18590 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18592 PR rtl-optimization/85431
18593 * dse.c (record_store): Ignore zero width stores.
18596 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18597 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18598 __builtin_stack_restore rather than after it.
18599 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18600 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18601 argument instead of virtual_dynamic_stack_rtx.
18603 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18605 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18607 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18608 Add note to error message to explain internal mapping of overloaded
18609 built-in function name to non-overloaded built-in function name.
18610 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18613 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18616 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18617 where the inputs overlap with the output.
18619 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18621 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18622 (=v, v) alternative and explicit "memory" attribute.
18623 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18624 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18626 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18627 "sselog1" type instead of "sselog".
18628 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18629 "sselog". Remove explicit "memory" attribute.
18630 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18631 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18633 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18634 "sselog1" type instead of "sselog". Remove explicit "memory"
18636 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18637 use "sselog1" type instead of "sselog". Remove explicit "memory"
18639 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18640 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18642 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18643 "sselog1" type instead of "sselog". Remove explicit "memory"
18645 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18646 use "sselog1" type instead of "sselog". Remove explicit "memory"
18650 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18652 PR middle-end/85414
18653 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18656 2018-04-17 Martin Jambor <mjambor@suse.cz>
18659 * ipa-cp.c (create_specialized_node): Call
18660 expand_all_artificial_thunks if necessary.
18662 2018-04-17 Martin Liska <mliska@suse.cz>
18665 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18666 in message, remote space in between '_G' and '('.
18668 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18671 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18672 avx512f_vmcmp<mode>3<round_saeonly_name>,
18673 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18674 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18675 avx512f_rndscale<mode><round_saeonly_name>,
18676 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18677 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18678 Use %<iptr>2 instead of %2 for -masm=intel.
18679 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18680 avx512f_vcvttss2usi<round_saeonly_name>,
18681 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18683 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18684 avx512f_vcvttsd2usi<round_saeonly_name>,
18685 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18686 Use %q1 instead of %1 for -masm=intel.
18687 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18688 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18689 of %3 for -masm=intel.
18690 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18692 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18694 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18696 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18697 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18699 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18701 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18702 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18703 %g1 and one with %0 and %1.
18704 (avx512er_vmrcp28<mode><round_saeonly_name>,
18705 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18706 %1 for -masm=intel.
18707 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18708 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18709 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18710 of %0 and %{%4%} for -masm=intel.
18711 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18712 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18713 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18714 order of %0 and %{%5%}%{z%} for -masm=intel.
18716 2018-04-17 Jan Hubicka <jh@suse.cz>
18719 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18721 2018-04-17 Martin Liska <mliska@suse.cz>
18724 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18725 for target_clone error message. Make default implementation
18726 clone to be a local declaration.
18727 (separate_attrs): Add new argument and check for an empty
18729 (expand_target_clones): Handle it.
18730 (ipa_target_clone): Make redirection just for target_clones
18733 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18734 Tom de Vries <tom@codesourcery.com>
18736 PR middle-end/84955
18737 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18738 tiled basic blocks without omp continue statements.
18740 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18743 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18744 vec_extract expression as having side effects to make sure it gets
18747 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
18750 * config/i386/i386.c (get_builtin_code_for_version): Check
18753 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
18756 * config.gcc: Support "skylake".
18757 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18759 * config/i386/i386.c (m_SKYLAKE): Define.
18760 (processor_target_table): Add "skylake".
18761 (ix86_option_override_internal): Add "skylake".
18762 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18763 PROCESSOR_CANNONLAKE.
18764 (get_builtin_code_for_version): Fix priority for
18765 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18766 PROCESSOR_SKYLAKE-AVX512.
18767 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18768 (processor_type): Add PROCESSOR_SKYLAKE.
18770 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
18771 Jason Merrill <jason@redhat.com>
18774 * convert.c (convert_to_integer_1): Use direct recursion for
18775 enumeral types and types with a precision less than the number
18776 of bits in their mode.
18778 2018-04-16 Julia Koval <julia.koval@intel.com>
18781 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18782 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18784 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
18787 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18788 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18789 and -mno-direct-move.
18791 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
18794 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18795 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18796 Ensure negative shifts result in {0}.
18798 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
18800 PR rtl-optimization/79916
18801 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18802 regs (if any) to define how to gnerate SD moves when LRA is in
18805 2018-04-13 Jakub Jelinek <jakub@redhat.com>
18807 PR rtl-optimization/85393
18808 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18809 * except.c (expand_dw2_landing_pad_for_region): Make static.
18810 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18811 a label and unconditional jump to old_bb, rather than
18812 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18815 PR rtl-optimization/85376
18816 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18817 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18818 instead of a specific value.
18820 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18821 Bin Cheng <bin.cheng@arm.com>
18823 PR tree-optimization/82965
18824 PR tree-optimization/83991
18825 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18826 by_profile_only parameter.
18827 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18828 information if the loop was predicted to iterate too many times.
18829 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18831 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18834 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18837 2018-04-13 Martin Liska <mliska@suse.cz>
18838 Jakub Jelinek <jakub@redhat.com>
18840 PR middle-end/81657
18841 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18842 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18843 * builtins.c (expand_builtin_memory_copy_args): Use
18844 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18845 handle dest_addr == pc_rtx.
18847 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
18850 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18851 asked to not generate direct moves.
18852 (fix_trunc<mode>si2_stfiwx): Similar.
18853 (fix_trunc<mode>si2_internal): Similar.
18855 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18858 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18859 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18860 lookup if dest in some wider mode is known to be const0_rtx and
18861 if so, record permanent equivalence for it to be ZERO_EXTEND of
18862 the narrower mode destination.
18864 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18866 * lto-streamer-out.c (output_function): Revert 259346.
18867 * omp-expand.c (expand_oacc_for): Likewise.
18869 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
18871 PR rtl-optimization/85354
18872 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18873 * sel-sched.c (sel_global_init): ... here.
18875 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
18878 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18879 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18880 mode for PE-COFF targets.
18881 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18882 (i386_pe_asm_lto_end): Likewise.
18883 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18884 (TARGET_ASM_LTO_END): Likewise.
18885 * config/i386/winnt.c (saved_debug_info_level): New static variable.
18886 (i386_pe_asm_lto_start): New function.
18887 (i386_pe_asm_lto_end): Likewise.
18889 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18890 Richard Biener <rguenther@suse.de>
18892 PR middle-end/84955
18893 * lto-streamer-out.c (output_function): Fix CFG loop state before
18895 * omp-expand.c (expand_oacc_for): Handle calls to internal
18896 functions like regular functions.
18898 2018-04-12 Richard Biener <rguenther@suse.de>
18901 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18902 for the early LTO debug to properly generate references to it
18903 during DIE emission. Do not re-use that for the skeleton for
18905 (dwarf2out_early_finish): Likewise.
18907 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18910 * config/i386/sse.md
18911 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18912 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18913 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18914 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18915 and output is a reg, avoid creating invalid lowpart subreg, but
18916 instead split into a 512-bit move. Don't split if not AVX512VL,
18917 input is xmm16+ reg and output is a mem.
18918 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18919 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18920 xmm16+ reg and output is a mem.
18922 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18924 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18925 also for flag_dwarf2_cfi_asm.
18927 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18929 PR rtl-optimization/85342
18930 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18931 a bool scalar var inside of the loop instead. Don't try to update
18932 recog_data.operand after failed apply_change_group.
18934 2018-04-12 Tom de Vries <tom@codesourcery.com>
18937 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18938 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
18939 array with flexible array member as array without given dimension.
18940 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18941 argument for undefined param to true.
18943 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
18946 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18947 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18948 from PowerPC section.
18949 * config/rs6000/sysv4.opt (mcall-): Improve help text.
18950 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18951 help text that is too long.
18952 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18953 help text that is too long.
18954 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18955 help text that is too long.
18957 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
18959 * config/alpha/alpha.md (stack_probe_internal): Rename
18960 from "probe_stack". Update all callers.
18962 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
18964 PR rtl-optimization/84566
18965 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18966 sched_macro_fuse_insns.
18968 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
18971 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18972 (compute_block_dependences): ... from here.
18974 2018-04-11 Jakub Jelinek <jakub@redhat.com>
18976 PR tree-optimization/85331
18977 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18978 from int to HOST_WIDE_INT.
18980 2018-04-11 Martin Jambor <mjambor@suse.cz>
18983 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18984 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18985 not the same as the source val.
18986 (cgraph_edge_brings_value_p): New parameter.
18987 (gather_edges_for_value): Pass destination value to
18988 cgraph_edge_brings_value_p.
18989 (perhaps_add_new_callers): Likewise.
18990 (get_info_about_necessary_edges): Likewise and exclude values brought
18991 only by self-recursive edges.
18992 (create_specialized_node): Redirect only clones of self-calling edges.
18993 (+self_recursive_pass_through_p): New function.
18994 (find_more_scalar_values_for_callers_subset): Use it.
18995 (find_aggregate_values_for_callers_subset): Likewise.
18996 (known_aggs_to_agg_replacement_list): Removed.
18997 (decide_whether_version_node): Re-calculate known constants for all
18998 remaining context clones.
19000 2018-04-11 Richard Biener <rguenther@suse.de>
19003 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19004 from early DWARF output.
19005 (dwarf2out_early_finish): Output line info unconditionally into
19006 early DWARF and add reference to it.
19008 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19011 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19012 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19013 other than V2DFmode using iptr mode attribute.
19014 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19016 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19018 PR rtl-optimization/84659
19019 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19021 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19024 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19026 (output_loc_list): Pass address of a dummy size variable even in the
19027 locview handling loop.
19028 (index_location_lists): Add comment on why skip_loc_list_entry can't
19031 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19034 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19037 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19040 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19041 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19042 and -mstring-compare-inline-limit.
19044 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19047 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19048 for stack clash protection in a register whenever we need it to be in
19051 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19053 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19054 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19056 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19059 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19061 (mlong-double-): Ditto.
19062 * config/rs6000/sysv4.opt (msdata=): Ditto.
19063 (mtls-size=): Ditto.
19065 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19067 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19068 erroneous entries for
19069 "vector int vec_ldl (int, long int *)", and
19070 "vector unsigned int vec_ldl (int, unsigned long int *)".
19071 Add comments and entries for
19072 "vector bool char vec_ldl (int, bool char *)",
19073 "vector bool short vec_ldl (int, bool short *)",
19074 "vector bool int vec_ldl (int, bool int *)",
19075 "vector bool long long vec_ldl (int, bool long long *)",
19076 "vector pixel vec_ldl (int, pixel *)",
19077 "vector long long vec_ldl (int, long long *)",
19078 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19079 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19080 type tree bool_long_long_type_node and correct definition of
19081 bool_V2DI_type_node to make reference to this new type tree.
19082 (rs6000_mangle_type): Replace erroneous reference to
19083 bool_long_type_node with bool_long_long_type_node.
19084 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19085 comments to emphasize sign distinctions for char and int types and
19086 replace RS6000_BTI_bool_long constant with
19087 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19088 use of RS6000_BTI_pixel.
19089 (bool_long_type_node): Remove this macro definition.
19090 (bool_long_long_type_node): New macro definition
19092 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19094 PR rtl-optimization/85300
19095 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19096 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19097 simplify_unary_operation fails.
19099 2018-04-10 Martin Liska <mliska@suse.cz>
19101 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19102 cgraph_edge and ipa_ref.
19104 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19108 * config/i386/sse.md
19109 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19110 computation of the VEC_MERGE selector from mask.
19111 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19112 Fix decoding of the VEC_MERGE selector into mask.
19114 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19116 PR tree-optimization/85286
19117 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19119 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19121 * final.c (final_1): Set insn_last_address as well as
19122 insn_current_address.
19124 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19127 * explow.c (emit_stack_probe): Call validize_mem on memory location
19128 before passing it to gen_probe_stack. Create address operand and
19129 legitimize it for the probe_stack_address case.
19131 2018-04-09 Jan Hubicka <jh@suse.cz>
19134 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19135 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19136 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19138 (free_lang_data): Rebuild type inheritance graph.
19140 2018-04-09 Martin Sebor <msebor@redhat.com>
19142 * invoke.texi (-finline-small-functions): Mention other optimization
19144 (-findirect-inlining, -fpartial-inlining): Same.
19145 (-finline-functions-called-once): Same.
19146 (-freorder-blocks-and-partition): Same.
19148 2018-04-09 Jan Hubicka <jh@suse.cz>
19151 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19152 jumps; choose last target that matches the criteria (i.e.
19153 no partition changes for non-crossing jumps).
19154 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19155 support for redirecting crossing jumps to non-crossing.
19157 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19159 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19160 also for naked functions.
19162 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19164 * config/arc/arc.md (add_shift): New pattern.
19165 (add_shift2): Likewise.
19166 (sub_shift): Likewise.
19167 (sub_shift_cmp0_noout): Likewise.
19168 (compare_si_ashiftsi): Likewise.
19169 (xbfu_cmp0_noout): New combine pattern.
19170 (xbfu_cmp0"): Likewise.
19171 (movsi_set_cc_insn): Place the predicable variant first.
19172 (commutative_binary_cmp0_noout): Remove clobber.
19173 (commutative_binary_cmp0): New pattern.
19174 (noncommutative_binary_cmp0): Likewise.
19175 (noncommutative_binary_cmp0_noout): Likewise.
19176 (noncommutative_binary_comparison_result_used): Removed.
19177 (rsub_cmp0): New pattern.
19178 (rsub_cmp0_noout): Likewise.
19179 (extzvsi): Changed, keep only meaningful variants.
19180 (SQH, SEZ): New iterators.
19181 (SQH_postfix): New mode attribute.
19182 (SEZ_prefix): New code attribute.
19183 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19184 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19185 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19186 of numerical value.
19187 (noncommutative_operator): Check the availability of barrel
19190 2018-04-09 Richard Biener <rguenther@suse.de>
19192 PR tree-optimization/85284
19193 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19194 Only use the niter constraining form of simple_iv when the exit
19195 is always executed.
19197 2018-04-09 Tom de Vries <tom@codesourcery.com>
19200 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19201 (define_expand "*memory_barrier"): New define_expand.
19202 (define_insn "memory_barrier"): New insn.
19204 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19206 PR rtl-optimization/80463
19207 PR rtl-optimization/83972
19208 PR rtl-optimization/83480
19210 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19211 correct producer for the insn.
19212 (tidy_control_flow): Fixup seqnos in case of debug insns.
19214 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19216 PR rtl-optimization/83913
19218 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19219 different sched-times when merging exprs.
19221 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19223 PR rtl-optimization/83962
19225 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19226 tidy_fallthru_edge and tidy_control_flow.
19228 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19230 PR rtl-optimization/83530
19232 * sel-sched.c (force_next_insn): New global variable.
19233 (remove_insn_for_debug): When force_next_insn is true, also leave only
19234 next insn in the ready list.
19235 (sel_sched_region): When the region wasn't scheduled, make another pass
19236 over it with force_next_insn set to 1.
19238 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19240 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19242 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19243 for interrupt control.
19244 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19245 functions for interrupt control.
19246 * config/nds32/nds32-intrinsic.md: Likewise.
19247 * config/nds32/nds32_intrinsic.h: Likewise.
19248 * config/nds32/nds32.h (nds32_builtins): Likewise.
19250 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19252 * config/nds32/nds32.c (nds32_init_machine_status,
19253 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19254 strict_aligned_p field.
19255 (nds32_expand_to_rtl_hook): New function.
19256 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19257 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19259 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19260 Chung-Ju Wu <jasonwucj@gmail.com>
19262 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19263 * config/nds32/nds32-n7.md: New file.
19264 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19265 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19267 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19268 * config/nds32/nds32.md (pipeline_model): Add n7.
19269 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19270 * config/nds32/pipelines.md: Include n7 settings.
19272 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19273 Chung-Ju Wu <jasonwucj@gmail.com>
19275 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19276 * config/nds32/nds32-e8.md: New file.
19277 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19278 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19280 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19281 * config/nds32/nds32.md (pipeline_model): Add e8.
19282 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19283 * config/nds32/pipelines.md: Include e8 settings.
19285 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19286 Chung-Ju Wu <jasonwucj@gmail.com>
19288 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19289 * config/nds32/nds32-n8.md: New file.
19290 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19291 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19293 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19294 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19295 * config/nds32/nds32.md (pipeline_model): Add n8.
19296 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19297 * config/nds32/pipelines.md: Include n8 settings.
19299 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19300 Chung-Ju Wu <jasonwucj@gmail.com>
19302 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19303 * config/nds32/nds32-n9-2r1w.md: New file.
19304 * config/nds32/nds32-n9-3r2w.md: New file.
19305 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19306 nds32_register_ports): New or modify for cpu n9.
19307 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19309 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19310 * config/nds32/nds32-utils.c: New file.
19311 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19312 TARGET_MUL_SLOW): Define.
19313 * config/nds32/nds32.md (pipeline_model): New attribute.
19314 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19315 New options that support cpu n9.
19316 * config/nds32/pipelines.md: Include n9 settings.
19317 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19319 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19321 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19322 information if necessary.
19323 (output_cond_branch_compare_zero): Likewise.
19324 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19325 (nds32_target_alignment): Refine for alignment.
19326 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19327 (FUNCTION_BOUNDARY): Modify.
19328 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19330 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19332 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19334 * config/nds32/constants.md (unspec_volatile_element): Add values for
19335 TLB operation and data prefetch.
19336 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19337 functions for TLB operation and data prefetch.
19338 * config/nds32/nds32-intrinsic.md: Likewise.
19339 * config/nds32/nds32_intrinsic.h: Likewise.
19340 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19341 (nds32_print_operand): Likewise.
19342 * config/nds32/nds32.h (nds32_builtins): Likewise.
19344 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19345 Andrew Pinski <pinsika@gcc.gnu.org>
19347 PR middle-end/82976
19348 * match.pd: Use constant_boolean_node of correct type instead of
19349 boolean_true_node or boolean_false_node for simplifying
19350 pointer comparisons to zero.
19352 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19354 PR tree-optimization/80021
19355 * tree.c (verify_type_variant): Make error call in verify_variant_match
19356 translatable and remove final full stop.
19358 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19360 * config/nds32/constants.md (unspec_volatile_element): Add
19361 UNSPEC_VOLATILE_EH_RETURN.
19362 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19363 nds32_output_stack_pop): Support dwarf exception handling process.
19364 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19365 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19366 exception handling process.
19367 (nds32_compute_stack_frame): Likewise.
19368 (nds32_return_addr_rtx): Likewise.
19369 (nds32_initial_elimination_offset): Likewise.
19370 (nds32_expand_prologue): Likewise.
19371 (nds32_expand_epilogue): Likewise.
19372 (nds32_dynamic_chain_address): New function.
19373 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19374 exception handling.
19375 (DYNAMIC_CHAIN_ADDRESS): Define.
19376 (EH_RETURN_DATA_REGNO): Define.
19377 (EH_RETURN_STACKADJ_RTX): Define.
19378 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19379 patterns for dwarf exception handling.
19381 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19383 * config/nds32/nds32.h: Clean up obsolete macros.
19385 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19387 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19388 Add enum values for particular instructions.
19389 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19390 particular intrinsic functions.
19391 * config/nds32/nds32-intrinsic.md: Likewise.
19392 * config/nds32/nds32_intrinsic.h: Likewise.
19393 * config/nds32/nds32.h (nds32_builtins): Likewise.
19394 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19395 (btst, ave): New patterns for particular instructions.
19397 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19399 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19400 Add enum values for atomic load/store and memory sync.
19401 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19403 * config/nds32/nds32-intrinsic.md: Likewise.
19404 * config/nds32/nds32_intrinsic.h: Likewise.
19405 * config/nds32/nds32.h (nds32_builtins): Likewise.
19407 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19409 PR tree-optimization/85257
19410 * fold-const.c (native_encode_vector): If not all elts could fit
19411 and off is -1, return 0 rather than offset.
19412 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19413 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19414 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19415 adjust buffer in native_interpret_expr call.
19417 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19419 * config/nds32/constants.md (unspec_volatile_element): Add cache
19420 control enum values.
19421 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19422 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19423 * config/nds32/nds32.c (nds32_cctl_names): New.
19424 (nds32_print_operand): Handle cache control register names.
19425 * config/nds32/nds32.h (nds32_builtins): New enum values.
19426 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19428 * config/nds32/nds32.md (type): Add mmu.
19429 * config/nds32/pipelines.md (simple_insn): Add mmu.
19431 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19433 * config/nds32/nds32.md (type): Remove call.
19434 * config/nds32/pipelines.md (simple_insn): Likewise.
19436 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19438 * config/nds32/constants.md (unspec_volatile_element): Add
19439 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19440 UNSPEC_VOLATILE_FMFCFG.
19441 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19442 description for fmfcfg and fmfcsr.
19443 (bdesc_1arg): Add fmtcsr.
19444 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19445 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19446 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19447 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19448 unspec_fmfcfg): New patterns.
19449 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19450 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19451 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19452 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19453 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19454 __nds32__fmfcfg): Define.
19456 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19458 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19459 intrinsic register names.
19460 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19461 intrinsic register enum values and macros.
19463 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19465 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19466 for load/store addressing form.
19467 (nds32_print_operand_address): Likewise.
19469 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19472 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19473 based on LABEL_REF. Remove useless assertion.
19474 (pic_address_needs_scratch): Fix formatting.
19475 (sparc_legitimize_pic_address): Minor tweaks.
19476 (sparc_delegitimize_address): Adjust assertion accordingly.
19477 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19478 into symbolic_operand.
19479 (movsi_high_pic_label_ref): Likewise.
19480 (movsi_lo_sum_pic_label_ref): Likewise.
19481 (movdi_pic_label_ref): Likewise.
19482 (movdi_high_pic_label_ref): Likewise.
19483 (movdi_lo_sum_pic_label_ref): Likewise.
19485 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19487 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19488 custom LIB_SPEC setup.
19490 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19491 Kito Cheng <kito.cheng@gmail.com>
19493 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19494 * config/riscv/freebsd.h: New.
19496 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19498 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19499 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19502 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19503 Kito Cheng <kito.cheng@gmail.com>
19505 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19506 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19507 * config/nds32/nds32-protos.h (nds32_output_call,
19508 nds32_output_return): Declare.
19509 * config/nds32/nds32.md: Refine all the call and return patterns.
19511 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19514 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19515 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19517 PR rtl-optimization/84872
19518 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19519 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19520 EDGE_CROSSING edge.
19522 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19524 * expr.c (copy_blkmode_to_reg): Revert 254862.
19525 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19527 2018-04-06 Richard Biener <rguenther@suse.de>
19529 PR middle-end/85244
19530 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19531 after seeing a component reference with an adjacent field. Treat
19532 refs to arrays at struct end of external decls similar to
19533 refs to unconstrained commons.
19535 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19538 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19539 look through SAVE_EXPRs with non-side-effects argument. Adjust
19541 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19544 2018-04-06 Richard Biener <rguenther@suse.de>
19546 PR middle-end/85180
19547 * alias.c (find_base_term): New wrapper around find_base_term
19548 unwinding CSELIB_VAL_PTR changes.
19549 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19552 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19554 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19556 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19557 constant definitions.
19558 ("nop"): lr 0,0 -> nopr r0
19559 ("nop_lr0", "nop_lr1"): New insn definitions.
19561 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19563 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19564 NDS32_V3PUSH_AVAILABLE_P macro.
19566 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19567 Chung-Ju Wu <jasonwucj@gmail.com>
19569 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19570 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19571 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19572 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19573 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19574 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19575 * config/nds32/constraints.md: New constraints and checking for hard
19576 float configuration.
19577 * config/nds32/iterators.md: New mode iterator and attribute for hard
19578 float configuration.
19579 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19581 * config/nds32/nds32-fpu.md: New file.
19582 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19583 deal with hard float code generation.
19584 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19586 (abi_type, float_reg_number): New enum type.
19587 * config/nds32/nds32-predicates.c: New predicates for hard float.
19588 * config/nds32/nds32-protos.h: Declare functions for hard float.
19589 * config/nds32/nds32.c: Implementation for hard float configuration.
19590 * config/nds32/nds32.h: Definitions for hard float configuration.
19591 * config/nds32/nds32.md: Include hard float machine description and
19592 modify patterns for hard float configuration.
19593 * config/nds32/nds32.opt: New options for hard float configuration.
19594 * config/nds32/predicates.md: New predicates for hard float
19597 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19599 * common/config/nds32/nds32-common.c
19600 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19602 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19604 PR middle-end/85195
19605 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19606 CONSTRUCTOR_ELT (ctor, ...)->value.
19608 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19611 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19613 2018-04-05 Tom de Vries <tom@codesourcery.com>
19616 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19619 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19620 Kito Cheng <kito.cheng@gmail.com>
19622 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19623 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19624 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19625 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19627 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19628 Kito Cheng <kito.cheng@gmail.com>
19630 * config/nds32/constraints.md (Ufe): New memory constraint.
19631 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19632 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19633 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19635 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19636 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19638 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19640 * config/nds32/nds32.md: Use optimize_size in the condition for
19641 alu-shift instructions.
19643 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19645 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19647 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19649 * config/nds32/nds32.md (negsi2): Refine pattern.
19651 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19652 Chung-Ju Wu <jasonwucj@gmail.com>
19654 * config/nds32/iterators.md (shift_rotate): New code iterator.
19655 (shift): New code attribute.
19656 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19657 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19658 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19659 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19660 bit-wise operations.
19661 (andsi3, *andsi3): Ditto.
19662 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19663 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19664 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19665 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19666 nds32_ior_operand, nds32_xor_operand): New predicates.
19668 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19670 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19671 (addsi3, subsi3): ... this.
19673 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19675 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19677 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19679 * config/nds32/nds32.md: Adjust indention.
19681 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19683 * config/nds32/nds32.md (feature): New attribute.
19685 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19687 * config/nds32/nds32.md (subtype): New attribute.
19689 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19692 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19693 expansion to perform a bitwise AND of the argument followed by a
19694 boolean negation of the result.
19696 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19698 PR rtl-optimization/84878
19699 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19700 the basic block. Assert the use reference is not artificial and that
19701 it has an associated insn.
19703 2018-04-04 Michael Matz <matz@suse.de>
19705 * builtins.c (compute_objsize): Pass correct operand
19706 to array_at_struct_end_p.
19708 2018-04-04 Richard Biener <rguenther@suse.de>
19711 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19712 from contexts for DINFO_LEVEL_TERSE and below.
19714 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19716 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19717 resiter_operand condition.
19718 * config/nds32/nds32.md (*move<mode>): Ditto.
19720 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19721 Monk Chiang <sh.chiang04@gmail.com>
19723 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19725 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19727 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19729 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19730 Kito Cheng <kito.cheng@gmail.com>
19732 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19733 nds32_cond_code_str, output_cond_branch,
19734 output_cond_branch_compare_zero, nds32_expand_cbranch,
19735 nds32_expand_cstore, nds32_expand_movcc,
19736 nds32_output_cbranchsi4_equality_zero,
19737 nds32_output_cbranchsi4_equality_reg,
19738 nds32_output_cbranchsi4_equality_reg_or_const_int,
19739 nds32_output_cbranchsi4_greater_less_zero: New functions.
19740 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19741 nds32_expand_cstore, nds32_expand_movcc,
19742 nds32_output_cbranchsi4_equality_zero,
19743 nds32_output_cbranchsi4_equality_reg,
19744 nds32_output_cbranchsi4_equality_reg_or_const_int,
19745 nds32_output_cbranchsi4_greater_less_zero): Declare.
19746 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19747 nds32_rimm11s_operand): New predicates.
19748 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19749 * config/nds32/nds32.md: Rewrite all the branch and conditional move
19752 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19754 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19755 * config/nds32/nds32.md: Ditto.
19756 * config/nds32/pipelines.md: Ditto.
19758 2018-04-04 Richard Biener <rguenther@suse.de>
19760 PR tree-optimization/85168
19761 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19762 propagating abnormals.
19764 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19766 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19768 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19769 Kito Cheng <kito.cheng@gmail.com>
19771 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19772 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19773 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19774 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19775 * config/nds32/nds32.md (sibcall_internal): New.
19776 (sibcall_register): Remove.
19777 (sibcall_immediate): Remove.
19778 (sibcall_value_internal): New.
19779 (sibcall_value_register): Remove.
19780 (sibcall_value_immediate): Remove.
19781 * config/nds32/predicates.md (nds32_general_register_operand): New.
19782 (nds32_call_address_operand): New.
19784 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19786 PR rtl-optimization/85167
19787 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19788 bb_defs if *split_p, instead preinitialize it to NULL.
19790 PR tree-optimization/85156
19791 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19792 evaluating the argument multiple times.
19794 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
19796 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19798 (_mm_cvtpd_ps): Likewise.
19799 (_mm_cvttpd_epi32): Likewise.
19800 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19801 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19802 vector, pixel, and bool following altivec.h include.
19804 2018-04-03 Martin Sebor <msebor@redhat.com>
19806 * doc/extend.texi (Common Function Attributes): Clarify.
19807 (const attribute): Likewise.
19808 (pure attribute): Likewise.
19810 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19813 * config/i386/i386.c (ix86_expand_vector_set): Use
19814 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
19816 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
19818 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19819 instructions when changing rounding bits to preserve precision bits
19820 in the x87 control word.
19822 2018-04-03 Martin Liska <mliska@suse.cz>
19824 PR tree-optimization/82491
19825 * rtl.h (strip_offset_and_add): Replace += suboffset with
19826 poly_uint64 () + suboffset.
19828 2018-03-29 Martin Liska <mliska@suse.cz>
19829 Martin Jambor <mjambor@suse.cz>
19832 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19833 param_type is not an integral or pointer type.
19835 2018-04-03 Richard Biener <rguenther@suse.de>
19837 * sese.h (recompute_all_dominators): Remove.
19839 2018-04-02 Martin Sebor <msebor@redhat.com>
19841 * doc/invoke.texi (-Wrestrict): Fix typos.
19843 2018-04-02 Jim Wilson <jimw@sifive.com>
19845 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19846 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19847 (<optab>di3, <optab>si3_extend): Likewise.
19848 (<optab>si3_mask, <optab>si3_mask_1): New.
19849 (<optab>di3_mask, <optab>di3_mask_1): New.
19850 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19851 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19852 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19854 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
19856 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19859 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
19861 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19862 (nds32_canonicalize_comparison): New function.
19864 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19865 Kito Cheng <kito.cheng@gmail.com>
19866 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19868 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19869 * config/nds32/constants.md (unspec_volatile_element): Add
19870 UNSPEC_VOLATILE_RELAX_GROUP.
19871 * config/nds32/nds32-relax-opt.c: New file.
19872 * config/nds32/nds32-predicates.c
19873 (nds32_symbol_load_store_p): New function.
19874 * config/nds32/nds32-protos.h
19875 (nds32_symbol_load_store_p): Declare function.
19876 (make_pass_nds32_relax_opt): Declare new rtl pass function.
19877 * config/nds32/nds32.c
19878 (nds32_register_pass): New function to register pass.
19879 (nds32_register_passes): New function to register passes.
19880 * config/nds32/nds32.md (relax_group): New pattern.
19881 * config/nds32/nds32.opt (mrelax-hint): New option.
19882 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19884 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
19886 * config/nds32/t-nds32: Modify files dependency.
19888 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19890 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19891 (PROFILE_HOOK): Define its implementation.
19893 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19895 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19896 type and 32-bit size.
19898 2018-04-01 Jakub Jelinek <jakub@redhat.com>
19900 PR middle-end/85090
19901 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19902 (V_128_256): New mode iterator.
19903 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19904 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19905 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19907 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19908 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19910 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
19913 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19914 NaN inputs correctly.
19916 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
19919 * config/rs6000/vsx.md (??r): New mode attribute.
19920 (*vsx_mov<mode>_64bit): Use it.
19921 (*vsx_mov<mode>_32bit): Likewise.
19923 2018-03-30 Martin Sebor <msebor@redhat.com>
19925 PR tree-optimization/84818
19926 * builtins.c (check_access): Use warning_n.
19928 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19931 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19933 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19936 2018-03-30 Julia Koval <julia.koval@intel.com>
19939 * x86-tune.def (movx, partial_reg_dependency): Enable for
19942 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
19944 PR inline-asm/84985
19945 * lra-constraints.c (process_alt_operands): Move setting
19946 this_alternative_matches below.
19948 2018-03-29 Martin Liska <mliska@suse.cz>
19951 * doc/invoke.texi: Document how LTO works with debug info.
19952 Describe auto-load support of binutils. Mention 'x86-64'
19953 as valid option value of -march option.
19955 2018-03-29 Jakub Jelinek <jakub@redhat.com>
19957 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19960 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19961 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19962 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19965 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
19968 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19969 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19970 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19971 for RS6000_BTM_POWERPC64.
19972 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19973 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19974 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19977 (DIVDEU): Likewise.
19979 2018-03-28 Carl Love <cel@us.ibm.com>
19982 2017-09-27 Carl Love <cel@us.ibm.com>
19984 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19985 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19986 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19989 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19991 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19992 instead of __vector bool.
19993 (_mm_max_pu8): Likewise.
19994 (_mm_min_pi16): Likewise.
19996 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
19999 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20000 (DIVWEUO): Likewise.
20001 (DIVDEO): Likewise.
20002 (DIVDEUO): Likewise.
20003 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20004 DIVWEUO and DIVDEUO.
20005 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20006 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20007 (div_extend): Likewise.
20008 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20010 (__builtin_divweuo): Likewise.
20011 (__builtin_divdeo): Likewise.
20012 (__builtin_divdeuo): Likewise.
20014 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20017 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20018 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20020 PR tree-optimization/82004
20021 * gimple-match-head.c (optimize_pow_to_exp): New function.
20022 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20023 Don't fold to exp if optimize_pow_to_exp is false.
20025 2018-03-28 Martin Liska <mliska@suse.cz>
20028 * calls.c (initialize_argument_information): Fix trailing space.
20029 * common.opt: Fix typo and provide better explanation for
20030 -fsanitize-coverage option.
20031 * config/i386/i386.opt: Fix typo.
20033 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20034 Martin Liska <mliska@suse.cz>
20037 * gimplify.c (asan_poison_variable): Don't do the check for
20038 gimplify_omp_ctxp here.
20039 (gimplify_decl_expr): Do it here.
20040 (gimplify_target_expr): Likewise.
20042 2018-03-28 Martin Liska <mliska@suse.cz>
20045 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20046 chkp_type_bounds_count if MPX is not enabled.
20048 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20050 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20052 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20055 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20056 function to create the function decl for complex long double
20057 multiply and divide for -mabi=ieeelongdouble.
20058 (init_float128_ieee): Call it.
20060 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20063 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20064 -fcf-protection=branch -mibt.
20065 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20067 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20070 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20071 arm_word_relocations.
20073 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20076 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20077 extern array declarations.
20079 2018-03-27 Richard Biener <rguenther@suse.de>
20081 PR middle-end/84067
20082 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20083 explicit single_use checks.
20085 2018-03-27 Richard Biener <rguenther@suse.de>
20087 PR tree-optimization/85082
20088 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20091 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20093 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20094 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20095 Turn on fasynchronous-unwind-tables and funwind-tables.
20097 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20100 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20101 (*bmi_blsr_<mode>_ccz): Ditto.
20103 2018-03-26 Tom de Vries <tom@codesourcery.com>
20105 PR tree-optimization/85063
20106 * omp-general.c (offloading_function_p): New function. Factor out
20108 * omp-offload.c (pass_omp_target_link::gate): ... here.
20109 * omp-general.h (offloading_function_p): Declare.
20110 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20111 with attribute omp declare target for offloading functions.
20113 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20115 PR tree-optimization/84005
20116 * tree-data-ref.h (get_base_for_alignment): Declare.
20117 * tree-data-ref.c (get_base_for_alignment_1): New function.
20118 (get_base_for_alignment): Likewise.
20119 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20120 get_base_for_alignment to find a suitable base object, instead
20121 of always using drb->base_address.
20123 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20125 PR inline-asm/85022
20126 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20127 known size by default.
20129 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20131 PR inline-asm/85030
20132 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20133 and non BLKmode operands.
20135 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20138 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20139 Clean up attributes.
20141 2018-03-23 Richard Biener <rguenther@suse.de>
20144 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20145 we are going to emit early debug for LTO.
20147 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20149 PR inline-asm/85034
20150 * function.c (match_asm_constraints_1): Don't optimize if input
20151 doesn't satisfy general_operand predicate for output's mode.
20153 PR inline-asm/85022
20154 * alias.c (write_dependence_p): Don't require for x_canonicalized
20155 non-VOIDmode if x has VOIDmode.
20158 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20159 just don't try to optimize it rather than assert it never happens.
20161 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20163 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20164 macro expansions for definition of ST_INTERNAL_<mode> and
20165 LD_INTERNAL_<mode> builtins.
20166 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20168 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20170 (altivec_expand_st_builtin): Likewise.
20171 (altivec_expand_builtin): Remove calls to deleted functions.
20172 (rs6000_address_for_altivec): Delete this function.
20173 * config/rs6000/vector.md: Remove expands for
20174 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20176 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20179 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20180 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20181 re-computing once computed.
20182 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20183 (arm_init_machine_status): Initialize
20184 machine->static_chain_stack_bytes.
20186 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20189 * doc/extend.texi: Add four new prototypes for vec_ld.
20190 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20191 definitions for more logical presentation.
20192 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20193 entries for V1TI variants of __builtin_altivec_ld builtin.
20194 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20195 handling of V1TI variant of LVX icode pattern.
20196 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20197 (rs6000_gimple_fold_builtin): Likewise.
20198 (altivec_init_builtins): Add code to define
20199 __builtin_altivec_lvx_v1ti function.
20201 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20203 PR inline-asm/84941
20204 * function.c (match_asm_constraints_1): Don't do the optimization
20205 if input isn't a REG, SUBREG, MEM or constant.
20207 2018-03-22 Tom de Vries <tom@codesourcery.com>
20209 PR tree-optimization/84956
20210 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20211 bb_has_abnormal_pred.
20213 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20216 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20217 DECL_INITIAL (decl) to decl at the end.
20218 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20219 adjust the comment.
20221 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20223 * doc/extend.texi (__builtin_tgmath): Document when complex
20224 integer types are treated as _Complex _Float64.
20226 2018-03-21 Tom de Vries <tom@codesourcery.com>
20228 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20230 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20232 PR tree-optimization/84960
20233 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20234 if it is ENTRY block, move them into single succ of ENTRY in that case.
20236 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20238 PR tree-optimization/84811
20239 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20240 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20241 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20242 (known_subrange_p): Update accordingly. Cast each value involved
20243 in the size comparison, rather than casting the result of the
20246 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20248 PR tree-optimization/84982
20249 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20250 by flipping the least significant bit rather than all bits from
20251 bitpos to bitpos + bitsize - 1.
20253 2018-03-21 Nathan Sidwell <nathan@acm.org>
20255 * doc/extend.texi (Deprecated Features): Remove mention of
20256 long-deleted deprecations.
20258 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20261 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20262 * configure: Regenerate.
20264 2018-03-21 Tom de Vries <tom@codesourcery.com>
20266 PR tree-optimization/83126
20267 * tree-parloops.c (num_phis): New function.
20268 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20270 2018-03-21 Nathan Sidwell <nathan@acm.org>
20272 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20273 mention anon-struct/union members and trailing attributes.
20275 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20277 PR tree-optimization/84969
20278 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20279 builtin memset partitions if they set different rhs values.
20281 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20283 PR rtl-optimization/84989
20284 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20285 VEC_DUPLICATE with scalar result mode.
20287 2018-03-21 Martin Liska <mliska@suse.cz>
20290 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20291 not intended return statement.
20293 2018-03-21 Martin Liska <mliska@suse.cz>
20296 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20297 (chkp_find_bound_slots_1): Limit number of iterations.
20299 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20302 * Minor grammar fixes for x86 options.
20304 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20307 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20308 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20310 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20313 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20314 (altivec_lvx_<mode>_1op): Likewise.
20315 (altivec_stvx_<mode>_2op): Likewise.
20316 (altivec_stvx_<mode>_1op): Likewise.
20317 (altivec_lvx_<VM2:mode>): New define_expand.
20318 (altivec_stvx_<VM2:mode>): Likewise.
20319 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20320 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20321 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20322 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20323 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20324 (rs6000_gen_lvx): Likewise.
20325 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20326 (altivec_expand_stv_builtin): Likewise.
20327 (altivec_expand_builtin): Likewise.
20328 * config/rs6000/vector.md: Likewise.
20330 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20333 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20336 2018-03-20 Richard Biener <rguenther@suse.de>
20339 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20340 sign-conversions as zero, fall back to standard scalar_stmt
20343 2018-03-20 Martin Liska <mliska@suse.cz>
20346 * predict.c (rebuild_frequencies): Handle case when we have
20347 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20349 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20352 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20353 flag_section_anchors.
20354 * varasm.c (use_blocks_for_decl_p): Remove hack for
20355 dw2_force_const_mem.
20358 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20360 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20361 be created, use lowpart_subreg of operands[0] rather than operands[0]
20363 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20364 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20365 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20366 and n constraint instead of aarch64_shift_imm_di and Usd.
20367 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20368 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20370 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20373 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20374 to favor GPR over NEON registers.
20375 (<shift>di3_neon): Likewise.
20377 2018-03-20 Tom de Vries <tom@codesourcery.com>
20380 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20381 (nvptx_process_pars): Emit bar.sync asap and alap.
20383 2018-03-20 Tom de Vries <tom@codesourcery.com>
20386 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20387 seen_label if seen_label is already set.
20389 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20392 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20393 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20394 Use 1U instead of 1. Formatting fixes.
20397 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20398 instead of TREE_TYPE (s1) for the return value.
20400 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20402 PR tree-optimization/84946
20403 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20404 bitsize + bitsize in poly_uint64 rather than poly_int64.
20407 * dwarf2asm.c: Include fold-const.c.
20408 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20409 of decl rather than decl itself.
20411 PR rtl-optimization/84643
20412 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20414 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20417 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20418 calling assemble_variable.
20420 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20423 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20424 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20426 2018-03-19 Jim Wilson <jimw@sifive.com>
20429 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20430 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20431 (riscv_first_stack_step): Likewise.
20432 (riscv_option_override): Use STACK_BOUNDARY instead of
20433 MIN_STACK_BOUNDARY.
20434 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20435 MIN_STACK_BOUNDARY.
20436 (BIGGEST_ALIGNMENT): Set to 128.
20437 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20438 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20441 2018-03-19 Richard Biener <rguenther@suse.de>
20443 PR tree-optimization/84933
20444 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20445 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20447 2018-03-19 Richard Biener <rguenther@suse.de>
20449 PR tree-optimization/84859
20450 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20451 (cond_if_else_store_replacement): Perform sinking operation on
20452 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20453 Generalize what a BB with a single eligible store is.
20455 2018-03-19 Richard Biener <rguenther@suse.de>
20457 PR tree-optimization/84929
20458 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20459 chrec_is_positive against non-chrec arg.
20461 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20464 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20466 2018-03-18 Martin Liska <mliska@suse.cz>
20468 PR rtl-optimization/84635
20469 * regrename.c (build_def_use): Use matches_mode only when
20472 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20474 PR tree-optimization/84913
20475 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20476 vectorize chains of COND_EXPRs.
20478 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20480 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20482 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20484 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20486 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20488 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20490 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20491 Kito Cheng <kito.cheng@gmail.com>
20493 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20494 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20495 (nds32_adjust_reg_alloc_order): New function.
20496 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20498 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20500 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20501 nds32_print_operand, nds32_print_operand_address): Use
20502 HOST_WIDE_INT_PRINT_DEC instead.
20504 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20506 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20508 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20511 * config/i386/i386.c (initial_ix86_tune_features,
20512 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20513 unsigned long long.
20514 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20515 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20516 rather than 1u << ix86_tune. Formatting fix.
20517 (ix86_option_override_internal): Change ix86_arch_mask from
20518 unsigned int to unsigned HOST_WIDE_INT, initialize to
20519 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20520 (ix86_function_specific_restore): Likewise.
20522 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20525 * postreload.c (reload_combine_recognize_pattern): Perform
20526 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20527 truncate_int_for_mode the result for the destination's mode.
20530 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20531 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20533 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20536 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20539 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20540 regno_allocno_class_array and sorted_pseudos.
20541 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20542 insns where regno is used.
20544 2018-03-16 Martin Liska <mliska@suse.cz>
20547 * multiple_target.c (create_dispatcher_calls): Redirect
20548 reference in the symbol table.
20550 2018-03-16 Martin Liska <mliska@suse.cz>
20553 * multiple_target.c (create_dispatcher_calls): Redirect also
20556 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20560 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20561 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20562 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20564 2018-03-16 Julia Koval <julia.koval@intel.com>
20566 * doc/invoke.texi (Skylake Server): Add CLWB.
20567 Cannonlake): Remove CLWB.
20569 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20571 PR tree-optimization/84841
20572 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20574 (FLOAT_ONE_CONST_TYPE): Define.
20575 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20576 (sort_by_operand_rank): Put entries with higher constant_type last
20577 rather than first to match comments.
20579 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20581 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20584 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20587 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20588 check and use address of target always.
20590 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20593 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20594 (indirect_thunk_bnd_needed): Likewise.
20595 (indirect_thunks_used): Likewise.
20596 (indirect_thunks_bnd_used): Likewise.
20597 (indirect_return_needed): New.
20598 (indirect_return_bnd_needed): Likewise.
20599 (output_indirect_thunk_function): Add a bool argument for
20601 (output_indirect_thunk_function): Don't generate alias for
20602 function return thunk.
20603 (ix86_code_end): Call output_indirect_thunk_function to generate
20604 function return thunks.
20605 (ix86_output_function_return): Set indirect_return_bnd_needed
20606 and indirect_return_needed instead of indirect_thunk_bnd_needed
20607 and indirect_thunk_needed.
20609 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20611 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20612 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20613 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20615 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20616 Paul Hua <paul.hua.gm@gmail.com>
20619 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20621 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20623 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20624 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20625 resp. SFmode cases.
20627 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20630 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20631 instead of GET_MODE_SIZE when comparing Units.
20633 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20636 * varasm.c (hash_section): Return an unchangeble hash value
20637 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20638 Return !aarch64_can_use_per_function_literal_pools_p ().
20640 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20643 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20644 rather than address of cmode as last argument to prepare_cmp_insn.
20646 2018-03-15 Julia Koval <julia.koval@intel.com>
20648 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20649 F_AVX512VNNI, F_AVX512BITALG): New.
20651 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20654 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20655 insn for floating-point loads and stores.
20657 2018-03-14 Carl Love <cel@us.ibm.com>
20659 * config/rs6000/rs6000-c.c: Add macro definitions for
20660 ALTIVEC_BUILTIN_VEC_PERMXOR.
20661 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20662 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20663 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20664 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20666 * config/doc/extend.texi: Add prototypes for vec_permxor.
20668 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20671 * diagnostic-show-locus.c (class layout_point): Convert m_line
20672 from int to linenum_type.
20673 (line_span::comparator): Use linenum "compare" function when
20674 comparing line numbers.
20675 (test_line_span): New function.
20676 (layout_range::contains_point): Convert param "row" from int to
20678 (layout_range::intersects_line_p): Likewise.
20679 (layout::will_show_line_p): Likewise.
20680 (layout::print_source_line): Likewise.
20681 (layout::should_print_annotation_line_p): Likewise.
20682 (layout::print_annotation_line): Likewise.
20683 (layout::print_leading_fixits): Likewise.
20684 (layout::annotation_line_showed_range_p): Likewise.
20685 (struct line_corrections): Likewise for field m_row.
20686 (line_corrections::line_corrections): Likewise for param "row".
20687 (layout::print_trailing_fixits): Likewise.
20688 (layout::get_state_at_point): Likewise.
20689 (layout::get_x_bound_for_row): Likewise.
20690 (layout::print_line): Likewise.
20691 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20692 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20693 * input.c (selftest::test_linenum_comparisons): New function.
20694 (selftest::input_c_tests): Call it.
20695 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20696 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20697 * selftest.h (ASSERT_GT): New macro.
20698 (ASSERT_GT_AT): New macro.
20699 (ASSERT_LT): New macro.
20700 (ASSERT_LT_AT): New macro.
20702 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20704 PR rtl-optimization/84780
20705 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20707 2018-03-14 Martin Liska <mliska@suse.cz>
20709 * tree.c (record_node_allocation_statistics): Use
20710 get_stats_node_kind.
20711 (get_stats_node_kind): New function extracted from
20712 record_node_allocation_statistics.
20713 (free_node): Use get_stats_node_kind.
20715 2018-03-14 Richard Biener <rguenther@suse.de>
20717 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20718 that the value-set of ANTIC_IN doesn't grow.
20721 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20723 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20724 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20726 2018-03-14 Julia Koval <julia.koval@intel.com>
20728 * config.gcc (icelake-client, icelake-server): New.
20730 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20731 (initial_ix86_arch_features): Ditto.
20732 (PTA_SKYLAKE): Add SGX.
20733 (PTA_ICELAKE): Remove.
20734 (PTA_ICELAKE_CLIENT): New.
20735 (PTA_ICELAKE_SERVER): New.
20736 (ix86_option_override_internal): Split up icelake on icelake client and
20738 (get_builtin_code_for_version): Ditto.
20739 (fold_builtin_cpu): Ditto.
20740 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20741 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20742 * config/i386/i386.h (processor_type): Ditto.
20743 * doc/invoke.texi: Ditto.
20745 2018-03-14 Jakub Jelinek <jakub@redhat.com>
20748 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20749 INTEGER_CST offset, add it together with bitpos / 8 and
20750 sign extend based on POINTER_SIZE.
20754 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
20757 * config/i386/constraints.md (Yc): New register constraint.
20758 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20759 Use Yc constraint for alternative 2 of operand 0. Remove
20760 preferred_for_speed attribute.
20762 2018-03-14 Richard Biener <rguenther@suse.de>
20764 PR tree-optimization/84830
20765 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20766 with the old one to avoid oscillations.
20768 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
20771 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20773 (assign_by_spills): Return a flag of reload assignment failure.
20774 Do not process the reload assignment failures. Do not spill other
20775 reload pseudos if they has the same reg class. Update n if
20777 (lra_assign): Add a return arg. Set up from the result of
20778 assign_by_spills call.
20779 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20780 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20781 usage_insns if it is not NULL.
20782 (spill_hard_reg_in_range): New function.
20783 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20784 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20785 function prototypes.
20786 (lra_assign): Change prototype.
20787 * lra.c (lra): Add code to deal with fails by splitting hard reg
20790 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
20792 * config/riscv/riscv.opt (mrelax): New option.
20793 * config/riscv/riscv.c (riscv_file_start): Emit ".option
20794 "norelax" when riscv_mrelax is disabled.
20795 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20797 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20800 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20801 reassociation for int modes.
20803 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20805 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20806 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20808 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20809 * config/aarch64/aarch64-sve.md
20810 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20811 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20812 (*extend<mode><Vwide>2): Rename to...
20813 (aarch64_sve_extend<mode><Vwide>2): ...this.
20814 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20815 renaming the old pattern to...
20816 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
20818 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20819 define_expand, renaming the old pattern to...
20820 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20821 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20822 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20823 account when deciding which SVE instruction the optab should use.
20824 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20826 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20828 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20829 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20830 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20831 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20832 (tlsdesc_small_<mode>): Turn a define_expand and use
20833 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
20834 (tlsdesc_small_advsimd_<mode>): ...this.
20835 (tlsdesc_small_sve_<mode>): New pattern.
20837 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20839 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20840 (UNSPEC_UMUL_HIGHPART): New constants.
20841 (MUL_HIGHPART): New int iteraor.
20842 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20843 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20845 (*<su>mul<mode>3_highpart): New define_insn.
20847 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20850 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20853 2018-03-13 Martin Liska <mliska@suse.cz>
20856 * (sem_item_optimizer::sem_item_optimizer): Initialize new
20858 (sem_item_optimizer::~sem_item_optimizer): Release it.
20859 (sem_item_optimizer::merge_classes): Register variable aliases.
20860 (sem_item_optimizer::fixup_pt_set): New function.
20861 (sem_item_optimizer::fixup_points_to_sets): Likewise.
20862 * ipa-icf.h: Declare new variables and functions.
20864 2018-03-13 Jakub Jelinek <jakub@redhat.com>
20866 PR middle-end/84834
20867 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20868 integer_pow2p@2 and test integer_pow2p in condition.
20869 (A < 0 ? C : 0): Similarly for @1.
20871 PR middle-end/84831
20872 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20873 characters starting at p contain '\0' character, don't look beyond
20877 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20878 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20881 * reg-stack.c (change_stack): Change update_end var from int to
20882 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20883 also call set_block_for_insn on the newly added insns and rescan.
20886 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20887 on the last operand.
20890 * tree.c (stabilize_reference_1): Return save_expr (e) for
20891 STATEMENT_LIST even if it doesn't have side-effects.
20893 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
20895 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20897 2018-03-12 Renlin Li <renlin.li@arm.com>
20899 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20900 aarch64_output_scalar_simd_mov_immediate.
20902 2018-03-12 Martin Sebor <msebor@redhat.com>
20904 PR tree-optimization/83456
20905 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20906 for perfectly overlapping calls to memcpy.
20907 (gimple_fold_builtin_memory_chk): Same.
20908 (gimple_fold_builtin_strcpy): Handle no-warning.
20909 (gimple_fold_builtin_stxcpy_chk): Same.
20910 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20912 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20914 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20915 parameter. Use it for SFmode.
20916 (rs6000_function_arg_advance_1): Adjust.
20917 (rs6000_function_arg): Adjust.
20918 (rs6000_gimplify_va_arg): Pass false for that new parameter.
20920 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20922 PR rtl-optimization/84169
20923 PR rtl-optimization/84780
20924 * combine.c (can_combine_p): Check for a 2-insn combination whether
20925 the destination register is used between the two insns, too.
20927 2018-03-12 Richard Biener <rguenther@suse.de>
20929 PR tree-optimization/84803
20930 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20931 for refs DR analysis didn't process.
20933 2018-03-12 Richard Biener <rguenther@suse.de>
20935 PR tree-optimization/84777
20936 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20937 force-vectorize loops ignore whether we are optimizing for size.
20939 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
20941 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20942 (TARGET_MD_ASM_ADJUST): Define.
20944 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
20945 Kito Cheng <kito.cheng@gmail.com>
20946 Chung-Ju Wu <jasonwucj@gmail.com>
20948 * config/nds32/nds32.c (nds32_compute_stack_frame,
20949 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20950 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20951 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20952 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20953 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20954 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20955 * config/nds32/nds32.md (prologue, epilogue): Use macro
20956 NDS32_V3PUSH_AVAILABLE_P to do checking.
20958 2018-03-11 Jakub Jelinek <jakub@redhat.com>
20961 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20962 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20963 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
20964 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
20965 addition of most attributes on !orig_type_die or the attribute not
20966 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20968 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20969 Chung-Ju Wu <jasonwucj@gmail.com>
20971 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20972 __NDS32_VH__ macro.
20973 * config/nds32/nds32.opt (mvh): New option.
20975 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20976 Chung-Ju Wu <jasonwucj@gmail.com>
20978 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20980 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20981 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20984 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
20985 Chung-Ju Wu <jasonwucj@gmail.com>
20987 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20989 * config/nds32/nds32-multiple.md (strlensi): New pattern.
20990 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20992 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
20993 Kito Cheng <kito.cheng@gmail.com>
20994 Chung-Ju Wu <jasonwucj@gmail.com>
20996 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20997 UNSPEC_FFMISM and UNSPEC_FLMISM.
20998 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20999 for ffb, ffmism and flmism.
21000 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21001 (unspec_ffmism): Ditto.
21002 (unspec_flmism): Ditto.
21003 (nds32_expand_builtin_impl): Check if string extension is available.
21004 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21005 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21007 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21010 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21013 * lra-assigns.c (assign_by_spills): Return a flag of reload
21014 assignment failure. Do not process the reload assignment
21015 failures. Do not spill other reload pseudos if they has the same
21017 (lra_assign): Add a return arg. Set up from the result of
21018 assign_by_spills call.
21019 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21020 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21021 usage_insns if it is not NULL.
21022 (spill_hard_reg_in_range): New function.
21023 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21024 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21025 function prototypes.
21026 (lra_assign): Change prototype.
21027 * lra.c (lra): Add code to deal with fails by splitting hard reg
21030 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21033 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21035 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21038 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21039 (dw_val_node): Add val_symbolic_view.
21040 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21041 (symview_upper_bound): New.
21042 (new_line_info_table): Initialize symviews_since_reset.
21043 (dwarf2out_source_line): Count symviews_since_reset and set
21044 symview_upper_bound.
21045 (dw_val_equal_p): Handle symview.
21046 (add_AT_symview): New.
21047 (print_dw_val): Handle symview.
21048 (attr_checksum, attr_checksum_ordered): Likewise.
21049 (same_dw_val_p, size_of_die): Likewise.
21050 (value_format, output_die): Likewise.
21051 (add_high_low_attributes): Use add_AT_symview for entry_view.
21052 (dwarf2out_finish): Reset symview_upper_bound, clear
21055 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21058 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21059 Add strict argument and use it.
21060 (rs6000_split_multireg_move): Update for new strict argument.
21061 (mem_operand_gpr): Disallow all non-offsettable addresses.
21062 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21064 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21067 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21068 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21069 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21072 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21073 decl, use remap_type if we want to use the type.
21075 2018-03-09 Martin Sebor <msebor@redhat.com>
21077 PR tree-optimization/84526
21078 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21080 (builtin_access::generic_overlap): Be prepared to handle non-array
21083 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21085 PR rtl-optimization/84682
21086 * lra-constraints.c (process_address_1): Check is_address flag
21087 for address constraints.
21088 (process_alt_operands): Likewise.
21089 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21090 preprocess_constraints.
21091 * recog.h (preprocess_constraints): Add oploc parameter.
21093 * recog.c (preprocess_constraints): Test address_operand for
21094 CT_ADDRESS constraints.
21096 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21099 * lra-assigns.c (assign_by_spills): Return a flag of reload
21100 assignment failure. Do not process the reload assignment
21101 failures. Do not spill other reload pseudos if they has the same
21103 (lra_assign): Add a return arg. Set up from the result of
21104 assign_by_spills call.
21105 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21106 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21107 usage_insns if it is not NULL.
21108 (spill_hard_reg_in_range): New function.
21109 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21110 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21111 function prototypes.
21112 (lra_assign): Change prototype.
21113 * lra.c (lra): Add code to deal with fails by splitting hard reg
21116 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21119 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21120 Accept complain bool parameter. Only emit errors if it is true.
21121 (arm_parse_cpu_option_name): Likewise.
21122 (arm_target_thumb_only): Adjust callers of the above.
21123 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21124 prototype to take a default true bool parameter.
21125 (arm_parse_arch_option_name): Likewise.
21127 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21128 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21132 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21133 * configure: Regenerate.
21134 * configure.ac ("linker --version-script option"): New.
21135 ("linker soname option"): New.
21137 2018-03-09 Richard Biener <rguenther@suse.de>
21139 PR tree-optimization/84775
21140 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21141 immediate uses of predicate stmts and mark them modified.
21144 PR tree-optimization/84178
21145 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21147 (version_loop_for_if_conversion): Delay update_ssa call.
21148 (tree_if_conversion): Delay update_ssa until after predicate
21151 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21154 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21155 when the function accesses prior frames.
21157 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21160 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21161 gen_llsym, otherwise call maybe_gen_llsym.
21163 PR inline-asm/84742
21164 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21165 has ',' character inside of it.
21167 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21170 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21171 as clobbering CC_REGNUM.
21173 2018-03-08 Richard Biener <rguenther@suse.de>
21175 PR middle-end/84552
21176 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21177 (follow_copies_to_constant): Do not follow SSA names registered
21180 2018-03-08 Richard Biener <rguenther@suse.de>
21182 PR tree-optimization/84178
21183 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21185 (version_loop_for_if_conversion): Delay update_ssa call.
21186 (tree_if_conversion): Delay update_ssa until after predicate
21189 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21191 PR tree-optimization/84178
21192 * tree-if-conv.c (release_bb_predicate): Remove the
21193 the assertion that the stmts have NULL use_ops.
21194 Discard the statements, asserting that they haven't
21195 yet been added to a BB.
21197 2018-03-08 Richard Biener <rguenther@suse.de>
21199 PR tree-optimization/84746
21200 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21201 (phi_translate): Pass in destination ANTIC_OUT set.
21202 (phi_translate_1): Likewise. For a simplified result lookup
21203 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21204 (phi_translate_set): Adjust.
21205 (do_pre_regular_insertion): Likewise.
21206 (do_pre_partial_partial_insertion): Likewise.
21208 2018-03-08 Martin Liska <mliska@suse.cz>
21210 PR gcov-profile/84735
21211 * doc/gcov.texi: Document usage of profile files.
21212 * gcov-io.h: Document changes in the format.
21214 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21218 * dwarf2out.c (struct dw_line_info_table): Update comments for
21220 (FORCE_RESET_NEXT_VIEW): New.
21221 (FORCE_RESETTING_VIEW_P): New.
21222 (RESETTING_VIEW_P): Check for -1 too.
21223 (ZERO_VIEW_P): Likewise.
21224 (new_line_info_table): Force-reset next view.
21225 (dwarf2out_begin_function): Likewise.
21226 (dwarf2out_source_line): Simplify zero_view_p initialization.
21227 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21228 view directly. Omit view when omitting .loc at line 0.
21230 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21232 PR tree-optimization/84740
21233 * tree-switch-conversion.c (process_switch): Call build_constructors
21234 only if info.phi_count is non-zero.
21236 PR tree-optimization/84739
21237 * tree-tailcall.c (find_tail_calls): Check call arguments against
21238 DECL_ARGUMENTS (current_function_decl) rather than
21239 DECL_ARGUMENTS (func) when checking for tail recursion.
21241 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21243 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21244 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21245 Volker Reichelt's entry and add entries for people that perform
21246 GCC fuzzy testing and report numerous bugs.
21248 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21251 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21252 readonly data in sdata, if that is disabled.
21253 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21254 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21255 -mreadonly-in-sdata option.
21257 2018-03-07 Martin Sebor <msebor@redhat.com>
21259 PR tree-optimization/84468
21260 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21261 basic block when looking for nul assignment.
21263 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21266 * except.h (output_function_exception_table): Adjust prototype.
21267 * except.c (output_function_exception_table): Remove FNNAME parameter
21268 and add SECTION parameter. Ouput one part of the table at a time.
21269 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21270 the first part of the exception table and emit unwind directives.
21271 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21272 (i386_pe_seh_cold_init): Likewise.
21273 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21274 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21275 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21276 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21277 * config/i386/winnt.c: Include except.h.
21278 (struct seh_frame_state): Add reg_offset, after_prologue and
21279 in_cold_section fields.
21280 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21281 (i386_pe_seh_cold_init): New function.
21282 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21283 to seh->in_cold_section.
21284 (seh_emit_push): Record the offset of the push.
21285 (seh_emit_save): Record the offet of the save.
21286 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21287 Test seh->after_prologue to disregard the epilogue.
21288 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21289 (i386_pe_end_cold_function): New function.
21291 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21294 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21295 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21298 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21300 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21301 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21303 PR middle-end/84723
21304 * multiple_target.c: Include tree-inline.h and intl.h.
21305 (expand_target_clones): Diagnose and fail if node->definition and
21306 !tree_versionable_function_p (node->decl).
21308 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21310 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21312 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21313 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21314 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21316 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21319 * combine.c (try_combine): Use reg_or_subregno instead of handling
21320 just paradoxical SUBREGs and REGs.
21322 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21324 * config/arc/arc.c (arc_finalize_pic): Remove function.
21325 (arc_must_save_register): We use single base PIC register, remove
21326 checks to save/restore the PIC register.
21327 (arc_expand_prologue): Likewise.
21328 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21330 (arc_verify_short): Likewise.
21331 (arc_attr_type): Likewise.
21332 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21333 (walk_stores): Likewise.
21334 (arc_address_cost): Make it static.
21335 (arc_verify_short): Likewise.
21336 (branch_dest): Likewise.
21337 (arc_attr_type): Likewise.
21338 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21339 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21340 (arc_final_prescan_insn): Remove inserting the nops due to
21341 hardware hazards. It is done in reorg step.
21342 (insn_length_variant_t): Remove.
21343 (insn_length_parameters_t): Likewise.
21344 (arc_insn_length_parameters): Likewise.
21345 (arc_get_insn_variants): Likewise.
21346 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21348 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21350 PR inline-asm/84683
21351 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21354 PR tree-optimization/84687
21355 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21357 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21359 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21361 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21362 Rename to ppc_speculation_barrier.
21363 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21364 __builtin_ppc_speculation_barrier.
21366 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21369 * combine.c (combine_simplify_rtx): Don't try to simplify if
21370 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21373 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21375 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21376 to 32 bytes when compiling for POWER9.
21378 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21381 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21382 regparm >= 3 with no arg reg available also for calls with
21383 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21386 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21388 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21390 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21393 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21395 2018-03-05 Richard Biener <rguenther@suse.de>
21397 PR tree-optimization/84486
21398 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21399 When inserting a __builtin_assume_aligned call set the LHS
21400 SSA name alignment info accordingly.
21402 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21404 PR tree-optimization/84114
21405 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21406 Avoid reassociation of FLOAT_MODE addition.
21408 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21410 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21411 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21412 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21413 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21414 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21415 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21416 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21418 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21419 __builtin_ia32_wbinvd): New builtins.
21420 (SPECIAL_ARGS2): New.
21421 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21422 (SPECIAL_ARGS2): New.
21423 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21424 (ix86_valid_target_attribute_inner_p): Ditto.
21425 (ix86_init_mmx_sse_builtins): Add special_args2.
21426 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21427 TARGET_WBNOINVD_P): New.
21428 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21429 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21430 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21431 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21432 * config/i386/pconfigintrin.h: New file.
21433 * config/i386/wbnoinvdintrin.h: Ditto.
21434 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21436 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21438 2018-03-05 Richard Biener <rguenther@suse.de>
21440 PR tree-optimization/84670
21441 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21443 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21444 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21445 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21446 doesn't grow if all successors (recursively) were visited at least
21449 2018-03-05 Richard Biener <rguenther@suse.de>
21451 PR tree-optimization/84650
21452 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21453 if executed in the loop pipeline.
21455 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21457 * doc/configfiles.texi (Configuration Files): Move info about
21458 conditionalizing $target-protos.h to...
21459 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21460 differs from $target-protos.h.
21462 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21463 Chung-Ju Wu <jasonwucj@gmail.com>
21465 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21466 * config/nds32/nds32-multiple.md (setmemsi): Define.
21467 * config/nds32/nds32-memory-manipulation.c
21468 (nds32_gen_dup_4_byte_to_word_value): New.
21469 (emit_setmem_word_loop): New.
21470 (emit_setmem_byte_loop): New.
21471 (nds32_expand_setmem_loop): New.
21472 (nds32_expand_setmem_loop_v3m): New.
21473 (nds32_expand_setmem_unroll): New.
21474 (nds32_expand_setmem): New.
21476 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21477 Chung-Ju Wu <jasonwucj@gmail.com>
21479 * config/nds32/nds32-memory-manipulation.c
21480 (nds32_emit_load_store): New.
21481 (nds32_emit_post_inc_load_store): New.
21482 (nds32_emit_mem_move): New.
21483 (nds32_emit_mem_move_block): New.
21484 (nds32_expand_movmemsi_loop_unknown_size): New.
21485 (nds32_expand_movmemsi_loop_known_size): New.
21486 (nds32_expand_movmemsi_loop): New.
21487 (nds32_expand_movmemsi_unroll): New.
21488 (nds32_expand_movmemqi): Rename ...
21489 (nds32_expand_movmemsi): ... to this.
21490 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21491 (movmemsi): ... to this.
21492 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21493 (nds32_expand_movmemsi): ... to this.
21495 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21496 Monk Chiang <sh.chiang04@gmail.com>
21497 Chung-Ju Wu <jasonwucj@gmail.com>
21499 * config/nds32/nds32-protos.h
21500 (nds32_expand_load_multiple): New arguments.
21501 (nds32_expand_store_multiple): Ditto.
21502 (nds32_valid_multiple_load_store): Rename ...
21503 (nds32_valid_multiple_load_store_p): ... to this.
21504 * config/nds32/nds32-memory-manipulation.c
21505 (nds32_expand_load_multiple): Refine implementation.
21506 (nds32_expand_store_multiple): Ditto.
21507 * config/nds32/nds32-multiple.md
21508 (load_multiple): Update nds32_expand_load_multiple interface.
21509 (store_multiple): Update nds32_expand_store_multiple interface.
21510 * config/nds32/nds32-predicates.c
21511 (nds32_valid_multiple_load_store): Rename ...
21512 (nds32_valid_multiple_load_store_p): ... to this and refine
21514 * config/nds32/predicates.md
21515 (nds32_load_multiple_and_update_address_operation): New predicate.
21516 (nds32_store_multiple_and_update_address_operation): New predicate.
21518 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21519 Chung-Ju Wu <jasonwucj@gmail.com>
21521 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21522 (combo): New attribute.
21523 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21525 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21527 * config/nds32/nds32.opt: Change -mcmodel= default value.
21529 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21530 Monk Chiang <sh.chiang04@gmail.com>
21531 Chung-Ju Wu <jasonwucj@gmail.com>
21533 * config/nds32/constants.md (unspec_element): New enum.
21534 * config/nds32/constraints.md (Umw): New constraint.
21535 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21536 * config/nds32/nds32-intrinsic.md: Likewise.
21537 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21538 (nds32_valid_smw_lwm_base_p): New.
21539 (nds32_output_smw_single_word): New.
21540 (nds32_output_lmw_single_word): New.
21541 (nds32_expand_unaligned_load): New.
21542 (nds32_expand_unaligned_store): New.
21543 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21544 (nds32_output_smw_single_word): Declare.
21545 (nds32_output_lmw_single_word): Declare.
21546 (nds32_expand_unaligned_load): Declare.
21547 (nds32_expand_unaligned_store): Declare.
21548 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21549 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21550 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21551 NDS32_BUILTIN_UASTORE_DW.
21552 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21555 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21556 Kito Cheng <kito.cheng@gmail.com>
21557 Chung-Ju Wu <jasonwucj@gmail.com>
21559 * config/nds32/nds32-intrinsic.c
21560 (nds32_expand_builtin_null_ftype_reg): Delete.
21561 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21562 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21563 (nds32_read_argument): New.
21564 (nds32_legitimize_target): Ditto.
21565 (nds32_legitimize_argument): Ditto.
21566 (nds32_check_constant_argument): Ditto.
21567 (nds32_expand_unop_builtin): Ditto.
21568 (nds32_expand_unopimm_builtin): Ditto.
21569 (nds32_expand_binop_builtin): Ditto.
21570 (nds32_builtin_decl_impl): Ditto.
21571 (builtin_description): Ditto.
21572 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21573 (nds32_init_builtins_impl): Ditto.
21574 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21575 (nds32_builtin_decl): New.
21576 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21577 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21579 2018-03-02 Jeff Law <law@redhat.com>
21581 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21582 (redundant_insn, fill_simple_delay_slots): Likewise.
21583 (fill_slots_from_thread): Likewise.
21584 * resource.c (mark_referenced_resources): Likewise.
21585 (mark_set_resources, find_dead_or_set_registers): Likewise.
21587 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21589 * substring-locations.h (format_warning_va): Formatting fix for
21590 ATTRIBUTE_GCC_DIAG.
21591 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21593 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21594 * substring-locations.c: Include intl.h.
21595 (format_warning_va): Turned into small wrapper around
21596 format_warning_n_va, renamed to ...
21597 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21598 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21600 (format_warning_at_substring_n): New function.
21601 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21602 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21603 format_warning_at_substring with just a shorter name instead of
21604 const function pointer.
21605 (fmtwarn_n): New function.
21606 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21607 appropriate, get rid of all the fmtstr temporaries, move conditionals
21608 with G_() wrapped string literals directly into fmtwarn arguments,
21609 cast dir.len to (int), formatting fixes.
21611 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21613 * doc/invoke.texi: Remove "Cilk Plus" references.
21615 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21616 Richard Biener <rguenther@suse.de>
21619 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21620 for error or warning attributes if CALL_FROM_THUNK_P is set.
21623 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21626 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21627 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21630 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21631 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21633 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21634 instead of -1U in last predictors element's probability member.
21636 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21639 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21640 arguments if they are comparable.
21642 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21644 PR tree-optimization/84634
21645 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21646 masks and masked_loop_p with a single loop_masks, making sure it's
21647 null for bb vectorization.
21649 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21651 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21652 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21653 loop->force_vectorize to check whether there is no alias.
21655 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21658 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21660 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21662 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21663 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21664 instead of a loop around prev_real_insn.
21665 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21668 PR inline-asm/84625
21669 * config/i386/i386.c (ix86_print_operand): Use conditional
21670 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21673 2018-03-02 Richard Biener <rguenther@suse.de>
21675 PR tree-optimization/84427
21676 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21677 (bitmap_set_subtract_values): Rewrite to handle multiple
21680 (prune_clobbered_mems): Likewise.
21681 (phi_translate): Take edge instead of pred/phiblock.
21682 (phi_translate_1): Likewise.
21683 (phi_translate_set): Likewise. Insert all translated
21684 exprs for a value into the set, keeping possibly multiple
21685 expressions per value.
21686 (compute_antic_aux): Adjust for phi_translate changes.
21687 When intersecting union the expressions and prune those
21688 not in the final value set, keeping possibly multiple
21689 expressions per value. Do not use value-insertion
21690 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21691 all expressions. Add verification that the value-sets
21692 only shrink during iteration.
21693 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21694 (do_pre_regular_insertion): Likewise.
21695 (do_pre_partial_partial_insertion): Likewise.
21697 2018-03-02 Richard Biener <rguenther@suse.de>
21700 * config/darwin.c (saved_debug_info_level): New static global.
21701 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21702 (darwin_asm_lto_end): Restore debug info generation settings.
21704 2018-03-01 Martin Liska <mliska@suse.cz>
21707 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21708 volatile arguments.
21710 2018-03-01 Richard Biener <rguenther@suse.de>
21713 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21714 type annotation with LTO when debug was disabled at compile-time.
21716 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21718 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21720 (mips_final_postscan_insn): Likewise.
21722 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21724 PR rtl-optimization/84528
21725 * alias.c (init_alias_target): Add commentary.
21726 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21727 a unique base value if the frame pointer is not eliminated
21728 to the stack pointer.
21730 2018-03-01 Tom de Vries <tom@codesourcery.com>
21732 PR rtl-optimization/83327
21733 * lra-int.h (hard_regs_spilled_into): Declare.
21734 * lra.c (hard_regs_spilled_into): Define.
21735 (init_reg_info): Init hard_regs_spilled_into.
21736 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21737 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21738 (process_bb_lives): Handle hard_regs_spilled_into.
21739 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21740 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21742 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
21744 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21745 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21746 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21747 * config/rs6000/aix72.h: New file.
21749 2018-02-28 Jakub Jelinek <jakub@redhat.com>
21751 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21752 instead of warning_at with conditional singular and plural messages
21756 * stor-layout.c (update_alignment_for_field): For
21757 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21758 && !DECL_PACKED (field), do the alignment update, just use
21759 only desired_align instead of MAX (type_align, desired_align)
21761 (place_field): Don't do known_align < desired_align handling
21762 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21763 is non-NULL, instead do it after rli->prev_field handling and
21764 only if not within a bitfield word. For DECL_PACKED (field)
21765 use type_align of BITS_PER_UNIT.
21767 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
21769 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21770 superfluous parentheses and trailing spaces.
21772 2018-02-28 Richard Biener <rguenther@suse.de>
21774 PR tree-optimization/84584
21775 * graphite-scop-detection.c (scop_detection::add_scop): Discard
21776 SCoPs with fake exit edge.
21778 2018-02-28 Martin Liska <mliska@suse.cz>
21781 * timevar.c (timer::print): Fix format to properly print 100%
21784 2018-02-28 Richard Biener <rguenther@suse.de>
21786 PR middle-end/84607
21787 * genmatch.c (capture_info::walk_match): Do not mark
21788 captured expressions without operands as expr_p given
21789 they act more like predicates and should be subject to
21790 "lost tail" side-effect preserving.
21792 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
21794 PR rtl-optimization/81611
21795 * auto-inc-dec.c (attempt_change): Move dead note from
21796 mem_insn if it's the next use of regno
21797 (find_address): Take address use of reg holding
21798 non-incremented value. Add parm to limit search to the named
21800 (merge_in_block): Attempt to use a mem insn that is the next
21801 use of the original regno.
21803 2018-02-27 Martin Sebor <msebor@redhat.com>
21806 * doc/invoke.texi (-Wmissing-attributes): New option.
21807 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21809 2018-02-27 Martin Sebor <msebor@redhat.com>
21811 PR translation/84207
21812 * diagnostic-core.h (warning_n, error_n, inform_n): Change
21813 n argument to unsigned HOST_WIDE_INT.
21814 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21815 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
21816 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21817 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21819 2018-02-27 Richard Biener <rguenther@suse.de>
21821 PR tree-optimization/84512
21822 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21823 Do not use the estimate returned from record_stmt_cost for
21824 the scalar iteration cost but sum properly using add_stmt_cost.
21826 2018-02-27 Richard Biener <rguenther@suse.de>
21828 PR tree-optimization/84466
21829 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21830 Adjust last change to less strictly validate use operands.
21832 2018-02-27 Martin Liska <mliska@suse.cz>
21834 PR gcov-profile/84548
21835 * gcov.c (process_file): Allow partial overlap and consider it
21836 also as group functions.
21837 (output_lines): Properly calculate range of lines for a group.
21839 2018-02-27 Martin Liska <mliska@suse.cz>
21841 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21842 'ggc' suffixes. Change first column width.
21843 (timer::print): Fix formatting of the column.
21845 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
21847 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21848 preserve inline entry blocks for the sake of debug inline
21849 entry point markers alone.
21850 (remove_unused_locals): Suggest in comments a better place to
21851 force the preservation of inline entry blocks that are
21852 otherwise unused, but do not preserve them.
21854 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21856 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21858 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21861 * config/i386/constraints.md (Bs): Replace
21862 ix86_indirect_branch_register with
21863 TARGET_INDIRECT_BRANCH_REGISTER.
21865 * config/i386/i386.md (indirect_jump): Likewise.
21866 (tablejump): Likewise.
21867 (*sibcall_memory): Likewise.
21868 (*sibcall_value_memory): Likewise.
21869 Peepholes of indirect call and jump via memory: Likewise.
21870 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21871 (*sibcall_value_GOT_32): Likewise.
21872 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21873 (GOT_memory_operand): Likewise.
21874 (call_insn_operand): Likewise.
21875 (sibcall_insn_operand): Likewise.
21876 (GOT32_symbol_operand): Likewise.
21877 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21879 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21881 PR rtl-optimization/83496
21882 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21883 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
21884 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21885 redundant insn, if any.
21886 (relax_delay_slots): Likewise.
21887 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21889 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
21891 PR tree-optimization/83965
21892 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21893 that grouped statements are part of a reduction chain. Return
21894 true if the statement is not marked as a reduction itself but
21895 is part of a group.
21896 (vect_recog_dot_prod_pattern): Don't check whether the statement
21897 is part of a group here.
21898 (vect_recog_sad_pattern): Likewise.
21899 (vect_recog_widen_sum_pattern): Likewise.
21901 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21904 * final.c (rest_of_clean_state): Also look for calls inside sequences.
21906 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21909 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21911 (ix86_output_indirect_function_return): New prototype.
21912 (ix86_split_simple_return_pop_internal): Likewise.
21913 * config/i386/i386.c (indirect_return_via_cx): New.
21914 (indirect_return_via_cx_bnd): Likewise.
21915 (indirect_thunk_name): Handle return va CX_REG.
21916 (output_indirect_thunk_function): Create alias for
21917 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21918 (ix86_output_indirect_jmp): Remove the bool argument.
21919 (ix86_output_indirect_function_return): New function.
21920 (ix86_split_simple_return_pop_internal): Likewise.
21921 * config/i386/i386.md (*indirect_jump): Don't pass false
21922 to ix86_output_indirect_jmp.
21923 (*tablejump_1): Likewise.
21924 (simple_return_pop_internal): Change it to define_insn_and_split.
21925 Call ix86_split_simple_return_pop_internal to split it for
21926 -mfunction-return=.
21927 (simple_return_indirect_internal): Call
21928 ix86_output_indirect_function_return instead of
21929 ix86_output_indirect_jmp.
21931 2018-02-26 Jakub Jelinek <jakub@redhat.com>
21934 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21935 memset and value initialization afterwards.
21937 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
21939 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21941 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21944 * common/config/aarch64/aarch64-common.c
21945 (aarch_option_optimization_table[]): Switch
21946 off fomit-frame-pointer
21948 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
21949 Chung-Ju Wu <jasonwucj@gmail.com>
21951 * config/nds32/nds32-multiple.md (load_multiple): Disallow
21953 (store_multiple): Ditto.
21955 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
21957 * config.gcc: Add --with-cpu support for nds32 target.
21958 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21959 * config/nds32/nds32.opt: Add -mcpu= option.
21961 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
21963 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21964 isel=yes): Warn for these deprecated options.
21966 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
21968 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21969 ISA_2_5_MASKS_EMBEDDED.
21971 2018-02-23 Jakub Jelinek <jakub@redhat.com>
21973 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21974 p->max as pointers rather than using iterative_hash_expr.
21976 2018-02-23 Carl Love <cel@us.ibm.com>
21978 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21979 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21981 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21982 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21983 P8V_BUILTIN_VEC_VUNSIGNED2.
21985 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
21988 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21989 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21991 * lra-constraints.c (curr_insn_transform): Set up
21992 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
21994 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21995 * lra-eliminations.c (spill_pseudos): Ditto.
21996 (process_insn_for_elimination): Ditto.
21997 * lra-lives.c (reg_early_clobber_p): Use the new macros.
21998 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21999 LRA_NON_CLOBBERED_ALT.
22001 2018-02-22 Martin Sebor <msebor@redhat.com>
22003 PR tree-optimization/84480
22004 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22005 to maybe_diag_stxncpy_trunc. Call it.
22006 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22007 from gimple_fold_builtin_strcpy. Print inlining stack.
22008 (handle_builtin_stxncpy): Print inlining stack.
22009 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22011 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22014 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22015 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22016 and -fcheck-pointer-bounds are used together.
22017 (indirect_thunk_prefix): New enum.
22018 (indirect_thunk_need_prefix): New function.
22019 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22020 "_nt" instead of "_bnd" for NOTRACK prefix.
22021 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22022 (output_indirect_thunk_function): Likewise.
22024 (ix86_code_end): Update output_indirect_thunk_function calls.
22025 (ix86_output_indirect_branch_via_reg): Replace
22026 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22027 (ix86_output_indirect_branch_via_push): Likewise.
22028 (ix86_output_function_return): Likewise.
22029 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22030 incompatible with -fcf-protection=branch and
22031 -fcheck-pointer-bounds.
22033 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22036 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22037 Change gcc_assert call to output_operand_lossage.
22039 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22041 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22043 2018-02-22 DJ Delorie <dj@redhat.com>
22044 Sebastian Perta <sebastian.perta@renesas.com>
22045 Oleg Endo <olegendo@gcc.gnu.org>
22047 * config/rx/rx.c (rx_rtx_costs): New function.
22048 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22050 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22052 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22054 2018-02-22 Martin Liska <mliska@suse.cz>
22057 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22058 Add "native" as a possible value.
22060 2018-02-22 Martin Liska <mliska@suse.cz>
22063 * config/i386/i386.c (ix86_option_override_internal):
22064 Add "native" as a possible value for -march and -mtune.
22066 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22069 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22070 to all type variants.
22072 PR tree-optimization/84503
22073 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22074 width as info->bitpos + info->bitsize - start.
22075 (merged_store_group::merge_overlapping): Simplify width computation.
22076 (check_no_overlap): New function.
22077 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22078 start + width and last_order of the group, fail if check_no_overlap
22080 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22081 to group if check_no_overlap fails.
22083 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22085 * config/rs6000/altivec.md: Delete contraint arguments to
22086 define_expand, define_split, and define_peephole2, and in
22087 define_insn_and_split if always unused.
22088 * config/rs6000/darwin.md: Ditto.
22089 * config/rs6000/dfp.md: Ditto.
22090 * config/rs6000/rs6000.md: Ditto.
22091 * config/rs6000/sync.md: Ditto.
22092 * config/rs6000/vector.md: Ditto.
22093 * config/rs6000/vsx.md: Ditto.
22095 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22097 * config/rs6000/altivec.md: Write output control strings as braced
22098 blocks instead of double-quoted strings.
22099 * config/rs6000/darwin.md: Ditto.
22100 * config/rs6000/rs6000.md: Ditto.
22101 * config/rs6000/vector.md: Ditto.
22102 * config/rs6000/vsx.md: Ditto.
22104 2018-02-21 Jason Merrill <jason@redhat.com>
22106 PR c++/84314 - ICE with templates and fastcall attribute.
22107 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22109 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22111 * ipa-cp.c (determine_versionability): Fix comment typos.
22113 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22116 * ipa-cp.c (determine_versionability): Do not version functions caling
22119 2018-02-21 Martin Liska <mliska@suse.cz>
22122 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22123 Add "native" as a possible value.
22124 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22125 the macro when native cpu detection is available.
22127 2018-02-21 Martin Liska <mliska@suse.cz>
22130 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22131 Add "native" as a possible value.
22132 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22133 when native cpu detection is available.
22135 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22136 Martin Sebor <msebor@redhat.com>
22138 PR tree-optimization/84478
22139 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22141 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22142 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22143 support which is conservatively correct, for 2 only stay conservative
22144 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22145 argument to the 2 argument get_range_strlen, adjust 6 arg
22146 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22148 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22149 (gimple_fold_builtin_strlen): Pass true as last argument to
22152 2018-02-20 Martin Sebor <msebor@redhat.com>
22154 PR middle-end/84095
22155 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22156 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22157 (builtin_memref::builtin_memref): Factor out parts into
22158 set_base_and_offset and call it.
22160 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22162 PR middle-end/84406
22163 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22164 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22165 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22166 search at the associated MODE_INT.
22168 2018-02-20 Jeff Law <law@redhat.com>
22170 PR middle-end/82123
22171 PR tree-optimization/81592
22172 PR middle-end/79257
22173 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22174 for range data rather than using global data.
22175 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22176 range data rather than using global data.
22177 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22178 pass it to children as needed.
22179 (struct directive::fmtresult): Similarly.
22180 (struct directive::set_width): Similarly.
22181 (struct directive::set_precision): Similarly.
22182 (format_integer, format_directive, parse_directive): Similarly.
22183 (format_none): Accept unnamed vr_values parameter.
22184 (format_percent, format_floating, format_character): Similarly.
22185 (format_string, format_plain): Similarly.
22186 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22187 the EVRP range analyzer for range data rather than using global data.
22188 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22189 gimple-ssa-evrp-analyze.h
22190 (class sprintf_dom_walker): Add after_dom_children member function.
22191 Add evrp_range_analyzer member.
22192 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22193 range analyzer as needed.
22194 (sprintf_dom_walker::after_dom_children): New member function.
22195 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22197 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22198 (evrp_range_analyzer::pop_to_marker): Likewise.
22200 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22202 PR tree-optimization/84419
22203 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22204 with the required type if its current type is compatible but
22207 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22209 PR middle-end/82004
22210 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22211 after vectorization.
22213 2018-02-20 Martin Liska <mliska@suse.cz>
22216 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22217 possible values if we don't have a hint.
22219 2018-02-20 Martin Liska <mliska@suse.cz>
22223 * final.c (shorten_branches): Build align_tab array with one
22225 * opts.c (finish_options): Add alignment option limit check.
22226 (MAX_CODE_ALIGN): Likewise.
22227 (MAX_CODE_ALIGN_VALUE): Likewise.
22228 * doc/invoke.texi: Document maximum allowed option value for
22229 all -falign-* options.
22231 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22234 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22235 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22236 * var-tracking.c (emit_note_insn_var_location): Remove all references
22237 to NOTE_INSN_CALL_ARG_LOCATION.
22238 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22239 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22240 Use copy_rtx_if_shared.
22241 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22242 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22243 (dwarf2out_var_location): Remove handling of
22244 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22246 * final.c (final_scan_insn): Remove all references to
22247 NOTE_INSN_CALL_ARG_LOCATION.
22248 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22249 before dumping final insns.
22250 * except.c (emit_note_eh_region_end): Remove all references to
22251 NOTE_INSN_CALL_ARG_LOCATION.
22252 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22253 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22254 * config/arc/arc.c (hwloop_optimize): Likewise.
22255 * config/arm/arm.c (create_fix_barrier): Likewise.
22256 * config/s390/s390.c (s390_chunkify_start): Likewise.
22257 * config/sh/sh.c (find_barrier): Likewise.
22258 * config/i386/i386.c (rest_of_insert_endbranch,
22259 ix86_seh_fixup_eh_fallthru): Likewise.
22260 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22261 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22262 * config/frv/frv.c (frv_function_prologue): Likewise.
22263 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22265 (note_outside_basic_block_p): Remove all references to
22266 NOTE_INSN_CALL_ARG_LOCATION.
22267 * gengtype.c (adjust_field_rtx_def): Likewise.
22268 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22270 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22271 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22274 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22277 PR tree-optimization/84452
22278 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22279 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22282 2018-02-19 Martin Liska <mliska@suse.cz>
22285 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22287 2018-02-19 Martin Liska <mliska@suse.cz>
22288 Richard Sandiford <richard.sandiford@linaro.org>
22290 PR tree-optimization/82491
22291 * gimple-fold.c (get_base_constructor): Make earlier bail out
22294 2018-02-19 Carl Love <cel@us.ibm.com>
22296 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22297 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22299 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22300 P8V_BUILTIN_VEC_NEG.
22302 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22304 * config/rl78/rl78.md (movdf): New define expand.
22306 2018-02-19 Martin Liska <mliska@suse.cz>
22309 * doc/invoke.texi: Fix typo.
22310 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22312 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22314 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22315 handle rs6000_single_float and rs6000_double_float specially for
22318 2018-02-16 Jeff Law <law@redhat.com>
22320 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22321 (pop_regs): Use it.
22323 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22326 * ipa-inline.c (inline_small_functions): Fix a typo.
22328 2018-02-16 Nathan Sidwell <nathan@acm.org>
22330 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22332 2018-02-16 Carl Love <cel@us.ibm.com>
22334 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22335 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22336 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22337 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22338 expansion to P8V_BUILTIN_VEC_FLOAT2.
22340 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22342 PR rtl-optimization/70023
22343 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22344 src_regno into account.
22346 2018-02-16 Carl Love <cel@us.ibm.com>
22348 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22349 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22350 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22351 * config/rs6000/rs6000.c: Remove case statements for
22352 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22353 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22354 and P9V_BUILTIN_VEC_VINSERT4B.
22355 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22356 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22357 * config/rs6000/vsx.md:
22358 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22361 2018-02-16 Carl Love <cel@us.ibm.com>
22363 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22365 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22367 * config/rs6000/rs6000-c.c: Add the definitions for
22368 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22369 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22370 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22371 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22372 definition for insert4b and define insn *insert3b_internal.
22373 * doc/extend.texi: Add documentation for vec_extract4b.
22375 2018-02-16 Nathan Sidwell <nathan@acm.org>
22377 * doc/extend.texi (Backwards Compatibility): Mention friend
22378 injection. Note for-scope is deprecated.
22379 * doc/invoke.texi (-ffriend-injection): Deprecate.
22381 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22383 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22384 that moved to I2, also allow destinations that are a paradoxical
22385 subreg (instead of a normal reg).
22387 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22390 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22393 2018-02-16 Richard Biener <rguenther@suse.de>
22395 PR tree-optimization/84037
22396 PR tree-optimization/84016
22398 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22399 Adjust vec_construct for the fact we need additional higher latency
22400 128bit inserts for AVX256 and AVX512 vector builds.
22401 (ix86_add_stmt_cost): Scale vector construction cost for
22404 2018-02-16 Richard Biener <rguenther@suse.de>
22406 PR tree-optimization/84417
22407 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22408 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22409 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22411 2018-02-16 Martin Liska <mliska@suse.cz>
22414 * internal-fn.def (ASAN_CHECK): Set proper flags.
22415 (ASAN_MARK): Likewise.
22417 2018-02-16 Julia Koval <julia.koval@intel.com>
22419 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22420 from PTA_CANNONLAKE.
22422 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22425 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22426 Use ++iter rather than iter++ for std::list iterators.
22427 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22428 defer deleting them until all nodes in the forest are processed. Do
22429 free even leaf nodes. Change to_process into auto_vec.
22432 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22433 * vec.h (vec_default_construct): Use memset instead of placement new
22434 if BROKEN_VALUE_INITIALIZATION is defined.
22435 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22436 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22439 PR rtl-optimization/83723
22440 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22441 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22442 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22444 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22446 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22448 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22450 PR rtl-optimization/81443
22451 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22452 from inner REGs to paradoxical SUBREGs.
22454 2018-02-16 Richard Biener <rguenther@suse.de>
22456 PR tree-optimization/84399
22457 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22458 For operands we can analyze at their definition make sure we can
22459 analyze them at each use as well.
22461 2018-02-16 Richard Biener <rguenther@suse.de>
22463 PR tree-optimization/84190
22464 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22465 volatile accesses if the decl isn't volatile.
22467 2018-02-15 Jason Merrill <jason@redhat.com>
22469 PR c++/84314 - ICE with templates and fastcall attribute.
22470 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22471 TYPE_CANONICAL on an existing type.
22473 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22475 PR tree-optimization/84383
22476 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22477 dstoff nor call operand_equal_p if dstbase is NULL.
22479 PR tree-optimization/84334
22480 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22481 also a CONSTANT_CLASS_P, punt.
22483 2018-02-14 Jim Wilson <jimw@sifive.com>
22485 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22486 first SMALL_OPERAND check. New local min_second_step. Move assert
22487 to where locals are set. Add TARGET_RVC support.
22488 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22490 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22492 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22494 2018-02-14 Martin Sebor <msebor@redhat.com>
22496 PR tree-optimization/83698
22497 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22498 arrays constrain the offset range to their bounds.
22499 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22500 (builtin_access::overlap): Avoid setting the size of overlap if it's
22502 (maybe_diag_overlap): Also consider arrays when deciding what values
22503 of offsets to include in diagnostics.
22505 2018-02-14 Martin Sebor <msebor@redhat.com>
22508 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22509 that correspond to the kind of a declaration.
22511 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22514 * config/pa/pa.md: Load address of PIC label using the linkage table
22515 if the label is nonlocal.
22517 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22519 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22520 warning message if user requests -maltivec=be.
22521 * doc/invoke.texi: Document deprecation of -maltivec=be.
22523 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22526 * config/rs6000/rs6000-c.c: Update definitions for
22527 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22528 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22530 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22533 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22534 add _get_ssp intrinsics. Remove argument from
22535 __builtin_ia32_rdssp[d|q].
22536 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22537 * config/i386/i386-builtin.def: Remove argument from
22538 __builtin_ia32_rdssp[d|q].
22539 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22540 ix86_expand_special_args_builtin for _rdssp[d|q].
22541 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22542 Clear register before usage.
22543 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22544 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22546 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22548 PR tree-optimization/84357
22549 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22550 operand 1 of an ARRAY_REF too.
22552 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22555 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22556 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22558 (set_of_reg): New struct.
22559 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22560 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22561 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22563 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22564 Split into bitclr, bitset, bitinvert patterns if appropriate.
22565 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22566 use rx_fuse_in_memory_bitop.
22567 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22568 to named insn, correct maximum insn length.
22570 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22573 * machmode.def: Define a complex mode for PARTIAL_INT.
22574 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22576 * doc/rtl.texi: Document CSPImode.
22577 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22579 (msp430_hard_regno_nregs_with_padding): Likewise.
22581 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22584 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22586 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22588 PR rtl-optimization/84169
22589 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22590 we generated a parallel as new i3 and we split that to new i2 and i3
22591 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22592 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22593 those to i2, not i1. Partially rewrite this scan code.
22595 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22598 * stor-layout.c (place_field): For variable length fields, adjust
22599 offset_align afterwards not just based on the field's alignment,
22600 but also on the size.
22602 PR middle-end/84309
22603 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22604 of exps and logs in the use_exp2 case.
22606 2018-02-13 Jeff Law <law@redhat.com>
22608 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22609 entry for "vector".
22611 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22614 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22618 * common.opt (gas-loc-support, gas-locview-support): New.
22619 (ginline-points, ginternal-reset-location-views): New.
22620 * doc/invoke.texi: Document them. Use @itemx where intended.
22621 (gvariable-location-views): Adjust.
22622 * target.def (reset_location_view): New.
22623 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22624 (TARGET_RESET_LOCATION_VIEW): New.
22625 * doc/tm.texi: Rebuilt.
22626 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22627 (dwarf2out_default_as_locview_support): New.
22628 (output_asm_line_debug_info): Use option variables.
22629 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22630 (output_loc_list): Likewise.
22631 (add_high_low_attributes): Check option variables.
22632 Don't output entry view attribute in strict mode.
22633 (gen_inlined_subroutine_die): Check option variables.
22634 (dwarf2out_inline_entry): Likewise.
22635 (init_sections_and_labels): Likewise.
22636 (dwarf2out_early_finish): Likewise.
22637 (maybe_reset_location_view): New, from...
22638 (dwarf2out_var_location): ... here. Call it.
22639 * debug.h (dwarf2out_default_as_loc_support): Declare.
22640 (dwarf2out_default_as_locview_support): Declare.
22641 * hooks.c (hook_int_rtx_insn_0): New.
22642 * hooks.h (hook_int_rtx_insn_0): Declare.
22643 * toplev.c (process_options): Take -gas-loc-support and
22644 -gas-locview-support from dwarf2out. Enable
22645 -gvariable-location-views by default only with locview
22646 assembler support. Enable -ginternal-reset-location-views by
22647 default only if the target defines the corresponding hook.
22648 Enable -ginline-points by default if location views are
22649 enabled; force it disabled if statement frontiers are
22651 * tree-inline.c (expand_call_inline): Check option variables.
22652 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22654 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22656 PR tree-optimization/84321
22657 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22658 handling. Also check whether the anti-range contains any values
22659 that satisfy the mask; switch to a VR_RANGE if not.
22661 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22664 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22666 2018-02-13 Martin Jambor <mjambor@suse.cz>
22669 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22670 of call statements, also set location of a load to a temporary.
22672 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22674 * config/rl78/rl78.c (add_vector_labels): New function.
22675 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22676 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22677 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22678 which checks that no arguments are passed.
22679 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22680 * doc/extend.texi: Documentation for the new attribute.
22682 2018-02-13 Andreas Schwab <schwab@suse.de>
22684 * config/riscv/linux.h (CPP_SPEC): Define.
22686 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22689 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22690 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22691 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22692 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22693 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22694 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22695 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22696 temporarily for AES and PCLMUL builtins.
22698 PR tree-optimization/84339
22699 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22700 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22703 PR middle-end/84309
22704 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22705 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22706 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22708 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22710 * omp-simd-clone.h: New file.
22711 * omp-simd-clone.c: Include omp-simd-clone.h.
22712 (expand_simd_clones): No longer static.
22713 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22714 cgraph.h and omp-simd-clone.h.
22715 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22716 (vect_recog_widen_shift_pattern): Formatting fix.
22717 (vect_pattern_recog_1): Don't check optab for calls.
22720 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22721 operands[2] into a REG before using gen_lowpart on it.
22723 2018-02-12 Jeff Law <law@redhat.com>
22726 * config/sh/sh.c (find_barrier): Consider a sibling call
22729 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22730 successfully back substituting a reg.
22732 2018-02-12 Richard Biener <rguenther@suse.de>
22734 PR tree-optimization/84037
22735 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22736 parameter, move visited init to caller.
22737 (vect_slp_analyze_operations): Separate cost from validity
22738 check, initialize visited once for all instances.
22739 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22741 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22743 (vect_model_promotion_demotion_cost): Likewise.
22744 (vectorizable_bswap): Guard cost modeling with !slp_node
22745 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22747 (vectorizable_call): Likewise.
22748 (vectorizable_conversion): Likewise.
22749 (vectorizable_assignment): Likewise.
22750 (vectorizable_shift): Likewise.
22751 (vectorizable_operation): Likewise.
22752 (vectorizable_store): Likewise.
22753 (vectorizable_load): Likewise.
22754 (vectorizable_condition): Likewise.
22755 (vectorizable_comparison): Likewise.
22757 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
22760 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22761 (ASAN_MARK): Fix fnspec to account for return value, change pointer
22762 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22764 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22766 PR middle-end/83665
22767 * params.def (inline-min-speedup): Increase from 8 to 15.
22768 (max-inline-insns-auto): Decrease from 40 to 30.
22769 * ipa-split.c (consider_split): Add some buffer for function to
22770 be considered inlining candidate.
22771 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22774 2018-02-12 Richard Biener <rguenther@suse.de>
22776 PR tree-optimization/84037
22777 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22778 matched stmts if we cannot swap the non-matched ones.
22780 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22782 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22783 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22784 _mm_maskz_scalef_round_ss): New intrinsics.
22785 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22786 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22787 __builtin_ia32_scalefss_round): Remove.
22788 (__builtin_ia32_scalefsd_mask_round,
22789 __builtin_ia32_scalefss_mask_round): New intrinsics.
22790 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22791 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22792 ((match_operand:VF_128 2 "<round_nimm_predicate>"
22793 "<round_constraint>")): Changed to ...
22794 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22795 "<round_scalar_constraint>")): ... this.
22796 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22797 %0, %1, %2<round_op3>}"): Changed to ...
22798 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22799 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22800 %2<round_scalar_mask_op3>}"): ... this.
22801 * config/i386/subst.md (round_scalar_nimm_predicate): New.
22803 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22805 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22806 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22807 (_mm_maskz_sqrt_round_ss): New intrinsics.
22808 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22809 (__builtin_ia32_sqrtsd_mask_round)
22810 (__builtin_ia32_sqrtss_mask_round): New builtins.
22811 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22812 (__builtin_ia32_sqrtss_round): Remove.
22813 (__builtin_ia32_sqrtsd_mask_round)
22814 (__builtin_ia32_sqrtss_mask_round): New builtins.
22815 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22816 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22817 ((match_operand:VF_128 1 "vector_operand"
22818 "xBm,<round_constraint>")): Changed to ...
22819 ((match_operand:VF_128 1 "vector_operand"
22820 "xBm,<round_scalar_constraint>")): ... this.
22821 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22822 %0, %2, %<iptr>1<round_op3>}): Changed to ...
22823 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22824 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22825 %<iptr>1<round_scalar_mask_op3>}): ... this.
22826 ((set_attr "prefix" "<round_prefix>")): Changed to ...
22827 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22829 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
22832 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22833 Cast vec_cmpeq result to correct type.
22834 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22835 Cast vec_cmpgt result to correct type.
22837 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
22839 * final.c (final_scan_insn_1): Renamed from...
22840 (final_scan_insn): ... this. New wrapper, to recover
22841 seen from the outermost call in recursive ones.
22842 * config/sparc/sparc.c (output_return): Drop seen from call.
22843 (output_sibcall): Likewise.
22844 * config/visium/visium.c (output_branch): Likewise.
22846 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
22848 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22851 2018-02-10 Alan Modra <amodra@gmail.com>
22854 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22855 Specify LR as an input.
22857 2018-02-10 Jakub Jelinek <jakub@redhat.com>
22860 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22861 remove_member_access_dummy_vars): New functions.
22862 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22863 lower_omp_1, execute_lower_omp): Use them.
22865 PR rtl-optimization/84308
22866 * shrink-wrap.c (spread_components): Release todo vector.
22868 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
22870 PR rtl-optimization/57193
22871 * ira-color.c (struct allocno_color_data): Add member
22872 conflict_allocno_hard_prefs.
22873 (update_conflict_allocno_hard_prefs): New.
22874 (bucket_allocno_compare_func): Add a preference based on
22875 conflict_allocno_hard_prefs.
22876 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22877 (color_allocnos): Remove a dead code. Initiate
22878 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
22880 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22883 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22884 constraint from =wa to wa. Avoid a subreg on the output operand,
22885 instead use a pseudo and subreg it in a move.
22886 (p9_xxbrd_<mode>): Changed to ...
22887 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22888 (p9_xxbrd_v2df): New expander.
22889 (p9_xxbrw_<mode>): Changed to ...
22890 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22891 (p9_xxbrw_v4sf): New expander.
22893 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22895 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22897 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
22900 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22901 multiply in 32-bit mode.
22902 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22903 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22906 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22908 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22909 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22910 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22911 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22913 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
22916 * dwarf2out.c (is_trivial_indirect_ref): New function.
22917 (dwarf2out_late_global_decl): Do not generate a location
22918 attribute for variables that have a non-trivial DECL_VALUE_EXPR
22919 and that are not defined in the current unit.
22921 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22923 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22924 instead of a libcall for UNORDERED.
22926 2018-02-09 Tamar Christina <tamar.christina@arm.com>
22929 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22930 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22932 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22935 * config/s390/s390.c (s390_set_current_function): Invoke
22936 s390_indirect_branch_settings also if fndecl didn't change.
22938 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
22940 * config/rs6000/rs6000.md (blockage): Set length to zero.
22942 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22944 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22946 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22949 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22950 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22954 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22955 PARALLEL incoming that failed vt_get_decl_and_offset check.
22957 PR middle-end/84237
22958 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22959 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22961 (get_variable_section): For decls in named .bss* sections pass true as
22962 second argument to bss_initializer_p.
22964 2018-02-09 Marek Polacek <polacek@redhat.com>
22965 Jakub Jelinek <jakub@redhat.com>
22968 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22969 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
22970 Sync some changes from cxx_fold_indirect_ref.
22972 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
22974 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22976 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22977 (BLOCK_INLINE_ENTRY_LABEL): New.
22978 (dwarf2out_var_location): Disregard inline entry markers.
22979 (inline_entry_data): New struct.
22980 (inline_entry_data_hasher): New hashtable type.
22981 (inline_entry_data_hasher::hash): New.
22982 (inline_entry_data_hasher::equal): New.
22983 (inline_entry_data_table): New variable.
22984 (add_high_low_attributes): Add DW_AT_entry_pc and
22985 DW_AT_GNU_entry_view attributes if a pending entry is found
22986 in inline_entry_data_table. Add old entry_pc attribute only
22987 if debug nonbinding markers are disabled.
22988 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22989 markers are enabled.
22990 (block_within_block_p, dwarf2out_inline_entry): New.
22991 (dwarf2out_finish): Check that no entries remained in
22992 inline_entry_data_table.
22993 * final.c (reemit_insn_block_notes): Handle inline entry notes.
22994 (final_scan_insn, notice_source_line): Likewise.
22995 (rest_of_clean_state): Skip inline entry markers.
22996 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22998 * gimple.c (gimple_build_debug_inline_entry): New.
22999 * gimple.h (enum gimple_debug_subcode): Add
23000 GIMPLE_DEBUG_INLINE_ENTRY.
23001 (gimple_build_debug_inline_entry): Declare.
23002 (gimple_debug_inline_entry_p): New.
23003 (gimple_debug_nonbind_marker_p): Adjust.
23004 * insn-notes.def (INLINE_ENTRY): New.
23005 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23006 inline entry marker notes.
23007 (print_insn): Likewise.
23008 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23009 (INSN_DEBUG_MARKER_KIND): Likewise.
23010 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23011 * tree-inline.c (expand_call_inline): Build and insert
23012 debug_inline_entry stmt.
23013 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23014 inline entry blocks early, if nonbind markers are enabled.
23015 (dump_scope_block): Dump fragment info.
23016 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23017 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23018 (gimple_build_debug_inline_entry): New.
23019 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23020 Enable/disable inline entry points too.
23021 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23022 (DEBUG_INSN): Describe inline entry markers.
23024 * common.opt (gvariable-location-views): New.
23025 (gvariable-location-views=incompat5): New.
23026 * config.in: Rebuilt.
23027 * configure: Rebuilt.
23028 * configure.ac: Test assembler for view support.
23029 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23030 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23031 * dwarf2out.c (var_loc_view): New typedef.
23032 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23033 (dwarf2out_locviews_in_attribute): New.
23034 (dwarf2out_locviews_in_loclist): New.
23035 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23036 (enum dw_line_info_opcode): Add LI_adv_address.
23037 (struct dw_line_info_table): Add view.
23038 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23039 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23040 (zero_view_p): New variable.
23041 (ZERO_VIEW_P): New macro.
23042 (output_asm_line_debug_info): New.
23043 (struct var_loc_node): Add view.
23044 (add_AT_view_list, AT_loc_list): New.
23045 (add_var_loc_to_decl): Add view param. Test it against last.
23046 (new_loc_list): Add view params. Record them.
23047 (AT_loc_list_ptr): Handle loc and view lists.
23048 (view_list_to_loc_list_val_node): New.
23049 (print_dw_val): Handle dw_val_class_view_list.
23050 (size_of_die): Likewise.
23051 (value_format): Likewise.
23052 (loc_list_has_views): New.
23053 (gen_llsym): Set vl_symbol too.
23054 (maybe_gen_llsym, skip_loc_list_entry): New.
23055 (dwarf2out_maybe_output_loclist_view_pair): New.
23056 (output_loc_list): Output view list or entries too.
23057 (output_view_list_offset): New.
23058 (output_die): Handle dw_val_class_view_list.
23059 (output_dwarf_version): New.
23060 (output_compilation_unit_header): Use it.
23061 (output_skeleton_debug_sections): Likewise.
23062 (output_rnglists, output_line_info): Likewise.
23063 (output_pubnames, output_aranges): Update version comments.
23064 (output_one_line_info_table): Output view numbers in asm comments.
23065 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23066 Call maybe_gen_llsym.
23067 (loc_list_from_tree_1): Adjust.
23068 (add_AT_location_description): Create view list attribute if
23069 needed, check it's absent otherwise.
23070 (convert_cfa_to_fb_loc_list): Adjust.
23071 (maybe_emit_file): Call output_asm_line_debug_info for test.
23072 (dwarf2out_var_location): Reset views as needed. Precompute
23073 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23074 attribute. Set view.
23075 (new_line_info_table): Reset next view.
23076 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23077 (dwarf2out_source_line): Likewise. Output view resets and labels to
23078 the assembler, or select appropriate line info opcodes.
23079 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23080 (optimize_string_length): Catch it. Adjust.
23081 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23082 dw_val_class_view_list, and remove it if no longer needed.
23083 (hash_loc_list): Hash view numbers.
23084 (loc_list_hasher::equal): Compare them.
23085 (optimize_location_lists): Check whether a view list symbol is
23086 needed, and whether the locview attribute is present, and
23087 whether they match. Remove the locview attribute if no longer
23089 (index_location_lists): Call skip_loc_list_entry for test.
23090 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23091 Use output_dwarf_version.
23092 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23093 (struct dw_val_node): Add val_view_list.
23094 * final.c (SEEN_NEXT_VIEW): New.
23095 (set_next_view_needed): New.
23096 (clear_next_view_needed): New.
23097 (maybe_output_next_view): New.
23098 (final_start_function): Rename to...
23099 (final_start_function_1): ... this. Take pointer to FIRST,
23100 add SEEN parameter. Emit param bindings in the initial view.
23101 (final_start_function): Reintroduce SEEN-less interface.
23102 (final): Rename to...
23103 (final_1): ... this. Take SEEN parameter. Output final pending
23104 next view at the end.
23105 (final): Reintroduce seen-less interface.
23106 (final_scan_insn): Output pending next view before switching
23107 sections or ending a block. Mark the next view as needed when
23108 outputting variable locations. Notify debug backend of section
23109 changes, and of location view changes.
23110 (rest_of_handle_final): Adjust.
23111 * toplev.c (process_options): Autodetect value for debug variable
23112 location views option. Warn on incompat5 without -gdwarf-5.
23113 * doc/invoke.texi (gvariable-location-views): New.
23114 (gvariable-location-views=incompat5): New.
23115 (gno-variable-location-views): New.
23117 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23119 PR tree-optimization/84136
23120 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23121 that the result of find_edge is non-NULL.
23123 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23126 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23127 storing integer register in SImode. Fix cost of 256 and 512
23128 byte aligned SSE register store.
23130 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23132 * config/i386/i386.c (ix86_multiplication_cost): Fix
23133 multiplication cost for TARGET_AVX512DQ.
23135 2018-02-08 Marek Polacek <polacek@redhat.com>
23137 PR tree-optimization/84238
23138 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23141 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23143 PR tree-optimization/84265
23144 * tree-vect-stmts.c (vectorizable_store): Don't treat
23145 VMAT_CONTIGUOUS accesses as grouped.
23146 (vectorizable_load): Likewise.
23148 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23150 PR tree-optimization/81635
23151 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23152 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23153 (test_round_for_mask): New functions.
23154 (wide_int_cc_tests): Call test_round_for_mask.
23155 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23156 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23157 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23158 range returned by get_range_info.
23160 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23163 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23164 * symtab.c: Include builtins.h
23165 (symtab_node::output_to_lto_symbol_table_p): Move here
23166 from lto-streamer-out.c:output_symbol_p.
23167 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23168 (output_symbol_p): Move all logic to symtab.c
23169 (produce_symtab): Update.
23171 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23173 * config/s390/s390-opts.h (enum indirect_branch): Define.
23174 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23175 (s390_indirect_branch_via_thunk)
23176 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23177 (enum s390_indirect_branch_type): Define.
23178 * config/s390/s390.c (struct s390_frame_layout, struct
23179 machine_function): Remove.
23180 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23181 (indirect_branch_table_label_no, indirect_branch_table_name):
23183 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23184 (enum s390_indirect_branch_option): Define.
23185 (s390_return_addr_from_memory): New function.
23186 (s390_handle_string_attribute): New function.
23187 (s390_attribute_table): Add new attribute handler.
23188 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23189 (s390_indirect_branch_via_thunk): New function.
23190 (s390_indirect_branch_via_inline_thunk): New function.
23191 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23192 sibling call optimization for non z10 compiles.
23193 (s390_emit_call): Force indirect branch target to be a single
23194 register. Add r1 clobber for non-z10 compiles.
23195 (s390_emit_epilogue): Emit return jump via return_use expander.
23196 (s390_reorg): Handle JUMP_INSNs as execute targets.
23197 (s390_option_override_internal): Perform validity checks for the
23198 new command line options.
23199 (s390_indirect_branch_attrvalue): New function.
23200 (s390_indirect_branch_settings): New function.
23201 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23202 (s390_output_indirect_thunk_function): New function.
23203 (s390_code_end): Implement target hook.
23204 (s390_case_values_threshold): Implement target hook.
23205 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23207 * config/s390/s390.h (struct s390_frame_layout)
23208 (struct machine_function): Move here from s390.c.
23209 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23210 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23211 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23212 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23213 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23214 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23215 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23216 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23217 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23218 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23219 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23220 (mnemonic attribute): Add values which aren't recognized
23222 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23223 pattern for branch conversion. Fix mnemonic attribute.
23224 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23225 indirect branch via thunk if requested.
23226 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23227 ("*indirect_jump"): Disable for branch conversion using out of
23229 ("indirect_jump_via_thunk<mode>_z10")
23230 ("indirect_jump_via_thunk<mode>")
23231 ("indirect_jump_via_inlinethunk<mode>_z10")
23232 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23233 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23234 ("casesi_jump_via_inlinethunk<mode>_z10")
23235 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23236 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23237 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23238 ("*indirect2_jump"): Disable for branch conversion.
23239 ("casesi_jump"): Turn into expander and expand patterns for branch
23241 ("return_use"): New expander.
23242 ("*return"): Emit return via thunk and rename it to ...
23243 ("*return<mode>"): ... this one.
23244 * config/s390/s390.opt: Add new options and and enum for the
23247 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23249 * lra-constraints.c (match_reload): Unconditionally use
23250 gen_lowpart_SUBREG, rather than selecting between that
23251 and equivalent gen_rtx_SUBREG code.
23253 2018-02-08 Richard Biener <rguenther@suse.de>
23255 PR tree-optimization/84233
23256 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23257 changed flag instead of boguously re-using phi_inserted.
23259 2018-02-08 Martin Jambor <mjambor@suse.cz>
23261 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23262 static local variables.
23264 2018-02-08 Richard Biener <rguenther@suse.de>
23266 PR tree-optimization/84278
23267 * tree-vect-stmts.c (vectorizable_store): When looking for
23268 smaller vector types to perform grouped strided loads/stores
23269 make sure the mode is supported by the target.
23270 (vectorizable_load): Likewise.
23272 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23274 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23275 Increase LDP/STP opportunities by adding adjacent callee-saves.
23277 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23279 PR rtl-optimization/84068
23280 PR rtl-optimization/83459
23281 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23283 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23285 PR tree-optimization/84224
23286 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23287 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23288 non-zero arguments.
23290 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23293 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23294 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23295 count, remove one USE.
23297 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23299 * doc/install.texi (Configuration): Document the
23300 --with-long-double-format={ibm,ieee} PowerPC configuration
23304 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23305 Convert from define_expand to be define_insn_and_split. Rework
23306 float/double/_Float128 conversions to QI/HI/SImode to work with
23307 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23308 conversions to QI/HImode types did a store and then a load to
23309 truncate the value. For conversions to VSX registers, don't split
23310 the insn, instead emit the code directly. Use the code iterator
23311 any_fix to combine signed and unsigned conversions.
23312 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23313 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23314 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23315 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23316 (fix_<mode>di2_hw): Likewise.
23317 (fixuns_<mode>di2_hw): Likewise.
23318 (fix_<mode>si2_hw): Likewise.
23319 (fixuns_<mode>si2_hw): Likewise.
23320 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23321 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23322 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23323 fix<uns>_trunc<SFDF:mode>si2_p8.
23324 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23325 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23326 (fix<uns>_<mode>_mem): Likewise.
23327 (fctiw<u>z_<mode>_mem): Likewise.
23328 (fix<uns>_<mode>_mem): Likewise.
23329 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23330 the register allocator from doing a direct move to the GPRs to do
23331 a store, and instead use the ISA 3.0 store byte/half-word from
23332 vector register instruction. For IEEE 128-bit floating point,
23333 also optimize stores of 32-bit ints.
23334 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23336 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23338 * genextract.c (push_pathstr_operand): New function to support
23340 (walk_rtx): Call push_pathstr_operand.
23341 (print_path): Support [a-zA-Z].
23343 2018-02-07 Richard Biener <rguenther@suse.de>
23345 PR tree-optimization/84037
23346 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23347 (cse_and_gimplify_to_preheader): Declare.
23348 (vect_get_place_in_interleaving_chain): Likewise.
23349 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23351 (_loop_vec_info::~_loop_vec_info): Delete it.
23352 (cse_and_gimplify_to_preheader): New function.
23353 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23354 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23355 (vectorizable_load): Likewise. For grouped stores always base
23356 the IV on the first element.
23357 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23358 condition before gimplifying.
23360 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23362 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23363 *DIV_EXPR and *MOD_EXPR.
23365 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23368 * config/i386/i386.c (ix86_option_override_internal): Mask out
23369 the CF_SET bit when checking -fcf-protection.
23371 2018-02-07 Tom de Vries <tom@codesourcery.com>
23374 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23377 2018-02-07 Richard Biener <rguenther@suse.de>
23379 PR tree-optimization/84204
23380 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23383 PR tree-optimization/84205
23384 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23385 special-case isl_ast_op_zdiv_r.
23387 PR tree-optimization/84223
23388 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23389 Only add conditions from within the region.
23390 (gather_bbs::after_dom_children): Adjust.
23392 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23395 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23396 * config/avr/avr.md: Only post-reload split REG-REG moves if
23397 either register is GENERAL_REG_P.
23399 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23401 PR tree-optimization/84235
23402 * tree-ssa-scopedtables.c
23403 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23404 if the subtraction is performed in floating point type where NaNs are
23405 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23406 build 1. Formatting fix.
23408 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23411 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23412 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23413 and skip it regardless of bb boundaries. Use CALL_P macro,
23414 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23415 unnecessarily, formatting fix.
23417 2018-02-06 Michael Collison <michael.collison@arm.com>
23419 * config/arm/thumb2.md:
23420 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23421 (*thumb_mov_notscc): Ditto.
23423 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23426 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23427 unsigned_fix, not "s".
23429 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23431 * configure.ac (gcc_fn_eh_frame_ro): New function.
23432 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23433 correct .eh_frame permissions.
23434 * configure: Regenerate.
23436 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23438 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23439 irrelevant options.
23441 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23443 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23444 Display warning message for -mno-speculate-indirect-jumps.
23446 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23448 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23450 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23452 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23454 PR tree-optimization/84225
23455 * tree-eh.c (find_trapping_overflow): Only call
23456 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23458 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23461 * config/i386/i386.c: Reimplement the check of possible options
23462 -mibt/-mshstk conbination. Change error messages.
23463 * doc/invoke.texi: Fix a typo: remove extra '='.
23465 2018-02-06 Marek Polacek <polacek@redhat.com>
23467 PR tree-optimization/84228
23468 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23470 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23473 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23474 emitted arch directives.
23475 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23476 __ARM_FEATURE_COPROC before changing architectures.
23478 2018-02-06 Richard Biener <rguenther@suse.de>
23480 * config/i386/i386.c (print_reg): Fix typo.
23481 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23483 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23485 * configure: Regenerate.
23487 2018-02-05 Martin Sebor <msebor@redhat.com>
23489 PR tree-optimization/83369
23490 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23493 2018-02-05 Martin Liska <mliska@suse.cz>
23495 * doc/invoke.texi: Cherry-pick upstream r323995.
23497 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23499 * ira.c (ira_init_register_move_cost): Adjust comment.
23501 2018-02-05 Martin Liska <mliska@suse.cz>
23503 PR gcov-profile/84137
23504 * doc/gcov.texi: Fix typo in documentation.
23506 2018-02-05 Martin Liska <mliska@suse.cz>
23508 PR gcov-profile/83879
23509 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23510 using dlopen functionality.
23512 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23514 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23515 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23516 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23517 _mm_maskz_range_round_ss): New intrinsics.
23518 (__builtin_ia32_rangesd128_round)
23519 (__builtin_ia32_rangess128_round): Remove.
23520 (__builtin_ia32_rangesd128_mask_round,
23521 __builtin_ia32_rangess128_mask_round): New builtins.
23522 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23523 __builtin_ia32_rangess128_round): Remove.
23524 (__builtin_ia32_rangesd128_mask_round,
23525 __builtin_ia32_rangess128_mask_round): New builtins.
23526 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23527 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23528 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23529 "<round_saeonly_constraint>")): Changed to ...
23530 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23531 "<round_saeonly_scalar_constraint>")): ... this.
23532 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23533 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23534 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23535 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23536 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23538 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23540 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23542 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23543 Remove all values except native, 8540 and 8548.
23545 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23547 * config/i386/i386.c (ix86_output_function_return): Pass
23548 INVALID_REGNUM, instead of -1, as invalid register number to
23549 indirect_thunk_name and output_indirect_thunk.
23551 2018-02-02 Julia Koval <julia.koval@intel.com>
23553 * config.gcc: Add -march=icelake.
23554 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23555 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23556 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23557 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23558 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23559 (processor_target_table): Add icelake.
23560 (ix86_option_override_internal): Handle new PTAs.
23561 (get_builtin_code_for_version): Handle icelake.
23562 (M_INTEL_COREI7_ICELAKE): New.
23563 (fold_builtin_cpu): Handle icelake.
23564 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23565 * doc/invoke.texi: Add -march=icelake.
23567 2018-02-02 Julia Koval <julia.koval@intel.com>
23569 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23570 to wide_int_bitmask.
23571 * wide-int-bitmask.h: New.
23573 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23576 * config/i386/i386.md: Replace Pmode with word_mode in
23577 builtin_setjmp_setup and builtin_longjmp to support x32.
23579 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23583 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23585 (rs6000_supported_cpu_names): New static variable.
23586 (linux_cpu_translation_table): Likewise.
23587 (elf_platform) <cpu>: Define new static variable and use it.
23588 Translate kernel AT_PLATFORM name to canonical name if needed.
23589 Error if platform name is unknown.
23591 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23594 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23596 2018-02-01 Jeff Law <law@redhat.com>
23599 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23600 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23601 the scratch if RELEASE_VIA_POP is false.
23602 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23603 If we have to save a temporary register, decrement SIZE appropriately.
23604 Pass new arguments to release_scratch_register_on_entry.
23605 (ix86_adjust_stack_and_probe): Likewise.
23606 (ix86_emit_probe_stack_range): Pass new arguments to
23607 release_scratch_register_on_entry.
23609 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23611 PR rtl-optimization/84157
23612 * combine.c (change_zero_ext): Use REG_P predicate in
23613 front of HARD_REGISTER_P predicate.
23615 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23617 * config/avr/avr.c (avr_option_override): Move disabling of
23618 -fdelete-null-pointer-checks to...
23619 * common/config/avr/avr-common.c (avr_option_optimization_table):
23622 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23624 PR tree-optimization/81635
23625 * tree-data-ref.c (split_constant_offset_1): For types that
23626 wrap on overflow, try to use range info to prove that wrapping
23629 2018-02-01 Renlin Li <renlin.li@arm.com>
23632 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23633 TAILCALL_ADDR_REGS.
23634 (aarch64_register_move_cost): Likewise.
23635 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23636 TAILCALL_ADDR_REGS.
23637 (REG_CLASS_NAMES): Likewise.
23638 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23639 TAILCALL_ADDR_REGS. Remove IP registers.
23640 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23642 2018-02-01 Richard Biener <rguenther@suse.de>
23644 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23645 for specifying RPO order and allow NULL for that.
23646 * domwalk.c (dom_walker::dom_walker): Likewise.
23647 (dom_walker::walk): Handle NULL RPO order.
23648 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23650 (rewrite_update_dom_walker): Likewise.
23651 (mark_def_dom_walker): Likewise.
23653 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23655 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23656 (aarch64_maybe_expand_sve_subreg_move): Declare.
23657 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23658 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23660 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23661 that are semantically a reverse operation.
23662 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23663 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23664 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23666 (aarch64_can_change_mode_class): For big-endian, forbid changes
23667 between two SVE modes if they have different element sizes.
23669 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23671 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23672 the TImode handling for big-endian targets.
23674 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23676 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23677 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23679 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23680 Remove BSWAP handing for big-endian targets and use the form of
23681 LD1RQ appropariate for the mode.
23683 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23685 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23686 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23687 duplicated element.
23689 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23692 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23693 check for operands that need to go through aarch64_sve_reload_be.
23695 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23697 PR tree-optimization/81661
23698 PR tree-optimization/84117
23699 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23700 * tree-eh.c: Include gimplify.h.
23701 (find_trapping_overflow, replace_trapping_overflow,
23702 rewrite_to_non_trapping_overflow): New functions.
23703 * tree-vect-loop.c: Include tree-eh.h.
23704 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23705 * tree-data-ref.c: Include tree-eh.h.
23706 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23708 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23710 PR rtl-optimization/84123
23711 * combine.c (change_zero_ext): Check if hard register satisfies
23712 can_change_dest_mode before calling gen_lowpart_SUBREG.
23714 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23717 * ira.c (ira_init_register_move_cost): Remove assert.
23719 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23721 PR rtl-optimization/84071
23722 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23723 * doc/tm.texi: Regenerate.
23725 2018-01-31 Richard Biener <rguenther@suse.de>
23727 PR tree-optimization/84132
23728 * tree-data-ref.c (analyze_miv_subscript): Properly
23729 check whether evolution_function_is_affine_multivariate_p
23730 before calling gcd_of_steps_may_divide_p.
23732 2018-01-31 Julia Koval <julia.koval@intel.com>
23735 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23736 * config/i386/i386.md (rdpid_rex64) New.
23737 (rdpid): Make 32bit only.
23739 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23742 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23743 an IDENTIFIER_NODE for FUNCTION_TYPE's.
23745 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23748 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23750 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23752 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23754 PR rtl-optimization/84071
23755 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23756 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23758 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23760 * config/arc/arc.c (arc_handle_aux_attribute): New function.
23761 (arc_attribute_table): Add 'aux' attribute.
23762 (arc_in_small_data_p): Consider aux like variables.
23763 (arc_is_aux_reg_p): New function.
23764 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23765 (arc_get_aux_arg): New function.
23766 (prepare_move_operands): Handle aux-register access.
23767 (arc_handle_aux_attribute): New function.
23768 * doc/extend.texi (ARC Variable attributes): Add subsection.
23770 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23772 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23773 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23774 (arc_attribute_table): Add 'uncached' attribute.
23775 (arc_print_operand): Print '.di' flag for uncached memory
23777 (arc_in_small_data_p): Do not consider for small data the uncached
23779 (arc_is_uncached_mem_p): New function.
23780 * config/arc/predicates.md (compact_store_memory_operand): Check
23781 for uncached memory accesses.
23782 (nonvol_nonimm_operand): Likewise.
23783 * doc/extend.texi (ARC Type Attribute): New subsection.
23785 2018-01-31 Jakub Jelinek <jakub@redhat.com>
23788 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23789 falign-loops=): Add Optimization flag.
23791 2018-01-30 Jeff Law <law@redhat.com>
23794 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23795 INT_REGISTERS_SAVED. Check it prior to calling
23796 get_scratch_register_on_entry.
23797 (ix86_adjust_stack_and_probe): Similarly.
23798 (ix86_emit_probe_stack_range): Similarly.
23799 (ix86_expand_prologue): Corresponding changes.
23801 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23804 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23805 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23807 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
23810 * lra-constraints.c (curr_insn_transform): Process AND in the
23813 2018-01-30 Jakub Jelinek <jakub@redhat.com>
23815 PR rtl-optimization/83986
23816 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23817 dependence against last_pending_memory_flush in addition to
23818 pending_jump_insns.
23820 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
23822 PR tree-optimization/81611
23823 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23826 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23829 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23832 2018-01-30 Richard Biener <rguenther@suse.de>
23833 Jakub Jelinek <jakub@redhat.com>
23835 PR tree-optimization/84111
23836 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23837 inner loops added during recursion, as they don't have up-to-date
23840 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23843 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23844 (can_inline_edge_by_limits_p): ... here.
23845 (can_early_inline_edge_p, check_callers,
23846 update_caller_keys, update_callee_keys, recursive_inlining,
23847 add_new_edges_to_heap, speculation_useful_p,
23848 inline_small_functions,
23849 inline_small_functions, flatten_function,
23850 inline_to_all_callers_1): Update.
23852 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23854 * profile-count.c (profile_count::combine_with_ipa_count): Handle
23857 2018-01-30 Richard Biener <rguenther@suse.de>
23859 PR tree-optimization/83008
23860 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23861 invariant and constant vector uses in stmts when they need
23862 more than one stmt.
23864 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23867 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23868 * configure: Regenerate.
23870 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23872 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23874 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23875 Use gen_rtx_REG rather than gen_lowpart.
23877 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23879 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23880 rather than 0 when creating partial subregs.
23882 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23884 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23887 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
23890 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23891 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23892 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23893 flags. This restores the settings used before the 2017-07-24.
23894 Turning off pre increment/decrement/modify allows IVOPTS to
23895 optimize DF/SF loops where the index is an int.
23897 2018-01-29 Richard Biener <rguenther@suse.de>
23898 Kelvin Nilsen <kelvin@gcc.gnu.org>
23901 * tree-vect-stmts.c (vectorizable_call): Don't call
23902 targetm.vectorize_builtin_md_vectorized_function if callee is
23905 2018-01-22 Carl Love <cel@us.ibm.com>
23907 * doc/extend.tex: Fix typo in second arg in
23908 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23910 2018-01-29 Richard Biener <rguenther@suse.de>
23912 PR tree-optimization/84086
23913 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23914 (flush_ssaname_freelist): When SSA names were released reset
23915 the SCEV hash table.
23917 2018-01-29 Richard Biener <rguenther@suse.de>
23919 PR tree-optimization/84057
23920 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23921 removed paths when removing edges.
23923 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
23925 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23926 -mfunction-return=@var{choice}.
23928 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
23930 PR diagnostic/84034
23931 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23932 Handle CR like TAB.
23933 (layout::print_source_line): Likewise.
23934 (test_get_line_width_without_trailing_whitespace): Add test cases.
23936 2018-01-27 Jakub Jelinek <jakub@redhat.com>
23938 PR middle-end/84040
23939 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23942 2018-01-26 Jim Wilson <jimw@sifive.com>
23944 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23946 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23949 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23951 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23952 and CMP + SUB-immediate -> SUBS.
23954 2018-01-26 Martin Sebor <msebor@redhat.com>
23956 PR tree-optimization/83896
23957 * tree-ssa-strlen.c (get_string_len): Rename...
23958 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
23959 Avoid assuming length is constant.
23960 (handle_char_store): Use HOST_WIDE_INT for string length.
23962 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
23965 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23966 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23968 2018-01-26 Richard Biener <rguenther@suse.de>
23970 PR rtl-optimization/84003
23971 * dse.c (record_store): Only record redundant stores when
23972 the earlier store aliases at least all accesses the later one does.
23974 2018-01-26 Jakub Jelinek <jakub@redhat.com>
23976 PR rtl-optimization/83985
23977 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23978 REG_CFA_RESTORE insns.
23979 (delete_unmarked_insns): Don't ignore separate shrink wrapping
23980 REG_CFA_RESTORE insns here.
23983 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23984 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23986 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
23988 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23989 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23990 (arc_init): Likewise.
23991 (arc_override_options): Likewise.
23992 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23994 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23996 * config/arc/arc.h (TARGET_DBNZ): Define.
23997 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23998 properly set the tune attribute.
23999 (dbnz): Use TARGET_DBNZ guard.
24000 * config/arc/arc.opt (mtune): Add core3 option.
24002 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24004 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24005 recognize new pic like addresses.
24006 (arc_delegitimize_address): Clean up.
24008 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24010 * config/arc/arc-arches.def: Option mrf16 valid for all
24012 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24013 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24014 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24015 * config/arc/arc-tables.opt: Regenerate.
24016 * config/arc/arc.c (arc_conditional_register_usage): Handle
24017 reduced register file case.
24018 (arc_file_start): Set must have build attributes.
24019 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24020 mrf16 option value.
24021 * config/arc/arc.opt (mrf16): Add new option.
24022 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24023 * config/arc/genmultilib.awk: Handle new mrf16 option.
24024 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24025 * config/arc/t-multilib: Regenerate.
24026 * doc/invoke.texi (ARC Options): Document mrf16 option.
24028 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24030 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24031 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24032 (arc_attribute_table): Add 'secure_call' attribute.
24033 (arc_print_operand): Print secure call operand.
24034 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24036 (arc_is_secure_call_p): New function. * config/arc/arc.md
24037 (call_i): Add support for sjli instruction.
24038 (call_value_i): Likewise.
24039 * config/arc/constraints.md (Csc): New constraint.
24041 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24042 John Eric Martin <John.Martin@emmicro-us.com>
24044 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24045 * config/arc/arc.c (_arc_jli_section): New struct.
24046 (arc_jli_section): New type.
24047 (rc_jli_sections): New static variable.
24048 (arc_handle_jli_attribute): New function.
24049 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24050 (arc_file_end): New function.
24051 (TARGET_ASM_FILE_END): Define.
24052 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24053 (arc_add_jli_section): New function.
24054 (jli_call_scan): Likewise.
24055 (arc_reorg): Call jli_call_scan.
24056 (arc_output_addsi): Remove 'S' from printing asm operand.
24057 (arc_is_jli_call_p): New function.
24058 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24060 (movhi_insn): Likewise.
24061 (movsi_insn): Likewise.
24062 (movsi_set_cc_insn): Likewise.
24063 (loadqi_update): Likewise.
24064 (load_zeroextendqisi_update): Likewise.
24065 (load_signextendqisi_update): Likewise.
24066 (loadhi_update): Likewise.
24067 (load_zeroextendhisi_update): Likewise.
24068 (load_signextendhisi_update): Likewise.
24069 (loadsi_update): Likewise.
24070 (loadsf_update): Likewise.
24071 (movsicc_insn): Likewise.
24072 (bset_insn): Likewise.
24073 (bxor_insn): Likewise.
24074 (bclr_insn): Likewise.
24075 (bmsk_insn): Likewise.
24076 (bicsi3_insn): Likewise.
24077 (cmpsi_cc_c_insn): Likewise.
24078 (movsi_ne): Likewise.
24079 (movsi_cond_exec): Likewise.
24080 (clrsbsi2): Likewise.
24081 (norm_f): Likewise.
24091 (call_i): Remove 'S' asm letter, add jli instruction.
24092 (call_value_i): Likewise.
24093 * config/arc/arc.op (mjli-always): New option.
24094 * config/arc/constraints.md (Cji): New constraint.
24095 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24097 (subsf3_fpx): Likewise.
24098 (mulsf3_fpx): Likewise.
24099 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24101 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24102 function attrbutes.
24103 * doc/invoke.texi (ARC): Document mjli-always option.
24105 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24107 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24108 avoid addition with 0 and use incw and decw where possible.
24110 2018-01-26 Richard Biener <rguenther@suse.de>
24112 PR tree-optimization/81082
24113 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24114 association if it requires casting to unsigned.
24115 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24116 from fold_plusminus_mult_expr to catch important cases late when
24117 range info is available.
24119 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24121 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24122 * configure.ac (hidden_linkonce): New test.
24123 * configure: Regenerate.
24124 * config.in: Regenerate.
24126 2018-01-26 Julia Koval <julia.koval@intel.com>
24128 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24129 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24130 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24131 _mm_mask_bitshuffle_epi64_mask): Fix type.
24132 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24133 USI_FTYPE_V4DI_V4DI_USI): Remove.
24134 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24135 __builtin_ia32_vpshufbitqmb256_mask,
24136 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24137 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24138 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24140 2018-01-26 Alan Modra <amodra@gmail.com>
24143 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24144 UNSPEC_VBPERMQ. Sort other unspecs.
24146 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24148 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24150 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24152 PR middle-end/83055
24153 * predict.c (drop_profile): Do not push/pop cfun; update also
24155 (handle_missing_profiles): Fix logic looking for zero profiles.
24157 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24159 PR middle-end/83977
24160 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24161 on functions with #pragma omp declare simd or functions with simd
24163 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24164 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24165 Remove trailing \n from warning_at calls.
24167 2018-01-25 Tom de Vries <tom@codesourcery.com>
24170 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24171 for neutered workers.
24173 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24176 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24177 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24179 2018-01-24 Jeff Law <law@redhat.com>
24182 * i386.c (get_probe_interval): Move to earlier point.
24183 (ix86_compute_frame_layout): If -fstack-clash-protection and
24184 the frame is larger than the probe interval, then use pushes
24185 to save registers rather than reg->mem moves.
24186 (ix86_expand_prologue): Remove conditional for int_registers_saved
24189 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24192 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24193 min/max for never referenced object.
24195 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24197 PR middle-end/83977
24198 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24200 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24201 attributes from DECL_ATTRIBUTES (decl) without affecting
24202 DECL_ATTRIBUTES (current_function_decl).
24203 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24204 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24206 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24208 PR tree-optimization/83979
24209 * fold-const.c (fold_comparison): Use constant_boolean_node
24210 instead of boolean_{true,false}_node.
24212 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24214 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24217 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24219 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24220 Simplify the clause that sets the length attribute.
24221 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24222 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24223 clause that sets the length attribute.
24224 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24226 2018-01-24 Tom de Vries <tom@codesourcery.com>
24229 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24230 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24231 Add strict parameter.
24232 (prevent_branch_around_nothing): Insert dummy insn between branch to
24233 label and label with no ptx insn inbetween.
24234 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24236 2018-01-24 Tom de Vries <tom@codesourcery.com>
24239 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24240 for neutered threads in warp.
24241 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24243 2018-01-24 Richard Biener <rguenther@suse.de>
24245 PR tree-optimization/83176
24246 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24249 2018-01-24 Richard Biener <rguenther@suse.de>
24251 PR tree-optimization/82819
24252 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24253 code generating pluses that are no-ops in the target precision.
24255 2018-01-24 Richard Biener <rguenther@suse.de>
24257 PR middle-end/84000
24258 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24260 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24262 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24263 to merge probabilities.
24264 * predict.c (probably_never_executed): Also mark as cold functions
24265 with global 0 profile and guessed local profile.
24266 * profile-count.c (profile_probability::combine_with_count): New
24268 * profile-count.h (profile_probability::operator*,
24269 profile_probability::operator*=, profile_probability::operator/,
24270 profile_probability::operator/=): Reduce precision to adjusted
24271 and set value to guessed on contradictory divisions.
24272 (profile_probability::combine_with_freq): Remove.
24273 (profile_probability::combine_wiht_count): Declare.
24274 (profile_count::force_nonzero):: Set to adjusted.
24275 (profile_count::probability_in):: Set quality to adjusted.
24276 * tree-ssa-tail-merge.c (replace_block_by): Use
24277 combine_with_count.
24279 2018-01-23 Andrew Waterman <andrew@sifive.com>
24280 Jim Wilson <jimw@sifive.com>
24282 * config/riscv/riscv.c (riscv_stack_boundary): New.
24283 (riscv_option_override): Set riscv_stack_boundary. Handle
24284 riscv_preferred_stack_boundary_arg.
24285 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24286 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24287 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24288 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24289 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24290 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24292 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24295 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24296 of struct ix86_frame.
24297 (ix86_expand_epilogue): Likewise. Add a local variable for
24298 the reg_save_offset field in struct ix86_frame.
24300 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24302 PR tree-optimization/82604
24303 * tree-loop-distribution.c (enum partition_kind): New enum item
24304 PKIND_PARTIAL_MEMSET.
24305 (partition_builtin_p): Support above new enum item.
24306 (generate_code_for_partition): Ditto.
24307 (compute_access_range): Differentiate cases that equality can be
24308 proven at all loops, the innermost loops or no loops.
24309 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24310 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24311 (finalize_partitions, distribute_loop): Don't fuse partition of
24312 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24313 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24314 parloop is enabled.
24316 2018-01-23 Martin Liska <mliska@suse.cz>
24318 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24319 order to ignore the predictor.
24320 (PRED_POLYMORPHIC_CALL): Likewise.
24321 (PRED_RECURSIVE_CALL): Likewise.
24323 2018-01-23 Martin Liska <mliska@suse.cz>
24325 * tree-profile.c (tree_profiling): Print function header to
24326 aware reader which function we are working on.
24327 * value-prof.c (gimple_find_values_to_profile): Do not print
24328 not interesting value histograms.
24330 2018-01-23 Martin Liska <mliska@suse.cz>
24332 * profile-count.h (enum profile_quality): Add
24333 profile_uninitialized as the first value. Do not number values
24334 as they are zero based.
24335 (profile_count::verify): Update sanity check.
24336 (profile_probability::verify): Likewise.
24338 2018-01-23 Nathan Sidwell <nathan@acm.org>
24340 * doc/invoke.texi (ffor-scope): Deprecate.
24342 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24344 PR tree-optimization/83510
24345 * domwalk.c (set_all_edges_as_executable): New function.
24346 (dom_walker::dom_walker): Convert bool param
24347 "skip_unreachable_blocks" to enum reachability. Move setup of
24348 edge flags to set_all_edges_as_executable and only do it when
24349 reachability is REACHABLE_BLOCKS.
24350 * domwalk.h (enum dom_walker::reachability): New enum.
24351 (dom_walker::dom_walker): Convert bool param
24352 "skip_unreachable_blocks" to enum reachability.
24353 (set_all_edges_as_executable): New decl.
24354 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24355 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24357 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24358 but converting true to REACHABLE_BLOCKS.
24359 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24361 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24362 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24363 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24365 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24366 if check_all_array_refs will be called.
24368 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24370 * tree.c (selftest::test_location_wrappers): Add more test
24373 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24375 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24376 (selftest::test_bit_in_range): Likewise.
24378 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24381 * doc/sourcebuild.texi (vect_float): Say that the selector
24382 only describes the situation when -funsafe-math-optimizations is on.
24383 (vect_float_strict): Document.
24385 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24387 PR tree-optimization/83965
24388 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24389 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24390 instead of checking only for a reduction.
24391 (vect_recog_widen_sum_pattern): Likewise.
24393 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24395 * predict.c (probably_never_executed): Only use precise profile info.
24396 (compute_function_frequency): Skip after inlining hack since we now
24397 have quality checking.
24399 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24401 * profile-count.h (profile_probability::very_unlikely,
24402 profile_probability::unlikely, profile_probability::even): Set
24403 precision to guessed.
24405 2018-01-23 Richard Biener <rguenther@suse.de>
24407 PR tree-optimization/83963
24408 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24409 Properly terminate dominator walk when crossing the exit edge not
24410 when visiting its source block.
24412 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24415 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24416 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24418 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24420 PR tree-optimization/83957
24421 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24422 semicolon after for body surrounded by braces.
24424 PR tree-optimization/83081
24425 * profile-count.h (profile_probability::split): New method.
24426 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24427 Use profile_probability::split.
24428 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24429 when splitting a single conditional jump into 2.
24431 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24433 PR tree-optimization/69452
24434 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24437 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24439 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24440 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24441 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24443 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24445 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24447 * config/rl78/rl78.md (movdi): New define_expand.
24448 * config/rl78/rl78.c (rl78_split_movdi): New function.
24450 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24453 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24455 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24456 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24457 128-bit to produce an UNSPEC move to get the double word with the
24458 signbit and then a shift directly to do signbit.
24459 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24460 implementation with a new version that just does either a direct
24461 move or a regular move. Move memory interface to separate insns.
24462 Move insns so they are next to the expander.
24463 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24464 with signbit move. Split big and little endian case.
24465 (signbit<mode>2_dm_mem_le): Likewise.
24466 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24467 (signbit<mode>2_dm2): Likewise.
24469 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24471 * config/rl78/rl78.md (anddi3): New define_expand.
24473 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24475 * config/rl78/rl78.md (umindi3): New define_expand.
24477 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24479 * config/rl78/rl78.md (smindi3): New define_expand.
24481 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24483 * config/rl78/rl78.md (smaxdi3): New define_expand.
24485 2018-01-22 Carl Love <cel@us.ibm.com>
24487 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24488 LVX_V1TI): Add macro expansion.
24489 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24490 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24491 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24492 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24493 Change check to determine if the instruction is a byte reversing
24494 entry. Fix typo in comment.
24495 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24496 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24497 Add def_builtin calls for new builtins.
24498 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24499 Add define_insn expansion.
24501 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24503 * config/rl78/rl78.md (umaxdi3): New define_expand.
24505 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24507 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24508 for non-QImode registers.
24510 2018-01-22 Richard Biener <rguenther@suse.de>
24512 PR tree-optimization/83963
24513 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24514 including the loop exit block.
24515 (scop_detection::merge_sese): Likewise.
24516 (scop_detection::add_scop): Do it here instead.
24518 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24520 * doc/sourcebuild.texi (arm_softfloat): Document.
24522 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24525 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24526 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24527 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24529 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24530 David Edelsohn <dje.gcc@gmail.com>
24533 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24534 Change "crset eq" to "crset 2".
24535 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24536 (*call_indirect_aix<mode>_nospec): Likewise.
24537 (*call_value_indirect_aix<mode>_nospec): Likewise.
24538 (*call_indirect_elfv2<mode>_nospec): Likewise.
24539 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24540 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24541 change assembly output from . to $.
24542 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24543 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24544 (*tablejump<mode>_internal1_nospec): Likewise.
24546 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24549 * config/sh/sh_optimize_sett_clrt.cc:
24550 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24552 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24554 PR tree-optimization/83940
24555 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24556 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24557 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24558 use it to pass back the definition type.
24559 (vect_check_store_rhs): Likewise rhs_dt_out.
24560 (vect_build_gather_load_calls): Add a mask_dt argument and use
24561 it instead of a call to vect_is_simple_use.
24562 (vectorizable_store): Update calls to vect_check_load_store_mask
24563 and vect_check_store_rhs. Use the dt returned by the latter instead
24564 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24565 instead of calls to vect_is_simple_use. Pass the scalar rather
24566 than the vector operand to vect_is_simple_use when handling
24567 second and subsequent copies of an rhs value.
24568 (vectorizable_load): Update calls to vect_check_load_store_mask
24569 and vect_build_gather_load_calls. Use the cached mask_dt and
24570 gs_info.offset_dt instead of calls to vect_is_simple_use.
24572 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24574 PR middle-end/83945
24575 * tree-emutls.c: Include gimplify.h.
24576 (lower_emutls_2): New function.
24577 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24578 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24579 it before further processing.
24582 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24583 UINTVAL (trueop1) instead of INTVAL (op1).
24585 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24589 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24590 INCOMING_FRAME_SP_OFFSET if not defined.
24591 (scan_trace): Add ENTRY argument. If true and
24592 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24593 emit a note to adjust the CFA offset.
24594 (create_cfi_notes): Adjust scan_trace callers.
24595 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24596 INCOMING_FRAME_SP_OFFSET in the CIE.
24597 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24598 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24600 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24601 * doc/tm.texi: Regenerated.
24603 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24605 PR rtl-optimization/83147
24606 * lra-constraints.c (remove_inheritance_pseudos): Use
24607 lra_substitute_pseudo_within_insn.
24609 2018-01-19 Tom de Vries <tom@codesourcery.com>
24610 Cesar Philippidis <cesar@codesourcery.com>
24613 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24615 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24618 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24619 spaces for function labels.
24621 2018-01-19 Martin Liska <mliska@suse.cz>
24623 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24624 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24625 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24626 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24627 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24628 (PRED_CONST_RETURN): Change from 69 to 65.
24629 (PRED_NULL_RETURN): Change from 91 to 71.
24630 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24631 (PRED_LOOP_GUARD): Change from 66 to 73.
24633 2018-01-19 Martin Liska <mliska@suse.cz>
24635 * predict.c (predict_insn_def): Add new assert.
24636 (struct branch_predictor): Change type to signed integer.
24637 (test_prediction_value_range): Amend test to cover
24638 PROB_UNINITIALIZED.
24639 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24640 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24641 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24642 (PRED_LOOP_IV_COMPARE): Likewise.
24643 * predict.h (PROB_UNINITIALIZED): Define new constant.
24645 2018-01-19 Martin Liska <mliska@suse.cz>
24647 * predict.c (dump_prediction): Add new format for
24648 analyze_brprob.py script which is enabled with -details
24650 * profile-count.h (precise_p): New function.
24652 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24654 PR tree-optimization/83922
24655 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24656 there are no statements that need masking.
24657 (vect_active_double_reduction_p): New function.
24658 (vect_analyze_loop_operations): Use it when handling phis that
24659 are not in the loop header.
24661 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24663 PR tree-optimization/83914
24664 * tree-vect-loop.c (vectorizable_induction): Don't convert
24665 init_expr or apply the peeling adjustment for inductions
24666 that are nested within the vectorized loop.
24668 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24670 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24673 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24677 * function.h (gimplify_parameters): Add gimple_seq * argument.
24678 * function.c: Include gimple.h and options.h.
24679 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24680 for the added local temporaries if needed.
24681 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24682 if there are any parameter cleanups, wrap whole body into a
24683 try/finally with the cleanups.
24685 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24688 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24689 Use GET_MODE_CLASS for scalar floating point.
24691 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24695 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24696 Fix call of call_cgraph_insertion_hooks.
24698 2018-01-18 Martin Sebor <msebor@redhat.com>
24700 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24702 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24705 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24708 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24711 * common.opt: (-ffile-prefix-map): New option.
24712 * opts.c (common_handle_option): Defer it.
24713 * opts-global.c (handle_common_deferred_options): Handle it.
24714 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24715 * file-prefix-map.h: New file.
24716 (remap_debug_filename, add_debug_prefix_map): ...here.
24717 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24718 * final.c (debug_prefix_map, add_debug_prefix_map
24719 remap_debug_filename): Move to...
24720 * file-prefix-map.c: New file.
24721 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24722 generalize, get rid of alloca(), use strrchr() instead of strchr().
24723 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24724 Implement in terms of add_prefix_map().
24725 (remap_macro_filename, remap_debug_filename): Implement in term of
24727 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24728 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24729 * dbxout.c: Include file-prefix-map.h.
24730 * varasm.c: Likewise.
24731 * vmsdbgout.c: Likewise.
24732 * xcoffout.c: Likewise.
24733 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24734 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24735 * doc/invoke.texi (-ffile-prefix-map): Document.
24736 (-fdebug-prefix-map): Update description.
24738 2018-01-18 Martin Liska <mliska@suse.cz>
24740 * config/i386/i386.c (indirect_thunk_name): Document that also
24742 (output_indirect_thunk): Document why both instructions
24743 (pause and lfence) are generated.
24745 2018-01-18 Richard Biener <rguenther@suse.de>
24747 PR tree-optimization/83887
24748 * graphite-scop-detection.c
24749 (scop_detection::get_nearest_dom_with_single_entry): Remove.
24750 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24751 (scop_detection::merge_sese): Re-implement with a flood-fill
24752 algorithm that properly finds a SESE region if it exists.
24754 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24757 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24758 pointer_diff optimizations use view_convert instead of convert.
24760 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24762 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24763 Generate different code for -mno-speculate-indirect-jumps.
24764 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24765 (*call_indirect_aix<mode>): Disable for
24766 -mno-speculate-indirect-jumps.
24767 (*call_indirect_aix<mode>_nospec): New define_insn.
24768 (*call_value_indirect_aix<mode>): Disable for
24769 -mno-speculate-indirect-jumps.
24770 (*call_value_indirect_aix<mode>_nospec): New define_insn.
24771 (*sibcall_nonlocal_sysv<mode>): Generate different code for
24772 -mno-speculate-indirect-jumps.
24773 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24775 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
24777 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24778 long double type, set the flags for noting the default long double
24779 type, even if we don't pass or return a long double type.
24781 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
24784 * ipa-inline.c (flatten_function): Do not overwrite final inlining
24787 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
24789 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24790 support for merge[hl].
24791 (fold_mergehl_helper): New helper function.
24792 (tree-vector-builder.h): New #include for tree_vector_builder usage.
24793 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24794 (altivec_vmrglw_direct): Add xxmrglw insn.
24796 2018-01-17 Andrew Waterman <andrew@sifive.com>
24798 * config/riscv/riscv.c (riscv_conditional_register_usage): If
24799 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24801 2018-01-17 David Malcolm <dmalcolm@redhat.com>
24804 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24805 call the lto_location_cache before reading the
24806 DECL_SOURCE_LOCATION of the types.
24808 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
24809 Richard Sandiford <richard.sandiford@linaro.org>
24811 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24812 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24813 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24814 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24815 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24817 * config/aarch64/constraints.md (aarch64_movti_operand):
24819 * config/aarch64/predicates.md (Uti): Add new constraint.
24821 2018-01-17 Carl Love <cel@us.ibm.com>
24823 * config/rs6000/vsx.md (define_expand xl_len_r,
24824 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24825 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24827 (define_expand, define_insn): Move the shift left from the
24828 define_insn to the define_expand for lxvl and stxvl instructions.
24829 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24830 and XL_LEN_R definitions to PURE.
24832 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
24834 * config/i386/i386.c (indirect_thunk_name): Declare regno
24835 as unsigned int. Compare regno with INVALID_REGNUM.
24836 (output_indirect_thunk): Ditto.
24837 (output_indirect_thunk_function): Ditto.
24838 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
24839 in the call to output_indirect_thunk_function.
24841 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
24843 PR middle-end/83884
24844 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24845 rather than the size of inner_type to determine the stack slot size
24846 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24848 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
24851 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24854 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
24856 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24857 endian Linux systems to optionally enable multilibs for selecting
24858 the long double type if the user configured an explicit type.
24859 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24860 have no long double multilibs if not defined.
24861 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24862 warn if the user used -mabi={ieee,ibm}longdouble and we built
24863 multilibs for long double.
24864 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24865 appropriate multilib option.
24866 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24868 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24869 for building long double multilibs.
24870 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24872 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
24874 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24877 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24879 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24882 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24885 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24888 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24890 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24891 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24893 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
24895 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24896 different rtl trees depending on TARGET_64BIT.
24897 (rs6000_gen_lvx): Likewise.
24899 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24901 * config/visium/visium.md (nop): Tweak comment.
24902 (hazard_nop): Likewise.
24904 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24906 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24907 -mspeculate-indirect-jumps.
24908 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24909 for -mno-speculate-indirect-jumps.
24910 (*call_indirect_elfv2<mode>_nospec): New define_insn.
24911 (*call_value_indirect_elfv2<mode>): Disable for
24912 -mno-speculate-indirect-jumps.
24913 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24914 (indirect_jump): Emit different RTL for
24915 -mno-speculate-indirect-jumps.
24916 (*indirect_jump<mode>): Disable for
24917 -mno-speculate-indirect-jumps.
24918 (*indirect_jump<mode>_nospec): New define_insn.
24919 (tablejump): Emit different RTL for
24920 -mno-speculate-indirect-jumps.
24921 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24922 (tablejumpsi_nospec): New define_expand.
24923 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24924 (tablejumpdi_nospec): New define_expand.
24925 (*tablejump<mode>_internal1): Disable for
24926 -mno-speculate-indirect-jumps.
24927 (*tablejump<mode>_internal1_nospec): New define_insn.
24928 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24931 2018-01-16 Artyom Skrobov tyomitch@gmail.com
24933 * caller-save.c (insert_save): Drop unnecessary parameter. All
24936 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24937 Richard Biener <rguenth@suse.de>
24940 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24941 return early, inline manually is_gimple_sizepos. Make sure if we
24942 call gimplify_expr we don't end up with a gimple constant.
24943 * tree.c (variably_modified_type_p): Don't return true for
24944 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
24945 * gimplify.h (is_gimple_sizepos): Remove.
24947 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24949 PR tree-optimization/83857
24950 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24951 vectorizable_live_operation for pure SLP statements.
24952 (vectorizable_live_operation): Handle PHIs.
24954 2018-01-16 Richard Biener <rguenther@suse.de>
24956 PR tree-optimization/83867
24957 * tree-vect-stmts.c (vect_transform_stmt): Precompute
24958 nested_in_vect_loop_p since the scalar stmt may get invalidated.
24960 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24963 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24964 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24965 If off is not INTEGER_CST, issue a may not be aligned warning
24966 rather than isn't aligned. Use isn%'t rather than isn't.
24967 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24969 <case MULT_EXPR>: Improve the case when bottom and one of the
24970 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24971 operand, in that case check if the other operand is multiple of
24972 bottom divided by the INTEGER_CST operand.
24974 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24977 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24978 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24979 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24980 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24981 * config/pa/pa.c (pa_function_arg_advance): Likewise.
24982 (pa_function_arg, pa_arg_partial_bytes): Likewise.
24983 (pa_function_arg_size): New function.
24985 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24987 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24988 in a separate statement.
24990 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
24992 PR tree-optimization/83847
24993 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24994 group gathers and scatters.
24996 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24998 PR rtl-optimization/86620
24999 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25001 PR rtl-optimization/83213
25002 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25003 to last if both are JUMP_INSNs.
25005 PR tree-optimization/83843
25006 * gimple-ssa-store-merging.c
25007 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25008 store_immediate_info for bswap/nop orig_stores.
25010 2018-01-15 Andrew Waterman <andrew@sifive.com>
25012 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25014 <UDIV>: Increase cost if !TARGET_DIV.
25016 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25018 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25019 (define_attr "cr_logical_3op"): New.
25020 (cceq_ior_compare): Adjust.
25021 (cceq_ior_compare_complement): Adjust.
25022 (*cceq_rev_compare): Adjust.
25023 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25024 (is_cracked_insn): Adjust.
25025 (insn_must_be_first_in_group): Adjust.
25026 * config/rs6000/40x.md: Adjust.
25027 * config/rs6000/440.md: Adjust.
25028 * config/rs6000/476.md: Adjust.
25029 * config/rs6000/601.md: Adjust.
25030 * config/rs6000/603.md: Adjust.
25031 * config/rs6000/6xx.md: Adjust.
25032 * config/rs6000/7450.md: Adjust.
25033 * config/rs6000/7xx.md: Adjust.
25034 * config/rs6000/8540.md: Adjust.
25035 * config/rs6000/cell.md: Adjust.
25036 * config/rs6000/e300c2c3.md: Adjust.
25037 * config/rs6000/e500mc.md: Adjust.
25038 * config/rs6000/e500mc64.md: Adjust.
25039 * config/rs6000/e5500.md: Adjust.
25040 * config/rs6000/e6500.md: Adjust.
25041 * config/rs6000/mpc.md: Adjust.
25042 * config/rs6000/power4.md: Adjust.
25043 * config/rs6000/power5.md: Adjust.
25044 * config/rs6000/power6.md: Adjust.
25045 * config/rs6000/power7.md: Adjust.
25046 * config/rs6000/power8.md: Adjust.
25047 * config/rs6000/power9.md: Adjust.
25048 * config/rs6000/rs64.md: Adjust.
25049 * config/rs6000/titan.md: Adjust.
25051 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25053 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25054 ix86_indirect_branch_register logic.
25056 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25058 * config/i386/constraints.md (Bs): Update
25059 ix86_indirect_branch_register check. Don't check
25060 ix86_indirect_branch_register with GOT_memory_operand.
25062 * config/i386/predicates.md (GOT_memory_operand): Don't check
25063 ix86_indirect_branch_register here.
25064 (GOT32_symbol_operand): Likewise.
25066 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25068 * config/i386/predicates.md (constant_call_address_operand):
25069 Rewrite ix86_indirect_branch_register logic.
25070 (sibcall_insn_operand): Likewise.
25072 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25074 * config/i386/constraints.md (Bs): Replace
25075 ix86_indirect_branch_thunk_register with
25076 ix86_indirect_branch_register.
25078 * config/i386/i386.md (indirect_jump): Likewise.
25079 (tablejump): Likewise.
25080 (*sibcall_memory): Likewise.
25081 (*sibcall_value_memory): Likewise.
25082 Peepholes of indirect call and jump via memory: Likewise.
25083 * config/i386/i386.opt: Likewise.
25084 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25085 (GOT_memory_operand): Likewise.
25086 (call_insn_operand): Likewise.
25087 (sibcall_insn_operand): Likewise.
25088 (GOT32_symbol_operand): Likewise.
25090 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25092 PR middle-end/83837
25093 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25094 type rather than type addr's type points to.
25095 (expand_omp_atomic_mutex): Likewise.
25096 (expand_omp_atomic): Likewise.
25098 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25101 * config/i386/i386.c (output_indirect_thunk_function): Use
25102 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25103 for __x86_return_thunk.
25105 2018-01-15 Richard Biener <rguenther@suse.de>
25107 PR middle-end/83850
25108 * expmed.c (extract_bit_field_1): Fix typo.
25110 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25113 * config/arm/iterators.md (VF): New mode iterator.
25114 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25115 Remove integer-related logic from pattern.
25116 (neon_vabd<mode>_3): Likewise.
25118 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25120 PR middle-end/82694
25121 * common.opt (fstrict-overflow): No longer an alias.
25122 (fwrapv-pointer): New option.
25123 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25124 also for pointer types based on flag_wrapv_pointer.
25125 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25126 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25127 opts->x_flag_wrapv got set.
25128 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25129 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25130 POINTER_TYPE_OVERFLOW_UNDEFINED.
25131 * match.pd: Likewise in address comparison pattern.
25132 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25134 2018-01-15 Richard Biener <rguenther@suse.de>
25137 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25138 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25139 Reset type names to their identifier if their TYPE_DECL doesn't
25140 have linkage (and thus is used for ODR and devirt).
25141 (save_debug_info_for_decl): Remove.
25142 (save_debug_info_for_type): Likewise.
25143 (add_tree_to_fld_list): Adjust.
25144 * tree-pretty-print.c (dump_generic_node): Make dumping of
25145 type names more robust.
25147 2018-01-15 Richard Biener <rguenther@suse.de>
25149 * BASE-VER: Bump to 8.0.1.
25151 2018-01-14 Martin Sebor <msebor@redhat.com>
25154 * builtins.c (check_access): Avoid warning when the no-warning bit
25157 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25159 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25160 * ira-color (allocno_hard_regs_compare): Likewise.
25162 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25165 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25166 Use .pushsection/.popsection.
25168 2018-01-14 Martin Sebor <msebor@redhat.com>
25171 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25173 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25175 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25176 entry from extra_headers.
25177 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25178 extra_headers, make the list bitwise identical to the i?86-*-* one.
25180 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25182 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25183 -mcmodel=large with -mindirect-branch=thunk,
25184 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25185 -mfunction-return=thunk-extern.
25186 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25187 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25188 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25190 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25192 * config/i386/i386.c (print_reg): Print the name of the full
25193 integer register without '%'.
25194 (ix86_print_operand): Handle 'V'.
25195 * doc/extend.texi: Document 'V' modifier.
25197 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25199 * config/i386/constraints.md (Bs): Disallow memory operand for
25200 -mindirect-branch-register.
25202 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25203 (GOT_memory_operand): Likewise.
25204 (call_insn_operand): Likewise.
25205 (sibcall_insn_operand): Likewise.
25206 (GOT32_symbol_operand): Likewise.
25207 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25208 for -mindirect-branch-register.
25209 (tablejump): Likewise.
25210 (*sibcall_memory): Likewise.
25211 (*sibcall_value_memory): Likewise.
25212 Disallow peepholes of indirect call and jump via memory for
25213 -mindirect-branch-register.
25214 (*call_pop): Replace m with Bw.
25215 (*call_value_pop): Likewise.
25216 (*sibcall_pop_memory): Replace m with Bs.
25217 * config/i386/i386.opt (mindirect-branch-register): New option.
25218 * doc/invoke.texi: Document -mindirect-branch-register option.
25220 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25222 * config/i386/i386-protos.h (ix86_output_function_return): New.
25223 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25224 set function_return_type.
25225 (indirect_thunk_name): Add ret_p to indicate thunk for function
25227 (output_indirect_thunk_function): Pass false to
25228 indirect_thunk_name.
25229 (ix86_output_indirect_branch_via_reg): Likewise.
25230 (ix86_output_indirect_branch_via_push): Likewise.
25231 (output_indirect_thunk_function): Create alias for function
25232 return thunk if regno < 0.
25233 (ix86_output_function_return): New function.
25234 (ix86_handle_fndecl_attribute): Handle function_return.
25235 (ix86_attribute_table): Add function_return.
25236 * config/i386/i386.h (machine_function): Add
25237 function_return_type.
25238 * config/i386/i386.md (simple_return_internal): Use
25239 ix86_output_function_return.
25240 (simple_return_internal_long): Likewise.
25241 * config/i386/i386.opt (mfunction-return=): New option.
25242 (indirect_branch): Mention -mfunction-return=.
25243 * doc/extend.texi: Document function_return function attribute.
25244 * doc/invoke.texi: Document -mfunction-return= option.
25246 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25248 * config/i386/i386-opts.h (indirect_branch): New.
25249 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25250 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25251 with local indirect jump when converting indirect call and jump.
25252 (ix86_set_indirect_branch_type): New.
25253 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25254 (indirectlabelno): New.
25255 (indirect_thunk_needed): Likewise.
25256 (indirect_thunk_bnd_needed): Likewise.
25257 (indirect_thunks_used): Likewise.
25258 (indirect_thunks_bnd_used): Likewise.
25259 (INDIRECT_LABEL): Likewise.
25260 (indirect_thunk_name): Likewise.
25261 (output_indirect_thunk): Likewise.
25262 (output_indirect_thunk_function): Likewise.
25263 (ix86_output_indirect_branch_via_reg): Likewise.
25264 (ix86_output_indirect_branch_via_push): Likewise.
25265 (ix86_output_indirect_branch): Likewise.
25266 (ix86_output_indirect_jmp): Likewise.
25267 (ix86_code_end): Call output_indirect_thunk_function if needed.
25268 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25270 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25271 (ix86_attribute_table): Add indirect_branch.
25272 * config/i386/i386.h (machine_function): Add indirect_branch_type
25273 and has_local_indirect_jump.
25274 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25276 (tablejump): Likewise.
25277 (*indirect_jump): Use ix86_output_indirect_jmp.
25278 (*tablejump_1): Likewise.
25279 (simple_return_indirect_internal): Likewise.
25280 * config/i386/i386.opt (mindirect-branch=): New option.
25281 (indirect_branch): New.
25284 (thunk-inline): Likewise.
25285 (thunk-extern): Likewise.
25286 * doc/extend.texi: Document indirect_branch function attribute.
25287 * doc/invoke.texi: Document -mindirect-branch= option.
25289 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25292 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25294 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25296 * ipa-inline.c (want_inline_small_function_p): Return false if
25297 inlining has already failed with CIF_FINAL_ERROR.
25298 (update_caller_keys): Call want_inline_small_function_p before
25300 (update_callee_keys): Likewise.
25302 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25304 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25306 (rs6000_quadword_masked_address_p): Likewise.
25307 (quad_aligned_load_p): Likewise.
25308 (quad_aligned_store_p): Likewise.
25309 (const_load_sequence_p): Add comment to describe the outer-most loop.
25310 (mimic_memory_attributes_and_flags): New function.
25311 (rs6000_gen_stvx): Likewise.
25312 (replace_swapped_aligned_store): Likewise.
25313 (rs6000_gen_lvx): Likewise.
25314 (replace_swapped_aligned_load): Likewise.
25315 (replace_swapped_load_constant): Capitalize argument name in
25316 comment describing this function.
25317 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25318 and stores that access quad-word aligned addresses and replace
25319 with stvx or lvx instructions when appropriate.
25320 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25321 New function prototype.
25322 (rs6000_quadword_masked_address_p): Likewise.
25323 (rs6000_gen_lvx): Likewise.
25324 (rs6000_gen_stvx): Likewise.
25325 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25326 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25327 when memory address is aligned.
25328 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25329 this split to select lvx instruction when memory address is aligned.
25330 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25331 instruction when memory address is aligned.
25332 (*vsx_le_perm_load_v16qi): Likewise.
25333 (four unnamed splitters): Modify to select the stvx instruction
25334 when memory is aligned.
25336 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25338 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25339 which appears in the queue multiple times.
25341 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25342 Alan Hayward <alan.hayward@arm.com>
25343 David Sherwood <david.sherwood@arm.com>
25345 * tree-vectorizer.h (vec_lower_bound): New structure.
25346 (_loop_vec_info): Add check_nonzero and lower_bounds.
25347 (LOOP_VINFO_CHECK_NONZERO): New macro.
25348 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25349 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25350 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25351 fields. Make seg_len the distance travelled, not including the
25353 (dr_direction_indicator): Declare.
25354 (dr_zero_step_indicator): Likewise.
25355 (dr_known_forward_stride_p): Likewise.
25356 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25358 (runtime_alias_check_p): Allow runtime alias checks with
25360 (operator ==): Compare access_size and align.
25361 (prune_runtime_alias_test_list): Rework for new distinction between
25362 the access_size and seg_len.
25363 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25365 (get_segment_min_max): New function.
25366 (create_intersect_range_checks): Use it.
25367 (dr_step_indicator): New function.
25368 (dr_direction_indicator): Likewise.
25369 (dr_zero_step_indicator): Likewise.
25370 (dr_known_forward_stride_p): Likewise.
25371 * tree-loop-distribution.c (data_ref_segment_size): Return
25372 DR_STEP * (niters - 1).
25373 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25375 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25376 (vect_preserves_scalar_order_p): New function, split out from...
25377 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25378 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25379 (vect_vfa_access_size): New function.
25380 (vect_vfa_align): Likewise.
25381 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25382 (dump_lower_bound): New function.
25383 (vect_check_lower_bound): Likewise.
25384 (vect_small_gap_p): Likewise.
25385 (vectorizable_with_step_bound_p): Likewise.
25386 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25387 depencies if the vectorization factor is 1. Convert the checks
25388 for nonzero steps into checks on the bounds of DR_STEP. Try using
25389 a bunds check for variable steps if the minimum required step is
25390 relatively small. Update calls to the dr_with_seg_len
25391 constructor and to vect_compile_time_alias.
25392 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25394 (vect_loop_versioning): Call it.
25395 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25397 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25399 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25400 Alan Hayward <alan.hayward@arm.com>
25401 David Sherwood <david.sherwood@arm.com>
25403 * doc/sourcebuild.texi (vect_scatter_store): Document.
25404 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25406 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25408 * genopinit.c (main): Add supports_vec_scatter_store and
25409 supports_vec_scatter_store_cached to target_optabs.
25410 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25411 IFN_MASK_SCATTER_STORE.
25412 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25414 * internal-fn.h (internal_store_fn_p): Declare.
25415 (internal_fn_stored_value_index): Likewise.
25416 * internal-fn.c (scatter_store_direct): New macro.
25417 (expand_scatter_store_optab_fn): New function.
25418 (direct_scatter_store_optab_supported_p): New macro.
25419 (internal_store_fn_p): New function.
25420 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25421 IFN_MASK_SCATTER_STORE.
25422 (internal_fn_mask_index): Likewise.
25423 (internal_fn_stored_value_index): New function.
25424 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25425 for scatter stores.
25426 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25427 * optabs-query.c (supports_vec_scatter_store_p): New function.
25428 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25429 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25430 true for scatter stores.
25431 (vect_gather_scatter_fn_p): Handle scatter stores too.
25432 (vect_check_gather_scatter): Consider using scatter stores if
25433 supports_vec_scatter_store_p.
25434 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25435 scatter stores too.
25436 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25437 internal_fn_stored_value_index.
25438 (check_load_store_masking): Handle scatter stores too.
25439 (vect_get_store_rhs): Make public.
25440 (vectorizable_call): Use internal_store_fn_p.
25441 (vectorizable_store): Handle scatter store internal functions.
25442 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25443 when deciding whether the end of the group has been reached.
25444 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25445 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25446 (mask_scatter_store<mode>): New insns.
25448 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25449 Alan Hayward <alan.hayward@arm.com>
25450 David Sherwood <david.sherwood@arm.com>
25452 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25453 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25454 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25456 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25457 Use vect_truncate_gather_scatter_offset if we can't treat the
25458 operation as a normal gather load or scatter store.
25459 (get_group_load_store_type): Take the gather_scatter_info
25460 as argument. Try using a gather load or scatter store for
25461 single-element groups.
25462 (get_load_store_type): Update calls to get_group_load_store_type
25463 and vect_use_strided_gather_scatters_p.
25465 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25466 Alan Hayward <alan.hayward@arm.com>
25467 David Sherwood <david.sherwood@arm.com>
25469 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25470 optional tree argument.
25471 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25473 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25474 but continue to use the current value as a fallback.
25475 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25476 to compare the updates.
25477 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25478 (get_load_store_type): Use it when handling a strided access.
25479 (vect_get_strided_load_store_ops): New function.
25480 (vect_get_data_ptr_increment): Likewise.
25481 (vectorizable_load): Handle strided gather loads. Always pass
25482 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25484 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25485 Alan Hayward <alan.hayward@arm.com>
25486 David Sherwood <david.sherwood@arm.com>
25488 * doc/md.texi (gather_load@var{m}): Document.
25489 (mask_gather_load@var{m}): Likewise.
25490 * genopinit.c (main): Add supports_vec_gather_load and
25491 supports_vec_gather_load_cached to target_optabs.
25492 * optabs-tree.c (init_tree_optimization_optabs): Use
25493 ggc_cleared_alloc to allocate target_optabs.
25494 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25495 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25497 * internal-fn.h (internal_load_fn_p): Declare.
25498 (internal_gather_scatter_fn_p): Likewise.
25499 (internal_fn_mask_index): Likewise.
25500 (internal_gather_scatter_fn_supported_p): Likewise.
25501 * internal-fn.c (gather_load_direct): New macro.
25502 (expand_gather_load_optab_fn): New function.
25503 (direct_gather_load_optab_supported_p): New macro.
25504 (direct_internal_fn_optab): New function.
25505 (internal_load_fn_p): Likewise.
25506 (internal_gather_scatter_fn_p): Likewise.
25507 (internal_fn_mask_index): Likewise.
25508 (internal_gather_scatter_fn_supported_p): Likewise.
25509 * optabs-query.c (supports_at_least_one_mode_p): New function.
25510 (supports_vec_gather_load_p): Likewise.
25511 * optabs-query.h (supports_vec_gather_load_p): Declare.
25512 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25513 and memory_type field.
25514 (NUM_PATTERNS): Bump to 15.
25515 * tree-vect-data-refs.c: Include internal-fn.h.
25516 (vect_gather_scatter_fn_p): New function.
25517 (vect_describe_gather_scatter_call): Likewise.
25518 (vect_check_gather_scatter): Try using internal functions for
25519 gather loads. Recognize existing calls to a gather load function.
25520 (vect_analyze_data_refs): Consider using gather loads if
25521 supports_vec_gather_load_p.
25522 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25523 (vect_get_gather_scatter_offset_type): Likewise.
25524 (vect_convert_mask_for_vectype): Likewise.
25525 (vect_add_conversion_to_patterm): Likewise.
25526 (vect_try_gather_scatter_pattern): Likewise.
25527 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25528 (vect_vect_recog_func_ptrs): Add it.
25529 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25530 internal_fn_mask_index and internal_gather_scatter_fn_p.
25531 (check_load_store_masking): Take the gather_scatter_info as an
25532 argument and handle gather loads.
25533 (vect_get_gather_scatter_ops): New function.
25534 (vectorizable_call): Check internal_load_fn_p.
25535 (vectorizable_load): Likewise. Handle gather load internal
25537 (vectorizable_store): Update call to check_load_store_masking.
25538 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25539 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25540 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25541 (aarch64_gather_scale_operand_d): New predicates.
25542 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25543 (mask_gather_load<mode>): New insns.
25545 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25546 Alan Hayward <alan.hayward@arm.com>
25547 David Sherwood <david.sherwood@arm.com>
25549 * optabs.def (fold_left_plus_optab): New optab.
25550 * doc/md.texi (fold_left_plus_@var{m}): Document.
25551 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25552 * internal-fn.c (fold_left_direct): Define.
25553 (expand_fold_left_optab_fn): Likewise.
25554 (direct_fold_left_optab_supported_p): Likewise.
25555 * fold-const-call.c (fold_const_fold_left): New function.
25556 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25557 * tree-parloops.c (valid_reduction_p): New function.
25558 (gather_scalar_reductions): Use it.
25559 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25560 (vect_finish_replace_stmt): Declare.
25561 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25562 (needs_fold_left_reduction_p): New function, split out from...
25563 (vect_is_simple_reduction): ...here. Accept reductions that
25564 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25565 (vect_force_simple_reduction): Also store the reduction type in
25566 the assignment's STMT_VINFO_REDUC_TYPE.
25567 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25568 (merge_with_identity): New function.
25569 (vect_expand_fold_left): Likewise.
25570 (vectorize_fold_left_reduction): Likewise.
25571 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25572 scalar phi in place for it. Check for target support and reject
25573 cases that would reassociate the operation. Defer the transform
25574 phase to vectorize_fold_left_reduction.
25575 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25576 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25577 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25581 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25582 call to ifc_temp_var.
25584 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25585 Alan Hayward <alan.hayward@arm.com>
25586 David Sherwood <david.sherwood@arm.com>
25588 * target.def (legitimize_address_displacement): Take the original
25589 offset as a poly_int.
25590 * targhooks.h (default_legitimize_address_displacement): Update
25592 * targhooks.c (default_legitimize_address_displacement): Likewise.
25593 * doc/tm.texi: Regenerate.
25594 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25595 as an argument, moving assert of ad->disp == ad->disp_term to...
25596 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25597 Try calling targetm.legitimize_address_displacement before expanding
25598 the address rather than afterwards, and adjust for the new interface.
25599 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25600 Match the new hook interface. Handle SVE addresses.
25601 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25602 new hook interface.
25604 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25606 * Makefile.in (OBJS): Add early-remat.o.
25607 * target.def (select_early_remat_modes): New hook.
25608 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25609 * doc/tm.texi: Regenerate.
25610 * targhooks.h (default_select_early_remat_modes): Declare.
25611 * targhooks.c (default_select_early_remat_modes): New function.
25612 * timevar.def (TV_EARLY_REMAT): New timevar.
25613 * passes.def (pass_early_remat): New pass.
25614 * tree-pass.h (make_pass_early_remat): Declare.
25615 * early-remat.c: New file.
25616 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25618 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25621 Alan Hayward <alan.hayward@arm.com>
25622 David Sherwood <david.sherwood@arm.com>
25624 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25625 vfm1 with a bound_epilog parameter.
25626 (vect_do_peeling): Update calls accordingly, and move the prologue
25627 call earlier in the function. Treat the base bound_epilog as 0 for
25628 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25629 this base when peeling for gaps.
25630 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25631 with fully-masked loops.
25632 (vect_estimate_min_profitable_iters): Handle the single peeled
25633 iteration in that case.
25635 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25636 Alan Hayward <alan.hayward@arm.com>
25637 David Sherwood <david.sherwood@arm.com>
25639 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25640 single-element interleaving even if the size is not a power of 2.
25641 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25642 accesses for single-element interleaving if the group size is
25645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25646 Alan Hayward <alan.hayward@arm.com>
25647 David Sherwood <david.sherwood@arm.com>
25649 * doc/md.texi (fold_extract_last_@var{m}): Document.
25650 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25651 * optabs.def (fold_extract_last_optab): New optab.
25652 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25653 * internal-fn.c (fold_extract_direct): New macro.
25654 (expand_fold_extract_optab_fn): Likewise.
25655 (direct_fold_extract_optab_supported_p): Likewise.
25656 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25657 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25658 EXTRACT_LAST_REDUCTION.
25659 (get_initial_def_for_reduction): Do not create an initial vector
25660 for EXTRACT_LAST_REDUCTION reductions.
25661 (vectorizable_reduction): Leave the scalar phi in place for
25662 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25663 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25664 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25665 transform phase to vectorizable_condition.
25666 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25668 (vect_finish_stmt_generation): ...here.
25669 (vect_finish_replace_stmt): New function.
25670 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25671 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25673 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25675 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25676 Alan Hayward <alan.hayward@arm.com>
25677 David Sherwood <david.sherwood@arm.com>
25679 * doc/md.texi (extract_last_@var{m}): Document.
25680 * optabs.def (extract_last_optab): New optab.
25681 * internal-fn.def (EXTRACT_LAST): New internal function.
25682 * internal-fn.c (cond_unary_direct): New macro.
25683 (expand_cond_unary_optab_fn): Likewise.
25684 (direct_cond_unary_optab_supported_p): Likewise.
25685 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25686 loops using EXTRACT_LAST.
25687 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25688 (extract_last_<mode>): ...this optab.
25689 (vec_extract<mode><Vel>): Update accordingly.
25691 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25692 Alan Hayward <alan.hayward@arm.com>
25693 David Sherwood <david.sherwood@arm.com>
25695 * target.def (empty_mask_is_expensive): New hook.
25696 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25697 * doc/tm.texi: Regenerate.
25698 * targhooks.h (default_empty_mask_is_expensive): Declare.
25699 * targhooks.c (default_empty_mask_is_expensive): New function.
25700 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25701 if the target says that empty masks are expensive.
25702 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25704 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25707 Alan Hayward <alan.hayward@arm.com>
25708 David Sherwood <david.sherwood@arm.com>
25710 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25711 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25712 (vect_use_loop_mask_for_alignment_p): New function.
25713 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25714 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25715 niters_skip argument. Make sure that the first niters_skip elements
25716 of the first iteration are inactive.
25717 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25718 Update call to vect_set_loop_masks_directly.
25719 (get_misalign_in_elems): New function, split out from...
25720 (vect_gen_prolog_loop_niters): ...here.
25721 (vect_update_init_of_dr): Take a code argument that specifies whether
25722 the adjustment should be added or subtracted.
25723 (vect_update_init_of_drs): Likewise.
25724 (vect_prepare_for_masked_peels): New function.
25725 (vect_do_peeling): Skip prologue peeling if we're using a mask
25726 instead. Update call to vect_update_inits_of_drs.
25727 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25729 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25730 alignment. Do not include the number of peeled iterations in
25731 the minimum threshold in that case.
25732 (vectorizable_induction): Adjust the start value down by
25733 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25734 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25735 Take the number of skipped iterations into account when calculating
25737 * tree-vect-stmts.c (vect_gen_while_not): New function.
25739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25740 Alan Hayward <alan.hayward@arm.com>
25741 David Sherwood <david.sherwood@arm.com>
25743 * doc/sourcebuild.texi (vect_fully_masked): Document.
25744 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25745 default value to 0.
25746 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25748 (vect_analyze_loop_2): ...here. Don't check the vectorization
25749 factor against the number of loop iterations if the loop is
25752 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25753 Alan Hayward <alan.hayward@arm.com>
25754 David Sherwood <david.sherwood@arm.com>
25756 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25757 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25758 (dump_groups): Update accordingly.
25759 (iv_use::mem_type): New member variable.
25760 (address_p): New function.
25761 (record_use): Add a mem_type argument and initialize the new
25763 (record_group_use): Add a mem_type argument. Use address_p.
25764 Remove obsolete null checks of base_object. Update call to record_use.
25765 (find_interesting_uses_op): Update call to record_group_use.
25766 (find_interesting_uses_cond): Likewise.
25767 (find_interesting_uses_address): Likewise.
25768 (get_mem_type_for_internal_fn): New function.
25769 (find_address_like_use): Likewise.
25770 (find_interesting_uses_stmt): Try find_address_like_use before
25771 calling find_interesting_uses_op.
25772 (addr_offset_valid_p): Use the iv mem_type field as the type
25773 of the addressed memory.
25774 (add_autoinc_candidates): Likewise.
25775 (get_address_cost): Likewise.
25776 (split_small_address_groups_p): Use address_p.
25777 (split_address_groups): Likewise.
25778 (add_iv_candidate_for_use): Likewise.
25779 (autoinc_possible_for_pair): Likewise.
25780 (rewrite_groups): Likewise.
25781 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25782 (determine_group_iv_cost): Update after split of USE_ADDRESS.
25783 (get_alias_ptr_type_for_ptr_address): New function.
25784 (rewrite_use_address): Rewrite address uses in calls that were
25785 identified by find_address_like_use.
25787 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25788 Alan Hayward <alan.hayward@arm.com>
25789 David Sherwood <david.sherwood@arm.com>
25791 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25793 * gimple-expr.h (is_gimple_addressable: Likewise.
25794 * gimple-expr.c (is_gimple_address): Likewise.
25795 * internal-fn.c (expand_call_mem_ref): New function.
25796 (expand_mask_load_optab_fn): Use it.
25797 (expand_mask_store_optab_fn): Likewise.
25799 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25800 Alan Hayward <alan.hayward@arm.com>
25801 David Sherwood <david.sherwood@arm.com>
25803 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25804 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25805 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25806 (cond_umax@var{mode}): Document.
25807 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25808 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25809 (cond_umin_optab, cond_umax_optab): New optabs.
25810 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25811 (COND_IOR, COND_XOR): New internal functions.
25812 * internal-fn.h (get_conditional_internal_fn): Declare.
25813 * internal-fn.c (cond_binary_direct): New macro.
25814 (expand_cond_binary_optab_fn): Likewise.
25815 (direct_cond_binary_optab_supported_p): Likewise.
25816 (get_conditional_internal_fn): New function.
25817 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25818 Cope with reduction statements that are vectorized as calls rather
25820 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25821 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25822 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25823 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25824 (UNSPEC_COND_EOR): New unspecs.
25825 (optab): Add mappings for them.
25826 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25827 (sve_int_op, sve_fp_op): New int attributes.
25829 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25830 Alan Hayward <alan.hayward@arm.com>
25831 David Sherwood <david.sherwood@arm.com>
25833 * optabs.def (while_ult_optab): New optab.
25834 * doc/md.texi (while_ult@var{m}@var{n}): Document.
25835 * internal-fn.def (WHILE_ULT): New internal function.
25836 * internal-fn.h (direct_internal_fn_supported_p): New override
25837 that takes two types as argument.
25838 * internal-fn.c (while_direct): New macro.
25839 (expand_while_optab_fn): New function.
25840 (convert_optab_supported_p): Likewise.
25841 (direct_while_optab_supported_p): New macro.
25842 * wide-int.h (wi::udiv_ceil): New function.
25843 * tree-vectorizer.h (rgroup_masks): New structure.
25844 (vec_loop_masks): New typedef.
25845 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25846 and fully_masked_p.
25847 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25848 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25849 (vect_max_vf): New function.
25850 (slpeel_make_loop_iterate_ntimes): Delete.
25851 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25852 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25853 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25854 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25855 internal-fn.h, stor-layout.h and optabs-query.h.
25856 (vect_set_loop_mask): New function.
25857 (add_preheader_seq): Likewise.
25858 (add_header_seq): Likewise.
25859 (interleave_supported_p): Likewise.
25860 (vect_maybe_permute_loop_masks): Likewise.
25861 (vect_set_loop_masks_directly): Likewise.
25862 (vect_set_loop_condition_masked): Likewise.
25863 (vect_set_loop_condition_unmasked): New function, split out from
25864 slpeel_make_loop_iterate_ntimes.
25865 (slpeel_make_loop_iterate_ntimes): Rename to..
25866 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
25867 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25868 (vect_do_peeling): Update call accordingly.
25869 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25871 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25872 mask_compare_type, can_fully_mask_p and fully_masked_p.
25873 (release_vec_loop_masks): New function.
25874 (_loop_vec_info): Use it to free the loop masks.
25875 (can_produce_all_loop_masks_p): New function.
25876 (vect_get_max_nscalars_per_iter): Likewise.
25877 (vect_verify_full_masking): Likewise.
25878 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25879 retries, and free the mask rgroups before retrying. Check loop-wide
25880 reasons for disallowing fully-masked loops. Make the final decision
25881 about whether use a fully-masked loop or not.
25882 (vect_estimate_min_profitable_iters): Do not assume that peeling
25883 for the number of iterations will be needed for fully-masked loops.
25884 (vectorizable_reduction): Disable fully-masked loops.
25885 (vectorizable_live_operation): Likewise.
25886 (vect_halve_mask_nunits): New function.
25887 (vect_double_mask_nunits): Likewise.
25888 (vect_record_loop_mask): Likewise.
25889 (vect_get_loop_mask): Likewise.
25890 (vect_transform_loop): Handle the case in which the final loop
25891 iteration might handle a partial vector. Call vect_set_loop_condition
25892 instead of slpeel_make_loop_iterate_ntimes.
25893 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25894 (check_load_store_masking): New function.
25895 (prepare_load_store_mask): Likewise.
25896 (vectorizable_store): Handle fully-masked loops.
25897 (vectorizable_load): Likewise.
25898 (supportable_widening_operation): Use vect_halve_mask_nunits for
25900 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25901 (vect_gen_while): New function.
25902 * config/aarch64/aarch64.md (umax<mode>3): New expander.
25903 (aarch64_uqdec<mode>): New insn.
25905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25906 Alan Hayward <alan.hayward@arm.com>
25907 David Sherwood <david.sherwood@arm.com>
25909 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25910 (reduc_xor_scal_optab): New optabs.
25911 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25912 (reduc_xor_scal_@var{m}): Document.
25913 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25914 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25915 internal functions.
25916 * fold-const-call.c (fold_const_call): Handle them.
25917 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25918 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25919 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25920 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25921 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25922 (UNSPEC_XORV): New unspecs.
25923 (optab): Add entries for them.
25924 (BITWISEV): New int iterator.
25925 (bit_reduc_op): New int attributes.
25927 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25928 Alan Hayward <alan.hayward@arm.com>
25929 David Sherwood <david.sherwood@arm.com>
25931 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25932 * internal-fn.def (VEC_SHL_INSERT): New internal function.
25933 * optabs.def (vec_shl_insert_optab): New optab.
25934 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25935 (duplicate_and_interleave): Likewise.
25936 * tree-vect-loop.c: Include internal-fn.h.
25937 (neutral_op_for_slp_reduction): New function, split out from
25938 get_initial_defs_for_reduction.
25939 (get_initial_def_for_reduction): Handle option 2 for variable-length
25940 vectors by loading the neutral value into a vector and then shifting
25941 the initial value into element 0.
25942 (get_initial_defs_for_reduction): Replace the code argument with
25943 the neutral value calculated by neutral_op_for_slp_reduction.
25944 Use gimple_build_vector for constant-length vectors.
25945 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25946 but the first group_size elements have a neutral value.
25947 Use duplicate_and_interleave otherwise.
25948 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25949 Update call to get_initial_defs_for_reduction. Handle SLP
25950 reductions for variable-length vectors by creating one vector
25951 result for each scalar result, with the elements associated
25952 with other scalar results stubbed out with the neutral value.
25953 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25954 Require IFN_VEC_SHL_INSERT for double reductions on
25955 variable-length vectors, or SLP reductions that have
25956 a neutral value. Require can_duplicate_and_interleave_p
25957 support for variable-length unchained SLP reductions if there
25958 is no neutral value, such as for MIN/MAX reductions. Also require
25959 the number of vector elements to be a multiple of the number of
25960 SLP statements when doing variable-length unchained SLP reductions.
25961 Update call to vect_create_epilog_for_reduction.
25962 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25963 and remove initial values.
25964 (duplicate_and_interleave): Make public.
25965 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25966 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25968 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25969 Alan Hayward <alan.hayward@arm.com>
25970 David Sherwood <david.sherwood@arm.com>
25972 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25973 (can_duplicate_and_interleave_p): New function.
25974 (vect_get_and_check_slp_defs): Take the vector of statements
25975 rather than just the current one. Remove excess parentheses.
25976 Restriction rejectinon of vect_constant_def and vect_external_def
25977 for variable-length vectors to boolean types, or types for which
25978 can_duplicate_and_interleave_p is false.
25979 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25980 (duplicate_and_interleave): New function.
25981 (vect_get_constant_vectors): Use gimple_build_vector for
25982 constant-length vectors and suitable variable-length constant
25983 vectors. Use duplicate_and_interleave for other variable-length
25984 vectors. Don't defer the update when inserting new statements.
25986 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25987 Alan Hayward <alan.hayward@arm.com>
25988 David Sherwood <david.sherwood@arm.com>
25990 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25991 min_profitable_iters doesn't go negative.
25993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25994 Alan Hayward <alan.hayward@arm.com>
25995 David Sherwood <david.sherwood@arm.com>
25997 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25998 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25999 * optabs.def (vec_mask_load_lanes_optab): New optab.
26000 (vec_mask_store_lanes_optab): Likewise.
26001 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26002 (MASK_STORE_LANES): Likewise.
26003 * internal-fn.c (mask_load_lanes_direct): New macro.
26004 (mask_store_lanes_direct): Likewise.
26005 (expand_mask_load_optab_fn): Handle masked operations.
26006 (expand_mask_load_lanes_optab_fn): New macro.
26007 (expand_mask_store_optab_fn): Handle masked operations.
26008 (expand_mask_store_lanes_optab_fn): New macro.
26009 (direct_mask_load_lanes_optab_supported_p): Likewise.
26010 (direct_mask_store_lanes_optab_supported_p): Likewise.
26011 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26013 (vect_load_lanes_supported): Likewise.
26014 * tree-vect-data-refs.c (strip_conversion): New function.
26015 (can_group_stmts_p): Likewise.
26016 (vect_analyze_data_ref_accesses): Use it instead of checking
26017 for a pair of assignments.
26018 (vect_store_lanes_supported): Take a masked_p parameter.
26019 (vect_load_lanes_supported): Likewise.
26020 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26021 vect_store_lanes_supported and vect_load_lanes_supported.
26022 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26023 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26024 parameter. Don't allow gaps for masked accesses.
26025 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26026 and vect_load_lanes_supported.
26027 (get_load_store_type): Take a masked_p parameter and update
26028 call to get_group_load_store_type.
26029 (vectorizable_store): Update call to get_load_store_type.
26030 Handle IFN_MASK_STORE_LANES.
26031 (vectorizable_load): Update call to get_load_store_type.
26032 Handle IFN_MASK_LOAD_LANES.
26034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26035 Alan Hayward <alan.hayward@arm.com>
26036 David Sherwood <david.sherwood@arm.com>
26038 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26040 * config/aarch64/aarch64-protos.h
26041 (aarch64_sve_struct_memory_operand_p): Declare.
26042 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26043 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26044 (VPRED, vpred): Handle SVE structure modes.
26045 * config/aarch64/constraints.md (Utx): New constraint.
26046 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26047 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26048 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26049 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26050 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26051 structure modes. Split into pieces after RA.
26052 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26053 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26055 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26056 SVE structure modes.
26057 (aarch64_classify_address): Likewise.
26058 (sizetochar): Move earlier in file.
26059 (aarch64_print_operand): Handle SVE register lists.
26060 (aarch64_array_mode): New function.
26061 (aarch64_sve_struct_memory_operand_p): Likewise.
26062 (TARGET_ARRAY_MODE): Redefine.
26064 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26065 Alan Hayward <alan.hayward@arm.com>
26066 David Sherwood <david.sherwood@arm.com>
26068 * target.def (array_mode): New target hook.
26069 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26070 * doc/tm.texi: Regenerate.
26071 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26072 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26073 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26074 targetm.array_mode.
26075 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26078 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26079 Alan Hayward <alan.hayward@arm.com>
26080 David Sherwood <david.sherwood@arm.com>
26082 * fold-const.c (fold_binary_loc): Check the argument types
26083 rather than the result type when testing for a vector operation.
26085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26087 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26088 * doc/tm.texi: Regenerate.
26090 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26091 Alan Hayward <alan.hayward@arm.com>
26092 David Sherwood <david.sherwood@arm.com>
26094 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26095 (sve): Document new AArch64 extension.
26096 * doc/md.texi (w): Extend the description of the AArch64
26097 constraint to include SVE vectors.
26098 (Upl, Upa): Document new AArch64 predicate constraints.
26099 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26101 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26102 (msve-vector-bits=): New option.
26103 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26104 SVE when these are disabled.
26105 (sve): New extension.
26106 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26107 modes. Adjust their number of units based on aarch64_sve_vg.
26108 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26109 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26110 aarch64_addr_query_type.
26111 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26112 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26113 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26114 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26115 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26116 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26117 (aarch64_simd_imm_zero_p): Delete.
26118 (aarch64_check_zero_based_sve_index_immediate): Declare.
26119 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26120 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26121 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26122 (aarch64_sve_float_mul_immediate_p): Likewise.
26123 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26124 rather than an rtx.
26125 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26126 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26127 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26128 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26129 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26130 (aarch64_regmode_natural_size): Likewise.
26131 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26132 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26134 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26135 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26136 for VG and the SVE predicate registers.
26137 (V_ALIASES): Add a "z"-prefixed alias.
26138 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26139 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26140 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26141 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26142 (REG_CLASS_NAMES): Add entries for them.
26143 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26144 and the predicate registers.
26145 (aarch64_sve_vg): Declare.
26146 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26147 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26148 (REGMODE_NATURAL_SIZE): Define.
26149 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26151 * config/aarch64/aarch64.c: Include cfgrtl.h.
26152 (simd_immediate_info): Add a constructor for series vectors,
26153 and an associated step field.
26154 (aarch64_sve_vg): New variable.
26155 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26156 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26157 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26158 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26159 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26160 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26161 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26162 (aarch64_get_mask_mode): New functions.
26163 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26164 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26165 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26166 predicate modes and predicate registers. Explicitly restrict
26167 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26168 to store a vector mode if it is recognized by
26169 aarch64_classify_vector_mode.
26170 (aarch64_regmode_natural_size): New function.
26171 (aarch64_hard_regno_caller_save_mode): Return the original mode
26173 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26174 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26175 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26176 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26178 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26179 does not overlap dest if the function is frame-related. Handle
26181 (aarch64_split_add_offset): New function.
26182 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26183 them aarch64_add_offset.
26184 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26185 and update call to aarch64_sub_sp.
26186 (aarch64_add_cfa_expression): New function.
26187 (aarch64_expand_prologue): Pass extra temporary registers to the
26188 functions above. Handle the case in which we need to emit new
26189 DW_CFA_expressions for registers that were originally saved
26190 relative to the stack pointer, but now have to be expressed
26191 relative to the frame pointer.
26192 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26194 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26195 IP0 and IP1 values for SVE frames.
26196 (aarch64_expand_vec_series): New function.
26197 (aarch64_expand_sve_widened_duplicate): Likewise.
26198 (aarch64_expand_sve_const_vector): Likewise.
26199 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26200 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26201 into the register, rather than emitting a SET directly.
26202 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26203 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26204 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26205 (offset_9bit_signed_scaled_p): New functions.
26206 (aarch64_replicate_bitmask_imm): New function.
26207 (aarch64_bitmask_imm): Use it.
26208 (aarch64_cannot_force_const_mem): Reject expressions involving
26209 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26210 (aarch64_classify_index): Handle SVE indices, by requiring
26211 a plain register index with a scale that matches the element size.
26212 (aarch64_classify_address): Handle SVE addresses. Assert that
26213 the mode of the address is VOIDmode or an integer mode.
26214 Update call to aarch64_classify_symbol.
26215 (aarch64_classify_symbolic_expression): Update call to
26216 aarch64_classify_symbol.
26217 (aarch64_const_vec_all_in_range_p): New function.
26218 (aarch64_print_vector_float_operand): Likewise.
26219 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26220 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26221 and the FP immediates 1.0 and 0.5.
26222 (aarch64_print_address_internal): Handle SVE addresses.
26223 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26224 (aarch64_regno_regclass): Handle predicate registers.
26225 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26227 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26228 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26229 (aarch64_convert_sve_vector_bits): New function.
26230 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26231 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26232 rather than an rtx.
26233 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26234 Handle SVE vector and predicate modes. Accept VL-based constants
26235 that need only one temporary register, and VL offsets that require
26236 no temporary registers.
26237 (aarch64_conditional_register_usage): Mark the predicate registers
26238 as fixed if SVE isn't available.
26239 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26240 Return true for SVE vector and predicate modes.
26241 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26242 rather than an unsigned int. Handle SVE modes.
26243 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26245 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26247 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26248 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26249 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26250 (aarch64_sve_float_mul_immediate_p): New functions.
26251 (aarch64_sve_valid_immediate): New function.
26252 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26253 Explicitly reject structure modes. Check for INDEX constants.
26254 Handle PTRUE and PFALSE constants.
26255 (aarch64_check_zero_based_sve_index_immediate): New function.
26256 (aarch64_simd_imm_zero_p): Delete.
26257 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26258 vector modes. Accept constants in the range of CNT[BHWD].
26259 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26260 ask for an Advanced SIMD mode.
26261 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26262 (aarch64_simd_vector_alignment): Handle SVE predicates.
26263 (aarch64_vectorize_preferred_vector_alignment): New function.
26264 (aarch64_simd_vector_alignment_reachable): Use it instead of
26266 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26267 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26269 (MAX_VECT_LEN): Delete.
26270 (expand_vec_perm_d): Add a vec_flags field.
26271 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26272 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26273 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26275 (aarch64_evpc_rev): Rename to...
26276 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26277 (aarch64_evpc_rev_global): New function.
26278 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26279 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26281 (aarch64_evpc_sve_tbl): New function.
26282 (aarch64_expand_vec_perm_const_1): Update after rename of
26283 aarch64_evpc_rev. Handle SVE permutes too, trying
26284 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26285 than aarch64_evpc_tbl.
26286 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26287 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26288 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26289 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26290 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26291 (aarch64_expand_sve_vcond): New functions.
26292 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26293 of aarch64_vector_mode_p.
26294 (aarch64_dwarf_poly_indeterminate_value): New function.
26295 (aarch64_compute_pressure_classes): Likewise.
26296 (aarch64_can_change_mode_class): Likewise.
26297 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26298 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26299 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26300 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26301 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26302 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26303 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26304 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26306 (Dn, Dl, Dr): Accept const as well as const_vector.
26307 (Dz): Likewise. Compare against CONST0_RTX.
26308 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26309 of "vector" where appropriate.
26310 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26311 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26312 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26313 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26314 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26315 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26316 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26317 (v_int_equiv): Extend to SVE modes.
26318 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26320 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26321 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26322 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26323 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26324 (SVE_COND_FP_CMP): New int iterators.
26325 (perm_hilo): Handle the new unpack unspecs.
26326 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26328 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26329 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26330 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26331 (aarch64_equality_operator, aarch64_constant_vector_operand)
26332 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26333 (aarch64_sve_nonimmediate_operand): Likewise.
26334 (aarch64_sve_general_operand): Likewise.
26335 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26336 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26337 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26338 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26339 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26340 (aarch64_sve_float_arith_immediate): Likewise.
26341 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26342 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26343 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26344 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26345 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26346 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26347 (aarch64_sve_float_arith_operand): Likewise.
26348 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26349 (aarch64_sve_float_mul_operand): Likewise.
26350 (aarch64_sve_vec_perm_operand): Likewise.
26351 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26352 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26353 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26354 as well as const_vector.
26355 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26356 in file. Use CONST0_RTX and CONSTM1_RTX.
26357 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26358 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26359 Use aarch64_simd_imm_zero.
26360 * config/aarch64/aarch64-sve.md: New file.
26361 * config/aarch64/aarch64.md: Include it.
26362 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26363 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26364 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26365 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26366 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26367 (sve): New attribute.
26368 (enabled): Disable instructions with the sve attribute unless
26370 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26371 aarch64_expand_mov_immediate.
26372 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26373 CNT[BHSD] immediates.
26374 (movti): Split CONST_POLY_INT moves into two halves.
26375 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26376 Split additions that need a temporary here if the destination
26377 is the stack pointer.
26378 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26379 (*add<mode>3_poly_1): New instruction.
26380 (set_clobber_cc): New expander.
26382 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26384 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26385 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26386 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26387 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26388 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26389 Change innermode from fixed_mode_size to machine_mode.
26390 (simplify_subreg): Update call accordingly. Handle a constant-sized
26391 subreg of a variable-length CONST_VECTOR.
26393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26394 Alan Hayward <alan.hayward@arm.com>
26395 David Sherwood <david.sherwood@arm.com>
26397 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26398 (add_offset_to_base): New function, split out from...
26399 (create_mem_ref): ...here. When handling a scale other than 1,
26400 check first whether the address is valid without the offset.
26401 Add it into the base if so, leaving the index and scale as-is.
26403 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26406 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26407 fold_for_warn before checking if arg2 is INTEGER_CST.
26409 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26411 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26412 (store_multiple_operation): Delete.
26413 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26414 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26415 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26416 guarded by TARGET_STRING.
26417 (rs6000_output_load_multiple): Delete.
26418 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26419 OPTION_MASK_STRING / TARGET_STRING handling.
26420 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26421 (const rs6000_opt_masks) <"string">: Change mask to 0.
26422 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26423 (MASK_STRING): Delete.
26424 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26426 (load_multiple): Delete.
26433 (store_multiple): Delete.
26440 (movmemsi_8reg): Delete.
26441 (corresponding unnamed define_insn): Delete.
26442 (movmemsi_6reg): Delete.
26443 (corresponding unnamed define_insn): Delete.
26444 (movmemsi_4reg): Delete.
26445 (corresponding unnamed define_insn): Delete.
26446 (movmemsi_2reg): Delete.
26447 (corresponding unnamed define_insn): Delete.
26448 (movmemsi_1reg): Delete.
26449 (corresponding unnamed define_insn): Delete.
26450 * config/rs6000/rs6000.opt (mno-string): New.
26451 (mstring): Replace by deprecation warning stub.
26452 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26454 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26456 * regrename.c (regrename_do_replace): If replacing the same
26457 reg multiple times, try to reuse last created gen_raw_REG.
26460 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26461 main to workaround a bug in GDB.
26463 2018-01-12 Tom de Vries <tom@codesourcery.com>
26466 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26468 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26470 PR rtl-optimization/80481
26471 * ira-color.c (get_cap_member): New function.
26472 (allocnos_conflict_by_live_ranges_p): Use it.
26473 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26474 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26476 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26479 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26480 (*saddl_se_1): Ditto.
26481 (*ssubsi_1): Ditto.
26482 (*ssubl_se_1): Ditto.
26484 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26486 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26487 rather than wi::to_widest for DR_INITs.
26488 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26489 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26490 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26492 (vect_analyze_group_access_1): Note that here.
26494 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26496 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26497 polynomial type sizes.
26499 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26501 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26502 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26503 (gimple_add_tmp_var): Likewise.
26505 2018-01-12 Martin Liska <mliska@suse.cz>
26507 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26508 (gimple_alloc_sizes): Likewise.
26509 (dump_gimple_statistics): Use PRIu64 in printf format.
26510 * gimple.h: Change uint64_t to int.
26512 2018-01-12 Martin Liska <mliska@suse.cz>
26514 * tree-core.h: Use uint64_t instead of int.
26515 * tree.c (tree_node_counts): Likewise.
26516 (tree_node_sizes): Likewise.
26517 (dump_tree_statistics): Use PRIu64 in printf format.
26519 2018-01-12 Martin Liska <mliska@suse.cz>
26521 * Makefile.in: As qsort_chk is implemented in vec.c, add
26522 vec.o to linkage of gencfn-macros.
26523 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26524 passing the info to record_node_allocation_statistics.
26525 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26527 * ggc-common.c (struct ggc_usage): Add operator== and use
26528 it in operator< and compare function.
26529 * mem-stats.h (struct mem_usage): Likewise.
26530 * vec.c (struct vec_usage): Remove operator< and compare
26531 function. Can be simply inherited.
26533 2018-01-12 Martin Jambor <mjambor@suse.cz>
26536 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26537 * tree-ssa-math-opts.c: Include domwalk.h.
26538 (convert_mult_to_fma_1): New function.
26539 (fma_transformation_info): New type.
26540 (fma_deferring_state): Likewise.
26541 (cancel_fma_deferring): New function.
26542 (result_of_phi): Likewise.
26543 (last_fma_candidate_feeds_initial_phi): Likewise.
26544 (convert_mult_to_fma): Added deferring logic, split actual
26545 transformation to convert_mult_to_fma_1.
26546 (math_opts_dom_walker): New type.
26547 (math_opts_dom_walker::after_dom_children): New method, body moved
26548 here from pass_optimize_widening_mul::execute, added deferring logic
26550 (pass_optimize_widening_mul::execute): Moved most of code to
26551 math_opts_dom_walker::after_dom_children.
26552 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26553 * config/i386/i386.c (ix86_option_override_internal): Added
26554 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26556 2018-01-12 Richard Biener <rguenther@suse.de>
26559 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26560 inline instance vars.
26562 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26565 * config/rx/rx.c (rx_is_restricted_memory_address):
26566 Handle SUBREG case.
26568 2018-01-12 Richard Biener <rguenther@suse.de>
26570 PR tree-optimization/80846
26571 * target.def (split_reduction): New target hook.
26572 * targhooks.c (default_split_reduction): New function.
26573 * targhooks.h (default_split_reduction): Declare.
26574 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26575 target requests first reduce vectors by combining low and high
26577 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26578 (get_vectype_for_scalar_type_and_size): Export.
26579 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26580 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26581 * doc/tm.texi: Regenerate.
26582 * config/i386/i386.c (ix86_split_reduction): Implement
26583 TARGET_VECTORIZE_SPLIT_REDUCTION.
26585 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26588 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26589 in PIC mode except for TARGET_VXWORKS_RTP.
26590 * config/sparc/sparc.c: Include cfgrtl.h.
26591 (TARGET_INIT_PIC_REG): Define.
26592 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26593 (sparc_pic_register_p): New predicate.
26594 (sparc_legitimate_address_p): Use it.
26595 (sparc_legitimize_pic_address): Likewise.
26596 (sparc_delegitimize_address): Likewise.
26597 (sparc_mode_dependent_address_p): Likewise.
26598 (gen_load_pcrel_sym): Remove 4th parameter.
26599 (load_got_register): Adjust call to above. Remove obsolete stuff.
26600 (sparc_expand_prologue): Do not call load_got_register here.
26601 (sparc_flat_expand_prologue): Likewise.
26602 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26603 (sparc_use_pseudo_pic_reg): New function.
26604 (sparc_init_pic_reg): Likewise.
26605 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26606 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26608 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26610 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26611 Add item for branch_cost.
26613 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26615 PR rtl-optimization/83565
26616 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26617 not extend the result to a larger mode for rotate operations.
26618 (num_sign_bit_copies1): Likewise.
26620 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26623 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26625 Use values-Xc.o for -pedantic.
26626 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26628 2018-01-12 Martin Liska <mliska@suse.cz>
26631 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26633 (possible_polymorphic_call_targets): Use it.
26634 (ipa_devirt): Likewise.
26636 2018-01-12 Martin Liska <mliska@suse.cz>
26638 * profile-count.h (enum profile_quality): Use 0 as invalid
26639 enum value of profile_quality.
26641 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26643 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26644 -mext-string options.
26646 2018-01-12 Richard Biener <rguenther@suse.de>
26648 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26649 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26650 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26652 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26654 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26656 * configure.ac (--with-long-double-format): Add support for the
26657 configuration option to change the default long double format on
26659 * config.gcc (powerpc*-linux*-*): Likewise.
26660 * configure: Regenerate.
26661 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26662 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26663 used without modification.
26665 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26667 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26668 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26669 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26670 MISC_BUILTIN_SPEC_BARRIER.
26671 (rs6000_init_builtins): Likewise.
26672 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26674 (speculation_barrier): New define_insn.
26675 * doc/extend.texi: Document __builtin_speculation_barrier.
26677 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26680 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26681 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26682 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26684 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26685 integral modes instead of "ss" and "sd".
26686 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26687 vectors with 32-bit and 64-bit elements.
26688 (vecdupssescalarmodesuffix): New mode attribute.
26689 (vec_dup<mode>): Use it.
26691 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26694 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26695 frame if argument is passed on stack.
26697 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26700 * ree.c (combine_reaching_defs): Optimize also
26701 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26702 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26704 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26706 PR middle-end/83189
26707 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26709 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26711 PR middle-end/83718
26712 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26713 after they are computed.
26715 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26717 PR tree-optimization/83695
26718 * gimple-loop-linterchange.cc
26719 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26720 reset cached scev information after interchange.
26721 (pass_linterchange::execute): Remove call to scev_reset_htab.
26723 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26725 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26726 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26727 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26728 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26729 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26730 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26731 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26732 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26733 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26734 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26735 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26736 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26737 (V_lane_reg): Likewise.
26738 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26740 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26741 (vfmal_lane_low<mode>_intrinsic,
26742 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26743 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26744 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26745 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26746 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26747 vfmsl_lane_high<mode>_intrinsic): New define_insns.
26749 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26751 * config/arm/arm-cpus.in (fp16fml): New feature.
26752 (ALL_SIMD): Add fp16fml.
26753 (armv8.2-a): Add fp16fml as an option.
26754 (armv8.3-a): Likewise.
26755 (armv8.4-a): Add fp16fml as part of fp16.
26756 * config/arm/arm.h (TARGET_FP16FML): Define.
26757 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26759 * config/arm/arm-modes.def (V2HF): Define.
26760 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26761 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26762 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26763 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26764 vfmsl_low, vfmsl_high): New set of builtins.
26765 * config/arm/iterators.md (PLUSMINUS): New code iterator.
26766 (vfml_op): New code attribute.
26767 (VFMLHALVES): New int iterator.
26768 (VFML, VFMLSEL): New mode attributes.
26769 (V_reg): Define mapping for V2HF.
26770 (V_hi, V_lo): New mode attributes.
26771 (VF_constraint): Likewise.
26772 (vfml_half, vfml_half_selector): New int attributes.
26773 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26775 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26776 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26778 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26779 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26780 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26781 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
26783 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26784 Document new effective target and option set.
26786 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26788 * config/arm/arm-cpus.in (armv8_4): New feature.
26789 (ARMv8_4a): New fgroup.
26790 (armv8.4-a): New arch.
26791 * config/arm/arm-tables.opt: Regenerate.
26792 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26793 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26794 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26795 Add matching rules for -march=armv8.4-a and extensions.
26796 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26798 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
26801 * config/rx/rx.md (BW): New mode attribute.
26802 (sync_lock_test_and_setsi): Add mode suffix to insn output.
26804 2018-01-11 Richard Biener <rguenther@suse.de>
26806 PR tree-optimization/83435
26807 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26808 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26809 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26811 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26812 Alan Hayward <alan.hayward@arm.com>
26813 David Sherwood <david.sherwood@arm.com>
26815 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26817 (aarch64_classify_address): Initialize it. Track polynomial offsets.
26818 (aarch64_print_address_internal): Use it to check for a zero offset.
26820 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26821 Alan Hayward <alan.hayward@arm.com>
26822 David Sherwood <david.sherwood@arm.com>
26824 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26825 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26826 Return a poly_int64 rather than a HOST_WIDE_INT.
26827 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26828 rather than a HOST_WIDE_INT.
26829 * config/aarch64/aarch64.h (aarch64_frame): Protect with
26830 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
26831 hard_fp_offset, frame_size, initial_adjust, callee_offset and
26832 final_offset from HOST_WIDE_INT to poly_int64.
26833 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26834 to_constant when getting the number of units in an Advanced SIMD
26836 (aarch64_builtin_vectorized_function): Check for a constant number
26838 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26840 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26841 attribute instead of GET_MODE_NUNITS.
26842 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26843 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26844 GET_MODE_SIZE for fixed-size registers.
26845 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26846 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26847 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26848 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26849 (aarch64_print_operand, aarch64_print_address_internal)
26850 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26851 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26852 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26853 Handle polynomial GET_MODE_SIZE.
26854 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
26855 wider than SImode without modification.
26856 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26857 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26858 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26859 passing and returning SVE modes.
26860 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26861 rather than GEN_INT.
26862 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26863 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26864 (aarch64_allocate_and_probe_stack_space): Likewise.
26865 (aarch64_layout_frame): Cope with polynomial offsets.
26866 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26867 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
26868 polynomial offsets.
26869 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26870 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26871 poly_int64 rather than a HOST_WIDE_INT.
26872 (aarch64_get_separate_components, aarch64_process_components)
26873 (aarch64_expand_prologue, aarch64_expand_epilogue)
26874 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26875 (aarch64_anchor_offset): New function, split out from...
26876 (aarch64_legitimize_address): ...here.
26877 (aarch64_builtin_vectorization_cost): Handle polynomial
26878 TYPE_VECTOR_SUBPARTS.
26879 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26881 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26882 number of elements from the PARALLEL rather than the mode.
26883 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26884 rather than GET_MODE_BITSIZE.
26885 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26886 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26887 (aarch64_expand_vec_perm_const_1): Handle polynomial
26888 d->perm.length () and d->perm elements.
26889 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
26890 Apply to_constant to d->perm elements.
26891 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26892 polynomial CONST_VECTOR_NUNITS.
26893 (aarch64_move_pointer): Take amount as a poly_int64 rather
26895 (aarch64_progress_pointer): Avoid temporary variable.
26896 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26897 the mode attribute instead of GET_MODE.
26899 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26900 Alan Hayward <alan.hayward@arm.com>
26901 David Sherwood <david.sherwood@arm.com>
26903 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26904 x exists before using it.
26905 (aarch64_add_constant_internal): Rename to...
26906 (aarch64_add_offset_1): ...this. Replace regnum with separate
26907 src and dest rtxes. Handle the case in which they're different,
26908 including when the offset is zero. Replace scratchreg with an rtx.
26909 Use 2 additions if there is no spare register into which we can
26910 move a 16-bit constant.
26911 (aarch64_add_constant): Delete.
26912 (aarch64_add_offset): Replace reg with separate src and dest
26913 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
26914 Use aarch64_add_offset_1.
26915 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26916 an rtx rather than an int. Take the delta as a poly_int64
26917 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
26918 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26919 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26920 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26921 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26922 and aarch64_add_sp.
26923 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26924 aarch64_add_constant.
26926 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26928 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26929 Use scalar_float_mode.
26931 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26933 * config/aarch64/aarch64-simd.md
26934 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26935 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26936 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26937 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26938 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26939 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26940 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26941 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26942 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26943 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26945 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26948 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26949 targ_options->x_arm_arch_string is non NULL.
26951 2018-01-11 Tamar Christina <tamar.christina@arm.com>
26953 * config/aarch64/aarch64.h
26954 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
26956 2018-01-11 Sudakshina Das <sudi.das@arm.com>
26959 * expmed.c (emit_store_flag_force): Swap if const op0
26960 and change VOIDmode to mode of op0.
26962 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26964 PR rtl-optimization/83761
26965 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26966 than bytes to mode_for_size.
26968 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26970 PR middle-end/83189
26971 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26972 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26975 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
26977 PR middle-end/83575
26978 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26979 when in layout mode.
26980 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26981 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26984 2018-01-10 Michael Collison <michael.collison@arm.com>
26986 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26987 * config/aarch64/aarch64-option-extension.def: Add
26988 AARCH64_OPT_EXTENSION of 'fp16fml'.
26989 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26990 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26991 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26992 * config/aarch64/constraints.md (Ui7): New constraint.
26993 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26994 (VFMLA_SEL_W): Ditto.
26997 (VFMLA16_LOW): New int iterator.
26998 (VFMLA16_HIGH): Ditto.
26999 (UNSPEC_FMLAL): New unspec.
27000 (UNSPEC_FMLSL): Ditto.
27001 (UNSPEC_FMLAL2): Ditto.
27002 (UNSPEC_FMLSL2): Ditto.
27003 (f16mac): New code attribute.
27004 * config/aarch64/aarch64-simd-builtins.def
27005 (aarch64_fmlal_lowv2sf): Ditto.
27006 (aarch64_fmlsl_lowv2sf): Ditto.
27007 (aarch64_fmlalq_lowv4sf): Ditto.
27008 (aarch64_fmlslq_lowv4sf): Ditto.
27009 (aarch64_fmlal_highv2sf): Ditto.
27010 (aarch64_fmlsl_highv2sf): Ditto.
27011 (aarch64_fmlalq_highv4sf): Ditto.
27012 (aarch64_fmlslq_highv4sf): Ditto.
27013 (aarch64_fmlal_lane_lowv2sf): Ditto.
27014 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27015 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27016 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27017 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27018 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27019 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27020 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27021 (aarch64_fmlal_lane_highv2sf): Ditto.
27022 (aarch64_fmlsl_lane_highv2sf): Ditto.
27023 (aarch64_fmlal_laneq_highv2sf): Ditto.
27024 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27025 (aarch64_fmlalq_lane_highv4sf): Ditto.
27026 (aarch64_fmlsl_lane_highv4sf): Ditto.
27027 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27028 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27029 * config/aarch64/aarch64-simd.md:
27030 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27031 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27032 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27033 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27034 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27035 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27036 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27037 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27038 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27039 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27040 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27041 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27042 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27043 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27044 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27045 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27046 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27047 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27048 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27049 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27050 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27051 (vfmlsl_low_u32): Ditto.
27052 (vfmlalq_low_u32): Ditto.
27053 (vfmlslq_low_u32): Ditto.
27054 (vfmlal_high_u32): Ditto.
27055 (vfmlsl_high_u32): Ditto.
27056 (vfmlalq_high_u32): Ditto.
27057 (vfmlslq_high_u32): Ditto.
27058 (vfmlal_lane_low_u32): Ditto.
27059 (vfmlsl_lane_low_u32): Ditto.
27060 (vfmlal_laneq_low_u32): Ditto.
27061 (vfmlsl_laneq_low_u32): Ditto.
27062 (vfmlalq_lane_low_u32): Ditto.
27063 (vfmlslq_lane_low_u32): Ditto.
27064 (vfmlalq_laneq_low_u32): Ditto.
27065 (vfmlslq_laneq_low_u32): Ditto.
27066 (vfmlal_lane_high_u32): Ditto.
27067 (vfmlsl_lane_high_u32): Ditto.
27068 (vfmlal_laneq_high_u32): Ditto.
27069 (vfmlsl_laneq_high_u32): Ditto.
27070 (vfmlalq_lane_high_u32): Ditto.
27071 (vfmlslq_lane_high_u32): Ditto.
27072 (vfmlalq_laneq_high_u32): Ditto.
27073 (vfmlslq_laneq_high_u32): Ditto.
27074 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27075 (AARCH64_FL_FOR_ARCH8_4): New.
27076 (AARCH64_ISA_F16FML): New ISA flag.
27077 (TARGET_F16FML): New feature flag for fp16fml.
27078 (doc/invoke.texi): Document new fp16fml option.
27080 2018-01-10 Michael Collison <michael.collison@arm.com>
27082 * config/aarch64/aarch64-builtins.c:
27083 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27084 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27085 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27086 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27087 (AARCH64_ISA_SHA3): New ISA flag.
27088 (TARGET_SHA3): New feature flag for sha3.
27089 * config/aarch64/iterators.md (sha512_op): New int attribute.
27090 (CRYPTO_SHA512): New int iterator.
27091 (UNSPEC_SHA512H): New unspec.
27092 (UNSPEC_SHA512H2): Ditto.
27093 (UNSPEC_SHA512SU0): Ditto.
27094 (UNSPEC_SHA512SU1): Ditto.
27095 * config/aarch64/aarch64-simd-builtins.def
27096 (aarch64_crypto_sha512hqv2di): New builtin.
27097 (aarch64_crypto_sha512h2qv2di): Ditto.
27098 (aarch64_crypto_sha512su0qv2di): Ditto.
27099 (aarch64_crypto_sha512su1qv2di): Ditto.
27100 (aarch64_eor3qv8hi): Ditto.
27101 (aarch64_rax1qv2di): Ditto.
27102 (aarch64_xarqv2di): Ditto.
27103 (aarch64_bcaxqv8hi): Ditto.
27104 * config/aarch64/aarch64-simd.md:
27105 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27106 (aarch64_crypto_sha512su0qv2di): Ditto.
27107 (aarch64_crypto_sha512su1qv2di): Ditto.
27108 (aarch64_eor3qv8hi): Ditto.
27109 (aarch64_rax1qv2di): Ditto.
27110 (aarch64_xarqv2di): Ditto.
27111 (aarch64_bcaxqv8hi): Ditto.
27112 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27113 (vsha512h2q_u64): Ditto.
27114 (vsha512su0q_u64): Ditto.
27115 (vsha512su1q_u64): Ditto.
27116 (veor3q_u16): Ditto.
27117 (vrax1q_u64): Ditto.
27118 (vxarq_u64): Ditto.
27119 (vbcaxq_u16): Ditto.
27120 * config/arm/types.md (crypto_sha512): New type attribute.
27121 (crypto_sha3): Ditto.
27122 (doc/invoke.texi): Document new sha3 option.
27124 2018-01-10 Michael Collison <michael.collison@arm.com>
27126 * config/aarch64/aarch64-builtins.c:
27127 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27128 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27129 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27130 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27131 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27132 (AARCH64_ISA_SM4): New ISA flag.
27133 (TARGET_SM4): New feature flag for sm4.
27134 * config/aarch64/aarch64-simd-builtins.def
27135 (aarch64_sm3ss1qv4si): Ditto.
27136 (aarch64_sm3tt1aq4si): Ditto.
27137 (aarch64_sm3tt1bq4si): Ditto.
27138 (aarch64_sm3tt2aq4si): Ditto.
27139 (aarch64_sm3tt2bq4si): Ditto.
27140 (aarch64_sm3partw1qv4si): Ditto.
27141 (aarch64_sm3partw2qv4si): Ditto.
27142 (aarch64_sm4eqv4si): Ditto.
27143 (aarch64_sm4ekeyqv4si): Ditto.
27144 * config/aarch64/aarch64-simd.md:
27145 (aarch64_sm3ss1qv4si): Ditto.
27146 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27147 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27148 (aarch64_sm4eqv4si): Ditto.
27149 (aarch64_sm4ekeyqv4si): Ditto.
27150 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27151 (sm3part_op): Ditto.
27152 (CRYPTO_SM3TT): Ditto.
27153 (CRYPTO_SM3PART): Ditto.
27154 (UNSPEC_SM3SS1): New unspec.
27155 (UNSPEC_SM3TT1A): Ditto.
27156 (UNSPEC_SM3TT1B): Ditto.
27157 (UNSPEC_SM3TT2A): Ditto.
27158 (UNSPEC_SM3TT2B): Ditto.
27159 (UNSPEC_SM3PARTW1): Ditto.
27160 (UNSPEC_SM3PARTW2): Ditto.
27161 (UNSPEC_SM4E): Ditto.
27162 (UNSPEC_SM4EKEY): Ditto.
27163 * config/aarch64/constraints.md (Ui2): New constraint.
27164 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27165 * config/arm/types.md (crypto_sm3): New type attribute.
27166 (crypto_sm4): Ditto.
27167 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27168 (vsm3tt1aq_u32): Ditto.
27169 (vsm3tt1bq_u32): Ditto.
27170 (vsm3tt2aq_u32): Ditto.
27171 (vsm3tt2bq_u32): Ditto.
27172 (vsm3partw1q_u32): Ditto.
27173 (vsm3partw2q_u32): Ditto.
27174 (vsm4eq_u32): Ditto.
27175 (vsm4ekeyq_u32): Ditto.
27176 (doc/invoke.texi): Document new sm4 option.
27178 2018-01-10 Michael Collison <michael.collison@arm.com>
27180 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27181 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27182 (AARCH64_FL_FOR_ARCH8_4): New.
27183 (AARCH64_FL_V8_4): New flag.
27184 (doc/invoke.texi): Document new armv8.4-a option.
27186 2018-01-10 Michael Collison <michael.collison@arm.com>
27188 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27189 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27190 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27191 * config/aarch64/aarch64-option-extension.def: Add
27192 AARCH64_OPT_EXTENSION of 'sha2'.
27193 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27194 (crypto): Disable sha2 and aes if crypto disabled.
27195 (crypto): Enable aes and sha2 if enabled.
27196 (simd): Disable sha2 and aes if simd disabled.
27197 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27199 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27200 (TARGET_SHA2): New feature flag for sha2.
27201 (TARGET_AES): New feature flag for aes.
27202 * config/aarch64/aarch64-simd.md:
27203 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27204 conditional on TARGET_AES.
27205 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27206 (aarch64_crypto_sha1hsi): Make pattern conditional
27208 (aarch64_crypto_sha1hv4si): Ditto.
27209 (aarch64_be_crypto_sha1hv4si): Ditto.
27210 (aarch64_crypto_sha1su1v4si): Ditto.
27211 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27212 (aarch64_crypto_sha1su0v4si): Ditto.
27213 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27214 (aarch64_crypto_sha256su0v4si): Ditto.
27215 (aarch64_crypto_sha256su1v4si): Ditto.
27216 (doc/invoke.texi): Document new aes and sha2 options.
27218 2018-01-10 Martin Sebor <msebor@redhat.com>
27220 PR tree-optimization/83781
27221 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27224 2018-01-11 Martin Sebor <msebor@gmail.com>
27225 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27227 PR tree-optimization/83501
27228 PR tree-optimization/81703
27230 * tree-ssa-strlen.c (get_string_cst): Rename...
27231 (get_string_len): ...to this. Handle global constants.
27232 (handle_char_store): Adjust.
27234 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27235 Jim Wilson <jimw@sifive.com>
27237 * config/riscv/riscv-protos.h (riscv_output_return): New.
27238 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27239 (riscv_attribute_table, riscv_output_return),
27240 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27241 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27242 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27244 (riscv_expand_prologue): Add early return for naked function.
27245 (riscv_expand_epilogue): Likewise.
27246 (riscv_function_ok_for_sibcall): Return false for naked function.
27247 (riscv_set_current_function): New.
27248 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27249 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27250 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27251 * doc/extend.texi (RISC-V Function Attributes): New.
27253 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27255 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27256 check for 128-bit long double before checking TCmode.
27257 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27258 128-bit long doubles before checking TFmode or TCmode.
27259 (FLOAT128_IBM_P): Likewise.
27261 2018-01-10 Martin Sebor <msebor@redhat.com>
27263 PR tree-optimization/83671
27264 * builtins.c (c_strlen): Unconditionally return zero for the empty
27266 Use -Warray-bounds for warnings.
27267 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27268 for non-constant array indices with COMPONENT_REF, arrays of
27269 arrays, and pointers to arrays.
27270 (gimple_fold_builtin_strlen): Determine and set length range for
27271 non-constant character arrays.
27273 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27275 PR middle-end/81897
27276 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27279 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27281 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27283 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27286 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27287 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27288 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27289 indexed_or_indirect_operand predicate.
27290 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27291 (*vsx_le_perm_load_v8hi): Likewise.
27292 (*vsx_le_perm_load_v16qi): Likewise.
27293 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27294 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27295 (*vsx_le_perm_store_v8hi): Likewise.
27296 (*vsx_le_perm_store_v16qi): Likewise.
27297 (eight unnamed splitters): Likewise.
27299 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27301 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27302 * config/rs6000/emmintrin.h: Likewise.
27303 * config/rs6000/mmintrin.h: Likewise.
27304 * config/rs6000/xmmintrin.h: Likewise.
27306 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27309 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27311 * tree.c (tree_nop_conversion): Return true for location wrapper
27313 (maybe_wrap_with_location): New function.
27314 (selftest::check_strip_nops): New function.
27315 (selftest::test_location_wrappers): New function.
27316 (selftest::tree_c_tests): Call it.
27317 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27318 (maybe_wrap_with_location): New decl.
27319 (EXPR_LOCATION_WRAPPER_P): New macro.
27320 (location_wrapper_p): New inline function.
27321 (tree_strip_any_location_wrapper): New inline function.
27323 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27326 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27327 stack_realign_offset for the largest alignment of stack slot
27329 (ix86_find_max_used_stack_alignment): New function.
27330 (ix86_finalize_stack_frame_flags): Use it. Set
27331 max_used_stack_alignment if we don't realign stack.
27332 * config/i386/i386.h (machine_function): Add
27333 max_used_stack_alignment.
27335 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27337 * config/arm/arm.opt (-mbranch-cost): New option.
27338 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27341 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27344 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27345 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27347 2018-01-10 Richard Biener <rguenther@suse.de>
27350 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27351 early out so it also covers the case where we have a non-NULL
27354 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27356 PR tree-optimization/83753
27357 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27358 for non-strided grouped accesses if the number of elements is 1.
27360 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27363 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27364 * i386.h (TARGET_USE_GATHER): Define.
27365 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27367 2018-01-10 Martin Liska <mliska@suse.cz>
27370 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27371 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27373 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27374 CLEANUP_NO_PARTITIONING is not set.
27376 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27378 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27379 for vectors, as a partial revert of r254296.
27380 * rtl.h (const_vec_p): Delete.
27381 (const_vec_duplicate_p): Don't test for vector CONSTs.
27382 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27383 * expmed.c (make_tree): Likewise.
27386 * common.md (E, F): Use CONSTANT_P instead of checking for
27388 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27389 checking for CONST_VECTOR.
27391 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27393 PR middle-end/83575
27394 * predict.c (force_edge_cold): Handle in more sane way edges
27395 with no prediction.
27397 2018-01-09 Carl Love <cel@us.ibm.com>
27399 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27401 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27402 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27403 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27404 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27405 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27406 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27407 * config/rs6000/rs6000-protos.h: Add extern defition for
27408 rs6000_generate_float2_double_code.
27409 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27411 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27412 (float2_v2df): Add define_expand.
27414 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27417 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27418 op_mode in the force_to_mode call.
27420 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27422 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27423 instead of checking each element individually.
27424 (aarch64_evpc_uzp): Likewise.
27425 (aarch64_evpc_zip): Likewise.
27426 (aarch64_evpc_ext): Likewise.
27427 (aarch64_evpc_rev): Likewise.
27428 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27429 instead of checking each element individually. Return true without
27431 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27432 whether all selected elements come from the same input, instead of
27433 checking each element individually. Remove calls to gen_rtx_REG,
27434 start_sequence and end_sequence and instead assert that no rtl is
27437 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27439 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27440 order of HIGH and CONST checks.
27442 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27444 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27445 if the destination isn't an SSA_NAME.
27447 2018-01-09 Richard Biener <rguenther@suse.de>
27449 PR tree-optimization/83668
27450 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27452 (canonicalize_loop_form): ... here, renamed from ...
27453 (canonicalize_loop_closed_ssa_form): ... this and amended to
27454 swap successor edges for loop exit blocks to make us use
27455 the RPO order we need for initial schedule generation.
27457 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27459 PR tree-optimization/64811
27460 * match.pd: When optimizing comparisons with Inf, avoid
27461 introducing or losing exceptions from comparisons with NaN.
27463 2018-01-09 Martin Liska <mliska@suse.cz>
27466 * asan.c (shadow_mem_size): Add gcc_assert.
27468 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27470 Don't save registers in main().
27473 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27474 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27475 * config/avr/avr.c (avr_set_current_function): Don't error if
27476 naked, OS_task or OS_main are specified at the same time.
27477 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27479 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27481 * common/config/avr/avr-common.c (avr_option_optimization_table):
27482 Switch on -mmain-is-OS_task for optimizing compilations.
27484 2018-01-09 Richard Biener <rguenther@suse.de>
27486 PR tree-optimization/83572
27487 * graphite.c: Include cfganal.h.
27488 (graphite_transform_loops): Connect infinite loops to exit
27489 and remove fake edges at the end.
27491 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27493 * ipa-inline.c (edge_badness): Revert accidental checkin.
27495 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27498 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27499 symbols; not inline clones.
27501 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27504 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27505 hard registers. Formatting fixes.
27507 PR preprocessor/83722
27508 * gcc.c (try_generate_repro): Pass
27509 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27510 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27513 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27514 Kito Cheng <kito.cheng@gmail.com>
27516 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27517 (riscv_leaf_function_p): Delete.
27518 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27520 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27522 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27524 (do_ifelse): New function.
27525 (do_isel): New function.
27526 (do_sub3): New function.
27527 (do_add3): New function.
27528 (do_load_mask_compare): New function.
27529 (do_overlap_load_compare): New function.
27530 (expand_compare_loop): New function.
27531 (expand_block_compare): Call expand_compare_loop() when appropriate.
27532 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27533 option description.
27534 (-mblock-compare-inline-loop-limit): New option.
27536 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27539 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27540 Reverse order of second and third operands in first alternative.
27541 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27542 of first and second elements in UNSPEC_VPERMR vector.
27543 (altivec_expand_vec_perm_le): Likewise.
27545 2018-01-08 Jeff Law <law@redhat.com>
27547 PR rtl-optimizatin/81308
27548 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27549 (process_switch): If group_case_labels makes a change, then set
27551 (pass_convert_switch::execute): If a switch is converted, then
27552 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27554 PR rtl-optimization/81308
27555 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27558 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27560 PR target/83663 - Revert r255946
27561 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27562 generation for cases where splatting a value is not useful.
27563 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27564 across a vec_duplicate and a paradoxical subreg forming a vector
27565 mode to a vec_concat.
27567 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27569 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27570 -march=armv8.3-a variants.
27571 * config/arm/t-multilib: Likewise.
27572 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27574 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27576 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27578 (cceq_ior_compare_complement): Give it a name so I can use it, and
27579 change boolean_or_operator predicate to boolean_operator so it can
27580 be used to generate a crand.
27581 (eqne): New code iterator.
27582 (bd/bd_neg): New code_attrs.
27583 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27584 a single define_insn.
27585 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27586 decrement (bdnzt/bdnzf/bdzt/bdzf).
27587 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27588 with the new names of the branch decrement patterns, and added the
27589 names of the branch decrement conditional patterns.
27591 2018-01-08 Richard Biener <rguenther@suse.de>
27593 PR tree-optimization/83563
27594 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27597 2018-01-08 Richard Biener <rguenther@suse.de>
27599 PR middle-end/83713
27600 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27602 2018-01-08 Richard Biener <rguenther@suse.de>
27604 PR tree-optimization/83685
27605 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27606 references to abnormals.
27608 2018-01-08 Richard Biener <rguenther@suse.de>
27611 * dwarf2out.c (output_indirect_strings): Handle empty
27612 skeleton_debug_str_hash.
27613 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27615 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27617 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27618 (emit_store_direct): Likewise.
27619 (arc_trampoline_adjust_address): Likewise.
27620 (arc_asm_trampoline_template): New function.
27621 (arc_initialize_trampoline): Use asm_trampoline_template.
27622 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27623 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27624 * config/arc/arc.md (flush_icache): Delete pattern.
27626 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27628 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27629 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27632 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27635 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27636 by not USED_FOR_TARGET.
27637 (make_pass_resolve_sw_modes): Likewise.
27639 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27641 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27644 2018-01-08 Richard Biener <rguenther@suse.de>
27646 PR middle-end/83580
27647 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27649 2018-01-08 Richard Biener <rguenther@suse.de>
27651 PR middle-end/83517
27652 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27654 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27656 PR middle-end/81897
27657 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27658 basic blocks with a small number of successors.
27659 (convert_control_dep_chain_into_preds): Improve handling of
27661 (dump_predicates): Split apart into...
27662 (dump_pred_chain): ...here...
27663 (dump_pred_info): ...and here.
27664 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27665 (can_chain_union_be_invalidated_p): Improve check for invalidation
27667 (uninit_uses_cannot_happen): Avoid unnecessary if
27668 convert_control_dep_chain_into_preds yielded nothing.
27670 2018-01-06 Martin Sebor <msebor@redhat.com>
27672 PR tree-optimization/83640
27673 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27674 subtracting negative offset from size.
27675 (builtin_access::overlap): Adjust offset bounds of the access to fall
27676 within the size of the object if possible.
27678 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27680 PR rtl-optimization/83699
27681 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27682 extract_bit_field_as_subreg to cases in which the extracted
27683 value is also a vector.
27685 * lra-constraints.c (process_alt_operands): Test for the equivalence
27686 substitutions when detecting a possible reload cycle.
27688 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27691 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27692 by default if flag_selective_schedling{,2}. Formatting fixes.
27694 PR rtl-optimization/83682
27695 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27696 if it has non-VECTOR_MODE element mode.
27697 (vec_duplicate_p): Likewise.
27699 PR middle-end/83694
27700 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27701 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27703 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27706 * config/i386/i386-builtin.def
27707 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27708 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27709 Require also OPTION_MASK_ISA_AVX512F in addition to
27710 OPTION_MASK_ISA_GFNI.
27711 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27712 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27713 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27714 to OPTION_MASK_ISA_GFNI.
27715 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27716 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27717 OPTION_MASK_ISA_AVX512BW.
27718 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27719 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27720 addition to OPTION_MASK_ISA_GFNI.
27721 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27722 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27723 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27724 to OPTION_MASK_ISA_GFNI.
27725 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27726 a requirement for all ISAs rather than any of them with a few
27728 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27730 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27731 bitmasks to be enabled with 3 exceptions, instead of requiring any
27732 enabled ISA with lots of exceptions.
27733 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27734 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27735 Change avx512bw in isa attribute to avx512f.
27736 * config/i386/sgxintrin.h: Add license boilerplate.
27737 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27738 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27739 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27740 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27742 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27743 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27744 temporarily sse2 rather than sse if not enabled already.
27747 * config/i386/sse.md (VI248_VLBW): Rename to ...
27748 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
27749 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27750 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27751 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27752 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27753 mode iterator instead of VI248_VLBW.
27755 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
27757 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27758 (record_modified): Skip clobbers; add debug output.
27759 (param_change_prob): Use sreal frequencies.
27761 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27763 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27764 punt for user-aligned variables.
27766 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27768 * tree-chrec.c (chrec_contains_symbols): Return true for
27771 2018-01-05 Sudakshina Das <sudi.das@arm.com>
27774 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27775 of (x|y) == x for BICS pattern.
27777 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27779 PR tree-optimization/83605
27780 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27781 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27784 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
27786 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27787 * config/epiphany/rtems.h: New file.
27789 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27790 Uros Bizjak <ubizjak@gmail.com>
27793 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27794 QIreg_operand instead of register_operand predicate.
27795 * config/i386/i386.c (ix86_rop_should_change_byte_p,
27796 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27797 comments instead of -fmitigate[-_]rop.
27799 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27802 * cgraphunit.c (symbol_table::compile): Switch to text_section
27803 before calling assembly_start debug hook.
27804 * run-rtl-passes.c (run_rtl_passes): Likewise.
27807 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27809 * tree-vrp.c (extract_range_from_binary_expr_1): Check
27810 range_int_cst_p rather than !symbolic_range_p before calling
27811 extract_range_from_multiplicative_op_1.
27813 2018-01-04 Jeff Law <law@redhat.com>
27815 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27816 redundant test in assertion.
27818 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27820 * doc/rtl.texi: Document machine_mode wrapper classes.
27822 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27824 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27825 using tree_to_uhwi.
27827 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27829 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27830 the VEC_PERM_EXPR fold to fail.
27832 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27835 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27836 to switched_sections.
27838 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27841 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27842 test for d.testing.
27844 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
27847 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27848 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27850 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27853 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27854 is BLKmode and bitpos not zero or mode change is needed.
27856 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27859 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27862 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
27865 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27866 instead of MULT rtx. Update all corresponding splitters.
27867 (*saddl_se): Ditto.
27868 (*ssub<modesuffix>): Ditto.
27869 (*ssubl_se): Ditto.
27870 (*cmp_sadd_di): Update split patterns.
27871 (*cmp_sadd_si): Ditto.
27872 (*cmp_sadd_sidi): Ditto.
27873 (*cmp_ssub_di): Ditto.
27874 (*cmp_ssub_si): Ditto.
27875 (*cmp_ssub_sidi): Ditto.
27876 * config/alpha/predicates.md (const23_operand): New predicate.
27877 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27878 Look for ASHIFT, not MULT inner operand.
27879 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27881 2018-01-04 Martin Liska <mliska@suse.cz>
27883 PR gcov-profile/83669
27884 * gcov.c (output_intermediate_file): Add version to intermediate
27886 * doc/gcov.texi: Document new field 'version' in intermediate
27887 file format. Fix location of '-k' option of gcov command.
27889 2018-01-04 Martin Liska <mliska@suse.cz>
27892 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27894 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27896 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27898 2018-01-03 Martin Sebor <msebor@redhat.com>
27900 PR tree-optimization/83655
27901 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27902 checking calls with invalid arguments.
27904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27906 * tree-vect-stmts.c (vect_get_store_rhs): New function.
27907 (vectorizable_mask_load_store): Delete.
27908 (vectorizable_call): Return false for masked loads and stores.
27909 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
27910 instead of gimple_assign_rhs1.
27911 (vectorizable_load): Handle IFN_MASK_LOAD.
27912 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27916 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27918 (vectorizable_mask_load_store): ...here.
27919 (vectorizable_load): ...and here.
27921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27923 * tree-vect-stmts.c (vect_build_all_ones_mask)
27924 (vect_build_zero_merge_argument): New functions, split out from...
27925 (vectorizable_load): ...here.
27927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27929 * tree-vect-stmts.c (vect_check_store_rhs): New function,
27931 (vectorizable_mask_load_store): ...here.
27932 (vectorizable_store): ...and here.
27934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27936 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27938 (vectorizable_mask_load_store): ...here.
27940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27942 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27943 (vect_model_store_cost): Take a vec_load_store_type instead of a
27945 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27946 (vect_model_store_cost): Take a vec_load_store_type instead of a
27948 (vectorizable_mask_load_store): Update accordingly.
27949 (vectorizable_store): Likewise.
27950 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27954 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27955 IFN_MASK_LOAD calls here rather than...
27956 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27959 Alan Hayward <alan.hayward@arm.com>
27960 David Sherwood <david.sherwood@arm.com>
27962 * expmed.c (extract_bit_field_1): For vector extracts,
27963 fall back to extract_bit_field_as_subreg if vec_extract
27966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27967 Alan Hayward <alan.hayward@arm.com>
27968 David Sherwood <david.sherwood@arm.com>
27970 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27971 they are variable or constant sized.
27972 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27973 slots for constant-sized data.
27975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27976 Alan Hayward <alan.hayward@arm.com>
27977 David Sherwood <david.sherwood@arm.com>
27979 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27980 handling COND_EXPRs with boolean comparisons, try to find a better
27981 basis for the mask type than the boolean itself.
27983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27985 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27986 is calculated and how it can be overridden.
27987 * genmodes.c (max_bitsize_mode_any_mode): New variable.
27988 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27990 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27993 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27994 Alan Hayward <alan.hayward@arm.com>
27995 David Sherwood <david.sherwood@arm.com>
27997 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27998 Remove the mode argument.
27999 (aarch64_simd_valid_immediate): Remove the mode and inverse
28001 * config/aarch64/iterators.md (bitsize): New iterator.
28002 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28003 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28004 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28005 aarch64_simd_valid_immediate.
28006 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28007 (aarch64_reg_or_bic_imm): Likewise.
28008 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28009 with an insn_type enum and msl with a modifier_type enum.
28010 Replace element_width with a scalar_mode. Change the shift
28011 to unsigned int. Add constructors for scalar_float_mode and
28012 scalar_int_mode elements.
28013 (aarch64_vect_float_const_representable_p): Delete.
28014 (aarch64_can_const_movi_rtx_p)
28015 (aarch64_simd_scalar_immediate_valid_for_move)
28016 (aarch64_simd_make_constant): Update call to
28017 aarch64_simd_valid_immediate.
28018 (aarch64_advsimd_valid_immediate_hs): New function.
28019 (aarch64_advsimd_valid_immediate): Likewise.
28020 (aarch64_simd_valid_immediate): Remove mode and inverse
28021 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28022 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28023 and aarch64_float_const_representable_p on the result.
28024 (aarch64_output_simd_mov_immediate): Remove mode argument.
28025 Update call to aarch64_simd_valid_immediate and use of
28026 simd_immediate_info.
28027 (aarch64_output_scalar_simd_mov_immediate): Update call
28030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28031 Alan Hayward <alan.hayward@arm.com>
28032 David Sherwood <david.sherwood@arm.com>
28034 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28035 (mode_nunits): Likewise CONST_MODE_NUNITS.
28036 * machmode.def (ADJUST_NUNITS): Document.
28037 * genmodes.c (mode_data::need_nunits_adj): New field.
28038 (blank_mode): Update accordingly.
28039 (adj_nunits): New variable.
28040 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28042 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28043 listed in adj_nunits.
28044 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28045 listed in adj_nunits. Don't emit case statements for such modes.
28046 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28047 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28048 nothing if adj_nunits is nonnull.
28049 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28050 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28051 (emit_mode_fbit): Update use of print_maybe_const_decl.
28052 (emit_move_size): Likewise. Treat the array as non-const
28054 (emit_mode_adjustments): Handle adj_nunits.
28056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28058 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28059 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28060 (VECTOR_MODES): Use it.
28061 (make_vector_modes): Take the prefix as an argument.
28063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28064 Alan Hayward <alan.hayward@arm.com>
28065 David Sherwood <david.sherwood@arm.com>
28067 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28068 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28069 for MODE_VECTOR_BOOL.
28070 * machmode.def (VECTOR_BOOL_MODE): Document.
28071 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28072 (make_vector_bool_mode): New function.
28073 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28075 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28076 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28078 * stor-layout.c (int_mode_for_mode): Likewise.
28079 * tree.c (build_vector_type_for_mode): Likewise.
28080 * varasm.c (output_constant_pool_2): Likewise.
28081 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28082 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28083 for MODE_VECTOR_BOOL.
28084 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28085 of mode class checks.
28086 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28087 instead of a list of mode class checks.
28088 (expand_vector_scalar_condition): Likewise.
28089 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28092 Alan Hayward <alan.hayward@arm.com>
28093 David Sherwood <david.sherwood@arm.com>
28095 * machmode.h (mode_size): Change from unsigned short to
28097 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28098 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28099 or if measurement_type is not polynomial.
28100 (fixed_size_mode::includes_p): Check for constant-sized modes.
28101 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28102 return a poly_uint16 rather than an unsigned short.
28103 (emit_mode_size): Change the type of mode_size from unsigned short
28104 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28105 (emit_mode_adjustments): Cope with polynomial vector sizes.
28106 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28108 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28110 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28111 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28112 * caller-save.c (setup_save_areas): Likewise.
28113 (replace_reg_with_saved_mem): Likewise.
28114 * calls.c (emit_library_call_value_1): Likewise.
28115 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28116 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28117 (gen_lowpart_for_combine): Likewise.
28118 * convert.c (convert_to_integer_1): Likewise.
28119 * cse.c (equiv_constant, cse_insn): Likewise.
28120 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28121 (cselib_subst_to_values): Likewise.
28122 * dce.c (word_dce_process_block): Likewise.
28123 * df-problems.c (df_word_lr_mark_ref): Likewise.
28124 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28125 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28126 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28127 (rtl_for_decl_location): Likewise.
28128 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28129 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28130 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28131 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28132 (expand_expr_real_1): Likewise.
28133 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28134 (pad_below): Likewise.
28135 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28136 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28137 * ira.c (get_subreg_tracking_sizes): Likewise.
28138 * ira-build.c (ira_create_allocno_objects): Likewise.
28139 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28140 (ira_sort_regnos_for_alter_reg): Likewise.
28141 * ira-costs.c (record_operand_costs): Likewise.
28142 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28143 (resolve_simple_move): Likewise.
28144 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28145 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28146 (lra_constraints): Likewise.
28147 (CONST_POOL_OK_P): Reject variable-sized modes.
28148 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28149 (add_pseudo_to_slot, lra_spill): Likewise.
28150 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28151 * optabs-query.c (get_best_extraction_insn): Likewise.
28152 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28153 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28154 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28155 * recog.c (offsettable_address_addr_space_p): Likewise.
28156 * regcprop.c (maybe_mode_change): Likewise.
28157 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28158 * regrename.c (build_def_use): Likewise.
28159 * regstat.c (dump_reg_info): Likewise.
28160 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28161 (find_reloads, find_reloads_subreg_address): Likewise.
28162 * reload1.c (eliminate_regs_1): Likewise.
28163 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28164 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28165 (simplify_binary_operation_1, simplify_subreg): Likewise.
28166 * targhooks.c (default_function_arg_padding): Likewise.
28167 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28168 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28169 (verify_gimple_assign_ternary): Likewise.
28170 * tree-inline.c (estimate_move_cost): Likewise.
28171 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28172 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28173 (get_address_cost_ainc): Likewise.
28174 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28175 (vect_supportable_dr_alignment): Likewise.
28176 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28177 (vectorizable_reduction): Likewise.
28178 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28179 (vectorizable_operation, vectorizable_load): Likewise.
28180 * tree.c (build_same_sized_truth_vector_type): Likewise.
28181 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28182 * var-tracking.c (emit_note_insn_var_location): Likewise.
28183 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28184 (ADDR_VEC_ALIGN): Likewise.
28186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28187 Alan Hayward <alan.hayward@arm.com>
28188 David Sherwood <david.sherwood@arm.com>
28190 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28192 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28193 or if measurement_type is polynomial.
28194 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28195 * combine.c (make_extraction): Likewise.
28196 * dse.c (find_shift_sequence): Likewise.
28197 * dwarf2out.c (mem_loc_descriptor): Likewise.
28198 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28199 (extract_bit_field, extract_low_bits): Likewise.
28200 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28201 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28202 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28203 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28204 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28205 * reload.c (find_reloads): Likewise.
28206 * reload1.c (alter_reg): Likewise.
28207 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28208 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28209 * tree-if-conv.c (predicate_mem_writes): Likewise.
28210 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28211 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28212 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28213 * valtrack.c (dead_debug_insert_temp): Likewise.
28214 * varasm.c (mergeable_constant_section): Likewise.
28215 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28218 Alan Hayward <alan.hayward@arm.com>
28219 David Sherwood <david.sherwood@arm.com>
28221 * expr.c (expand_assignment): Cope with polynomial mode sizes
28222 when assigning to a CONCAT.
28224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28225 Alan Hayward <alan.hayward@arm.com>
28226 David Sherwood <david.sherwood@arm.com>
28228 * machmode.h (mode_precision): Change from unsigned short to
28230 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28232 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28233 or if measurement_type is not polynomial.
28234 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28235 in which the mode is already known to be a scalar_int_mode.
28236 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28237 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28239 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28240 for GET_MODE_PRECISION.
28241 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28242 for GET_MODE_PRECISION.
28243 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28245 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28246 (expand_field_assignment, make_extraction): Likewise.
28247 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28248 (get_last_value): Likewise.
28249 * convert.c (convert_to_integer_1): Likewise.
28250 * cse.c (cse_insn): Likewise.
28251 * expr.c (expand_expr_real_1): Likewise.
28252 * lra-constraints.c (simplify_operand_subreg): Likewise.
28253 * optabs-query.c (can_atomic_load_p): Likewise.
28254 * optabs.c (expand_atomic_load): Likewise.
28255 (expand_atomic_store): Likewise.
28256 * ree.c (combine_reaching_defs): Likewise.
28257 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28258 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28259 * tree.h (type_has_mode_precision_p): Likewise.
28260 * ubsan.c (instrument_si_overflow): Likewise.
28262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28263 Alan Hayward <alan.hayward@arm.com>
28264 David Sherwood <david.sherwood@arm.com>
28266 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28267 polynomial numbers of units.
28268 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28269 (valid_vector_subparts_p): New function.
28270 (build_vector_type): Remove temporary shim and take the number
28271 of units as a poly_uint64 rather than an int.
28272 (build_opaque_vector_type): Take the number of units as a
28273 poly_uint64 rather than an int.
28274 * tree.c (build_vector_from_ctor): Handle polynomial
28275 TYPE_VECTOR_SUBPARTS.
28276 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28277 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28278 (build_vector_from_val): If the number of units is variable,
28279 use build_vec_duplicate_cst for constant operands and
28280 VEC_DUPLICATE_EXPR otherwise.
28281 (make_vector_type): Remove temporary is_constant ().
28282 (build_vector_type, build_opaque_vector_type): Take the number of
28283 units as a poly_uint64 rather than an int.
28284 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28286 * cfgexpand.c (expand_debug_expr): Likewise.
28287 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28288 (store_constructor, expand_expr_real_1): Likewise.
28289 (const_scalar_mask_from_tree): Likewise.
28290 * fold-const-call.c (fold_const_reduction): Likewise.
28291 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28292 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28293 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28294 (fold_relational_const): Likewise.
28295 (native_interpret_vector): Likewise. Change the size from an
28296 int to an unsigned int.
28297 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28298 TYPE_VECTOR_SUBPARTS.
28299 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28300 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28301 duplicating a non-constant operand into a variable-length vector.
28302 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28303 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28304 * ipa-icf.c (sem_variable::equals): Likewise.
28305 * match.pd: Likewise.
28306 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28307 * print-tree.c (print_node): Likewise.
28308 * stor-layout.c (layout_type): Likewise.
28309 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28310 * tree-cfg.c (verify_gimple_comparison): Likewise.
28311 (verify_gimple_assign_binary): Likewise.
28312 (verify_gimple_assign_ternary): Likewise.
28313 (verify_gimple_assign_single): Likewise.
28314 * tree-pretty-print.c (dump_generic_node): Likewise.
28315 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28316 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28317 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28318 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28319 (vect_shift_permute_load_chain): Likewise.
28320 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28321 (expand_vector_condition, optimize_vector_constructor): Likewise.
28322 (lower_vec_perm, get_compute_type): Likewise.
28323 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28324 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28325 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28326 (vect_recog_mask_conversion_pattern): Likewise.
28327 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28328 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28329 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28330 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28331 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28332 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28333 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28334 (supportable_widening_operation): Likewise.
28335 (supportable_narrowing_operation): Likewise.
28336 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28338 * varasm.c (output_constant): Likewise.
28340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28341 Alan Hayward <alan.hayward@arm.com>
28342 David Sherwood <david.sherwood@arm.com>
28344 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28345 so that both the length == 3 and length != 3 cases set up their
28346 own permute vectors. Add comments explaining why we know the
28347 number of elements is constant.
28348 (vect_permute_load_chain): Likewise.
28350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28351 Alan Hayward <alan.hayward@arm.com>
28352 David Sherwood <david.sherwood@arm.com>
28354 * machmode.h (mode_nunits): Change from unsigned char to
28356 (ONLY_FIXED_SIZE_MODES): New macro.
28357 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28358 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28359 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28361 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28362 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28363 or if measurement_type is not polynomial.
28364 * genmodes.c (ZERO_COEFFS): New macro.
28365 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28367 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28368 Use ZERO_COEFFS when emitting initializers.
28369 * data-streamer.h (bp_pack_poly_value): New function.
28370 (bp_unpack_poly_value): Likewise.
28371 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28372 for GET_MODE_NUNITS.
28373 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28374 for GET_MODE_NUNITS.
28375 * tree.c (make_vector_type): Remove temporary shim and make
28376 the real function take the number of units as a poly_uint64
28377 rather than an int.
28378 (build_vector_type_for_mode): Handle polynomial nunits.
28379 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28380 * emit-rtl.c (const_vec_series_p_1): Likewise.
28381 (gen_rtx_CONST_VECTOR): Likewise.
28382 * fold-const.c (test_vec_duplicate_folding): Likewise.
28383 * genrecog.c (validate_pattern): Likewise.
28384 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28385 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28386 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28387 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28388 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28389 * rtlanal.c (subreg_get_info): Likewise.
28390 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28391 (vect_grouped_load_supported): Likewise.
28392 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28393 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28394 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28395 (simplify_const_unary_operation, simplify_binary_operation_1)
28396 (simplify_const_binary_operation, simplify_ternary_operation)
28397 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28398 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28399 instead of CONST_VECTOR_NUNITS.
28400 * varasm.c (output_constant_pool_2): Likewise.
28401 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28402 explicit-encoded elements in the XVEC for variable-length vectors.
28404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28406 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28409 Alan Hayward <alan.hayward@arm.com>
28410 David Sherwood <david.sherwood@arm.com>
28412 * coretypes.h (fixed_size_mode): Declare.
28413 (fixed_size_mode_pod): New typedef.
28414 * builtins.h (target_builtins::x_apply_args_mode)
28415 (target_builtins::x_apply_result_mode): Change type to
28416 fixed_size_mode_pod.
28417 * builtins.c (apply_args_size, apply_result_size, result_vector)
28418 (expand_builtin_apply_args_1, expand_builtin_apply)
28419 (expand_builtin_return): Update accordingly.
28421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28423 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28424 * cselib.c (cselib_hash_rtx): Likewise.
28425 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28426 CONST_VECTOR encoding.
28428 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28429 Jeff Law <law@redhat.com>
28432 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28433 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28434 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28435 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28438 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28439 explicitly probe *sp in a noreturn function if there were any callee
28440 register saves or frame pointer is needed.
28442 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28445 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28446 BLKmode for ternary, binary or unary expressions.
28449 * var-tracking.c (delete_vta_debug_insn): New inline function.
28450 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28451 insns from get_insns () to NULL instead of each bb separately.
28452 Use delete_vta_debug_insn. No longer static.
28453 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28454 delete_vta_debug_insns callers.
28455 * rtl.h (delete_vta_debug_insns): Declare.
28456 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28457 instead of variable_tracking_main.
28459 2018-01-03 Martin Sebor <msebor@redhat.com>
28461 PR tree-optimization/83603
28462 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28463 arguments past the endof the argument list in functions declared
28464 without a prototype.
28465 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28466 Avoid checking when arguments are null.
28468 2018-01-03 Martin Sebor <msebor@redhat.com>
28471 * doc/extend.texi (attribute const): Fix a typo.
28472 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28473 issuing -Wsuggest-attribute for void functions.
28475 2018-01-03 Martin Sebor <msebor@redhat.com>
28477 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28478 offset_int::from instead of wide_int::to_shwi.
28479 (maybe_diag_overlap): Remove assertion.
28480 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28481 * gimple-ssa-sprintf.c (format_directive): Same.
28482 (parse_directive): Same.
28483 (sprintf_dom_walker::compute_format_length): Same.
28484 (try_substitute_return_value): Same.
28486 2018-01-03 Jeff Law <law@redhat.com>
28488 PR middle-end/83654
28489 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28490 non-constant residual for zero at runtime and avoid probing in
28491 that case. Reorganize code for trailing problem to mirror handling
28494 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28496 PR tree-optimization/83501
28497 * tree-ssa-strlen.c (get_string_cst): New.
28498 (handle_char_store): Call get_string_cst.
28500 2018-01-03 Martin Liska <mliska@suse.cz>
28502 PR tree-optimization/83593
28503 * tree-ssa-strlen.c: Include tree-cfg.h.
28504 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28505 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28506 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28508 (strlen_dom_walker::before_dom_children): Call
28509 gimple_purge_dead_eh_edges. Dump tranformation with details
28511 (strlen_dom_walker::before_dom_children): Update call by adding
28512 new argument cleanup_eh.
28513 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28515 2018-01-03 Martin Liska <mliska@suse.cz>
28518 * cif-code.def (VARIADIC_THUNK): New enum value.
28519 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28522 2018-01-03 Jan Beulich <jbeulich@suse.com>
28524 * sse.md (mov<mode>_internal): Tighten condition for when to use
28525 vmovdqu<ssescalarsize> for TI and OI modes.
28527 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28529 Update copyright years.
28531 2018-01-03 Martin Liska <mliska@suse.cz>
28534 * ipa-visibility.c (function_and_variable_visibility): Skip
28535 functions with noipa attribure.
28537 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28539 * gcc.c (process_command): Update copyright notice dates.
28540 * gcov-dump.c (print_version): Ditto.
28541 * gcov.c (print_version): Ditto.
28542 * gcov-tool.c (print_version): Ditto.
28543 * gengtype.c (create_file): Ditto.
28544 * doc/cpp.texi: Bump @copying's copyright year.
28545 * doc/cppinternals.texi: Ditto.
28546 * doc/gcc.texi: Ditto.
28547 * doc/gccint.texi: Ditto.
28548 * doc/gcov.texi: Ditto.
28549 * doc/install.texi: Ditto.
28550 * doc/invoke.texi: Ditto.
28552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28554 * vector-builder.h (vector_builder::m_full_nelts): Change from
28555 unsigned int to poly_uint64.
28556 (vector_builder::full_nelts): Update prototype accordingly.
28557 (vector_builder::new_vector): Likewise.
28558 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28559 (vector_builder::operator ==): Likewise.
28560 (vector_builder::finalize): Likewise.
28561 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28562 Take the number of elements as a poly_uint64 rather than an
28564 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28565 from unsigned int to poly_uint64.
28566 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28567 (vec_perm_indices::new_vector): Likewise.
28568 (vec_perm_indices::length): Likewise.
28569 (vec_perm_indices::nelts_per_input): Likewise.
28570 (vec_perm_indices::input_nelts): Likewise.
28571 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28572 number of elements per input as a poly_uint64 rather than an
28573 unsigned int. Use the original encoding for variable-length
28574 vectors, rather than clamping each individual element.
28575 For the second and subsequent elements in each pattern,
28576 clamp the step and base before clamping their sum.
28577 (vec_perm_indices::series_p): Handle polynomial element counts.
28578 (vec_perm_indices::all_in_range_p): Likewise.
28579 (vec_perm_indices_to_tree): Likewise.
28580 (vec_perm_indices_to_rtx): Likewise.
28581 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28582 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28583 (tree_vector_builder::new_binary_operation): Handle polynomial
28584 element counts. Return false if we need to know the number
28585 of elements at compile time.
28586 * fold-const.c (fold_vec_perm): Punt if the number of elements
28587 isn't known at compile time.
28589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28591 * vec-perm-indices.h (vec_perm_builder): Change element type
28592 from HOST_WIDE_INT to poly_int64.
28593 (vec_perm_indices::element_type): Update accordingly.
28594 (vec_perm_indices::clamp): Handle polynomial element_types.
28595 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28596 (vec_perm_indices::all_in_range_p): Likewise.
28597 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28599 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28600 polynomial vec_perm_indices element types.
28601 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28602 * fold-const.c (fold_vec_perm): Likewise.
28603 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28604 * tree-vect-generic.c (lower_vec_perm): Likewise.
28605 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28606 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28607 element type to HOST_WIDE_INT.
28609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28610 Alan Hayward <alan.hayward@arm.com>
28611 David Sherwood <david.sherwood@arm.com>
28613 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28614 rather than an int. Use plus_constant.
28615 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28616 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28619 Alan Hayward <alan.hayward@arm.com>
28620 David Sherwood <david.sherwood@arm.com>
28622 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28623 a HOST_WIDE_INT to a poly_int64.
28625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28626 Alan Hayward <alan.hayward@arm.com>
28627 David Sherwood <david.sherwood@arm.com>
28629 * calls.c (load_register_parameters): Cope with polynomial
28630 mode sizes. Require a constant size for BLKmode parameters
28631 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28632 forces a parameter to be padded at the lsb end in order to
28633 fill a complete number of words, require the parameter size
28634 to be ordered wrt UNITS_PER_WORD.
28636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28637 Alan Hayward <alan.hayward@arm.com>
28638 David Sherwood <david.sherwood@arm.com>
28640 * reload1.c (spill_stack_slot_width): Change element type
28641 from unsigned int to poly_uint64_pod.
28642 (alter_reg): Treat mode sizes as polynomial.
28644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28645 Alan Hayward <alan.hayward@arm.com>
28646 David Sherwood <david.sherwood@arm.com>
28648 * reload.c (complex_word_subreg_p): New function.
28649 (reload_inner_reg_of_subreg, push_reload): Use it.
28651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28652 Alan Hayward <alan.hayward@arm.com>
28653 David Sherwood <david.sherwood@arm.com>
28655 * lra-constraints.c (process_alt_operands): Reject matched
28656 operands whose sizes aren't ordered.
28657 (match_reload): Refer to this check here.
28659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28660 Alan Hayward <alan.hayward@arm.com>
28661 David Sherwood <david.sherwood@arm.com>
28663 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28664 that the mode size is in the set {1, 2, 4, 8, 16}.
28666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28667 Alan Hayward <alan.hayward@arm.com>
28668 David Sherwood <david.sherwood@arm.com>
28670 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28671 Use plus_constant instead of gen_rtx_PLUS.
28673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28674 Alan Hayward <alan.hayward@arm.com>
28675 David Sherwood <david.sherwood@arm.com>
28677 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28678 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28679 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28680 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28681 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28682 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28683 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28684 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28685 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28686 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28688 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28689 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28690 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28691 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28692 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28693 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28694 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28695 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28696 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28697 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28699 * expr.c (emit_move_resolve_push): Treat the input and result
28700 of PUSH_ROUNDING as a poly_int64.
28701 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28702 (emit_push_insn): Likewise.
28703 * lra-eliminations.c (mark_not_eliminable): Likewise.
28704 * recog.c (push_operand): Likewise.
28705 * reload1.c (elimination_effects): Likewise.
28706 * rtlanal.c (nonzero_bits1): Likewise.
28707 * calls.c (store_one_arg): Likewise. Require the padding to be
28708 known at compile time.
28710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28711 Alan Hayward <alan.hayward@arm.com>
28712 David Sherwood <david.sherwood@arm.com>
28714 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28715 Use plus_constant instead of gen_rtx_PLUS.
28717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28718 Alan Hayward <alan.hayward@arm.com>
28719 David Sherwood <david.sherwood@arm.com>
28721 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28722 rather than an int.
28724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28725 Alan Hayward <alan.hayward@arm.com>
28726 David Sherwood <david.sherwood@arm.com>
28728 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28729 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28730 via stack temporaries. Treat the mode size as polynomial too.
28732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28733 Alan Hayward <alan.hayward@arm.com>
28734 David Sherwood <david.sherwood@arm.com>
28736 * expr.c (expand_expr_real_2): When handling conversions involving
28737 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28738 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28739 as a poly_uint64 too.
28741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28742 Alan Hayward <alan.hayward@arm.com>
28743 David Sherwood <david.sherwood@arm.com>
28745 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28748 Alan Hayward <alan.hayward@arm.com>
28749 David Sherwood <david.sherwood@arm.com>
28751 * combine.c (can_change_dest_mode): Handle polynomial
28752 REGMODE_NATURAL_SIZE.
28753 * expmed.c (store_bit_field_1): Likewise.
28754 * expr.c (store_constructor): Likewise.
28755 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28756 and polynomial REGMODE_NATURAL_SIZE.
28757 (gen_lowpart_common): Likewise.
28758 * reginfo.c (record_subregs_of_mode): Likewise.
28759 * rtlanal.c (read_modify_subreg_p): Likewise.
28761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28762 Alan Hayward <alan.hayward@arm.com>
28763 David Sherwood <david.sherwood@arm.com>
28765 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28766 numbers of elements.
28768 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28769 Alan Hayward <alan.hayward@arm.com>
28770 David Sherwood <david.sherwood@arm.com>
28772 * match.pd: Cope with polynomial numbers of vector elements.
28774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28775 Alan Hayward <alan.hayward@arm.com>
28776 David Sherwood <david.sherwood@arm.com>
28778 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28779 in a POINTER_PLUS_EXPR.
28781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28782 Alan Hayward <alan.hayward@arm.com>
28783 David Sherwood <david.sherwood@arm.com>
28785 * omp-simd-clone.c (simd_clone_subparts): New function.
28786 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28787 (ipa_simd_modify_function_body): Likewise.
28789 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28790 Alan Hayward <alan.hayward@arm.com>
28791 David Sherwood <david.sherwood@arm.com>
28793 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28794 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28795 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28796 (expand_vector_condition, vector_element): Likewise.
28797 (subparts_gt): New function.
28798 (get_compute_type): Use subparts_gt.
28799 (count_type_subparts): Delete.
28800 (expand_vector_operations_1): Use subparts_gt instead of
28801 count_type_subparts.
28803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28804 Alan Hayward <alan.hayward@arm.com>
28805 David Sherwood <david.sherwood@arm.com>
28807 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28808 (vect_compile_time_alias): ...this new function. Do the calculation
28809 on poly_ints rather than trees.
28810 (vect_prune_runtime_alias_test_list): Update call accordingly.
28812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28813 Alan Hayward <alan.hayward@arm.com>
28814 David Sherwood <david.sherwood@arm.com>
28816 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28818 (vect_schedule_slp_instance): Likewise.
28820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28821 Alan Hayward <alan.hayward@arm.com>
28822 David Sherwood <david.sherwood@arm.com>
28824 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28825 constant and extern definitions for variable-length vectors.
28826 (vect_get_constant_vectors): Note that the number of units
28827 is known to be constant.
28829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28830 Alan Hayward <alan.hayward@arm.com>
28831 David Sherwood <david.sherwood@arm.com>
28833 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28834 of units as polynomial. Choose between WIDE and NARROW based
28837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28838 Alan Hayward <alan.hayward@arm.com>
28839 David Sherwood <david.sherwood@arm.com>
28841 * tree-vect-stmts.c (simd_clone_subparts): New function.
28842 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28845 Alan Hayward <alan.hayward@arm.com>
28846 David Sherwood <david.sherwood@arm.com>
28848 * tree-vect-stmts.c (vectorizable_call): Treat the number of
28849 vectors as polynomial. Use build_index_vector for
28850 IFN_GOMP_SIMD_LANE.
28852 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28853 Alan Hayward <alan.hayward@arm.com>
28854 David Sherwood <david.sherwood@arm.com>
28856 * tree-vect-stmts.c (get_load_store_type): Treat the number of
28857 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28858 for variable-length vectors.
28859 (vectorizable_mask_load_store): Treat the number of units as
28860 polynomial, asserting that it is constant if the condition has
28861 already been enforced.
28862 (vectorizable_store, vectorizable_load): Likewise.
28864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28865 Alan Hayward <alan.hayward@arm.com>
28866 David Sherwood <david.sherwood@arm.com>
28868 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28869 of units as polynomial. Punt if we can't tell at compile time
28870 which vector contains the final result.
28872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28873 Alan Hayward <alan.hayward@arm.com>
28874 David Sherwood <david.sherwood@arm.com>
28876 * tree-vect-loop.c (vectorizable_induction): Treat the number
28877 of units as polynomial. Punt on SLP inductions. Use an integer
28878 VEC_SERIES_EXPR for variable-length integer reductions. Use a
28879 cast of such a series for variable-length floating-point
28882 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28883 Alan Hayward <alan.hayward@arm.com>
28884 David Sherwood <david.sherwood@arm.com>
28886 * tree.h (build_index_vector): Declare.
28887 * tree.c (build_index_vector): New function.
28888 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28889 of units as polynomial, forcibly converting it to a constant if
28890 vectorizable_reduction has already enforced the condition.
28891 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
28892 to create a {1,2,3,...} vector.
28893 (vectorizable_reduction): Treat the number of units as polynomial.
28894 Choose vectype_in based on the largest scalar element size rather
28895 than the smallest number of units. Enforce the restrictions
28898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28899 Alan Hayward <alan.hayward@arm.com>
28900 David Sherwood <david.sherwood@arm.com>
28902 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28903 number of units as polynomial.
28905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28906 Alan Hayward <alan.hayward@arm.com>
28907 David Sherwood <david.sherwood@arm.com>
28909 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28910 * target.def (autovectorize_vector_sizes): Return the vector sizes
28911 by pointer, using vector_sizes rather than a bitmask.
28912 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28913 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28914 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28916 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28917 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28918 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28919 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28920 * omp-general.c (omp_max_vf): Likewise.
28921 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28922 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28923 * tree-vect-loop.c (vect_analyze_loop): Likewise.
28924 * tree-vect-slp.c (vect_slp_bb): Likewise.
28925 * doc/tm.texi: Regenerate.
28926 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28928 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28929 the vector size as a poly_uint64 rather than an unsigned int.
28930 (current_vector_size): Change from an unsigned int to a poly_uint64.
28931 (get_vectype_for_scalar_type): Update accordingly.
28932 * tree.h (build_truth_vector_type): Take the size and number of
28933 units as a poly_uint64 rather than an unsigned int.
28934 (build_vector_type): Add a temporary overload that takes
28935 the number of units as a poly_uint64 rather than an unsigned int.
28936 * tree.c (make_vector_type): Likewise.
28937 (build_truth_vector_type): Take the number of units as a poly_uint64
28938 rather than an unsigned int.
28940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28941 Alan Hayward <alan.hayward@arm.com>
28942 David Sherwood <david.sherwood@arm.com>
28944 * target.def (get_mask_mode): Take the number of units and length
28945 as poly_uint64s rather than unsigned ints.
28946 * targhooks.h (default_get_mask_mode): Update accordingly.
28947 * targhooks.c (default_get_mask_mode): Likewise.
28948 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28949 * doc/tm.texi: Regenerate.
28951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28952 Alan Hayward <alan.hayward@arm.com>
28953 David Sherwood <david.sherwood@arm.com>
28955 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28956 * omp-general.c (omp_max_vf): Likewise.
28957 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28958 (expand_omp_simd): Handle polynomial safelen.
28959 * omp-low.c (omplow_simd_context): Add a default constructor.
28960 (omplow_simd_context::max_vf): Change from int to poly_uint64.
28961 (lower_rec_simd_input_clauses): Update accordingly.
28962 (lower_rec_input_clauses): Likewise.
28964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28965 Alan Hayward <alan.hayward@arm.com>
28966 David Sherwood <david.sherwood@arm.com>
28968 * tree-vectorizer.h (vect_nunits_for_cost): New function.
28969 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28970 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28971 (vect_analyze_slp_cost): Likewise.
28972 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28973 (vect_model_load_cost): Likewise.
28975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28976 Alan Hayward <alan.hayward@arm.com>
28977 David Sherwood <david.sherwood@arm.com>
28979 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28980 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28981 from an unsigned int * to a poly_uint64_pod *.
28982 (calculate_unrolling_factor): New function.
28983 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
28985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28986 Alan Hayward <alan.hayward@arm.com>
28987 David Sherwood <david.sherwood@arm.com>
28989 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28990 from an unsigned int to a poly_uint64.
28991 (_loop_vec_info::slp_unrolling_factor): Likewise.
28992 (_loop_vec_info::vectorization_factor): Change from an int
28994 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28995 (vect_get_num_vectors): New function.
28996 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28997 (vect_get_num_copies): Use vect_get_num_vectors.
28998 (vect_analyze_data_ref_dependences): Change max_vf from an int *
28999 to an unsigned int *.
29000 (vect_analyze_data_refs): Change min_vf from an int * to a
29002 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29003 than an unsigned HOST_WIDE_INT.
29004 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29005 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29006 to an unsigned int *.
29007 (vect_analyze_data_ref_dependences): Likewise.
29008 (vect_compute_data_ref_alignment): Handle polynomial vf.
29009 (vect_enhance_data_refs_alignment): Likewise.
29010 (vect_prune_runtime_alias_test_list): Likewise.
29011 (vect_shift_permute_load_chain): Likewise.
29012 (vect_supportable_dr_alignment): Likewise.
29013 (dependence_distance_ge_vf): Take the vectorization factor as a
29014 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29015 (vect_analyze_data_refs): Change min_vf from an int * to a
29017 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29018 vfm1 as a poly_uint64 rather than an int. Make the same change
29019 for the returned bound_scalar.
29020 (vect_gen_vector_loop_niters): Handle polynomial vf.
29021 (vect_do_peeling): Likewise. Update call to
29022 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29023 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29025 * tree-vect-loop.c (vect_determine_vectorization_factor)
29026 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29027 (vect_get_known_peeling_cost): Likewise.
29028 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29029 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29030 (vect_transform_loop): Likewise. Use the lowest possible VF when
29031 updating the upper bounds of the loop.
29032 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29033 rather than an int.
29034 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29035 polynomial unroll factors.
29036 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29037 (vect_make_slp_decision): Likewise.
29038 (vect_supported_load_permutation_p): Likewise, and polynomial
29040 (vect_analyze_slp_cost): Handle polynomial vf.
29041 (vect_slp_analyze_node_operations): Likewise.
29042 (vect_slp_analyze_bb_1): Likewise.
29043 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29044 than an unsigned HOST_WIDE_INT.
29045 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29046 (vectorizable_load): Handle polynomial vf.
29047 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29049 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29052 Alan Hayward <alan.hayward@arm.com>
29053 David Sherwood <david.sherwood@arm.com>
29055 * match.pd: Handle bit operations involving three constants
29056 and try to fold one pair.
29058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29060 * tree-vect-loop-manip.c: Include gimple-fold.h.
29061 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29062 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29063 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29064 Add a path that uses a step of VF instead of 1, but disable it
29066 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29067 and niters_no_overflow parameters. Update calls to
29068 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29069 Create a new SSA name if the latter choses to use a ste other
29070 than zero, and return it via niters_vector_mult_vf_var.
29071 * tree-vect-loop.c (vect_transform_loop): Update calls to
29072 vect_do_peeling, vect_gen_vector_loop_niters and
29073 slpeel_make_loop_iterate_ntimes.
29074 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29075 (vect_gen_vector_loop_niters): Update declarations after above changes.
29077 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29079 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29080 128-bit round to integer instructions.
29081 (ceil<mode>2): Likewise.
29082 (btrunc<mode>2): Likewise.
29083 (round<mode>2): Likewise.
29085 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29087 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29088 unaligned VSX load/store on P8/P9.
29089 (expand_block_clear): Allow the use of unaligned VSX
29090 load/store on P8/P9.
29092 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29094 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29096 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29097 swap associated with both a load and a store.
29099 2018-01-02 Andrew Waterman <andrew@sifive.com>
29101 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29102 * config/riscv/riscv.md (clear_cache): Use it.
29104 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29106 * web.c: Remove out-of-date comment.
29108 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29110 * expr.c (fixup_args_size_notes): Check that any existing
29111 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29112 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29113 (emit_single_push_insn): ...here.
29115 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29117 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29118 (const_vector_encoded_nelts): New function.
29119 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29120 (const_vector_int_elt, const_vector_elt): Declare.
29121 * emit-rtl.c (const_vector_int_elt_1): New function.
29122 (const_vector_elt): Likewise.
29123 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29124 of CONST_VECTOR_ELT.
29126 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29128 * expr.c: Include rtx-vector-builder.h.
29129 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29130 directly on the tree encoding.
29131 (const_vector_from_tree): Likewise.
29132 * optabs.c: Include rtx-vector-builder.h.
29133 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29134 sequence of "u" values.
29135 * vec-perm-indices.c: Include rtx-vector-builder.h.
29136 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29137 directly on the vec_perm_indices encoding.
29139 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29141 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29142 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29143 * rtx-vector-builder.h: New file.
29144 * rtx-vector-builder.c: Likewise.
29145 * rtl.h (rtx_def::u2): Add a const_vector field.
29146 (CONST_VECTOR_NPATTERNS): New macro.
29147 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29148 (CONST_VECTOR_DUPLICATE_P): Likewise.
29149 (CONST_VECTOR_STEPPED_P): Likewise.
29150 (CONST_VECTOR_ENCODED_ELT): Likewise.
29151 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29152 (unwrap_const_vec_duplicate): Likewise.
29153 (const_vec_series_p): Check for a non-duplicated vector encoding.
29154 Say that the function only returns true for integer vectors.
29155 * emit-rtl.c: Include rtx-vector-builder.h.
29156 (gen_const_vec_duplicate_1): Delete.
29157 (gen_const_vector): Call gen_const_vec_duplicate instead of
29158 gen_const_vec_duplicate_1.
29159 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29160 (gen_const_vec_duplicate): Use rtx_vector_builder.
29161 (gen_const_vec_series): Likewise.
29162 (gen_rtx_CONST_VECTOR): Likewise.
29163 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29164 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29165 Build a new vector rather than modifying a CONST_VECTOR in-place.
29166 (handle_special_swappables): Update call accordingly.
29167 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29168 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29169 Build a new vector rather than modifying a CONST_VECTOR in-place.
29170 (handle_special_swappables): Update call accordingly.
29172 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29174 * simplify-rtx.c (simplify_const_binary_operation): Use
29175 CONST_VECTOR_ELT instead of XVECEXP.
29177 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29179 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29180 the selector elements to be different from the data elements
29181 if the selector is a VECTOR_CST.
29182 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29183 ssizetype for the selector.
29185 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29187 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29188 before testing each element individually.
29189 * tree-vect-generic.c (lower_vec_perm): Likewise.
29191 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29193 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29194 * selftest-run-tests.c (selftest::run_tests): Call it.
29195 * vector-builder.h (vector_builder::operator ==): New function.
29196 (vector_builder::operator !=): Likewise.
29197 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29198 (vec_perm_indices::all_from_input_p): New function.
29199 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29200 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29201 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29202 instead of reading the VECTOR_CST directly. Detect whether both
29203 vector inputs are the same before constructing the vec_perm_indices,
29204 and update the number of inputs argument accordingly. Use the
29205 utility functions added above. Only construct sel2 if we need to.
29207 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29209 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29210 the broadcast of the low byte.
29211 (expand_mult_highpart): Use an explicit encoding for the permutes.
29212 * optabs-query.c (can_mult_highpart_p): Likewise.
29213 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29214 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29215 (vectorizable_bswap): Likewise.
29216 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29217 explicit encoding for the power-of-2 permutes.
29218 (vect_permute_store_chain): Likewise.
29219 (vect_grouped_load_supported): Likewise.
29220 (vect_permute_load_chain): Likewise.
29222 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29224 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29225 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29226 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29227 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29228 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29229 (vect_gen_perm_mask_any): Likewise.
29231 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29233 * int-vector-builder.h: New file.
29234 * vec-perm-indices.h: Include int-vector-builder.h.
29235 (vec_perm_indices): Redefine as an int_vector_builder.
29236 (auto_vec_perm_indices): Delete.
29237 (vec_perm_builder): Redefine as a stand-alone class.
29238 (vec_perm_indices::vec_perm_indices): New function.
29239 (vec_perm_indices::clamp): Likewise.
29240 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29241 (vec_perm_indices::new_vector): New function.
29242 (vec_perm_indices::new_expanded_vector): Update for new
29243 vec_perm_indices class.
29244 (vec_perm_indices::rotate_inputs): New function.
29245 (vec_perm_indices::all_in_range_p): Operate directly on the
29246 encoded form, without computing elided elements.
29247 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29248 encoding. Update for new vec_perm_indices class.
29249 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29250 the given vec_perm_builder.
29251 (expand_vec_perm_var): Update vec_perm_builder constructor.
29252 (expand_mult_highpart): Use vec_perm_builder instead of
29253 auto_vec_perm_indices.
29254 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29255 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29256 or double series encoding as appropriate.
29257 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29258 vec_perm_indices instead of auto_vec_perm_indices.
29259 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29260 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29261 (vect_permute_store_chain): Likewise.
29262 (vect_grouped_load_supported): Likewise.
29263 (vect_permute_load_chain): Likewise.
29264 (vect_shift_permute_load_chain): Likewise.
29265 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29266 (vect_transform_slp_perm_load): Likewise.
29267 (vect_schedule_slp_instance): Likewise.
29268 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29269 (vectorizable_mask_load_store): Likewise.
29270 (vectorizable_bswap): Likewise.
29271 (vectorizable_store): Likewise.
29272 (vectorizable_load): Likewise.
29273 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29274 vec_perm_indices instead of auto_vec_perm_indices. Use
29275 tree_to_vec_perm_builder to read the vector from a tree.
29276 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29277 vec_perm_builder instead of a vec_perm_indices.
29278 (have_whole_vector_shift): Use vec_perm_builder and
29279 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29280 truncation to calc_vec_perm_mask_for_shift.
29281 (vect_create_epilog_for_reduction): Likewise.
29282 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29283 from auto_vec_perm_indices to vec_perm_indices.
29284 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29285 instead of changing individual elements.
29286 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29287 the vector in d.perm.
29288 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29289 from auto_vec_perm_indices to vec_perm_indices.
29290 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29291 instead of changing individual elements.
29292 (arm_vectorize_vec_perm_const): Use new_vector to install
29293 the vector in d.perm.
29294 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29295 Update vec_perm_builder constructor.
29296 (rs6000_expand_interleave): Likewise.
29297 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29298 (rs6000_expand_interleave): Likewise.
29300 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29302 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29303 to qimode could truncate the indices.
29304 * optabs.c (expand_vec_perm_var): Likewise.
29306 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29308 * Makefile.in (OBJS): Add vec-perm-indices.o.
29309 * vec-perm-indices.h: New file.
29310 * vec-perm-indices.c: Likewise.
29311 * target.h (vec_perm_indices): Replace with a forward class
29313 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29314 * optabs.h: Include vec-perm-indices.h.
29315 (expand_vec_perm): Delete.
29316 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29317 (expand_vec_perm_const): Declare.
29318 * target.def (vec_perm_const_ok): Replace with...
29319 (vec_perm_const): ...this new hook.
29320 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29321 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29322 * doc/tm.texi: Regenerate.
29323 * optabs.def (vec_perm_const): Delete.
29324 * doc/md.texi (vec_perm_const): Likewise.
29325 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29326 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29327 expand_vec_perm for constant permutation vectors. Assert that
29328 the mode of variable permutation vectors is the integer equivalent
29329 of the mode that is being permuted.
29330 * optabs-query.h (selector_fits_mode_p): Declare.
29331 * optabs-query.c: Include vec-perm-indices.h.
29332 (selector_fits_mode_p): New function.
29333 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29334 is defined, instead of checking whether the vec_perm_const_optab
29335 exists. Use targetm.vectorize.vec_perm_const instead of
29336 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29337 fit in the vector mode before using a variable permute.
29338 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29339 vec_perm_indices instead of an rtx.
29340 (expand_vec_perm): Replace with...
29341 (expand_vec_perm_const): ...this new function. Take the selector
29342 as a vec_perm_indices rather than an rtx. Also take the mode of
29343 the selector. Update call to shift_amt_for_vec_perm_mask.
29344 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29345 Use vec_perm_indices::new_expanded_vector to expand the original
29346 selector into bytes. Check whether the indices fit in the vector
29347 mode before using a variable permute.
29348 (expand_vec_perm_var): Make global.
29349 (expand_mult_highpart): Use expand_vec_perm_const.
29350 * fold-const.c: Includes vec-perm-indices.h.
29351 * tree-ssa-forwprop.c: Likewise.
29352 * tree-vect-data-refs.c: Likewise.
29353 * tree-vect-generic.c: Likewise.
29354 * tree-vect-loop.c: Likewise.
29355 * tree-vect-slp.c: Likewise.
29356 * tree-vect-stmts.c: Likewise.
29357 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29359 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29360 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29361 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29362 (aarch64_vectorize_vec_perm_const): ...this new function.
29363 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29364 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29365 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29366 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29367 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29368 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29369 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29371 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29372 check for NEON modes.
29373 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29374 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29375 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29376 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29378 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29379 the old VEC_PERM_CONST conditions.
29380 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29381 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29382 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29383 (ia64_vectorize_vec_perm_const_ok): Merge into...
29384 (ia64_vectorize_vec_perm_const): ...this new function.
29385 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29386 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29387 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29388 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29389 * config/mips/mips.c (mips_expand_vec_perm_const)
29390 (mips_vectorize_vec_perm_const_ok): Merge into...
29391 (mips_vectorize_vec_perm_const): ...this new function.
29392 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29393 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29394 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29395 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29396 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29397 (rs6000_expand_vec_perm_const): Delete.
29398 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29400 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29401 (altivec_expand_vec_perm_const_le): Take each operand individually.
29402 Operate on constant selectors rather than rtxes.
29403 (altivec_expand_vec_perm_const): Likewise. Update call to
29404 altivec_expand_vec_perm_const_le.
29405 (rs6000_expand_vec_perm_const): Delete.
29406 (rs6000_vectorize_vec_perm_const_ok): Delete.
29407 (rs6000_vectorize_vec_perm_const): New function.
29408 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29409 an element count and rtx array.
29410 (rs6000_expand_extract_even): Update call accordingly.
29411 (rs6000_expand_interleave): Likewise.
29412 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29413 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29414 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29415 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29416 (rs6000_expand_vec_perm_const): Delete.
29417 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29418 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29419 (altivec_expand_vec_perm_const_le): Take each operand individually.
29420 Operate on constant selectors rather than rtxes.
29421 (altivec_expand_vec_perm_const): Likewise. Update call to
29422 altivec_expand_vec_perm_const_le.
29423 (rs6000_expand_vec_perm_const): Delete.
29424 (rs6000_vectorize_vec_perm_const_ok): Delete.
29425 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29426 reference to the SPE evmerge intructions.
29427 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29428 an element count and rtx array.
29429 (rs6000_expand_extract_even): Update call accordingly.
29430 (rs6000_expand_interleave): Likewise.
29431 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29432 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29434 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29436 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29438 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29439 vector mode and that that mode matches the mode of the data
29441 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29442 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29443 directly using expand_vec_perm_1 when forcing selectors into
29445 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29449 * optabs-query.h (can_vec_perm_p): Delete.
29450 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29451 * optabs-query.c (can_vec_perm_p): Split into...
29452 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29453 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29454 particular selector is valid.
29455 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29456 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29457 (vect_grouped_load_supported): Likewise.
29458 (vect_shift_permute_load_chain): Likewise.
29459 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29460 (vect_transform_slp_perm_load): Likewise.
29461 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29462 (vectorizable_bswap): Likewise.
29463 (vect_gen_perm_mask_checked): Likewise.
29464 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29465 implementations of variable permutation vectors into account
29466 when deciding which selector to use.
29467 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29468 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29469 with a false third argument.
29470 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29471 to test whether the constant selector is valid and can_vec_perm_var_p
29472 to test whether a variable selector is valid.
29474 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29476 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29477 * optabs-query.c (can_vec_perm_p): Likewise.
29478 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29479 instead of vec_perm_indices.
29480 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29481 (vect_gen_perm_mask_checked): Likewise,
29482 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29483 (vect_gen_perm_mask_checked): Likewise,
29485 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29487 * optabs-query.h (qimode_for_vec_perm): Declare.
29488 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29489 (qimode_for_vec_perm): ...this new function.
29490 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29492 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29494 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29495 does not have a conditional at the top.
29497 2018-01-02 Richard Biener <rguenther@suse.de>
29499 * ipa-inline.c (big_speedup_p): Fix expression.
29501 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29504 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29507 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29511 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29512 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29513 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29514 cond_taken_branch_cost 3->4.
29516 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29518 PR tree-optimization/83581
29519 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29520 TODO_cleanup_cfg if any changes have been made.
29522 PR middle-end/83608
29523 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29524 convert_modes if target mode has the right side, but different mode
29527 PR middle-end/83609
29528 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29529 last argument when extracting from CONCAT. If either from_real or
29530 from_imag is NULL, use expansion through memory. If result is not
29531 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29532 the parts directly to inner mode, if even that fails, use expansion
29535 PR middle-end/83623
29536 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29537 check for bswap in mode rather than HImode and use that in expand_unop
29540 Copyright (C) 2018 Free Software Foundation, Inc.
29542 Copying and distribution of this file, with or without modification,
29543 are permitted in any medium without royalty provided the copyright
29544 notice and this notice are preserved.