1 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2 Martin Sebor <msebor@redhat.com>
3 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5 * doc/ux.texi (Quoting): New subsection, adapted from material at
6 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
7 MartinSebor and ManuelLopezIbanez.
8 (Fix-it hints): Note that fix-it hints shouldn't be marked for
11 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
14 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
17 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
19 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
21 2018-10-29 Paul Koning <ni1d@arrl.net>
23 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
25 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
27 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
28 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
29 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
30 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
31 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
32 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
33 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
34 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
35 Change 'vector' to '__vector'.
36 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
37 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
38 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
39 _mm_avg_pu16): Likewise. And, whitespace corrections.
41 2018-10-29 Richard Biener <rguenther@suse.de>
43 PR tree-optimization/87785
44 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
47 2018-10-29 Olivier Hainque <hainque@adacore.com>
49 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
51 2018-10-29 Olivier Hainque <hainque@adacore.com>
53 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
54 ports configuration macro, defaults to "gnu".
55 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
56 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
58 2018-10-29 Olivier Hainque <hainque@adacore.com>
60 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
62 2018-10-29 Richard Biener <rguenther@suse.de>
64 PR tree-optimization/87790
65 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
66 (vect_make_slp_decision): Adjust.
67 (vect_slp_analyze_bb_1): Likewise.
68 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
71 2018-10-29 Richard Biener <rguenther@suse.de>
73 PR tree-optimization/87785
74 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
76 (vect_build_slp_tree): Likewise.
77 (vect_gather_slp_loads): New function.
78 (vect_analyze_slp_instance): Gather loads separately from the
81 2018-10-29 Martin Liska <mliska@suse.cz>
83 * Makefile.in: Make dependency to json.o.
84 * doc/gcov.texi: Document new JSON format, remove
85 old intermediate format documentation.
86 * gcov.c (struct function_info): Come up with m_name and
88 (function_info::function_info): Initialize it.
89 (function_info::~function_info): Release it.
90 (main): Rename flag_intermediate_format to flag_json_format.
91 (print_usage): Describe --json-format.
92 (process_args): Set flag_json_format.
93 (output_intermediate_line): Remove.
94 (output_intermediate_json_line): Likewise.
95 (get_gcov_intermediate_filename): Return new extension
97 (output_intermediate_file): Implement JSON emission.
98 (output_json_intermediate_file): Implement JSON emission.
99 (generate_results): Use ::get_name for function name.
100 Handle JSON output file.
101 (read_graph_file): Use ::get_name instead of cplus_demangle.
102 (read_count_file): Likewise.
103 (solve_flow_graph): Likewise.
104 (add_line_counts): Likewise.
105 (accumulate_line_counts): Use new flag_json_format.
106 (output_function_details): Use ::get_name instead of cplus_demangle.
107 (output_lines): Likewise.
108 * json.cc (test_writing_literals): Add new tests.
109 * json.h (class literal): Add new boolean constructor.
111 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
113 PR rtl-optimization/87701
114 PR rtl-optimization/87780
115 * combine.c (make_more_copies): Rewrite.
117 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
119 * doc/generic.texi (ABSU_EXPR): Document.
120 * match.pd (absu(x)*absu(x) -> x*x): Handle.
121 (absu(absu(X)) -> absu(X)): Likewise.
122 (absu(-X) -> absu(X)): Likewise.
123 (absu(X) where X is nonnegative -> X): Likewise.
125 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
127 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
128 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
129 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
130 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
131 (s-tm-texi): Also check timestamp on d-target.def.
132 (generated_files): Add TM_D_H and d-target-hooks-def.h.
133 (build/genhooks.o): Also depend on D_TARGET_DEF.
134 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
136 * config/aarch64/aarch64-d.c: New file.
137 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
139 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
141 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
142 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
143 * config/arm/arm-d.c: New file.
144 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
145 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
146 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
147 * config/arm/t-arm (arm-d.o): New rule.
148 * config/default-d.c: New file.
149 * config/glibc-d.c: New file.
150 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
151 * config/i386/i386-d.c: New file.
152 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
153 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
154 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
155 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
156 * config/i386/t-i386 (i386-d.o): New rule.
157 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
158 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
159 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
160 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
161 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
162 * config/mips/mips-d.c: New file.
163 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
164 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
165 * config/mips/t-mips (mips-d.o): New rule.
166 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
167 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
168 * config/powerpcspe/powerpcspe-d.c: New file.
169 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
171 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
172 Support GNU D by using 0 as the language type.
173 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
174 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
175 * config/riscv/riscv-d.c: New file.
176 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
178 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
179 * config/riscv/t-riscv (riscv-d.o): New rule.
180 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
181 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
182 * config/rs6000/rs6000-d.c: New file.
183 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
185 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
186 Support GNU D by using 0 as the language type.
187 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
188 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
189 * config/s390/s390-d.c: New file.
190 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
191 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
192 * config/s390/t-s390 (s390-d.o): New rule.
193 * config/sparc/sparc-d.c: New file.
194 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
196 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
197 * config/sparc/t-sparc (sparc-d.o): New rule.
198 * config/t-glibc (glibc-d.o): New rule.
199 * configure: Regenerated.
200 * configure.ac (tm_d_file): New variable.
201 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
202 * doc/contrib.texi (Contributors): Add self for the D frontend.
203 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
204 * doc/install.texi (Configuration): Mention libphobos as an option for
205 --enable-shared. Mention d as an option for --enable-languages.
206 (Testing): Mention check-d as a target.
207 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
208 name suffixes. Mention d as a -x option.
209 * doc/sourcebuild.texi (Top Level): Mention libphobos.
210 * doc/standards.texi (Standards): Add section on D language.
211 * doc/tm.texi: Regenerated.
212 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
213 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
214 * dwarf2out.c (is_dlang): New function.
215 (gen_compile_unit_die): Use DW_LANG_D for D.
216 (declare_in_namespace): Return module die for D, instead of adding
217 extra declarations into the namespace.
218 (gen_namespace_die): Generate DW_TAG_module for D.
219 (gen_decl_die): Handle CONST_DECLSs for D.
220 (dwarf2out_decl): Likewise.
221 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
222 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
224 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
225 * genhooks.c: Include d/d-target.def.
227 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
230 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
231 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
232 (STACK_DYNAMIC_OFFSET): Likewise.
234 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
237 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
240 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
242 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
243 return type and other typos.
245 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
247 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
248 a shorter sequence with fewer branches.
249 (emit_final_str_compare_gpr): Ditto.
251 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
253 * config/rs6000/tmmintrin.h: New file.
254 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
256 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
258 * config/rs6000/mmintrin.h: Enable 32bit compilation.
259 * config/rs6000/xmmintrin.h: Likewise.
261 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
263 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
265 2018-10-26 Richard Biener <rguenther@suse.de>
267 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
269 (vect_mark_slp_stmts_relevant): Likewise.
270 (vect_detect_hybrid_slp_stmts): Likewise.
271 (vect_bb_slp_scalar_cost): Likewise.
272 (vect_remove_slp_scalar_calls): Likewise.
274 2018-10-26 Jan Hubicka <jh@suse.cz>
276 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
277 (warn_types_mismatch): Fix walk of DECL_NAME.
278 (odr_types_equivalent_p): Fix overactive assert.
280 2018-10-26 Richard Biener <rguenther@suse.de>
282 PR tree-optimization/87105
283 * tree-vectorizer.h (_slp_tree::refcnt): New member.
284 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
286 (vect_create_new_slp_node): Initialize refcnt to one.
288 (scalar_stmts_set_t, bst_fail): Remove.
289 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
290 (vect_build_slp_tree): Add bst_map argument and lookup
291 already created SLP nodes.
292 (vect_print_slp_tree): Handle a SLP graph, print SLP node
294 (vect_slp_rearrange_stmts): Handle a SLP graph.
295 (vect_analyze_slp_instance): Adjust and free SLP nodes from
296 the CSE map. Fix indenting.
297 (vect_schedule_slp_instance): Add short-cut.
299 2018-10-26 Martin Liska <mliska@suse.cz>
302 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
303 addr_expr and not with pointers.
305 2018-10-26 Jan Hubicka <jh@suse.cz>
307 * tree.c (free_lang_data_in_type): Only check main variants.
308 * ipa-devirt.c (warn_odr): Make static.
309 (types_same_for_odr): Drop strict variant.
310 (types_odr_comparable): Likewise.
311 (odr_or_derived_type_p): Look for main variants.
312 (odr_name_hasher::equal): Cleanup comment.
313 (odr_subtypes_equivalent): Add warn and warned arguments; check main
315 (type_variants_equivalent_p): break out from ...
316 (odr_types_equivalent): ... here; go for main variants where needed.
317 (warn_odr): ... here; turn static.
318 (warn_types_mismatch): Compare mangled names of main variants.
319 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
320 (type_with_linkage_p): Sanity check that we look at main variant.
321 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
322 * tree.h (types_same_for_odr): Drop strict argument.
324 2018-10-26 Richard Biener <rguenther@suse.de>
326 PR tree-optimization/87746
327 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
328 Simplify and fix WRT strided store groups with size not
329 equal to step in element count.
330 (vect_analyze_group_access_1): Dump the whole group.
332 2018-10-25 Carl Love <cel@us.ibm.com>
334 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
335 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
336 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
337 precicion entry for each overloaded builtin.
338 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
339 VSCEDPUO): Rename overloaded name.
340 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
341 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
342 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
343 define_expand for xscmpexqp instruction.
344 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
346 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
347 Jinsong Ji <jji@us.ibm.com>
349 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
350 function with vec_sl.
351 (_mm_slli_epi32): Likewise.
352 (_mm_slli_epi64): Likewise.
353 (_mm_srai_epi16): Replace deprecated function with vec_sra.
354 (_mm_srai_epi32): Likewise.
355 (_mm_srli_epi16): Replace deprecated function with vec_sr.
356 (_mm_srli_epi32): Likewise.
357 (_mm_srli_epi64): Likewise.
358 (_mm_sll_epi16): Replace deprecated function with vec_sl.
359 (_mm_sll_epi32): Likewise.
360 (_mm_sll_epi64): Likewise.
361 (_mm_sra_epi16): Replace deprecated function with vec_sra.
362 (_mm_sra_epi32): Likewise.
363 (_mm_srl_epi16): Replace deprecated function with vec_sr.
364 (_mm_srl_epi32): Likewise.
365 (_mm_srl_epi64): Likewise.
367 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
368 Jinsong Ji <jji@us.ibm.com>
370 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
371 comparison operators with vec_cmp* for compatibility due to
372 unfortunate history; clean up formatting and use types more
374 (_mm_sll_epi32): Likewise.
375 (_mm_sll_epi64): Likewise.
376 (_mm_srl_epi16): Likewise.
377 (_mm_srl_epi32): Likewise.
378 (_mm_srl_epi64): Likewise.
380 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
381 Jinsong Ji <jji@us.ibm.com>
383 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
384 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
385 __vector __bool int. Use vec_cmpgt in preference to deprecated
386 function vec_vcmpgtfp.
387 (_mm_max_ps): Likewise.
389 2018-10-25 Jeff Law <law@redhat.com>
391 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
394 2018-10-25 Martin Sebor <msebor@redhat.com>
396 * doc/extend.texi (aligned): Expand attribute description.
397 (Alignment): Rename section. Discuss function arguments.
399 2018-10-25 Jan Hubicka <jh@suse.cz>
401 * ipa-devirt.c (main_odr_variant): Remove.
402 (hash_odr_name, types_same_for_odr, types_odr_comparable,
403 odr_name_hasher::equal, odr_subtypes_equivalent_p):
404 Drop use of main_odr_variant.
405 (add_type_duplicate): Silence confused warnings on integer types.
406 (get_odr_type): Always look for main variant.
407 (register_odr_type): Simplify.
409 2018-10-25 Richard Biener <rguenther@suse.de>
411 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
412 Initialize ng to silence error with release checking bootstrap.
414 2018-10-25 Richard Biener <rguenther@suse.de>
416 * tree-if-conv.c: Include tree-ssa-sccvn.h.
417 (tree_if_conversion): Run CSE on the if-converted loop body.
419 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
421 * config/s390/constraints.md (ZL): New constraint.
422 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
424 * config/s390/s390.md (movdi_larl): Remove.
425 (movdi_64): Add the LARL alternative.
427 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
430 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
431 (RTX_CODE_HWINT_P): New macro.
432 (rtx_code_size): Use RTX_CODE_HWINT_P ().
434 2018-10-25 Jan Hubicka <jh@suse.cz>
436 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
439 2018-10-25 Richard Biener <rguenther@suse.de>
441 PR tree-optimization/87665
442 PR tree-optimization/87745
443 * tree-vectorizer.h (get_earlier_stmt): Remove.
444 (get_later_stmt): Pick up UID from the original non-pattern stmt.
446 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
448 * options.texi (Deprecated): Move list to Var section.
450 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
451 Jinsong Ji <jji@us.ibm.com>
453 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
454 __vector long to __vector long long.
455 (_mm_cvtpd_ps): Likewise.
456 (_mm_cvttpd_epi32): Likewise.
457 (_mm_cvtpi32_pd): Likewise.
458 (_mm_unpackhi_epi64): Likewise.
459 (_mm_unpacklo_epi64): Likewise.
461 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
463 PR rtl-optimization/87720
464 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
466 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
468 * gimple-ssa-isolate-paths.c
469 (find_implicit_erroneous_behavior): Do not change code if the
470 pass is running for warnings only.
471 (find_explicit_erroneous_behavior): Likewise.
473 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
475 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
476 Define as rs6000_mangle_decl_assembler_name.
477 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
478 long double to IEEE long double, switch the names of the long
479 double built-in functions to be <func>f128 instead of <func>l.
481 2018-10-24 Martin Sebor <msebor@redhat.com>
483 * doc/extend.texi (nonnull): List no-argument form. Reference
484 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
486 2018-10-24 Richard Biener <rguenther@suse.de>
488 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
490 2018-10-24 Martin Liska <mliska@suse.cz>
492 PR tree-optimization/84436
493 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
495 (switch_conversion::contains_linear_function_p): New.
496 (switch_conversion::build_one_array): Support linear
497 transformation on input.
498 * tree-switch-conversion.h (struct switch_conversion): Add
499 contains_linear_function_p declaration.
501 2018-10-24 Richard Biener <rguenther@suse.de>
503 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
504 if its argument is CONSTANT_CLASS_P.
506 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
508 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
509 it is wrong for forward declarations.
511 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
513 * config/s390/s390.c (s390_check_qrst_address): Add the missing
514 SYMBOL_REF_P () check.
516 2018-10-24 Richard Biener <rguenther@suse.de>
518 PR tree-optimization/87105
519 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
521 (vect_analyze_data_ref_accesses): Handle duplicate loads and
522 stores by splitting the affected group after the fact.
523 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
524 fail the SLP build because of size constraints.
526 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
528 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
529 * configure: Regenerate.
530 * config.in: Regenerate.
531 * varasm.c (mergeable_string_section): Use readonly_data_section
532 if linker doesn't support SHF_MERGE with alignment > 8.
533 (mergeable_constant_section): Likewise.
535 2018-10-24 Richard Biener <rguenther@suse.de>
537 PR tree-optimization/84013
538 * tree-ssa-structalias.c (struct msdi_data): New struct for
539 marshalling data to walk_stmt_load_store_ops.
540 (maybe_set_dependence_info): Refactor as callback for
541 walk_stmt_load_store_ops.
542 (compute_dependence_clique): Set restrict info on all stmt kinds.
544 2018-10-24 Martin Liska <mliska@suse.cz>
546 * cgraph.c (cgraph_node::dump):
547 Remove reduntant dumps and make tp_first_run dump more compact.
549 2018-10-24 Richard Biener <rguenther@suse.de>
551 PR tree-optimization/87665
552 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
555 2018-10-12 Jeff Law <law@redhat.com>
557 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
560 2018-10-23 Richard Biener <rguenther@suse.de>
562 * tree-vrp.c (add_assert_info): Guard dump_printf with
564 * gimple-ssa-evrp-analyze.c
565 (evrp_range_analyzer::record_ranges_from_incoming_edge):
566 Use value_range::ignore_equivs_equal_p.
568 2018-10-23 Richard Biener <rguenther@suse.de>
570 PR tree-optimization/87105
571 PR tree-optimization/87608
572 * passes.def (pass_all_early_optimizations): Add early phi-opt
574 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
575 addition to debug stmts.
576 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
577 and abs replacement early.
578 * tree-cfg.c (gimple_empty_block_p): Likewise.
580 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
583 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
584 specified to configure.
585 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
587 2018-10-23 Richard Biener <rguenther@suse.de>
589 PR tree-optimization/87700
590 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
592 2018-10-23 Jakub Jelinek <jakub@redhat.com>
595 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
596 second argument from __mmask16 to __mmask8.
597 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
598 _mm_mask_packs_epi32): Likewise.
599 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
601 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
603 2018-10-23 Richard Biener <rguenther@suse.de>
605 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
607 2018-10-23 Richard Biener <rguenther@suse.de>
609 PR tree-optimization/86144
610 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
613 2018-10-23 Richard Biener <rguenther@suse.de>
615 PR tree-optimization/87693
616 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
617 the case we do not find the taken edge.
619 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
620 Jinsong Ji <jji@us.ibm.com>
622 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
623 (_mm_store_pd): Use unaligned vector type for pointer cast.
624 (_mm_maskmoveu_si128): Likewise.
625 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
626 (_mm_store_ps): Use unaligned vector type for pointer cast.
628 2018-10-22 Paul Koning <ni1d@arrl.net>
630 * symtab.c (symtab_node::increase_alignment): Correct max
633 2018-10-22 Yury Gribov <tetra2005@gmail.com>
635 PR tree-optimization/87633
636 * match.pd: Do not generate unordered integer comparisons.
638 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
640 PR rtl-optimization/87600
641 * combine.c: Add include of expr.h.
642 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
643 register to a pseudo.
644 (make_more_copies): New function, add a copy to a new pseudo after
645 the moves from hard registers into pseudos.
646 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
647 later. Call make_more_copies.
649 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
651 * lra-constraints.c (process_alt_operands): New local array,
652 matching_early_clobber. Check matching_early_clobber before
653 decrementing reject, and set matching_early_clobber after.
655 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
658 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
659 call output_addr_const and hope for the best.
661 2018-10-22 Richard Biener <rguenther@suse.de>
663 * gimple-ssa-evrp-analyze.c
664 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
665 smarter about what ranges to use.
666 * tree-vrp.c (add_assert_info): Dump here.
667 (register_edge_assert_for_2): Instead of here at multiple but
670 * gcc.dg/tree-ssa/evrp12.c: New testcase.
671 * gcc.dg/predict-6.c: Adjust.
672 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
673 * gcc.dg/tree-ssa/vrp02.c: Likewise.
674 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
676 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
677 Richard Biener <rguenther@suse.de>
679 * bitmap.h: Update data structure documentation, including a
680 description of bitmap views as either linked-lists or splay trees.
681 (struct bitmap_element_def): Update comments for splay tree bitmaps.
682 (struct bitmap_head_def): Likewise.
683 (bitmap_list_view, bitmap_tree_view): New prototypes.
684 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
686 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
687 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
688 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
689 released bitmap element here.
690 (bitmap_element_free): Remove.
691 (bitmap_elt_clear_from): Work on splay tree bitmaps.
692 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
693 this function similar ones such that linked-list bitmap implementation
694 functions are grouped.
695 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
696 and moved for grouping.
697 (bitmap_list_insert_element_after): Renamed from
698 bitmap_elt_insert_after, and moved for grouping.
699 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
700 (bitmap_tree_link_left, bitmap_tree_link_right,
701 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
702 bitmap_tree_link_element, bitmap_tree_unlink_element,
703 bitmap_tree_find_element): New functions for splay-tree bitmap
705 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
706 Renamed and moved, see above entries.
707 (bitmap_tree_listify_from): New function to convert part of a splay
708 tree bitmap to a linked-list bitmap.
709 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
710 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
711 (bitmap_find_bit): Remove.
712 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
713 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
714 Handle splay tree bitmaps.
715 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
716 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
717 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
718 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
719 bitmap_intersect_compl_p, bitmap_ior_and_compl,
720 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
721 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
722 corresponding changes to use linked-list specific bitmap_element
723 manipulation functions as applicable for efficiency.
724 (bitmap_tree_to_vec): New function.
725 (debug_bitmap_elt_file): New function split out from ...
726 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
727 (bitmap_print): Likewise.
729 PR tree-optimization/63155
730 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
732 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
735 2018-10-22 Martin Liska <mliska@suse.cz>
737 PR tree-optimization/87686
739 2018-08-29 Martin Liska <mliska@suse.cz>
741 * tree-switch-conversion.c (switch_conversion::expand):
742 Strenghten assumption about gswitch statements.
744 2018-10-22 Martin Liska <mliska@suse.cz>
746 * ipa-icf.c (sem_item::compare_attributes): Remove.
747 (sem_item::compare_referenced_symbol_properties): Use
748 attribute_list_equal instead.
749 (sem_function::equals_wpa): Likewise.
750 * ipa-icf.h: Remove compare_attributes.
752 2018-10-22 Richard Biener <rguenther@suse.de>
755 * mem-stats.h (mem_usage::operator==): Fix pasto.
757 2018-10-22 Richard Biener <rguenther@suse.de>
759 PR tree-optimization/87640
760 * tree-vrp.c (set_value_range_with_overflow): Decompose
762 (extract_range_from_binary_expr_1): Adjust.
764 2018-10-22 Martin Jambor <mjambor@suse.cz>
766 * tree-eh.h (stmt_could_throw_p): Add function parameter.
767 (stmt_can_throw_external): Likewise.
768 (stmt_can_throw_internal): Likewise.
769 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
770 (lower_eh_constructs_2): Likewise.
771 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
772 (stmt_can_throw_external): Likewise.
773 (stmt_can_throw_internal): Likewise.
774 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
775 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
776 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
777 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
778 (pass_lower_eh_dispatch::execute): Pass cfun to
779 stmt_can_throw_external.
780 (cleanup_empty_eh): Likewise.
781 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
782 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
783 stmt_can_throw_external instead of pushing it to cfun.
784 (symbol_table::create_edge): Likewise.
785 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
786 stmt_can_throw_internal.
787 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
788 to stmt_could_throw_p.
789 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
790 stmt_can_throw_internal.
791 (pass_store_merging::execute): Likewise.
792 * gimple-ssa-strength-reduction.c
793 (find_candidates_dom_walker::before_dom_children): Pass cfun to
795 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
796 stmt_can_throw_internal.
797 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
798 to stmt_can_throw_external.
799 (check_stmt): Pass cfun to stmt_could_throw_p.
800 (check_stmt): Pass cfun to stmt_can_throw_external.
801 (pass_nothrow::execute): Likewise.
802 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
803 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
804 stmt_can_throw_internal.
805 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
806 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
807 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
808 * tree-complex.c (expand_complex_libcall): Pass cfun to
809 stmt_could_throw_p and to stmt_can_throw_internal.
810 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
811 * tree-inline.c (copy_edges_for_bb): Likewise.
812 (maybe_move_debug_stmts_to_successors): Likewise.
813 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
815 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
816 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
817 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
818 stmt_can_throw_internal.
819 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
820 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
822 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
823 stmt_can_throw_internal.
824 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
825 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
827 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
828 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
829 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
830 (convert_mult_to_fma_1): Likewise.
831 (convert_to_divmod): Likewise.
832 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
833 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
834 * tree-ssa-propagate.c
835 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
836 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
837 (maybe_optimize_range_tests): Likewise.
838 (linearize_expr_tree): Likewise.
839 (reassociate_bb): Likewise.
840 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
841 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
842 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
843 (handle_char_store): Likewise.
844 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
845 stmt_can_throw_internal.
846 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
848 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
849 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
850 (vectorizable_simd_clone_call): Likewise.
851 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
852 (gimple_stringop_fixed_value): Likewise.
854 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
856 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
857 literal pool references.
858 (s390_check_qrst_address): Adapt to the new behavior of
859 s390_loadrelative_operand_p ().
861 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
864 * config/i386/sse.md (*andnot<mode>3_bcst): New.
866 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
869 * config/i386/sse.md (*<code><mode>3_bcst): New.
871 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
874 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
875 V4DI, V16SI and V8DI.
876 (*sub<mode>3<mask_name>_bcst): New.
877 (*add<mode>3<mask_name>_bcst): Likewise.
879 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
880 Jinsong Ji <jji@us.ibm.com>
882 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
883 __m64 with __vector unsigned long long for compatibility.
884 (_mm_movemask_epi8): Likewise.
885 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
886 (_mm_cvttps_pi32): Likewise.
887 (_mm_cvtpi32_ps): Likewise.
888 (_mm_cvtps_pi16): Likewise.
889 (_mm_loadh_pi): Likewise.
890 (_mm_storeh_pi): Likewise.
891 (_mm_movehl_ps): Likewise.
892 (_mm_movelh_ps): Likewise.
893 (_mm_loadl_pi): Likewise.
894 (_mm_storel_pi): Likewise.
895 (_mm_movemask_ps): Likewise.
896 (_mm_shuffle_pi16): Likewise.
898 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
901 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
902 __builtin_ia32_vfnmsubpd512_mask.
903 (_mm512_mask_fnmsub_round_pd): Likewise.
904 (_mm512_fnmsub_pd): Likewise.
905 (_mm512_mask_fnmsub_pd): Likewise.
906 (_mm512_maskz_fnmsub_round_pd): Use
907 __builtin_ia32_vfnmsubpd512_maskz.
908 (_mm512_maskz_fnmsub_pd): Likewise.
909 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
910 (_mm512_mask_fnmsub_round_ps): Likewise.
911 (_mm512_fnmsub_ps): Likewise.
912 (_mm512_mask_fnmsub_ps): Likewise.
913 (_mm512_maskz_fnmsub_round_ps): Use
914 __builtin_ia32_vfnmsubps512_maskz.
915 (_mm512_maskz_fnmsub_ps): Likewise.
916 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
917 __builtin_ia32_vfnmsubpd256_mask.
918 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
919 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
920 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
921 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
922 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
923 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
924 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
925 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
926 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
927 __builtin_ia32_vfnmsubpd.
928 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
929 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
930 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
931 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
932 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
933 * config/i386/i386-builtin.def: Add
934 __builtin_ia32_vfnmsubpd256_mask,
935 __builtin_ia32_vfnmsubpd256_maskz,
936 __builtin_ia32_vfnmsubpd128_mask,
937 __builtin_ia32_vfnmsubpd128_maskz,
938 __builtin_ia32_vfnmsubps256_mask,
939 __builtin_ia32_vfnmsubps256_maskz,
940 __builtin_ia32_vfnmsubps128_mask,
941 __builtin_ia32_vfnmsubps128_maskz,
942 __builtin_ia32_vfnmsubpd512_mask,
943 __builtin_ia32_vfnmsubpd512_maskz,
944 __builtin_ia32_vfnmsubps512_mask,
945 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
946 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
947 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
948 __builtin_ia32_vfnmsubpd256.
949 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
950 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
951 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
953 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
955 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
957 (fmai_vmfnmsub_<mode><round_name>): Likewise.
959 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
962 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
963 __builtin_ia32_vfnmaddpd512_mask.
964 (_mm512_mask_fnmadd_round_pd): Likewise.
965 (_mm512_fnmadd_pd): Likewise.
966 (_mm512_mask_fnmadd_pd): Likewise.
967 (_mm512_maskz_fnmadd_round_pd): Use
968 __builtin_ia32_vfnmaddpd512_maskz.
969 (_mm512_maskz_fnmadd_pd): Likewise.
970 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
971 (_mm512_mask_fnmadd_round_ps): Likewise.
972 (_mm512_fnmadd_ps): Likewise.
973 (_mm512_mask_fnmadd_ps): Likewise.
974 (_mm512_maskz_fnmadd_round_ps): Use
975 __builtin_ia32_vfnmaddps512_maskz.
976 (_mm512_maskz_fnmadd_ps): Likewise.
977 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
978 __builtin_ia32_vfnmaddpd256_mask.
979 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
980 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
981 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
982 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
983 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
984 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
985 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
986 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
987 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
988 __builtin_ia32_vfnmaddpd.
989 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
990 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
991 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
992 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
993 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
994 * config/i386/i386-builtin.def: Add
995 __builtin_ia32_vfnmaddpd256_mask,
996 __builtin_ia32_vfnmaddpd256_maskz,
997 __builtin_ia32_vfnmaddpd128_mask,
998 __builtin_ia32_vfnmaddpd128_maskz,
999 __builtin_ia32_vfnmaddps256_mask,
1000 __builtin_ia32_vfnmaddps256_maskz,
1001 __builtin_ia32_vfnmaddps128_mask,
1002 __builtin_ia32_vfnmaddps128_maskz,
1003 __builtin_ia32_vfnmaddpd512_mask,
1004 __builtin_ia32_vfnmaddpd512_maskz,
1005 __builtin_ia32_vfnmaddps512_mask,
1006 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1007 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1008 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1009 __builtin_ia32_vfnmaddpd256.
1010 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1011 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1012 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1014 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1016 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1018 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1020 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1023 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1024 __builtin_ia32_vfmsubpd512_mask.
1025 (_mm512_mask_fmsub_round_pd): Likewise.
1026 (_mm512_fmsub_pd): Likewise.
1027 (_mm512_mask_fmsub_pd): Likewise.
1028 (_mm512_maskz_fmsub_round_pd): Use
1029 __builtin_ia32_vfmsubpd512_maskz.
1030 (_mm512_maskz_fmsub_pd): Likewise.
1031 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1032 (_mm512_mask_fmsub_round_ps): Likewise.
1033 (_mm512_fmsub_ps): Likewise.
1034 (_mm512_mask_fmsub_ps): Likewise.
1035 (_mm512_maskz_fmsub_round_ps): Use
1036 __builtin_ia32_vfmsubps512_maskz.
1037 (_mm512_maskz_fmsub_ps): Likewise.
1038 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1039 __builtin_ia32_vfmsubpd256_mask.
1040 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1041 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1042 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1043 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1044 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1045 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1046 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1047 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1048 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1049 __builtin_ia32_vfmsubpd.
1050 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1051 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1052 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1053 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1054 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1055 * config/i386/i386-builtin.def: Add
1056 __builtin_ia32_vfmsubpd256_mask,
1057 __builtin_ia32_vfmsubpd256_maskz,
1058 __builtin_ia32_vfmsubpd128_mask,
1059 __builtin_ia32_vfmsubpd128_maskz,
1060 __builtin_ia32_vfmsubps256_mask,
1061 __builtin_ia32_vfmsubps256_maskz,
1062 __builtin_ia32_vfmsubps128_mask,
1063 __builtin_ia32_vfmsubps128_maskz,
1064 __builtin_ia32_vfmsubpd512_mask,
1065 __builtin_ia32_vfmsubpd512_maskz,
1066 __builtin_ia32_vfmsubps512_mask,
1067 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1068 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1069 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1070 __builtin_ia32_vfmsubpd256.
1071 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1072 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1073 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1075 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1077 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1079 (fmai_vmfmsub_<mode><round_name>): Likewise.
1081 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1083 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1084 Remove plus. Renamed to ...
1085 (*sub<mode>3<mask_name>_bcst): This.
1086 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1087 (*add<mode>3<mask_name>_bcst): This.
1089 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1092 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1094 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1097 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1098 (_mm_or_epi32): Likewise.
1099 (_mm256_xor_epi32): Likewise.
1100 (_mm_xor_epi32): Likewise.
1101 (_mm256_or_epi64): Likewise.
1102 (_mm_or_epi64): Likewise.
1103 (_mm256_xor_epi64): Likewise.
1104 (_mm_xor_epi64): Likewise.
1106 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1109 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1111 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1114 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1116 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1118 * doc/ux.texi: Move @section directly after @node.
1120 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1124 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1125 depend closely nested inside of loop with ordered clause with
1128 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1130 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1131 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1132 * doc/ux.texi: New file.
1134 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1136 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1137 be the first CR field allocated.
1139 2018-10-19 Richard Biener <rguenther@suse.de>
1142 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1143 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1145 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1148 * config/i386/sse.md
1149 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1150 (*add<mode>3<mask_name>_bcst_2): Likewise.
1152 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1154 * config/i386/sse.md
1155 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1156 Replace nonimmediate_operand with register_operand.
1157 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1159 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1162 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1164 PR rtl-optimization/87596
1165 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1166 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1167 for instructions in FROM..TO range.
1169 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1171 * cfgexpand.c (expand_one_var): Use specific wording in error message
1172 for non-local frame variables.
1173 * stor-layout.c (layout_decl): Do not issue a warning for them.
1175 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1177 * haifa-sched.c (priority): Add force_recompute parameter.
1178 (apply_replacement): Call priority () with force_recompute = true.
1179 (restore_pattern): Likewise.
1181 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1183 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1184 HOST_BITS_PER_WIDE_INT.
1185 (test_vector_ops_duplicate): Likewise.
1187 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1190 * config/i386/sse.md (VF_AVX512): New.
1191 (avx512bcst): Likewise.
1192 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1194 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1196 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1199 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1201 * doc/invoke.texi (-dumpversion): Improve grammar.
1202 (-dumpfullversion): Make more consistent with -dumpversion.
1204 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1206 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1207 Set JUMP_LABEL to the jump insn.
1208 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1209 Predict emitted jump and add label to jump insn.
1211 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1213 PR tree-optimization/87562
1214 * input.c (get_substring_ranges_for_loc): Use
1215 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1216 getting the linemap for the endpoint. Verify that it's either
1217 in the same linemap as the start point's spelling location, or
1218 at least in the same file.
1220 2018-10-18 Richard Biener <rguenther@suse.de>
1222 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1223 feed width-specific load/store costs through ix86_vec_cost.
1224 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1225 (k8_cost): Likewise.
1226 (bdver_cost): Likewise.
1227 (znver1_cost): Likewise.
1228 (btver1_cost): Likewise.
1229 (btver2_cost): Likewise.
1231 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1233 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1234 to simplify subreg of vec_merge.
1236 2018-10-18 Richard Biener <rguenther@suse.de>
1238 * config/i386/i386.c: Fix costing of vector FMA.
1240 2018-10-18 Richard Biener <rguenther@suse.de>
1242 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1244 (ix86_builtin_vectorization_cost): For vec_construct properly
1245 cost insertion into SSE regs.
1246 (...): Adjust calls to ix86_vec_cost.
1248 2018-10-18 Richard Biener <rguenther@suse.de>
1252 2018-02-07 Richard Biener <rguenther@suse.de>
1254 PR tree-optimization/84204
1255 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1258 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1261 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1263 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1264 VEC_MERGE of a VEC_DUPLICATE.
1266 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1268 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1269 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1270 * doc/standards.texi (C Language): Document C2X.
1271 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1272 (rl78_option_override): Handle "GNU C2X" language name.
1274 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1276 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1277 Document C17 as published in 2018.
1279 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1282 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1283 bail out if both sides do not have the same storage order.
1285 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1287 * bitmap.c (bitmap_head::dump): New.
1288 * bitmap.h (bitmap_head): Add dump().
1289 * gimple-ssa-evrp-analyze.c
1290 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1291 (evrp_range_analyzer::set_ssa_range_info): Same.
1292 (evrp_range_analyzer::record_ranges_from_phis): Same.
1293 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1294 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1295 * gimple-ssa-sprintf.c (get_int_range): Same.
1296 (format_integer): Same.
1297 (sprintf_dom_walker::handle_gimple_call): Same.
1298 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1299 (ipcp_vr_lattice::top_p): Same.
1300 (ipcp_vr_lattice::bottom_p): Same.
1301 (ipcp_vr_lattice::set_to_bottom): Same.
1302 (ipa_vr_operation_and_type_effects): Same.
1303 (propagate_vr_across_jump_function): Same.
1304 (ipcp_store_vr_results): Same.
1305 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1306 (ipa_print_node_jump_functions_for_edge): Same.
1307 (ipa_get_value_range): Same.
1308 (ipa_compute_jump_functions_for_edge): Same.
1309 (ipa_write_jump_function): Same.
1310 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1311 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1313 * vr-values.c (set_value_range_to_nonnegative): Same.
1314 (set_value_range_to_truthvalue): Same.
1315 (vr_values::get_value_range): Same.
1316 (vr_values::set_defs_to_varying): Same.
1317 (vr_values::update_value_range): Same.
1318 (symbolic_range_based_on_p): Same.
1319 (vr_values::op_with_boolean_value_range_p): Same.
1320 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1321 (vr_values::extract_range_from_ssa_name): Same.
1322 (vr_values::extract_range_from_binary_expr): Same.
1323 (vr_values::extract_range_from_unary_expr): Same.
1324 (vr_values::extract_range_from_cond_expr): Same.
1325 (vr_values::extract_range_from_comparison): Same.
1326 (vr_values::check_for_binary_op_overflow): Same.
1327 (vr_values::extract_range_basic): Same.
1328 (vr_values::extract_range_from_assignment): Same.
1329 (compare_ranges): Same.
1330 (compare_range_with_value): Same.
1331 (vr_values::adjust_range_with_scev): Same.
1332 (vrp_valueize): Same.
1333 (vrp_valueize_1): Same.
1334 (vr_values::get_vr_for_comparison): Same.
1335 (vr_values::compare_name_with_value): Same.
1336 (vr_values::compare_names): Same.
1337 (vr_values::vrp_evaluate_conditional): Same.
1338 (find_case_label_ranges): Same.
1339 (vr_values::vrp_visit_switch_stmt): Same.
1340 (vr_values::extract_range_from_phi_node): Same.
1341 (vr_values::simplify_div_or_mod_using_ranges): Same.
1342 (vr_values::simplify_bit_ops_using_ranges): Same.
1343 (test_for_singularity): Same.
1344 (range_fits_type_p): Same.
1345 (vr_values::simplify_cond_using_ranges_1): Same.
1346 (vr_values::simplify_switch_using_ranges): Same.
1347 (vr_values::simplify_float_conversion_using_ranges): Same.
1348 (vr_values::two_valued_val_range_p): Same.
1349 (vr_values::add_equivalence): Move to value_range::equiv_add.
1350 * vr-values.h (vr_values::add_equivalence): Remove.
1351 (VR_INITIALIZER): Remove.
1352 * tree-vrp.c (value_range::set): New.
1353 (value_range::equiv_add): New.
1354 (value_range::value_range): New.
1355 (value_range::deep_copy): New.
1356 (value_range::check): New.
1357 (value_range::equal_p): New.
1358 (value_range::ignore_equivs_equal_p): New.
1359 (value_range::operator==): New.
1360 (value_range::operator!=): New.
1361 (value_range::symbolic_p): New.
1362 (value_range::numeric_p): New.
1363 (value_range::set_undefined): New.
1364 (value_range::set_varying): New.
1365 (value_range::may_contain_p): New.
1366 (value_range::equiv_clear): New.
1367 (value_range::singleton_p): New.
1368 (value_range::intersect): New.
1369 (value_range::dump): New.
1370 (value_range::set_and_canonicalize): New.
1371 (set_value_range): Adjust for value_range API.
1372 (set_value_range_to_undefined): Same.
1373 (set_value_range_to_varying): Same.
1374 (set_and_canonicalize_value_range): Same.
1375 (set_value_range_to_nonnull): Same.
1376 (set_value_range_to_null): Same.
1377 (range_is_null): Same.
1378 (range_is_nonnull): Same.
1379 (range_int_cst_p): Same.
1380 (range_int_cst_singleton_p): Same.
1381 (symbolic_range_p): Same.
1382 (range_includes_zero_p): Same.
1383 (value_range_constant_singleton): Same.
1384 (vrp_set_zero_nonzero_bits): Same.
1385 (ranges_from_anti_range): Same.
1386 (extract_range_into_wide_ints): Same.
1387 (extract_range_from_multiplicative_op): Same.
1388 (set_value_range_with_overflow): Same.
1389 (extract_range_from_binary_expr_1): Same.
1390 (extract_range_from_unary_expr): Same.
1391 (dump_value_range): Same.
1392 (debug_value_range): Same.
1393 (vrp_prop::check_array_ref): Same.
1394 (vrp_prop::check_mem_ref): Same.
1395 (vrp_prop::vrp_initialize): Same.
1396 (vrp_prop::visit_stmt): Same.
1397 (intersect_ranges): Same.
1398 (vrp_prop::visit_phi): Same.
1399 (vrp_prop::vrp_finalize): Same.
1400 (determine_value_range_1): Same.
1401 (determine_value_range): Same.
1402 (vrp_intersect_ranges_1): Rename to...
1403 (vrp_intersect_1): this.
1404 (vrp_intersect_ranges): Rename to...
1405 (value_range::intersect_helper): ...this.
1406 (vrp_meet_1): Rename to...
1407 (value_range::union_helper): ...this.
1408 (vrp_meet): Rename to...
1409 (value_range::union_): ...this.
1410 (copy_value_range): Remove.
1411 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1412 (value_range::vrtype): New.
1413 (value_range::type): New.
1414 (value_range::equiv): New.
1415 (value_range::min): New.
1416 (value_range::max): New.
1417 (value_range::varying_p): New.
1418 (value_range::undefined_p): New.
1419 (value_range::null_p): New.
1420 (value_range::equiv_add): New.
1421 (copy_value_range): Remove.
1423 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1425 * Makefile.in (SELFTEST_TARGETS): New.
1426 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1427 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1428 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1430 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1431 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1433 * configure: Regenerate.
1434 * configure.ac (selftest_languages): New.
1436 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1438 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1439 overflow wraps argument.
1440 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1441 wide_int_range_multiplicative_op.
1442 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1443 overflow wraps argument.
1444 (wide_int_range_multiplicative_op): Same.
1445 (wide_int_range_lshift): Same.
1446 (wide_int_range_div): Same.
1447 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1448 (wide_int_range_lshift): Same.
1449 (wide_int_range_div): Same.
1451 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1453 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1454 use sign as argument.
1455 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1456 wide_int_range_shift_undefined_p.
1458 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1460 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1462 (@despeculate_copy<ALLI_TI:mode>): ... This.
1463 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1466 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1468 * config.gcc: Obsolete *-*-solaris2.10*.
1469 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1471 2018-10-12 Jeff Law <law@redhat.com>
1473 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1474 reg + sym +- const_int addressing modes.
1476 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1478 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1479 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1481 (layout::start_annotation_line): Only print up to 3 of the
1482 margin character, to avoid touching the left-hand side.
1483 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1484 minimum margin width, as set by test_diagnostic_context's ctor.
1485 (selftest::test_fixit_insert_containing_newline): Likewise.
1486 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1487 (selftest::test_line_numbers_multiline_range): Clear
1488 dc.min_margin_width.
1489 * diagnostic.c (diagnostic_initialize): Initialize
1491 * diagnostic.h (struct diagnostic_context): Add field
1493 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1494 * opts.c (common_handle_option): Handle
1495 OPT_fdiagnostics_minimum_margin_width_.
1496 * selftest-diagnostic.c
1497 (selftest::test_diagnostic_context::test_diagnostic_context):
1498 Initialize min_margin_width to 6.
1499 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1501 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1503 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1504 Fix usage of "error_at_rich_loc" in the comment.
1506 2018-10-15 Renlin Li <renlin.li@arm.com>
1509 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1510 if-conversioned loop when it contains ifn with types not
1511 supported by backend.
1512 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1513 (direct_internal_fn_supported_p): New helper function.
1514 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1516 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1519 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1520 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1521 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1523 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1525 PR tree-optimization/87022
1526 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1527 bits in dist vector rather than the first one.
1529 2018-10-15 Richard Biener <rguenther@suse.de>
1532 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1533 (visit_loadstore): When a used restrict tag escaped verify that
1534 the points-to solution of "other" pointers do not include
1536 (compute_dependence_clique): If a used restrict tag escaped
1537 communicated that down to visit_loadstore.
1539 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1541 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1542 into reg if it isn't a general operand.
1544 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1547 * config/i386/sse.md (*vec_dupv2di): Add register source to
1550 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1553 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1554 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1555 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1556 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1558 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1560 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1561 (notice_args_size): Set it in the current trace if no insn that can
1562 throw internally has been seen yet.
1563 (connect_traces): When connecting args_size between traces, allow the
1564 incoming values not to match if there is an insn setting it before the
1565 first insn that can throw internally; in that case, force the creation
1566 of a CFI note on this latter insn.
1568 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1570 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1571 the base class, because using the injected-class-name was not clearly
1572 specified until DR 176.
1574 2018-10-12 Paul Koning <ni1d@arrl.net>
1576 * config/pdp11/pdp11.md (doloop_end): New expander.
1577 (doloop_end_insn): renamed from "doloop_end".
1578 (addqi3): New pattern.
1579 (subqi3): New pattern.
1580 * config/pdp11/predicates.md (incdec_operand): New predicate.
1582 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1585 * real.c (format_helper::can_represent_integral_type_p): New function
1586 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1587 * match.pd: New pattern.
1589 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1591 * configure.ac: Introduce --enable-large-address-aware
1592 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1593 * doc/install.texi: Document it.
1594 * configure, config.in: Rebuilt.
1595 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1596 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1597 (LINK_SPEC): Insert it.
1598 * config/i386/mingw-264.h: Likewise.
1600 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1602 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1604 PR rtl-optimization/87600
1605 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1607 2018-10-12 Paul Koning <ni1d@arrl.net>
1609 * doc/md.texi (doloop_end): Document that the pattern code may
1610 need to check operand mode.
1612 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1614 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1615 to zero-extend between int and floating-point registers.
1616 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1617 ldp into floating-point registers. Add type and arch attributes.
1618 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1619 Use f_loads for type attribute.
1621 2018-10-11 Martin Sebor <msebor@redhat.com>
1623 * doc/extend.texi (attribute packed): Correct typos.
1625 2018-10-11 Martin Sebor <msebor@redhat.com>
1627 * doc/extend.texi (attribute flatten): Mention interaction with
1630 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1633 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1634 Set new_decl virtual flag to zero.
1636 2018-10-11 Martin Sebor <msebor@redhat.com>
1639 * doc/extend.texi (attribute format_arg): Discuss using multiple
1640 attributes on a single function.
1642 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1644 PR tree-optimization/86829
1645 * match.pd (sin (atan (x))): New simplification rules.
1646 (cos (atan (x))): Likewise.
1647 * real.c (build_sinatan_real): New function.
1648 * real.h (build_sinatan_real): Prototype.
1650 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1652 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1654 (fold_mergeeo_helper): New helper function.
1655 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1656 intrinsics. Correct some whitespace indentation issues.
1658 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1661 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1662 Use HOST_WIDE_INT_1U for shift.
1664 2018-10-11 Doug Rupp <rupp@adacore.com>
1665 Olivier Hainque <hainque@adacore.com>
1667 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1668 Pass --relax to the linker for RTPs.
1669 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1671 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1672 Jan Hubicka <jh@suse.cz>
1673 Martin Jambor <mjambor@suse.cz>
1675 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1676 the same elements are repeated rather than printing all of them.
1677 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1678 "repeated" elements.
1679 * read-rtl-function.c (test_loading_repeat): New function.
1680 (read_rtl_function_c_tests): Call test_loading_repeat.
1681 * rtl-tests.c (test_dumping_repeat): New function.
1682 (rtl_tests_c_tests): Call test_dumping_repeat.
1684 2018-10-11 Richard Biener <rguenther@suse.de>
1686 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1687 bdver?_cost): Unify to ...
1688 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1689 * config/i386/i386.c (processor_cost_table): Adjust.
1691 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1694 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1695 the thunk when expanding to GIMPLE.
1697 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1699 * varasm.c (mergeable_string_section): Don't try to move zero-length
1700 strings to the merge section.
1702 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1705 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1707 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1710 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1711 to special_args set.
1713 2018-10-10 Richard Biener <rguenther@suse.de>
1715 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1716 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1717 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1718 and recursing and pattern terminating the recursion on SSE
1719 vector width using ix86_expand_reduc.
1720 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1721 width and recursing and SSE2 vector variant doing the final
1722 reduction with ix86_expand_reduc.
1723 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1724 with terminating the recursion at AVX level, splitting that
1727 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1729 * genmatch.c (error_cb): Rename to...
1730 (diagnostic_cb): ...this, converting int params to enums.
1731 (fatal_at): Update for renaming.
1732 (warning_at): Likewise.
1734 * input.c (selftest::ebcdic_execution_charset::apply):
1735 Update for renaming of...
1736 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1738 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1739 converting level and reason to enums.
1740 (class selftest::lexer_error_sink): Rename to...
1741 (class selftest::lexer_test_options): ...this, renaming field
1742 "m_errors" to "m_diagnostics".
1743 (selftest::lexer_test_options::apply): Update for renaming of...
1744 (selftest::lexer_test_options::on_error): ...this, renaming to...
1745 (selftest::lexer_test_options::on_diagnostic): ...this
1746 converting level and reason to enums.
1747 (selftest::test_lexer_string_locations_raw_string_unterminated):
1748 Update for renamings.
1749 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1752 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1754 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1755 * config/rs6000/pmmintrin.h: New file.
1757 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1759 PR tree-optimization/86659
1760 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1762 2018-10-09 Richard Biener <rguenther@suse.de>
1764 PR tree-optimization/63155
1765 * tree-ssa-structalias.c: Include tree-ssa.h.
1766 (get_constraint_for_ssa_var): For undefs return nothing_id.
1767 (find_func_aliases): Cleanup PHI handling.
1769 2018-10-09 Richard Biener <rguenther@suse.de>
1771 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1774 2018-10-09 Martin Liska <mliska@suse.cz>
1776 * asan.c (asan_emit_stack_protection): If a stack variable
1777 is located in a same file as current function, then emit
1778 line info into variable definition string.
1780 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1782 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1785 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1787 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1790 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1792 PR tree-optimization/86659
1793 * gimple-match.h (struct gimple_match_op): Add reverse field.
1794 (gimple_match_op::set_op): New overloaded method.
1795 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1796 the REF_REVERSE_STORAGE_ORDER flag on the value.
1797 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1798 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1800 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1803 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1804 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1806 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
1809 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1810 Defined with __builtin_ia32_vfmaddsubpd512_mask.
1812 2018-10-08 Richard Biener <rguenther@suse.de>
1814 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1815 cost the same as AVX128 ones.
1817 2018-10-08 Paul Koning <ni1d@arrl.net>
1819 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1820 (expand_block_move): New function.
1821 * config/pdp11/pdp11.c (output_block_move): Remove.
1822 (expand_block_move): New function.
1823 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1824 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1825 (*movmemhi1): Remove.
1827 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
1829 * config/s390/2827.md: Increase latencies for some FP instructions.
1831 2018-10-08 Richard Biener <rguenther@suse.de>
1833 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1835 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1836 * tree-vectorizer.h (dump_stmt_cost): Adjust.
1837 (add_stmt_cost): Dump return value of the hook.
1839 2018-10-08 Richard Biener <rguenther@suse.de>
1841 PR tree-optimization/63155
1842 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1843 (ssa_propagation_engine::ssa_propagate): Remove redundant
1844 bitmap bit clearing.
1846 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
1848 PR rtl-optimization/86939
1849 PR rtl-optimization/87479
1850 * ira.h (non_conflicting_reg_copy_p): New prototype.
1851 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1852 (make_hard_regno_dead): Don't add conflicts for register
1853 ignore_reg_for_conflicts.
1854 (make_object_dead): Likewise.
1855 (non_conflicting_reg_copy_p): New function.
1856 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1857 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1858 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1859 (make_hard_regno_dead): Don't add conflicts for register
1860 ignore_reg_for_conflicts. Remove special conflict handling of
1861 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
1862 check_pic_pseudo_p and update callers.
1863 (mark_pseudo_dead): Don't add conflicts for register
1864 ignore_reg_for_conflicts.
1865 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1867 2018-10-05 Andrew Waterman <andrew@sifive.com>
1868 Jim Wilson <jimw@sifive.com>
1870 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1871 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
1872 new pattern using HONOR_SNANS that emits one extra instruction.
1874 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1876 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1877 patterns): Merge SI and DI patterns to a GPR pattern.
1878 (unnamed define_insn and define_split for record form of that): Merge
1879 to a single define_insn_and_split pattern.
1881 2018-10-05 David Malcolm <dmalcolm@redhat.com>
1884 * input.c (expand_location_to_spelling_point): Add param "aspect"
1885 and use rather than hardcoding LOCATION_ASPECT_CARET.
1886 (get_substring_ranges_for_loc): Handle the case of a single token
1887 within a macro expansion.
1888 * input.h (expand_location_to_spelling_point): Add "aspect" param,
1889 defaulting to LOCATION_ASPECT_CARET.
1891 2018-10-05 Paul Koning <ni1d@arrl.net>
1893 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1894 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1895 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1896 (pdp11_guard_type): New function.
1898 2018-10-05 Paul Koning <ni1d@arrl.net>
1900 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1901 * config/pdp11/pdp11.opt (mfloat32): Remove.
1903 * doc/invoke.texi (pdp11 -mfloat32): Remove:
1904 (pdp11 -mfloat64): Remove.
1906 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1908 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1909 (*cmp<mode>_cc_i387): Ditto.
1910 (*cmpu<mode>_cc_i387): Ditto.
1911 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1912 * config/i386/i386.c (ix86_expand_fp_compare): Remove
1914 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1915 Emit x86_sahf_1 pattern.
1916 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1917 (ix86_expand_carry_flag_compare): Ditto.
1919 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1921 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1922 to reg_or_0_operand. Add "C" constraint.
1923 (*cmpxf_cc_i387): Ditto.
1924 (*cmp<mode>_i387): Change operand 2 predicate
1925 to nonimm_or_0_operand. Add "C" constraint.
1926 (*cmp<mode>_cc_i387): Ditto.
1927 (*cmp<mode>_0_i387): Remove insn pattern.
1928 (*cmp<mode>_0_cc_i387): Ditto.
1930 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1932 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1933 * config/i386/predicates.md (nonimm_or_0_operand): Rename
1934 from vector_move_operand. Update all uses.
1936 2018-10-05 Martin Sebor <msebor@redhat.com>
1938 PR tree-optimization/87490
1939 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1942 2018-10-05 Richard Biener <rguenther@suse.de>
1944 PR tree-optimization/63155
1945 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1946 vertical space in dumpfiles.
1947 * tree-ssa-propagate.h
1948 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1949 * tree-ssa-propagate.c (cfg_blocks_back): New global.
1950 (ssa_edge_worklist_back): Likewise.
1951 (curr_order): Likewise.
1952 (cfg_blocks_get): Remove abstraction.
1953 (cfg_blocks_add): Likewise.
1954 (cfg_blocks_empty_p): Likewise.
1955 (add_ssa_edge): Add to current or next worklist based on
1957 (add_control_edge): Likewise.
1958 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1960 (ssa_propagation_engine::ssa_propagate): ... here. Unify
1961 iteration from CFG and SSA edge worklist so we process
1962 everything in RPO order, prioritizing forward progress
1964 (ssa_prop_init): Allocate new worklists, do not dump
1966 (ssa_prop_fini): Free new worklists.
1968 2018-10-05 Richard Biener <rguenther@suse.de>
1970 * tree-core.h (tree_block::abstract_flag): Remove.
1971 (tree_block::block_num): Make full 32bits.
1972 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1973 * tree.h (BLOCK_ABSTRACT): Remove.
1974 * dwarf2out.c (gen_lexical_block_die): Remove dead code
1975 resulting from BLOCK_ABSTRACT being always false.
1976 (gen_inlined_subroutine_die): Likewise.
1977 (gen_block_die): Likewise.
1978 * tree.c (block_ultimate_origin): Likewise.
1979 * tree-pretty-print.c (dump_block_node): Remove code dealing
1980 with BLOCK_ABSTRACT.
1981 * tree-ssa-live.c (dump_scope_block): Likewise.
1982 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1983 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1985 2018-10-05 Richard Biener <rguenther@suse.de>
1987 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1988 is asked for initialize mode to the component mode of the
1991 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
1994 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1995 assembler for -mavx.
1996 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1998 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2001 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2003 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2004 to be DImode. When using mffscrn, force the operand to a register.
2006 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2008 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2009 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2010 X87MODEF mode iterator.
2011 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2012 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2013 X87MODEF mode iterator.
2015 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2017 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2018 -Wno-prio-ctor-dtor.
2020 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2022 * Makefile.in (OBJS): Add opt-problem.o.
2023 * dump-context.h: Include "selftest.h.
2024 (selftest::temp_dump_context): New forward decl.
2025 (class dump_context): Make friend of class
2026 selftest::temp_dump_context.
2027 (dump_context::dump_loc_immediate): New decl.
2028 (class dump_pretty_printer): Move here from dumpfile.c.
2029 (class temp_dump_context): Move to namespace selftest.
2030 (temp_dump_context::temp_dump_context): Add param
2031 "forcibly_enable_dumping".
2032 (selftest::verify_dumped_text):
2033 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2034 (selftest::verify_item):
2035 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2036 (ASSERT_IS_TREE): Likewise.
2037 (ASSERT_IS_GIMPLE): Likewise.
2038 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2040 (dump_context::dump_loc_immediate): ...this new function.
2041 (class dump_pretty_printer): Move to dump-context.h.
2042 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2043 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2044 (temp_dump_context::temp_dump_context): Move to "selftest"
2045 namespace. Add param "forcibly_enable_dumping", and use it to
2046 conditionalize the use of m_pp;
2047 (selftest::verify_dumped_text): Make non-static.
2048 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2049 (selftest::verify_item): Make non-static.
2050 (ASSERT_IS_TEXT): Move to dump-context.h.
2051 (ASSERT_IS_TREE): Likewise.
2052 (ASSERT_IS_GIMPLE): Likewise.
2053 (selftest::test_capture_of_dump_calls): Pass "true" for new
2054 param of temp_dump_context.
2055 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2056 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2058 * opt-problem.cc: New file.
2059 * opt-problem.h: New file.
2060 * optinfo-emit-json.cc
2061 (selftest::test_building_json_from_dump_calls): Pass "true" for
2062 new param of temp_dump_context.
2063 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2064 (optinfo::emit_for_opt_problem): New function.
2065 (optinfo::emit): Clarity which emit_item is used.
2066 * optinfo.h (optinfo::get_dump_location): New accessor.
2067 (optinfo::emit_for_opt_problem): New decl.
2068 (optinfo::emit): Make const.
2069 * selftest-run-tests.c (selftest::run_tests): Call
2070 selftest::opt_problem_cc_tests.
2071 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2072 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2073 bool to opt_result, converting fprintf messages to
2074 opt_result::failure_at calls. Add "stmt" param for use by the
2076 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2077 (runtime_alias_check_p): Convert return type from bool to
2078 opt_result, converting dump_printf calls to
2079 opt_result::failure_at, using the statement DDR_A for their
2081 (find_data_references_in_stmt): Convert return type from bool to
2082 opt_result, converting "return false" to opt_result::failure_at
2084 * tree-data-ref.h: Include "opt-problem.h".
2085 (dr_analyze_innermost): Convert return type from bool to opt_result,
2086 and add a const gimple * param.
2087 (find_data_references_in_stmt): Convert return type from bool to
2089 (runtime_alias_check_p): Likewise.
2090 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2091 dr_analyze_innermost.
2092 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2093 Convert return type from bool to opt_result, adding a message for
2094 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2095 (vect_analyze_data_ref_dependence): Convert return type from bool
2096 to opt_result. Change sense of return type from "false"
2097 effectively meaning "no problems" to "false" meaning a problem,
2098 so that "return false" becomes "return opt_result::success".
2099 Convert "return true" calls to opt_result::failure_at, using
2100 the location of statement A rather than vect_location.
2101 (vect_analyze_data_ref_dependences): Convert return type from bool
2103 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2104 calls to opt_result::failure_at, using the stmt location rather
2106 (vect_verify_datarefs_alignment): Convert return type from bool
2108 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2109 into multiple more-tightly-scoped copies.
2110 (vect_analyze_data_refs_alignment): Convert return type from bool
2112 (vect_analyze_data_ref_accesses): Likewise, converting a
2113 "return false" to a "return opt_result::failure_at", adding a
2115 (vect_prune_runtime_alias_test_list): Convert return type from
2116 bool to opt_result, converting dump_printf_loc to
2117 opt_result::failure_at. Add a %G to show the pertinent statement,
2118 and use the stmt's location rather than vect_location.
2119 (vect_find_stmt_data_reference): Convert return type from
2120 bool to opt_result, converting dump_printf_loc to
2121 opt_result::failure_at, using stmt's location.
2122 (vect_analyze_data_refs): Convert return type from bool to
2123 opt_result. Convert "return false" to "return
2124 opt_result::failure_at", adding messages as needed.
2125 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2126 type from bool to opt_result.
2127 (vect_determine_vf_for_stmt): Likewise.
2128 (vect_determine_vectorization_factor): Likewise, converting
2129 dump_printf_loc to opt_result::failure_at, using location of phi
2130 rather than vect_location.
2131 (vect_analyze_loop_form_1): Convert return type from bool to
2132 opt_result, converting dump_printf_loc calls, retaining the use of
2134 (vect_analyze_loop_form): Convert return type from loop_vec_info
2135 to opt_loop_vec_info.
2136 (vect_analyze_loop_operations): Convert return type from bool to
2137 opt_result, converting dump_printf_loc calls, using the location
2138 of phi/stmt rather than vect_location where available. Convert
2139 various "return false" to "return opt_result::failure_at" with
2140 "unsupported phi" messages.
2141 (vect_get_datarefs_in_loop): Convert return type from bool to
2142 opt_result. Add a message for the
2143 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2144 (vect_analyze_loop_2): Convert return type from bool to
2145 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2146 each "goto again;", adding new messages where needed.
2147 Add "unsupported grouped {store|load}" messages.
2148 (vect_analyze_loop): Convert return type from loop_vec_info to
2150 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2152 * tree-vect-stmts.c (process_use): Likewise, converting
2153 dump_printf_loc call and using stmt location, rather than
2155 (vect_mark_stmts_to_be_vectorized): Likeise.
2156 (vect_analyze_stmt): Likewise, adding a %G.
2157 (vect_get_vector_types_for_stmt): Convert return type from bool to
2158 opt_result, converting dump_printf_loc calls and using stmt
2159 location, rather than vect_location.
2160 (vect_get_mask_type_for_stmt): Convert return type from tree to
2161 opt_tree, converting dump_printf_loc calls and using stmt location.
2162 * tree-vectorizer.c: Include "opt-problem.h.
2163 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2164 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2165 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2166 enabled, use it to report at the top level "couldn't vectorize
2167 loop" followed by the problem.
2168 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2169 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2171 (vect_analyze_stmt): Likewise.
2172 (vect_get_vector_types_for_stmt): Likewise.
2173 (tree vect_get_mask_type_for_stmt): Likewise.
2174 (vect_analyze_data_ref_dependences): Likewise.
2175 (vect_enhance_data_refs_alignment): Likewise.
2176 (vect_analyze_data_refs_alignment): Likewise.
2177 (vect_verify_datarefs_alignment): Likewise.
2178 (vect_analyze_data_ref_accesses): Likewise.
2179 (vect_prune_runtime_alias_test_list): Likewise.
2180 (vect_find_stmt_data_reference): Likewise.
2181 (vect_analyze_data_refs): Likewise.
2182 (vect_analyze_loop): Convert return type from loop_vec_info to
2184 (vect_analyze_loop_form): Likewise.
2185 (vect_analyze_slp): Convert return type from bool to opt_result.
2187 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2189 * doc/invoke.texi (-fopt-info): Document new "internals"
2191 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2192 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2194 (optinfo_verbosity_options): Add "internals".
2195 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2196 (dump_context::apply_dump_filter_p): New member function.
2197 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2198 explicitly masking the dump_kind.
2199 (dump_context::begin_scope): Increment the scope depth first. Use
2200 apply_dump_filter_p rather than explicitly masking the dump_kind.
2201 (dump_context::emit_item): Use apply_dump_filter_p rather than
2202 explicitly masking the dump_kind.
2203 (dump_dec): Likewise.
2204 (dump_hex): Likewise.
2205 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2206 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2207 (opt_info_switch_p): Update handling of default
2208 MSG_OPTIMIZED_LOCATIONS to cope with default of
2209 MSG_PRIORITY_USER_FACING.
2210 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2211 masking the dump_kind.
2212 (selftest::test_capture_of_dump_calls): Update test_dump_context
2213 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2214 than MSG_ALL. Generalize scope test to be run at all four
2215 combinations of with/without MSG_PRIORITY_USER_FACING and
2216 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2217 for each of the two values.
2218 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2219 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2220 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2221 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2222 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2223 with MSG_PRIORITY_*.
2224 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2225 dump messages as MSG_PRIORITY_USER_FACING.
2226 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2227 about the interaction with MSG_PRIORITY_*.
2229 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2231 * varasm.c (output_constant): Add new parameter merge_strings.
2232 Make strings properly zero terminated in merge string sections.
2233 (mergeable_string_section): Don't fail if the last char is non-zero.
2234 (assemble_variable_contents): Handle merge string sections.
2235 (assemble_variable): Likewise.
2236 (assemble_constant_contents): Likewise.
2237 (output_constant_def_contents): Likewise.
2238 (output_constructor_array_range,
2239 output_constructor_regular_field): Adjust call to output_constant.
2240 (output_object_block): Adjust call to assemble_constant_contents
2241 and assemble_variable_contents.
2243 2018-10-04 Martin Liska <mliska@suse.cz>
2246 * cgraphunit.c (process_function_and_variable_attributes):
2247 Warn about a function with alias attribute and a body.
2249 2018-10-04 Martin Liska <mliska@suse.cz>
2252 * multiple_target.c (redirect_to_specific_clone): New function.
2253 (ipa_target_clone): Use it.
2254 * tree-inline.c: Fix comment.
2256 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2258 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2260 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2261 (gcc::dump_manager::register_pass): New member function, adapted
2262 from loop body in gcc::pass_manager::register_pass, adding a
2263 call to update_dfi_for_opt_info.
2264 (gcc::dump_manager::opt_info_enable_passes): Store the
2265 -fopt-info options into the new fields. Move the loop
2267 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2269 * dumpfile.h (struct opt_pass): New forward decl.
2270 (gcc::dump_manager::register_pass): New decl.
2271 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2272 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2273 "m_optinfo_flags", and "m_optinfo_filename".
2274 * passes.c (gcc::pass_manager::register_pass): Move all of the
2275 dump-handling code to gcc::dump_manager::register_pass.
2277 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2279 PR rtl-optimization/87466
2280 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2281 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2282 * doc/tm.texi: Regenerate.
2283 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2284 * lra-lives.c (process_bb_lives): Likewise.
2285 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2288 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2290 * params.c (add_params): Fix initialization.
2292 2018-10-04 Martin Liska <mliska@suse.cz>
2294 PR gcov-profile/84107
2295 * tree-profile.c (init_ic_make_global_vars):
2296 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2297 Come up with new ic_tuple* variables. Emit
2298 __gcov_indirect_call{,_topn} variables.
2299 (gimple_gen_ic_profiler): Access the variable
2301 (gimple_gen_ic_func_profiler): Access
2302 __gcov_indirect_call.callee field.
2303 (gimple_init_gcov_profiler): Use ptr_type_node.
2304 * value-prof.c (gimple_ic): Use ptr_type_node.
2306 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2308 PR tree-optimization/85787
2309 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2310 into this function and add support for detecting multiple phis.
2311 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2313 2018-10-04 Martin Liska <mliska@suse.cz>
2316 * ipa-inline.c (inline_to_all_callers_1):
2317 Call ultimate_alias_target for node being inlined.
2319 2018-10-03 Jeff Law <law@redhat.com>
2321 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2323 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2324 * tree.h (get_typenode_from_name): Prototype.
2326 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2328 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2329 Change operand 2 predicate to nonimmediate_operand.
2330 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2332 2018-10-03 Martin Sebor <msebor@redhat.com>
2333 Jeff Law <law@redhat.com>
2335 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2337 (get_string_length): Detect unterminated arrays.
2338 (format_string): Same.
2339 (format_directive): Warn about unterminated arrays.
2340 (handle_gimple_call): Mark statements with no_warning as needed.
2342 2018-10-03 Jim Wilson <jimw@sifive.com>
2344 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2345 also define __riscv_abi_rve. Delete trailing white space.
2347 2018-10-03 Paul Koning <ni1d@arrl.net>
2349 Enable LRA register allocator for PDP11.
2350 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2353 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2354 * config/pdp11/pdp11.opt (-mlra): New option.
2355 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2357 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2359 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2360 (*<absneg:code>extend<mode>xf2): Ditto.
2362 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2364 PR tree-optimization/87415
2365 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2368 2018-10-02 Jeff Law <law@redhat.com>
2370 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2371 an unterminated string is discovered. Bubble up range
2372 even for unterminated strings.
2373 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2374 indicates the string was not terminated via NONSTR.
2376 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2378 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2379 pointer conversions.
2380 Do not do anything special for anti-ranges.
2382 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2384 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2385 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2387 2018-10-03 Martin Liska <mliska@suse.cz>
2389 PR gcov-profile/86109
2390 * coverage.c (coverage_begin_function): Do not
2391 mark lambdas as artificial.
2392 * tree-core.h (struct GTY): Remove tm_clone_flag
2393 and introduce new lambda_function.
2394 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2396 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2399 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2400 P8_VECTOR and VSX are enabled.
2402 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2404 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2405 0x3907 as CPU model number.
2407 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2409 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2410 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2411 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2412 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2413 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2414 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2415 value from arch12 to z14.
2417 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2419 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2421 (isinf<mode>2): Ditto.
2423 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2425 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2426 before emitting fxam. Perform calculations in XFmode.
2428 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2430 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2432 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2435 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2436 * tree.c (signed_or_unsigned_type_for): Handle complex.
2438 2018-10-02 Jeff Law <law@redhat.com>
2440 * gimple-fold.c (get_range_strlen): Remove dead code.
2442 2018-10-02 Martin Sebor <msebor@redhat.com>
2443 Jeff Law <law@redhat.com>
2445 * builtins.c (unterminated_array): Add new arguments.
2446 If argument is not terminated, bubble up size and exact
2448 (expand_builtin_strnlen): Detect, avoid expanding
2449 and diagnose unterminated arrays.
2450 (c_strlen): Fill in offset of start of unterminated strings.
2451 * builtins.h (unterminated_array): Update prototype.
2453 2018-10-02 Richard Biener <rguenther@suse.de>
2455 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2456 of haddv4df, first reduce to SSE width and exploit the fact
2457 that we only need element zero with the reduction result.
2458 (reduc_plus_scal_v2df): Likewise.
2460 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2462 * dojump.h (do_jump): Delete.
2463 (do_jump_1): Likewise.
2464 (split_comparison): Move around.
2465 * dojump.c (do_jump): Make static.
2466 (do_jump_1): Likewise.
2467 (jumpifnot): Move around.
2468 (jumpifnot_1): Likewise.
2470 (jumpif_1): Likewise.
2471 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2473 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2475 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2476 insns in the delay slot and add_insn_after for the jump insn.
2478 2018-10-02 Richard Biener <rguenther@suse.de>
2480 * tree-inline.c (expand_call_inline): Use the location of
2481 the callee declaration for the inline-entry marker.
2482 * final.c (notice_source_line): Remove special-casing of
2483 NOTE_INSN_INLINE_ENTRY.
2485 2018-10-01 Carl Love <cel@us.ibm.com>
2488 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2489 (__builtin_mtfsb0): New.
2490 (__builtin_mtfsb1): New.
2491 ( __builtin_set_fpscr_rn): New.
2492 (__builtin_set_fpscr_drn): New.
2493 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2494 (rs6000_expand_set_fpscr_rn_builtin): Add.
2495 (rs6000_expand_set_fpscr_drn_builtin): Add.
2496 (rs6000_expand_builtin): Add case statement entries for
2497 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2498 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2499 RS6000_BUILTIN_MFFSL.
2500 (rs6000_init_builtins): Add ftype initialization and def_builtin
2501 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2502 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2503 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2504 rs6000_mffscdrn): Add define_insn.
2505 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2506 * doc/extend.texi: Add documentation for the builtins.
2508 2018-10-01 Richard Biener <rguenther@suse.de>
2510 PR tree-optimization/87465
2511 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2512 causing branch miscounts.
2514 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2516 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2517 aarch64_option_default_param): New.
2518 (params.h): Include.
2519 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2520 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2521 stack-clash protection validation code.
2523 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2525 * params.c (validate_param): New.
2526 (add_params): Use it.
2527 (set_param_value): Refactor param validation into validate_param.
2528 (diagnostic.h): Include.
2529 * diagnostic.h (diagnostic_ready_p): New.
2531 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2533 * params.c (set_param_value):
2534 Add index of parameter being validated.
2535 * common/common-target.def (option_validate_param): New.
2536 * common/common-targhooks.h (default_option_validate_param): New.
2537 * common/common-targhooks.c (default_option_validate_param): New.
2538 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2539 * doc/tm.texi: Regenerate.
2541 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2544 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2545 Add validation for stack-clash parameters and set defaults.
2547 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2550 * configure.ac: Add stack-clash-protection-guard-size.
2551 * doc/install.texi: Document it.
2552 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2553 * params.def: Update comment for guard-size.
2554 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2555 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2556 * configure: Regenerate.
2558 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2561 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2562 STACK_DYNAMIC_OFFSET): New.
2563 * config/aarch64/aarch64.c (aarch64_layout_frame):
2564 Update outgoing args size.
2565 (aarch64_stack_clash_protection_alloca_probe_range,
2566 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2568 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2571 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2573 * target.def (stack_clash_protection_alloca_probe_range): New.
2574 (stack_clash_protection_final_dynamic_probe): Remove.
2575 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2576 (default_stack_clash_protection_final_dynamic_probe): Remove.
2577 * targhooks.c: Likewise.
2578 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2579 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2580 * doc/tm.texi: Regenerate.
2582 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2585 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2586 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2587 aarch64_clamp_to_uimm12_shift): New.
2588 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2589 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2591 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2594 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2596 2018-10-01 Jeff Law <law@redhat.com>
2597 Richard Sandiford <richard.sandiford@linaro.org>
2598 Tamar Christina <tamar.christina@arm.com>
2601 * config/aarch64/aarch64.md
2602 (probe_stack_range): Add k (SP) constraint.
2603 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2604 STACK_CLASH_MAX_UNROLL_PAGES): New.
2605 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2606 stack probes for stack clash.
2607 (aarch64_allocate_and_probe_stack_space): New.
2608 (aarch64_expand_prologue): Use it.
2609 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2610 (aarch64_sub_sp): Add emit_move_imm optional param.
2612 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2614 PR tree-optimization/87261
2615 * match.pd: Remove trailing whitespace.
2616 Add (x & y) | ~(x | y) -> ~(x ^ y),
2617 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2619 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2621 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2623 (ashlsi3_insn): Update instruction constraints.
2624 (ashrsi3_insn): Likewise.
2625 (rotrsi3): Likewise.
2626 (add_shift): Likewise.
2627 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2628 avoids placing in the limm field small constants which, otherwise,
2629 could end into a small instruction.
2631 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2633 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2634 destination register is not odd-even.
2635 (umaddsidi4_split): Likewise.
2637 2018-10-01 Richard Biener <rguenther@suse.de>
2639 * tree-inline.c (expand_call_inline): Store origin of fn
2640 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2641 * tree.c (block_ultimate_origin): Simplify and do some
2644 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2646 * config/i386/mmx.md (EMMS): New int iterator.
2647 (emms): New int attribute.
2648 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2649 EMMS int iterator. Explicitly declare clobbers.
2650 (mmx_emms): Remove expander.
2652 * config/i386/predicates.md (emms_operation): Remove predicate.
2653 (vzeroall_pattern): New predicate.
2654 (vzeroupper_pattern): Rename from vzeroupper_operation.
2655 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2656 vzeroupper_pattern and vzeroall_pattern predicates.
2658 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2660 PR rtl-optimization/86939
2661 * ira-lives.c (make_hard_regno_born): Rename from this...
2662 (make_hard_regno_live): ... to this. Remove update to conflict
2663 information. Update function comment.
2664 (make_hard_regno_dead): Add conflict information update. Update
2666 (make_object_born): Rename from this...
2667 (make_object_live): ... to this. Remove update to conflict information.
2668 Update function comment.
2669 (make_object_dead): Add conflict information update. Update function
2671 (mark_pseudo_regno_live): Call make_object_live.
2672 (mark_pseudo_regno_subword_live): Likewise.
2673 (mark_hard_reg_dead): Update function comment.
2674 (mark_hard_reg_live): Call make_hard_regno_live.
2675 (process_bb_node_lives): Likewise.
2676 * lra-lives.c (make_hard_regno_born): Rename from this...
2677 (make_hard_regno_live): ... to this. Remove update to conflict
2678 information. Remove now uneeded check_pic_pseudo_p argument.
2679 Update function comment.
2680 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2681 to conflict information. Update function comment.
2682 (mark_pseudo_live): Remove update to conflict information. Update
2684 (mark_pseudo_dead): Add conflict information update.
2685 (mark_regno_live): Call make_hard_regno_live.
2686 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2687 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2689 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2692 * config/i386/i386.c (construct_container): Use TImode for
2693 BLKmode values in 2 integer registers.
2695 2018-09-29 Jeff Law <law@redhat.com>
2697 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2698 c_strlen rather than just a tree *.
2699 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2700 Update recursive calls appropriately. If caller did not provide a
2701 suitable data pointer, create a local one. When a non-terminated
2702 string is discovered, bubble up information about the string via the
2703 c_strlen_data object.
2704 * builtins.h (c_strlen): Update prototype.
2705 (c_strlen_data): New structure.
2706 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2707 For a type 2 call, if c_strlen indicates a non-terminated string
2708 use the length of the non-terminated string.
2709 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2711 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2714 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2715 __m512d type for __A argument rather than __m512.
2717 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2719 * match.pd (simple_comparison): Don't optimize if either operand is
2720 a function pointer when target needs function pointer canonicalization.
2722 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2724 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2725 power5 .. power9 to remove indirection.
2726 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2727 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2728 ASM_CPU_476_SPEC): Delete.
2729 (ASM_CPU_SPEC): Adjust.
2730 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2731 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2733 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2735 * config.in: Delete HAVE_AS_DCI.
2736 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2737 * config/rs6000/rs6000.h: Ditto.
2738 * configure.ac: Delete HAVE_AS_DCI.
2739 * configure: Regenerate.
2741 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2743 * config.in (HAVE_AS_LWSYNC): Delete.
2744 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2745 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2747 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2748 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2750 * configure.ac: Delete HAVE_AS_LWSYNC.
2751 * configure: Regenerate.
2753 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2754 Pierre-Marie de Rodat <derodat@adacore.com>
2756 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2757 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2758 (cgraph_node::create_thunk): Add indirect_offset parameter.
2759 (thunk_adjust): Likewise.
2760 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2761 and initialize the corresponding field with it.
2762 (cgraph_node::dump): Dump indirect_offset field.
2763 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2764 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2765 (thunk_adjust): Add indirect_offset parameter and deal with it.
2766 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2767 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2768 or if the thunk is external or local. Fix formatting. Do not chain
2769 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2770 if any, in the GIMPLE representation.
2771 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2772 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2773 (input_node): Read indirect_offset field.
2774 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2775 call to thunk_adjust.
2776 * tree-nested.c (struct nesting_info): Add thunk_p field.
2777 (create_nesting_tree): Set it.
2778 (convert_all_function_calls): Copy static chain from targets to thunks.
2779 (finalize_nesting_tree_1): Return early for thunks.
2780 (unnest_nesting_tree_1): Do not finalize thunks.
2781 (gimplify_all_functions): Do not gimplify thunks.
2783 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2785 * opt-suggestions.c (option_proposer::build_option_suggestions):
2786 Release "option_values".
2788 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2790 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2791 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2792 * dumpfile.c (kind_as_string): New function.
2793 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2794 kind_as_string to vary the prefix based on dump_kind.
2795 (selftest::test_capture_of_dump_calls): Update for above.
2797 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2799 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2800 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2802 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2804 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2805 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2806 INVALID_REGNUM instead of FPSR_REG.
2807 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2808 * config/i386/i386.md: Update comment of FP compares.
2809 (fldenv): Do not clobber FPSR_REG.
2811 2018-09-28 Richard Biener <rguenther@suse.de>
2813 * tree.h (BLOCK_ORIGIN): New.
2814 * omp-expand.c (grid_expand_target_grid_body): Assign
2815 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2816 * tree-inline.c (remap_block): Likewise.
2817 * auto-profile.c (get_function_decl_from_block): Simplify
2818 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2819 * langhooks.c (lhd_print_error_function): Likewise.
2820 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2822 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2823 * tree.c (block_nonartificial_location): Likewise.
2824 (block_ultimate_origin): Likewise.
2825 * tree-pretty-print.c (percent_K_format): Likewise. Remove
2826 no longer needed LTO case.
2828 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
2829 Jan Hubicka <jh@suse.cz>
2830 Martin Jambor <mjambor@suse.cz>
2832 * simplify-rtx.c (simplify_merge_mask): New function.
2833 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2834 same masks are used in op1 or op2.
2835 (test_vec_merge): New function.
2836 (test_vector_ops): Call test_vec_merge.
2838 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2840 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2841 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2842 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2843 (cypress_costs): Set it.
2844 (supersparc_costs): Likewise.
2845 (hypersparc_costs): Likewise.
2846 (leon_cost): Likewise.
2847 (leon3_costs): Likewise.
2848 (sparclet_costs): Likewise.
2849 (ultrasparc_costs): Likewise.
2850 (ultrasparc_costs): Likewise.
2851 (niagara_costs): Likewise.
2852 (niagara2_costs): Likewise.
2853 (niagara3_costs): Likewise.
2854 (niagara4_costs): Likewise.
2855 (niagara7_costs): Likewise.
2856 (m8_costs): Likewise.
2857 (TARGET_CAN_FOLLOW_JUMP): Define.
2858 (pass_work_around_errata::gate): Minor tweak.
2859 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2860 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2861 Automaitcally clear MASK_FSMULD mask for V7 processors.
2862 (sparc_can_follow_jump): New static function.
2863 (output_ubranch): Deal with CROSSING_JUMP_P.
2864 (sparc_use_sched_lookahead): Rewrite using switch statement.
2865 (sparc_issue_rate): Reorder.
2866 (sparc_branch_cost): New function.
2868 2018-09-27 Martin Sebor <msebor@redhat.com>
2870 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2871 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2872 (int_fits_type_p): Same.
2874 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
2876 * config/i386/i386.md (FPCR_REG): Remove.
2877 (UNSPEC_FLDCW): Remove.
2878 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2879 (x86_fldcw_1): Remove insn pattern.
2880 (fnstenv): Do not clobber FPCR_REG.
2882 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2883 (CALL_USED_REGISTERS): Ditto.
2884 (REG_ALLOC_ORDER): Ditto.
2885 (REG_CLASS_CONTENTS): Ditto.
2886 (HI_REGISTER_NAMES): Ditto.
2887 (ADDITIONAL_REGISTER_NAMES): Use defines instead
2888 of numerical constants.
2889 * config/i386/i386.c (regclass_map): Remove fpsr register.
2890 (dbx_register_map): Ditto.
2891 (dbx64_register_map): Ditto.
2892 (svr4_dbx_register_map): Ditto.
2893 (print_reg): Do not handle FPCR_REG.
2895 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
2898 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2899 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2900 Delete, always treat as true.
2901 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2902 Ditto. Simplify remaining code.
2903 * config/powerpcspe/powerpcspe.h: Ditto.
2904 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2905 Simplify remaining code.
2906 (rs6000_expand_builtin): Ditto.
2907 * config/rs6000/rs6000.h: Ditto.
2908 * configure.ac: Ditto.
2909 * configure: Regenerate.
2911 2018-09-27 Martin Liska <mliska@suse.cz>
2913 * coverage.c (get_coverage_counts): Revert the formatting
2914 of missing profile opt info.
2916 2018-09-27 Richard Biener <rguenther@suse.de>
2920 * dwarf2out.c (set_block_origin_self): Do not mark outermost
2921 block as we do not output that.
2922 (gen_inlined_subroutine_die): Elide the originally outermost
2923 block, matching what we do for concrete instances.
2924 (decls_for_scope): Add parameter specifying whether to recurse
2927 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
2928 Tom de Vries <tom@codesourcery.com>
2932 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2933 STORE_FLAG_VALUE == 1.
2935 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
2937 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2938 constant definitions.
2939 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2940 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2941 ("speculation_barrier"): New expander definition.
2943 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
2945 PR gcov-profile/86957
2946 * common.opt: New warning option -Wmissing-profile.
2947 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2948 * doc/invoke.texi: Document -Wmissing-profile.
2950 2018-09-26 Jim Wilson <jimw@sifive.com>
2952 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2953 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2955 2018-09-26 Martin Sebor <msebor@redhat.com>
2957 * tree.c (zerop): Change return type to bool.
2958 (integer_zerop, integer_onep, integer_each_onep): Same.
2959 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2960 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2961 (real_onep, real_minus_onep, chain_index): Same.
2962 (print_type_hash_statistics, type_list_equal): Same.
2963 * tree.h (zerop): Same.
2964 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2965 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2966 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2967 (real_onep, real_minus_onep, chain_index): Same.
2968 (print_type_hash_statistics, type_list_equal): Same.
2970 2018-09-26 Jim Wilson <jimw@sifive.com>
2972 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2974 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2977 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2978 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2981 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
2983 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2985 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
2987 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2988 and FP_SECOND_SSE_REGS.
2989 (REG_CLASS_NAMES): Ditto.
2990 (REG_CLASS_CONTENTS): Ditto.
2991 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2992 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2993 (ix86_preferred_output_reload_class): Ditto.
2994 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2995 clobber constraint to "=&f".
2996 (fix_truncdi_i387): Ditto.
2997 (lrintxfdi2): Ditto.
2998 (fistdi2_<rounding>): Ditto.
2999 (fpremxf4_i387): Change "=u" constraint to "=f".
3000 (fprem1xf4_i387): Ditto.
3002 (fptanxf4_i387): Ditto.
3003 (fxtractxf3_i387): Ditto.
3004 (fscalexf4_i387): Ditto.
3005 (atan2xf3): Change "u" constraint to "f".
3006 (fyl2xxf3_i387): Ditto.
3007 (fyl2xp1xf3_i387): Ditto.
3009 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3012 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3013 for removed I387_MASK_PM entity.
3016 2018-09-26 Jeff Law <law@redhat.com>
3018 2018-09-26 Alexey Neyman <stilor@att.net>
3020 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3021 headers are no longer pulled in by <isl/val.h>.
3023 2018-09-26 Richard Biener <rguenther@suse.de>
3026 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3027 or concrete instance DIE to the tree. Create abstract origin
3028 attributes also for concrete instances.
3030 2018-09-26 Alexey Neyman <stilor@att.net>
3032 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3033 headers are no longer pulled in by <isl/val.h>.
3035 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3037 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3038 Use new helper functions.
3039 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3040 Use new helper functions.
3041 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3042 aarch_mm_needs_release): New declarations.
3043 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3044 aarch_mm_needs_release): New.
3046 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3048 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3049 (arm32_output_mi_thunk): Deal with long calls.
3051 2018-09-26 Richard Biener <rguenther@suse.de>
3055 * tree-inline.c (expand_call_inline): When the location
3056 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3057 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3058 the inserted BLOCK to make inlined_function_outer_scope_p
3060 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3061 coords for reserved locations.
3063 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3065 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3066 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3067 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3068 (*sibcall_nonlocal_sysv<mode>): Ditto.
3069 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3070 (<bd>_<mode>): Ditto.
3071 (<bd>tf_<mode>): Ditto.
3073 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3075 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3076 control string as a list of templates instead of as C code.
3077 (*altivec_movti): Ditto.
3078 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3080 2018-09-25 Jim Wilson <jimw@sifive.com>
3082 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3083 when target symbol is weak.
3085 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3088 * builtins.c (unterminated_array): Simplify.
3089 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3090 where pointer arithmetic is safe.
3092 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3095 * config/rs6000/altivec.md (altivec_vspltb): Use
3096 const_0_to_15_operand instead of u5bit_cint_operand.
3097 (*altivec_vspltb_internal): Ditto.
3098 (altivec_vspltb_direct): Ditto.
3099 (altivec_vsplth): Use const_0_to_7_operand instead of
3101 (*altivec_vsplth_internal): Ditto.
3102 (altivec_vsplth_direct): Ditto.
3103 (altivec_vspltw): Use const_0_to_3_operand instead of
3105 (*altivec_vspltw_internal): Ditto.
3106 (altivec_vspltw_direct): Ditto.
3107 (altivec_vspltsf): Ditto.
3108 (*altivec_vspltsf_internal): Ditto.
3109 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3110 various splats with the proper size immediate. Reorder the various
3111 cases by ascending size of immediate, and put all such together.
3113 2018-09-25 Richard Biener <rguenther@suse.de>
3116 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3118 (maybe_create_die_with_external_ref): Do not create
3119 DW_TAG_imported_unit here.
3120 (add_abstract_origin_attribute): Handle external BLOCK refs.
3121 (dwarf2out_abstract_function): Simplify LTO case.
3122 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3123 rather than using maybe_create_die_with_external_ref.
3125 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3128 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3129 (frndintxf2_mask_pm_i387): Ditto.
3130 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3131 Enable for !flag_trapping_math.
3132 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3133 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3134 Change operand 1 predicate to nonimmediate_operand.
3135 (attr "i387_cw"): Remove mask_pm.
3136 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3137 (enum ix86_entity): Remove I387_MASK_PM.
3138 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3139 handle I387_MASK_PM.
3140 (ix86_mode_needed): Ditto.
3141 (ix86_mode_after): Ditto.
3142 (ix86_mode_entry): Ditto.
3143 (ix86_mode_exit): Ditto.
3144 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3146 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3148 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3149 to_update_switch_stmts to vNULL instead of calling create on them
3152 2018-09-25 Richard Biener <rguenther@suse.de>
3154 PR tree-optimization/87402
3155 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3156 (visit_phi): Re-instantiate handling of supposed to be VARYING
3157 but non-VARYING backedge value.
3159 2018-09-25 Richard Biener <rguenther@suse.de>
3162 * dwarf2out.c (struct sym_off_pair): New.
3163 (external_die_map): New global.
3164 (lookup_decl_die): When in LTO create DIEs lazily from the
3166 (lookup_block_die): New function, create DIEs lazily in LTO.
3167 (equate_block_to_die): New function.
3168 (dwarf2out_die_ref_for_decl): During WPA get the association
3169 from the external DIE map.
3170 (dwarf2out_register_external_die): Record mapping into the
3172 (maybe_create_die_with_external_ref): New function split out from
3173 DIE generation part of old dwarf2out_register_external_die.
3174 (add_abstract_origin_attribute): Do not return the DIE. When
3175 in LTO reference externals directly.
3176 (dwarf2out_abstract_function): When in LTO ignore calls for
3177 decls with external DIEs (already present abstract instances).
3178 (gen_call_site_die): Adjust.
3179 (add_high_low_attributes): Likewise.
3180 (gen_lexical_block_die): Likewise.
3181 (gen_inlined_subroutine_die): Likewie.
3182 (gen_block_die): Likewise.
3183 (dwarf2out_inline_entry): Likewise.
3184 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3187 2018-09-25 Martin Liska <mliska@suse.cz>
3189 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3190 integers and not by a float value.
3192 2018-09-25 Martin Liska <mliska@suse.cz>
3195 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3197 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3198 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3199 * godump.c (go_format_type): Remove extra parenthesis.
3201 2018-09-25 Martin Liska <mliska@suse.cz>
3203 * alias.c (set_dest_equal_p): Remove unused function.
3204 * config/i386/i386.c (def_builtin_pure2): Likewise.
3205 * diagnostic-show-locus.c (class layout): Remove
3207 (layout::layout): Likewise here.
3208 * dump-context.h (class temp_dump_context): Likewise.
3209 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3210 (add_AT_loclistsptr): Likewise.
3211 (add_AT_offset): Likewise.
3212 (get_AT_hi_pc): Likewise.
3213 (is_comdat_die): Likewise.
3214 (type_is_enum): Likewise.
3215 (ceiling): Likewise.
3216 (add_AT_vms_delta): Likewise.
3217 (is_class_die): Likewise.
3218 * edit-context.c (class line_event): Remove unused field.
3219 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3221 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3222 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3223 (ok_for_base_p_nonstrict): Likewise.
3224 * tree-chrec.c (is_not_constant_evolution): Likewise.
3225 (chrec_fold_poly_cst): Likewise.
3226 * tree-if-conv.c (has_pred_critical_p): Likewise.
3227 * tree-ssa-coalesce.c (print_exprs): Likewise.
3228 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3229 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3230 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3231 (value_range_nonnegative_p): Likewise.
3233 2018-09-25 Martin Liska <mliska@suse.cz>
3235 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3236 Do not handle "GNU Pascal".
3237 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3239 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3240 from documentation. Likewise.
3241 * dbxout.c (dbxout_range_type): Likewise.
3242 * doc/cpp.texi: Likewise.
3243 * doc/extend.texi: Likewise.
3244 * doc/frontends.texi: Likewise.
3245 * doc/invoke.texi: Remove Pascal entry.
3246 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3247 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3249 2018-09-25 Martin Liska <mliska@suse.cz>
3252 * doc/invoke.texi: Document all parameters and remove default
3255 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3258 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3259 contains HOST_WIDE_INTs when computing its size.
3261 2018-09-24 Jim Wilson <jimw@sifive.com>
3264 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3266 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3268 2018-09-24 Andrew Pinski <apinski@marvell.com>
3270 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3271 access prev before checking it for NULLness in the
3272 AARCH64_FUSE_CMP_BRANCH case.
3274 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3277 * config/i386/i386.c (rest_of_insert_endbranch): Set
3278 endbr_queued_at_entrance to true and don't insert ENDBR if
3279 x86_function_profiler will be called.
3280 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3282 * config/i386/i386.h (machine_function): Add
3283 endbr_queued_at_entrance.
3285 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3287 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3288 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3290 (check_attr_test): Use alternative_mask.
3291 (get_attr_value): Likewise.
3292 (compute_alternative_mask): Use alternative_mask and XWINT.
3293 (make_alternative_compare): Use alternative_mask.
3294 (attr_alt_subset_p): Use XWINT.
3295 (attr_alt_subset_of_compl_p): Likewise.
3296 (attr_alt_intersection): Use alternative_mask and XWINT.
3297 (attr_alt_union): Likewise.
3298 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3299 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3300 (simplify_test_exp): Use alternative_mask and XWINT.
3301 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3302 number calculation to support 64 bits. Generate code that
3303 checks 64-bit masks.
3304 (main): Use alternative_mask.
3305 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3307 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3310 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3311 RETURN+USE when returning via %r14.
3313 2018-09-24 Martin Liska <mliska@suse.cz>
3315 * gcov.c (output_lines): Print colorization legend
3316 for both flag_use_colors and flag_use_hotness_colors.
3319 2018-09-24 Martin Liska <mliska@suse.cz>
3321 * coverage.c (get_coverage_counts): Use warning_at
3322 with current_function_decl location. Use %qD in warning
3325 2018-09-24 Martin Liska <mliska@suse.cz>
3327 * memory-block.h (memory_block_pool::release): Annotate with
3328 valgrind that the memory is not accessible.
3330 2018-09-24 Martin Liska <mliska@suse.cz>
3333 * asan.c: Make asan_handled_variables extern.
3335 * cfgexpand.c (expand_stack_vars): Make sure
3336 a representative is unpoison if another
3337 variable in the partition is handled by
3338 use-after-scope sanitization.
3340 2018-09-24 Richard Biener <rguenther@suse.de>
3342 PR tree-optimization/63155
3343 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3344 the worklist when the edge of the respective argument isn't
3347 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3349 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3350 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3351 (MASK_CLASS_P): Update for rename.
3352 (MAYBE_MASK_CLASS_P): Ditto.
3353 (REG_CLASS_NAMES): Update.
3354 (REG_CLASS_CONTENT): Update.
3355 * config/i386/i386.c (regclass_map): Update for MASK_REG
3356 and ALL_MASK_REGS rename.
3357 * config/i386/constraints.md (Yk): Update for rename.
3360 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3362 * config/i386/i386.h (enum reg_class): Remove
3363 EVEX_SSE_REGS and MOD4_SSE_REGS.
3364 (REG_CLASS_NAMES): Update.
3365 (REG_CLASS_CONTENT): Update.
3366 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3367 registers as ALL_SSE_REGS.
3368 (ix86_additional_allocno_class_p): Remove.
3369 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3370 (ix86_register_priority): Lower priority of EVEX SSE registers.
3371 Use IN_RANGE macro where appropriate.
3372 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3373 AVX-5124VNNIW checks.
3374 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3375 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3376 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3377 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3378 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3379 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3380 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3381 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3382 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3383 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3384 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3385 * config/i386/constraints.md (Yh): Remove.
3387 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3389 * config/i386/i386.c (regclass_map): Declare integer REX registers
3392 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3394 * doc/service.texi (Service): Switch the fsf.org link to https.
3396 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3399 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3400 Define to speculation_safe_value_not_needed.
3402 2018-09-21 Florian Weimer <fweimer@redhat.com>
3405 * doc/extend.texi (Common Function Attributes): Mention that
3406 noreturn suppresses tail call optimization.
3408 2018-09-21 Jeff Law <law@redhat.com>
3410 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3411 vr_values::cleanup_edges_and_switches.
3412 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3414 (identify_jump_threads): Remove EDGE_IGNORE handling.
3415 (execute_vrp): Move handling of to_remove_edges and
3416 to_update_switch_stmts into vr_values class member functions.
3417 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3418 (to_update_switch_stmts): Likewise.
3419 * vr-values.c: Include cfghooks.h.
3420 (vr_values::vr_values): Initialize to_remove_edges and
3421 to_update_switch_stmts.
3422 (vr_values::~vr_values): Verify to_remove_edges and
3423 to_update_switch_stmts are empty.
3424 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3425 (vr_values::cleanup_edges_and_switches): New member function.
3426 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3427 function. Add new data members.
3429 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3431 PR tree-optimization/87309
3432 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3433 calls with pflags and alt_flags.
3434 (selftest::test_capture_of_dump_calls): Add test of interaction of
3435 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3437 2018-09-21 Olivier Hainque <hainque@adacore.com>
3439 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3441 2018-09-21 Olivier Hainque <hainque@adacore.com>
3443 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3445 2018-09-21 Olivier Hainque <hainque@adacore.com>
3447 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3448 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3449 (VXWORKS_LIBS_RTP): Minor reordering.
3451 2018-09-21 Olivier Hainque <hainque@adacore.com>
3453 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3454 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3456 2018-09-21 Olivier Hainque <hainque@adacore.com>
3458 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3459 (PTRDIFF_TYPE): Likewise.
3461 2018-09-21 Olivier Hainque <hainque@adacore.com>
3463 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3464 triplet, similar to support for VxWorks7.
3465 * config/vxworks-dummy.h: Provide a default definition
3466 of TARGET_VXWORKS64 to 0.
3468 2018-09-21 Olivier Hainque <hainque@adacore.com>
3470 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3471 * config/vxworks-dummy.h: here.
3473 2018-09-21 Olivier Hainque <hainque@adacore.com>
3475 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3477 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3478 Bo Zhou <zbo.zhou@hisilicon.com>
3480 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3481 * config/aarch64/aarch64-tune.md: Regenerated.
3482 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3483 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3484 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3486 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3487 Julian Brown <julian@codesourcery.com>
3489 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3491 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3493 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3494 if the call takes a static chain.
3496 2018-09-21 Martin Liska <mliska@suse.cz>
3498 * auto-profile.c (autofdo_source_profile::read): Do not
3500 (read_profile): Do not add working sets.
3501 (read_autofdo_file): Remove sum_all.
3502 (afdo_callsite_hot_enough_for_early_inline): Remove const
3504 * coverage.c (struct counts_entry): Remove gcov_summary.
3505 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3506 do not support GCOV_TAG_PROGRAM_SUMMARY.
3507 (get_coverage_counts): Remove summary and expected
3509 * coverage.h (get_coverage_counts): Likewise.
3510 * doc/gcov-dump.texi: Remove -w option.
3511 * gcov-dump.c (dump_working_sets): Remove.
3512 (main): Do not support '-w' option.
3513 (print_usage): Likewise.
3514 (tag_summary): Likewise.
3515 * gcov-io.c (gcov_write_summary): Do not dump
3517 (gcov_read_summary): Likewise.
3518 (gcov_histo_index): Remove.
3519 (gcov_histogram_merge): Likewise.
3520 (compute_working_sets): Likewise.
3521 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3523 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3524 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3525 (GCOV_HISTOGRAM_SIZE): Remove.
3526 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3527 (struct gcov_summary): Simplify rapidly just
3528 to runs and sum_max fields.
3529 (gcov_histo_index): Remove.
3530 (NUM_GCOV_WORKING_SETS): Likewise.
3531 (compute_working_sets): Likewise.
3532 * gcov-tool.c (print_overlap_usage_message): Remove
3533 trailing empty line.
3534 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3535 (output_lines): Remove program related line.
3536 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3537 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3539 (input_profile_summary): Do not read it.
3540 (merge_profile_summaries): And do not merge it.
3541 (input_symtab): Do not call removed function.
3542 * modulo-sched.c (sms_schedule): Do not print sum_max.
3543 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3544 removed when histogram method was invented.
3545 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3547 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3549 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3550 and dump selected value.
3551 * profile.c (add_working_set): Remove.
3552 (get_working_sets): Likewise.
3553 (find_working_set): Likewise.
3554 (get_exec_counts): Do not work with working sets.
3555 (read_profile_edge_counts): Do not inform as sum_max is removed.
3556 (compute_branch_probabilities): Likewise.
3557 (compute_value_histograms): Remove argument for call of
3558 get_coverage_counts.
3559 * profile.h: Do not make gcov_summary const.
3561 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3563 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3565 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3567 PR tree-optimization/86990
3568 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3569 Check that the entire merged store group is made of constants only for
3572 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3574 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3575 (VTABLE_VERIFICATION_SPEC): Likewise.
3576 (SANITIZER_EARLY_SPEC): Likewise.
3577 (SANITIZER_SPEC): Likewise.
3578 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3579 * doc/invoke.texi (Link Options): Document -r.
3581 2018-09-20 Richard Biener <rguenther@suse.de>
3584 * gimplify.c (gimplify_expr): Retain alignment of
3585 addressable lvalue in dereference.
3587 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3590 * configure.ac: Check for .loc is_stmt support.
3591 * configure, config.in: Rebuilt.
3592 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3595 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3597 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3598 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3601 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3603 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3605 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3608 2018-09-20 Marek Polacek <polacek@redhat.com>
3610 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3612 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3614 PR tree-optimization/87288
3615 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3616 into account when determining PEELING_FOR_NITERS.
3618 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3620 PR tree-optimization/86877
3621 * tree-vect-loop.c (vect_analyze_loop_2): Call
3622 vect_verify_datarefs_alignment.
3624 2018-09-19 Marek Polacek <polacek@redhat.com>
3626 * doc/invoke.texi: Document -Wclass-conversion.
3628 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3630 * config/pa/pa.c (pa_adjust_priority): Delete.
3631 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3633 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3634 (atomic_storehi): Likewise.
3635 (atomic_storesi): Likewise.
3636 (atomic_loaddi): Restore compare and swap exchange loop code.
3638 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3640 PR rtl-optimization/86902
3641 * combine.c (try_combine): When changing the CC mode used, don't change
3642 an unrelated mode in other_insn to that new CC mode.
3644 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3646 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3647 with %T in place of calls to dump_generic_expr.
3648 (prune_runtime_alias_test_list): Likewise.
3649 (create_runtime_alias_checks): Likewise.
3650 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3651 (vect_analyze_data_ref_dependence): Likewise.
3652 (vect_slp_analyze_data_ref_dependence): Likewise.
3653 (vect_record_base_alignment): Likewise. Use %G in place of call
3654 to dump_gimple_stmt.
3655 (vect_compute_data_ref_alignment): Likewise.
3656 (verify_data_ref_alignment): Likewise.
3657 (vect_find_same_alignment_drs): Likewise.
3658 (vect_analyze_group_access_1): Likewise.
3659 (vect_analyze_data_ref_accesses): Likewise.
3660 (dependence_distance_ge_vf): Likewise.
3661 (dump_lower_bound): Likewise.
3662 (vect_prune_runtime_alias_test_list): Likewise.
3663 (vect_find_stmt_data_reference): Likewise.
3664 (vect_analyze_data_refs): Likewise.
3665 (vect_create_addr_base_for_vector_ref): Likewise.
3666 (vect_create_data_ref_ptr): Likewise.
3667 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3668 (vect_can_advance_ivs_p): Likewise.
3669 (vect_update_ivs_after_vectorizer): Likewise.
3670 (vect_gen_prolog_loop_niters): Likewise.
3671 (vect_prepare_for_masked_peels): Likewise.
3672 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3673 (vect_determine_vectorization_factor): Likewise.
3674 (vect_is_simple_iv_evolution): Likewise.
3675 (vect_analyze_scalar_cycles_1): Likewise.
3676 (vect_analyze_loop_operations): Likewise.
3677 (report_vect_op): Likewise.
3678 (vect_is_slp_reduction): Likewise.
3679 (check_reduction_path): Likewise.
3680 (vect_is_simple_reduction): Likewise.
3681 (vect_create_epilog_for_reduction): Likewise.
3682 (vect_finalize_reduction:): Likewise.
3683 (vectorizable_induction): Likewise.
3684 (vect_transform_loop_stmt): Likewise.
3685 (vect_transform_loop): Likewise.
3686 (optimize_mask_stores): Likewise.
3687 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3688 (vect_split_statement): Likewise.
3689 (vect_recog_over_widening_pattern): Likewise.
3690 (vect_recog_average_pattern): Likewise.
3691 (vect_determine_min_output_precision_1): Likewise.
3692 (vect_determine_precisions_from_range): Likewise.
3693 (vect_determine_precisions_from_users): Likewise.
3694 (vect_mark_pattern_stmts): Likewise.
3695 (vect_pattern_recog_1): Likewise.
3696 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3697 (vect_record_max_nunits): Likewise.
3698 (vect_build_slp_tree_1): Likewise.
3699 (vect_build_slp_tree_2): Likewise.
3700 (vect_print_slp_tree): Likewise.
3701 (vect_analyze_slp_instance): Likewise.
3702 (vect_detect_hybrid_slp_stmts): Likewise.
3703 (vect_detect_hybrid_slp_1): Likewise.
3704 (vect_slp_analyze_operations): Likewise.
3705 (vect_slp_analyze_bb_1): Likewise.
3706 (vect_transform_slp_perm_load): Likewise.
3707 (vect_schedule_slp_instance): Likewise.
3708 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3709 (vect_mark_stmts_to_be_vectorized): Likewise.
3710 (vect_init_vector_1): Likewise.
3711 (vect_get_vec_def_for_operand): Likewise.
3712 (vect_finish_stmt_generation_1): Likewise.
3713 (vect_check_load_store_mask): Likewise.
3714 (vectorizable_call): Likewise.
3715 (vectorizable_conversion): Likewise.
3716 (vectorizable_operation): Likewise.
3717 (vectorizable_load): Likewise.
3718 (vect_analyze_stmt): Likewise.
3719 (vect_is_simple_use): Likewise.
3720 (vect_get_vector_types_for_stmt): Likewise.
3721 (vect_get_mask_type_for_stmt): Likewise.
3722 * tree-vectorizer.c (increase_alignment): Likewise.
3724 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3726 * doc/rtl.texi: Adjust vec_select description.
3727 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3728 non-constant selectors.
3730 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3732 * config/aarch64/aarch64-protos.h
3733 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3734 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3735 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3736 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3737 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3738 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3739 (AARCH64_ISA_RCPC8_4): New flag.
3740 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3741 to aarch64_offset_9bit_signed_unscaled_p.
3742 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3744 * config/aarch64/constraints.md (Ust): New constraint.
3745 * config/aarch64/predicates.md.
3746 (aarch64_9bit_offset_memory_operand): New predicate.
3747 (aarch64_rcpc_memory_operand): New predicate.
3749 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3751 PR rtl-optimization/87361
3752 * rtlanal.c (nonzero_bits1): Revert accidental change.
3754 2018-09-19 Richard Biener <rguenther@suse.de>
3756 PR tree-optimization/87349
3757 PR tree-optimization/87342
3758 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3760 2018-09-18 Marek Polacek <polacek@redhat.com>
3762 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3763 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3765 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3767 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3769 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3771 PR rtl-optimization/86882
3772 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3774 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3776 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3777 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3779 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3782 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3784 2018-09-18 Richard Biener <rguenther@suse.de>
3787 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3788 (compute_samebase_partition_bases): Likewise.
3789 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3790 (gimple_can_coalesce_p): Simplify.
3792 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3794 Handle a library implementation of ffs calling __builtin_ffs.
3795 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3796 (mmix_init_libfuncs): New function: make __builtin_ffs expand
3799 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3801 * diagnostic-show-locus.c (class layout_range): Add field
3803 (layout_range::layout_range): Add "original_idx" param and use it
3804 to initialize new field.
3805 (make_range): Use 0 for original_idx.
3806 (layout::layout): Pass in index to calls to
3807 maybe_add_location_range.
3808 (layout::maybe_add_location_range): Add param "original_idx" and
3809 pass it on to layout_range.
3810 (layout::print_any_labels): Pass on range->m_original_idx to
3812 (gcc_rich_location::add_location_if_nearby): Use 0 for
3814 * gcc-rich-location.h (text_range_label::get_text): Update for new
3816 (range_label_for_type_mismatch::get_text): Likewise.
3818 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3820 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3822 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3824 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3825 format_string_diagnostic_t.
3826 (fmtwarn_n): Likewise.
3827 * substring-locations.c
3828 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3829 (format_warning_n_va): Convert to...
3830 (format_string_diagnostic_t::emit_warning_n_va): ...this.
3831 (format_warning_va): Convert to...
3832 (format_string_diagnostic_t::emit_warning_va): ...this.
3833 (format_warning_at_substring): Convert to...
3834 (format_string_diagnostic_t::emit_warning): ...this.
3835 (format_warning_at_substring_n): Convert to...
3836 (format_string_diagnostic_t::emit_warning_n): ...this.
3837 * substring-locations.h (class format_string_diagnostic_t): New
3839 (format_warning_va): Convert to
3840 format_string_diagnostic_t::emit_warning_va.
3841 (format_warning_n_va): Convert to
3842 format_string_diagnostic_t::emit_warning_n_va.
3843 (format_warning_at_substring): Convert to
3844 format_string_diagnostic_t::emit_warning.
3845 (format_warning_at_substring_n): Convert to
3846 format_string_diagnostic_t::emit_warning_n.
3848 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
3849 Bernd Schmidt <bernds_cb1@t-online.de>
3851 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3854 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3856 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3857 operand 0 predicate to nonimmediate operand.
3858 (rint<mode>2_frndint): Remove insn pattern.
3859 (rint<mode>2): Change operand 1 predicate to general_operand.
3860 Extend operand 1 to XFmode and generate rintxf2 insn.
3861 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3862 Do not use X87MODEF mode macro.
3863 (frndintxf2_<rounding>_i387): Rename from
3864 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
3865 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3866 to XFmode and generate significandxf3 insn.
3868 2018-09-17 Richard Biener <rguenther@suse.de>
3870 PR tree-optimization/87328
3871 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3872 visiting unexecutable backedges when not iterating.
3873 (do_rpo_vn): Mark all edges not executable even when not
3876 2018-09-17 Martin Jambor <mjambor@suse.cz>
3879 * doc/invoke.texi (Warning Options): Likewise.
3881 2018-09-17 Richard Biener <rguenther@suse.de>
3883 PR tree-optimization/87301
3884 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3885 clean EH info from leftover copy assignments.
3887 2018-09-17 Martin Liska <mliska@suse.cz>
3889 PR gcov-profile/85871
3890 * gcov.c (output_intermediate_file): Fix out of bounds
3893 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
3895 * config/arc/arc.c: Object attributes for core4 not reflected
3897 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3900 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
3902 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3904 2018-09-17 Martin Liska <mliska@suse.cz>
3906 * doc/gcov.texi: Document new option --use-hotness-colors.
3907 * gcov.c (struct source_info): Declare new field.
3908 (source_info::source_info): Set default for maximum_count.
3909 (print_usage): Add new -q option.
3910 (process_args): Process it.
3911 (accumulate_line_info): Save src->maximum_count.
3912 (output_line_beginning): Make color line number if
3913 flag_use_hotness_colors is set.
3914 (output_line_details): Pass default argument value.
3915 (output_lines): Pass src->maximum_count.
3917 2018-09-17 Martin Liska <mliska@suse.cz>
3919 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3920 Use processor_names table.
3921 * config/i386/i386.c (ix86_default_align): Use
3922 processor_cost_table for alignment values.
3923 (ix86_option_override_internal): Use processor_names.
3924 (ix86_function_specific_print): Likewise.
3925 * config/i386/i386.h (struct processor_costs):
3926 Add alignment values.
3927 (struct ptt): Remove and replace with const char *.
3928 * config/i386/x86-tune-costs.h (struct processor_costs):
3929 Declare default alignments for all costs.
3931 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
3933 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3934 symbolics or VR_VARYING ranges for ABS_EXPR.
3935 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3936 when range will wrap.
3938 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
3941 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3942 before and after a JUMP_TABLE_DATA.
3944 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
3947 * dojump.c (do_compare_and_jump): Canonicalize function pointers
3948 when one operand is a function pointer. Use POINTER_TYPE_P and
3949 FUNC_OR_METHOD_TYPE_P.
3950 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3951 * fold-const.c (build_range_check): Likewise.
3952 * match.pd (simple_comparison): Likewise.
3954 2018-09-14 David Malcolm <dmalcolm@redhat.com>
3957 * spellcheck.c (get_edit_distance_cutoff): New function.
3958 (selftest::test_edit_distance_unit_test_oneway): Rename to...
3959 (selftest::test_get_edit_distance_one_way): ...this.
3960 (selftest::test_get_edit_distance_unit): Rename to...
3961 (selftest::test_get_edit_distance_both_ways): ...this.
3962 (selftest::test_edit_distances): Move tests to this new function,
3963 and test some more pairs of strings. Update for above renaming.
3964 (selftest::get_old_cutoff): New function.
3965 (selftest::test_get_edit_distance_cutoff): New function.
3966 (selftest::assert_suggested_for): New function.
3967 (ASSERT_SUGGESTED_FOR): New macro.
3968 (selftest::assert_not_suggested_for): New function.
3969 (ASSERT_NOT_SUGGESTED_FOR): New macro.
3970 (selftest::test_suggestions): New function.
3971 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3972 tests to selftest::test_edit_distances and call it. Add calls to
3973 selftest::test_get_edit_distance_cutoff and
3974 selftest::test_suggestions.
3975 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3976 (best_match::consider): Replace hard-coded cutoff calculation with
3978 (best_match::get_cutoff): New declaration.
3979 (best_match::get_best_meaningful_candidate): Likewise.
3981 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3983 * builtins.c (fold_builtin_strlen): Remove TODO comment.
3985 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3988 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3990 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3991 terminated string literal.
3993 2018-09-14 Martin Sebor <msebor@redhat.com>
3995 * builtins.c (unterminated_array): Handle ARRAY_REF.
3996 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3997 * builtins.h (unterminated_array): Declare extern.
3998 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4000 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4003 2018-09-14 Martin Sebor <msebor@redhat.com>
4004 Jeff Law <law@redhat.com>
4006 * builtins.c (unterminated_array): New.
4007 (expand_builtin_strcpy): Adjust.
4008 (expand_builtin_strcpy_args): Detect unterminated arrays.
4009 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4010 unterminated arrays.
4011 * gimple-fold.h (get_maxval_strlen): Add argument.
4012 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4014 * gimple-fold.c (get_range_strlen): Add argument.
4015 (get_maxval_strlen): Adjust.
4016 * gimple-fold.h (get_range_strlen): Add argument.
4018 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4020 * config/i386/movdirintrin.h: Fix copyright year.
4022 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4024 * reg-stack.c: Include regs.h.
4025 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4026 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4027 FIRST_STACK_REG, not DFmode.
4028 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4029 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4030 (change stack): Default register mode to the reg_raw_mode of
4031 FIRST_STACK_REG, not DFmode.
4032 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4033 (*swapxf): Rename from swapxf.
4035 2018-09-14 Carl Love <cel@us.ibm.com>
4037 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4038 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4040 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4043 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4046 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4049 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4051 2018-09-14 Jason Merrill <jason@redhat.com>
4053 Fix --enable-gather-detailed-mem-stats.
4054 * hash-table.c (hash_table_usage): Change from variable to function.
4055 * hash-table.h: Adjust.
4056 * Makefile.in: Add missing dependencies on hash-table.h.
4058 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4060 PR tree-optimization/87259
4062 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4063 execute_cse_reciprocals_1 has tried transforming.
4065 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4067 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4068 VR_VARYING for PLUS/MINUS_EXPR.
4070 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4072 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4075 2018-09-14 Richard Biener <rguenther@suse.de>
4078 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4079 bits for the merged partition.
4081 2018-09-13 Martin Sebor <msebor@redhat.com>
4082 Bernd Edlinger <bernd.edlinger@hotmail.de>
4084 * builtins.h (c_srlen): Add argument.
4085 * builtins.c (warn_string_no_nul): New function.
4086 (c_strlen): Add argument and use it. Update recursive calls.
4087 Pass DECL argument to string_constant to get info on non
4088 terminated strings. Update *NONSTR as needed.
4089 (fold_builtin_strlen): Add argument to calls to c_strlen.
4090 Warn for unterminated arrays.
4091 (warn_string_no_null): Add prototype.
4092 * expr.c (string_constant): Update arguments. Update recursive
4093 calls appropriately. Detect missing NUL terminator and outermost
4094 declaration its missing in.
4095 Improve checks for arrays with nonzero lower bound or elements
4096 that are not a single byte. Simplify offset computation.
4097 Simplify checks for non-NUL terminated strings.
4098 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4099 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4101 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4103 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4105 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4106 argument. Fix range checks.
4107 * fold-const.h (c_getstr): Adjust protoype.
4108 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4109 string is constant but contains no NUL byte.
4111 * expr.c (string_constant): Adjust function comment.
4112 Remove bogus check for zero termination.
4114 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4116 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4117 (get_constant_size): Don't make STRING_CSTs larger than they are.
4118 (check_string_literal): New check function for STRING_CSTs.
4119 (output_constant): Use it.
4121 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4124 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4126 2018-09-13 Richard Biener <rguenther@suse.de>
4128 PR tree-optimization/87263
4129 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4130 (struct unwind_state): Add max_rpo field.
4131 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4132 Compute max_rpo, the max RPO number a block can be backwards reached
4133 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4134 separating it from the iterating mode.
4136 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4138 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4139 (rfs_decision): New scheduling decision.
4141 2018-09-13 Richard Biener <rguenther@suse.de>
4144 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4145 (vn_nary_op_insert_pieces_predicated): Do not write useless
4146 valid_dominated_by_p entry outside of the allocated storage.
4148 2018-09-13 Omar Sandoval <osandov@osandov.com>
4149 Tom de Vries <tdevries@suse.de>
4152 * dwarf2out.c (is_c): New function.
4153 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4155 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4158 * config/aarch64/aarch64.md (*aarch64_bfxil):
4160 * config/aarch64/constraints.md (Ulc): Define.
4161 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4163 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4166 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4168 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4169 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4170 aarch64_layout_frame call.
4171 (aarch64_expand_epilogue): Likewise.
4172 (aarch64_initial_elimination_offset): Likewise.
4173 (aarch64_get_separate_components): Likewise.
4174 (aarch64_use_return_insn_p): Likewise.
4175 (aarch64_layout_frame): Remove unneeded check.
4177 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4179 * configure.ac: Only append
4180 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4181 gcc_config_arguments if it was never reconfigured or last reconfigure
4182 was with different arguments.
4183 * configure: Regenerated.
4185 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4186 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4189 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4190 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4192 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4194 PR tree-optimization/87287
4195 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4196 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4197 * match.pd (X % C == 0): ... here. New optimization.
4199 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4202 * expr.h (maybe_optimize_mod_cmp): Declare.
4203 * expr.c (mod_inv): New function.
4204 (maybe_optimize_mod_cmp): New function.
4205 (do_store_flag): Use it.
4206 * cfgexpand.c (expand_gimple_cond): Likewise.
4208 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4209 Julian Brown <julian@codesourcery.com>
4212 * gimplify.c (gimplify_scan_omp_clauses): Set
4213 target_firstprivatize_array_bases in OpenACC parallel and kernels
4214 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4215 OpenACC data regions.
4217 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4219 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4220 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4222 2018-09-12 Richard Biener <rguenther@suse.de>
4224 PR tree-optimization/87280
4225 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4226 edge but unreachable target.
4227 (do_rpo_vn): For conservatively handling a PHI only mark
4228 the backedge executable but not the block reachable.
4230 2018-09-12 Richard Biener <rguenther@suse.de>
4232 PR tree-optimization/87266
4233 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4236 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4238 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4240 ("trunc<BFP:mode><DFP_ALL:mode>2")
4241 ("trunc<DFP_ALL:mode><BFP:mode>2")
4242 ("extend<BFP:mode><DFP_ALL:mode>2")
4243 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4244 according to the target operand type.
4246 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4247 Andreas Krebbel <krebbel@linux.ibm.com>
4249 PR tree-optimization/86844
4250 * gimple-ssa-store-merging.c
4251 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4252 there are any overlapping stores in between them, make sure they are
4253 also coalesced or we give up completely.
4255 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4258 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4259 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4261 2018-09-12 Tom de Vries <tdevries@suse.de>
4263 * common.opt (gdescribe-dies): Add option.
4264 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4265 attribute for artifical and nameless decls.
4266 (dwarf2out_register_external_die): Add description attribute to
4267 external reference die.
4268 (add_desc_attribute): New functions.
4269 (gen_subprogram_die): Add description attribute to
4270 DW_TAG_call_site_parameter.
4271 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4272 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4273 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4275 (@item -gdescribe-dies): Add.
4277 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4279 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4280 (extract_range_from_binary_expr_1: Call
4281 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4282 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4285 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4287 * gimple-ssa-warn-alloca.c
4288 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4289 field for ALLOCA_BOUND_*_LARGE.
4291 2018-09-11 Nathan Sidwell <nathan@acm.org>
4293 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4295 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4297 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4298 for clobbers. Remove obsolete comment.
4300 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4302 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4303 mpxchk, mpxld and mpxst types.
4304 (define_attr length_immediate): Remove all processing of mpx types.
4305 (define_attr prefix_0f): Ditto.
4306 (define_attr memory): Ditto.
4308 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4310 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4311 (log<mode>2): Change operand 1 predicate to general_operand.
4312 Extend operand 1 to XFmode and generate logxf3 insn.
4313 (log10<mode>2): Change operand 1 predicate to general_operand.
4314 Extend operand 1 to XFmode and generate log10xf3 insn.
4315 (log2<mode>2): Change operand 1 predicate to general_operand.
4316 Extend operand 1 to XFmode and generate log2xf3 insn.
4317 (fyl2xp1_extend<mode>xf3_i387): Remove.
4318 (log1p<mode>2): Change operand 1 predicate to general_operand.
4319 Extend operand 1 to XFmode and generate log1pxf3 insn.
4320 (fxtract_extend<mode>xf3_i387): Remove.
4321 (logb<mode>2): Change operand 1 predicate to general_operand.
4322 Extend operand 1 to XFmode and generate logbxf3 insn.
4323 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4324 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4325 (significand<mode>2): Change operand 1 predicate to general_operand.
4326 Extend operand 1 to XFmode and generate significandxf3 insn.
4328 2018-09-11 Nathan Sidwell <nathan@acm.org>
4330 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4331 (load_specs): Use fatal_error.
4332 (DELETE_IF_ORDINARY, process_command): Use error.
4333 (execute, run_attempt): Use fatal_error.
4335 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4337 * diagnostic-core.h (sorry_at): New prototype.
4338 * diagnostic.c (sorry_at): New function.
4340 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4342 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4343 by zero as VR_UNDEFINED.
4345 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4347 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4348 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4349 (<sincos>mode2): New expander.
4350 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4351 (sincos -> sin, cos splitters): Remove splitter patterns.
4352 (sincos<mode>3): Change operand 2 predicate to general_operand.
4353 Extend operand 2 to XFmode and generate sincosxf3 insn.
4354 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4355 Change operand 3 predicate to const1_operand.
4356 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4357 (tanxf2): Update operands in the call to fptanxf4_i387.
4358 (tan<mode>2): Change operand 1 predicate to general_operand.
4359 Extend operand 1 to XFmode and generate tanxf3 insn.
4360 (atan2xf3): Rename from *fpatanxf3_i387.
4361 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4362 (atan2xf3): Remove expander.
4363 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4364 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4365 (atan<mode>2): Change operand 1 predicate to general_operand.
4366 Extend operand 1 to XFmode and generate atanxf3 insn.
4368 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4370 * config/i386/i386.md (x87/SSE constant load splitter): Use
4371 memory_operand instead of nonimmediate_operand for input operand
4374 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4376 * config/i386/i386.md (float partial SSE register stall splitter): Move
4377 splitter near its instruction pattern.
4378 (float_extend partial SSE register stall splitter): Ditto.
4379 (float_truncate partial SSE register stall splitter): Ditto.
4381 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4384 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4385 to speculation_safe_value_not_needed.
4388 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4389 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4390 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4391 leaf_function_p, instead use has_hard_reg_initial_val.
4393 2018-09-09 Nathan Sidwell <nathan@acm.org>
4395 * gcc.h (pfatal_with_name): Don't declare here.
4396 * gcc.c (pfatal_with_name): Make static.
4398 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4400 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4403 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4405 PR rtl-optimization/85458
4406 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4407 priority hook to reduce the priority of EXPR.
4409 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4411 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4412 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4413 with X87_ENABLE_FLOAT. Remove preparation code.
4414 (*float<SWI48:mode><MODEF:mode>2): Rename from
4415 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4416 math using "enabled" attribute.
4417 (*floatdi<MODEF:mode>2_i387): Rename from
4418 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4419 enable for 32bit targets only.
4420 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4422 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4423 as operand 1 predicate. Rewrite as define_insn_and_split.
4424 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4426 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4428 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4429 to fallthru to FLOAT case.
4431 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4434 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4435 around folding of vec_sl to handle out of range shift values.
4437 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4439 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4440 Update callers to gen_fix_trunc<mode>_i387_fisttp
4441 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4442 nonimmediate_operand.
4443 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4444 and corresponding splitters.
4445 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4446 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4447 (fix_truncdi_i387_with_temp): Remove insn pattern
4448 and corresponding splitters.
4449 (fix_trunc<mode>_i387): Change operand 0 predicate to
4450 nonimmediate_operand.
4451 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4452 and corresponding splitters.
4453 (*fistdi2_1): Remove.
4455 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4456 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4457 (*fist<mode>2_1): Remove.
4458 (fist<mode>2): Ditto.
4459 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4461 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4462 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4463 (fistdi2_<rounding>): Change operand 0 predicate to
4464 nonimmediate_operand.
4465 (fistdi2_<rounding>_with_temp): Remove insn pattern
4466 and corresponding splitters.
4467 (fist<mode>2_<rounding>): Change operand 0 predicate to
4468 nonimmediate_operand.
4469 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4470 and corresponding splitters.
4472 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4474 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4476 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4479 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4481 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4482 early gimple folding of vec_splat().
4483 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4484 * gimple-fold.h: Add an extern define for tree_vec_extract().
4486 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4488 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4489 wrappers around TREE_TYPE comparisons.
4491 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4494 * config/s390/predicates.md: Add nonsym_memory_operand.
4495 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4496 contains a SYMBOL_REF, load it into an intermediate pseudo.
4497 (s390_emit_compare_and_swap): Legitimize operand.
4498 * config/s390/s390.md: Use the new nonsym_memory_operand
4499 with UNSPECV_CAS patterns.
4501 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4504 * config/s390/s390-passes.def: New file.
4505 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4507 (make_pass_s390_early_mach): Add declaration.
4508 * config/s390/s390.c (make_pass_s390_early_mach):
4509 (s390_option_override): Remove dynamic registration.
4510 * config/s390/t-s390: Add s390-passes.def.
4512 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4514 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4515 Remove UNSPEC_LTREL_BASE check.
4516 (annotate_constant_pool_refs): Likewise.
4517 (find_constant_pool_ref): Likewise.
4518 (find_ltrel_base): Removed.
4519 (replace_ltrel_base): Removed.
4520 (s390_mainpool_finish): Remove replace_ltrel_base call.
4521 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4522 (s390_chunkify_finish): Remove replace_ltrel_base call.
4523 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4525 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4528 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4529 to speculation_safe_value_not_needed.
4531 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4532 Bernd Schmidt <bernds_cb1@t-online.de>
4534 * config/nvptx/nvptx-opts.h: New file.
4535 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4536 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4538 (TARGET_SM35): New macro.
4539 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4541 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4543 (misa=): New option.
4544 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4546 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4548 * config/i386/i386.md (truncdfsf2): Remove expander.
4549 (truncdfsf2_with_temp): Ditto.
4550 (truncxf<mode>2): Ditto.
4551 (*truncdfsf_fast_mixed): Remove insn pattern.
4552 (*truncdfsf_fast_i387): Ditto.
4553 (*truncdfsf_mixed): Ditto.
4554 (*truncdfsf_i387): Ditto.
4555 (*truncdfsf2_i387_1): Ditto.
4556 (*truncxfsf2_mixed): Ditto.
4557 (*truncxfdf2_mixed): Ditto.
4558 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4559 to call gen_truncxf<mode>2 instead.
4560 (*truncxf<mode>2_i387): Remove.
4561 (reg->reg splitters): Remove splitter pattern.
4562 (reg->mem splitters): Ditto.
4564 (truncdfsf2): New insn pattern.
4565 (truncxf<mode>2): Ditto.
4567 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4569 * tree-ssa-math-opts.c (is_mult_by): New function.
4570 (is_square_of): Use the above.
4571 (optimize_recip_sqrt): New function.
4572 (pass_cse_reciprocals::execute): Use the above.
4574 2018-09-05 Richard Biener <rguenther@suse.de>
4577 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4578 to zero-init the emplaced vec.
4580 2018-09-05 Martin Liska <mliska@suse.cz>
4582 PR tree-optimization/87205
4583 * tree-switch-conversion.c (pass_lower_switch::execute):
4584 Group cases for switch statements.
4586 2018-09-05 Richard Biener <rguenther@suse.de>
4588 PR tree-optimization/87217
4589 * tree-ssa-sccvn.c (vuse_valueize): New.
4590 (vn_reference_lookup_pieces): Use it.
4591 (vn_reference_lookup): Likewise.
4593 2018-09-05 Nathan Sidwell <nathan@acm.org>
4596 * stor-layout.c (place_field): Scan forwards to check last
4597 bitfield when ms_bitfield_placement is in effect.
4599 2018-09-05 Richard Biener <rguenther@suse.de>
4602 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4605 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4606 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4608 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4609 * config.gcc (extra_objs): Build it.
4610 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4612 * config/aarch64/aarch64-passes.def
4613 (pass_tag_collision_avoidance): New pass.
4614 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4615 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4616 (aarch64_classify_address): Remove static qualifier.
4617 (aarch64_address_info, aarch64_address_type): Move to...
4618 * config/aarch64/aarch64-protos.h: ... here.
4619 (make_pass_tag_collision_avoidance): New function.
4620 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4623 2018-09-05 Martin Liska <mliska@suse.cz>
4625 * doc/gcov.texi: Update documentation of humar
4627 * gcov.c (format_count): Print one decimal place, it provides
4628 more fine number of situations like '1G' vs. '1.4G'.
4630 2018-09-05 Martin Liska <mliska@suse.cz>
4633 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4634 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4635 to generate a MASK value.
4637 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4640 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4641 if frame pointer isn't used.
4642 (compute_frame_pointer_to_fb_displacement): Likewise.
4644 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4647 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4648 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4649 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4650 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4651 and OPTION_MASK_ISA_XSAVEC_UNSET.
4653 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4655 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4656 XOR operations in NAND case.
4658 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4660 * wide-int-range.cc (wide_int_range_convert): New.
4661 * wide-int-range.h (wide_int_range_convert): New.
4662 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4663 code into wide_int_range_convert.
4664 (extract_range_into_wide_ints): Do not munge anti range constants
4665 into the entire domain. Just return the range back.
4667 2018-09-04 Martin Liska <mliska@suse.cz>
4669 * genmatch.c (output_line_directive): Add new argument
4671 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4673 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4675 * doc/invoke.texi (Option Summary): Add whitespace.
4677 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4679 2018-09-04 Richard Biener <rguenther@suse.de>
4681 PR tree-optimization/87211
4682 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4683 backedge value we're supposed to treat as VARYING also number
4684 the PHI to VARYING in case it got a different value-number already.
4686 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4688 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4689 (extract_range_from_binary_expr_1): Do not call
4690 vrp_can_optimize_bit_op.
4691 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4693 (wide_int_range_get_mask_and_bounds): New.
4694 (wide_int_range_optimize_bit_op): New.
4695 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4696 (wide_int_range_bit_and): Same.
4697 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4698 (wide_int_range_optimize_bit_op): New.
4699 (wide_int_range_get_mask_and_bounds): New.
4701 2018-09-04 Richard Biener <rguenther@suse.de>
4703 PR tree-optimization/87176
4704 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4705 variable. When value-numbering a virtual PHI node make sure
4706 to not value-number to the backedge value.
4708 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4710 * doc/extend.texi (Long Long, Hex Floats): Document support for
4711 long long and hex floats in more recent versions of ISO C++.
4713 2018-09-03 Richard Biener <rguenther@suse.de>
4715 PR tree-optimization/87177
4716 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4719 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4721 * bb-reorder.c (edge_order): Convert to C-qsort-style
4722 tri-state comparator.
4723 (reorder_basic_blocks_simple): Change std::stable_sort to
4726 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4728 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4729 tri-state comparator.
4730 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4732 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4734 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4735 (mergesort): ... here as maximum count for using netsort.
4736 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4737 (gcc_stablesort): New.
4738 * system.h (gcc_stablesort): Declare.
4740 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4742 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4743 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4744 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4746 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4748 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4749 lxsdx and stxsdx alternatives.
4750 (*mov<mode>_hardfloat64): Ditto.
4751 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4753 2018-09-03 Richard Biener <rguenther@suse.de>
4755 PR tree-optimization/87200
4756 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4759 2018-09-03 Martin Liska <mliska@suse.cz>
4761 PR tree-optimization/87201
4762 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4763 Fix parenthesis in an expression.
4765 2018-09-03 Richard Biener <rguenther@suse.de>
4767 PR tree-optimization/87197
4768 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4769 visited. CSE the VN_INFO hashtable lookup.
4771 PR tree-optimization/87169
4772 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4773 iterating make sure there's no extra backedges from irreducible
4774 regions feeding the header. Mark the destination block
4777 2018-09-03 Martin Liska <mliska@suse.cz>
4780 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4781 * common/common-targhooks.c (default_get_valid_option_values):
4783 * common/common-targhooks.h (default_get_valid_option_values):
4785 * common/config/i386/i386-common.c: Move processor_target_table
4787 (ix86_get_valid_option_values): New function.
4788 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4789 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4790 (PTA_*): Move all defined masks into i386-common.c.
4791 (ix86_function_specific_restore): Use new processor_cost_table.
4792 * config/i386/i386.h (struct ptt): Moved from i386.c.
4793 (struct pta): Likewise.
4794 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4795 * doc/tm.texi.in: Likewise.
4796 * opt-suggestions.c (option_proposer::suggest_option):
4797 Pass prefix to build_option_suggestions.
4798 (option_proposer::get_completions): Likewise.
4799 (option_proposer::build_option_suggestions): Use the new target
4801 * opts.c (struct option_help_tuple): New struct.
4802 (print_filtered_help): Use the new target hook.
4804 2018-09-03 Martin Liska <mliska@suse.cz>
4807 * predict.c (set_even_probabilities): Add likely_edges
4808 argument and handle cases where we have precisely one
4810 (combine_predictions_for_bb): Catch also likely_edges.
4811 (tree_predict_by_opcode): Handle gswitch statements.
4812 * tree-cfg.h (find_case_label_for_value): New declaration.
4813 (find_taken_edge_switch_expr): Likewise.
4814 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4815 Find pivot in decision tree based on probabily, not by number of
4818 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
4820 * doc/standards.texi (Standards): Update Objective-C reference.
4822 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4824 * doc/install.texi (Prerequisites): Update link for MPC.
4826 2018-09-01 Michael Matz <matz@suse.de>
4828 PR tree-optimization/87074
4829 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4830 PHIs for outer-loop uses.
4832 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4834 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4835 * doc/invoke.texi (C Dialect Options): Ditto.
4837 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4839 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4841 2018-08-31 Richard Biener <rguenther@suse.de>
4843 PR tree-optimization/87168
4844 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4845 (rpo_elim::eliminate_avail): When OP was not visited it must
4848 2018-08-31 David Malcolm <dmalcolm@redhat.com>
4850 * tree-vrp.c (copy_value_range): Convert param "from" from
4851 "value_range *" to "const value_range *".
4852 (range_is_null): Likewise for param "vr".
4853 (range_int_cst_p): Likewise.
4854 (range_int_cst_singleton_p): Likewise.
4855 (symbolic_range_p): Likewise.
4856 (value_ranges_intersect_p): Likewise for both params.
4857 (value_range_nonnegative_p): Likewise for param "vr".
4858 (value_range_constant_singleton): Likewise.
4859 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4860 (extract_range_into_wide_ints): Likewise for param "vr".
4861 (extract_range_from_multiplicative_op): Likewise for params "vr0"
4863 (vrp_can_optimize_bit_op): Likewise.
4864 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4866 (extract_range_from_unary_expr): Likewise.
4867 (debug_value_range): Likewise for param "vr".
4868 (value_range::dump): Add "const" qualifier.
4869 (vrp_prop::check_array_ref): Convert local "vr" from
4870 "value_range *" to "const value_range *".
4871 (vrp_prop::check_mem_ref): Likewise.
4872 (vrp_prop::visit_stmt): Likewise for local "old_vr".
4873 (vrp_intersect_ranges_1): Likewise for param "vr_1".
4874 (vrp_intersect_ranges): Likewise.
4875 (simplify_stmt_for_jump_threading): Likewise for local "vr".
4876 (vrp_prop::vrp_finalize): Likewise.
4877 * tree-vrp.h (value_range::dump): Add "const" qualifier.
4878 (vrp_intersect_ranges): Add "const" qualifier to params as above.
4879 (extract_range_from_unary_expr): Likewise.
4880 (value_range_constant_singleton): Likewise.
4881 (symbolic_range_p): Likewise.
4882 (copy_value_range): Likewise.
4883 (extract_range_from_binary_expr_1): Likewise.
4884 (range_int_cst_p): Likewise.
4885 (vrp_set_zero_nonzero_bits): Likewise.
4886 (range_int_cst_singleton_p): Likewise.
4888 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
4890 * config/aarch64/arm_neon.h (vabsd_s64): New.
4891 (vnegd_s64): Likewise.
4893 2018-08-31 Martin Jambor <mjambor@suse.cz>
4895 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4897 2018-08-31 Martin Liska <mliska@suse.cz>
4899 * ipa-icf.c (sem_item::add_type): Use
4900 sem_item::m_type_hash_cache.
4901 * ipa-icf.h: Move the cache from sem_item_optimizer
4904 2018-08-31 Nathan Sidwell <nathan@acm.org>
4906 * doc/extend.texi (Backwards Compatibility): Remove implicit
4907 extern C leeway of () being (...).
4909 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4911 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4913 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
4917 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4919 2018-08-31 Jakub Jelinek <jakub@redhat.com>
4922 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4923 gen_int_mode. Formatting fixes.
4925 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
4927 * target.def (custom_function_descriptors): Improve documentation.
4928 * doc/tm.texi.in (Trampolines): Expand discussion of function
4929 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4930 beginning of the section.
4931 * doc/tm.texi: Regenerated.
4933 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
4935 * cfg.h (class auto_edge_flag): Spell out the template-id of the
4936 base class in the initializer list. This is a workaround for
4937 building with older GCC.
4938 (class auto_bb_flag): Likewise.
4940 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4942 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4943 (altivec_vcmpequ<VI_char>_p): Remove star.
4944 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4946 (expand_strncmp_vec_sequence): New function.
4947 (emit_final_str_compare_vec): New function.
4948 (expand_strn_compare): Add support for vector strncmp.
4949 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4950 length specification to bytes.
4951 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4952 (vcmpnezb_p): New pattern.
4953 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4954 for option -mstring-compare-inline-limit.
4956 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
4958 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4959 (PTA_SKYLAKE): Add PTA_AES.
4960 (PTA_GOLDMONT): Likewise.
4962 2018-08-29 Jan Hubicka <jh@suse.cz>
4965 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4966 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4968 2018-08-29 Jan Hubicka <jh@suse.cz>
4970 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4972 (hash_tree): Do not visit TYPE_STUB_DECL.
4973 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4974 stream TYPE_STUB_DECL.
4975 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4976 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4977 after free_lang_data.
4978 (type_in_anonymous_namespace_p): Likewise.
4980 2018-08-29 Jan Hubicka <jh@suse.cz>
4982 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4983 comment that it has to be even number.
4984 (class sreal): Change m_sig type to int32_t.
4985 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4986 int64_t for temporary calculations.
4987 (sreal_verify_basics): Drop one bit from minimum and maximum.
4989 2018-08-30 Richard Biener <rguenther@suse.de>
4991 PR tree-optimization/87147
4992 * tree-ssa-sccvn.c (SSA_VISITED): New function.
4993 (visit_phi): When the degenerate result is from the backedge and
4994 we didn't visit its definition yet drop to VARYING.
4995 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4997 2018-08-29 Jan Hubicka <jh@suse.cz>
4999 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5001 (hash_tree): Likewise.
5003 2018-08-29 Jan Hubicka <jh@suse.cz>
5005 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5006 and TYPE_NEXT_REF_TO.
5008 2018-08-29 Jan Hubicka <jh@suse.cz>
5010 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5011 comment that it has to be even number.
5012 (class sreal): Change m_sig type to int32_t.
5013 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5014 int64_t for temporary calculations.
5015 (sreal_verify_basics): Drop one bit from minimum and maximum.
5017 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5019 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5021 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5024 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5025 if to_add is negative.
5027 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5030 * builtins.c (c_strlen): Improve range checks.
5032 2018-08-29 Martin Sebor <msebor@redhat.com>
5033 Jeff Law <law@redhat.com>
5035 PR tree-optimization/86714
5036 PR tree-optimization/86711
5037 * builtins.c (c_strlen): Add arguments to call to string_constant.
5038 * expr.c (string_constant): Add argument. Detect missing nul
5039 terminator and outermost declaration it's missing in.
5040 * expr.h (string_constant): Add argument.
5041 * fold-const.c (read_from_constant_string): Add arguments to call to
5043 (c_getstr): Likewise.
5044 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5046 * tree-ssa-strlen.c (get_stridx): Likewise.
5048 2018-08-29 Jan Hubicka <jh@suse.cz>
5050 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5051 Do not stream DECL_VINDEX.
5052 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5053 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5054 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5056 2018-08-29 Richard Biener <rguenther@suse.de>
5058 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5059 virtual operands that are not default defs to honor region
5061 (rpo_vn_valueize): Remove ineffective code here.
5063 2018-08-29 Richard Biener <rguenther@suse.de>
5065 PR tree-optimization/87132
5066 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5067 when skipping defs reachable over backedges.
5069 2018-08-29 Richard Biener <rguenther@suse.de>
5071 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5072 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5073 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5074 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5075 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5076 (vn_reference_lookup_3): Remove use of const_parms.
5077 (free_rpo_vn): Do not free const_parms.
5078 (do_rpo_vn): Do not call init_const_parms.
5079 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5080 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5081 (call_may_clobber_ref_p_1): Likewise.
5083 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5086 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5088 (-ftree-scev-cprop): Document.
5090 2018-08-29 Jan Hubicka <jh@suse.cz>
5092 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5094 (sreal constructor): Update.
5095 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5096 sreal:operator/): Update.
5098 2018-08-29 Martin Liska <mliska@suse.cz>
5100 * tree-switch-conversion.c (switch_conversion::expand):
5101 Strenghten assumption about gswitch statements.
5103 2018-08-29 Richard Biener <rguenther@suse.de>
5105 PR tree-optimization/87117
5106 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5107 re-value-number released SSA VDEFs.
5109 2018-08-29 Richard Biener <rguenther@suse.de>
5111 PR tree-optimization/87126
5112 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5114 2018-08-28 Jim Wilson <jimw@sifive.com>
5116 * config/riscv/pic.md: Rewrite.
5117 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5119 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5120 (SOFTF, default_load, softload, softstore): New.
5122 2018-08-28 Jeff Law <law@redhat.com>
5124 * fold-const.c (fold_binary_loc): Remove recently added assert.
5126 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5128 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5129 to OP parmeter of generated function.
5131 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5133 PR tree-optimization/87009
5134 * match.pd: Add boolean optimizations.
5136 2018-08-28 Martin Sebor <msebor@redhat.com>
5139 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5140 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5141 (pass_walloca::gate): Use it.
5142 (alloca_call_type): Same.
5143 (pass_walloca::execute): Same.
5144 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5146 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5148 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5149 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5152 2018-08-28 Richard Biener <rguenther@suse.de>
5154 PR tree-optimization/87124
5155 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5156 constants before looking up avail.
5158 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5161 * calls.c (maybe_warn_nonstring_arg): Punt early if
5162 warn_stringop_overflow is zero. Don't call get_range_strlen
5163 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5164 Swap comparison operands to have constants on rhs. Only use
5165 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5166 increment lenrng[0].
5168 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5170 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5171 use of tree_to_shwi. Remove duplicated test for the size being
5172 a whole number of bytes.
5174 2018-08-28 Richard Biener <rguenther@suse.de>
5176 PR tree-optimization/87117
5177 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5178 Handle removed stmt without LHS (GIMPLE_NOP).
5180 2018-08-28 Richard Biener <rguenther@suse.de>
5182 PR tree-optimization/87117
5183 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5184 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5186 2018-08-28 Richard Biener <rguenther@suse.de>
5188 PR tree-optimization/87117
5189 * tree-ssa-pre.c (compute_avail): Do not make expressions
5190 with predicated values available.
5191 (get_expr_value_id): Assert we do not run into predicated value
5194 2018-08-28 Richard Biener <rguenther@suse.de>
5196 PR tree-optimization/87117
5197 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5198 get virtual operands.
5199 (get_expr_operands): Handle STRING_CST like other decls.
5201 2018-08-28 Martin Liska <mliska@suse.cz>
5203 * tree.h: Update documentation of fndecl_built_in_p
5207 2018-08-27 Jeff Law <law@redhat.com>
5208 PR tree-optimization/87110
5209 * tree-ssa-dse.c (compute_trims): Handle non-constant
5212 2018-08-27 Martin Sebor <msebor@redhat.com>
5214 PR tree-optimization/86914
5215 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5217 2018-08-27 Martin Sebor <msebor@redhat.com>
5219 PR tree-optimization/87112
5220 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5221 the type of the bound argument.
5223 2018-08-27 Jeff Law <law@redhat.com>
5225 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5226 type does not have a TYPE_SIZE_UNIT.
5228 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5230 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5231 with include of backend.h.
5233 2018-08-27 Richard Biener <rguenther@suse.de>
5235 PR tree-optimization/86927
5236 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5237 use const cond reduction code.
5239 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5241 PR tree-optimization/85758
5242 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5244 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5247 * diagnostic-show-locus.c (class layout_range): Update for
5248 conversion of show_caret_p to a tri-state.
5249 (layout_range::layout_range): Likewise.
5250 (make_range): Likewise.
5251 (layout::maybe_add_location_range): Likewise.
5252 (layout::should_print_annotation_line_p): Don't show annotation
5253 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5254 (layout::get_state_at_point): Update for conversion of
5255 show_caret_p to a tri-state. Bail out early for
5256 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5257 underlining or source colorization.
5258 (gcc_rich_location::add_location_if_nearby): Update for conversion
5259 of show_caret_p to a tri-state.
5260 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5261 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5263 (selftest::test_one_liner_labels): Likewise.
5264 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5265 conversion of show_caret_p to a tri-state.
5266 * pretty-print.c (text_info::set_location): Likewise.
5267 * pretty-print.h (text_info::set_location): Likewise.
5268 * substring-locations.c (format_warning_n_va): Likewise.
5269 * tree-diagnostic.c (default_tree_printer): Likewise.
5270 * tree-pretty-print.c (newline_and_indent): Likewise.
5272 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5275 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5276 line above for line-insertion fix-it hints.
5277 (selftest::test_fixit_insert_containing_newline): Update the
5278 expected results, and add a test with line-numbering enabled.
5280 2018-08-27 Martin Liska <mliska@suse.cz>
5283 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5284 params with DECL_HAS_VALUE_EXPR_P.
5286 2018-08-27 Martin Liska <mliska@suse.cz>
5288 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5289 selected expansion strategy.
5291 2018-08-27 Martin Liska <mliska@suse.cz>
5293 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5294 * builtins.c (is_builtin_fn): Likewise.
5295 * attribs.c (diag_attr_exclusions): Use new function
5296 fndecl_built_in_p and remove check for FUNCTION_DECL if
5298 (builtin_mathfn_code): Likewise.
5299 (fold_builtin_expect): Likewise.
5300 (fold_call_expr): Likewise.
5301 (fold_builtin_call_array): Likewise.
5302 (fold_call_stmt): Likewise.
5303 (set_builtin_user_assembler_name): Likewise.
5304 (is_simple_builtin): Likewise.
5305 * calls.c (gimple_alloca_call_p): Likewise.
5306 (maybe_warn_nonstring_arg): Likewise.
5307 * cfgexpand.c (expand_call_stmt): Likewise.
5308 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5309 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5310 (cgraph_node::verify_node): Likewise.
5311 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5312 (cgraph_node::create_clone): Likewise.
5313 * config/arm/arm.c (arm_insert_attributes): Likewise.
5314 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5315 * dse.c (scan_insn): Likewise.
5316 * expr.c (expand_expr_real_1): Likewise.
5317 * fold-const.c (operand_equal_p): Likewise.
5318 (fold_binary_loc): Likewise.
5319 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5320 * gimple-low.c (lower_stmt): Likewise.
5321 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5322 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5324 * gimple.c (gimple_build_call_from_tree): Likewise.
5325 (gimple_call_builtin_p): Likewise.
5326 (gimple_call_combined_fn): Likewise.
5327 * gimplify.c (gimplify_call_expr): Likewise.
5328 (gimple_boolify): Likewise.
5329 (gimplify_modify_expr): Likewise.
5330 (gimplify_addr_expr): Likewise.
5331 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5332 * ipa-cp.c (determine_versionability): Likewise.
5333 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5334 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5335 * ipa-split.c (visit_bb): Likewise.
5336 (split_function): Likewise.
5337 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5338 * lto-cgraph.c (input_node): Likewise.
5339 * lto-streamer-out.c (write_symbol): Likewise.
5340 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5341 (lower_omp_1): Likewise.
5342 * predict.c (strip_predict_hints): Likewise.
5343 * print-tree.c (print_node): Likewise.
5344 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5345 * trans-mem.c (is_tm_irrevocable): Likewise.
5346 (is_tm_load): Likewise.
5347 (is_tm_simple_load): Likewise.
5348 (is_tm_store): Likewise.
5349 (is_tm_simple_store): Likewise.
5350 (is_tm_abort): Likewise.
5351 (tm_region_init_1): Likewise.
5352 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5353 * tree-cfg.c (verify_gimple_call): Likewise.
5354 (move_stmt_r): Likewise.
5355 (stmt_can_terminate_bb_p): Likewise.
5356 * tree-eh.c (lower_eh_constructs_2): Likewise.
5357 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5358 * tree-inline.c (remap_gimple_stmt): Likewise.
5359 (copy_bb): Likewise.
5360 (estimate_num_insns): Likewise.
5361 (fold_marked_statements): Likewise.
5362 * tree-sra.c (scan_function): Likewise.
5363 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5364 (optimize_stack_restore): Likewise.
5365 (pass_fold_builtins::execute): Likewise.
5366 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5367 (mark_all_reaching_defs_necessary_1): Likewise.
5368 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5369 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5370 (pass_forwprop::execute): Likewise.
5371 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5372 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5373 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5374 * tree-ssa-strlen.c (get_string_length): Likewise.
5375 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5376 (find_func_aliases_for_call): Likewise.
5377 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5378 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5379 * tree-tailcall.c (find_tail_calls): Likewise.
5380 * tree.c (need_assembler_name_p): Likewise.
5381 (free_lang_data_in_decl): Likewise.
5382 (get_call_combined_fn): Likewise.
5383 * ubsan.c (is_ubsan_builtin_p): Likewise.
5384 * varasm.c (incorporeal_function_p): Likewise.
5385 * tree.h (DECL_BUILT_IN): Remove and replace with
5387 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5388 (fndecl_built_in_p): New.
5390 2018-08-27 Martin Liska <mliska@suse.cz>
5392 PR tree-optimization/86847
5393 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5394 Dump also subtree probability.
5395 (switch_decision_tree::do_jump_if_equal): New function.
5396 (switch_decision_tree::emit_case_nodes): Handle special
5397 situations in balanced tree that can be emitted much simpler.
5398 Fix calculation of probabilities that happen in tree expansion.
5399 * tree-switch-conversion.h (struct cluster): Add
5401 (struct simple_cluster): Likewise.
5402 (struct case_tree_node): Add new function has_child.
5403 (do_jump_if_equal): New.
5405 2018-08-27 Martin Liska <mliska@suse.cz>
5407 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5408 Add new argument to bit_test_cluster constructor.
5409 (bit_test_cluster::emit): Set bits really number of values
5411 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5412 probability argument.
5413 * tree-switch-conversion.h (struct bit_test_cluster):
5414 Add m_handles_entire_switch.
5416 2018-08-27 Martin Liska <mliska@suse.cz>
5418 PR tree-optimization/86702
5419 * tree-switch-conversion.c (jump_table_cluster::emit):
5420 Make probabilities even for values in jump table
5421 according to number of cases handled.
5422 (switch_decision_tree::compute_cases_per_edge): Pass
5423 argument to reset_out_edges_aux function.
5424 (switch_decision_tree::analyze_switch_statement): Likewise.
5425 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5428 2018-08-27 Martin Liska <mliska@suse.cz>
5430 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5431 cfun argument explicitly.
5432 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5433 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5434 function gimple_switch_default_bb.
5435 (convert_switch_statements):
5437 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5438 * stmt.c (label_to_block_fn): Use label_to_block and pass
5439 cfun argument explicitly and use gimple_switch_label_bb.
5440 (expand_case): Likewise.
5441 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5442 cfun argument explicitly. Likewise.
5443 (make_edges_bb): Likewise.
5444 (make_cond_expr_edges): Likewise.
5445 (get_cases_for_edge): Likewise.
5446 (make_gimple_switch_edges): Likewise.
5447 (label_to_block_fn): Likewise.
5448 (label_to_block): Likewise.
5449 (make_goto_expr_edges): Likewise.
5450 (make_gimple_asm_edges): Likewise.
5451 (main_block_label): Likewise.
5452 (group_case_labels_stmt): Likewise.
5453 (find_taken_edge_computed_goto): Likewise.
5454 (find_taken_edge_switch_expr): Likewise.
5455 (gimple_verify_flow_info): Likewise.
5456 (gimple_redirect_edge_and_branch): Likewise.
5457 (gimple_switch_label_bb): New function.
5458 (gimple_switch_default_bb): Likewise.
5459 (gimple_switch_edge): Likewise.
5460 (gimple_switch_default_edge): Likewise.
5461 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5462 (label_to_block): ... with this.
5463 (gimple_switch_label_bb): New.
5464 (gimple_switch_default_bb): Likewise.
5465 (gimple_switch_edge): Likewise.
5466 (gimple_switch_default_edge): Likewise.
5467 * tree-cfgcleanup.c (convert_single_case_switch): Use
5468 new gimple functions and pass new argument to label_to_block.
5469 (cleanup_control_flow_bb):
5470 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5471 cfun argument explicitly.
5472 (make_eh_edges): Likewise.
5473 (redirect_eh_dispatch_edge): Likewise.
5474 (lower_resx): Likewise.
5475 (lower_eh_dispatch): Likewise.
5476 (maybe_remove_unreachable_handlers): Likewise.
5477 (unsplit_eh): Likewise.
5478 (cleanup_empty_eh): Likewise.
5479 (verify_eh_edges): Likewise.
5480 (verify_eh_dispatch_edge): Likewise.
5481 * tree-ssa-dom.c (record_edge_info): Likewise.
5482 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5483 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5484 (thread_through_normal_block): Likewise.
5485 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5486 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5487 * tree-switch-conversion.c (switch_conversion::collect): Use new
5489 (switch_conversion::check_final_bb): Likewise.
5490 (switch_conversion::gather_default_values): Pass new argument
5492 (switch_conversion::build_constructors): Likewise.
5493 (switch_decision_tree::compute_cases_per_edge): Use new
5494 gimple_switch_edge function.
5495 (switch_decision_tree::analyze_switch_statement): Pass new argument
5497 (switch_decision_tree::try_switch_expansion): Use
5498 gimple_switch_default_edge.
5499 * tree-vrp.c (find_switch_asserts): Pass new argument
5501 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5502 (vr_values::simplify_switch_using_ranges): Likewise.
5504 2018-08-27 Richard Biener <rguenther@suse.de>
5506 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5507 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5509 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5510 (struct vn_nary_op_s): Add unwind_to member. Add
5511 predicated_values flag and put result into a union together
5512 with a linked list of vn_pval.
5513 (struct vn_ssa_aux): Add name member to make maintaining
5514 a map of SSA name to vn_ssa_aux possible. Remove no longer
5515 needed info, dfsnum, low, visited, on_sccstack, use_processed
5516 and range_info_anti_range_p members.
5517 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5518 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5520 (vn_valueize): New global.
5521 (vn_context_bb): Likewise.
5522 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5523 VN_INFO_PTR_INFO): Remove.
5524 * tree-ssa-sccvn.c: ... (rewrite)
5525 (pass_fre::execute): For -O2+ initialize loops and run
5526 RPO VN in optimistic mode (iterating). For -O1 and -Og
5527 run RPO VN in non-optimistic mode.
5528 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5529 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5530 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5531 (rpo-vn-max-loop-depth): Document.
5532 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5533 when valuezing the VUSE signals we walked out of the region.
5534 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5535 (phi_translate): Set VN context block to use for availability
5537 (compute_avail): Likewise.
5538 (pre_valueize): New function.
5539 (pass_pre::execute): Adjust to the RPO VN API.
5541 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5542 (propagate_constants_for_unrolling): Remove.
5543 (tree_unroll_loops_completely): Perform value-numbering
5544 on the unrolled bodies loop parent.
5546 2018-08-27 Richard Biener <rguenther@suse.de>
5548 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5549 for partial antic compute.
5551 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5553 PR rtl-optimization/87065
5554 * combine.c (simplify_if_then_else): Formatting fix.
5555 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5557 (known_cond): Don't return const_true_rtx for vector modes. Use
5558 CONST0_RTX instead of const0_rtx. Formatting fixes.
5560 2018-08-27 Martin Liska <mliska@suse.cz>
5562 PR gcov-profile/87069
5563 * gcov.c (process_file): Record files already processed
5564 and warn about a file being processed multiple times.
5566 2018-08-27 Martin Liska <mliska@suse.cz>
5569 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5570 Set default values for x_aarch64_*_string strings.
5571 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5572 prefix. For -mabi do not print '=ABI' in help and use
5573 <option_value> format for -msve-vector-bits and -moverride
5576 2018-08-26 Jeff Law <law@redhat.com>
5578 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5581 2018-08-26 Marek Polacek <polacek@redhat.com>
5583 PR c++/87029, Implement -Wredundant-move.
5584 * doc/invoke.texi: Document -Wredundant-move.
5586 2018-08-25 Martin Sebor <msebor@redhat.com>
5588 PR tree-optimization/87059
5589 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5590 to the same type as the other.
5591 * fold-const.c (fold_binary_loc): Assert expectation.
5593 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5595 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5596 extraneous parentheses, dead code section and formatting.
5598 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5601 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5602 wide enough for jumps in the line-numbering to be visible.
5603 (layout::print_gap_in_line_numbering): New member function.
5604 (layout::calculate_line_spans): When using line numbering, merge
5605 line spans that are only 1 line apart.
5606 (diagnostic_show_locus): When printing line numbers, show gaps in
5607 line numbering directly, rather than printing headers.
5608 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5609 line-numbering with multiple line spans.
5610 (selftest::test_fixit_insert_containing_newline_2): Add test of
5611 line-numbering, in which the spans are close enough to be merged.
5613 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5615 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5616 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5617 * tree-vrp.c (range_is_nonnull): Remove.
5618 (range_includes_zero_p): Accept value_range instead of min/max.
5619 (extract_range_from_binary_expr_1): Do not early bail on
5621 Use range_includes_zero_p instead of range_is_nonnull.
5622 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5623 of range_is_nonnull.
5624 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5625 special case VR_ANTI_RANGE.
5626 (vrp_finalize): Same.
5627 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5629 (range_is_nonnull): Remove.
5630 * vr-values.c (vrp_stmt_computes_nonzero): Use
5631 range_includes_zero_p instead of range_is_nonnull.
5632 (extract_range_basic): Pass value_range to range_includes_zero_p
5633 instead of range_is_nonnull.
5635 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5637 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5638 * emit-rtl.h (rtl_data): Remove return_bnd.
5639 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5640 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5641 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5642 (POINTER_BOUNDS_MODE): Remove definition.
5643 (make_pointer_bounds_mode): Remove.
5644 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5645 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5646 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5647 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5648 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5649 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5650 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5652 * config/i386/i386-modes.def (BND32, BND64): Remove.
5653 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5654 (dbx64_register_map): Ditto.
5655 (svr4_dbx_register_map): Ditto.
5656 (indirect_thunk_bnd_needed): Remove.
5657 (indirect_thunks_bnd_used): Ditto.
5658 (indirect_return_bnd_needed): Ditto.
5659 (indirect_return_via_cx_bnd): Ditto.
5660 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5661 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5662 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5663 (output_indirect_thunk_function): Remove handling of
5664 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5665 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5666 (ix86_save_reg): Remove handling of crtl->return_bnd.
5667 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5668 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5669 and UNSPEC_BNDLX_ADDR.
5670 (ix86_output_indirect_branch_via_reg): Remove handling of
5671 indirect_thunk_prefix_bnd.
5672 (ix86_output_indirect_branch_via_push): Ditto.
5673 (ix86_output_function_return): Ditto.
5674 (ix86_output_indirect_function_return): Ditto.
5675 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5676 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5677 (CALL_USED_REGISTERS): Ditto.
5678 (REG_ALLOC_ORDER): Update for removal of bound registers.
5679 (HI_REGISTER_NAMES): Ditto.
5680 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5681 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5682 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5683 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5684 (FIRST_PSEUDO_REG): Update.
5685 (BND): Remove mode iterator.
5686 * config/i386/predicates.md (bnd_mem_operator): Remove.
5688 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5690 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5693 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5695 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5696 the case in which the permute needs only a single element and
5697 repeats for every vector of the result. Extend that case to
5698 handle variable-length vectors.
5699 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5701 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5704 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5705 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5707 2018-08-24 Richard Biener <rguenther@suse.de>
5709 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5710 bb_flags_allocated members.
5711 (auto_flag): New RAII class for allocating flags.
5712 (auto_edge_flag): New RAII class for allocating edge flags.
5713 (auto_bb_flag): New RAII class for allocating bb flags.
5714 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5716 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5717 in favor of temporarily allocated BB flag.
5718 * hsa-brig.c: Re-order includes.
5719 * hsa-dump.c: Likewise.
5720 * hsa-regalloc.c: Likewise.
5721 * print-rtl.c: Likewise.
5722 * profile-count.c: Likewise.
5724 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5727 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5730 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5733 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5734 from wide_int_range_multiplicative_op.
5736 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5738 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5741 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5743 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5746 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5748 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5749 full GENERIC expression used for replacement.
5751 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5753 * tree-vrp.c (abs_extent_range): Remove.
5754 (extract_range_into_wide_ints): Pass wide ints by reference.
5755 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5756 Pass wide ints by reference in all calls to
5757 extract_range_into_wide_ints.
5758 * wide-int-range.cc (wide_int_range_div): New.
5759 * wide-int-range.h (wide_int_range_div): New.
5760 (wide_int_range_includes_zero_p): New.
5761 (wide_int_range_zero_p): New.
5763 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5765 * config/aarch64/aarch64.md (arches): New enum.
5766 (arch): New enum attr.
5767 (arch_enabled): New attr.
5768 (enabled): Now uses arch_enabled only.
5769 (simd, sve, fp16): Removed attribute.
5770 (fp): Attr now defined in terms of 'arch'.
5771 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5772 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5773 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5774 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5775 attributes into 'arch'.
5776 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5777 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5778 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5779 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5780 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5781 'simd' attribute into 'arch'.
5782 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5783 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5784 Convert use of 'fp' attribute to 'arch'.
5785 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5786 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5788 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5789 (different modes) Merge 'fp' and 'simd' into 'arch'.
5790 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5793 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5795 PR rtl-optimization/87026
5796 * expmed.c (canonicalize_comparison): If we can no longer create
5797 pseudoregisters, don't.
5799 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
5802 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5804 * config/arm/arm.c (speculation_barrier_libfunc): New static
5806 (arm_init_libfuncs): Initialize it.
5807 (arm_emit_speculation_barrier): New function.
5808 * config/arm/arm.md (speculation_barrier): Call
5809 arm_emit_speculation_barrier for architectures that do not have
5811 (speculation_barrier_insn): Only match on Armv7 or later.
5813 2018-08-23 Richard Biener <rguenther@suse.de>
5816 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5819 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5821 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5822 of single-vector TBLs.
5823 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5826 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5829 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5830 aarch64_evpc_tbl guard.
5832 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
5834 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5837 2018-08-22 Martin Sebor <msebor@redhat.com>
5840 * tree-pretty-print.c (pretty_print_string): Add argument.
5841 (dump_generic_node): Call to pretty_print_string with string size.
5843 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
5845 PR rtl-optimization/86771
5846 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5847 of two SETs into those two SETs, one to be placed at i2, if that SETs
5848 destination is modified between i2 and i3.
5850 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5852 PR tree-optimization/86725
5853 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5855 (vect_analyze_scalar_cycles_1): Check it.
5857 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5859 PR tree-optimization/86725
5860 * tree-vect-loop.c (vect_is_simple_reduction): When treating
5861 an outer loop phi as a double reduction, make sure that the
5862 single user of the phi result is an inner loop phi.
5864 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5866 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5867 grouped stores with gaps to a strided group.
5869 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5871 * tree-vect-stmts.c (get_group_load_store_type)
5872 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5873 first statement in a group.
5875 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5877 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5878 the sequence used in gcc/gcc.c.
5880 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5883 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5886 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5888 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5889 Darwin10-specific unwinder-shim.
5890 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5891 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5892 New to cater for Darwin10 Rosetta.
5894 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5896 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5897 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5899 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5904 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5905 (dwarf2out_switch_text_section): Generate a local label for the
5906 second function sub-section and apply it as the second FDE start
5908 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5909 second sub-section start.
5911 2018-08-22 Richard Biener <rguenther@suse.de>
5913 PR tree-optimization/86988
5914 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5916 2018-08-22 Richard Biener <rguenther@suse.de>
5918 PR tree-optimization/86945
5919 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5921 2018-08-22 Alexandre Oliva <oliva@adacore.com>
5923 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5924 a comment about how uses of r2 for .sdata2 come about.
5926 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
5928 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5930 2018-08-21 Marek Polacek <polacek@redhat.com>
5932 PR c++/86981, Implement -Wpessimizing-move.
5933 * doc/invoke.texi: Document -Wpessimizing-move.
5935 2018-08-21 Jan Hubicka <jh@suse.cz>
5937 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5938 * tree.h (is_redundant_typedef): Remove.
5939 * dwarf2out.c (is_redundant_typedef): Turn into static function.
5941 2018-08-21 Jan Hubicka <jh@suse.cz>
5943 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5946 2018-08-21 Tamar Christina <tamar.christina@arm.com>
5948 * expmed.c (extract_low_bits): Reject invalid subregs early.
5950 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5953 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5956 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5958 * config/vxworks.h: Guard vxworks_asm_out_constructor and
5959 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5960 * config/vxworks.c: Likewise.
5962 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5964 * config/vxworks.c: Set targetm.have_ctors_dtors
5965 if HAVE_INITFINI_ARRAY_SUPPORT.
5966 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5967 if HAVE_INITFINI_ARRAY_SUPPORT.
5969 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5971 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5972 default search path for VxWorks < 7.
5974 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5976 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5977 (get_format_string): Refer to c_getstr.
5979 2018-08-21 Tom de Vries <tdevries@suse.de>
5981 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5982 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5983 (debuginfo_early_stop): Declare.
5984 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5985 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5986 (debuginfo_early_stop): New function.
5987 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5988 and debuginfo_early_stop.
5989 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5990 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5991 (general_init): Call debuginfo_early_init.
5992 (finalize): Call debuginfo_fini.
5993 (do_compile): Call debuginfo_init.
5994 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5996 (@item -fdump-debug, @item -fdump-earlydebug): Add.
5998 2018-08-21 Tom de Vries <tdevries@suse.de>
6000 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6001 flag_dump_noaddr and flag_dump_unnumbered.
6003 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6005 * wide-int-range.cc (wide_int_range_abs): New.
6006 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6007 * wide-int-range.h (wide_int_range_abs): New.
6008 (wide_int_range_min_max): New.
6009 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6010 case to call wide_int_range_abs.
6011 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6012 (extract_range_from_abs_expr): Delete.
6014 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6017 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6018 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6021 2018-08-20 Nathan Sidwell <nathan@acm.org>
6022 Jeff Law <law@redhat.com>
6024 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6025 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6027 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6030 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6031 (decl_attributes): Likewise.
6032 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6034 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6035 * diagnostic-core.h (class auto_diagnostic_group): New class.
6036 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6037 (diagnostic_report_diagnostic): Handle the first diagnostics within
6039 (emit_diagnostic): Add auto_diagnostic_group instance.
6041 (inform_n): Likewise.
6042 (warning): Likewise.
6043 (warning_at): Likewise.
6044 (warning_n): Likewise.
6045 (pedwarn): Likewise.
6046 (permerror): Likewise.
6048 (error_n): Likewise.
6049 (error_at): Likewise.
6051 (fatal_error): Likewise.
6052 (internal_error): Likewise.
6053 (internal_error_no_backtrace): Likewise.
6054 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6055 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6056 * diagnostic.h (struct diagnostic_context): Add fields
6057 "diagnostic_group_nesting_depth",
6058 "diagnostic_group_emission_count", "begin_group_cb",
6060 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6061 Add auto_diagnostic_group instance(s).
6062 (find_explicit_erroneous_behavior): Likewise.
6063 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6064 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6065 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6066 (gimplify_va_arg_expr): Likewise.
6067 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6068 (HSA_SORRY_AT): Likewise.
6069 * ipa-devirt.c (compare_virtual_tables): Likewise.
6070 (warn_odr): Likewise.
6071 * multiple_target.c (expand_target_clones): Likewise.
6072 * opts-common.c (cmdline_handle_error): Likewise.
6073 * reginfo.c (globalize_reg): Likewise.
6074 * substring-locations.c (format_warning_n_va): Likewise.
6075 * tree-inline.c (expand_call_inline): Likewise.
6076 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6077 * tree-ssa-loop-niter.c
6078 (do_warn_aggressive_loop_optimizations): Likewise.
6079 * tree-ssa-uninit.c (warn_uninit): Likewise.
6080 * tree.c (warn_deprecated_use): Likewise.
6082 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6085 * config/i386/i386.md (eh_return): Always update EH return
6086 address in word_mode.
6088 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6090 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6091 TARGET_SPLIT_COMPLEX_ARG is defined.
6093 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6095 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6097 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6100 * expr.c (expand_assignment): Assert that bitpos is positive.
6101 (store_field): Likewise
6102 (expand_expr_real_1): Make sure that bitpos is positive.
6103 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6106 2018-08-20 Nathan Sidwell <nathan@acm.org>
6108 * Makefile.in (CPP_ID_DATA_H): Delete.
6109 (CPP_INTERNAL_H): Don't add it.
6110 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6111 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6113 2018-08-20 Richard Biener <rguenther@suse.de>
6115 PR tree-optimization/78655
6116 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6117 pointer + offset nonnull if either operand is nonnull work.
6119 2018-08-20 Tom de Vries <tdevries@suse.de>
6121 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6122 unless the referenced die describes the added property using
6123 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6124 Otherwise, add a DW_AT_location to the referenced die.
6126 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6129 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6130 register_operand when calling ix86_set_reg_reg_cost.
6131 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6132 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6133 predicate and to 1 otherwise.
6135 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6137 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6138 emit a diagnostic that it is not supported and reset the option.
6139 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6140 supported and consume the option. (ASM_FINAL_SPEC): New.
6142 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6144 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6147 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6149 C-SKY port: Documentation
6151 * doc/extend.texi (C-SKY Function Attributes): New section.
6152 * doc/invoke.texi (Option Summary): Add C-SKY options.
6153 (C-SKY Options): New section.
6154 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6156 2018-08-17 Jojo <jijie_rong@c-sky.com>
6157 Huibin Wang <huibin_wang@c-sky.com>
6158 Sandra Loosemore <sandra@codesourcery.com>
6159 Chung-Lin Tang <cltang@codesourcery.com>
6161 C-SKY port: Backend implementation
6163 * config/csky/*: New.
6164 * common/config/csky/*: New.
6166 2018-08-17 Jojo <jijie_rong@c-sky.com>
6167 Huibin Wang <huibin_wang@c-sky.com>
6168 Sandra Loosemore <sandra@codesourcery.com>
6169 Chung-Lin Tang <cltang@codesourcery.com>
6170 Andrew Jenner <andrew@codesourcery.com>
6172 C-SKY port: Configury
6174 * config.gcc (csky-*-*): New.
6175 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6176 * configure: Regenerated.
6178 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6180 * dump-context.h: Include "dumpfile.h".
6181 (dump_context::dump_printf_va): Convert final param from va_list
6182 to va_list *. Convert from ATTRIBUTE_PRINTF to
6183 ATTRIBUTE_GCC_DUMP_PRINTF.
6184 (dump_context::dump_printf_loc_va): Likewise.
6185 * dumpfile.c: Include "stringpool.h".
6186 (make_item_for_dump_printf_va): Delete.
6187 (make_item_for_dump_printf): Delete.
6188 (class dump_pretty_printer): New class.
6189 (dump_pretty_printer::dump_pretty_printer): New ctor.
6190 (dump_pretty_printer::emit_items): New member function.
6191 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6193 (dump_pretty_printer::emit_item): New member function.
6194 (dump_pretty_printer::stash_item): New member function.
6195 (dump_pretty_printer::format_decoder_cb): New member function.
6196 (dump_pretty_printer::decode_format): New member function.
6197 (dump_context::dump_printf_va): Reimplement in terms of
6198 dump_pretty_printer.
6199 (dump_context::dump_printf_loc_va): Convert final param from va_list
6201 (dump_context::begin_scope): Reimplement call to
6202 make_item_for_dump_printf.
6203 (dump_printf): Update for change to dump_printf_va.
6204 (dump_printf_loc): Likewise.
6205 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6206 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6207 with %T, %E, and %G.
6208 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6209 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6210 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6211 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6212 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6213 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6214 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6215 within a dump_printf_loc call to "%wu".
6216 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6217 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6218 missing space after "=".
6219 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6220 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6221 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6222 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6223 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6224 duplicate "vectorized" from message.
6226 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6228 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6229 polyNxK_t element's TYPE_STRING_FLAG.
6231 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6233 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6234 (they were unnamed before). Fix comments.
6236 2018-08-17 Nathan Sidwell <nathan@acm.org>
6238 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6240 2018-08-17 Richard Biener <rguenther@suse.de>
6242 PR tree-optimization/86841
6243 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6245 2018-08-17 Martin Liska <mliska@suse.cz>
6247 * common.opt: Remove Warn, Init and Report for options with
6248 Ignore/Deprecated flag. Warning is done automatically for
6250 * config/i386/i386.opt: Likewise.
6251 * config/ia64/ia64.opt: Likewise.
6252 * config/rs6000/rs6000.opt: Likewise.
6253 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6254 Remove usage of flag_check_pointer_bounds.
6255 * lto-wrapper.c (merge_and_complain): Do not handle
6256 OPT_fcheck_pointer_bounds.
6257 (append_compiler_options): Likewise.
6258 * opt-functions.awk: Do not handle Deprecated.
6259 * optc-gen.awk: Check that Var, Report and Init are not
6260 used for an option with Ignore/Deprecated flag.
6261 * opts-common.c (decode_cmdline_option): Do not report
6263 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6265 * opts.h (struct cl_option): Remove cl_deprecated flag.
6266 (CL_ERR_DEPRECATED): Remove error enum value.
6268 2018-08-17 Richard Biener <rguenther@suse.de>
6271 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6272 across a va-arg-pack using call adjust its return value accordingly.
6274 2018-08-16 Martin Sebor <msebor@redhat.com>
6276 PR tree-optimization/86853
6277 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6278 (struct fmtresult): Add member and initialize it in ctors.
6279 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6280 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6281 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6282 (parse_directive): Handle %C same as %c.
6283 (sprintf_dom_walker::compute_format_length): Adjust.
6284 (is_call_safe): Adjust.
6286 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6288 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6289 for determining how to count the elements.
6290 * builtins.h (c_strlen): Adjust prototype.
6291 * expr.c (string_constant): Add new parameter mem_size.
6292 Set *mem_size appropriately.
6293 * expr.h (string_constant): Adjust protoype.
6294 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6295 * gimple-fold.h (get_range_strlen): Adjust prototype.
6296 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6297 (format_string): Call get_string_length with eltsize.
6299 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6301 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6302 to emit the span, rather than setting it as the prefix.
6304 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6306 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6307 "margin_char" parameter, defaulting to space. Use it in place
6308 of pp_space for the initial part of the margin.
6309 (layout::print_leading_fixits): Use '+' when filling the margin
6310 of line-insertion fix-it hints.
6312 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6314 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6317 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6319 * config/rs6000/altivec.md: Don't set length attribute to the default
6321 * config/rs6000/darwin.md: Ditto.
6322 * config/rs6000/dfp.md: Ditto.
6323 * config/rs6000/htm.md: Ditto.
6324 * config/rs6000/rs6000.md: Ditto.
6325 * config/rs6000/sync.md: Ditto.
6326 * config/rs6000/vsx.md: Ditto.
6328 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6330 * config/rs6000/altivec.md: Don't set length attribute to the default
6331 value, for branch instructions.
6332 * config/rs6000/darwin.md: Ditto.
6333 * config/rs6000/rs6000.md: Ditto.
6335 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6337 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6338 (unnamed conditional branch define_insn): Set length to 4 or 8
6339 depending on offset.
6340 (<bd>_<mode>): Similar, for alternative 0.
6341 (<bd>tf_<mode>): Ditto.
6343 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6345 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6347 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6349 * doc/rtl.texi: Replace old RTX class names with new names.
6352 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6354 * expmed.h (canonicalize_comparison): New declaration.
6355 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6356 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6357 * optabs.c (prepare_cmp_insn): Likewise.
6358 * rtl.h (unsigned_condition_p): New function which checks if a
6359 comparison operator is unsigned.
6361 2018-08-16 Nathan Sidwell <nathan@acm.org>
6363 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6364 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6366 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6369 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6370 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6371 (mov<mov>): ..this and enable unconditionally.
6373 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6375 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6377 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6379 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6380 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6381 "Common" with "Target".
6383 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6385 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6386 * doc/invoke.texi (mmitigate-rop): Remove.
6387 * config/i386/i386.c: Do not include "regrename.h".
6388 (ix86_rop_should_change_byte_p, reg_encoded_number)
6389 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6391 (ix86_reorg): Remove call to ix86_mitigate_rop.
6392 * config/i386/i386.md (attr "modrm_class"): Remove.
6393 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6394 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6395 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6397 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6399 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6400 allow folding of mergeh() and mergel() for the float and double types.
6401 (fold_mergehl_helper): Rework to handle building a permute tree
6404 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6406 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6409 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6411 * common.opt (fdiagnostics-show-labels): New option.
6412 * diagnostic-show-locus.c (class layout_range): Add field
6414 (class layout): Add field "m_show_labels_p".
6415 (layout_range::layout_range): Add param "label" and use it to
6417 (make_range): Pass in NULL for new "label" param of layout_range's
6419 (layout::layout): Initialize m_show_labels_p.
6420 (layout::maybe_add_location_range): Pass in loc_range->m_label
6421 when constructing layout_range instances.
6422 (struct line_label): New struct.
6423 (layout::print_any_labels): New member function.
6424 (layout::print_line): Call it if label-printing is enabled.
6425 (selftest::test_one_liner_labels): New test.
6426 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6427 * diagnostic.c (diagnostic_initialize): Initialize
6428 context->show_labels_p.
6429 * diagnostic.h (struct diagnostic_context): Add field
6431 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6432 -fno-diagnostics-show-labels.
6433 * dwarf2out.c (gen_producer_string): Add
6434 OPT_fdiagnostics_show_labels to the ignored options.
6435 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6437 (gcc_rich_location::maybe_add_expr): Likewise.
6438 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6439 label" param, defaulting to NULL.
6440 (gcc_rich_location::add_expr): Add "label" param.
6441 (gcc_rich_location::maybe_add_expr): Likewise.
6442 (class text_range_label): New class.
6443 (class range_label_for_type_mismatch): New class.
6444 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6445 of format_warning_va.
6446 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6447 * lto-wrapper.c (merge_and_complain): Add
6448 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6449 (append_compiler_options): Likewise to the dropped options.
6450 (append_diag_options): Likewise to the passed-on options.
6451 * opts.c (common_handle_option): Handle the new option.
6452 * selftest-diagnostic.c
6453 (test_diagnostic_context::test_diagnostic_context): Enable
6455 * substring-locations.c: Include "gcc-rich-location.h".
6456 (format_warning_n_va): Add "fmt_label" and "param_label" params
6457 and use them as appropriate.
6458 (format_warning_va): Add "fmt_label" and "param_label" params,
6459 passing them on to format_warning_n_va.
6460 (format_warning_at_substring): Likewise.
6461 (format_warning_at_substring_n): Likewise.
6462 * substring-locations.h (format_warning_va): Add "fmt_label" and
6463 "param_label" params.
6464 (format_warning_n_va): Likewise.
6465 (format_warning_at_substring): Likewise.
6466 (format_warning_at_substring_n): Likewise.
6467 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6469 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6472 * builtins.c (expand_builtin_memcmp): Do not expand the call
6473 when overflow is detected.
6475 2018-08-15 Martin Sebor <msebor@redhat.com>
6477 PR tree-optimization/71625
6478 * config/aarch64/aarch64-builtins.c
6479 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6481 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6483 * config/s390/s390.c (s390_reorg): Remove loop.
6485 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6488 (darwin_function_switched_text_sections): Delete.
6489 * gcc/config/darwin.h
6490 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6492 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6495 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6496 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6497 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6499 2018-08-15 Martin Liska <mliska@suse.cz>
6501 PR tree-optimization/86925
6502 * predict.c (expr_expected_value_1): When taking
6503 later predictor, assign also probability.
6504 Use fold_build2_initializer_loc in order to fold
6505 the expression in -frounding-math.
6507 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6509 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6511 (expand_vec_perm_1): Try the new method.
6513 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6516 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6517 Check whether lra_live_max_point is 0 before dividing.
6519 2018-08-14 Martin Sebor <msebor@redhat.com>
6521 PR tree-optimization/86650
6522 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6523 (vrp_prop::check_mem_ref): Same.
6525 2018-08-13 Liu Hao <lh_mouse@126.com>
6527 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6528 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6529 and clear it thereafter, as it only works for DBCS.
6531 2018-08-13 Liu Hao <lh_mouse@126.com>
6533 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6534 handle returned by _get_osf_handle().
6536 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6538 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6539 for folding vec_perm.
6541 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6543 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6544 Add support for gimple-folding of vec_pack() and vec_unpack()
6547 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6549 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6550 vec_xst variants to the list.
6551 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6552 vector loads and stores.
6554 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6556 * config.gcc (rs6000-ibm-aix4.x): Delete.
6557 (rs6000-ibm-aix5.1): Delete.
6558 (rs6000-ibm-aix5.2): Delete.
6559 (rs6000-ibm-aix5.3): Delete.
6560 * config/rs6000/aix43.h: Delete.
6561 * config/rs6000/aix51.h: Delete.
6562 * config/rs6000/aix52.h: Delete.
6563 * config/rs6000/t-aix43: Delete.
6565 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6567 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6569 (s390_decompose_address): Factor out constant pool ref
6572 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6574 * config/nds32/nds32-predicates.c
6575 (nds32_can_use_bclr_p): Change return type as bool.
6576 (nds32_can_use_bset_p): Ditto.
6577 (nds32_can_use_btgl_p): Ditto.
6578 (nds32_can_use_bitci_p): Ditto.
6579 * config/nds32/nds32-protos.h
6580 (nds32_can_use_bclr_p): Change declaration.
6581 (nds32_can_use_bset_p): Ditto.
6582 (nds32_can_use_btgl_p): Ditto.
6583 (nds32_can_use_bitci_p): Ditto.
6585 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6587 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6588 Support -msched-prolog-epilog option.
6589 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6591 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6593 * common/config/nds32/nds32-common.c
6594 (nds32_option_optimization_table): Enalbe -malways-align.
6596 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6598 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6600 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6601 OPT_misr_secure_ case.
6602 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6603 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6604 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6606 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6607 (nds32_isr_info): New field security_level.
6608 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6609 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6610 * config/nds32/nds32.opt (misr-secure): New option.
6611 * config/nds32/nds32_init.inc: New file.
6612 * config/nds32/nds32_isr.h: New file.
6614 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6616 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6617 Update comment for atomic instructions.
6618 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6619 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6621 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6622 load for __ATOMIC_SEQ_CST model.
6623 (atomic_loaddi_1): Remove float register target.
6624 (atomic_storedi): Handle CONST_INT values.
6625 (atomic_storedi_1): Remove float register source. Add special case
6627 (memory_barrier): New expander and insn.
6629 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6631 PR tree-optimization/86835
6632 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6633 new_stmt after def_gsi, make sure to insert new_square_stmt after
6634 that stmt, not 2 stmts before it.
6636 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6639 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6642 2018-08-10 Martin Liska <mliska@suse.cz>
6645 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6647 * builtins.c (expand_builtin_expect_with_probability):
6649 (expand_builtin_expect_with_probability): New function.
6650 (build_builtin_expect_predicate): Add new argumnet probability
6651 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6652 (fold_builtin_expect):
6655 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6656 * builtins.h (fold_builtin_expect): Set new argument.
6657 * doc/extend.texi: Document __builtin_expect_with_probability.
6658 * doc/invoke.texi: Likewise.
6659 * gimple-fold.c (gimple_fold_call): Pass new argument.
6660 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6661 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6662 * predict.c (get_predictor_value): New function.
6663 (expr_expected_value): Add new argument probability. Assume
6664 that predictor and probability are always non-null.
6665 (expr_expected_value_1): Likewise. For __builtin_expect and
6666 __builtin_expect_with_probability set probability. Handle
6667 combination in binary expressions.
6668 (tree_predict_by_opcode): Simplify code by simply calling
6669 get_predictor_value.
6670 (pass_strip_predict_hints::execute): Add handling of
6671 BUILT_IN_EXPECT_WITH_PROBABILITY.
6672 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6674 * tree.h (DECL_BUILT_IN_P): New function.
6676 2018-08-10 Martin Liska <mliska@suse.cz>
6678 PR tree-optimization/85799
6679 * passes.def: Add argument for pass_strip_predict_hints.
6680 * predict.c (class pass_strip_predict_hints): Add new argument
6682 (strip_predictor_early): New function.
6683 (pass_strip_predict_hints::execute): Call the function to
6685 (strip_predict_hints): New function.
6686 * predict.def: Fix comment.
6688 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6690 * Makefile.in: Clarify which tm.texi to copy over to assert the
6691 right to grant a GFDL license for all.
6693 2018-08-09 Jeff Law <law@redhat.com>
6695 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6698 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6700 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6703 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6705 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6706 reductions for variable-length vectors.
6708 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6711 * common.opt (fdiagnostics-show-line-numbers): New option.
6712 * diagnostic-show-locus.c (class layout): Add fields
6713 "m_show_line_numbers_p" and "m_linenum_width";
6714 (num_digits): New function.
6715 (test_num_digits): New function.
6716 (layout::layout): Initialize new fields. Update m_x_offset
6717 logic to handle any left margin.
6718 (layout::print_source_line): Print line number when requested.
6719 (layout::start_annotation_line): New member function.
6720 (layout::print_annotation_line): Call it.
6721 (layout::print_leading_fixits): Likewise.
6722 (layout::print_trailing_fixits): Likewise. Update calls to
6723 move_to_column for new parameter.
6724 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6725 it to potentially call start_annotation_line.
6726 (layout::show_ruler): Call start_annotation_line.
6727 (selftest::test_line_numbers_multiline_range): New selftest.
6728 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6729 and selftest::test_line_numbers_multiline_range.
6730 * diagnostic.c (diagnostic_initialize): Initialize
6731 show_line_numbers_p.
6732 * diagnostic.h (struct diagnostic_context): Add field
6733 "show_line_numbers_p".
6734 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6735 -fno-diagnostics-show-line-numbers.
6736 * dwarf2out.c (gen_producer_string): Add
6737 OPT_fdiagnostics_show_line_numbers to the ignored options.
6738 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6739 one setting" options.
6740 (append_compiler_options): Likewise to the dropped options.
6741 (append_diag_options): Likewise to the passed-on options.
6742 * opts.c (common_handle_option): Handle the new option.
6743 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6745 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6747 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6748 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6749 third argument of type "const signed char" to descriptions of
6750 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6751 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6752 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6753 __builtin_bcdsub_ov functions.
6755 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6757 PR tree-optimization/86858
6758 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6759 flow_bb_inside_loop_p calls.
6761 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6763 PR tree-optimization/86871
6764 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6765 instead of gimple_assign_lhs.
6767 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6770 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6771 register constraint to operand 0.
6772 (add<mode>3_carryinC): Likewise.
6773 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6775 2018-08-09 Martin Liska <mliska@suse.cz>
6778 * common.opt: Remove extra line.
6780 2018-08-09 Martin Liska <mliska@suse.cz>
6782 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6783 at the end of a line, make first letter capital and end up
6784 a sentence with a dot.
6785 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6786 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6787 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6788 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6789 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6790 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6791 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6792 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6793 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6794 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6795 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6796 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6797 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6798 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6799 (PARAM_TREE_REASSOC_WIDTH): Likewise.
6800 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6801 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6802 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6804 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
6807 * config/s390/s390.c (s390_option_override_internal): Reduce the
6808 stack-clash-protection-probe-interval param if it would be too big
6811 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
6814 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6815 * config/m68k/m68k.c (handle_move_double): Don't call
6816 m68k_final_prescan_insn.
6817 (m68k_adjust_decorated_operand): Renamed from
6818 m68k_final_prescan_insn, remove first and third operand and
6820 (print_operand): Call it.
6821 (print_operand_address): Call it.
6823 2018-08-08 Nathan Sidwell <nathan@acm.org>
6825 * diagnostic.c (diagnostic_report_current_module): Use
6826 linemap_included_from & linemap_included_from_linemap.
6828 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
6830 * config/aarch64/aarch64-cores.def: Add phecda core.
6831 * config/aarch64/aarch64-tune.md: Regenerate.
6832 * doc/invoke.texi: Add phecda core.
6834 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6837 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6839 * config/s390/s390.md ("movti"): Add more alternatives for
6840 constant to GPR copies.
6842 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6844 * config/s390/s390.c: Fix whitespace damage throughout the file.
6845 * config/s390/s390.h: Likewise.
6846 * config/s390/tpf.h: Likewise.
6848 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6850 * config/s390/s390.c (s390_loadrelative_operand_p):
6851 Remove TARGET_CPU_ZARCH usages.
6852 (s390_rtx_costs): Likewise.
6853 (s390_legitimate_constant_p): Likewise.
6854 (s390_cannot_force_const_mem): Likewise.
6855 (legitimate_reload_constant_p): Likewise.
6856 (s390_preferred_reload_class): Likewise.
6857 (legitimize_pic_address): Likewise.
6858 (legitimize_tls_address): Likewise.
6859 (s390_split_branches): Removed.
6860 (s390_add_execute): Removed.
6861 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6862 (s390_mainpool_start): Likewise.
6863 (s390_mainpool_finish): Likewise.
6864 (s390_mainpool_cancel): Removed.
6865 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6866 (s390_chunkify_cancel): Likewise.
6867 (s390_return_addr_rtx): Likewise.
6868 (s390_register_info): Remove split_branches_pending_p uages.
6869 (s390_optimize_register_info): Likewise.
6870 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6871 split_branches_pending_p usages.
6872 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6873 (s390_load_got): Likewise.
6874 (s390_expand_split_stack_prologue): Likewise.
6875 (output_asm_nops): Likewise.
6876 (s390_function_profiler): Likewise.
6877 (s390_emit_call): Likewise.
6878 (s390_conditional_register_usage): Likewise.
6879 (s390_optimize_prologue): Likewise.
6880 (s390_reorg): Remove TARGET_CPU_ZARCH and
6881 split_branches_pending_p usages.
6882 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6884 (s390_output_indirect_thunk_function): Likewise.
6885 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6886 (TARGET_CPU_ZARCH_P): Removed.
6887 (struct machine_function): Remove split_branches_pending_p.
6888 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6890 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6892 * common/config/s390/s390-common.c (processor_flags_table):
6894 * config.gcc: Remove with_arch/with_tune support.
6895 * config/s390/2064.md: Remove cpu attribute comparisons.
6896 * config/s390/driver-native.c (s390_host_detect_local_cpu):
6898 * config/s390/linux.h (ASM_SPEC):
6899 Remove -march support.
6900 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6901 Use a table to get an arch level.
6902 * config/s390/s390-opts.h (enum processor_type):
6904 * config/s390/s390.c
6905 (processor_table): Remove entries, add arch_level values.
6906 (s390_issue_rate): Remove cases.
6907 (s390_option_override): Adjust
6908 s390_option_override_internal() call.
6909 (s390_option_override_internal): Remove deprecation warning.
6910 (s390_valid_target_attribute_tree): Adjust
6911 s390_option_override_internal() call.
6912 * config/s390/s390.h (struct s390_processor):
6913 Share with s390-c.c, add arch_level field.
6914 * config/s390/s390.md:
6915 Remove occurrences in cpu attribute.
6916 * config/s390/s390.opt: Remove -march/-mtune support.
6917 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6918 * doc/invoke.texi: Remove deprecation warning.
6920 2018-08-08 Luis Machado <luis.machado@linaro.org>
6922 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6924 (qdf24xx_tunings): Set vector cost structure to
6925 qdf24xx_vector_cost.
6927 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6928 <register_sextend>: Set to 3.
6930 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
6933 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6934 * config/aarch64/aarch64-simd.md
6935 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6936 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6937 (aarch64_frecpx<mode>): ...this new pattern.
6938 * config/aarch64/aarch64-simd-builtins.def: Remove comment
6939 about aarch64_frecp<FRECP:frecp_suffix><mode>.
6941 2018-08-07 Martin Liska <mliska@suse.cz>
6944 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6945 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6946 * predict.def (PRED_MALLOC_NONNULL): New predictor.
6947 * doc/extend.texi: Document that malloc attribute adds
6950 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
6953 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6954 Define to speculation_safe_value_not_needed.
6956 2018-08-06 Jeff Law <law@redhat.com>
6958 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6959 the vr_values instance to cprop_into_stmt.
6960 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6961 (cprop_operand): Also query EVRP to determine if OP is a constant.
6963 2018-08-06 Nathan Sidwell <nathan@acm.org>
6965 * diagnostic.c (diagnostic_report_current_module): Reroll
6966 included-at loop. Translate text.
6968 2018-08-06 David Malcolm <dmalcolm@redhat.com>
6970 * function-tests.c (selftest::test_expansion_to_rtl): Call
6971 free_after_compilation.
6973 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6975 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6977 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
6979 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6980 loops with memory block operations from getting unrolled.
6982 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
6985 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6986 Define to speculation_safe_value_not_needed.
6988 2018-08-06 Jeff Law <law@redhat.com>
6990 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6993 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6996 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6997 with all enabled __intN types.
6999 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7001 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7003 * alias.c (record_set): Check for clobber high.
7004 * cfgexpand.c (expand_gimple_stmt): Likewise.
7005 * combine-stack-adj.c (single_set_for_csa): Likewise.
7006 * combine.c (find_single_use_1): Likewise.
7007 (set_nonzero_bits_and_sign_copies): Likewise.
7008 (get_combine_src_dest): Likewise.
7009 (is_parallel_of_n_reg_sets): Likewise.
7010 (try_combine): Likewise.
7011 (record_dead_and_set_regs_1): Likewise.
7012 (reg_dead_at_p_1): Likewise.
7013 (reg_dead_at_p): Likewise.
7014 * dce.c (deletable_insn_p): Likewise.
7015 (mark_nonreg_stores_1): Likewise.
7016 (mark_nonreg_stores_2): Likewise.
7017 * df-scan.c (df_find_hard_reg_defs): Likewise.
7018 (df_uses_record): Likewise.
7019 (df_get_call_refs): Likewise.
7020 * dwarf2out.c (mem_loc_descriptor): Likewise.
7021 * haifa-sched.c (haifa_classify_rtx): Likewise.
7022 * ira-build.c (create_insn_allocnos): Likewise.
7023 * ira-costs.c (scan_one_insn): Likewise.
7024 * ira.c (equiv_init_movable_p): Likewise.
7025 (rtx_moveable_p): Likewise.
7026 (interesting_dest_for_shprep): Likewise.
7027 * jump.c (mark_jump_label_1): Likewise.
7028 * postreload-gcse.c (record_opr_changes): Likewise.
7029 * postreload.c (reload_cse_simplify): Likewise.
7030 (struct reg_use): Add source expr.
7031 (reload_combine): Check for clobber high.
7032 (reload_combine_note_use): Likewise.
7033 (reload_cse_move2add): Likewise.
7034 (move2add_note_store): Likewise.
7035 * print-rtl.c (print_pattern): Likewise.
7036 * recog.c (decode_asm_operands): Likewise.
7037 (store_data_bypass_p): Likewise.
7038 (if_test_bypass_p): Likewise.
7039 * regcprop.c (kill_clobbered_value): Likewise.
7040 (kill_set_value): Likewise.
7041 * reginfo.c (reg_scan_mark_refs): Likewise.
7042 * reload1.c (maybe_fix_stack_asms): Likewise.
7043 (eliminate_regs_1): Likewise.
7044 (elimination_effects): Likewise.
7045 (mark_not_eliminable): Likewise.
7046 (scan_paradoxical_subregs): Likewise.
7047 (forget_old_reloads_1): Likewise.
7048 * reorg.c (find_end_label): Likewise.
7049 (try_merge_delay_insns): Likewise.
7050 (redundant_insn): Likewise.
7051 (own_thread_p): Likewise.
7052 (fill_simple_delay_slots): Likewise.
7053 (fill_slots_from_thread): Likewise.
7054 (dbr_schedule): Likewise.
7055 * resource.c (update_live_status): Likewise.
7056 (mark_referenced_resources): Likewise.
7057 (mark_set_resources): Likewise.
7058 * rtl.c (copy_rtx): Likewise.
7059 * rtlanal.c (reg_referenced_p): Likewise.
7060 (single_set_2): Likewise.
7061 (noop_move_p): Likewise.
7062 (note_stores): Likewise.
7063 * sched-deps.c (sched_analyze_reg): Likewise.
7064 (sched_analyze_insn): Likewise.
7066 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7068 * cse.c (invalidate_reg): New function extracted from...
7069 (invalidate): ...here.
7070 (canonicalize_insn): Check for clobber high.
7071 (invalidate_from_clobbers): invalidate clobber highs.
7072 (invalidate_from_sets_and_clobbers): Likewise.
7073 (count_reg_usage): Check for clobber high.
7074 (insn_live_p): Likewise.
7075 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7076 (cselib_invalidate_regno): Check for clobber in setter.
7077 (cselib_invalidate_rtx): Pass through setter.
7078 (cselib_invalidate_rtx_note_stores):
7079 (cselib_process_insn): Check for clobber high.
7080 * cselib.h (cselib_invalidate_rtx): Add operand.
7082 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7084 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7085 (mark_not_eliminable): Likewise.
7086 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7087 * lra-lives.c (process_bb_lives): Check for clobber high.
7088 * lra.c (new_insn_reg): Remember clobber highs.
7089 (collect_non_operand_hard_regs): Check for clobber high.
7090 (lra_set_insn_recog_data): Likewise.
7091 (add_regs_to_insn_regno_info): Likewise.
7092 (lra_update_insn_regno_info): Likewise.
7094 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7096 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7097 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7099 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7101 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7102 (copy_insn_1): Likewise.
7103 (gen_hard_reg_clobber_high): New gen function.
7104 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7105 * genemit.c (gen_exp): Likewise.
7106 (gen_emit_seq): Pass through info.
7107 (gen_insn): Check for CLOBBER_HIGH.
7108 (gen_expand): Pass through info.
7109 (gen_split): Likewise.
7110 (output_add_clobbers): Likewise.
7111 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7112 (remove_clobbers): Likewise.
7113 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7115 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7117 * doc/rtl.texi (clobber_high): Add.
7118 (parallel): Add in clobber high
7119 * rtl.c (rtl_check_failed_code3): Add function.
7120 * rtl.def (CLOBBER_HIGH): Add expression.
7121 * rtl.h (RTL_CHECKC3): Add macro.
7122 (rtl_check_failed_code3): Add declaration.
7123 (XC3EXP): Add macro.
7125 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7128 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7129 cfun->machine->max_used_stack_alignment if needed.
7131 2018-08-04 Martin Sebor <msebor@redhat.com>
7133 PR tree-optimization/86571
7134 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7137 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7140 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7143 2018-08-03 Jeff Law <law@redhat.com>
7146 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7147 Define to speculation_safe_value_not_needed.
7149 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7151 * doc/gcov.texi (-x): Remove duplicate "to".
7152 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7153 (-Wif-not-aligned): Remove duplicate "is".
7154 (-flto): Remove duplicate "the".
7155 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7156 duplicate "v5.00.b".
7157 (MSP430 Options): Remove duplicate "and" from the description
7158 of "-mgprel-sec=regexp".
7159 (x86 Options): Remove duplicate copies of "vmldLog102" and
7160 vmlsLog104 from description of "-mveclibabi=type".
7162 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7164 * internal-fn.h (first_commutative_argument): Declare.
7165 * internal-fn.c (first_commutative_argument): New function.
7166 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7167 restrictions for pattern statements. Use first_commutative_argument
7168 to look for commutative operands in calls to internal functions.
7170 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7172 * Makefile.in (wide-int-range.o): New.
7173 * tree-vrp.c: Move all the wide_int_* functions to...
7174 * wide-int-range.cc: ...here.
7175 * tree-vrp.h: Move all the wide_int_* prototypes to...
7176 * wide-int-range.h: ...here.
7178 2018-08-03 Tom de Vries <tdevries@suse.de>
7180 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7182 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7183 * except.c (output_function_exception_table): Do early exit if
7184 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7186 2018-08-03 Martin Liska <mliska@suse.cz>
7188 * predict.c (dump_prediction): Change to 2 digits
7191 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7193 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7195 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7197 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7199 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7200 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7201 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7202 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7203 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7205 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7207 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7208 pp_take_prefix when saving the existing prefix.
7209 * diagnostic.c (diagnostic_append_note): Likewise.
7210 * langhooks.c (lhd_print_error_function): Likewise.
7211 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7212 param's type. Free the existing prefix.
7213 (pp_take_prefix): New function.
7214 (pretty_printer::pretty_printer): Drop the prefix parameter.
7215 Rename the length parameter to match the comment.
7216 (pretty_printer::~pretty_printer): Free the prefix.
7217 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7219 (struct pretty_printer): Drop the "const" from "prefix" field's
7220 type and clarify memory management.
7221 (pp_set_prefix): Drop the "const" from the 2nd param.
7222 (pp_take_prefix): New decl.
7224 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7226 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7227 for word_mode_ok here instead of passing as argument.
7228 (expand_block_compare): Change select_block_compare_mode() call.
7229 (expand_strncmp_gpr_sequence): New function.
7230 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7232 2018-08-02 Jeff Law <law@redhat.com>
7235 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7236 Define to speculation_safe_value_not_needed.
7239 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7240 Define to speculation_safe_value_not_needed.
7242 2018-08-02 Tom de Vries <tdevries@suse.de>
7245 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7246 function. Return UI_TARGET unconditionally.
7247 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7248 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7250 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7252 * genemit.c (print_overload_test): Fix typo.
7254 2018-08-02 Richard Biener <rguenther@suse.de>
7256 PR tree-optimization/86816
7257 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7258 which checks for value availability before querying it.
7259 (gvn_uses_equal): Use it.
7260 (same_succ_hash): Likewise.
7261 (gimple_equal_p): Likewise.
7263 2018-08-02 Nick Clifton <nickc@redhat.com>
7266 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7267 Define to speculation_safe_value_not_needed.
7270 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7271 Define to speculation_safe_value_not_needed.
7274 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7275 Define to speculation_safe_value_not_needed.
7278 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7279 Define to speculation_safe_value_not_needed.
7282 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7283 Define to speculation_safe_value_not_needed.
7286 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7287 Define to speculation_safe_value_not_needed.
7290 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7291 Define to speculation_safe_value_not_needed.
7294 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7295 Define to speculation_safe_value_not_needed.
7298 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7299 speculation_safe_value_not_needed.
7302 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7303 to speculation_safe_value_not_needed.
7305 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7307 * doc/md.texi: Expand the documentation of instruction names
7308 to mention port-local uses. Document '@' in pattern names.
7309 * read-md.h (overloaded_instance, overloaded_name): New structs.
7311 (md_reader::handle_overloaded_name): New member function.
7312 (md_reader::get_overloads): Likewise.
7313 (md_reader::m_first_overload): New member variable.
7314 (md_reader::m_next_overload_ptr): Likewise.
7315 (md_reader::m_overloads_htab): Likewise.
7316 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7317 m_next_overload_ptr and m_overloads_htab.
7318 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7319 (get_mode_token, get_code_token, get_int_token): New functions.
7320 (map_attr_string): Add an optional argument that passes back
7321 the associated iterator.
7322 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7323 (md_reader::handle_overloaded_name, add_overload_instance): New
7325 (apply_iterators): Handle '@' names. Report an error if '@'
7326 is used without iterators.
7327 (initialize_iterators): Initialize the new iterator_group fields.
7328 * genopinit.c (handle_overloaded_code_for)
7329 (handle_overloaded_gen): New functions.
7330 (main): Use them to print declarations of maybe_code_for_* and
7331 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7332 * genemit.c (print_overload_arguments, print_overload_test)
7333 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7334 (main): Use it to print definitions of maybe_code_for_* and
7335 maybe_gen_* functions.
7336 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7337 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7338 instead of explicit mode checks.
7339 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7340 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7341 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7342 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7343 (aarch64_expand_compare_and_swap): Likewise
7344 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7345 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7346 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7347 (aarch64_constant_pool_reload_icode): Delete.
7348 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7349 instead of aarch64_constant_pool_reload_icode. Use
7350 code_for_aarch64_reload_mov instead of explicit mode checks.
7351 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7352 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7353 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7354 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7355 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7356 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7357 (aarch64_atomic_load_op_code): Delete.
7358 (aarch64_emit_atomic_load_op): Likewise.
7359 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7360 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7361 instead of aarch64_emit_atomic_load_op.
7362 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7363 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7364 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7365 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7366 character before the pattern name.
7367 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7368 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7369 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7370 (aarch64_frecps<mode>): Likewise.
7371 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7372 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7373 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7374 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7375 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7377 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7379 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7380 Allow HFmode constants if TARGET_FP_F16INST.
7382 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7385 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7386 No longer check last store for clobber of address register.
7388 2018-08-02 Martin Liska <mliska@suse.cz>
7390 PR gcov-profile/86817
7391 * gcov.c (process_all_functions): New function.
7393 (process_file): Move functions processing to
7394 process_all_functions.
7396 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7398 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7399 "const" to the "gimple *" and "rtx_insn *" parameters.
7400 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7402 (dump_location_t::dump_location_t): Likewise.
7404 2018-08-01 Martin Sebor <msebor@redhat.com>
7406 PR tree-optimization/86650
7407 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7408 rather than a "gcall *". Directly pass the data of interest
7409 to percent_K_format, rather than building a temporary CALL_EXPR
7411 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7412 (gimple_fold_builtin_strncat): Adjust.
7413 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7414 gcall* argument with gimple*.
7415 * gimple-ssa-warn-restrict.c (check_call): Same.
7416 (wrestrict_dom_walker::before_dom_children): Same.
7417 (builtin_access::builtin_access): Same.
7418 (check_bounds_or_overlap): Same
7419 (maybe_diag_overlap): Same.
7420 (maybe_diag_offset_bounds): Same.
7421 * tree-diagnostic.c (default_tree_printer): Move usage of
7422 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7424 * tree-pretty-print.c (percent_K_format): Add argument.
7425 * tree-pretty-print.h: Add argument.
7426 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7427 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7428 (maybe_diag_stxncpy_trunc): Same.
7429 (handle_builtin_stxncpy): Same.
7430 (handle_builtin_strcat): Same.
7432 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7434 * match.pd: Optimise pointer range checks.
7436 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7438 PR tree-optimization/86758
7439 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7440 to remove pattern statements.
7442 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7444 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7445 result of dfs_enumerate_from when constructing stmt_vec_infos,
7446 instead of additionally calling get_loop_body.
7448 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7450 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7452 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7453 When creating an iv, assert that the step is not known to be zero.
7454 (vect_setup_realignment): Update call accordingly.
7455 * tree-vect-stmts.c (vectorizable_store): Likewise.
7456 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7458 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7460 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7461 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7462 (vectorizable_reduction): Likewise.
7463 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7464 (vect_detect_hybrid_slp_stmts): Likewise.
7465 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7467 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7469 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7470 (wide_int_set_zero_nonzero_bits): ...this.
7471 (zero_nonzero_bits_from_vr): Rename to...
7472 (vrp_set_zero_nonzero_bits): ...this.
7473 (extract_range_from_multiplicative_op_1): Abstract wide int
7475 (wide_int_range_multiplicative_op): ...here.
7476 (extract_range_from_binary_expr_1): Extract wide int binary
7477 operations into their own functions.
7478 (wide_int_range_lshift): New.
7479 (wide_int_range_can_optimize_bit_op): New.
7480 (wide_int_range_shift_undefined_p): New.
7481 (wide_int_range_bit_xor): New.
7482 (wide_int_range_bit_ior): New.
7483 (wide_int_range_bit_and): New.
7484 (wide_int_range_trunc_mod): New.
7485 (extract_range_into_wide_ints): New.
7486 (vrp_shift_undefined_p): New.
7487 (extract_range_from_multiplicative_op): New.
7488 (vrp_can_optimize_bit_op): New.
7489 * tree-vrp.h (value_range::dump): New.
7490 (wide_int_range_multiplicative_op): New.
7491 (wide_int_range_lshift):New.
7492 (wide_int_range_shift_undefined_p): New.
7493 (wide_int_range_bit_xor): New.
7494 (wide_int_range_bit_ior): New.
7495 (wide_int_range_bit_and): New.
7496 (wide_int_range_trunc_mod): New.
7497 (zero_nonzero_bits_from_bounds): Rename to...
7498 (wide_int_set_zero_nonzero_bits): ...this.
7499 (zero_nonzero_bits_from_vr): Rename to...
7500 (vrp_set_zero_nonzero_bits): ...this.
7501 (range_easy_mask_min_max): Rename to...
7502 (wide_int_range_can_optimize_bit_op): this.
7503 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7504 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7506 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7508 * tree-vectorizer.h (vect_orig_stmt): New function.
7509 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7510 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7511 (vect_create_epilog_for_reduction): Likewise.
7512 (vectorizable_live_operation): Likewise.
7513 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7514 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7515 * tree-vect-stmts.c (vectorizable_call): Likewise.
7516 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7518 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7520 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7522 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7523 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7524 (vect_transform_loop): Likewise.
7525 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7527 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7529 * tree-vectorizer.h (vect_schedule_slp): Return void.
7530 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7531 (vect_schedule_slp): Likewise.
7533 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7535 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7537 (vect_transform_loop): Update calls accordingly. Schedule SLP
7538 instances before the main loop, if any exist.
7540 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7542 PR tree-optimization/86749
7543 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7544 If the lhs is used in a COND_EXPR, check that it is being used
7545 as the "then" or "else" value.
7547 2018-08-01 Tom de Vries <tdevries@suse.de>
7550 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7551 speculation_safe_value_not_needed.
7553 2018-08-01 Richard Biener <rguenther@suse.de>
7555 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7558 2018-08-01 Martin Liska <mliska@suse.cz>
7560 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7561 format how successful transformation is dumped.
7562 (gimple_mod_pow2_value_transform): Likewise.
7563 (gimple_mod_subtract_transform): Likewise.
7564 (gimple_stringops_transform): Likewise.
7566 2018-08-01 Martin Liska <mliska@suse.cz>
7569 * value-prof.c (interesting_stringop_to_profile_p):
7570 Simplify the code and add BUILT_IN_MEMMOVE.
7571 (gimple_stringops_transform): Likewise.
7573 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7575 * config/aarch64/aarch64-simd.md
7576 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7577 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7578 use GPI iterator instead of SI mode.
7580 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7582 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7583 rs6000_speculation_barrier.
7584 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7585 new barrier pattern name.
7587 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7589 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7590 (speculation_barrier): New insn.
7592 2018-08-01 Richard Biener <rguenther@suse.de>
7595 * graphite.h: Include isl/id.h and isl/space.h to allow build
7598 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7601 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7602 mode for COFF targets.
7603 * defaults.h (TARGET_COFF): Define.
7604 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7605 TARGET_COFF): Define.
7606 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7607 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7608 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7610 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7612 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7613 * gimple-streamer-out.c (output_bb): Save it.
7614 * lto-streamer-in.c (input_struct_function_base): Restore
7615 instance discriminator if available. Create map on demand.
7616 * lto-streamer-out.c (output_struct_function_base): Save it if
7618 * final.c (decl_to_instance_map): Document LTO strategy.
7620 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7621 Olivier Hainque <hainque@adacore.com>
7623 * debug.h (decl_to_instance_map_t): New type.
7624 (decl_to_instance_map): Declare.
7625 (maybe_create_decl_to_instance_map): New inline function.
7626 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7627 to track basic block discriminators.
7628 (final_start_function_1): Initialize them.
7629 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7631 (decl_to_instance_map): New variable.
7632 (map_decl_to_instance, maybe_set_discriminator): New functions.
7633 (notice_source_line): Set discriminator.
7635 2018-07-31 Ian Lance Taylor <iant@golang.org>
7637 * targhooks.c (default_have_speculation_safe_value): Add
7640 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7642 * dump-context.h: Include "pretty-print.h".
7643 (dump_context::refresh_dumps_are_enabled): New decl.
7644 (dump_context::emit_item): New decl.
7645 (class dump_context): Add fields "m_test_pp" and
7647 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7648 (temp_dump_context::get_dumped_text): New decl.
7649 (class temp_dump_context): Add field "m_pp".
7650 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7651 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7653 (set_dump_file): Update for above change.
7654 (set_alt_dump_file): Likewise.
7655 (dump_loc): New overload, taking a pretty_printer *.
7656 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7657 to any test pretty-printer.
7658 (make_item_for_dump_gimple_stmt): New function, adapted from
7659 optinfo::add_gimple_stmt.
7660 (dump_context::dump_gimple_stmt): Call it, and use the result,
7661 eliminating the direct usage of dump_file and alt_dump_file in
7662 favor of indirectly using them via emit_item.
7663 (make_item_for_dump_gimple_expr): New function, adapted from
7664 optinfo::add_gimple_expr.
7665 (dump_context::dump_gimple_expr): Call it, and use the result,
7666 eliminating the direct usage of dump_file and alt_dump_file in
7667 favor of indirectly using them via emit_item.
7668 (make_item_for_dump_generic_expr): New function, adapted from
7670 (dump_context::dump_generic_expr): Call it, and use the result,
7671 eliminating the direct usage of dump_file and alt_dump_file in
7672 favor of indirectly using them via emit_item.
7673 (make_item_for_dump_printf_va): New function, adapted from
7674 optinfo::add_printf_va.
7675 (make_item_for_dump_printf): New function.
7676 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7677 and use the result, eliminating the direct usage of dump_file and
7678 alt_dump_file in favor of indirectly using them via emit_item.
7679 (make_item_for_dump_dec): New function.
7680 (dump_context::dump_dec): Call it, and use the result,
7681 eliminating the direct usage of dump_file and alt_dump_file in
7682 favor of indirectly using them via emit_item.
7683 (make_item_for_dump_symtab_node): New function, adapted from
7684 optinfo::add_symtab_node.
7685 (dump_context::dump_symtab_node): Call it, and use the result,
7686 eliminating the direct usage of dump_file and alt_dump_file in
7687 favor of indirectly using them via emit_item.
7688 (dump_context::begin_scope): Reimplement, avoiding direct usage
7689 of dump_file and alt_dump_file in favor of indirectly using them
7691 (dump_context::emit_item): New member function.
7692 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7693 Set up test pretty-printer on the underlying context. Call
7694 refresh_dumps_are_enabled.
7695 (temp_dump_context::~temp_dump_context): Call
7696 refresh_dumps_are_enabled.
7697 (temp_dump_context::get_dumped_text): New member function.
7698 (selftest::verify_dumped_text): New function.
7699 (ASSERT_DUMPED_TEXT_EQ): New macro.
7700 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7701 and then without optinfo enabled. Add uses of
7702 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7703 * dumpfile.h: Update comment for the dump_* API.
7704 * optinfo-emit-json.cc
7705 (selftest::test_building_json_from_dump_calls): Update for new
7706 param for temp_dump_context ctor.
7707 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7708 and "m_owned" field.
7709 (optinfo_item::~optinfo_item): Likewise.
7710 (optinfo::add_item): New member function.
7711 (optinfo::emit): Update comment.
7712 (optinfo::add_string): Delete.
7713 (optinfo::add_printf): Delete.
7714 (optinfo::add_printf_va): Delete.
7715 (optinfo::add_gimple_stmt): Delete.
7716 (optinfo::add_gimple_expr): Delete.
7717 (optinfo::add_tree): Delete.
7718 (optinfo::add_symtab_node): Delete.
7719 (optinfo::add_dec): Delete.
7720 * optinfo.h (class dump_context): New forward decl.
7721 (optinfo::add_item): New decl.
7722 (optinfo::add_string): Delete.
7723 (optinfo::add_printf): Delete.
7724 (optinfo::add_printf_va): Delete.
7725 (optinfo::add_gimple_stmt): Delete.
7726 (optinfo::add_gimple_expr): Delete.
7727 (optinfo::add_tree): Delete.
7728 (optinfo::add_symtab_node): Delete.
7729 (optinfo::add_dec): Delete.
7730 (optinfo::add_poly_int): Delete.
7731 (optinfo_item::optinfo_item): Remove "owned" param.
7732 (class optinfo_item): Remove field "m_owned".
7734 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7737 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7738 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7739 requested variable alignment.
7740 (expand_one_ssa_partition): Likewise.
7741 (expand_one_var): Likewise.
7743 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7745 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7746 to speculation_safe_value_not_needed.
7748 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7750 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7751 * targhooks.c (speculation_safe_value_not_needed): New function.
7752 * target.def (have_speculation_safe_value): Update documentation.
7753 * doc/tm.texi: Regenerated.
7755 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7757 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7758 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7760 (despeculate_copy<ALLI:mode>_insn): New insn.
7761 (despeculate_copyti_insn): New insn.
7762 (despeculate_simple<ALLI:mode>): New insn
7763 (despeculate_simpleti): New insn.
7764 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7766 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7767 aarch64_speculation_safe_value.
7768 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7770 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7772 * config/aarch64/aarch64-speculation.cc: New file.
7773 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7774 before pass_reorder_blocks.
7775 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7777 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7778 X14 and X15 when tracking speculation.
7779 * config/aarch64/aarch64.md (register name constants): Add
7780 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7781 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7782 (speculation_barrier): New insn attribute.
7783 (cmp<mode>): Allow SP in comparisons.
7784 (speculation_tracker): New insn.
7785 (speculation_barrier): Add speculation_barrier attribute.
7786 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7787 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7788 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7790 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7792 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7793 aarch64_track_speculation is true.
7794 (tb<optab><mode>1): Likewise.
7795 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7796 generate CB[N]Z when tracking speculation.
7797 (aarch64_split_compare_and_swap): Likewise.
7798 (aarch64_split_atomic_op): Likewise.
7800 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7802 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7804 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7806 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7807 (speculation_barrier): New insn.
7809 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7811 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7812 * config/arm/arm.md (speculation_barrier): New expand.
7813 (speculation_barrier_insn): New pattern.
7815 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7817 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7818 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7819 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7820 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7822 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7823 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7824 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7825 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7826 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7827 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7828 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7829 * builtins.c (expand_speculation_safe_value): New function.
7830 (expand_builtin): Call it.
7831 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7832 * doc/extend.texi: Document __builtin_speculation_safe_value.
7833 * doc/md.texi: Document "speculation_barrier" pattern.
7834 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7835 TARGET_HAVE_SPECULATION_SAFE_VALUE.
7836 * doc/tm.texi: Regenerated.
7837 * target.def (have_speculation_safe_value, speculation_safe_value): New
7839 * targhooks.c (default_have_speculation_safe_value): New function.
7840 (default_speculation_safe_value): New function.
7841 * targhooks.h (default_have_speculation_safe_value): Add prototype.
7842 (default_speculation_safe_value): Add prototype.
7844 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7846 * dump-context.h (dump_context::dump_loc): New decl.
7847 * dumpfile.c (dump_context::dump_loc): New member function.
7848 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7849 and dump_gimple_stmt.
7850 (dump_context::dump_gimple_expr_loc): Likewise, using
7852 (dump_context::dump_generic_expr_loc): Likewise, using
7854 (dump_context::dump_printf_loc_va): Likewise, using
7856 (dump_context::begin_scope): Explicitly using the global function
7857 "dump_loc", rather than the member function.
7859 2018-07-31 Martin Sebor <msebor@redhat.com>
7861 PR tree-optimization/86741
7862 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7864 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
7866 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7867 depend on whether prefetch instructions will be emitted or not.
7868 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7869 will be emitted or not.
7870 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7871 (TARGET_SETMEM_PFD): New macros.
7873 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7875 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7876 (NULL_STMT_VEC_INFO): Delete.
7877 (stmt_vec_info::operator*): Likewise.
7878 (stmt_vec_info::operator gimple *): Likewise.
7879 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7880 of NULL_STMT_VEC_INFO.
7881 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7882 (vect_reassociating_reduction_p): Likewise.
7883 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7884 (vectorizable_store): Likewise.
7885 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7886 (vec_info::free_stmt_vec_infos): Likewise.
7888 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7890 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7891 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7893 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7895 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7896 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7897 (vec_info::free_stmt_vec_info): New private member functions.
7898 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7899 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7900 * tree-parloops.c (gather_scalar_reductions): Remove calls to
7901 set_stmt_vec_info_vec and free_stmt_vec_infos.
7902 * tree-vect-loop.c (_loop_vec_info): Remove call to
7903 set_stmt_vec_info_vec.
7904 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7905 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7906 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7907 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7908 (vec_info::free_stmt_vec_info): ...these new functions. Remove
7909 assignments in {vec_info::,}new_stmt_vec_info that are redundant
7910 with the clearing in the xcalloc.
7911 (stmt_vec_info_vec): Delete.
7912 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7913 (vectorize_loops): Likewise.
7914 (vec_info::~vec_info): Remove argument from call to
7915 free_stmt_vec_infos.
7916 (vec_info::add_stmt): Remove vinfo argument from call to
7919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7921 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7922 rather than a gimple stmt.
7923 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
7924 information for pattern statements when passed the original
7925 statement; instead wait to be passed the pattern statement itself.
7926 Don't call set_vinfo_for_stmt here.
7927 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7928 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7929 stmt_vec_infos here.
7930 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7931 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7932 stmt_vec_infos entry.
7934 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7936 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7937 * tree-vectorizer.c (vec_info::replace_stmt): New function.
7938 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7939 * tree-vect-stmts.c (vectorizable_call): Likewise.
7940 (vectorizable_simd_clone_call): Likewise.
7942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7944 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7945 * tree-vectorizer.c (vec_info::remove_stmt): New function.
7946 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7947 * tree-vect-loop.c (vect_transform_loop): Likewise.
7948 * tree-vect-slp.c (vect_schedule_slp): Likewise.
7949 * tree-vect-stmts.c (vect_remove_stores): Likewise.
7951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7953 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7954 (vect_dr_stmt): Delete.
7955 * tree-vectorizer.c (vec_info::lookup_dr): New function.
7956 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7958 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7959 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7960 (vect_verify_datarefs_alignment, vect_peeling_supportable)
7961 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7962 (vect_analyze_data_refs): Likewise.
7963 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
7965 (vect_find_same_alignment_drs): Likewise.
7966 (vect_slp_analyze_node_dependences): Update calls accordingly.
7967 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7968 instead of DR_VECT_AUX.
7969 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7970 of a vector data references. Use vec_info::lookup_dr instead of
7972 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7973 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7974 instead of DR_VECT_AUX.
7976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7978 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7980 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7982 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7983 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7984 (vect_gen_prolog_loop_niters): Likewise.
7986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7988 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7989 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7990 (vect_known_alignment_in_bytes, vect_dr_behavior)
7991 (vect_get_scalar_dr_size): Take references as dr_vec_infos
7992 instead of data_references. Update calls to other routines for
7993 which the same change has been made.
7994 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7995 dr_vec_infos instead of stmt_vec_infos.
7996 (vect_analyze_data_ref_dependence): Update call accordingly.
7997 (vect_slp_analyze_data_ref_dependence)
7998 (vect_record_base_alignments): Use DR_VECT_AUX.
7999 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8000 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8001 (vector_alignment_reachable_p, vect_get_data_access_cost)
8002 (vect_peeling_supportable, vect_analyze_group_access_1)
8003 (vect_analyze_group_access, vect_analyze_data_ref_access)
8004 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8005 (vect_compile_time_alias, vect_small_gap_p)
8006 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8007 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8008 instead of data_references. Update calls to other routines for
8009 which the same change has been made.
8010 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8011 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8012 (vect_slp_analyze_and_verify_node_alignment)
8013 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8014 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8015 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8017 (_vect_peel_info::dr): Replace with...
8018 (_vect_peel_info::dr_info): ...this new field.
8019 (vect_peeling_hash_get_most_frequent)
8020 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8021 (vect_peeling_hash_get_lowest_cost):
8022 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8023 routines for which the same change has been made.
8024 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8026 * tree-vect-loop-manip.c (get_misalign_in_elems)
8027 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8029 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8030 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8031 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8032 (get_group_load_store_type, get_negative_load_store_type)
8033 (vect_get_data_ptr_increment, vectorizable_store)
8034 (vectorizable_load): Likewise.
8035 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8036 Update calls to other routines for which the same change has been made.
8038 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8040 * tree-vectorizer.h (vec_info::move_dr): New member function.
8041 (dataref_aux): Rename to...
8042 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8043 (_stmt_vec_info::dr_aux): Update accordingly.
8044 (_stmt_vec_info::data_ref_info): Delete.
8045 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8046 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8047 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8048 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8050 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8051 (STMT_VINFO_DR_INFO): New macro.
8052 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8053 (set_dr_misalignment): Update after rename of dataref_aux.
8054 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8055 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8056 initialization of STMT_VINFO_DATA_REF.
8057 * tree-vectorizer.c (vec_info::move_dr): New function.
8058 * tree-vect-patterns.c (vect_recog_bool_pattern)
8059 (vect_recog_mask_conversion_pattern)
8060 (vect_recog_gather_scatter_pattern): Use it.
8061 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8062 the "dr" and "stmt" fields of dr_vec_info instead of
8063 STMT_VINFO_DATA_REF.
8065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8067 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8068 (is_pattern_stmt_p): Use it.
8069 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8070 on pattern statements.
8072 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8074 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8075 original stmt as a stmt_vec_info rather than a gimple stmt.
8076 (vect_pattern_recog_1): Take the statement directly as a
8077 stmt_vec_info, rather than via a gimple_stmt_iterator.
8078 Update call to vect_mark_pattern_stmts.
8079 (vect_pattern_recog): Update calls accordingly.
8081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8083 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8084 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8085 a vect_def_type for the first argument.
8086 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8087 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8088 operand if it isn't defined by a vectorized statement.
8089 (vect_build_gather_load_calls): Remove the mask_dt argument and
8090 update calls to vect_get_vec_def_for_stmt_copy.
8091 (vectorizable_bswap): Likewise the dt argument.
8092 (vectorizable_call): Update calls to vectorizable_bswap and
8093 vect_get_vec_def_for_stmt_copy.
8094 (vectorizable_simd_clone_call, vectorizable_assignment)
8095 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8096 (vectorizable_comparison): Update calls to
8097 vect_get_vec_def_for_stmt_copy.
8098 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8100 (vect_get_loop_based_defs): Remove dt argument and update call
8101 to vect_get_vec_def_for_stmt_copy.
8102 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8103 and vect_get_vec_def_for_stmt_copy.
8104 (vectorizable_load): Update calls to vect_build_gather_load_calls
8105 and vect_get_vec_def_for_stmt_copy.
8106 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8107 (vectorizable_reduction, vectorizable_live_operation): Update calls
8108 to vect_get_vec_def_for_stmt_copy.
8110 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8112 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8113 and gimple stmt arguments with a stmt_vec_info.
8114 (vect_record_base_alignments): Update calls accordingly.
8115 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8116 and gimple stmt arguments with a stmt_vec_info.
8117 (vect_build_slp_tree_1): Remove vinfo argument and update call
8118 to vect_record_max_nunits.
8119 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8120 and vect_record_max_nunits.
8122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8124 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8125 file and take a stmt_vec_info instead of a gimple stmt.
8126 (supportable_widening_operation, vect_finish_replace_stmt)
8127 (vect_finish_stmt_generation, vect_get_store_rhs)
8128 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8129 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8130 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8131 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8132 (vect_create_data_ref_ptr, bump_vector_ptr)
8133 (vect_permute_store_chain, vect_setup_realignment)
8134 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8135 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8136 (vectorizable_reduction, vectorizable_induction)
8137 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8138 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8139 than gimple stmts as arguments.
8140 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8141 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8142 (can_group_stmts_p, vect_check_gather_scatter)
8143 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8144 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8145 (vect_permute_load_chain, vect_shift_permute_load_chain)
8146 (vect_transform_grouped_load)
8147 (vect_record_grouped_load_vectors): Likewise.
8148 * tree-vect-loop.c (vect_fixup_reduc_chain)
8149 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8150 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8151 (vectorizable_reduction, vectorizable_induction)
8152 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8153 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8154 (vect_get_load_store_mask): Likewise.
8155 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8156 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8157 * tree-vect-stmts.c (vect_mark_relevant)
8158 (is_simple_and_all_uses_invariant)
8159 (exist_non_indexing_operands_for_use_p, process_use)
8160 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8161 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8162 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8163 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8164 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8165 (get_negative_load_store_type, get_load_store_type)
8166 (vect_check_load_store_mask, vect_check_store_rhs)
8167 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8168 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8169 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8170 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8171 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8172 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8173 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8174 (supportable_widening_operation): Likewise.
8176 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8178 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8179 a stmt_vec_info instead of a gcall.
8180 (vect_check_gather_scatter): Update call accordingly.
8181 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8183 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8184 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8185 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8186 instead of a gimple stmt.
8187 (vect_transform_loop): Update calls accordingly.
8188 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8189 stmt_vec_infos instead of gimple stmts.
8190 (vect_analyze_slp_instance): Update use accordingly.
8191 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8192 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8193 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8194 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8195 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8196 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8197 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8198 down to subroutines.
8200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8202 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8203 of the worklist from a vector of gimple stmts to a vector of
8205 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8206 (vect_mark_stmts_to_be_vectorized): Likewise
8208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8210 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8211 statement before passing it to vect_analyze_stmt.
8212 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8213 the chain of phi vector definitions. Track the exit phi via its
8215 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8216 STMT_VINFO_REDUC_DEF.
8217 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8218 stmt_vec_infos to handle the statement chains.
8219 (vect_get_slp_defs): Record the first statement in the node
8220 using a stmt_vec_info.
8221 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8222 statements here and pass their stmt_vec_info down to subroutines.
8223 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8224 down to vect_finish_stmt_generation.
8225 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8226 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8227 stmt_vec_infos to subroutines.
8228 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8231 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8233 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8234 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8235 (vect_permute_store_chain, vect_setup_realignment)
8236 (vect_permute_load_chain, vect_shift_permute_load_chain)
8237 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8238 stmts internally, and when passing values to other vectorizer routines.
8239 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8240 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8241 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8242 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8243 (vectorizable_reduction, vectorizable_induction)
8244 (vectorizable_live_operation, vect_transform_loop_stmt)
8245 (vect_transform_loop): Likewise.
8246 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8247 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8248 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8249 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8250 (vect_slp_analyze_node_operations_1): Likewise.
8251 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8252 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8253 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8254 (vect_finish_stmt_generation_1, get_group_load_store_type)
8255 (get_load_store_type, vect_build_gather_load_calls)
8256 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8257 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8258 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8259 (vectorizable_store, vectorizable_load, vectorizable_condition)
8260 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8261 (supportable_widening_operation): Likewise.
8262 (vect_get_vector_types_for_stmt): Likewise.
8263 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8265 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8267 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8268 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8269 (vect_permute_store_chain, vect_permute_load_chain)
8270 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8271 repeated stmt_vec_info lookups.
8272 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8273 (vect_update_ivs_after_vectorizer): Likewise.
8274 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8275 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8276 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8277 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8278 (vect_bb_slp_scalar_cost): Likewise.
8279 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8281 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8283 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8284 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8285 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8286 to get gassigns and gcalls, rather than operating on generc gimple
8288 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8289 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8290 (vectorizable_load, vect_analyze_stmt): Likewise.
8291 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8295 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8296 return stmt_vec_infos rather than gimple stmts. Do not accept
8298 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8300 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8301 Update use of get_later_stmt.
8302 (vect_get_constant_vectors): Update call accordingly.
8303 (vect_schedule_slp_instance): Likewise
8304 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8305 (vect_slp_analyze_instance_dependence): Likewise.
8306 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8310 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8311 (stmt_info_for_cost::stmt_info): ...this new field.
8312 (add_stmt_costs): Update accordingly.
8313 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8314 (vect_get_known_peeling_cost): Likewise.
8315 (vect_estimate_min_profitable_iters): Likewise.
8316 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8318 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8320 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8321 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8322 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8324 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8328 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8329 a gimple stmt to a stmt_vec_info.
8330 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8332 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8334 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8335 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8336 (_loop_vec_info::reduction_chains): Likewise.
8337 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8339 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8343 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8344 a gimple stmt to a stmt_vec_info.
8345 (_stmt_vec_info::next_element): Likewise.
8346 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8347 (vect_slp_analyze_and_verify_node_alignment)
8348 (vect_analyze_group_access_1, vect_analyze_group_access)
8349 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8350 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8351 (vect_supportable_dr_alignment): Update accordingly.
8352 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8353 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8354 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8355 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8356 * tree-vect-slp.c (vect_build_slp_tree_1)
8357 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8358 (vect_split_slp_store_group, vect_analyze_slp_instance)
8359 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8360 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8361 (get_group_load_store_type, get_load_store_type)
8362 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8363 (vect_transform_stmt, vect_remove_stores): Likewise.
8365 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8367 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8369 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8370 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8371 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8372 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8373 (vector_alignment_reachable_p, vect_get_data_access_cost)
8374 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8375 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8376 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8377 (vect_analyze_group_access_1, vect_analyze_group_access)
8378 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8379 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8380 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8381 result of vect_dr_stmt and use the stmt_vec_info instead of
8382 the associated gimple stmt.
8383 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8384 (vect_gen_prolog_loop_niters): Likewise.
8385 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8389 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8390 to a vec<stmt_vec_info>.
8391 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8392 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8394 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8395 to a vec<stmt_vec_info>.
8396 (bst_traits::value_type, bst_traits::value_type): Likewise.
8397 (bst_traits::hash): Update accordingly.
8398 (vect_get_and_check_slp_defs): Change the stmts parameter from
8399 a vec<gimple *> to a vec<stmt_vec_info>.
8400 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8401 (vect_build_slp_tree): Likewise.
8402 (vect_build_slp_tree_2): Likewise. Update uses of
8403 SLP_TREE_SCALAR_STMTS.
8404 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8405 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8406 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8407 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8408 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8409 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8410 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8411 (vect_get_constant_vectors, vect_get_slp_defs)
8412 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8413 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8414 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8415 instead of gimple stmts.
8416 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8417 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8418 (vect_slp_analyze_instance_dependence): Update uses of
8419 SLP_TREE_SCALAR_STMTS.
8420 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8421 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8422 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8423 (get_initial_defs_for_reduction): Likewise.
8424 (vect_create_epilog_for_reduction): Likewise.
8425 (vectorize_fold_left_reduction): Likewise.
8426 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8427 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8428 (can_vectorize_live_stmts): Likewise.
8430 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8432 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8433 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8434 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8436 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8438 (gather_scalar_reductions): Update after above interface changes.
8439 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8440 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8442 (vect_force_simple_reduction): Likewise.
8443 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8444 LOOP_VINFO_REDUCTIONS.
8445 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8449 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8450 a gimple stmt to a stmt_vec_info.
8451 * tree-vect-loop.c (vect_active_double_reduction_p)
8452 (vect_force_simple_reduction, vectorizable_reduction): Update
8455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8457 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8458 vec<gimple *> to a vec<stmt_vec_info>.
8459 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8460 the reduction_phis argument from a vec<gimple *> to a
8462 (vectorizable_reduction): Likewise the phis local variable that
8463 is passed to vect_create_epilog_for_reduction. Update for new type
8464 of SLP_TREE_VEC_STMTS.
8465 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8466 (vectorizable_live_operation): Likewise.
8467 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8468 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8470 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8472 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8473 a gimple stmt to a stmt_vec_info.
8474 (vectorizable_condition, vectorizable_live_operation)
8475 (vectorizable_reduction, vectorizable_induction): Pass back the
8476 vectorized statement as a stmt_vec_info.
8477 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8478 use of STMT_VINFO_VEC_STMT.
8479 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8480 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8481 as stmt_vec_infos rather than gimple stmts.
8482 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8484 (vectorizable_live_operation): Likewise.
8485 (vectorizable_reduction, vectorizable_induction): Likewise,
8486 updating use of STMT_VINFO_VEC_STMT.
8487 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8488 of STMT_VINFO_VEC_STMT.
8489 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8490 (vectorizable_simd_clone_call, vectorizable_conversion)
8491 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8492 (vectorizable_store, vectorizable_load, vectorizable_condition)
8493 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8494 from a gimple stmt to a stmt_vec_info.
8495 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8496 pointer to a stmt_vec_info to the vectorizable_* routines.
8498 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8500 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8501 a gimple stmt to a stmt_vec_info.
8502 (is_pattern_stmt_p): Update accordingly.
8503 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8504 (vect_record_grouped_load_vectors): Likewise.
8505 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8506 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8507 (vect_model_reduction_cost): Likewise.
8508 (vect_create_epilog_for_reduction): Likewise.
8509 (vectorizable_reduction, vectorizable_induction): Likewise.
8510 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8511 Return the stmt_vec_info for the pattern statement.
8512 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8513 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8514 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8515 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8516 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8517 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8518 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8519 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8521 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8523 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8524 (vect_finish_stmt_generation): Likewise.
8525 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8526 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8527 (vect_build_gather_load_calls): Use the return value of the above
8528 functions instead of a separate call to vinfo_for_stmt. Use narrow
8529 scopes for the input gimple stmt and wider scopes for the associated
8530 stmt_vec_info. Use vec_info::lookup_def when setting these
8531 stmt_vec_infos from an SSA_NAME definition.
8532 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8533 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8534 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8535 (vectorizable_store, vectorizable_load, vectorizable_condition)
8536 (vectorizable_comparison): Likewise.
8537 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8538 (vectorizable_reduction): Likewise.
8540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8542 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8543 stmt_vec_info * parameter before the optional gimple **.
8544 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8545 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8546 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8547 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8548 (vectorizable_live_operation): Likewise.
8549 * tree-vect-patterns.c (type_conversion_p): Likewise.
8550 (vect_look_through_possible_promotion): Likewise.
8551 (vect_recog_rotate_pattern): Likewise.
8552 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8556 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8557 a typedef to a wrapper class.
8558 (NULL_STMT_VEC_INFO): New macro.
8559 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8560 (stmt_vec_info::operator*): New function.
8561 (stmt_vec_info::operator gimple *): Likewise.
8562 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8563 (add_stmt_costs): Likewise.
8564 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8565 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8566 (vect_get_known_peeling_cost): Likewise.
8567 (vect_estimate_min_profitable_iters): Likewise.
8568 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8569 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8570 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8571 (vectorizable_store, free_stmt_vec_infos): Likewise.
8572 (new_stmt_vec_info): Change return type of xcalloc to
8575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8577 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8578 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8579 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8580 a single_imm_use-based sequence.
8581 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8585 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8586 * tree-vectorizer.c (vec_info::lookup_def): New function.
8587 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8588 (vect_widened_op_tree): Likewise.
8589 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8590 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8591 (vectorizable_reduction): Likewise.
8592 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8594 (vect_is_slp_reduction): Update calls accordingly. Use
8595 vec_info::lookup_def.
8596 (vect_is_simple_reduction): Likewise
8597 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8599 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8601 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8602 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8603 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8605 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8606 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8607 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8608 (vect_is_slp_reduction, vectorizable_induction)
8609 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8610 * tree-vect-patterns.c (vect_init_pattern_stmt):
8611 (vect_determine_min_output_precision_1, vect_determine_precisions)
8612 (vect_pattern_recog): Likewise.
8613 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8614 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8615 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8616 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8617 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8618 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8619 info field from a loop to a loop_vec_info.
8621 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8623 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8624 (vec_info::add_stmt): Declare.
8625 * tree-vectorizer.c (vec_info::add_stmt): New function.
8626 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8627 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8628 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8629 (vectorizable_induction): Likewise.
8630 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8631 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8632 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8633 (vectorizable_load): Likewise.
8634 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8635 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8636 (vect_recog_gather_scatter_pattern): Likewise.
8637 (append_pattern_def_seq): Likewise. Remove a check that is
8638 performed by add_stmt itself.
8640 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8642 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8643 which make_ssa_name was called with new_stmt before new_stmt
8646 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8648 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8650 (vect_is_slp_reduction): ...here...
8651 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8652 that are already known to be false.
8654 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8656 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8657 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8658 STMT_VINFO_NUM_SLP_USES when it's true.
8659 (vect_free_slp_instance): Add a final_p parameter and pass it to
8661 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8662 (vect_analyze_slp_instance): Likewise.
8663 (vect_slp_analyze_operations): Likewise.
8664 (vect_slp_analyze_bb_1): Likewise.
8665 * tree-vectorizer.c (vec_info): Likewise.
8666 * tree-vect-loop.c (vect_transform_loop): Likewise.
8668 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8670 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8671 function is not called for second and subsequent members of
8674 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8676 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8677 cases for nested loops from here to ...
8678 (vect_create_epilog_for_reduction): ...here. Only call
8679 vect_is_simple_use for inner-loop reductions.
8681 2018-07-31 Martin Liska <mliska@suse.cz>
8683 PR gcov-profile/85338
8684 PR gcov-profile/85350
8685 PR gcov-profile/85372
8686 * profile.c (struct location_triplet): New.
8687 (struct location_triplet_hash): Likewise.
8688 (output_location): Do not output a BB that
8689 is already recorded for a line.
8690 (branch_prob): Use streamed_locations.
8692 2018-07-31 Martin Liska <mliska@suse.cz>
8694 PR gcov-profile/85370
8695 * coverage.c (coverage_begin_function): Do not mark target
8696 clones as artificial functions.
8698 2018-07-31 Martin Liska <mliska@suse.cz>
8700 PR gcov-profile/83813
8701 PR gcov-profile/84758
8702 PR gcov-profile/85217
8703 PR gcov-profile/85332
8704 * profile.c (branch_prob): Do not record GOTO expressions
8705 for GIMPLE statements which locations are already streamed.
8707 2018-07-31 Olivier Hainque <hainque@adacore.com>
8709 * gcc.c (handle_spec_function): Accept a soft_matched_part
8710 argument, as do_spec_1. Pass it down to ...
8711 (eval_spec_function): Accept a soft_matched_part argument,
8712 and pass it down to ...
8713 (do_spec_2): Accept a soft_matched_part argument, and pass
8714 it down to do_spec_1.
8715 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8716 (handle_braces): Update call to handle_spec_function.
8717 (driver::set_up_specs): Update calls to do_spec_2.
8718 (compare_debug_dump_opt_spec_function): Likewise.
8719 (compare_debug_self_opt_spec_function): Likewise.
8721 2018-07-31 Olivier Hainque <hainque@adacore.com>
8723 * common.opt (nolibc): New option.
8724 * doc/invoke.texi (Link Options): Document it.
8725 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8726 * config/alpha/linux.h: Likewise.
8727 * config/arc/elf.h: Likewise.
8728 * config/arm/uclinux-elf.h: Likewise.
8729 * config/arm/unknown-elf.h: Likewise.
8730 * config/avr/avrlibc.h: Likewise.
8731 * config/bfin/bfin.h: Likewise.
8732 * config/bfin/linux.h: Likewise.
8733 * config/bfin/uclinux.h: Likewise.
8734 * config/darwin.h: Likewise.
8735 * config/darwin10.h: Likewise.
8736 * config/darwin12.h: Likewise.
8737 * config/gnu-user.h: Likewise.
8738 * config/lm32/uclinux-elf.h: Likewise.
8739 * config/pa/pa-hpux11.h: Likewise.
8740 * config/pa/pa64-hpux.h: Likewise.
8741 * config/sparc/sparc.h: Likewise.
8743 2018-07-31 Olivier Hainque <hainque@adacore.com>
8745 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8746 undefined variables.
8748 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8751 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8754 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8756 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8757 terminated string literal.
8759 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8761 PR rtl-optimization/85160
8762 * combine.c (is_just_move): New function.
8763 (try_combine): Allow combining two instructions into two if neither of
8764 the original instructions was a move.
8766 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8769 * doc/extend.texi (Global Register Variables): Discourage use of type
8771 (Local Register Variables): Likewise.
8773 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8775 PR tree-optimization/86506
8776 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8778 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8781 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8782 hard_regno, make sure no insn between `from` and `to` clobbers it.
8784 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8785 Tom de Vries <tdevries@suse.de>
8787 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8788 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8789 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8790 PTX_DEFAULT_RUNTIME_DIM.
8791 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8793 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8795 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8796 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8797 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8799 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
8801 * config/rs6000/constraints.md (wG constraint): Delete, no longer
8803 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8804 predicate to reflect toc fusion has been deleted.
8805 (toc_fusion_mem_raw): Delete, no longer used.
8806 (toc_fusion_mem_wrapped): Likewise.
8807 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8809 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8810 Delete, no longer used.
8811 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8812 meant to be used for toc fusion.
8813 (rs6000_debug_print_mode): Delete toc fusion debugging.
8814 (rs6000_debug_reg_global): Likewise.
8815 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8816 fusion and secondary reload support that were never used.
8817 (rs6000_option_override_internal): Delete TOC fusion, that was only
8818 partially defined, and it did not work unless you also used the
8820 (rs6000_legitimate_address_p): Delete TOC fusion support.
8821 (rs6000_opt_masks): Likewise.
8822 (fusion_wrap_memory_address): Delete function, no longer used.
8823 (fusion_split_address); Delete TOC fusion support.
8824 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8825 longer used with toc fusion being deleted.
8826 (TARGET_TOC_FUSION_FP): Likewise.
8827 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8829 (toc fusion spliter): Delete TOC fusion support.
8830 (toc_fusionload_<mode>): Likewise.
8831 (toc_fusionload_di): Likewise.
8832 (fusion_gpr_load_<mode>): Delete generator function, this insn no
8833 longer needs to be named. Rename predicate to delete TOC fusion.
8834 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8835 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8836 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8837 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8838 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8840 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
8842 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8843 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
8844 __int128 in built-in function prototypes.
8845 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8846 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8848 2018-07-27 Martin Sebor <msebor@redhat.com>
8850 PR tree-optimization/86696
8851 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8852 types, including enums.
8853 (handle_char_store): Be prepared for the above function to fail.
8855 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
8857 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8858 when optimization level is lower than 2 or optimize for size.
8860 2018-07-26 Martin Sebor <msebor@redhat.com>
8862 PR tree-optimization/86043
8863 PR tree-optimization/86042
8864 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8865 (get_string_cst_length): Rename...
8866 (get_min_string_length): ...to this. Add argument.
8867 (handle_char_store): Extend to handle multi-character stores by
8869 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
8870 * tree.h (initializer_zerop): Add argument.
8872 2018-07-26 Jakub Jelinek <jakub@redhat.com>
8875 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8876 declare target to variables if they have always,{to,from,tofrom} map
8879 2018-07-26 Martin Liska <mliska@suse.cz>
8882 * lto-wrapper.c: Add linker_output as prefix
8883 for ltrans_output_file.
8885 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
8887 PR rtl-optimization/85805
8888 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8889 value for hard registers if that was written in the same mode.
8891 2018-07-26 Martin Liska <mliska@suse.cz>
8893 PR gcov-profile/86536
8894 * gcov.c (format_gcov): Use printf format %.*f directly
8895 and do not handle special values.
8897 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8899 * common/config/arc/arc-common.c (arc_option_optimization_table):
8900 Update default optimizations for size.
8902 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8904 * config/arc/arc.md (movsf_insn): Add short instruction selection.
8905 * config/arc/constraints.md (CfZ): New constraint.
8906 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8907 (subsf3_fpu): Likewise.
8908 (cmpsf_fpu): Likewise.
8909 (cmpsf_fpu_uneq): Likewise.
8911 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8913 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8915 (arc_is_uncached_mem_p): uncached applies to both the variable and
8918 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8920 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8923 2018-07-25 David Malcolm <dmalcolm@redhat.com>
8925 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8926 field "m_scopes" from vec to auto_vec.
8928 2018-07-25 Martin Liska <mliska@suse.cz>
8930 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8933 2018-07-25 Richard Biener <rguenther@suse.de>
8936 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8937 special wrt context_die late.
8938 (gen_subprogram_die): Re-use DIEs in local scope.
8940 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
8942 PR tree-optimization/86644
8943 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
8945 2018-07-25 Martin Liska <mliska@suse.cz>
8948 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8949 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8951 2018-07-25 Martin Liska <mliska@suse.cz>
8954 * params.def: Explain ASan abbreviation and provide
8955 a documentation link.
8957 2018-07-24 Martin Sebor <msebor@redhat.com>
8959 PR tree-optimization/86622
8960 PR tree-optimization/86532
8961 * builtins.h (string_length): Declare.
8962 * builtins.c (c_strlen): Correct handling of non-constant offsets.
8963 (check_access): Be prepared for non-constant length ranges.
8964 (string_length): Make extern.
8965 * expr.c (string_constant): Only handle the minor non-constant
8966 array index. Use string_constant to compute the length of
8967 a generic string constant.
8969 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
8971 PR tree-optimization/86618
8972 * tree-vect-stmts.c (vectorizable_call): Don't take the address
8973 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8975 2018-07-24 David Malcolm <dmalcolm@redhat.com>
8977 PR tree-optimization/86636
8978 * json.cc (json::object::set): Fix comment. Add assertions.
8979 (json::array::append): Move here from json.h. Add comment and an
8981 (json::string::string): Likewise.
8982 * json.h (json::array::append): Move to json.cc.
8983 (json::string::string): Likewise.
8984 * optinfo-emit-json.cc
8985 (optrecord_json_writer::impl_location_to_json): Assert that we
8986 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8987 wrapper around it. Expand the location once, rather than three
8989 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8990 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8992 (optrecord_json_writer::optinfo_to_json): Likewise, in four
8993 places. Fix some overlong lines.
8995 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
8997 * config/aarch64/aarch64-simd.md
8998 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8999 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9000 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9001 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9002 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9003 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9004 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9005 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9006 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9008 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9011 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9012 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9013 and abs_d == d, do the power of two handling if profitable.
9015 2018-07-24 Richard Biener <rguenther@suse.de>
9017 * match.pd: Add BIT_FIELD_REF canonicalizations.
9019 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9022 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9024 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9026 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9027 terminated STRING_CST object.
9029 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9031 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9033 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9035 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9036 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9037 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9038 the elements into a register.
9039 (rs6000_split_v4si_init_di_reg): Delete.
9040 (rs6000_split_v4si_init): Delete.
9041 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9042 (vsx_init_v4si): Rewrite as a define_expand.
9044 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9046 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9047 zero_extend argument from memory): New.
9049 2018-07-22 Martin Sebor <msebor@redhat.com>
9052 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9053 diagnosing calls with unknown arguments unless -Walloca-larger-than
9054 is restricted to less than PTRDIFF_MAX bytes.
9056 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9058 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9060 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9062 * pretty-print.c (text_info::set_location): Remove redundant
9063 "line_table" parameter from call to rich_location::set_range.
9065 2018-07-20 Martin Sebor <msebor@redhat.com>
9068 * builtins.c (expand_builtin_alloca): Adjust.
9069 * calls.c (alloc_max_size): Simplify.
9070 * cgraphunit.c (cgraph_node::expand): Adjust.
9071 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9073 (frame_larger_than_size): Same.
9074 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9075 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9077 * doc/invoke.texi (GCC Command Options): Document option arguments.
9078 Explain byte-size arguments and suffixes.
9079 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9080 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9081 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9082 * doc/options.texi (UInteger): Expand.
9083 (Host_Wide_Int, ByteSize): Document new properties.
9084 * final.c (final_start_function_1): Include sizes in an error message.
9085 * function.c (frame_offset_overflow): Same.
9086 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9087 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9088 Diagnose unbounded alloca calls only for limits of less than
9090 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9091 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9093 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9094 only for limits of less than PTRDIFF_MAX.
9095 * langhooks-def.h (lhd_handle_option): Change function argument
9097 * langhooks.c (lhd_handle_option): Same.
9098 * langhooks.h (handle_option): Same.
9099 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9101 (var_type, var_type_struct): Same.
9102 (var_set): Handle ByteSize flag.
9103 * optc-gen.awk: Add comments to output to ease debugging. Make
9104 use of HOST_WIDE_INT where appropriate.
9105 * opts-gen-save.awk: Use %lx to format unsigned long.
9106 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9107 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9108 arguments. Parse bytes-size suffixes.
9109 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9110 (enum_value_to_arg): Same.
9111 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9112 (handle_option): Adjust.
9113 (generate_option): Change function argument to HOST_WIDE_INT.
9114 (cmdline_handle_error): Adjust.
9115 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9116 (set_option): Change function argument to HOST_WIDE_INT.
9117 (option_enabled): Handle cl_host_wide_int.
9118 (get_option_state): Handle CLVC_SIZE.
9119 (control_warning_option): Same.
9120 * opts.c (common_handle_option): Change function argument to
9121 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9122 OPT_Wvla_larger_than_.
9123 * opts.h (enum cl_var_type): Add an enumerator.
9124 * stor-layout.c (layout_decl): Print a more meaningful warning.
9125 * toplev.c (output_stack_usage): Adjust.
9127 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9129 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9130 call to inline_expand_builtin_string_cmp.
9131 (expand_builtin_strcmp): Likewise.
9132 (expand_builtin_strncmp): Likewise.
9133 (inline_string_cmp): Delete the last parameter, change char_type_node
9134 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9136 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9137 the inlining expansion on target where the type of the call has same or
9138 narrower precision than unsigned char.
9140 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9142 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9143 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9144 * common.opt (fsave-optimization-record): New option.
9145 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9146 * doc/invoke.texi (-fsave-optimization-record): New option.
9147 * dumpfile.c: Include "optinfo-emit-json.h".
9148 (struct kv_pair): Move to coretypes.h.
9149 (optgroup_options): Make non-static.
9150 (dump_context::end_scope): Call
9151 optimization_records_maybe_pop_dump_scope.
9152 * dumpfile.h (optgroup_options): New decl.
9153 * json.cc: New file.
9155 * optinfo-emit-json.cc: New file.
9156 * optinfo-emit-json.h: New file.
9157 * optinfo.cc: Include "optinfo-emit-json.h".
9158 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9159 (optinfo_enabled_p): Check optimization_records_enabled_p.
9160 (optinfo_wants_inlining_info_p): Likewise.
9161 * optinfo.h: Update comment.
9162 * profile-count.c (profile_quality_as_string): New function.
9163 * profile-count.h (profile_quality_as_string): New decl.
9164 (profile_count::quality): New accessor.
9165 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9166 and optinfo_emit_json_cc_tests.
9167 * selftest.h (selftest::json_cc_tests): New decl.
9168 (selftest::optinfo_emit_json_cc_tests): New decl.
9169 * toplev.c: Include "optinfo-emit-json.h".
9170 (compile_file): Call optimization_records_finish.
9171 (do_compile): Call optimization_records_start.
9172 * tree-ssa-live.c: Include optinfo.h.
9173 (remove_unused_scope_block_p): Retain inlining information if
9174 optinfo_wants_inlining_info_p returns true.
9176 2018-07-20 Richard Biener <rguenther@suse.de>
9179 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9180 to cover -flto-partition=none.
9182 2018-07-20 Martin Liska <mliska@suse.cz>
9184 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9185 (get_decl_source_range): Remove unused function.
9187 2018-07-20 Richard Biener <rguenther@suse.de>
9189 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9190 (struct vn_phi_s): Likewise.
9191 (struct vn_reference_s): Likewise.
9192 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9193 for searching the slot of an entry known to be in the hash itself.
9194 (vn_phi_hasher::equal): Likewise.
9195 (vn_reference_hasher::equal): Likewise.
9196 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9198 (optimistic_info, current_info): Remove, keeping only valid_info.
9199 (vn_reference_lookup_1): Remove fallback lookup.
9200 (vn_reference_lookup_2): Likewise.
9201 (vn_nary_op_lookup_1): Likewise.
9202 (vn_phi_lookup): Likewise.
9203 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9205 (vn_reference_insert): Adjust, chain the inserted hash element
9206 at last_inserted_ref.
9207 (vn_reference_insert_pieces): Likewise.
9208 (visit_reference_op_call): Likewise.
9209 (vn_nary_op_insert_into): Chain the inserted hash element at
9211 (vn_nary_op_insert_pieces): Adjust.
9212 (vn_nary_op_insert): Likewise.
9213 (vn_nary_op_insert_stmt): Likewise.
9214 (vn_phi_insert): Adjust, chain the inserted hash element at
9216 (process_scc): Remove clearing and copying the optimistic
9217 table. Instead remove elements inserted during an optimistic
9218 iteration from the single table we maintain.
9219 (init_scc_vn): Adjust.
9220 (free_scc_vn): Likewise.
9221 (sccvn_dom_walker::record_cond): Likewise.
9222 (sccvn_dom_walker::after_dom_children): Likewise.
9224 2018-07-19 Martin Sebor <msebor@redhat.com>
9226 PR tree-optimization/84047
9227 PR tree-optimization/83776
9228 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9229 (check_array_bounds): Call it.
9231 2018-07-19 Martin Sebor <msebor@redhat.com>
9233 * align.h (align_flags): Use member initialization.
9235 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9237 * Makefile.in (OBJS): Add optinfo.o.
9238 * coretypes.h (class symtab_node): New forward decl.
9239 (struct cgraph_node): New forward decl.
9240 (class varpool_node): New forward decl.
9241 * dump-context.h: New file.
9242 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9244 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9245 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9246 (set_alt_dump_file): Likewise.
9247 (dump_context::~dump_context): New dtor.
9248 (dump_gimple_stmt): Move implementation to...
9249 (dump_context::dump_gimple_stmt): ...this new member function.
9250 Add the stmt to any pending optinfo, creating one if need be.
9251 (dump_gimple_stmt_loc): Move implementation to...
9252 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9253 Start a new optinfo and add the stmt to it.
9254 (dump_gimple_expr): Move implementation to...
9255 (dump_context::dump_gimple_expr): ...this new member function.
9256 Add the stmt to any pending optinfo, creating one if need be.
9257 (dump_gimple_expr_loc): Move implementation to...
9258 (dump_context::dump_gimple_expr_loc): ...this new member function.
9259 Start a new optinfo and add the stmt to it.
9260 (dump_generic_expr): Move implementation to...
9261 (dump_context::dump_generic_expr): ...this new member function.
9262 Add the tree to any pending optinfo, creating one if need be.
9263 (dump_generic_expr_loc): Move implementation to...
9264 (dump_context::dump_generic_expr_loc): ...this new member
9265 function. Add the tree to any pending optinfo, creating one if
9267 (dump_printf): Move implementation to...
9268 (dump_context::dump_printf_va): ...this new member function. Add
9269 the text to any pending optinfo, creating one if need be.
9270 (dump_printf_loc): Move implementation to...
9271 (dump_context::dump_printf_loc_va): ...this new member function.
9272 Start a new optinfo and add the stmt to it.
9273 (dump_dec): Move implementation to...
9274 (dump_context::dump_dec): ...this new member function. Add the
9275 value to any pending optinfo, creating one if need be.
9276 (dump_context::dump_symtab_node): New member function.
9277 (dump_context::get_scope_depth): New member function.
9278 (dump_context::begin_scope): New member function.
9279 (dump_context::end_scope): New member function.
9280 (dump_context::ensure_pending_optinfo): New member function.
9281 (dump_context::begin_next_optinfo): New member function.
9282 (dump_context::end_any_optinfo): New member function.
9283 (dump_context::s_current): New global.
9284 (dump_context::s_default): New global.
9285 (dump_scope_depth): Delete global.
9286 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9287 (dump_symtab_node): New function.
9288 (get_dump_scope_depth): Reimplement in terms of dump_context.
9289 (dump_begin_scope): Likewise.
9290 (dump_end_scope): Likewise.
9291 (selftest::temp_dump_context::temp_dump_context): New ctor.
9292 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9293 (selftest::verify_item): New function.
9294 (ASSERT_IS_TEXT): New macro.
9295 (ASSERT_IS_TREE): New macro.
9296 (ASSERT_IS_GIMPLE): New macro.
9297 (selftest::test_capture_of_dump_calls): New test.
9298 (selftest::dumpfile_c_tests): Call it.
9299 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9300 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9301 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9302 descriptive comment.
9303 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9304 (dump_node, dump_bb): Move these unrelated decls.
9305 (class dump_manager): Add leading comment.
9306 * optinfo.cc: New file.
9307 * optinfo.h: New file.
9309 2018-07-19 Michael Collison <michael.collison@arm.com>
9310 Richard Henderson <rth@redhat.com>
9312 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9313 (subti): Handle op1 zero.
9314 (subvti4, usub4ti4): New.
9315 (*sub<GPI>3_compare1_imm): New.
9316 (sub<GPI>3_carryinCV): New.
9317 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9318 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9320 2018-07-19 Michael Collison <michael.collison@arm.com>
9321 Richard Henderson <rth@redhat.com>
9323 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9324 (addti3): Create simpler code if low part is already known to be 0.
9325 (addvti4, uaddvti4): New.
9326 (*add<GPI>3_compareC_cconly_imm): New.
9327 (*add<GPI>3_compareC_cconly): New.
9328 (*add<GPI>3_compareC_imm): New.
9329 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9330 handle constants within this pattern..
9331 (*add<GPI>3_compareV_cconly_imm): New.
9332 (*add<GPI>3_compareV_cconly): New.
9333 (*add<GPI>3_compareV_imm): New.
9334 (add<GPI>3_compareV): New.
9335 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9336 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9337 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9338 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9339 with 'comparison' operator.
9340 (*add<GPI>3_compareV_cconly_imm): Ditto.
9341 (*add<GPI>3_compareV_cconly): Ditto.
9342 (*add<GPI>3_compareV_imm): Ditto.
9343 (add<GPI>3_compareV): Ditto.
9344 (add<mode>3_carryinC): Ditto.
9345 (*add<mode>3_carryinC_zero): Ditto.
9346 (*add<mode>3_carryinC): Ditto.
9347 (add<mode>3_carryinV): Ditto.
9348 (*add<mode>3_carryinV_zero): Ditto.
9349 (*add<mode>3_carryinV): Ditto.
9351 2018-07-19 Michael Collison <michael.collison@arm.com>
9352 Richard Henderson <rth@redhat.com>
9354 * config/aarch64/aarch64-modes.def (CC_V): New.
9355 * config/aarch64/aarch64-protos.h
9356 (aarch64_addti_scratch_regs): Declare
9357 (aarch64_subvti_scratch_regs): Declare.
9358 (aarch64_expand_subvti): Declare.
9359 (aarch64_gen_unlikely_cbranch): Declare
9360 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9361 for signed overflow using CC_Vmode.
9362 (aarch64_get_condition_code_1): Handle CC_Vmode.
9363 (aarch64_gen_unlikely_cbranch): New function.
9364 (aarch64_addti_scratch_regs): New function.
9365 (aarch64_subvti_scratch_regs): New function.
9366 (aarch64_expand_subvti): New function.
9368 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9370 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9372 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9373 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9376 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9379 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9380 address check not strict.
9382 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9384 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9386 (store_pair_lanes<mode>): Likewise.
9387 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9388 enum value 'ADDR_QUERY_LDP_STP_N'.
9389 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9390 (aarch64_print_address_internal): Add declaration.
9391 (aarch64_print_ldpstp_address): Remove.
9392 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9393 (aarch64_print_operand): Change printing of 'y'.
9394 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9395 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9396 'true' rather than '1'.
9397 * config/aarch64/constraints.md (Uml): Likewise.
9398 (Uml): Rename to Umn.
9401 2018-07-19 Richard Biener <rguenther@suse.de>
9403 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9405 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9406 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9407 (vn_reference_hasher): Likewise.
9408 (struct vn_tables_s): Remove obstack and alloc-pool members.
9409 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9410 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9411 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9412 (vn_reference_insert_pieces): Likewise.
9413 (alloc_vn_nary_op_noinit): Adjust.
9414 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9415 (vn_phi_eq): Adjust.
9416 (shared_lookup_phiargs): Remove.
9417 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9418 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9419 (visit_reference_op_call): Likewise.
9420 (copy_nary, copy_phi, copy_reference): Remove.
9421 (process_scc): Rewind the obstack when iterating. Do not
9422 copy the elements to valid_info but just move them from one
9423 hashtable to the other.
9424 (allocate_vn_table): Adjust.
9425 (free_vn_table): Likewise.
9426 (init_scc_vn): Likewise.
9427 (free_scc_vn): Likewise.
9429 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9432 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9433 indirect_return as function type attribute.
9434 (ix86_attribute_table): Change indirect_return to function
9436 * doc/extend.texi: Update indirect_return attribute.
9438 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9440 * wide-int.h (widest2_int): New.
9441 * gimple-fold.c (arith_overflowed_p): Use it.
9442 * tree.h (widest2_int_cst): New.
9443 * tree-vrp.c (wide_int_binop_overflow): Rename from
9444 vrp_int_const_binop.
9445 Rewrite to work on trees.
9446 (extract_range_from_multiplicative_op_1): Abstract code to...
9447 (wide_int_range_min_max): ...here.
9448 (wide_int_range_cross_product): ...and here.
9449 (extract_range_from_binary_expr_1): Abstract overflow code to...
9450 (wide_int_range_mult_wrapping): ...here.
9451 * tree-vrp.h (wide_int_range_cross_product): New.
9452 (wide_int_range_mult_wrapping): New.
9454 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9455 Julia Koval <julia.koval@intel.com>
9457 * config/i386/x86-tune-costs.h (skylake_memcpy,
9458 skylake_memset): Replace rep_prefix with unrolling for size 512.
9460 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9463 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9464 comparision with EQ_EXPR in last stmt.
9466 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9468 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9469 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9470 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9471 previously known as "PowerPC AltiVec Built-in Functions". Move
9472 some material to new subsubsections "PowerPC AltiVec Built-in
9473 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9475 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9476 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9477 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9478 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9480 2018-07-18 Richard Biener <rguenther@suse.de>
9482 PR tree-optimization/86557
9483 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9486 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9488 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9490 2018-07-17 Jeff Law <law@redhat.com>
9492 * config/arm/arm.c (get_label_padding): Update for recent
9493 changes to label_to_alignment.
9495 PR tree-optimization/86010
9496 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9498 * config/mips/mips.c (vr4130_align_insns): Update for recent
9499 changes to label_to_alignment.
9501 * config/frv/frv.c (frv_label_align): Update for recent changes
9502 to label_to_alignment.
9504 * config/nios2/nios2.c (nios2_label_align): Update for recent
9505 changes which dropped ALIGN_LABELS_LOG.
9507 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9509 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9510 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9512 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9514 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9515 deprecated align_labels_log.
9517 2018-07-17 Richard Biener <rguenther@suse.de>
9520 * dwarf2out.c (init_sections_and_labels): Always generate
9521 a debug_line_str_section for early LTO debug.
9522 (dwarf2out_finish): Reset debug_line_str_hash output early.
9523 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9525 (dwarf2out_early_finish): Output debug_line_str.
9527 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9529 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9530 index register on z196 or later.
9532 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9534 * config/s390/s390.c (s390_default_align): Set default function
9536 (s390_override_options_after_change): Call s390_default align.
9537 (s390_option_override_internal): Call s390_default_align.
9538 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9540 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9543 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9544 to _looptemp_ clauses, other than the first two.
9546 2018-07-17 Martin Liska <mliska@suse.cz>
9548 * opts.c: Do not enable OPT_falign_* for -Os.
9550 2018-07-17 Martin Liska <mliska@suse.cz>
9552 * align.h (MAX_CODE_ALIGN): New.
9553 (MAX_CODE_ALIGN_VALUE): New.
9554 * common/config/i386/i386-common.c (ix86_handle_option):
9555 (MAX_CODE_ALIGN): Moved to align.h.
9556 * final.c (MAX_CODE_ALIGN): Likewise.
9557 * opts.c (parse_and_check_align_values):
9558 (MAX_CODE_ALIGN): Likewise.
9559 (MAX_CODE_ALIGN_VALUE): Likewise.
9561 2018-07-17 Martin Liska <mliska@suse.cz>
9563 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9564 in order to fulfil coding style.
9565 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9566 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9567 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9568 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9569 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9570 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9571 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9572 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9573 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9575 2018-07-17 Martin Liska <mliska@suse.cz>
9577 * align.h: New file.
9578 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9580 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9581 align_flags of label_to_alignment.
9582 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9584 * config/m68k/m68k.c: Do not use removed align_labels_value and
9586 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9587 (LOOP_ALIGN): Likewise.
9588 (LABEL_ALIGN): Likewise.
9589 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9590 Remove not used macro.
9591 (rs6000_loop_align): Change return type to align_flags.
9592 (rs6000_loop_align_max_skip): Remove.
9593 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9594 Change return type to align_flags.
9595 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9596 Remove not used macro.
9597 (rs6000_loop_align): Change return type to align_flags.
9598 (rs6000_loop_align_max_skip): Remove.
9599 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9600 * config/rx/rx-protos.h (rx_align_for_label): Make it
9602 * config/rx/rx.c (rx_align_for_label): Change return type
9604 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9606 into align_flags class.
9607 (LABEL_ALIGN): Likewise.
9608 (LOOP_ALIGN): Likewise.
9609 * config/s390/s390.c (s390_label_align): Use align_flags
9611 (s390_asm_output_function_label): Likewise.
9612 * config/sh/sh.c (sh_override_options_after_change):
9613 Use align_flags class directly without macros.
9614 (find_barrier): Likewise.
9615 (barrier_align): Likewise.
9616 (sh_loop_align): Likewise.
9617 * config/spu/spu.c (spu_option_override):
9618 Use align_flags_tuple::get_value instead of removed macros.
9619 (spu_sched_init): Likewise.
9620 * config/spu/spu.h (GTY): Likewise.
9621 * config/visium/visium.c (visium_option_override):
9622 Set "8" as default secondary alignment.
9623 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9624 in order to guarantee secondary alignment of 8.
9625 * coretypes.h: Include align.h header file.
9626 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9627 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9628 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9629 * doc/tm.texi.in: Likewise.
9630 * final.c (struct label_alignment): Remove not used structure.
9631 (LABEL_ALIGN): Change type to align_flags.
9632 (LOOP_ALIGN): Likewise.
9633 (JUMP_ALIGN): Likewise.
9634 (default_loop_align_max_skip): Remove.
9635 (default_label_align_max_skip): Likewise.
9636 (default_jump_align_max_skip): Likewise.
9637 (default_label_align_after_barrier_max_skip):
9638 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9639 (LABEL_TO_MAX_SKIP): Remove.
9640 (label_to_alignment): Return align_flags type instead of integer.
9641 (label_to_max_skip): Remove.
9642 (align_fuzz): Use align_flags type.
9643 (compute_alignments): Use align_flags type and use align_flags::max
9644 to combine multiple alignments.
9645 (grow_label_align): Grow vec instead of C array.
9646 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9647 (shorten_branches): Use align_flags type and use align_flags::max
9648 to combine multiple alignments.
9649 (final_scan_insn_1): Remove usage of secondary alignment that comes
9650 from label alignment, but instead use proper secondary alignment
9651 which is computed in grow_label_align.
9652 * flags.h (struct align_flags_tuple): Move to align.h.
9653 (struct align_flags): Likewise.
9654 (state_align_loops): Rename to align_loops.
9655 (state_align_jumps): Rename to align_jumps.
9656 (state_align_labels): Rename to align_labels.
9657 (state_align_functions): Rename to align_functions.
9658 (align_loops_log): Remove.
9659 (align_jumps_log): Remove.
9660 (align_labels_log): Remove.
9661 (align_functions_log): Remove.
9662 (align_loops_max_skip): Remove.
9663 (align_jumps_max_skip): Remove.
9664 (align_labels_max_skip): Remove.
9665 (align_functions_max_skip): Remove.
9666 (align_loops_value): Remove.
9667 (align_jumps_value): Remove.
9668 (align_labels_value): Remove.
9669 (align_functions_value): Remove.
9670 * output.h (label_to_alignment): Change return type to align_flags.
9671 (label_to_max_skip): Remove.
9672 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9673 jump_align_max_skip macros.
9674 * targhooks.h (default_loop_align_max_skip): Remove.
9675 (default_label_align_max_skip): Likewise.
9676 (default_jump_align_max_skip): Likewise.
9677 (default_label_align_after_barrier_max_skip): Remove.
9678 * toplev.c (read_log_maxskip): Use ::normalize function.
9679 (parse_N_M): Remove not used argument and also call ::normalize.
9680 (parse_alignment_opts): Do not pass unused arguments.
9681 * varasm.c (assemble_start_function): Use directly align_functions
9682 instead of removed macros.
9683 * system.h: Do not poison removed macros.
9685 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9688 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9689 and cond temporaries don't have reference type if iterator has
9690 pointer type. For init use &for_pre_body instead of pre_p if
9691 for_pre_body is non-empty.
9693 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9695 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9696 double-double modes to SFmode directly directly.
9697 (trunc<mode>sf2_fprs): Delete.
9699 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9701 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9702 for conversions between IFmode and the decimal floating point modes.
9703 (init_float128_ieee): Use the correct names for conversions between
9704 KFmode and the decimal floating point modes.
9706 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9708 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9709 for the conversions between TDmode and IFmode.
9710 (init_float128_ieee): Use more correct names for the conversions
9711 between TDmode and KFmode.
9713 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9715 PR tree-optimization/86526
9716 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9717 (inline_expand_builtin_string_cmp): Likewise.
9718 (inline_string_cmp): Likewise. Use c_readstr instead of
9719 builtin_memcpy_read_str. Add unit_mode temporary.
9721 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9724 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9725 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9727 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9729 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9730 Alphabetize prototypes of built-in functions, separating out
9731 built-in functions that are listed in this section but should be
9732 described elsewhere.
9734 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9737 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9738 conditional move when trapping comparison was split to a
9739 non-trapping one (and vice versa).
9741 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9743 * config/s390/s390.c (s390_function_profiler): Generate nops
9744 instead of profiler call sequences.
9745 * config/s390/s390.opt: Add the new option.
9747 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9749 * config/s390/s390.c (s390_function_profiler): Generate
9750 __mcount_loc section.
9751 * config/s390/s390.opt: Add the new option.
9753 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9755 * common.opt: Add the new warning.
9756 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9757 %r0,__fentry__" when -mfentry is specified.
9758 (s390_option_override_internal): Disallow -mfentry for 31-bit
9760 * config/s390/s390.opt: Add the new option.
9762 2018-07-16 Richard Biener <rguenther@suse.de>
9765 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9766 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9768 2018-07-16 Martin Liska <mliska@suse.cz>
9771 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9774 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9776 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9778 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9780 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9782 * config/arc/arc-cpus.def (hs4x): New cpu.
9784 * config/arc/arc-tables.opt: Regenerate.
9785 * config/arc/arc.c (arc_sched_issue_rate): New function.
9786 (TARGET_SCHED_ISSUE_RATE): Define.
9787 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9788 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9790 (attr tune): Add ARCHS4x tune values.
9791 (attr tune_dspmpy): Define.
9792 (*tst): Correct instruction type.
9793 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9794 * config/arc/arcHS4x.md: New file.
9795 * config/arc/fpu.md: Update instruction type attributes.
9796 * config/arc/t-multilib: Regenerate.
9798 2018-07-16 Tom de Vries <tdevries@suse.de>
9801 * var-tracking.c (vt_initialize): Fix pre_dec handling.
9803 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9805 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9808 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
9810 PR tree-optimization/86514
9811 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9812 conversion to a boolean type from a type with greater precision.
9814 2018-07-16 Tom de Vries <tdevries@suse.de>
9816 * var-tracking.c (vt_initialize): Print adjusted insn slim if
9817 dump_flags request TDF_SLIM.
9819 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
9821 * fold-const.c (int_const_binop_1): Abstract...
9822 (wide_int_binop): ...wide int code here.
9823 (poly_int_binop): ...poly int code here.
9824 Abstract the rest of int_const_binop_1 into int_const_binop.
9825 * fold-const.h (wide_int_binop): New.
9826 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9827 Remove useless PLUS/MINUS_EXPR case.
9828 (zero_nonzero_bits_from_vr): Move wide int code...
9829 (zero_nonzero_bits_from_bounds): ...here.
9830 (extract_range_from_binary_expr_1): Move mask optimization code...
9831 (range_easy_mask_min_max): ...here.
9832 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9833 (range_easy_mask_min_max): New.
9835 2018-07-15 Jeff Law <law@redhat.com>
9838 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9841 2018-07-14 Jim Wilson <jimw@sifive.com>
9843 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9845 2018-07-14 Paul Koning <ni1d@arrl.net>
9847 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9849 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
9851 * lto-streamer-out.c (copy_function_or_variable): Dump info about
9854 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
9855 Steve Munroe <munroesj52@gmail.com>
9857 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9858 (_mm_andnot_si128): Likewise.
9859 (_mm_or_si128): Likewise.
9860 (_mm_xor_si128): Likewise.
9862 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
9865 * builtins.c (expand_builtin_memcmp): Inline the calls first
9866 when result_eq is false.
9867 (expand_builtin_strcmp): Inline the calls first.
9868 (expand_builtin_strncmp): Likewise.
9869 (inline_string_cmp): New routine. Expand a string compare
9870 call by using a sequence of char comparison.
9871 (inline_expand_builtin_string_cmp): New routine. Inline expansion
9872 a call to str(n)cmp/memcmp.
9873 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9875 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9877 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
9879 * config/arm/driver-arm.c: Include arm-native.h.
9880 (host_detect_local_cpu): Use auto-generated data tables.
9881 (vendors, arm_cpu_table): Delete. Move part information to ...
9882 * config/arm/arm-cpus.in: ... here.
9883 * config/arm/parsecpu.awk (gen_native): New function.
9884 (vendor, part): New CPU fields.
9885 (END): Add support for building the native CPU detection tables.
9886 * config/arm/t-arm (arm-native.h): Add build rule.
9887 (driver-arm.o): Add dependency on arm-native.h.
9889 2018-07-13 Richard Biener <rguenther@suse.de>
9892 * match.pd (addr1 - addr2): Allow either of the operand to
9895 2018-07-13 Tom de Vries <tdevries@suse.de>
9897 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9900 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
9902 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9903 arrays instead of numbered variables.
9905 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
9907 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9908 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9910 2018-07-13 Richard Biener <rguenther@suse.de>
9913 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9914 instead of get_context_die.
9916 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
9917 Richard Biener <rguenther@suse.de>
9920 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9921 that the loop latch destination where phi is defined.
9923 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
9925 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9926 (riscv_expand_epilogue): Add assertion to check interrupt mode.
9927 (riscv_set_current_function): Extract getting interrupt type to new
9929 (riscv_get_interrupt_type): New function.
9930 (riscv_merge_decl_attributes): New function, checking interrupt type is
9932 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9934 2018-07-12 Paul Koning <ni1d@arrl.net>
9936 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9939 2018-07-12 Paul Koning <ni1d@arrl.net>
9941 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9942 zero reference, add doloop_end instead.
9943 * doc/md.texi (decrement_and_branch_until_zero): Remove.
9944 (Looping patterns): Remove decrement_and_branch_until_zero. Add
9945 detail for doloop_end.
9947 2018-07-12 Martin Sebor <msebor@redhat.com>
9950 * attribs.c (decl_attributes): Reject conflicting attributes before
9951 calling attribute handlers.
9953 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
9955 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9957 (gcc::dump_manager::get_dump_file_name): likewise.
9958 (dump_begin): Likewise.
9959 * dumpfile.h (dump_begin): Update prototype.
9960 (gcc::dump_manager::get_dump_file_name,
9961 gcc::dump_manager::get_dump_file_name): Update prototype.
9963 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9965 * internal-fn.h (vectorizable_internal_fn_p): New function.
9966 * tree-vect-slp.c (compatible_calls_p): Likewise.
9967 (vect_build_slp_tree_1): Remove nops argument. Handle calls
9968 to internal functions.
9969 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9971 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9973 * fold-const.h (inverse_conditions_p): Declare.
9974 * fold-const.c (inverse_conditions_p): New function.
9975 * match.pd: Use inverse_conditions_p. Add folds of view_converts
9976 that test the inverse condition of a conditional internal function.
9977 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9978 * internal-fn.c (internal_fn_mask_index): Handle conditional
9980 (vectorized_internal_fn_supported_p): New function.
9981 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9982 (any_pred_load_store): Replace with...
9983 (need_to_predicate): ...this new variable.
9984 (redundant_ssa_names): New variable.
9985 (ifcvt_can_use_mask_load_store): Move initial checks to...
9986 (ifcvt_can_predicate): ...this new function. Handle tree codes
9987 for which a conditional internal function exists.
9988 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9989 instead of ifcvt_can_use_mask_load_store. Update after variable
9991 (predicate_load_or_store): New function, split out from
9992 predicate_mem_writes.
9993 (check_redundant_cond_expr): New function.
9994 (value_available_p): Likewise.
9995 (predicate_rhs_code): Likewise.
9996 (predicate_mem_writes): Rename to...
9997 (predicate_statements): ...this. Use predicate_load_or_store
9998 and predicate_rhs_code.
9999 (combine_blocks, tree_if_conversion): Update after above name changes.
10000 (ifcvt_local_dce): Handle redundant_ssa_names.
10001 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10002 general conditional functions.
10003 * tree-vect-stmts.c (vectorizable_call): Likewise.
10005 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10006 Alan Hayward <alan.hayward@arm.com>
10007 David Sherwood <david.sherwood@arm.com>
10009 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10010 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10011 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10012 plus and minus and convert them into IFN_COND_FMA-based sequences.
10013 (convert_mult_to_fma): Handle conditional plus and minus.
10015 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10017 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10018 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10019 (cond_fnms_optab): New optabs.
10020 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10021 internal functions.
10022 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10023 * internal-fn.h (get_conditional_internal_fn): Declare.
10024 (get_unconditional_internal_fn): Likewise.
10025 * internal-fn.c (cond_ternary_direct): New macro.
10026 (expand_cond_ternary_optab_fn): Likewise.
10027 (direct_cond_ternary_optab_supported_p): Likewise.
10028 (FOR_EACH_COND_FN_PAIR): Likewise.
10029 (get_conditional_internal_fn): New function.
10030 (get_unconditional_internal_fn): Likewise.
10031 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10032 (gimple_match_op::gimple_match_op): Add a new overload for 5
10034 (gimple_match_op::set_op): Likewise.
10035 (gimple_resimplify5): Declare.
10036 * genmatch.c (decision_tree::gen): Generate simplifications for
10038 * gimple-match-head.c (gimple_simplify): Define an overload for
10039 5 operands. Handle calls with 5 arguments in the top-level overload.
10040 (convert_conditional_op): Handle conversions from unconditional
10041 internal functions to conditional ones.
10042 (gimple_resimplify5): New function.
10043 (build_call_internal): Pass a fifth operand.
10044 (maybe_push_res_to_seq): Likewise.
10045 (try_conditional_simplification): Try converting conditional
10046 internal functions to unconditional internal functions.
10047 Handle 3-operand unconditional forms.
10048 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10049 Define ternary equivalents of the current rules for binary conditional
10050 internal functions.
10051 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10052 ternary operations.
10053 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10054 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10055 (optab): Handle them.
10056 (SVE_COND_FP_TERNARY): New int iterator.
10057 (sve_fmla_op, sve_fmad_op): New int attributes.
10058 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10059 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10060 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10062 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10064 * target.def (preferred_else_value): New target hook.
10065 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10066 * doc/tm.texi: Regenerate.
10067 * targhooks.h (default_preferred_else_value): Declare.
10068 * targhooks.c (default_preferred_else_value): New function.
10069 * internal-fn.h (conditional_internal_fn_code): Declare.
10070 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10071 (get_conditional_internal_fn): Use it.
10072 (conditional_internal_fn_code): New function.
10073 * gimple-match.h (gimple_match_cond): New struct.
10074 (gimple_match_op): Add a cond member function.
10075 (gimple_match_op::gimple_match_op): Update all forms to take a
10077 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10078 for the suboperation, but don't specify a particular else_value.
10079 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10080 (visit_nary_op, visit_reference_op_load): Pass
10081 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10082 * gimple-match-head.c: Include tree-eh.h
10083 (convert_conditional_op): New function.
10084 (maybe_resimplify_conditional_op): Likewise.
10085 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10086 (gimple_resimplify2): Likewise.
10087 (gimple_resimplify3): Likewise.
10088 (gimple_resimplify4): Likewise.
10089 (maybe_push_res_to_seq): Return null for conditional operations.
10090 (try_conditional_simplification): New function.
10091 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10093 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10095 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10097 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10099 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10101 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10103 (hash_tree): Do not hash DECL_FCONTEXT
10104 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10105 Do not stream DECL_FCONTEXT.
10106 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10107 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10109 2018-07-12 Richard Biener <rguenther@suse.de>
10112 * dwarf2out.c (gen_block_die): Only output blocks when they have
10113 at least one !DECL_IGNORED_P variable.
10115 2018-07-12 Richard Biener <rguenther@suse.de>
10118 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10119 Remove -mieee-fp handling.
10121 2018-07-12 Richard Biener <rguenther@suse.de>
10123 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10124 left-over from last patch.
10126 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10128 PR tree-optimization/86492
10129 * gimple-ssa-store-merging.c
10130 (imm_store_chain_info::coalesce_immediate_stores): Call
10131 check_no_overlap even for the merge_overlapping case. Formatting fix.
10133 2018-07-12 Richard Biener <rguenther@suse.de>
10135 PR middle-end/86479
10136 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10137 move possibly trapping operations into the conditional.
10139 2018-07-12 Richard Biener <rguenther@suse.de>
10141 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10142 (vn_lookup_simplify_result): Remove recursion limit applied
10144 (vn_nary_build_or_lookup_1): Adjust.
10145 (try_to_simplify): Likewise.
10146 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10148 (gimple_resimplify2): Likewise.
10149 (gimple_resimplify3): Likewise.
10150 (gimple_resimplify4): Likewise.
10152 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10154 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10155 Use __mmask64 type instead of __mmask8 for __M argument.
10156 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10157 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10159 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10160 __mmask16 for __M argument.
10161 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10162 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10163 to __mmask16 instead of __mmask8.
10164 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10165 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10166 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10167 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10168 instead of __mmask16 for __U argument.
10169 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10170 __mmask16 instead of __mmask8 for __U argument.
10171 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10173 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10175 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10177 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10179 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10181 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10183 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10185 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10187 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10189 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10191 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10192 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10193 return type as well as __M argument type and all casts from __mmask8
10195 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10196 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10197 return type as well as __M argument type and all casts from __mmask8
10199 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10200 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10201 return type as well as __M argument type and all casts from __mmask8
10203 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10204 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10205 return type as well as __M argument type and all casts from __mmask8
10207 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10208 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10211 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10213 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10214 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10217 2018-07-11 Paul Koning <ni1d@arrl.net>
10219 * doc/md.texi (define_subst): Document how multiple occurrences of
10220 the same argument in the replacement pattern are handled.
10222 2018-07-11 Paul Koning <ni1d@arrl.net>
10224 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10225 alphabetical order.
10226 (Common Type Attributes): Add "mode" attribute.
10228 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10230 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10231 stream DECL_ORIGINAL_TYPE.
10232 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10233 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10234 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10235 Do not walk original type.
10236 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10238 (write_ts_decl_non_common_tree_pointers): Do not stream
10240 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10241 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10243 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10245 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10246 thread twice from the same starting edge.
10248 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10250 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10251 * gimple.c (gimple_call_nonnull_result_p): ...here...
10252 (gimple_call_nonnull_arg): ...and here.
10253 * gimple.h (gimple_call_nonnull_result_p): New.
10254 (gimple_call_nonnull_arg): New.
10256 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10258 * config/arm/arm-cpus.in: Move information from fpu field of each
10259 cpu definition to the isa field.
10260 * config/arm/parsecpu.awk (fpu): Delete match rule.
10261 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10263 2018-07-11 Richard Biener <rguenther@suse.de>
10266 * dwarf2out.c (init_sections_and_labels): Use
10267 output_asm_line_debug_info consistently.
10268 (dwarf2out_early_finish): Likewise.
10269 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10272 2018-07-11 Richard Biener <rguenther@suse.de>
10274 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10275 Rework father_bb setting in a way to avoid propagating constants
10276 multiple times on a loop body.
10278 2018-07-10 Mark Wielaard <mark@klomp.org>
10281 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10283 2018-07-10 Richard Biener <rguenther@suse.de>
10285 * hash-map.h (hash_map::iterator::operator*): Return
10286 references to key and value.
10288 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10291 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10292 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10293 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10294 (gimplify_omp_for): For composite loops, move outer
10295 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10296 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10297 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10298 TREE_LIST for both the original class iterator and the "last" helper
10299 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10300 loop, remember has_decl_expr from outer composite loops for the
10301 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10303 2018-07-09 Martin Sebor <msebor@redhat.com>
10305 PR middle-end/77357
10306 PR middle-end/86428
10307 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10308 accessing implicitly initialized array elements.
10309 * expr.c (string_constant): Handle string initializers of
10310 character arrays within aggregates.
10311 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10312 Store element offset. As a special case, handle zero size.
10313 (fold_nonarray_ctor_reference): Same.
10314 (fold_ctor_reference): Add argument. Store subobject offset.
10315 * gimple-fold.h (fold_ctor_reference): Add argument.
10317 2018-07-09 Paul Koning <ni1d@arrl.net>
10319 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10320 (pdp11_insn_cost): New function.
10321 (pdp11_md_asm_adjust): New function.
10322 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10323 (pdp11_rtx_costs): Update to match machine better.
10324 (output_addr_const_pdp11): Correct format mismatch warnings.
10325 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10326 * config/pdp11/pdp11.md: General change to add base_cost and/or
10327 length attributes for use by new pdp11_insn_cost function.
10328 (MIN_BRANCH): Correct definition.
10330 (doloop_end): Use standard pattern name for looping pattern.
10331 (doloop_end_nocc): New.
10332 (movsf): Add another constraint alternative.
10333 (zero_extendqihi2): Add constraint alternatives for not in place
10335 (zero_extendhisi2): Remove.
10336 (shift patterns): Add CC handling variants.
10340 (define_peephole2): New peephole to recognize mov that sets CC for
10343 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10345 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10346 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10349 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10352 * real.c (real_nextafter): Return true if result is denormal.
10354 2018-07-09 Martin Liska <mliska@suse.cz>
10356 * common.opt: Add back wrongly removed attribute.
10358 2018-07-09 Richard Biener <rguenther@suse.de>
10361 * dwarf2out.c (gen_block_die): For an early generated DIE
10362 always output high/low PC attributes.
10364 2018-07-09 Tom de Vries <tdevries@suse.de>
10366 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10367 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10368 onto VAR_DECL with abstract origin.
10370 2018-07-07 Jim Wilson <jimw@sifive.com>
10372 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10374 2018-07-07 Tom de Vries <tdevries@suse.de>
10376 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10378 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10380 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10382 (combine_bound): Use wide-int overflow calculation instead of
10384 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10386 * fold-const.c (int_const_binop_2): Same.
10387 (extract_muldiv_1): Same.
10388 (fold_div_compare): Same.
10389 (fold_abs_const): Same.
10391 * poly-int.h (add): Same.
10395 * predict.c (predict_iv_comparison): Same.
10396 * profile-count.c (slow_safe_scale_64bit): Same.
10397 * simplify-rtx.c (simplify_const_binary_operation): Same.
10398 * tree-chrec.c (tree_fold_binomial): Same.
10399 * tree-data-ref.c (split_constant_offset_1): Same.
10400 * tree-if-conv.c (idx_within_array_bound): Same.
10401 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10402 * tree-ssa-phiopt.c (minmax_replacement): Same.
10403 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10404 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10405 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10406 * wide-int.cc (wi::add_large): Same.
10407 (wi::mul_internal): Same.
10408 (wi::sub_large): Same.
10409 (wi::divmod_internal): Same.
10410 * wide-int.h: Change overflow type to overflow_type for neg, add,
10411 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10412 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10413 mul_internal, divmod_internal.
10414 (overflow_type): New enum.
10415 (accumulate_overflow): New.
10417 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10419 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10420 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10422 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10424 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10425 argument is checked for zero before entering loop, avoid checking again.
10427 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10429 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10430 * gimplify.h (generic_expr_could_trap_p): Likwise.
10431 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10433 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10435 PR tree-optimization/86401
10436 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10437 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10438 (fold_bit_and_mask): ... here. New helper function for match.pd.
10439 * fold-const.h (fold_bit_and_mask): Declare.
10440 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10442 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10445 * target.def (translate_mode_attribute): New hook.
10446 * targhooks.h (default_translate_mode_attribute): Declare.
10447 * targhooks.c (default_translate_mode_attribute): New function.
10448 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10449 * doc/tm.texi: Regenerate.
10450 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10451 (rs6000_translate_mode_attribute): New function.
10453 2018-07-06 Paul Koning <ni1d@arrl.net>
10455 * doc/md.texi (define_split): Document DONE and FAIL.
10456 (define_peephole2): Ditto.
10458 2018-07-05 Jeff Law <law@redhat.com>
10460 PR tree-optimization/86010
10461 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10462 both the head and tail of mem* and str* calls.
10464 2018-07-05 Jim Wilson <jimw@sifive.com>
10466 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10468 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10470 * config/aarch64/aarch64-simd.md: correct flags text for
10471 MIN_EXPR replacement.
10473 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10475 * configure: Regenerated.
10477 2018-07-05 Carl Love <cel@us.ibm.com>
10479 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10480 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10481 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10482 VSX_BUILTIN_DOUBLEL_V4SF.
10484 2018-07-05 Martin Sebor <msebor@redhat.com>
10487 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10488 than its domain to compute its the upper bound of a char array.
10490 2018-07-05 Nathan Sidwell <nathan@acm.org>
10492 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10493 * doc/cpp.texi: Update comment.
10494 * doc/tm.texi: Rebuilt.
10495 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10496 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10497 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10498 headers affected by extern "C".
10499 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10500 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10501 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10502 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10503 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10504 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10505 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10506 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10507 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10508 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10509 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10510 config/sparc/sp64-elf.h, config/spu/spu.h,
10511 config/stormy16/stormy16.h, config/v850/v850.h,
10512 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10513 define NO_IMPLICIT_EXTERN_C.
10514 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10516 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10519 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10520 instead of GET_MODE_SIZE when comparing Units.
10522 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10525 * rtlanal.c (set_noop_p): Constrain on mode change,
10526 include hard-reg-set.h
10528 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10530 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10532 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10535 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10538 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10540 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10542 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10545 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10547 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10549 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10551 PR middle-end/86380
10552 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10554 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10556 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10557 neg_*_op* variables.
10559 2018-07-04 Martin Liska <mliska@suse.cz>
10561 * tree-switch-conversion.c: Define
10562 max_ratio_for_speed and max_ratio_for_size constants.
10564 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10565 Martin Liska <mliska@suse.cz>
10567 PR middle-end/66240
10570 * common.opt: Rename align options with 'str_' prefix.
10571 * common/config/i386/i386-common.c (set_malign_value): New
10573 (ix86_handle_option): Use it to set -falign-* options/
10574 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10575 type from int to string.
10576 * config/aarch64/aarch64.c: Update default values from int
10578 * config/alpha/alpha.c (alpha_override_options_after_change):
10580 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10581 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10582 max skip conditionally.
10583 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10584 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10585 max skip conditionally.
10586 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10587 max skip conditionally.
10588 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10589 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10590 max skip conditionally.
10591 * config/i386/i386.c (struct ptt): Change type from int to
10593 (ix86_default_align): Set default values.
10594 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10595 max skip conditionally.
10596 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10597 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10598 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10599 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10600 max skip conditionally.
10601 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10602 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10603 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10604 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10605 max skip conditionally.
10606 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10607 * config/ia64/ia64.c (ia64_option_override): Set default values
10608 for alignment options.
10609 * config/m68k/m68k.c: Handle new str_align_* options.
10610 * config/mips/mips.c (mips_set_compression_mode): Change
10612 (mips_option_override): Set default values for options.
10613 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10615 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10617 * config/rx/rx.c (rx_option_override): Likewise.
10618 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10619 (LABEL_ALIGN): Use align_labels_log.
10620 (LOOP_ALIGN): Use align_loops_align.
10621 * config/s390/s390.c (s390_asm_output_function_label): Use new
10623 * config/sh/sh.c (sh_override_options_after_change):
10624 Change type of constants.
10625 * config/spu/spu.c (spu_sched_init): Likewise.
10626 * config/sparc/sparc.c (sparc_option_override): Set default
10627 values for options.
10628 * config/visium/visium.c (visium_option_override): Likewise.
10629 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10630 emit p2align format with last argument if it's not needed.
10631 * doc/invoke.texi: Document extended format of -falign-*.
10632 * final.c: Use align_labels alignment.
10633 * flags.h (struct target_flag_state): Change type to use
10635 (struct align_flags_tuple): New.
10636 (struct align_flags): Likewise.
10637 (align_loops_log): Redefine macro to use new types.
10638 (align_loops_max_skip): Redefine macro to use new types.
10639 (align_jumps_log): Redefine macro to use new types.
10640 (align_jumps_max_skip): Redefine macro to use new types.
10641 (align_labels_log): Redefine macro to use new types.
10642 (align_labels_max_skip): Redefine macro to use new types.
10643 (align_functions_log): Redefine macro to use new types.
10644 (align_loops): Redefine macro to use new types.
10645 (align_jumps): Redefine macro to use new types.
10646 (align_labels): Redefine macro to use new types.
10647 (align_functions): Redefine macro to use new types.
10648 (align_functions_max_skip): Redefine macro to use new types.
10649 (align_loops_value): New macro.
10650 (align_jumps_value): New macro.
10651 (align_labels_value): New macro.
10652 (align_functions_value): New macro.
10653 * function.c (invoke_set_current_function_hook): Propagate
10654 alignment values from flags to global variables default in
10656 * ipa-icf.c (sem_function::equals_wpa): Use
10657 cl_optimization_option_eq instead of memcmp.
10658 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10660 (cl_optimization_stream_in): Likewise.
10661 * optc-save-gen.awk: Support strings in cl_optimization.
10662 * opth-gen.awk: Likewise.
10663 * opts.c (finish_options): Remove error checking of invalid
10665 (MAX_CODE_ALIGN): Remove.
10666 (MAX_CODE_ALIGN_VALUE): Likewise.
10667 (parse_and_check_align_values): New function.
10668 (check_alignment_argument): Likewise.
10669 (common_handle_option): Use check_alignment_argument.
10670 * opts.h (parse_and_check_align_values): Declare.
10671 * toplev.c (init_alignments): Remove.
10672 (read_log_maxskip): New.
10673 (parse_N_M): Likewise.
10674 (parse_alignment_opts): Likewise.
10675 (backend_init_target): Remove usage of init_alignments.
10676 * toplev.h (parse_alignment_opts): Declare.
10677 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10679 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10680 * tree.c (cl_option_hasher::equal): New.
10681 * varasm.c: Use new global macros.
10683 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10685 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10686 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10687 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10688 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10689 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10690 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10691 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10692 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10693 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10694 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10695 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10696 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10697 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10699 2018-07-04 Martin Liska <mliska@suse.cz>
10700 Jonathan Wakely <jwakely@redhat.com>
10702 * coverage.c: Use correct type.
10703 * doc/invoke.texi: Language correction.
10705 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10708 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10709 ENDBRANCH for non-tail call which may return via indirect branch.
10710 * doc/extend.texi: Document indirect_return attribute.
10712 2018-07-03 Martin Sebor <msebor@redhat.com>
10714 PR tree-optimization/86274
10715 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10717 (format_floating): Correct handling of infinities and NaNs.
10719 2018-07-03 Martin Sebor <msebor@redhat.com>
10721 * print-tree.c (print_real_cst): New function.
10722 (print_node_brief): Call it.
10723 (print_node): Ditto.
10725 2018-07-03 Jeff Law <law@redhat.com>
10727 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10728 into a single pattern.
10730 * config/h8300/h8300.md (ors code_iterator): New.
10731 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10732 a single pattern and single splitter.
10733 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10734 (iorqi3_1, xorqi3_1): Likewise.
10735 (iorqi3, xorqi3 expanders): Similarly.
10737 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10738 (movmd_internal) into a single pattern using the P mode iterator.
10739 (movmd splitters): Similarly.
10740 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10741 (movsd splitters): Similarly.
10743 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10744 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10745 right table based on the size of the operand.
10746 * config/h8300/h8300.md (length_table): Corresponding changes. All
10747 references to "addb", "addw" and "addl" changed to "add".
10748 (btst patterns): Merge two variants into a single pattern.
10749 (tstqi, tsthi): Likewise.
10750 (addhi3_incdec, addsi3_incdec): Likewise.
10751 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10752 (mulhi3, mulsi3): Likewise.
10753 (udivhi3, udivsi3): Likewise.
10754 (divhi3, divsi3): Likewise.
10755 (andorqi3, andorhi3, andorsi3): Likewise.
10757 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10760 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10761 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10763 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10765 PR tree-optimization/85694
10766 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10767 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10769 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10770 (<u>avg<mode>3_ceil): New patterns.
10772 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10774 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10775 scan-tree-dump directive.
10776 * gcc.dg/vect/slp-perm-2.c: Likewise.
10777 * gcc.dg/vect/slp-perm-3.c: Likewise.
10778 * gcc.dg/vect/slp-perm-5.c: Likewise.
10779 * gcc.dg/vect/slp-perm-6.c: Likewise.
10780 * gcc.dg/vect/slp-perm-7.c: Likewise.
10781 * gcc.dg/vect/slp-perm-8.c: Likewise.
10783 2018-07-03 Marek Polacek <polacek@redhat.com>
10785 PR middle-end/86202
10786 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10788 2018-07-03 Richard Biener <rguenther@suse.de>
10791 * tree-ssa-structalias.c (find_func_clobbers): Properly
10792 handle indirect calls.
10794 2018-07-03 Jeff Law <law@redhat.com>
10796 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10797 (shifts): New code iterator.
10798 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10799 expander. Fix HImode handling on H8/SX.
10800 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10801 (subqi3, subhi3, subsi3 expanders): Likewise.
10802 (andqi3, andhi3, andsi3 expanders): Likewise.
10803 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10804 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10805 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10806 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10807 (zero_extendqihi2, zero_extendqisi2): Likewise.
10808 (extendqihi2, extendqisi2): Likewise.
10809 (rotlqi3, rotlhi3, rotlsi3): Likewise.
10810 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10811 (rotlqi3_1, rotlhi3_1): Likewise.
10812 (logicalhi3_sn, logicalsi3_sn): Likewise.
10813 (logicalhi3, logicalsi3): Likewise.
10815 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10817 * tree-vect-patterns.c (vect_recog_rotate_pattern)
10818 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10819 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10820 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10821 type to append_pattern_def_seq instead of creating a stmt_vec_info
10823 (build_mask_conversion): Likewise. Remove vinfo argument.
10824 (vect_add_conversion_to_patterm): Likewise, renaming to...
10825 (vect_add_conversion_to_pattern): ...this.
10826 (vect_recog_mask_conversion_pattern): Update call to
10827 build_mask_conversion. Pass the vector type to
10828 append_pattern_def_seq here too.
10829 (vect_recog_gather_scatter_pattern): Update call to
10830 vect_add_conversion_to_pattern.
10832 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10834 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10835 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10836 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10837 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10838 STMT_VINFO_PATTERN_DEF_SEQ to null here.
10839 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10840 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10841 append_pattern_def_seq instead of new_pattern_def_seq.
10842 (vect_recog_divmod_pattern): Do both of the above.
10843 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10846 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10848 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10849 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10850 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10851 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10852 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10853 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10854 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10855 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10856 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10857 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10858 parameter with a single stmt_vec_info.
10859 (vect_recog_func_ptr): Likewise.
10860 (vect_recog_gather_scatter_pattern): Likewise, folding in...
10861 (vect_try_gather_scatter_pattern): ...this.
10862 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10863 the stmt_vec_info of the statement to be matched. Don't clear
10864 STMT_VINFO_RELATED_STMT.
10865 (vect_pattern_recog): Update call accordingly.
10867 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10869 PR tree-optimization/85694
10870 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10871 (uavgM3_ceil): Document new optabs.
10872 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10873 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10875 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10876 (savg_ceil_optab): New optabs.
10877 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10878 (vect_vect_recog_func_ptrs): Add it.
10879 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10880 constant directly from the associated lhs.
10882 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10884 * tree-vect-patterns.c (vect_split_statement): New function.
10885 (vect_convert_input): Use it to try to split an existing cast.
10887 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10889 * poly-int.h (print_hex): New function.
10890 * dumpfile.h (dump_dec, dump_hex): Declare.
10891 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10892 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10893 min_input_precision, operation_precision and operation_sign.
10894 * tree-vect-patterns.c (vect_get_range_info): New function.
10895 (vect_same_loop_or_bb_p, vect_single_imm_use)
10896 (vect_operation_fits_smaller_type): Delete.
10897 (vect_look_through_possible_promotion): Add an optional
10898 single_use_p parameter.
10899 (vect_recog_over_widening_pattern): Rewrite to use new
10900 stmt_vec_info infomration. Handle one operation at a time.
10901 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10902 (vect_truncatable_operation_p, vect_set_operation_type)
10903 (vect_set_min_input_precision): New functions.
10904 (vect_determine_min_output_precision_1): Likewise.
10905 (vect_determine_min_output_precision): Likewise.
10906 (vect_determine_precisions_from_range): Likewise.
10907 (vect_determine_precisions_from_users): Likewise.
10908 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10909 (vect_vect_recog_func_ptrs): Put over_widening first.
10911 (vect_pattern_recog): Call vect_determine_precisions.
10913 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10915 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10916 statements that have been replaced by further pattern statements.
10917 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10919 2018-07-03 Richard Biener <rguenther@suse.de>
10921 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10922 always set *dt. Dump vectype in vectype overload.
10923 * dumpfile.h (dump_gimple_expr): New function.
10924 (dump_gimple_expr_loc): Likewise.
10925 * dumpfile.c (dump_gimple_expr): New function.
10926 (dump_gimple_expr_loc): Likewise.
10928 2018-07-02 Jeff Law <law@redhat.com>
10930 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10931 the H8/300, H8/300H and H8/S variants into a single pattern.
10932 (movhi_h8300, movqi_h8300hs): Similarly.
10933 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10934 (QHI mode iterator): New.
10936 * config/h8300/h8300.md: Remove trailing whitespace.
10938 2018-07-02 Jim Wilson <jimw@sifive.com>
10940 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10941 instead of emit_insn for interrupt returns.
10942 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10943 (riscv_sret, riscv_uret): Likewise.
10945 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10947 * pretty-print.c (selftest::test_pp_format): Move save and restore
10948 of quotes to class auto_fix_quotes, and add an instance.
10949 * selftest.c: Include "intl.h".
10950 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10951 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10952 * selftest.h (selftest::auto_fix_quotes): New class.
10954 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
10956 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10957 (aarch64_sve_prepare_conditional_op): Remove.
10958 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10959 Allow aarch64_simd_reg_or_zero as select operand; remove
10960 the aarch64_sve_prepare_conditional_op call.
10961 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10962 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10963 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10964 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10965 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10966 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10967 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10968 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10969 and a splitters to match all of the *_any patterns.
10970 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10972 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10973 (SVE_COND_FP_BINARY_REV): Remove.
10974 (sve_int_op_rev, sve_fp_op_rev): New.
10975 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10976 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10977 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10978 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10979 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10980 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10981 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10982 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10983 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10985 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10986 Remove match_dup 1 from the inner unspec.
10987 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10989 * config/aarch64/aarch64.md (movprfx): New attr.
10990 (length): Default movprfx to 8.
10991 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10992 (*madd<SVE_I>, *msub<SVE_I): Likewise.
10993 (*<su>mul<SVE_I>3_highpart): Likewise.
10994 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10995 (*v<ASHIFT><SVE_I>3): Likewise.
10996 (*<su><MAXMIN><SVE_I>3): Likewise.
10997 (*<su><MAXMIN><SVE_F>3): Likewise.
10998 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10999 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11000 (*div<SVE_F>4): Likewise.
11002 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11004 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11007 2018-07-02 Richard Biener <rguenther@suse.de>
11009 PR tree-optimization/86363
11010 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11011 memset argument refers to a non-variable address.
11013 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11015 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11016 {PLUS,MINUS}_EXPR code to...
11017 (adjust_symbolic_bound): ...here,
11018 (combine_bound): ...here,
11019 (set_value_range_with_overflow): ...and here.
11021 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11023 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11025 (extract_range_from_abs_expr): ...here.
11027 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11029 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11030 -fno-omit-frame-pointer when not optimizing.
11032 2018-07-02 Martin Liska <mliska@suse.cz>
11035 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11036 (propagate_nothrow): Likewise.
11038 2018-07-02 Martin Liska <mliska@suse.cz>
11041 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11043 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11045 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11046 function in r262149, changing "loc" param from source_location to
11047 const dump_location_t &.
11048 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11049 declaration, as above.
11051 2018-07-01 Paul Koning <ni1d@arrl.net>
11053 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11054 -munit-asm, -mgnu-asm, -mdec-asm.
11055 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11056 (pdp11_output_labelref): New.
11057 (pdp11_output_def): New.
11058 (pdp11_output_addr_vec_elt): New.
11059 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11060 %# and %@ format codes.
11061 (pdp11_option_override): New.
11062 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11063 (pdp11_output_ident): New.
11064 (pdp11_asm_named_section): New.
11065 (pdp11_asm_init_sections): New.
11066 (pdp11_file_start): New.
11067 (pdp11_file_end): New.
11068 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11069 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11070 %o, like %c but octal.
11071 (pdp11_option_override): New.
11072 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11074 (DATA_SECTION_ASM_OP): Ditto.
11075 (READONLY_DATA_SECTION_ASM_OP): New.
11076 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11077 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11078 (ASM_OUTPUT_LABELREF): Ditto.
11079 (ASM_OUTPUT_DEF): Ditto.
11080 (ASM_OUTPUT_EXTERNAL): New.
11081 (ASM_OUTPUT_SOURCE_FILENAME): New.
11082 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11083 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11084 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11085 %# and %@ format codes.
11086 * config/pdp11/pdp11.opt (mgnu-asm): New.
11087 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11088 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11089 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11091 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11093 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11094 dereferencing path[] beyond its length.
11096 (debug_all_paths): New.
11097 (rewire_first_differing_edge): New.
11098 (adjust_paths_after_duplication): New.
11099 (duplicate_thread_path): Call adjust_paths_after_duplication.
11101 (thread_through_all_blocks): Add new argument to
11102 duplicate_thread_path.
11104 2018-06-30 Jim Wilson <jimw@sifive.com>
11106 * config/riscv/predicates.md (p2m1_shift_operand): New.
11107 (high_mask_shift_operand): New.
11108 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11109 pattern using p2m1_shift_operand.
11110 (lshsi3_zero_extend_3+2): New combiner pattern using
11111 high_mask_shift_operand.
11113 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11115 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11117 (vect_recog_rotate_pattern): ...here.
11118 (vect_convert_input): Try to insert casts of invariants in the
11120 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11121 preheader to be empty.
11123 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11125 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11126 vector type. If given, install it in the new statement's
11127 STMT_VINFO_VECTYPE.
11128 (vect_element_precision): New function.
11129 (vect_unpromoted_value): New struct.
11130 (vect_unpromoted_value::vect_unpromoted_value): New function.
11131 (vect_unpromoted_value::set_op): Likewise.
11132 (vect_look_through_possible_promotion): Likewise.
11133 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11134 (vect_widened_op_tree, vect_convert_input): Likewise.
11135 (vect_convert_inputs, vect_convert_output): Likewise.
11136 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11137 to handle the optional cast of the multiplication result and
11138 vect_widened_op_tree to detect the widened multiplication itself.
11139 Do not require the input and output of promotion casts to have
11140 the same sign, but base the signedness of the operation on the
11141 input rather than the result. If the pattern includes two
11142 promotions, check that those promotions have the same sign.
11143 Do not restrict the MULT_EXPR handling to a double-width result;
11144 handle quadruple-width results and wider. Use vect_convert_inputs
11145 to convert the inputs to the common type.
11146 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11147 to handle the optional cast of the ABS result. Also allow a sign
11148 change or a sign extension between the ABS and MINUS.
11149 Use vect_widened_op_tree to detect the widened subtraction and use
11150 vect_convert_inputs to convert the inputs to the common type.
11151 (vect_handle_widen_op_by_const): Delete.
11152 (vect_recog_widen_op_pattern): New function.
11153 (vect_recog_widen_mult_pattern): Use it.
11154 (vect_recog_widen_shift_pattern): Likewise.
11155 (vect_recog_widen_sum_pattern): Use
11156 vect_look_through_possible_promotion to handle the promoted
11159 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11161 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11162 the containing gimple_seq *.
11163 * gimple-iterator.h (gsi_for_stmt): Declare it.
11164 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11165 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11166 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11167 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11168 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11170 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11172 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11173 statement being replaced is part of an existing pattern
11174 definition sequence, inserting the new pattern statements before
11176 (vect_pattern_recog_1): Don't return a bool. If the statement
11177 is already part of a pattern, instead apply pattern matching
11178 to the pattern definition statements. Don't clear the
11179 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11180 (vect_pattern_recog): Don't break after the first match;
11181 continue processing the pattern definition statements instead.
11182 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11184 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11186 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11187 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11188 (vect_recog_widen_sum_pattern): Use it.
11190 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11192 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11193 phi is not a pattern statement and has not been replaced by
11194 a pattern statement.
11195 * tree-vect-patterns.c (type_conversion_p): Don't check
11196 STMT_VINFO_IN_PATTERN_P.
11197 (vect_recog_vector_vector_shift_pattern): Likewise.
11198 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11199 the pattern statement rather than the original statement; check
11200 directly for a WIDEN_MULT_EXPR here.
11201 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11202 vect_is_simple_use to return the pattern statement rather
11203 than the original statement; use is_pattern_stmt_p to check
11204 for such a pattern statement.
11205 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11206 to return the pattern statement rather than the original statement;
11207 don't do the same transformation here.
11208 (vect_is_simple_use): If the defining statement has been replaced
11209 by a pattern statement, return the pattern statement instead.
11210 Remove the corresponding (local) transformation from the vectype
11213 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11215 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11216 end and default to null.
11217 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11218 (vectorizable_reduction): Update calls accordingly, dropping the
11219 gimple ** argument if the passed-back statement isn't needed.
11220 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11221 (vect_recog_rotate_pattern): Likewise.
11222 (vect_recog_mask_conversion_pattern): Likewise.
11223 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11224 (vect_mask_constant_operand_p): Likewise.
11225 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11226 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11227 (get_group_load_store_type, get_load_store_type): Likewise.
11228 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11229 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11230 (vectorizable_conversion, vectorizable_assignment): Likewise.
11231 (vectorizable_shift, vectorizable_operation): Likewise.
11232 (vectorizable_store, vect_is_simple_cond): Likewise.
11233 (vectorizable_condition, vectorizable_comparison): Likewise.
11234 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11235 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11236 and move it to the end. Cope with null def_stmt_outs.
11238 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11240 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11242 2018-06-29 Jeff Law <law@redhat.com>
11244 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11245 displacements for TARGET_V850E2V3 and newer.
11246 (TARGET_LRA_P): Remove. Defaults to LRA now.
11247 * config/v850/v850.md (sign23byte_load): Remove.
11248 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11249 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11251 2018-06-29 Martin Liska <mliska@suse.cz>
11254 * coverage.c (coverage_init): Mangle full path name.
11255 * doc/invoke.texi: Document the change.
11256 * gcov-io.c (mangle_path): New.
11257 * gcov-io.h (mangle_path): Likewise.
11258 * gcov.c (mangle_name): Use mangle_path for path mangling.
11260 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11262 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11263 if starting source register is not even.
11265 2018-06-29 Martin Liska <mliska@suse.cz>
11267 PR tree-optimization/86263
11268 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11269 Make edge redirection.
11271 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11273 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11274 (dump_scope_depth): New variable.
11275 (get_dump_scope_depth): New function.
11276 (dump_begin_scope): New function.
11277 (dump_end_scope): New function.
11278 * dumpfile.h (get_dump_scope_depth): New declaration.
11279 (dump_begin_scope): New declaration.
11280 (dump_end_scope): New declaration.
11281 (class auto_dump_scope): New class.
11282 (AUTO_DUMP_SCOPE): New macro.
11283 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11286 2018-06-29 Richard Biener <rguenther@suse.de>
11288 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11289 compute_all_dependences succeeds.
11290 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11291 exceed --param loop-max-datarefs-for-datadeps.
11293 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11295 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11297 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11300 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11301 alternative 0 in preferred_for_speed attribute.
11303 2018-06-28 Paul Koning <ni1d@arrl.net>
11305 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11306 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11307 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11308 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11309 for shift insn patterns.
11311 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11313 * cgraph.c (cgraph_node::get_body): Replace assignments to
11314 "dump_file" with calls to set_dump_file.
11315 * dumpfile.c (alt_dump_file): Make static, and group with...
11316 (alt_flags): ...this definition.
11317 (dumps_are_enabled): New variable.
11318 (refresh_dumps_are_enabled): New function.
11319 (set_dump_file): New function.
11320 (set_alt_dump_file): New function.
11321 (gcc::dump_manager::dump_start): Replace assignments to
11322 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11324 (gcc::dump_manager::dump_finish): Likewise.
11325 * dumpfile.h (alt_dump_file): Delete decl.
11326 (dumps_are_enabled): New variable decl.
11327 (set_dump_file): New function decl.
11328 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11330 * tree-nested.c (lower_nested_functions): Replace assignments to
11331 "dump_file" with calls to set_dump_file.
11333 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11335 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11336 goto_locus of each outgoing edge of each basic block.
11338 2018-06-28 Richard Biener <rguenther@suse.de>
11340 * dwarf2out.c (decl_scope_table): Remove.
11341 (push_decl_scope): Likewise.
11342 (pop_decl_scope): Likewise.
11343 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11344 (gen_struct_or_union_type_die): Likewise.
11345 (gen_tagged_type_die): Likewise.
11346 (dwarf2out_init): Do not initialize decl_scope_table.
11347 (dwarf2out_c_finalize): Do not free it.
11349 2018-06-28 Richard Biener <rguenther@suse.de>
11351 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11352 deciding whether to not re-use a DIE.
11354 2018-06-28 Richard Biener <rguenther@suse.de>
11356 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11357 DW_AT_abstract_origin attribute.
11359 2018-06-28 Martin Liska <mliska@suse.cz>
11361 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11362 Use newly introduced constants.
11363 * tree-switch-conversion.h (struct jump_table_cluster):
11364 Define max_ratio_for_size and max_ratio_for_speed.
11366 2018-06-28 Martin Liska <mliska@suse.cz>
11368 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11369 Add new checking assert to catch invalid state.
11370 (jump_table_cluster::can_be_handled): Handle single case
11372 (jump_table_cluster::is_beneficial): Bail out for such case.
11373 (bit_test_cluster::find_bit_tests):
11374 Add new checking assert to catch invalid state.
11375 (bit_test_cluster::can_be_handled): Handle single case
11377 (bit_test_cluster::is_beneficial): Bail out for such case.
11378 (switch_decision_tree::analyze_switch_statement):
11381 2018-06-28 Martin Liska <mliska@suse.cz>
11383 * common.opt: Introduce -completion option.
11384 * gcc.c (driver_handle_option): Handle it.
11385 (driver::main): Print completions if completion
11387 * opt-suggestions.c (option_proposer::get_completions):
11389 (option_proposer::suggest_completion): Likewise.
11390 (option_proposer::find_param_completions): Likewise.
11391 (verify_autocompletions): Likewise.
11392 (test_completion_valid_options): Likewise.
11393 (test_completion_valid_params): Likewise.
11394 (in_completion_p): Likewise.
11395 (empty_completion_p): Likewise.
11396 (test_completion_partial_match): Likewise.
11397 (test_completion_garbage): Likewise.
11398 (opt_proposer_c_tests): Likewise.
11399 * opt-suggestions.h: Declare new functions.
11400 * opts.c (common_handle_option): Handle OPT__completion_.
11401 * selftest-run-tests.c (selftest::run_tests): Add
11402 opt_proposer_c_tests.
11403 * selftest.c (assert_str_startswith): New.
11404 * selftest.h (assert_str_startswith): Likewise.
11405 (opt_proposer_c_tests): New.
11406 (ASSERT_STR_STARTSWITH): Likewise.
11408 2018-06-28 Martin Liska <mliska@suse.cz>
11410 * Makefile.in: Add opt-suggestions.o.
11411 * gcc-main.c: Include opt-suggestions.h.
11412 * gcc.c (driver::driver): Likewise.
11413 (driver::~driver): Remove m_option_suggestions.
11414 (driver::build_option_suggestions): Moved to option_proposer.
11415 (driver::suggest_option): Likewise.
11416 (driver::handle_unrecognized_options): Use option_proposer.
11417 * gcc.h (class driver): Add new memver m_option_proposer.
11418 * opt-suggestions.c: New file.
11419 * opt-suggestions.h: New file.
11421 2018-06-28 Martin Liska <mliska@suse.cz>
11423 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11424 (auto_string_vec::~auto_string_vec): Likewise.
11426 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11428 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11429 prevent_decl_creation_for_types fields up and add reset_location field.
11430 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11431 statement if id->reset_location is true.
11432 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11433 id->reset_location is true.
11434 (copy_phis_for_bb): Force input_location on the arguments if
11435 id->reset_location is true.
11436 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11437 is set on the function to be inlined.
11439 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11441 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11443 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11445 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11446 registers for Pmode.
11447 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11448 hard registers for the clobbered pseudo.
11450 2018-06-27 Paul Koning <ni1d@arrl.net>
11452 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11453 mutually exclusive options.
11454 * config/pdp11/constraints.md (h): New constraint.
11455 (O): Update definition to match shift code generation.
11456 (D): New constraint.
11457 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11459 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11461 (output_jump): Change arguments.
11462 (pdp11_fixed_cc_regs): New function.
11463 (pdp11_cc_mode): Ditto.
11464 (pdp11_expand_shift): Ditto.
11465 (pdp11_assemble_shift): Ditto.
11466 (pdp11_small_shift): Ditto.
11467 (pdp11_branch_cost): Remove.
11468 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11470 (pdp11_register_move_cost): Update for CC registers.
11471 (pdp11_rtx_costs): Add case for LSHIFTRT.
11472 (pdp11_output_jump): Add CCNZ mode conditional branches.
11473 (notice_update_cc_on_set): Remove.
11474 (pdp11_cc_mode): New function.
11475 (simple_memory_operand): Correct pre/post decrement case.
11476 (no_side_effect_operand): New function.
11477 (pdp11_regno_reg_class): Add CC_REGS class.
11478 (pdp11_fixed_cc_regs): New function.
11479 (pdp11_small_shift): New function.
11480 (pdp11_expand_shift): New function to expand shift insns.
11481 (pdp11_assemble_shift): New function to output shifts.
11482 (pdp11_branch_cost): Remove.
11483 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11484 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11485 (WCHAR_TYPE): Ditto.
11486 (PTRDIFF_TYPE): Ditto.
11487 (ADJUST_INSN_LENGTH): New macro.
11488 (FIXED_REGISTERS): Add CC registers.
11489 (CALL_USED_REGISTERS): Ditto.
11490 (reg_class): Ditto.
11491 (REG_CLASS_NAMES): Ditto.
11492 (REG_CLASS_CONTENTS): Ditto.
11493 (SELECT_CC_MODE): Use new function.
11494 (TARGET_FLAGS_REGNUM): New macro.
11495 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11496 (cc0_reg_rtx): Remove.
11497 (CC_STATUS_MDEP): Remove.
11498 (CC_STATUS_MDEFP_INIT): Remove.
11499 (CC_IN_FPU): Remove.
11500 (NOTICE_UPDATE_CC): Remove.
11501 (REGISTER_NAMES): Add CC registers.
11502 (BRANCH_COST): Change to constant 1.
11503 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11505 * config/pdp11/pdp11.opt (mbcopy): Remove.
11506 (mbcopy-builtin): Remove.
11507 (mbranch-cheap): Remove.
11508 (mbranch-expensive): Remove.
11509 * config/pdp11/predicates.md (expand_shift_operand): Update to
11510 match shift code generation.
11511 (ccnz_operator): New predicate.
11512 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11513 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11514 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11516 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11517 description of O constraint.
11519 2018-06-27 Jeff Law <law@redhat.com>
11520 Austin Law <austinklaw@gmail.com>
11522 * config/v850/v850.md (addsi3_set_flags): New pattern.
11523 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11524 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11525 (zero_extendhisi2_v850_set_flags): Likewise.
11526 (zero_extendqisi2_v850_set_flags): Likewise.
11527 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11528 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11529 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11531 * config/v850/v850-protos.h (notice_update_cc): Remove.
11532 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11533 (v850_print_operand): Handle 'D' and "d".
11534 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11535 Add handling of arithmetic/logical operations compared against zero.
11536 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11537 Do not look at v850_compare_op, instead get mode from last argument.
11538 (v850_gen_compare): Remove
11539 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11540 after reload for prologue insns.
11541 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11543 (construct_save_jarl): Likewise.
11544 (TARGET_FLAGS_REGNUM): Define.
11545 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11546 (NOTICE_UPDATE_CC): Remove.
11547 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11548 than cc0. Conditionalize on reload_completed.
11549 (cmpsi_insn, setfcc_insn): Likewise.
11550 (tst1 splitter): Turn into define_and_split which sets the flags
11552 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11553 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11554 (cstoresf4, cstoredf4): Clobber the flags.
11555 (cmpsi, cmpsf, cmpdf): Remove expanders.
11556 (setf_insn): Remove pattern.
11557 (addsi3): Turn into define_and_split which clobbers the flags after
11558 reload and a suitable pattern (addsi3_clobber_flags) for use after
11560 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11561 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11562 (ashrsi3, ashrsi3_v850e2): Likewise.
11563 (bins): Clobber the flags.
11564 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11565 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11566 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11567 (call_value_internal_short, call_value_internal_long): Likewise.
11568 (callt_save_interrupt, callt_return_interrupt): Likewise.
11569 (save_interrupt, return_interrupt): Likewise.
11570 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11571 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11572 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11573 (All FP comparisons): Only allow after reload has completed.
11575 (divh, divhu): Tweak output template.
11576 (branch_z_normal, branch_z_invert): Remove
11577 (branch_nz_normal, branch_nz_invert): Likewise.
11578 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11580 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11581 * config/v850/v850.c (notice_update_cc): Remove.
11582 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11583 (CC_NO_CARRY): Likewise.
11584 (NOTICE_UPDATE_CC): Define to nothing.
11585 * config/v850/v850.md: Remove block comment on cc0 handling
11586 Remove "cc" attribute from all patterns. Remove cc_status handling
11587 from all patterns. Minor formatting fixes.
11589 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11591 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11592 (cortex-a76.cortex-a55): Likewise.
11593 * config/aarch64/aarch64-tune.md: Regenerate.
11594 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11595 cortex-a76.cortex-a55.
11597 2018-06-27 Jeff Law <law@redhat.com>
11599 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11600 (MULTILIB_DIRNAMES): Similarly.
11602 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11604 * gimple.h (gimple_return_retbnd): Delete.
11605 (gimple_return_set_retbnd): Likewise.
11606 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11607 gimple_return_set_retbnd.
11608 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11609 gimple_return_retbnd and adjust.
11610 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11611 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11612 Explicitly return NULL in a couple more cases. Move assertion
11613 on debug statements and remove unreachable code.
11614 (reset_debug_binding): Do not test id->retbnd.
11615 (expand_call_inline): Do not set it.
11617 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11619 * configure.ac: Add --disable-gcov option.
11620 * configure: Regenerate.
11621 * Makefile.in: Honour @enable_gcov@.
11622 * doc/install.texi: Document --disable-gcov.
11624 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11626 * config/arm/arm-cpus.in (cortex-a76): New entry.
11627 (cortex-a76.cortex-a55): Likewise.
11628 * config/arm/arm-tables.opt: Regenerate.
11629 * config/arm/arm-tune.md: Likewise.
11630 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11631 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11632 cortex-a76.cortex-a55.
11634 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11637 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11639 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11641 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11643 (EPILOGUE_USES): Likewise.
11645 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11647 * tree-inline.c (remap_location): New function extracted from...
11648 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11649 (copy_phis_for_bb): ...here. Call remap_location.
11650 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11652 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11654 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11655 unaligned vsx for 16B memset.
11657 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11660 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11661 ieee128_float_type_node to long_double_type_node unless
11662 TARGET_LONG_DOUBLE_128 is set.
11664 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11666 * cfgloop.c (get_loop_location): Convert return type from
11667 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11668 by implicit construction from rtx_insn *, and using
11669 dump_user_location_t::from_function_decl for the fallback case.
11670 * cfgloop.h (get_loop_location): Convert return type from
11671 location_t to dump_user_location_t.
11672 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11673 dump_printf_loc to pass in a dump_location_t rather than a
11674 location_t, via the gimple stmt.
11675 * coverage.c (get_coverage_counts): Update calls to
11676 dump_printf_loc to pass in dump_location_t rather than a
11678 * doc/optinfo.texi (Dump types): Convert example of
11679 dump_printf_loc from taking "locus" to taking "insn". Update
11680 description of the "_loc" calls to cover dump_location_t.
11681 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11683 (dump_user_location_t::dump_user_location_t): New constructors,
11684 from gimple *stmt and rtx_insn *.
11685 (dump_user_location_t::from_function_decl): New function.
11686 (dump_loc): Make static.
11687 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11688 const dump_location_t &.
11689 (dump_generic_expr_loc): Delete.
11690 (dump_printf_loc): Convert param "loc" from location_t to
11691 const dump_location_t &.
11692 (selftest::test_impl_location): New function.
11693 (selftest::dumpfile_c_tests): New function.
11694 * dumpfile.h: Include "profile-count.h".
11695 (class dump_user_location_t): New class.
11696 (struct dump_impl_location_t): New struct.
11697 (class dump_location_t): New class.
11698 (dump_printf_loc): Convert 2nd param from source_location to
11699 const dump_location_t &.
11700 (dump_generic_expr_loc): Delete.
11701 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11702 const dump_location_t &.
11703 * gimple-fold.c (fold_gimple_assign): Update call to
11704 dump_printf_loc to pass in a dump_location_t rather than a
11705 location_t, via the gimple stmt.
11706 (gimple_fold_call): Likewise.
11707 * gimple-loop-interchange.cc
11708 (loop_cand::analyze_iloop_reduction_var): Update for change to
11709 check_reduction_path.
11710 (tree_loop_interchange::interchange): Update for change to
11711 find_loop_location.
11712 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11713 change in return-type of find_loop_location.
11714 (graphite_regenerate_ast_isl): Likewise.
11715 * graphite-optimize-isl.c (optimize_isl): Likewise.
11716 * graphite.c (graphite_transform_loops): Likewise.
11717 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11718 pass in a dump_location_t rather than a location_t, via the
11720 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11721 * ipa.c (walk_polymorphic_call_targets): Likewise.
11722 * loop-unroll.c (report_unroll): Convert "locus" param from
11723 location_t to dump_location_t.
11724 (decide_unrolling): Update for change to get_loop_location's
11726 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11727 location_t to dump_user_location_t.
11728 (grid_find_single_omp_among_assignments_1): Updates calls to
11729 dump_printf_loc to pass in a dump_location_t rather than a
11730 location_t, via the gimple stmt.
11731 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11732 location_t to dump_location_t. Updates calls to dump_printf_loc
11733 to pass in a dump_location_t rather than a location_t, via the
11735 (grid_inner_loop_gridifiable_p): Likewise.
11736 (grid_dist_follows_simple_pattern): Likewise.
11737 (grid_gfor_follows_tiling_pattern): Likewise.
11738 (grid_target_follows_gridifiable_pattern): Likewise.
11739 (grid_attempt_target_gridification): Convert initialization
11740 of local "grid" from memset to zero-initialization; FIXME: does
11741 this require C++11? Update call to dump_printf_loc to pass in a
11742 optinfo_location rather than a location_t, via the gimple stmt.
11743 * profile.c (read_profile_edge_counts): Updates call to
11744 dump_printf_loc to pass in a dump_location_t rather than a
11746 (compute_branch_probabilities): Likewise.
11747 * selftest-run-tests.c (selftest::run_tests): Call
11749 * selftest.h (dumpfile_c_tests): New decl.
11750 * tree-loop-distribution.c (pass_loop_distribution::execute):
11751 Update for change in return type of find_loop_location.
11752 * tree-parloops.c (parallelize_loops): Likewise.
11753 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11754 "locus" from location_t to dump_user_location_t.
11755 (canonicalize_loop_induction_variables): Likewise.
11756 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11757 for change in return type of find_loop_location.
11758 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11759 to dump_printf_loc to pass in a dump_location_t rather than a
11760 location_t, via the stmt.
11761 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11763 * tree-vect-loop-manip.c (find_loop_location): Convert return
11764 type from source_location to dump_user_location_t.
11765 (vect_do_peeling): Update for above change.
11766 (vect_loop_versioning): Update for change in type of
11768 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11769 from location_t to dump_user_location_t.
11770 (vect_estimate_min_profitable_iters): Update for change in type
11772 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11773 location_t to dump_location_t.
11774 (vect_slp_bb): Update for change in type of vect_location.
11775 * tree-vectorizer.c (vect_location): Convert from source_location
11776 to dump_user_location_t.
11777 (try_vectorize_loop_1): Update for change in vect_location's type.
11778 (vectorize_loops): Likewise.
11779 (increase_alignment): Likewise.
11780 * tree-vectorizer.h (vect_location): Convert from source_location
11781 to dump_user_location_t.
11782 (find_loop_location): Convert return type from source_location to
11783 dump_user_location_t.
11784 (check_reduction_path): Convert 1st param from location_t to
11785 dump_user_location_t.
11786 * value-prof.c (check_counter): Update call to dump_printf_loc to
11787 pass in a dump_user_location_t rather than a location_t; update
11788 call to error_at for change in type of "locus".
11789 (check_ic_target): Update call to dump_printf_loc to
11790 pass in a dump_user_location_t rather than a location_t, via the
11793 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11795 * config/s390/s390.h (enum processor_flags): Do not use
11796 default tune parameter when -march was specified.
11798 2018-06-26 Jakub Jelinek <jakub@redhat.com>
11801 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11802 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11805 2018-06-26 Richard Biener <rguenther@suse.de>
11807 PR tree-optimization/86287
11809 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11810 (vect_analyze_loop): Initialize n_stmts.
11812 2018-06-26 Richard Biener <rguenther@suse.de>
11814 PR middle-end/86271
11815 * fold-const.c (fold_convertible_p): Pointer extension
11818 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
11821 * dwarf2out.c (loc_list_has_views): Adjust comments.
11822 (dw_loc_list): Split single cross-partition range with
11825 2018-06-25 Jeff Law <law@redhat.com>
11827 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11828 on -mbig-switch by default.
11830 * config/v850/predicates.md (const_float_1_operand): Fix match_code
11832 (const_float_0_operand): Remove unused predicate.
11833 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11834 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11835 (recipsf2): New expander. Original pattern now called
11837 (recipdf2, recipdf2_insn): Similarly.
11838 (rsqrtsf2, rsqrtsf2_insn): Similarly
11839 (rsqrtdf2, rsqrtdf2_insn): Similarly
11841 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
11843 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11844 Simplify logic for FreeBSD (twice).
11846 2018-06-25 Martin Sebor <msebor@redhat.com>
11848 PR tree-optimization/86204
11849 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11850 a strnlen result if it's less than the length of the string.
11852 2018-06-25 Martin Sebor <msebor@redhat.com>
11854 PR tree-optimization/85700
11855 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11856 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11857 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11859 2018-06-25 Martin Sebor <msebor@redhat.com>
11861 * doc/extend.texi (Zero-length arrays): Update and clarify.
11863 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
11865 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11866 added IEEE/IBM long double multilib support on PowerPC little
11867 endian Linux systems.
11868 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11869 (MULTILIB_DEFAULTS): Likewise.
11870 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11872 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11873 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11874 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11876 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
11878 PR middle-end/86311
11879 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11880 (REORDER_45): Likewise.
11882 2018-06-25 Jeff Law <law@redhat.com>
11884 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11885 dividend to 32 bits. Adjust length.
11886 (udivmodhi4): Cleanup output template. Fix length.
11888 2018-06-25 Carl Love <cel@us.ibm.com>
11890 * config/rs6000/vsx.md: Change word selector to prefered location.
11892 2018-06-25 Richard Biener <rguenther@suse.de>
11894 PR tree-optimization/86304
11895 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11896 epilogue-if-converted loops as well.
11898 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
11900 * lto-section-out.c (lto_begin_section): Do not print section
11901 name for noaddr and unnumbered dumps.
11903 2018-06-25 Richard Biener <rguenther@suse.de>
11905 * tree-vectorizer.h (struct vec_info_shared): New structure
11906 with parts split out from struct vec_info and loop_nest from
11907 struct _loop_vec_info.
11908 (struct vec_info): Adjust accordingly.
11909 (struct _loop_vec_info): Likewise.
11910 (LOOP_VINFO_LOOP_NEST): Adjust.
11911 (LOOP_VINFO_DATAREFS): Likewise.
11912 (LOOP_VINFO_DDRS): Likewise.
11913 (struct _bb_vec_info): Likewise.
11914 (BB_VINFO_DATAREFS): Likewise.
11915 (BB_VINFO_DDRS): Likewise.
11916 (struct _stmt_vec_info): Add dr_aux member.
11917 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11918 (DR_MISALIGNMENT_UNINITIALIZED): New.
11919 (set_dr_misalignment): Adjust.
11920 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11921 (vect_analyze_loop): Adjust prototype.
11922 (vect_analyze_loop_form): Likewise.
11923 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11924 Compute dependences lazily.
11925 (vect_record_base_alignments): Use shared datarefs/ddrs.
11926 (vect_verify_datarefs_alignment): Likewise.
11927 (vect_analyze_data_refs_alignment): Likewise.
11928 (vect_analyze_data_ref_accesses): Likewise.
11929 (vect_analyze_data_refs): Likewise.
11930 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11931 constructor parameter for shared part.
11932 (vect_analyze_loop_form): Pass in shared part and adjust.
11933 (vect_analyze_loop_2): Pass in storage for the number of
11934 stmts. Move loop nest finding to the caller. Compute
11936 (vect_analyze_loop): Pass in shared part.
11937 (vect_transform_loop): Verify shared datarefs are unchanged.
11938 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11939 constructor parameter for shared part.
11940 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11941 (vect_slp_bb): Verify shared datarefs are unchanged before
11943 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11945 (new_stmt_vec_info): Initialize DR_AUX misalignment to
11946 DR_MISALIGNMENT_UNINITIALIZED.
11947 * tree-vectorizer.c (vec_info::vec_info): Add constructor
11948 parameter for shared part.
11949 (vec_info::~vec_info): Adjust.
11950 (vec_info_shared::vec_info_shared): New.
11951 (vec_info_shared::~vec_info_shared): Likewise.
11952 (vec_info_shared::save_datarefs): Likewise.
11953 (vec_info_shared::check_datarefs): Likewise.
11954 (try_vectorize_loop_1): Construct shared part live for analyses
11955 of a single loop for multiple vector sizes.
11956 * tree-parloops.c (gather_scalar_reductions): Adjust.
11958 2018-06-25 Richard Biener <rguenther@suse.de>
11960 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11961 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11962 (vect_analyze_data_refs): Remove similar code from here and
11963 simplify accordingly.
11965 2018-06-25 Richard Biener <rguenther@suse.de>
11967 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11968 for reverse storage order accesses rather than asserting
11969 they cannot happen here.
11971 2018-06-25 Tom de Vries <tdevries@suse.de>
11974 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11975 Use data16 instead of .byte for insn prefix.
11977 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
11980 * parser.c (make_char_string_pack): Pass this literal chars
11981 through cpp_interpret_string.
11982 (cp_parser_userdef_numeric_literal): Check the result of
11983 make_char_string_pack.
11985 2018-06-24 Maya Rashish <coypu@sdf.org>
11987 * ginclude/stddef.h: Simplify conditions around avoiding
11988 re-definition of __size_t.
11990 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
11992 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11993 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11995 2018-06-22 Maya Rashish <coypu@sdf.org>
11997 * doc/invoke.texi (mno-fancy-math-387): Update for changes
11998 made to OpenBSD and NetBSD through the years.
12000 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12002 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12003 behavior of vec_pack (vector double, vector double) to match
12004 behavior of vec_float2 (vector double, vector double).
12006 2018-06-22 Olivier Hainque <hainque@adacore.com>
12008 * gimplify.c (gimplify_function_tree): Prevent creation
12009 of a trampoline for the address of the current function
12010 passed to entry/exit instrumentation hooks.
12012 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12015 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12018 2018-06-22 Martin Liska <mliska@suse.cz>
12020 PR tree-optimization/86263
12021 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12022 Bail out if is_enabled is false.
12023 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12025 (jump_table_cluster::is_enabled): New function.
12027 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12029 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12030 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12031 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12032 (lto_input_ts_binfo_tree_pointers): Likewise.
12033 * tree-streamer-out.c (streamer_write_tree_bitfields,
12034 write_ts_binfo_tree_pointers): Likewise.
12035 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12037 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12039 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12041 2018-06-22 Martin Liska <mliska@suse.cz>
12043 * symbol-summary.h (get): Make it pure and inline move
12044 functionality from ::get function.
12045 (get): Remove and inline into ::get and ::get_create.
12046 (get_create): Move code from ::get function.
12048 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12051 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12052 -x assembler-with-cpp.
12054 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12056 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12057 _FILE_OFFSET_BITS=64 for C++.
12059 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12061 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12062 conversion insn that shows up when pr85657-3.c is compiled using
12063 IEEE 128-bit long double.
12064 (neg<mode>2_internal): Use the correct mode to check whether the
12065 mode is IBM extended.
12066 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12067 multiply and divide external functions from being created more
12070 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12072 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12074 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12075 the edge can be forwarded.
12076 (cfg_layout_merge_blocks): Likewise.
12078 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12080 * except.c (finish_eh_generation): Commit edge insertions only after
12081 the EH edges have been redirected from post-landing to landing pads.
12083 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12085 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12086 create_tmp_var_for to create the FRAME decl.
12087 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12089 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12091 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12092 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12093 debug statement when resetting its value.
12094 (expand_call_inline): Copy the locus of the call onto the assignment
12095 of the return value, if any. Use local variable in more cases.
12097 2018-06-21 Martin Liska <mliska@suse.cz>
12099 * ipa-pure-const.c (propagate_nothrow): Use
12100 funct_state_summaries->get.
12101 (dump_malloc_lattice): Likewise.
12102 (propagate_malloc): Likewise.
12104 2018-06-21 Richard Biener <rguenther@suse.de>
12106 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12107 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12108 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12110 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12111 BLOCK_ABSTRACT_ORIGIN unconditionally.
12113 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12115 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12117 * ipa-reference.c (ipa_reference_c_finalize): Delete
12118 ipa_ref_opt_sum_summaries and set it to NULL.
12120 2018-06-21 Tom de Vries <tdevries@suse.de>
12122 PR tree-optimization/85859
12123 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12124 test with comment from bb_no_side_effects_p.
12126 2018-06-21 Richard Biener <rguenther@suse.de>
12128 PR tree-optimization/86232
12129 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12130 max for constant niter.
12132 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12134 * config/aarch64/aarch64-simd.md
12135 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12137 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12139 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12140 Make opernads of the unspec commutative.
12142 2018-06-21 Richard Biener <rguenther@suse.de>
12144 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12145 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12146 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12147 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12149 (vect_record_base_alignments): Do not record base alignment
12150 for gathers or scatters.
12151 (vect_compute_data_ref_alignment): Drop return value that is always
12152 true. Bail out early for gathers or scatters.
12153 (vect_enhance_data_refs_alignment): Bail out early for gathers
12155 (vect_find_same_alignment_drs): Likewise.
12156 (vect_analyze_data_refs_alignment): Remove dead code.
12157 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12158 (vect_analyze_data_refs): For possible gathers or scatters do
12159 not create an alternate DR, just check their possible validity
12160 and mark them. Adjust DECL_NONALIASED handling to not rely
12161 on DR_BASE_ADDRESS.
12162 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12163 update inits of gathers or scatters.
12164 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12165 Also copy gather/scatter flag to pattern vinfo.
12167 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12169 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12170 behavior of vec_packsu (vector unsigned long long, vector unsigned
12171 long long) to match behavior of vec_packs with same signature.
12173 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12174 Thomas Schwinge <thomas@codesourcery.com>
12175 Cesar Philippidis <cesar@codesourcery.com>
12177 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12178 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12179 (gimplify_adjust_omp_clauses): Likewise.
12180 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12181 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12182 (gimplify_omp_target_update): Update handling of acc update and
12184 * omp-low.c (install_var_field): Remove unused parameter
12185 base_pointers_restrict.
12186 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12187 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12189 (omp_target_base_pointers_restrict_p): Delete.
12190 (scan_omp_target): Update call to scan_sharing_clauses.
12191 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12193 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12194 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12195 (convert_local_omp_clauses): Likewise.
12196 * tree-pretty-print.c (dump_omp_clause): Likewise.
12197 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12199 (omp_clause_code_name): Likewise.
12201 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12204 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12207 PR tree-optimization/86231
12208 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12209 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12211 2018-06-20 Tom de Vries <tdevries@suse.de>
12213 PR tree-optimization/86097
12214 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12215 iv type if signedness of iv type is not the same as that of *nit.
12217 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12219 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12220 EDGE_EH edges, verify they are all EDGE_EH.
12222 2018-06-20 Maya Rashish <coypu@sdf.org>
12224 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12226 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12228 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12229 * config/aarch64/aarch64.c (xgene1_tunings): Add
12230 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12231 (aarch64_mode_valid_for_sched_fusion_p):
12232 Allow 16-byte modes.
12233 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12234 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12236 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12238 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12239 * config/aarch64/iterators.md (VQ2): New mode iterator.
12241 2018-06-20 Martin Liska <mliska@suse.cz>
12243 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12244 Change default ratio from 10 to 8.
12246 2018-06-20 Martin Liska <mliska@suse.cz>
12248 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12250 (bit_test_cluster::find_bit_tests): Likewise.
12251 (switch_decision_tree::analyze_switch_statement): Find clusters.
12252 * tree-switch-conversion.h (struct jump_table_cluster): Document
12255 2018-06-20 Martin Liska <mliska@suse.cz>
12257 * tree-switch-conversion.c (switch_conversion::collect):
12258 Record m_uniq property.
12259 (switch_conversion::expand): Bail out for special conditions.
12260 (group_cluster::~group_cluster): New.
12261 (group_cluster::group_cluster): Likewise.
12262 (group_cluster::dump): Likewise.
12263 (jump_table_cluster::emit): New.
12264 (switch_decision_tree::fix_phi_operands_for_edges): New.
12265 (struct case_node): Remove struct.
12266 (jump_table_cluster::can_be_handled): New.
12267 (case_values_threshold): Moved to header.
12268 (reset_out_edges_aux): Likewise.
12269 (jump_table_cluster::is_beneficial): New.
12270 (bit_test_cluster::can_be_handled): Likewise.
12271 (add_case_node): Remove.
12272 (bit_test_cluster::is_beneficial): New.
12273 (case_bit_test::cmp): New.
12274 (bit_test_cluster::emit): New.
12275 (expand_switch_as_decision_tree_p): Remove.
12276 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12277 (fix_phi_operands_for_edge): Likewise.
12278 (switch_decision_tree::analyze_switch_statement): New.
12279 (compute_cases_per_edge): Move ...
12280 (switch_decision_tree::compute_cases_per_edge): ... here.
12281 (try_switch_expansion): Likewise.
12282 (switch_decision_tree::try_switch_expansion): Likewise.
12283 (record_phi_operand_mapping): Likewise.
12284 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12285 (emit_case_decision_tree): Likewise.
12286 (switch_decision_tree::emit): Likewise.
12287 (balance_case_nodes): Likewise.
12288 (switch_decision_tree::balance_case_nodes): Likewise.
12289 (dump_case_nodes): Likewise.
12290 (switch_decision_tree::dump_case_nodes): Likewise.
12291 (emit_jump): Likewise.
12292 (switch_decision_tree::emit_jump): Likewise.
12293 (emit_cmp_and_jump_insns): Likewise.
12294 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12295 (emit_case_nodes): Likewise.
12296 (switch_decision_tree::emit_case_nodes): Likewise.
12297 (conditional_probability): Remove.
12298 * tree-switch-conversion.h (enum cluster_type): New.
12300 (struct cluster): Likewise.
12301 (cluster::cluster): Likewise.
12302 (struct simple_cluster): Likewise.
12303 (simple_cluster::simple_cluster): Likewise.
12304 (struct group_cluster): Likewise.
12305 (struct jump_table_cluster): Likewise.
12306 (struct bit_test_cluster): Likewise.
12307 (struct min_cluster_item): Likewise.
12308 (struct case_tree_node): Likewise.
12309 (case_tree_node::case_tree_node): Likewise.
12310 (jump_table_cluster::case_values_threshold): Likewise.
12311 (struct case_bit_test): Likewise.
12312 (struct switch_decision_tree): Likewise.
12313 (struct switch_conversion): Likewise.
12314 (switch_decision_tree::reset_out_edges_aux): Likewise.
12316 2018-06-20 Martin Liska <mliska@suse.cz>
12318 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12319 (hoist_edge_and_branch_if_true): Likewise.
12320 (expand_switch_using_bit_tests_p): Likewise.
12321 (struct case_bit_test): Likewise.
12322 (case_bit_test_cmp): Likewise.
12323 (emit_case_bit_tests): Likewise.
12324 (switch_conversion::switch_conversion): New class.
12325 (struct switch_conv_info): Remove old struct.
12326 (collect_switch_conv_info): More to ...
12327 (switch_conversion::collect): ... this.
12328 (check_range): Likewise.
12329 (switch_conversion::check_range): Likewise.
12330 (check_all_empty_except_final): Likewise.
12331 (switch_conversion::check_all_empty_except_final): Likewise.
12332 (check_final_bb): Likewise.
12333 (switch_conversion::check_final_bb): Likewise.
12334 (create_temp_arrays): Likewise.
12335 (switch_conversion::create_temp_arrays): Likewise.
12336 (free_temp_arrays): Likewise.
12337 (gather_default_values): Likewise.
12338 (switch_conversion::gather_default_values): Likewise.
12339 (build_constructors): Likewise.
12340 (switch_conversion::build_constructors): Likewise.
12341 (constructor_contains_same_values_p): Likewise.
12342 (switch_conversion::contains_same_values_p): Likewise.
12343 (array_value_type): Likewise.
12344 (switch_conversion::array_value_type): Likewise.
12345 (build_one_array): Likewise.
12346 (switch_conversion::build_one_array): Likewise.
12347 (build_arrays): Likewise.
12348 (switch_conversion::build_arrays): Likewise.
12349 (gen_def_assigns): Likewise.
12350 (switch_conversion::gen_def_assigns): Likewise.
12351 (prune_bbs): Likewise.
12352 (switch_conversion::prune_bbs): Likewise.
12353 (fix_phi_nodes): Likewise.
12354 (switch_conversion::fix_phi_nodes): Likewise.
12355 (gen_inbound_check): Likewise.
12356 (switch_conversion::gen_inbound_check): Likewise.
12357 (process_switch): Use the newly created class.
12358 (switch_conversion::expand): New.
12359 (switch_conversion::~switch_conversion): New.
12360 * tree-switch-conversion.h: New file.
12362 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12364 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12365 tree-vect-patterns.c.
12366 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12367 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12368 (vect_recog_sad_pattern): Likewise.
12369 (vect_recog_widen_sum_pattern): Likewise.
12370 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12371 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12372 (vect_recog_rotate_pattern): Likewise.
12373 (vect_recog_mult_pattern): Likewise.
12374 (vect_recog_vector_vector_shift_pattern): Likewise.
12375 (vect_recog_divmod_pattern): Likewise.
12376 (vect_recog_mixed_size_cond_pattern): Likewise.
12377 (vect_recog_bool_pattern): Likewise.
12378 (vect_recog_mask_conversion_pattern): Likewise.
12379 (vect_try_gather_scatter_pattern): Likewise.
12380 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12381 (vect_recog_over_widening_pattern): Likewise.
12382 (vect_recog_gather_scatter_pattern): Likewise.
12383 (vect_recog_func_ptr): Move from tree-vectorizer.h
12384 (vect_vect_recog_func_ptrs): Move further down the file.
12385 (vect_recog_func): Likewise. Remove the third argument.
12386 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12387 (vect_pattern_recog_1): Expect the pattern function to do any
12388 necessary target tests. Also expect it to provide a vector type.
12389 Remove the type_in handling.
12391 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12393 * tree-vect-patterns.c (vect_pattern_detected): New function.
12394 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12395 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12396 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12397 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12398 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12399 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12400 (vect_recog_mask_conversion_pattern)
12401 (vect_try_gather_scatter_pattern): Likewise.
12403 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12405 * tree-vect-patterns.c (vect_get_internal_def): New function.
12406 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12407 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12408 (search_type_for_mask_1): Use it.
12410 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12412 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12413 redundant WIDEN_SUM_EXPR handling.
12414 (vect_recog_sad_pattern): Likewise.
12416 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12418 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12419 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12420 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12421 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12422 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12424 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12426 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12427 use the stmt_vec_info of the original bb statement for the
12428 new zero assignment, even if the call is part of a pattern.
12430 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12432 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12433 that the sequence is attached to the original statement rather
12434 than the pattern statement.
12435 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12436 PATTERN_DEF_SEQ from the original statement rather than
12437 the main pattern statement.
12438 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12439 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12440 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12442 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12444 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12445 definition statements before the early exit for statements that aren't
12447 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12449 (vect_transform_loop): ...here. Process pattern definition
12450 statements without first checking whether the main pattern
12451 statement is live or relevant.
12453 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12455 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12456 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12458 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12460 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12461 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12462 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12463 (expand_block_compare): Change select_block_compare_mode call.
12464 (expand_strncmp_align_check): Use new functions, fix comment.
12465 (emit_final_str_compare_gpr): New function.
12466 (expand_strn_compare): Refactor and clean up code.
12467 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12469 2018-06-19 Tony Reix <tony.reix@atos.com>
12470 Damien Bergamini <damien.bergamini@atos.com>
12471 David Edelsohn <dje.gcc@gmail.com>
12473 * collect2.c (static_obj): New variable.
12474 (static_libs): New variable.
12475 (is_in_list): Uncomment declaration.
12476 (main): Track AIX libraries linked statically.
12477 (is_in_list): Uncomment definition.
12478 (scan_prog_file): Don't add AIX shared libraries initializer
12479 to constructor list if linking statically.
12481 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12483 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12485 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12487 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12489 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12492 2018-06-19 Martin Liska <mliska@suse.cz>
12494 * config/i386/i386.c (ix86_can_inline_p): Do not use
12495 ipa_fn_summaries::get_create.
12496 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12498 (devirtualization_time_bonus): Likewise.
12499 (ipcp_propagate_stage): Likewise.
12500 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12501 (edge_set_predicate): Likewise.
12502 (evaluate_conditions_for_known_args): Likewise.
12503 (evaluate_properties_for_edge): Likewise.
12504 (ipa_call_summary::reset): Tranform to ...
12505 (ipa_call_summary::~ipa_call_summary): ... this.
12506 (ipa_fn_summary::reset): Transform to ...
12507 (ipa_fn_summary::~ipa_fn_summary): ... this.
12508 (ipa_fn_summary_t::remove): Rename to ...
12509 (ipa_fn_summary_t::remove_callees): ... this.
12510 (ipa_fn_summary_t::duplicate): Use placement new
12511 instead of memory copy.
12512 (ipa_call_summary_t::duplicate): Likewise.
12513 (ipa_call_summary_t::remove): Remove.
12514 (dump_ipa_call_summary): Change get_create to get.
12515 (ipa_dump_fn_summary): Dump only when summary exists.
12516 (analyze_function_body): Use symbol_summary::get instead
12518 (compute_fn_summary): Likewise.
12519 (estimate_edge_devirt_benefit): Likewise.
12520 (estimate_edge_size_and_time): Likewise.
12521 (inline_update_callee_summaries): Likewise.
12522 (remap_edge_change_prob): Likewise.
12523 (remap_edge_summaries): Likewise.
12524 (ipa_merge_fn_summary_after_inlining): Likewise.
12525 (write_ipa_call_summary): Likewise.
12526 (ipa_fn_summary_write): Likewise.
12527 (ipa_free_fn_summary): Likewise.
12528 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12529 (struct ipa_call_summary): Likewise.
12530 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12532 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12533 (estimate_size_after_inlining): Likewise.
12534 (estimate_growth): Likewise.
12535 (growth_likely_positive): Likewise.
12536 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12537 (inline_call): Likewise.
12538 * ipa-inline.c (caller_growth_limits): Likewise.
12539 (can_inline_edge_p): Likewise.
12540 (can_inline_edge_by_limits_p): Likewise.
12541 (compute_uninlined_call_time): Likewise.
12542 (compute_inlined_call_time): Likewise.
12543 (want_inline_small_function_p): Likewise.
12544 (edge_badness): Likewise.
12545 (update_caller_keys): Likewise.
12546 (update_callee_keys): Likewise.
12547 (inline_small_functions): Likewise.
12548 (inline_to_all_callers_1): Likewise.
12549 (dump_overall_stats): Likewise.
12550 (early_inline_small_functions): Likewise.
12551 (early_inliner): Likewise.
12552 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12553 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12554 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12555 * ipa-split.c (execute_split_functions): Likewise.
12556 * symbol-summary.h: Likewise.
12557 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12559 2018-06-19 Richard Biener <rguenther@suse.de>
12561 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12562 (vectorize_loops): ... here. Fix dbgcnt handling.
12563 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12565 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12568 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12569 ieee128 argument takes up only one (vector) register, not two (floating
12572 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12574 * gimplify.c (gimplify_init_constructor): Really never clear for an
12575 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12577 2018-06-19 Richard Biener <rguenther@suse.de>
12579 PR tree-optimization/86179
12580 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12581 after failed recognition.
12583 2018-06-18 Martin Sebor <msebor@redhat.com>
12585 PR middle-end/85602
12586 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12587 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12588 Handle integer subtraction.
12589 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12590 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12592 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12594 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12595 param from rtx to rtx_insn *.
12596 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12598 (frv_ifcvt_modify_insn): Likwise.
12599 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12600 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12601 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12602 as_a <rtx_insn *> cast to local "unprotected_region" once
12603 it's been established that it's not NULL or pc_rtx.
12604 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12605 param "sethi" from rtx to rtx_insn *.
12606 (nds32_group_float_insns): Likewise for param "insn".
12607 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12609 (vax_output_int_subtract): Likewise.
12610 * config/vax/vax.c (vax_output_int_add): Likewise for param
12612 (vax_output_int_subtract): Likewise.
12613 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12614 (emit_pattern_after): Likewise for param "after".
12615 (emit_insn_after): Likewise.
12616 (emit_jump_insn_after): Likewise.
12617 (emit_call_insn_after): Likewise.
12618 (emit_debug_insn_after): Likewise.
12619 (emit_pattern_before): Likewise for param "before".
12620 (emit_insn_before): Likewise.
12621 (emit_jump_insn_before): Likewise.
12622 * final.c (get_insn_template): Likewise for param "insn", removing
12624 * output.h (get_insn_template): Likewise for 2nd param.
12625 * rtl.h (emit_insn_before): Likewise.
12626 (emit_jump_insn_before): Likewise.
12627 (emit_debug_insn_before_noloc): Likewise.
12628 (emit_insn_after): Likewise.
12629 (emit_jump_insn_after): Likewise.
12630 (emit_call_insn_after): Likewise.
12631 (emit_debug_insn_after): Likewise.
12632 (set_insn_deleted): Likewise for param.
12634 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12637 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12638 floating point modes, so that IFmode is numerically greater than
12639 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12640 to declare the ordering. This prevents IFmode from being
12641 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12642 machine. Include rs6000-modes.h to share the fractional values
12643 between genmodes* and the rest of the compiler.
12644 (IFmode): Likewise.
12645 (KFmode): Likewise.
12646 (TFmode): Likewise.
12647 * config/rs6000/rs6000-modes.h: New file.
12648 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12649 meaning of rs6000_long_double_size so that 126..128 selects an
12650 appropriate 128-bit floating point type.
12651 (rs6000_option_override_internal): Likewise.
12652 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12653 (TARGET_LONG_DOUBLE_128): Change the meaning of
12654 rs6000_long_double_size so that 126..128 selects an appropriate
12655 128-bit floating point type.
12656 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12657 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12658 source and destination to match the standard usage.
12659 (truncifkf2): Likewise.
12660 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12661 ISA 2.07 to use an explicit clobber, instead of passing in a
12663 (copysign<mode>3_soft): Likewise.
12665 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12667 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12668 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12669 (vect_slp_analyze_instance_dependence): Likewise.
12670 (vect_enhance_data_refs_alignment): Likewise.
12671 (vect_analyze_data_refs_alignment): Likewise.
12672 (vect_slp_analyze_and_verify_instance_alignment
12673 (vect_analyze_data_ref_accesses): Likewise.
12674 (vect_prune_runtime_alias_test_list): Likewise.
12675 (vect_analyze_data_refs): Likewise.
12676 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12677 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12678 (vect_analyze_scalar_cycles_1): Likewise.
12679 (vect_get_loop_niters): Likewise.
12680 (vect_analyze_loop_form_1): Likewise.
12681 (vect_update_vf_for_slp): Likewise.
12682 (vect_analyze_loop_operations): Likewise.
12683 (vect_analyze_loop): Likewise.
12684 (vectorizable_induction): Likewise.
12685 (vect_transform_loop): Likewise.
12686 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12687 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12688 (vect_make_slp_decision): Likewise.
12689 (vect_detect_hybrid_slp): Likewise.
12690 (vect_slp_analyze_operations): Likewise.
12691 (vect_slp_bb): Likewise.
12692 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12693 (vectorizable_bswap): Likewise.
12694 (vectorizable_call): Likewise.
12695 (vectorizable_simd_clone_call): Likewise.
12696 (vectorizable_conversion): Likewise.
12697 (vectorizable_assignment): Likewise.
12698 (vectorizable_shift): Likewise.
12699 (vectorizable_operation): Likewise.
12700 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12702 2018-06-18 Martin Sebor <msebor@redhat.com>
12704 PR tree-optimization/81384
12705 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12706 * builtins.c (expand_builtin_strnlen): New function.
12707 (expand_builtin): Call it.
12708 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12709 * builtins.def (BUILT_IN_STRNLEN): New.
12710 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12711 Warn for bounds in excess of maximum object size.
12712 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12713 single-value ranges. Handle strnlen.
12714 (handle_builtin_strlen): Handle strnlen.
12715 (strlen_check_and_optimize_stmt): Same.
12716 * doc/extend.texi (Other Builtins): Document strnlen.
12718 2018-06-18 Maya Rashish <coypu@sdf.org>
12720 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12721 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12722 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12724 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12726 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12728 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12730 * tree.c (escaped_string::escape): Replace cast to char * by
12731 const_cast<char *> (unescaped).
12733 2018-06-18 Nick Clifton <nickc@redhat.com>
12736 * tree.c (escaped_string): New class. Converts an unescaped
12737 string into its escaped equivalent.
12738 (warn_deprecated_use): Use the new class to convert the
12739 deprecation message, if present.
12740 (test_escaped_strings): New self test.
12741 (test_c_tests): Add test_escaped_strings.
12742 * doc/extend.texi (deprecated): Add a note that the
12743 deprecation message is affected by the -fmessage-length
12744 option, and that control characters will be escaped.
12745 (#pragma GCC error): Document this pragma.
12746 (#pragma GCC warning): Likewise.
12747 * doc/invoke.texi (-fmessage-length): Document this option's
12748 effect on the #warning and #error preprocessor directives and
12749 the deprecated attribute.
12751 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12753 * tree.c (decl_value_expr_lookup): Revert latest change.
12754 (decl_value_expr_insert): Likewise.
12756 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12758 * gimplify.c (nonlocal_vlas): Delete.
12759 (nonlocal_vla_vars): Likewise.
12760 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12762 (gimplify_body): Do not create and destroy nonlocal_vlas.
12763 * tree-nested.c: Include diagnostic.h.
12764 (use_pointer_in_frame): Tweak.
12765 (lookup_field_for_decl): Add assertion and declare the transformation.
12766 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12767 internal error when the reference is in a wrong context. Do not
12768 create a debug decl by default.
12769 (note_nonlocal_block_vlas): Delete.
12770 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12771 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12772 create a debug decl by default.
12773 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12774 call is in a wrong context.
12775 (fixup_vla_decls): New function.
12776 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12777 debug variables were created.
12778 * tree.c (decl_value_expr_lookup): Add checking assertion.
12779 (decl_value_expr_insert): Likewise.
12781 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12783 PR middle-end/82479
12784 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12785 * tree-scalar-evolution.c (interpret_expr): Likewise.
12786 (expression_expensive_p): Likewise.
12787 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12788 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12789 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12790 (ssa_defined_by_minus_one_stmt_p): New.
12792 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12794 PR middle-end/64946
12795 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12796 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12797 * dojump.c (do_jump): Likewise.
12798 * expr.c (expand_expr_real_2): Check operand type's sign.
12799 * fold-const.c (const_unop): Handle ABSU_EXPR.
12800 (fold_abs_const): Likewise.
12801 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12802 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12803 (strip_sign_op_1): Likesise.
12804 * match.pd: Add new pattern to generate ABSU_EXPR.
12805 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12806 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12807 * tree-eh.c (operation_could_trap_helper_p): Likewise.
12808 * tree-inline.c (estimate_operator_cost): Likewise.
12809 * tree-pretty-print.c (dump_generic_node): Likewise.
12810 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12811 * tree.def (ABSU_EXPR): New.
12813 2018-06-16 Jakub Jelinek <jakub@redhat.com>
12815 PR middle-end/86095
12816 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12817 documented as preserved for backward compatibility only.
12818 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12820 PR rtl-optimization/86108
12821 * bb-reorder.c (create_forwarder_block): Renamed to ...
12822 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
12823 jump from new landing pad to the second part.
12824 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12827 2018-06-15 Jakub Jelinek <jakub@redhat.com>
12829 PR middle-end/85878
12830 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12831 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12832 Only call store_expr for halves if the mode is the same.
12834 PR middle-end/86123
12835 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12836 Fix up comment formatting.
12838 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
12840 * typed-splay-tree.h (typed_splay_tree::remove): New function.
12841 (typed_splay_tree::closure,
12842 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12843 (typed_splay_tree::typed_splay_tree,
12844 typed_splay_tree::operator =): Declared private.
12845 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12846 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12847 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12848 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12849 typed_splay_tree::splay_tree_splay,
12850 typed_splay_tree::splay_tree_foreach_helper,
12851 typed_splay_tree::splay_tree_insert,
12852 typed_splay_tree::splay_tree_remove,
12853 typed_splay_tree::splay_tree_lookup,
12854 typed_splay_tree::splay_tree_predecessor,
12855 typed_splay_tree::splay_tree_successor,
12856 typed_splay_tree::splay_tree_min,
12857 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12858 (typed_splay_tree::root, typed_splay_tree::comp,
12859 typed_splay_tree::delete_key,
12860 typed_splay_tree::delete_value): New data members.
12861 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12862 typed_splay_tree::remove.
12864 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
12866 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12867 -mginv and -mno-ginv to the assembler.
12868 * config/mips/mips.opt (-mcrc): New option.
12869 (-mginv): Likewise.
12870 * doc/invoke.text (-mcrc): Document.
12871 (-mginv): Likewise.
12873 2018-06-15 Nick Clifton <nickc@redhat.com>
12876 * tree.c (escaped_string): New class. Converts an unescaped
12877 string into its escaped equivalent.
12878 (warn_deprecated_use): Use the new class to convert the
12879 deprecation message, if present.
12880 (test_escaped_strings): New self test.
12881 (test_c_tests): Add test_escaped_strings.
12882 * doc/extend.texi (deprecated): Add a note that the
12883 deprecation message is affected by the -fmessage-length
12884 option, and that control characters will be escaped.
12885 (#pragma GCC error): Document this pragma.
12886 (#pragma GCC warning): Likewise.
12887 * doc/invoke.texi (-fmessage-length): Document this option's
12888 effect on the #warning and #error preprocessor directives and
12889 the deprecated attribute.
12891 2018-06-15 Richard Biener <rguenther@suse.de>
12893 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12894 here, also noting vector size used.
12895 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
12896 size used in MSG_OPTIMIZED_LOCATIONS dump.
12897 (pass_slp_vectorize::execute): Adjust.
12899 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
12902 * config/arc/arc.c (arc_return_address_register): Fix
12905 2018-06-15 Richard Biener <rguenther@suse.de>
12907 PR middle-end/86159
12908 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12909 leave useless conversion stripping to force_gimple_operand_gsi.
12910 (gimplify_build2): Likewise.
12911 (gimplify_build1): Likewise.
12913 2018-06-15 Richard Biener <rguenther@suse.de>
12915 PR middle-end/86076
12916 * tree-cfg.c (move_stmt_op): unshare invariant addresses
12917 before adjusting their block.
12919 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
12921 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12922 multilibs for *-*-rtems*.
12923 * config/riscv/t-rtems: New file.
12925 2018-06-14 Jakub Jelinek <jakub@redhat.com>
12927 PR middle-end/86122
12928 * match.pd ((A +- CST1) +- CST2): Punt if last resort
12929 unsigned_type_for returns NULL.
12932 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12933 subregs of multi-word pseudos unless the float mode has word size.
12935 2018-06-14 Richard Biener <rguenther@suse.de>
12937 PR middle-end/86139
12938 * tree-vect-generic.c (build_word_mode_vector_type): Remove
12939 duplicate and harmful type_hash_canon.
12940 * tree.c (type_hash_canon): Assert we didn't find ourselves.
12942 2018-06-14 Richard Biener <rguenther@suse.de>
12945 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12948 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
12950 * config/rtems.h (STDINT_LONG32): Define.
12952 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
12953 Prachi Godbole <prachi.godbole@imgtec.com>
12955 * config/mips/mips-cpus.def: Define P6600.
12956 * config/mips/mips-tables.opt: Regenerate.
12957 * config/mips/mips.c (mips_ucbranch_type): New enum.
12958 (mips_rtx_cost_data): Add support for P6600.
12959 (mips_issue_rate): Likewise.
12960 (mips_multipass_dfa_lookahead): Likewise.
12961 (mips_avoid_hazard): Likewise.
12962 (mips_reorg_process_insns): Likewise.
12963 (mips_classify_branch_p6600): New function.
12964 * config/mips/mips.h (TUNE_P6600): New define.
12965 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12966 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12967 * config/mips/mips.md: Include p6600.md.
12968 (processor): Add p6600.
12969 * config/mips/p6600.md: New file.
12970 * doc/invoke.texi: Add p6600 to supported architectures.
12972 2018-06-13 Martin Sebor <msebor@redhat.com>
12974 PR tree-optimization/86114
12975 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12977 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12979 2018-06-13 Richard Biener <rguenther@suse.de>
12981 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12982 Properly set vector type of the intermediate stmt.
12983 * tree-vect-stmts.c (vectorizable_operation): The destination
12984 var always has vectype_out type.
12986 2018-06-13 Jeff Law <law@redhat.com>
12988 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12989 integer 0 for argument to print_rtl_with_bb.
12990 (rl78_reorg): Likewise.
12992 2018-06-13 David Malcolm <dmalcolm@redhat.com>
12994 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12995 from rtx to rtx_insn *.
12996 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12998 (add_sched_insns_for_speculation): Likewise for local "target",
12999 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13000 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13001 from rtx_insn ** to rtx_code_label **.
13002 (reorg_emit_nops): Likewise.
13003 (c6x_reorg): Likewise for local "call_labels".
13004 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13006 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13007 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13008 the loops over LABEL_REFS.
13009 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13011 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13012 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13013 (split_branches): Strengthen local "olabel" from rtx to
13014 rtx_insn *, adding a safe_as_a cast.
13015 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13017 (add_insn_after): Likewise for first two params.
13018 (add_insn_before): Likewise.
13019 (remove_insn): Likewise for param.
13020 (emit_pattern_before_noloc): Likewise for second and third params.
13021 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13022 (emit_call_insn_before_noloc): Likewise.
13023 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13025 (emit_barrier_before): Likewise.
13026 (emit_label_before): Strengthen "label" param from "rtx" to
13027 "rtx_code_label *". Strengthen "before" param from "rtx" to
13029 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13031 (emit_pattern_after_noloc): Likewise.
13032 (emit_insn_after_noloc): Likewise.
13033 (emit_jump_insn_after_noloc): Likewise.
13034 (emit_call_insn_after_noloc): Likewise.
13035 (emit_debug_insn_after_noloc): Likewise.
13036 (emit_barrier_after): Likewise.
13037 (emit_label_after): Likewise for both params.
13038 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13039 "loc" param from "int" to "location_t".
13040 (emit_insn_after_setloc): Likewise.
13041 (emit_jump_insn_after_setloc): Likewise.
13042 (emit_call_insn_after_setloc): Likewise.
13043 (emit_debug_insn_after_setloc): Likewise.
13044 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13045 "loc" param from "int" to "location_t".
13046 (emit_pattern_before): Convert NULL_RTX to NULL.
13047 (emit_insn_before_setloc): Convert "loc" param from "int" to
13049 (emit_jump_insn_before_setloc): Likewise.
13050 (emit_call_insn_before_setloc): Likewise.
13051 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13052 rtx_insn *. Convert "loc" param from "int" to "location_t".
13053 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13054 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13055 Convert 3rd param from "int" to "location_t".
13056 (emit_barrier_before, emit_barrier_after, next_real_insn):
13057 Strengthen param from rtx to rtx_insn *.
13058 (emit_label_before): Strengthen 1st param from "rtx" to
13059 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13061 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13062 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13063 Strengthen 2nd param from "rtx" to "rtx_insn *".
13064 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13065 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13066 Likewise. Convert 3rd param from "int" to "location_t".
13067 (emit_label_after): Strengthen 1st param from "rtx" to
13068 "rtx_code_label *".
13069 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13071 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13072 from "rtx" to "rtx_insn *".
13074 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13076 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13077 bodies streamed in with -Q.
13078 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13079 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13080 * gimple-streamer-out.c: Include gimple-pretty-print.h
13081 (output_bb): Dump stmts streamed.
13082 * lto-section-out.c: Include print-tree.h
13083 (lto_begin_section): Dump sections created.
13084 (lto_output_decl_index): Dump decl encoded.
13085 * lto-streamer-out.c: Include print-tree.h
13086 (create_output_block): Dump output block created.
13087 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13088 (output_function): Dump function output.
13089 (output_constructor): Dump constructor streamed.
13090 (write_global_stream): Output indexes encoded.
13091 (produce_asm_for_decls): Dump streams encoded.
13092 * lto-streamer.c (streamer_dump_file): New global var.
13093 * lto-streamer.h (streamer_dump_file): Declare.
13094 * passes.c (ipa_write_summaries): Initialize streamer dump.
13095 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13098 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13101 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13102 offsets for register save directives. Emit a second batch of save
13103 directives, if need be, when the function accesses prior frames.
13105 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13107 * config/arc/fpu.md (fmasf4): Force operand to register.
13108 (fnmasf4): Likewise.
13110 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13112 * config/arc/arc-protos.h (arc_pad_return): Remove.
13113 * config/arc/arc.c (machine_function): Remove force_short_suffix
13115 (arc_print_operand): Adjust printing of '&'.
13116 (arc_verify_short): Remove conditional printing of short suffix.
13117 (arc_final_prescan_insn): Remove reference to size_reason.
13118 (pad_return): New function.
13119 (arc_reorg): Call pad_return.
13120 (arc_pad_return): Remove.
13121 (arc_init_machine_status): Remove reference to force_short_suffix.
13122 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13123 (attr length): When attribute iscompact is true force to 2
13124 regardless; in the case of maybe check if we want to force the
13125 instruction to have 4 bytes length.
13126 (nopv): Change it to generate 4 byte long nop as well.
13127 (blockage): New pattern.
13128 (simple_return): Remove call to arc_pad_return.
13129 (p_return_i): Likewise.
13131 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13133 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13135 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13137 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13140 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13142 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13143 for ARC700 and ARCv2.
13145 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13148 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13149 operands[2] instead of operands[1].
13152 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13154 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13155 case, check whether the outer register overlaps an unallocatable
13156 register, not just whether it fits the required class.
13158 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13160 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13162 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13163 (memrefs_conflict_p): Likewise.
13164 (init_alias_analysis): Likewise.
13165 * cfgexpand.c (expand_debug_expr): Likewise.
13166 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13167 * cse.c (fold_rtx): Likewise.
13168 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13169 * expr.c (emit_block_move_hints): Likewise.
13170 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13171 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13172 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13173 (emit_group_store): Likewise.
13174 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13175 to read the PRE/POST_MODIFY increment.
13176 * calls.c (store_one_arg): Use strip_offset.
13177 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13179 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13181 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13182 (simplify_binary_operation_1): Extend CONST_INT handling to
13184 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13185 than a HOST_WIDE_INT.
13186 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13188 (adjust_mems, add_stores): Update accodingly.
13189 (vt_canonicalize_addr): Track polynomial offsets.
13190 (emit_note_insn_var_location): Likewise.
13191 (vt_add_function_parameter): Likewise.
13192 (vt_initialize): Likewise.
13194 2018-06-12 Jeff Law <law@redhat.com>
13196 * config.gcc (alpha*-*-freebsd*): Remove.
13197 * config/alpha/freebsd.h: Remove.
13199 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13202 * spellcheck-tree.c (levenshtein_distance): Rename to...
13203 (get_edit_distance): ...this, and update for underlying renaming.
13204 * spellcheck-tree.h (levenshtein_distance): Rename to...
13205 (get_edit_distance): ...this.
13206 * spellcheck.c (levenshtein_distance): Rename to...
13207 (get_edit_distance): ...this. Convert from Levenshtein distance
13208 to Damerau-Levenshtein distance by supporting transpositions of
13209 adjacent characters. Rename "v1" to "v_next" and "v0" to
13211 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13212 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13213 update for underlying renaming.
13214 (selftest::levenshtein_distance_unit_test): Rename to...
13215 (selftest::test_get_edit_distance_unit): ...this, and update for
13216 underlying renaming.
13217 (selftest::test_find_closest_string): Add example from PR 69968
13218 where transposition helps
13219 (selftest::test_metric_conditions): Update for renaming.
13220 (selftest::test_metric_conditions): Likewise.
13221 (selftest::spellcheck_c_tests): Likewise.
13222 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13223 (get_edit_distance): ...this.
13224 (best_match::consider): Update for renaming.
13226 2018-06-12 Martin Sebor <msebor@redhat.com>
13228 PR tree-optimization/85259
13229 * builtins.c (compute_objsize): Handle constant offsets.
13230 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13231 true iff a warning has been issued.
13232 * gimple.h (gimple_nonartificial_location): New function.
13233 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13234 gimple_nonartificial_location and handle -Wno-system-headers.
13235 (handle_builtin_stxncpy): Same.
13237 2018-06-12 Martin Sebor <msebor@redhat.com>
13240 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13242 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13244 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13245 BUILTIN_VEC_XST entries for pointer to double and long long.
13247 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13250 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13252 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13255 2018-06-12 Martin Liska <mliska@suse.cz>
13257 * doc/options.texi: Document IntegerRange.
13259 2018-06-12 Martin Liska <mliska@suse.cz>
13261 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13262 * opt-functions.awk: Handle Deprecated flag.
13263 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13265 (read_cmdline_option): Report warning for a deprecated option.
13266 * opts.h (struct cl_option): Add new field cl_deprecated.
13267 (CL_ERR_DEPRECATED): New.
13269 2018-06-12 Martin Liska <mliska@suse.cz>
13271 * doc/options.texi: Document Deprecated option flag.
13273 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13275 * config/arc/arc-arch.h (arc_extras): New enum.
13276 (arc_cpu_t):Add field extra.
13277 (arc_cpu_types): Consider the extras.
13278 * config/arc/arc-cpus.def: Add extras info.
13279 * config/arc/arc-opts.h (processor_type): Consider extra field.
13280 * config/arc/arc.c (arc_override_options): Handle extra field.
13282 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13284 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13285 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13287 * config/arc/arc.c (arc_init): Update pic warning.
13288 (irq_range): Update irq range parsing warnings.
13289 (arc_override_options): Update various warning messages.
13290 (arc_handle_aux_attribute): Likewise.
13292 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13294 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13296 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13298 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13299 compiler messages directives.
13301 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13303 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13304 * config/mips/mips-tables.opt: Regenerate.
13305 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13307 * doc/invoke.texi: Document -march=i6500.
13309 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13311 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13312 (i6400_gpmul): Add cpu_unit.
13313 (i6400_gpdiv): Likewise.
13314 (i6400_msa_add_d): Update reservations.
13315 (i6400_msa_int_add) Likewise.
13316 (i6400_msa_short_logic3) Likewise.
13317 (i6400_msa_short_logic2) Likewise.
13318 (i6400_msa_short_logic) Likewise.
13319 (i6400_msa_move) Likewise.
13320 (i6400_msa_cmp) Likewise.
13321 (i6400_msa_short_float2) Likewise.
13322 (i6400_msa_div_d) Likewise.
13323 (i6400_msa_long_logic1) Likewise.
13324 (i6400_msa_long_logic2) Likewise.
13325 (i6400_msa_mult) Likewise.
13326 (i6400_msa_long_float2) Likewise.
13327 (i6400_msa_long_float4) Likewise.
13328 (i6400_msa_long_float5) Likewise.
13329 (i6400_msa_long_float8) Likewise.
13330 (i6400_fpu_fadd): Include frint type.
13331 (i6400_fpu_store): New define_insn_reservation.
13332 (i6400_fpu_load): Likewise.
13333 (i6400_fpu_move): Likewise.
13334 (i6400_fpu_fcmp): Likewise.
13335 (i6400_fpu_fmadd): Likewise.
13336 (i6400_int_mult): Include imul3nc type and update reservation.
13337 (i6400_int_div): Include idiv3 type and update reservation.
13338 (i6400_int_load): Update to check type not move_type.
13339 (i6400_int_store): Likewise.
13340 (i6400_int_prefetch): Set zero latency.
13342 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13344 * gcc.c: Document new %@{...} sequence.
13345 (LINK_COMMAND_SPEC): Use it for the -L switches.
13346 (cpp_unique_options): Use it for the -I switches.
13347 (at_file_argbuf): New global variable.
13348 (in_at_file): Likewise.
13349 (alloc_args): Create at_file_argbuf.
13350 (clear_args): Truncate at_file_argbuf.
13351 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13352 (open_at_file): New function.
13353 (close_at_file): Likewise.
13354 (create_at_file): Delete.
13355 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13358 (validate_switches_from_spec): Deal with %@{...} sequence.
13359 (validate_switches): Likewise.
13360 (driver::finalize): Call clear_args.
13362 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13364 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13366 2018-06-11 Martin Sebor <msebor@redhat.com>
13368 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13369 (Wno-class-memaccess): Add @opindex.
13370 (Wno-templates, Wno-multiple-inheritance): Same.
13371 (Wno-virtual-inheritance, Wno-namespaces): Same.
13372 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13373 (Wno-format-overflow, Wno-format-truncation): Same.
13374 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13375 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13376 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13377 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13378 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13379 (Wno-misspelled-isr): Same.
13381 2018-06-11 Martin Sebor <msebor@redhat.com>
13383 * PR tree-optimization/86083
13384 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13386 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13388 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13390 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13393 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13394 on the correct operand.
13395 (*movdi_internal64): Ditto.
13397 2018-06-11 Martin Liska <mliska@suse.cz>
13399 PR tree-optimization/86089
13400 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13402 2018-06-11 Julia Koval <julia.koval@intel.com>
13404 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13405 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13406 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13408 2018-06-11 Olivier Hainque <hainque@adacore.com>
13410 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13411 for Ada with strict dwarf2.
13413 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13416 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13419 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13421 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13423 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13425 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13428 2018-06-08 Martin Liska <mliska@suse.cz>
13430 * tree-cfg.h (debug_function): Fix argument type to match
13433 2018-06-08 Martin Liska <mliska@suse.cz>
13435 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13436 Remove usage of MPX-related (and removed) fields.
13437 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13439 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13441 * cfg.c (debug): Use TDF_NONE rather than 0.
13442 * cfghooks.c (debug): Likewise.
13443 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13444 (struct dump_option_value_info): Convert to...
13445 (struct kv_pair): ...this template type.
13446 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13448 (optinfo_verbosity_options): Likewise.
13449 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13451 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13452 than int for "optgroup_flags" param.
13453 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13455 (dump_dec): Likewise.
13456 (dump_finish): Use TDF_NONE rather than 0.
13457 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13458 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13459 than 0. Update for change to option_ptr.
13460 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13461 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13462 0. Update for changes to optinfo_verbosity_options and
13464 (opt_info_switch_p): Convert optgroup_flags from int to
13466 (dump_basic_block): Use dump_flags_t rather than int
13467 for "dump_kind" param.
13468 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13469 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13470 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13471 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13472 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13473 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13474 TDF_NONE): Convert from macros to...
13475 (enum dump_flag): ...this new enum.
13476 (dump_flags_t): Update to use enum.
13477 (operator|, operator&, operator~, operator|=, operator&=):
13478 Implement for dump_flags_t.
13479 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13480 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13481 Convert from macros to...
13482 (enum optgroup_flag): ...this new enum.
13483 (optgroup_flags_t): New typedef.
13484 (operator|, operator|=): Implement for optgroup_flags_t.
13485 (struct dump_file_info): Convert field "alt_flags" to
13486 dump_flags_t. Convert field "optgroup_flags" to
13488 (dump_basic_block): Use dump_flags_t rather than int for param.
13489 (dump_generic_expr_loc): Likewise.
13490 (dump_dec): Likewise.
13491 (dump_register): Convert param "optgroup_flags" to
13493 (opt_info_enable_passes): Likewise.
13494 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13496 * gimple-pretty-print.c (debug): Likewise.
13497 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13498 (merged_store_group::apply_stores): Likewise.
13499 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13500 * gimple.c (verify_gimple_pp): Likewise.
13501 * graphite-poly.c (print_pbb_body): Likewise.
13502 * passes.c (pass_manager::register_one_dump_file): Convert
13503 local "optgroup_flags" to optgroup_flags_t.
13504 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13506 (debug_body): Likewise.
13507 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13508 to optgroup_flags_t.
13509 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13511 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13512 (convert_mult_to_fma): Likewise.
13513 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13514 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13515 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13516 "dump_kind" to dump_flags_t.
13518 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13520 * config/rs6000/rs6000.c (min, max): Delete.
13522 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13524 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13525 -mabi=spe and -mabi=no-spe.
13527 2018-06-08 Martin Liska <mliska@suse.cz>
13529 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13530 where we expect an existing summary.
13532 2018-06-08 Martin Liska <mliska@suse.cz>
13534 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13535 * ipa-inline.h (estimate_edge_growth): Likewise.
13537 2018-06-08 Martin Liska <mliska@suse.cz>
13539 * cgraph.c (function_version_hasher::hash): Use
13540 cgraph_node::get_uid ().
13541 (function_version_hasher::equal):
13542 * cgraph.h (cgraph_node::get_uid): New method.
13543 * ipa-inline.c (update_caller_keys): Use
13544 cgraph_node::get_uid ().
13545 (update_callee_keys): Likewise.
13546 * ipa-utils.c (searchc): Likewise.
13547 (ipa_reduced_postorder): Likewise.
13548 * lto-cgraph.c (input_node): Likewise.
13549 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13550 * symbol-summary.h (symtab_insertion): Likewise.
13551 (symtab_removal): Likewise.
13552 (symtab_duplication): Likewise.
13553 * tree-pretty-print.c (dump_function_header): Likewise.
13554 * tree-sra.c (convert_callers_for_node): Likewise.
13556 2018-06-08 Martin Liska <mliska@suse.cz>
13558 * cgraph.c (symbol_table::create_edge): Always assign a new
13560 (symbol_table::free_edge): Do not recycle numbers.
13561 * cgraph.h (cgraph_edge::get): New method.
13562 * symbol-summary.h (symtab_removal): Use it.
13563 (symtab_duplication): Likewise.
13564 (call_summary::hashable_uid): Remove.
13566 2018-06-08 Martin Liska <mliska@suse.cz>
13568 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13569 (initialize_growth_caches): Remove.
13570 (free_growth_caches): Likewise.
13571 (do_estimate_edge_time): Use edge_growth_cache.
13572 (do_estimate_edge_size): Likewise.
13573 (do_estimate_edge_hints): Likewise.
13574 * ipa-inline.c (reset_edge_caches): Likewise.
13575 (recursive_inlining): Likewise.
13576 (inline_small_functions): Likewise.
13577 * ipa-inline.h (initialize_growth_caches): Remove.
13578 (estimate_edge_size): Likewise.
13579 (estimate_edge_time): Likewise.
13580 (estimate_edge_hints): Likewise.
13581 (reset_edge_growth_cache): Likewise.
13582 * symbol-summary.h (call_summary::remove): New method.
13584 2018-06-08 Martin Liska <mliska@suse.cz>
13586 * ipa-cp.c (class edge_clone_summary): New summary.
13587 (grow_edge_clone_vectors): Remove.
13588 (ipcp_edge_duplication_hook): Remove.
13589 (class edge_clone_summary_t): New call_summary class.
13590 (ipcp_edge_removal_hook): Remove.
13591 (edge_clone_summary_t::duplicate): New function.
13592 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13593 (create_specialized_node): Likewise.
13594 (ipcp_driver): Initialize edge_clone_summaries and do not
13597 2018-06-08 Martin Liska <mliska@suse.cz>
13599 * symbol-summary.h (get): New function.
13600 (call_summary::m_initialize_when_cloning): New class member.
13602 2018-06-08 Martin Liska <mliska@suse.cz>
13604 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13605 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13606 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13607 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13608 (remove_cgraph_node_from_order): Use the removed_nodes set.
13609 (do_per_function_toporder): Likwise.
13610 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13611 instead of summary_uid.
13612 (symtab_removal): Likewise.
13613 (symtab_duplication): Likewise.
13615 2018-06-08 Martin Liska <mliska@suse.cz>
13617 * ipa-cp.c (ipcp_store_bits_results): Use
13618 ipcp_transformation_sum.
13619 (ipcp_store_vr_results): Likewise.
13620 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13622 (ipcp_transformation_initialize): ... this.
13623 (ipa_set_node_agg_value_chain):
13624 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13625 (write_ipcp_transformation_info): Likewise.
13626 (read_ipcp_transformation_info): Likewise.
13627 (ipcp_update_bits): Likewise.
13628 (ipcp_update_vr): Likewise.
13629 (ipcp_transform_function): Likewise.
13630 * ipa-prop.h: Rename ipcp_transformation_summary to
13631 ipcp_transformation.
13632 (class ipcp_transformation_t): New function summary.
13633 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13634 (ipa_get_agg_replacements_for_node): Likewise.
13636 2018-06-08 Martin Liska <mliska@suse.cz>
13638 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13640 (class funct_state_summary_t): New function_summary class.
13641 (has_function_state): Remove.
13642 (get_function_state): Likewise.
13643 (set_function_state): Likewise.
13644 (add_new_function): Likewise.
13645 (funct_state_summary_t::insert): New function.
13646 (duplicate_node_data): Remove.
13647 (remove_node_data): Remove.
13648 (funct_state_summary_t::duplicate): New function.
13649 (register_hooks): Create new funct_state_summaries.
13650 (pure_const_generate_summary): Use it.
13651 (pure_const_write_summary): Likewise.
13652 (pure_const_read_summary): Likewise.
13653 (propagate_pure_const): Likewise.
13654 (propagate_nothrow): Likewise.
13655 (dump_malloc_lattice): Likewise.
13656 (propagate_malloc): Likewise.
13657 (execute): Do not register hooks, just remove summary
13659 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13662 2018-06-08 Martin Liska <mliska@suse.cz>
13664 * ipa-reference.c (remove_node_data): Remove.
13665 (duplicate_node_data): Likewise.
13666 (class ipa_ref_var_info_summary_t): New class.
13667 (class ipa_ref_opt_summary_t): Likewise.
13668 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13669 (get_reference_optimization_summary): Use
13670 ipa_ref_opt_sum_summaries.
13671 (set_reference_vars_info): Remove.
13672 (set_reference_optimization_summary): Likewise.
13673 (ipa_init): Create summaries.
13674 (init_function_info): Use function summary.
13675 (ipa_ref_opt_summary_t::duplicate): New function.
13676 (ipa_ref_opt_summary_t::remove): New function.
13677 (get_read_write_all_from_node): Fix GNU coding style.
13678 (propagate): Use function summary.
13679 (write_node_summary_p): Fix GNU coding style.
13680 (stream_out_bitmap): Likewise.
13681 (ipa_reference_read_optimization_summary): Use function summary.
13682 (ipa_reference_c_finalize): Do not release hooks.
13684 2018-06-08 Martin Liska <mliska@suse.cz>
13686 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13687 (analyze_function_body): Extract multiple calls of get_create.
13688 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13689 * ipa-inline.c (recursive_inlining): Use ::get method.
13690 * ipa-inline.h (estimate_edge_growth): Likewise.
13692 2018-06-08 Martin Liska <mliska@suse.cz>
13694 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13696 (hsa_function_summary::hsa_function_summary): Use the new enum
13698 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13699 * hsa-gen.c (hsa_get_host_function): Likewise.
13700 (get_brig_function_name): Likewise.
13701 * ipa-hsa.c (process_hsa_functions): Likewise.
13702 (ipa_hsa_write_summary): Likewise.
13703 * symbol-summary.h (symtab_duplication): Use ::get function/
13704 (get): New function.
13706 2018-06-08 Martin Liska <mliska@suse.cz>
13708 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13710 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13711 (hsa_register_kernel): Likewise.
13712 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13713 * hsa-gen.c (hsa_get_host_function): Likewise.
13714 (get_brig_function_name): Likewise.
13715 (generate_hsa): Likewise.
13716 (pass_gen_hsail::execute): Likewise.
13717 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13718 (devirtualization_time_bonus): Likewise.
13719 (ipcp_propagate_stage): Likewise.
13720 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13721 (edge_set_predicate): Likewise.
13722 (evaluate_conditions_for_known_args): Likewise.
13723 (evaluate_properties_for_edge): Likewise.
13724 (ipa_fn_summary::reset): Likewise.
13725 (ipa_fn_summary_t::duplicate): Likewise.
13726 (dump_ipa_call_summary): Likewise.
13727 (ipa_dump_fn_summary): Likewise.
13728 (analyze_function_body): Likewise.
13729 (compute_fn_summary): Likewise.
13730 (estimate_edge_devirt_benefit): Likewise.
13731 (estimate_edge_size_and_time): Likewise.
13732 (estimate_calls_size_and_time): Likewise.
13733 (estimate_node_size_and_time): Likewise.
13734 (inline_update_callee_summaries): Likewise.
13735 (remap_edge_change_prob): Likewise.
13736 (remap_edge_summaries): Likewise.
13737 (ipa_merge_fn_summary_after_inlining): Likewise.
13738 (ipa_update_overall_fn_summary): Likewise.
13739 (read_ipa_call_summary): Likewise.
13740 (inline_read_section): Likewise.
13741 (write_ipa_call_summary): Likewise.
13742 (ipa_fn_summary_write): Likewise.
13743 (ipa_free_fn_summary): Likewise.
13744 * ipa-hsa.c (process_hsa_functions): Likewise.
13745 (ipa_hsa_write_summary): Likewise.
13746 (ipa_hsa_read_section): Likewise.
13747 * ipa-icf.c (sem_function::merge): Likewise.
13748 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13749 (do_estimate_edge_time): Likewise.
13750 (estimate_size_after_inlining): Likewise.
13751 (estimate_growth): Likewise.
13752 (growth_likely_positive): Likewise.
13753 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13754 (inline_call): Likewise.
13755 * ipa-inline.c (caller_growth_limits): Likewise.
13756 (can_inline_edge_p): Likewise.
13757 (can_inline_edge_by_limits_p): Likewise.
13758 (compute_uninlined_call_time): Likewise.
13759 (compute_inlined_call_time): Likewise.
13760 (want_inline_small_function_p): Likewise.
13761 (edge_badness): Likewise.
13762 (update_caller_keys): Likewise.
13763 (update_callee_keys): Likewise.
13764 (recursive_inlining): Likewise.
13765 (inline_small_functions): Likewise.
13766 (inline_to_all_callers_1): Likewise.
13767 (dump_overall_stats): Likewise.
13768 (early_inline_small_functions): Likewise.
13769 (early_inliner): Likewise.
13770 * ipa-inline.h (estimate_edge_growth): Likewise.
13771 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13772 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13773 * ipa-prop.h (IPA_NODE_REF): Likewise.
13774 (IPA_EDGE_REF): Likewise.
13775 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13776 (propagate_malloc): Likewise.
13777 * ipa-split.c (execute_split_functions): Likewise.
13778 * symbol-summary.h: Rename get to get_create.
13780 (get_create): Likewise.
13781 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13783 2018-06-08 Martin Liska <mliska@suse.cz>
13785 * symbol-summary.h (release): Move definition out of class
13787 (symtab_removal): Likewise.
13788 (symtab_duplication): Likewise.
13790 2018-06-08 Martin Liska <mliska@suse.cz>
13792 * symbol-summary.h (function_summary): Move constructor
13793 implementation out of class declaration.
13794 (release): Likewise.
13795 (symtab_insertion): Likewise.
13796 (symtab_removal): Likewise.
13797 (symtab_duplication): Likewise.
13800 2018-06-08 Martin Liska <mliska@suse.cz>
13802 * Makefile.in: Remove support for MPX (macros, related functions,
13803 fields in cgraph_node, ...).
13804 * builtin-types.def (BT_BND): Likewise.
13805 (BT_FN_BND_CONST_PTR): Likewise.
13806 (BT_FN_CONST_PTR_BND): Likewise.
13807 (BT_FN_VOID_PTR_BND): Likewise.
13808 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13809 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13810 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13811 (expand_builtin_mempcpy_with_bounds): Likewise.
13812 (expand_builtin_memset_with_bounds): Likewise.
13813 (expand_builtin_memset_args): Likewise.
13814 (std_expand_builtin_va_start): Likewise.
13815 (expand_builtin): Likewise.
13816 (expand_builtin_with_bounds): Likewise.
13817 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13818 (DEF_LIB_BUILTIN_CHKP): Likewise.
13819 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13820 (DEF_CHKP_BUILTIN): Likewise.
13821 (BUILT_IN_MEMCPY): Likewise.
13822 (BUILT_IN_MEMMOVE): Likewise.
13823 (BUILT_IN_MEMPCPY): Likewise.
13824 (BUILT_IN_MEMSET): Likewise.
13825 (BUILT_IN_STPCPY): Likewise.
13826 (BUILT_IN_STRCAT): Likewise.
13827 (BUILT_IN_STRCHR): Likewise.
13828 (BUILT_IN_STRCPY): Likewise.
13829 (BUILT_IN_STRLEN): Likewise.
13830 (BUILT_IN_MEMCPY_CHK): Likewise.
13831 (BUILT_IN_MEMMOVE_CHK): Likewise.
13832 (BUILT_IN_MEMPCPY_CHK): Likewise.
13833 (BUILT_IN_MEMSET_CHK): Likewise.
13834 (BUILT_IN_STPCPY_CHK): Likewise.
13835 (BUILT_IN_STRCAT_CHK): Likewise.
13836 (BUILT_IN_STRCPY_CHK): Likewise.
13837 * calls.c (store_bounds): Likewise.
13838 (emit_call_1): Likewise.
13839 (special_function_p): Likewise.
13840 (maybe_warn_nonstring_arg): Likewise.
13841 (initialize_argument_information): Likewise.
13842 (finalize_must_preallocate): Likewise.
13843 (compute_argument_addresses): Likewise.
13844 (expand_call): Likewise.
13845 * cfgexpand.c (expand_call_stmt): Likewise.
13846 (expand_return): Likewise.
13847 (expand_gimple_stmt_1): Likewise.
13848 (pass_expand::execute): Likewise.
13849 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13850 (cgraph_node::remove): Likewise.
13851 (cgraph_node::dump): Likewise.
13852 (cgraph_node::verify_node): Likewise.
13853 * cgraph.h (chkp_function_instrumented_p): Likewise.
13854 (symtab_node::get_alias_target): Likewise.
13855 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13856 (cgraph_local_p): Likewise.
13857 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13858 (cgraph_edge::rebuild_references): Likewise.
13859 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13860 (walk_polymorphic_call_targets): Likewise.
13861 (cgraph_node::expand_thunk): Likewise.
13862 (symbol_table::output_weakrefs): Likewise.
13863 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13864 (ix86_handle_option): Likewise.
13865 * config/i386/constraints.md: Likewise.
13866 * config/i386/i386-builtin-types.def (BND): Likewise.
13870 * config/i386/i386-builtin.def (BDESC_END): Likewise.
13871 (BDESC_FIRST): Likewise.
13873 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13874 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13875 * config/i386/i386.c (enum reg_class): Likewise.
13876 (ix86_target_string): Likewise.
13877 (ix86_option_override_internal): Likewise.
13878 (ix86_conditional_register_usage): Likewise.
13879 (ix86_valid_target_attribute_inner_p): Likewise.
13880 (ix86_set_indirect_branch_type): Likewise.
13881 (ix86_set_current_function): Likewise.
13882 (ix86_function_arg_regno_p): Likewise.
13883 (init_cumulative_args): Likewise.
13884 (ix86_function_arg_advance): Likewise.
13885 (ix86_function_arg): Likewise.
13886 (ix86_pass_by_reference): Likewise.
13887 (ix86_function_value_regno_p): Likewise.
13888 (ix86_function_value_1): Likewise.
13889 (ix86_function_value_bounds): Likewise.
13890 (ix86_return_in_memory): Likewise.
13891 (ix86_setup_incoming_vararg_bounds): Likewise.
13892 (ix86_va_start): Likewise.
13893 (indirect_thunk_need_prefix): Likewise.
13894 (print_reg): Likewise.
13895 (ix86_print_operand): Likewise.
13896 (ix86_expand_call): Likewise.
13897 (ix86_output_function_return): Likewise.
13898 (reg_encoded_number): Likewise.
13899 (BDESC_VERIFYS): Likewise.
13900 (ix86_init_mpx_builtins): Likewise.
13901 (ix86_init_builtins): Likewise.
13902 (ix86_emit_cmove): Likewise.
13903 (ix86_emit_move_max): Likewise.
13904 (ix86_expand_builtin): Likewise.
13905 (ix86_builtin_mpx_function): Likewise.
13906 (ix86_get_arg_address_for_bt): Likewise.
13907 (ix86_load_bounds): Likewise.
13908 (ix86_store_bounds): Likewise.
13909 (ix86_load_returned_bounds): Likewise.
13910 (ix86_store_returned_bounds): Likewise.
13911 (ix86_class_likely_spilled_p): Likewise.
13912 (ix86_hard_regno_mode_ok): Likewise.
13913 (x86_order_regs_for_local_alloc): Likewise.
13914 (ix86_mitigate_rop): Likewise.
13915 (ix86_bnd_prefixed_insn_p): Likewise.
13916 (ix86_mpx_bound_mode): Likewise.
13917 (ix86_make_bounds_constant): Likewise.
13918 (ix86_initialize_bounds): Likewise.
13919 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13920 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13921 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13922 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13923 (TARGET_CHKP_BOUND_MODE): Likewise.
13924 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13925 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13926 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13927 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13928 * config/i386/i386.h (TARGET_MPX): Likewise.
13929 (TARGET_MPX_P): Likewise.
13930 (VALID_BND_REG_MODE): Likewise.
13931 (FIRST_BND_REG): Likewise.
13932 (LAST_BND_REG): Likewise.
13933 (enum reg_class): Likewise.
13934 (BND_REG_P): Likewise.
13935 (BND_REGNO_P): Likewise.
13936 (BNDmode): Likewise.
13937 (ADJUST_INSN_LENGTH): Likewise.
13938 * config/i386/i386.md: Likewise.
13939 * config/i386/i386.opt: Likewise.
13940 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13941 (defined): Likewise.
13942 (LINK_MPX): Likewise.
13943 (MPX_SPEC): Likewise.
13944 (LIBMPX_SPEC): Likewise.
13945 (LIBMPXWRAPPERS_SPEC): Likewise.
13946 (CHKP_SPEC): Likewise.
13947 * config/i386/predicates.md: Likewise.
13948 * dbxout.c (dbxout_type): Likewise.
13949 * doc/extend.texi: Likewise.
13950 * doc/invoke.texi: Likewise.
13951 * doc/md.texi: Likewise.
13952 * doc/tm.texi: Likewise.
13953 * doc/tm.texi.in: Likewise.
13954 * dwarf2out.c (is_base_type): Likewise.
13955 (gen_formal_types_die): Likewise.
13956 (gen_subprogram_die): Likewise.
13957 (gen_type_die_with_usage): Likewise.
13958 (gen_decl_die): Likewise.
13959 (dwarf2out_late_global_decl): Likewise.
13960 * expr.c (expand_assignment): Likewise.
13961 (emit_storent_insn): Likewise.
13962 (store_expr_with_bounds): Likewise.
13963 (store_expr): Likewise.
13964 (expand_expr_real_1): Likewise.
13965 * expr.h (store_expr_with_bounds): Likewise.
13966 * function.c (use_register_for_decl): Likewise.
13967 (struct bounds_parm_data): Likewise.
13968 (assign_parms_augmented_arg_list): Likewise.
13969 (assign_parm_find_entry_rtl): Likewise.
13970 (assign_parm_is_stack_parm): Likewise.
13971 (assign_parm_load_bounds): Likewise.
13972 (assign_bounds): Likewise.
13973 (assign_parms): Likewise.
13974 (expand_function_start): Likewise.
13975 * gcc.c (CHKP_SPEC): Likewise.
13976 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13977 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13978 (wrestrict_dom_walker::check_call): Likewise.
13979 * gimple.c (gimple_build_call_from_tree): Likewise.
13980 * gimple.h (enum gf_mask): Likewise.
13981 (gimple_call_with_bounds_p): Likewise.
13982 (gimple_call_set_with_bounds): Likewise.
13983 * gimplify.c (gimplify_init_constructor): Likewise.
13984 * ipa-cp.c (initialize_node_lattices): Likewise.
13985 (propagate_constants_across_call): Likewise.
13986 (find_more_scalar_values_for_callers_subset): Likewise.
13987 * ipa-hsa.c (process_hsa_functions): Likewise.
13988 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13989 * ipa-icf.c (sem_function::merge): Likewise.
13990 * ipa-inline.c (early_inliner): Likewise.
13991 * ipa-pure-const.c (warn_function_noreturn): Likewise.
13992 (warn_function_cold): Likewise.
13993 (propagate_pure_const): Likewise.
13994 * ipa-ref.h (enum GTY): Likewise.
13995 * ipa-split.c (find_retbnd): Likewise.
13996 (consider_split): Likewise.
13997 (split_function): Likewise.
13998 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13999 * ipa.c (walk_polymorphic_call_targets): Likewise.
14000 (symbol_table::remove_unreachable_nodes): Likewise.
14001 (process_references): Likewise.
14002 (cgraph_build_static_cdtor_1): Likewise.
14003 * lto-cgraph.c (lto_output_node): Likewise.
14004 (output_refs): Likewise.
14005 (compute_ltrans_boundary): Likewise.
14006 (input_overwrite_node): Likewise.
14007 (input_node): Likewise.
14008 (input_cgraph_1): Likewise.
14009 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14010 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14011 (class pass_chkp_instrumentation_passes): Likewise.
14012 (make_pass_chkp_instrumentation_passes): Likewise.
14013 * passes.def: Likewise.
14014 * rtl.h (struct GTY): Likewise.
14015 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14016 * stor-layout.c (layout_type): Likewise.
14017 * symtab.c: Likewise.
14018 * target.def: Likewise.
14019 * targhooks.c (default_chkp_bound_type): Likewise.
14020 (default_chkp_bound_mode): Likewise.
14021 (default_builtin_chkp_function): Likewise.
14022 (default_chkp_function_value_bounds): Likewise.
14023 (default_chkp_make_bounds_constant): Likewise.
14024 (default_chkp_initialize_bounds): Likewise.
14025 * targhooks.h (default_chkp_bound_type): Likewise.
14026 (default_chkp_bound_mode): Likewise.
14027 (default_builtin_chkp_function): Likewise.
14028 (default_chkp_function_value_bounds): Likewise.
14029 (default_chkp_make_bounds_constant): Likewise.
14030 (default_chkp_initialize_bounds): Likewise.
14031 * toplev.c (compile_file): Likewise.
14032 (process_options): Likewise.
14033 * tree-core.h (DEF_BUILTIN): Likewise.
14034 (DEF_BUILTIN_CHKP): Likewise.
14035 * tree-inline.c (declare_return_variable): Likewise.
14036 (remap_gimple_stmt): Likewise.
14037 (copy_bb): Likewise.
14038 (initialize_inlined_parameters): Likewise.
14039 (expand_call_inline): Likewise.
14040 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14041 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14042 (make_pass_ipa_chkp_produce_thunks): Likewise.
14043 (make_pass_chkp): Likewise.
14044 (make_pass_chkp_opt): Likewise.
14045 (make_pass_chkp_instrumentation_passes): Likewise.
14046 * tree-pretty-print.c (dump_generic_node): Likewise.
14047 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14048 * tree-ssa-dce.c (propagate_necessity): Likewise.
14049 (eliminate_unnecessary_stmts): Likewise.
14050 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14051 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14052 * tree-ssa-sccvn.h: Likewise.
14053 * tree-ssa-strlen.c (get_string_length): Likewise.
14054 (valid_builtin_call): Likewise.
14055 (adjust_last_stmt): Likewise.
14056 (handle_builtin_strchr): Likewise.
14057 (handle_builtin_strcpy): Likewise.
14058 (handle_builtin_stxncpy): Likewise.
14059 (handle_builtin_memcpy): Likewise.
14060 (handle_builtin_strcat): Likewise.
14061 (strlen_check_and_optimize_stmt): Likewise.
14062 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14063 * tree-streamer-in.c: Likewise.
14064 * tree-streamer.c (record_common_node): Likewise.
14065 * tree.c (tree_code_size): Likewise.
14066 (wide_int_to_tree_1): Likewise.
14067 (type_contains_placeholder_1): Likewise.
14068 (build_common_tree_nodes): Likewise.
14069 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14070 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14071 (POINTER_BOUNDS_P): Likewise.
14072 (BOUNDED_TYPE_P): Likewise.
14073 (BOUNDED_P): Likewise.
14074 (CALL_WITH_BOUNDS_P): Likewise.
14075 (pointer_bounds_type_node): Likewise.
14076 * value-prof.c (gimple_ic): Likewise.
14077 * var-tracking.c (vt_add_function_parameters): Likewise.
14078 * varasm.c (make_decl_rtl): Likewise.
14079 (assemble_start_function): Likewise.
14080 (output_constant): Likewise.
14081 (maybe_assemble_visibility): Likewise.
14082 * varpool.c (ctor_for_folding): Likewise.
14083 * chkp-builtins.def: Remove.
14084 * ipa-chkp.c: Remove.
14085 * ipa-chkp.h: Remove.
14086 * rtl-chkp.c: Remove.
14087 * rtl-chkp.h: Remove.
14088 * tree-chkp-opt.c: Remove.
14089 * tree-chkp.c: Remove.
14090 * tree-chkp.h: Remove.
14092 2018-06-07 Carl Love <cel@us.ibm.com>
14094 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14095 vextract_fp_from_shortl): Add BE support.
14097 2018-06-07 Paul Koning <ni1d@arrl.net>
14099 * compare-elim.c (try_merge_compare): Don't merge compare if
14100 address contains a side effect.
14101 (try_eliminate_compare): Likewise.
14103 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14105 * config.gcc: Support "tremont".
14106 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14107 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14109 * config/i386/i386.c (m_TREMONT): Define.
14110 (processor_target_table): Add "tremont".
14111 (PTA_TREMONT): Define.
14112 (ix86_lea_outperforms): Add TARGET_TREMONT.
14113 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14114 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14115 and M_INTEL_GOLDMONT_PLUS.
14116 (fold_builtin_cpu): Add "tremont".
14117 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14118 (ix86_option_override_internal): Add "tremont".
14119 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14120 (processor_type): Add PROCESSOR_TREMONT.
14121 * config/i386/x86-tune.def: Add m_TREMONT.
14122 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14124 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14126 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14127 symbol defined for msp430i* devices to be lower case.
14129 2018-06-07 Richard Biener <rguenther@suse.de>
14131 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14132 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14133 Properly wrap signed arithmetic if overflow wraps.
14135 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14137 PR tree-optimization/69615
14138 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14139 of a cast from a same precision integral SSA_NAME in a bb dominated
14140 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14141 cast to utype if rhs2 has already a compatible type.
14143 2018-06-07 Richard Biener <rguenther@suse.de>
14145 PR tree-optimization/85935
14146 * graphite-scop-detection.c (find_params_in_bb): Analyze
14147 condition operands with respect to the correct loop. Assert
14148 the analysis doesn't fail.
14150 2018-06-04 Carl Love <cel@us.ibm.com>
14152 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14153 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14154 as it is slightly cheaper.
14155 (first_match_or_eos_index_<mode>):
14156 Calculate index using natural element order.
14157 (first_match_index_<mode>):
14158 Calculate index using natural element order.
14159 (first_match_or_eos_index_<mode>):
14160 Calculate index using natural order.
14161 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14162 for BE and LE modes.
14163 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14164 P9V_BUILTIN_VCLZLSBB_V16QI.
14165 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14168 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14170 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14171 indentation and line wrap for many prototypes. Add missing
14172 @smallexample directives around block of prototypes for vec_xl and
14175 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14177 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14178 track if we pass or return IEEE 128-bit floating point.
14179 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14180 C++ mangling that is compatible with GCC 8.1.
14181 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14182 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14183 floating point types.
14184 (rs6000_function_arg_advance_1): Likewise.
14185 (rs6000_mangle_type): Optionally generate mangled names that match
14186 what GCC 8.1 generated for IEEE 128-bit floating point types.
14187 (rs6000_globalize_decl_name): If we have an external function that
14188 passes or returns IEEE 128-bit types, generate a weak reference
14189 from the mangled name used in GCC 8.1 to the current mangled
14191 (rs6000_init_builtins): Make __ibm128 use the long double type if
14192 long double is IBM extended double. Make __float128 use the long
14193 double type if long double is IEEE 128-bit.
14196 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14197 macro for __ibm128 built-in functions.
14198 (PACK_IF): Add __ibm128 pack/unpack functions.
14199 (UNPACK_IF): Likewise.
14200 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14201 enable long double built-in functions if long double is IEEE
14202 128-bit floating point.
14203 (rs6000_invalid_builtin): Update long double built-in function
14205 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14206 functions, adjust the built-in function to use the long double
14207 built-in function if __ibm128 and long double are the same type.
14208 * doc/extend.texi (PowerPC builtins): Update documention for
14209 __builtin_{,un}pack_longdouble. Add documentation for
14210 __builtin_{,un}pack_ibm128.
14212 2018-06-06 Jim Wilson <jimw@sifive.com>
14214 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14215 (struct machine_function): New field interrupt_mode.
14216 (riscv_handle_type_attribute): New function. Add forward declaration.
14217 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14218 (riscv_expand_epilogue): Check interrupt_mode field.
14219 (riscv_set_current_function): Check interrupt attribute args and
14220 set interrupt_mode field.
14221 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14222 (riscv_sret, riscv_uret): New.
14223 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14224 new arguments to interrupt attribute.
14226 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14229 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14230 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14232 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14234 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14235 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14236 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14237 several redundant entries.
14239 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14241 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14242 type from "rtx" to "rtx_insn *".
14243 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14244 for local "call_insn", removing cast.
14245 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14247 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14249 PR tree-optimization/86066
14250 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14251 for BIT_INSERT_EXPR stores.
14253 2018-06-06 Richard Biener <rguenther@suse.de>
14255 PR tree-optimization/86062
14256 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14257 component refs ontop
14258 of to be offsetted base.
14260 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14262 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14263 to be static and remove check on interrupt attribute name.
14265 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14267 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14268 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14270 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14273 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14275 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14276 Remove second argument, change how error is called.
14277 (aarch64_layout_arg): Remove second argument from
14278 aarch64_err_no_fpadvsimd call.
14279 (aarch64_init_cumulative_args): Ditto.
14280 (aarch64_gimplify_va_arg_expr): Ditto.
14281 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14283 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14285 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14286 (*simple_return_indirect_internal<mode>): Rename from
14287 simple_return_indirect_internal. Use W mode iterator.
14288 (rstorssp): New expander.
14289 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14290 (clrssbsy): New expander.
14291 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14293 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14295 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14297 (cmse_check_pointed_object): Likewise.
14299 2018-06-05 Martin Liska <mliska@suse.cz>
14301 PR gcov-profile/47618
14302 * doc/invoke.texi: Document how -fprofile-dir format
14305 2018-06-05 Richard Biener <rguenther@suse.de>
14307 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14308 removal pretend DOM info isn't available so we do not update
14309 it and only remove edges, not dominated blocks. Actually free
14310 DOM info in case we removed something. Remove unreachable blocks.
14311 (mfb_keep_latches): Work with either DOM info or marked backedges.
14312 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14313 first. Mark backedges if DOM info isn't available.
14314 (Re-)compute DOM info after cleanup_control_flow_pre.
14316 2018-06-05 Richard Biener <rguenther@suse.de>
14318 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14319 (locus_discrim_hasher::hash): Adjust.
14320 (locus_discrim_hasher::equal): Likewise.
14321 (next_discriminator_for_locus): Work on line directly.
14322 (same_line_p): Pass in expanded locus1 as well.
14323 (assign_discriminators): Avoid redundant location expansions.
14325 2018-06-05 Richard Biener <rguenther@suse.de>
14327 PR tree-optimization/86046
14328 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14329 if required after clearing TREE_ADDRESSABLE.
14331 2018-06-05 Richard Biener <rguenther@suse.de>
14333 PR tree-optimization/86047
14334 * tree-ssa-loop.c (for_each_index): Glob handling of all
14335 decls and constants and really handle all of them.
14337 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14340 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14341 qualifier_void_pointer and qualifier_const_void_pointer.
14342 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14343 (arm_init_builtins): Handle the above.
14344 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14345 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14346 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14349 2018-06-05 Martin Liska <mliska@suse.cz>
14351 * auto-profile.c (read_autofdo_file): Do not use
14352 gcov_ctr_summary struct.
14353 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14354 * coverage.c (struct counts_entry): Likewise.
14355 (read_counts_file): Read just single summary entry.
14356 (get_coverage_counts): Use gcov_summary struct.
14357 * coverage.h (get_coverage_counts): Likewise.
14358 * gcov-dump.c (dump_working_sets): Likewise.
14359 (tag_summary): Dump just single summary.
14360 * gcov-io.c (gcov_write_summary): Write just histogram
14362 (gcov_read_summary): Read just single summary.
14363 (compute_working_sets): Use gcov_summary struct.
14364 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14365 of GCOV_COUNTERS_SUMMABLE.
14366 (GCOV_COUNTERS_SUMMABLE): Remove.
14367 (GCOV_FIRST_VALUE_COUNTER): Replace with
14368 GCOV_COUNTER_V_INTERVAL.
14369 (struct gcov_ctr_summary): Remove.
14370 (struct gcov_summary): Directly use fields of former
14372 (compute_working_sets): Use gcov_summary struct.
14373 * gcov.c (read_count_file): Do not use ctrs fields.
14374 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14376 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14378 * profile.c: Likewise.
14379 * profile.h: Likewise.
14381 2018-06-05 Martin Liska <mliska@suse.cz>
14383 PR gcov-profile/84846
14384 * gcov.c (output_lines): Print working directory only
14385 in intermediate format.
14387 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14389 * config/s390/s390-builtin-types.def: Add void function type.
14390 * config/s390/s390-builtins.def: Use the function type for the
14393 2018-06-04 Jim Wilson <jimw@sifive.com>
14395 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14397 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14398 and maybe_eh_return. Change regno to unsigned int. Use new args to
14399 handle EH_RETURN_DATA_REGNO registers properly.
14400 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14401 (riscv_expand_epilogue): Update comment. Change argument name and
14402 type. Update code to use new name and type. Pass new args to
14403 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14405 * config/riscv/riscv.md (NORMAL_RETURN): New.
14406 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14407 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14408 (eh_return): Call gen_eh_return_internal and emit barrier.
14409 (eh_return_internal): Call riscv_expand_epilogue.
14411 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14413 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14414 bit_insertion field and declare can_be_merged_into method.
14415 (merged_store_group::can_be_merged_into): New method.
14416 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14417 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14418 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14420 2018-06-04 Richard Biener <rguenther@suse.de>
14422 PR tree-optimization/85955
14423 * builtins.c (fold_builtin_sincos): Convert pointers to
14424 destination to appropriate type before dereferencing.
14426 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14428 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14430 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14432 * expr.c (expand_expr_real_1): Force the operand into memory if
14433 its TYPE_MODE is BLKmode and if there is no integer mode for
14434 the number of bits being extracted.
14436 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14440 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14441 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14443 2018-06-04 Richard Biener <rguenther@suse.de>
14445 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14446 (cleanup_tree_cfg_noloop): ... single caller. Do
14447 start_recording_case_labels later.
14449 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14451 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14452 to _IMMINTRIN_H_INCLUDED.
14453 * config/i386/pconfigintrin.h: Ditto.
14454 * config/i386/waitpkgintrin.h: Ditto.
14455 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14456 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14457 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14458 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14459 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14460 waitpkgintrin.h and cldemoteintrin.h.
14462 2018-06-04 Richard Biener <rguenther@suse.de>
14464 PR tree-optimization/86038
14465 * tracer.c (find_best_successor): Check probability for
14466 being initialized, bail out if not.
14468 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14471 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14472 of bits to ignore when comparing architectures.
14474 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14476 PR tree-optimization/69615
14477 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14478 maximum or minimum of the type, try to merge it also as if
14479 range1 is + [-, x - 1] or + [x + 1, -].
14482 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14484 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14486 PR tree-optimization/86034
14487 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14488 the unsigned bitfield type in a bit insertion sequence if it does not
14489 have a larger precision than the bitfield size.
14490 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14492 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14494 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14496 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14498 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14499 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14500 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14501 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14503 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14505 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14506 Disable -fdelete-null-pointer-checks for ELF toolchain.
14508 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14509 Kito Cheng <kito.cheng@gmail.com>
14511 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14512 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14513 (nds32*-*-*): Add glibc and uclibc conditions.
14514 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14515 (TARGET_EXCEPT_UNWIND_INFO): Define.
14516 * config/nds32/elf.h: New file.
14517 * config/nds32/linux.h: New file.
14518 * config/nds32/nds32-elf.opt: New file.
14519 * config/nds32/nds32-linux.opt: New file.
14520 * config/nds32/nds32-fp-as-gp.c
14521 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14522 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14524 (nds32_asm_file_end): Ditto.
14525 (nds32_print_operand): Ditto.
14526 (nds32_insert_attributes): Ditto.
14527 (nds32_init_libfuncs): New function.
14528 (TARGET_HAVE_TLS): Define.
14529 (TARGET_INIT_LIBFUNCS): Define.
14530 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14532 (TARGET_ELF): Apply different mcmodel setting.
14533 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14534 been migrated into elf.h and linux.h files.
14535 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14536 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14537 (mcmodel): The content has been migrated into nds32-elf.opt and
14538 nds32-linux.opt files.
14539 * config/nds32/t-elf: New file.
14540 * config/nds32/t-linux: New file.
14542 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14543 Shiva Chen <shiva0217@gmail.com>
14545 * config/nds32/constants.md (unspec_volatile_element): Add
14546 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14547 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14549 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14550 (make_pass_nds32_fp_as_gp): Declare.
14551 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14553 (nds32_asm_function_end_prologue): Remove unused asm output.
14554 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14555 (nds32_asm_file_start): Output necessary fp_as_gp information.
14556 (nds32_option_override): Adjust register usage.
14557 (nds32_expand_prologue): Consider fp_as_gp situation.
14558 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14559 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14562 (simple_return): Ditto.
14563 (omit_fp_begin): Output special directive for fp_as_gp.
14564 (omit_fp_end): Output special directive for fp_as_gp.
14565 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14566 mforbid-fp-as-gp): New options.
14568 2018-06-01 Mark Wielaard <mark@klomp.org>
14570 * dwarf2out.c (dwarf2out_finish): Remove generation of
14571 DW_AT_loclists_base.
14573 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14575 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14576 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14577 (struct merged_store_group): Add bit_insertion field.
14578 (dump_char_array): Use standard hexadecimal format.
14579 (merged_store_group::merged_store_group): Set bit_insertion to false.
14580 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14581 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14582 also print the mask in the dump file.
14583 (pass_store_merging::gate): Minor tweak.
14584 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14585 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14586 stores with INTEGER_CST stores.
14587 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14588 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14589 and use it throughout. Generate bit insertion sequences if need be.
14590 (pass_store_merging::process_store): Remove redundant condition.
14591 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14593 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14595 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14596 the 128-bit floating point types. Fix function comment.
14598 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14600 * config/aarch64/aarch64-simd.md
14601 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14603 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14606 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14608 PR tree-optimization/85989
14609 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14611 (backprop::intersect_uses): Check it when deciding whether this
14612 is a backedge reference.
14613 (backprop::process_block): Add each phi to m_visited_phis
14614 after visiting it, then clear it at the end.
14616 2018-06-01 Richard Biener <rguenther@suse.de>
14618 * tree-vectorizer.h (vect_dr_stmt): New function.
14619 (vect_get_load_cost): Adjust.
14620 (vect_get_store_cost): Likewise.
14621 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14622 Use vect_dr_stmt instead of DR_SMTT.
14623 (vect_record_base_alignments): Likewise.
14624 (vect_calculate_target_alignment): Likewise.
14625 (vect_compute_data_ref_alignment): Likewise and make static.
14626 (vect_update_misalignment_for_peel): Likewise.
14627 (vect_verify_datarefs_alignment): Likewise.
14628 (vector_alignment_reachable_p): Likewise.
14629 (vect_get_data_access_cost): Likewise. Pass down
14630 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14631 (vect_get_peeling_costs_all_drs): Likewise.
14632 (vect_peeling_hash_get_lowest_cost): Likewise.
14633 (vect_enhance_data_refs_alignment): Likewise.
14634 (vect_find_same_alignment_drs): Likewise.
14635 (vect_analyze_data_refs_alignment): Likewise.
14636 (vect_analyze_group_access_1): Likewise.
14637 (vect_analyze_group_access): Likewise.
14638 (vect_analyze_data_ref_access): Likewise.
14639 (vect_analyze_data_ref_accesses): Likewise.
14640 (vect_vfa_segment_size): Likewise.
14641 (vect_small_gap_p): Likewise.
14642 (vectorizable_with_step_bound_p): Likewise.
14643 (vect_prune_runtime_alias_test_list): Likewise.
14644 (vect_analyze_data_refs): Likewise.
14645 (vect_supportable_dr_alignment): Likewise.
14646 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14647 (vect_gen_prolog_loop_niters): Likewise.
14648 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14649 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14651 (vect_recog_mask_conversion_pattern): Likewise.
14652 (vect_try_gather_scatter_pattern): Likewise.
14653 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14654 to vect_get_store_cost.
14655 (vect_get_store_cost): Get stmt_info instead of DR.
14656 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14657 (vect_get_load_cost): Get stmt_info instead of DR.
14659 2018-06-01 Richard Biener <rguenther@suse.de>
14661 PR middle-end/86017
14662 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14663 vars wrapped in MEM_REFs.
14665 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14667 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14668 Fix subreg tests so that we only return a choice between
14669 GENERAL_REGS and FP_REGS if the original classes included both.
14671 2018-06-01 Richard Biener <rguenther@suse.de>
14674 * tree-ssa-structalias.c (get_function_part_constraint):
14675 Handle NULL fi->decl.
14676 (find_func_aliases_for_call): Properly handle indirect
14677 fi from direct call.
14678 (find_func_clobbers): Likewise.
14679 (ipa_pta_execute): Likewise.
14680 (create_variable_info_for): For functions that are ifunc_resolver
14681 resolve to a varinfo that contains the result of the resolver call.
14682 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14685 2018-05-31 Michael Collison <michael.collison@arm.com>
14687 * config/aarch64/aarch64.md:
14688 (*fix_to_zero_extenddfdi2): New pattern.
14689 * gcc.target/aarch64/fix_extend1.c: New testcase.
14691 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14693 PR middle-end/78809
14694 PR middle-end/83026
14695 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14696 and BUILT_IN_STRNCMP_EQ.
14697 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14698 BUILT_IN_STRNCMP_EQ.
14699 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14700 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14701 (gimple_fold_builtin): Likewise.
14702 * tree-ssa-strlen.c (compute_string_length): New function.
14703 (determine_min_obsize): New function.
14704 (handle_builtin_string_cmp): New function to handle calls to
14705 string compare functions.
14706 (strlen_optimize_stmt): Add handling to builtin string compare
14708 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14709 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14710 * tree.c (build_common_builtin_nodes): Add new defines of
14711 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14713 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14716 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14717 functions with naked attribute.
14719 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14721 * config/i386/sse.md (avx_vec_concat<mode>):
14722 Substitute concat_tg_mode mode attribute with xtg_mode.
14723 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14724 (concat_tg_mode): Remove mode attribute.
14726 2018-05-31 Martin Sebor <msebor@redhat.com>
14729 * calls.c (alloc_max_size): Correct a logic error/typo.
14730 Treat excessive arguments as infinite. Warn for invalid arguments.
14731 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14733 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14736 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14737 and movx for Haswell.
14739 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14740 Cesar Philippidis <cesar@codesourcery.com>
14742 PR middle-end/85879
14743 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14744 when emitting error on private/firstprivate reductions.
14745 * omp-low.c (lower_omp_target): Avoid reference-type processing
14746 on pointers for firstprivate clause.
14748 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14750 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14753 * config/aarch64/aarch64-simd.md
14754 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14755 (aarch64_ld1_x3_<mode>): Likewise
14756 (aarch64_st1x2<VALLDIF:mode>): Likewise
14757 (aarch64_st1_x2_<mode>): Likewise
14758 (aarch64_st1x3<VALLDIF:mode>): Likewise
14759 (aarch64_st1_x3_<mode>): Likewise
14760 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14761 (vld1_s8_x3): Likewise.
14762 (vld1_u16_x3): Likewise.
14763 (vld1_s16_x3): Likewise.
14764 (vld1_u32_x3): Likewise.
14765 (vld1_s32_x3): Likewise.
14766 (vld1_u64_x3): Likewise.
14767 (vld1_s64_x3): Likewise.
14768 (vld1_f16_x3): Likewise.
14769 (vld1_f32_x3): Likewise.
14770 (vld1_f64_x3): Likewise.
14771 (vld1_p8_x3): Likewise.
14772 (vld1_p16_x3): Likewise.
14773 (vld1_p64_x3): Likewise.
14774 (vld1q_u8_x3): Likewise.
14775 (vld1q_s8_x3): Likewise.
14776 (vld1q_u16_x3): Likewise.
14777 (vld1q_s16_x3): Likewise.
14778 (vld1q_u32_x3): Likewise.
14779 (vld1q_s32_x3): Likewise.
14780 (vld1q_u64_x3): Likewise.
14781 (vld1q_s64_x3): Likewise.
14782 (vld1q_f16_x3): Likewise.
14783 (vld1q_f32_x3): Likewise.
14784 (vld1q_f64_x3): Likewise.
14785 (vld1q_p8_x3): Likewise.
14786 (vld1q_p16_x3): Likewise.
14787 (vld1q_p64_x3): Likewise.
14788 (vst1_s64_x2): Likewise.
14789 (vst1_u64_x2): Likewise.
14790 (vst1_f64_x2): Likewise.
14791 (vst1_s8_x2): Likewise.
14792 (vst1_p8_x2): Likewise.
14793 (vst1_s16_x2): Likewise.
14794 (vst1_p16_x2): Likewise.
14795 (vst1_s32_x2): Likewise.
14796 (vst1_u8_x2): Likewise.
14797 (vst1_u16_x2): Likewise.
14798 (vst1_u32_x2): Likewise.
14799 (vst1_f16_x2): Likewise.
14800 (vst1_f32_x2): Likewise.
14801 (vst1_p64_x2): Likewise.
14802 (vst1q_s8_x2): Likewise.
14803 (vst1q_p8_x2): Likewise.
14804 (vst1q_s16_x2): Likewise.
14805 (vst1q_p16_x2): Likewise.
14806 (vst1q_s32_x2): Likewise.
14807 (vst1q_s64_x2): Likewise.
14808 (vst1q_u8_x2): Likewise.
14809 (vst1q_u16_x2): Likewise.
14810 (vst1q_u32_x2): Likewise.
14811 (vst1q_u64_x2): Likewise.
14812 (vst1q_f16_x2): Likewise.
14813 (vst1q_f32_x2): Likewise.
14814 (vst1q_f64_x2): Likewise.
14815 (vst1q_p64_x2): Likewise.
14816 (vst1_s64_x3): Likewise.
14817 (vst1_u64_x3): Likewise.
14818 (vst1_f64_x3): Likewise.
14819 (vst1_s8_x3): Likewise.
14820 (vst1_p8_x3): Likewise.
14821 (vst1_s16_x3): Likewise.
14822 (vst1_p16_x3): Likewise.
14823 (vst1_s32_x3): Likewise.
14824 (vst1_u8_x3): Likewise.
14825 (vst1_u16_x3): Likewise.
14826 (vst1_u32_x3): Likewise.
14827 (vst1_f16_x3): Likewise.
14828 (vst1_f32_x3): Likewise.
14829 (vst1_p64_x3): Likewise.
14830 (vst1q_s8_x3): Likewise.
14831 (vst1q_p8_x3): Likewise.
14832 (vst1q_s16_x3): Likewise.
14833 (vst1q_p16_x3): Likewise.
14834 (vst1q_s32_x3): Likewise.
14835 (vst1q_s64_x3): Likewise.
14836 (vst1q_u8_x3): Likewise.
14837 (vst1q_u16_x3): Likewise.
14838 (vst1q_u32_x3): Likewise.
14839 (vst1q_u64_x3): Likewise.
14840 (vst1q_f16_x3): Likewise.
14841 (vst1q_f32_x3): Likewise.
14842 (vst1q_f64_x3): Likewise.
14843 (vst1q_p64_x3): Likewise.
14845 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14847 * config/msp430/msp430.c (msp430_output_labelref): Prepend
14848 user_label_prefix to name.
14850 * tree-core.h: Update comment about the format of NAME string
14851 passed to handler in attribute_spec.
14853 * config/msp430/msp430.md: Remove erroneous subreg expression from
14854 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14855 zero_extend{q,h}isi2.
14857 2018-05-30 Borislav Petkov <bp@suse.de>
14859 * doc/extend.texi: Document some architecture specific
14860 constraints and sort entries.
14862 2018-05-30 Martin Sebor <msebor@redhat.com>
14864 PR middle-end/85369
14865 * builtins.c (expand_builtin_stpcpy_1): New function.
14866 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14867 only if the former succeeds.
14869 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14871 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14874 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14876 * doc/invoke.texi (-flinker-output): Document
14878 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14880 * passes.c (ipa_write_summaries): Only modify statements if body
14882 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14883 incrementally linking.
14884 (ipa_passes): Likewise.
14885 * lto-cgraph.c (lto_output_node): When incrementally linking do not
14886 pass down resolution info.
14887 * common.opt (flag_incremental_link): Update info.
14888 * gcc.c (plugin specs): Turn flinker-output=* to
14889 -plugin-opt=-linker-output-known
14890 * toplev.c (compile_file): Also cut compilation when doing incremental
14892 * flag-types. (enum lto_partition_model): Add
14893 LTO_LINKER_OUTPUT_NOLTOREL.
14894 (invoke.texi): Add -flinker-output docs.
14895 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14896 link same way as WPA; do not stream in dead initializers.
14898 * dwarf2out.c (dwarf2out_die_ref_for_decl,
14899 darf2out_register_external_decl): Support incremental link.
14901 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14903 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14905 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14907 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14908 it down to simple_object_copy_lto_debug_sections.
14909 (run_gcc): Determine incremental LTO link time and configure
14910 lto1 into non-wpa mode, disable renaming of debug sections.
14912 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
14914 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14915 descriptions of various incorrectly documented functions.
14917 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
14920 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14921 address check not strict.
14923 2018-05-30 Richard Biener <rguenther@suse.de>
14925 PR tree-optimization/85964
14926 * tracer.c (better_p): Drop initialized count check, we only
14927 call the function with initialized counts now.
14928 (find_best_successor): Do find a best edge if one
14929 has uninitialized count.
14930 (find_best_predecessor): Likewise. Do BB frequency check only
14931 if count is initialized.
14933 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
14935 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14936 (aarch64_ldrstr_offset_compare): New.
14937 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14938 load/store orderings.
14939 (aarch64_gen_adjusted_ldpstp): Likewise.
14941 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
14943 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14944 Check for subset of GENERAL_REGS and FP_REGS.
14945 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14948 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
14950 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14951 and wi::to_poly_offset. Add the current offset and then check
14952 whether the sum fits, rather than using an unchecked addition of
14953 a checked term. Check for a shwi rather than a uhwi.
14954 * expr.c (get_bit_range): Use tree_to_poly_uint64.
14955 (store_constructor): Use poly_int_tree_p.
14956 (expand_expr_real_1): Likewise.
14957 * function.c (assign_temp): Likewise.
14958 * fold-const.c (const_binop): Use poly_int_tree_p and
14959 wi::to_poly_offset.
14960 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
14962 * ipa-icf-gimple.c (func_checker::compare_operand): Use
14963 to_poly_offset for MEM offsets.
14964 * ipa-icf.c (sem_variable::equals): Likewise.
14965 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14966 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14967 wi::to_poly_offset for BIT_FIELD_REF offsets.
14968 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14969 wi::to_poly_offset.
14970 * var-tracking.c (emit_note_insn_var_location): Use
14971 tree_to_poly_uint64.
14973 2018-05-29 Jim Wilson <jimw@sifive.com>
14975 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14977 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
14980 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14981 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14983 (sse4_1_round<mode>2): Use nonimmediate_operand
14984 for operand 1 predicate.
14986 2018-05-29 Martin Sebor <msebor@redhat.com>
14987 Richard Biener <rguenther@suse.de>
14990 * calls.c (get_size_range): Call determine_value_range instead
14991 of get_value_range..
14992 * tree-vrp.h (determine_value_range): Declared new function.
14993 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14995 2018-05-29 Richard Biener <rguenther@suse.de>
14997 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14998 sure to use non-pattern stmts for get_earlier_stmt arguments.
14999 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15000 called on pattern stmts.
15001 (get_later_stmt): Likewise.
15003 2018-05-29 Martin Liska <mliska@suse.cz>
15005 PR gcov-profile/85759
15006 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15009 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15011 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15013 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15017 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15018 VEC_PACK_FLOAT_EXPR): New tree codes.
15019 * tree-pretty-print.c (op_code_prio): Handle
15020 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15021 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15022 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15023 * tree-inline.c (estimate_operator_cost): Likewise.
15024 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15025 * fold-const.c (const_binop): Likewise.
15026 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15027 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15028 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15029 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15030 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15031 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15032 * expr.c (expand_expr_real_2): Likewise.
15033 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15034 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15035 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15037 * optabs.c (expand_widen_pattern_expr): For
15038 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15039 sign from result type rather than operand's type.
15040 (expand_binop_directly): For vec_packu_float_optab and
15041 vec_packs_float_optab allow result type to be different from operand's
15043 * optabs-tree.c (optab_for_tree_code): Handle
15044 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15045 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15046 * tree-vect-generic.c (expand_vector_operations_1): Handle
15047 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15048 VEC_PACK_FLOAT_EXPR.
15049 * tree-vect-stmts.c (supportable_widening_operation): Handle
15051 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15052 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15053 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15054 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15055 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15057 (vec_pack<floatprefix>_float_<mode>): New expander.
15058 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15060 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15061 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15062 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15063 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15064 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15066 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15067 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15068 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15069 VEC_PACK_FLOAT_EXPR): Document.
15071 2018-05-29 Richard Biener <rguenther@suse.de>
15073 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15075 (stmt_vec_info_vec): Make pointer.
15076 (init_stmt_vec_info_vec): Remove.
15077 (free_stmt_vec_info_vec): Likewise.
15078 (set_stmt_vec_info_vec): New function.
15079 (free_stmt_vec_infos): Likewise.
15080 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15081 (set_vinfo_for_stmt): Likewise.
15082 (get_earlier_stmt): Likewise.
15083 (get_later_stmt): Likewise.
15084 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15085 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15086 (vec_info::~vec_info): Free stmt_vec_infos.
15087 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15088 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15089 (pass_slp_vectorize::execute): Likewise.
15090 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15091 (free_stmt_vec_info_vec): Likewise.
15092 (set_stmt_vec_info_vec): New function.
15093 (free_stmt_vec_infos): Likewise.
15094 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15095 the global stmt_vec_info_vec.
15096 * tree-parloops.c (gather_scalar_reductions): Use
15097 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15100 2018-05-29 Richard Biener <rguenther@suse.de>
15102 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15104 2018-05-29 Martin Liska <mliska@suse.cz>
15105 David Malcolm <dmalcolm@redhat.com>
15107 * vec.c (test_reverse): New.
15108 (vec_c_tests): Add new test.
15109 * vec.h (vl_ptr>::reverse): New function.
15111 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15113 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15115 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15118 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15120 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15122 2018-05-28 Richard Biener <rguenther@suse.de>
15124 PR tree-optimization/85933
15125 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15126 look at stmts marked as vectorizable.
15128 2018-05-28 Richard Biener <rguenther@suse.de>
15130 PR tree-optimization/85934
15131 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15132 vector boolean check before scalar optimization.
15134 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15136 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15139 2018-05-28 Mark Wielaard <mark@klomp.org>
15141 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15142 if it is an expression containing a minus sign.
15144 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15146 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15148 2018-05-27 Paul Koning <ni1d@arrl.net>
15150 * config/pdp11/pdp11.md (truncsihi2): Remove.
15152 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15153 Chung-Ju Wu <jasonwucj@gmail.com>
15155 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15157 (unaligned_store_dw): Ditto.
15158 * config/nds32/nds32-memory-manipulation.c
15159 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15160 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15161 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15162 (emit_setmem_word_loop): Rename to ...
15163 (emit_setmem_doubleword_loop): ... this.
15164 (nds32_gen_dup_4_byte_to_word_value): New function.
15165 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15166 (nds32_expand_setmem_loop): Refine implementation.
15167 (nds32_expand_setmem_loop_v3m): Ditto.
15168 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15171 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15173 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15175 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15177 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15178 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15179 machine->attr_no_prologue_p.
15180 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15181 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15182 (nds32_expand_epilogue): Consider attr_naked_p.
15183 (nds32_expand_epilogue_v3pop): Likewise.
15184 (nds32_can_use_return_insn): Likewise.
15185 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15186 attr_no_prologue_p fields.
15187 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15189 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15192 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15194 * config/i386/sse.md
15195 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15197 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15199 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15201 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15203 (*<floatsuffix>floatv2div2sf2): Rename to ...
15204 (*float<floatunssuffix>v2div2sf2): ... this.
15205 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15206 (float<floatunssuffix>v2div2sf2_mask): ... this.
15207 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15208 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15209 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15211 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15213 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15215 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15217 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15219 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15221 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15222 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15223 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15224 gen_ufix_truncv8dfv8si2.
15225 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15226 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15227 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15228 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15229 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15230 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15231 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15232 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15234 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15238 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15240 2018-05-25 Jim Wilson <jimw@sifive.com>
15242 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15243 * config/riscv/riscv.c (struct machine_function): Add
15244 interrupt_handler_p and attribute_checked_p fields.
15245 (riscv_attribute_table): Add interrupt.
15246 (riscv_interrupt_type_p): New.
15247 (riscv_save_reg_p): Save extra regs for interrupt handler.
15248 (riscv_use_save_libcall): Return false for interrupt handler.
15249 (riscv_first_stack_step): Add forward declaration.
15250 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15251 for interrupt handler with large frame. Use it for saved reg list.
15252 (riscv_expand_prologue): Move flag_stack_usage_info support to
15253 eliminate duplication.
15254 (riscv_expand_epilogue): Generate mret for interrupt handler.
15255 (riscv_epilogue_uses): New.
15256 (riscv_can_use_return_insn): Return false for interrupt handler.
15257 (riscv_function_ok_for_sibcall): Likewise.
15258 (riscv_set_current_function): Add interrupt handler support.
15259 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15260 * config/riscv/riscv.md (UNSPECV_MRET): New.
15262 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15264 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15266 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15268 PR tree-optimization/85712
15269 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15270 this candidate has already been replaced in-situ by a copy.
15272 2018-05-25 Jason Merrill <jason@redhat.com>
15274 PR c++/80485 - inline function non-zero address.
15275 * symtab.c (nonzero_address): Check DECL_COMDAT.
15277 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15280 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15281 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15282 extension of SImode operation. Use const123_operand predicate.
15283 (*saddsi_1): Remove.
15284 (*saddl_se_1): Ditto.
15285 (*ssubsi_1): Ditto.
15286 (*ssubl_se_1): Ditto.
15287 * config/alpha/predicates.md (const123_operand): New predicate.
15288 * config/alpha/constraints.md (P): Use IN_RANGE.
15290 2018-05-25 Richard Biener <rguenther@suse.de>
15292 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15294 (ref_maybe_used_by_stmt_p): Likewise.
15295 (stmt_may_clobber_ref_p): Likewise.
15296 (stmt_may_clobber_ref_p_1): Likewise.
15297 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15299 (ref_maybe_used_by_stmt_p): Likewise.
15300 (stmt_may_clobber_ref_p): Likewise.
15301 (stmt_may_clobber_ref_p_1): Likewise.
15302 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15303 the alias oracle to disambiguate DRs with stmts DR analysis
15305 (vect_analyze_data_refs): Do not give up on not analyzable
15306 DRs for BB vectorization. Remove code truncating the dataref
15309 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15312 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15313 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15314 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15316 2018-05-25 Richard Biener <rguenther@suse.de>
15318 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15319 function, combining stmt data ref gathering and fatal analysis
15321 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15322 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15323 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15324 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15325 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15327 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15329 PR tree-optimization/85720
15330 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15331 SCC if all partitions are builtins.
15332 (version_loop_by_alias_check): New parameter. Generate cancelable
15333 runtime alias check if all partitions are builtins.
15334 (distribute_loop): Update call to above function.
15336 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15338 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15339 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15340 (parm_default_def_partition_arg): Ditto.
15341 (set_parm_default_def_partition): Ditto.
15342 (get_parm_default_def_partitions): Ditto and make it static.
15343 (get_undefined_value_partitions): Ditto and make it static.
15344 (remove_ssa_form): Refactor call to init_var_map here.
15345 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15346 computation for loop region.
15347 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15348 (register_default_def): Delete.
15349 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15350 (parm_default_def_partition_arg): Ditto.
15351 (set_parm_default_def_partition): Ditto.
15352 (get_parm_default_def_partitions): Ditto and make it static.
15353 (get_undefined_value_partitions): Ditto and make it static.
15354 (coalesce_with_default, coalesce_with_default): Update comment.
15355 (create_coalesce_list_for_region): New func factored out from
15356 create_outofssa_var_map.
15357 (populate_coalesce_list_for_outofssa): New func factored out from
15358 create_outofssa_var_map and coalesce_ssa_name.
15359 (create_outofssa_var_map): Delete.
15360 (coalesce_ssa_name): Refactor to support live range computation.
15361 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15362 (get_parm_default_def_partitions): Delete.
15363 (get_undefined_value_partitions): Ditto.
15364 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15365 computation for loop region.
15366 (new_tree_live_info, loe_visit_block): Ditto.
15367 (live_worklist, set_var_live_on_entry): Ditto.
15368 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15369 * tree-ssa-live.h (struct _var_map): New fields.
15370 (init_var_map): Change decl.
15371 (region_contains_p): New.
15373 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15375 * tree-ssa-live.h (live_merge_and_clear): Delete.
15377 2018-05-25 Richard Biener <rguenther@suse.de>
15380 * tree-dump.c (dequeue_and_dump): Remove access to removed
15381 operand 2 of a SWITCH_EXPR.
15383 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15385 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15386 multiplication and division.
15387 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15388 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15389 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15390 (cond_udiv_optab, cond_umod_optab): New optabs.
15391 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15392 (IFN_COND_RDIV): New internal functions.
15393 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15394 TRUNC_MOD_EXPR and RDIV_EXPR.
15395 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15396 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15398 (SVE_INT_BINARY): Include mult.
15399 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15400 (optab, sve_int_op): Handle mult.
15401 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15403 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15404 for SVE_INT_BINARY_SD.
15406 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15408 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15409 (optab, sve_int_op): Handle div and udiv.
15410 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15411 for SVE_INT_BINARY_SD.
15412 (*<optab><mode>3): New insn for the same.
15414 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15416 * tree-vect-patterns.c: Include predict.h.
15417 (vect_recog_divmod_pattern): Restrict check for division support
15418 to when optimizing for size.
15420 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15422 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15423 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15424 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15425 (gimple_match_op::set_op): Likewise.
15426 (gimple_resimplify4): Declare.
15427 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15428 (expr::gen_transform): Likewise.
15429 (decision_tree::gen): Generate a simplification routine for 4 operands.
15430 * gimple-match-head.c (gimple_simplify): Add an overload for
15431 4 operands. In the top-level function, handle up to 4 call
15432 arguments and call gimple_resimplify4.
15433 (gimple_resimplify4): New function.
15434 (build_call_internal): Pass a fourth operand.
15435 (maybe_push_to_seq): Likewise.
15436 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15437 Fold VEC_COND_EXPRs of an operation and a default value into
15438 an IFN_COND_* function if possible.
15439 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15441 (SVE_COND_FP_BINARY): Include them.
15442 (optab, sve_fp_op): Handle them.
15443 (SVE_INT_BINARY_REV): New code iterator.
15444 (SVE_COND_FP_BINARY_REV): New int iterator.
15445 (commutative): New int attribute.
15446 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15448 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15450 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15451 (*cond_<optab><mode>): New patterns for reversed operands.
15453 2018-05-25 Richard Biener <rguenther@suse.de>
15455 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15456 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15457 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15458 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15459 * tree-vect-data-refs.c (everywhere): Adjust users.
15460 * tree-vect-loop.c (everywhere): Likewise.
15461 * tree-vect-slp.c (everywhere): Likewise.
15462 * tree-vect-stmts.c (everywhere): Likewise.
15463 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15465 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15467 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15469 (gcc_cv_as_section_exclude): ... this.
15470 Try Solaris as #exclude syntax.
15471 * configure: Regenerate.
15472 * config.in: Regenerate.
15473 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15475 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15476 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15478 * varasm.c (default_elf_asm_named_section): Don't check if
15479 HAVE_GAS_SECTION_EXCLUDE is defined.
15481 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15483 * doc/md.texi: Update the documentation of the cond_* optabs
15484 to mention the new final operand. Fix GET_MODE_NUNITS call.
15485 Describe the scalar case too.
15486 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15487 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15489 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15490 (get_conditional_internal_fn): Update comment.
15491 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15492 accumulator value as a final argument to conditional functions.
15493 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15494 a define_expand and add an "else" operand. Assert for now that
15495 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15496 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15497 (*cond_<optab><mode>): New patterns.
15498 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15499 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15500 (UNSPEC_COND_EOR): Delete.
15501 (optab): Remove associated mappings.
15502 (SVE_INT_BINARY): New code iterator.
15503 (sve_int_op): Remove int attribute and add "minus" to the code
15505 (SVE_COND_INT_OP): Delete.
15506 (SVE_COND_FP_OP): Rename to...
15507 (SVE_COND_FP_BINARY): ...this.
15509 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15511 * optabs.c (can_reuse_operands_p): New function.
15512 (maybe_legitimize_operands): Try to reuse the results for
15515 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15517 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15518 Add {q} suffix to insn mnemonic.
15520 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15522 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15523 (msp430_warn_func_return): New.
15525 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15527 * fold-const.c (tree_nonzero_bits): New function.
15528 * fold-const.h (tree_nonzero_bits): Likewise.
15529 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15530 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15532 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15536 * varasm.c (assemble_alias): Check ifunc_resolver only on
15539 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15542 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15543 when memory input operand is handled.
15545 2018-05-24 Luis Machado <luis.machado@linaro.org>
15547 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15549 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15551 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15553 * match.pd: Delay FMA folds until after vectorization.
15555 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15558 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15559 address check not strict.
15561 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15563 * gimple-match.h (gimple_match_op): New class.
15564 (mprts_hook): Replace parameters with a gimple_match_op *.
15565 (maybe_build_generic_op): Likewise.
15566 (gimple_simplified_result_is_gimple_val): Replace parameters with
15567 a const gimple_match_op *.
15568 (gimple_simplify): Replace code_helper * and tree * parameters with
15569 a gimple_match_op * parameter.
15570 (gimple_resimplify1): Replace code_helper *, tree and tree *
15571 parameters with a gimple_match_op * parameter.
15572 (gimple_resimplify2): Likewise.
15573 (gimple_resimplify3): Likewise.
15574 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15575 parameters with a gimple_match_op * parameter.
15576 * gimple-match-head.c (gimple_simplify): Change prototypes of
15577 auto-generated functions to take a gimple_match_op * instead of
15578 separate code_helper * and tree * parameters. Make the same
15579 change in the top-level overload and update calls to the
15580 gimple_resimplify routines. Update calls to the auto-generated
15581 functions and to maybe_push_res_to_seq in the publicly-facing
15582 operation-specific gimple_simplify overloads.
15583 (gimple_match_op::MAX_NUM_OPS): Define.
15584 (gimple_resimplify1): Replace rcode and ops with a single res_op
15585 parameter. Update call to gimple_simplify.
15586 (gimple_resimplify2): Likewise.
15587 (gimple_resimplify3): Likewise.
15588 (mprts_hook): Replace parameters with a gimple_match_op *.
15589 (maybe_build_generic_op): Likewise.
15590 (build_call_internal): Replace type, nargs and ops with
15591 a gimple_match_op *.
15592 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15593 with a single gimple_match_op *. Update calls to mprts_hook,
15594 build_call_internal and gimple_simplified_result_is_gimple_val.
15595 Factor out code that is common to the tree_code and combined_fn cases.
15596 * genmatch.c (expr::gen_transform): Replace tem_code and
15597 tem_ops with a gimple_match_op called tem_op. Update calls
15598 to the gimple_resimplify functions and maybe_push_res_to_seq.
15599 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15600 res_ops. Update call to the gimple_resimplify functions.
15601 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15602 (decision_tree::gen): Make the functions take a gimple_match_op *
15603 called res_op instead of separate res_code and res_ops parameters.
15604 Update call accordingly.
15605 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15606 and ops with a single res_op parameter. Update calls to
15607 maybe_build_generic_op and maybe_push_res_to_seq.
15608 (fold_stmt_1): Update calls to gimple_simplify and
15609 replace_stmt_with_simplification.
15610 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15611 and gimple_simplified_result_is_gimple_val.
15612 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15614 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15615 with a gimple_match_op *.
15616 (vn_nary_build_or_lookup): Likewise. Update call to
15617 vn_nary_build_or_lookup_1.
15618 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15619 gimple_match_op *. Update calls to the gimple_resimplify routines
15620 and to gimple_simplified_result_is_gimple_val.
15621 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15622 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15623 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15624 (visit_nary_op): Likewise.
15625 (visit_reference_op_load): Likewise.
15627 2018-05-23 Luis Machado <luis.machado@linaro.org>
15629 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15630 modifier for printing the step amount.
15632 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15635 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15638 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15640 * doc/sourcebuild.texi (Endianness): New subsubsection.
15642 2018-05-23 Luis Machado <luis.machado@linaro.org>
15644 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15645 <prefetch_dynamic_strides>: New const bool field.
15646 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15647 prefetch_dynamic_strides.
15648 (exynosm1_prefetch_tune): Likewise.
15649 (thunderxt88_prefetch_tune): Likewise.
15650 (thunderx_prefetch_tune): Likewise.
15651 (thunderx2t99_prefetch_tune): Likewise.
15652 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15654 (aarch64_override_options_internal): Update to set
15655 PARAM_PREFETCH_DYNAMIC_STRIDES.
15656 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15657 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15658 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15659 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15660 prefetch-dynamic-strides setting.
15662 2018-05-23 Luis Machado <luis.machado@linaro.org>
15664 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15665 <minimum_stride>: New const int field.
15666 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15667 minimum_stride field defaulting to -1.
15668 (exynosm1_prefetch_tune): Likewise.
15669 (thunderxt88_prefetch_tune): Likewise.
15670 (thunderx_prefetch_tune): Likewise.
15671 (thunderx2t99_prefetch_tune): Likewise.
15672 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15673 <default_opt_level>: Set to 3.
15674 (aarch64_override_options_internal): Update to set
15675 PARAM_PREFETCH_MINIMUM_STRIDE.
15676 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15677 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15678 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15679 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15680 stride is constant and is below the minimum stride threshold.
15682 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15684 * config/arm/arm-cpus.in (mode26): Delete.
15685 (armv4): Delete mode26 reference.
15686 * config/arm/arm.c (arm_configure_build_target): Delete use of
15689 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15691 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15693 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15694 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15696 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15697 (floatunsdidf2): Ditto.
15699 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15701 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15702 (fixuns_trunc<mode>si2_avx512f): Ditto.
15703 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15704 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15705 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15707 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15709 PR rtl-optimization/79985
15710 * df-scan.c (df_insn_refs_collect): Remove special case for
15711 global registers and asm statements.
15713 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15715 * extend.texi (Global Register Variables): Rewrite the bullet list.
15716 Note that the register is available for allocation. Note that access
15717 via inline asm must use constraints. Add note about async-signal
15718 handlers. Remove paragraph about automagic register selection.
15720 2018-05-23 Richard Biener <rguenther@suse.de>
15722 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15723 of fixed offset from memset VN.
15725 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15727 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15728 first_interp field.
15729 (alloc_cand_and_find_basis): Initialize first_interp field.
15730 (slsr_process_mul): Modify first_interp field.
15731 (slsr_process_add): Likewise.
15732 (slsr_process_cast): Modify first_interp field for each new
15734 (slsr_process_copy): Likewise.
15735 (dump_candidate): Dump first_interp field.
15736 (replace_mult_candidate): Process all interpretations, not just
15738 (replace_rhs_if_not_dup): Likewise.
15739 (replace_one_candidate): Likewise.
15741 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15743 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15745 (aarch64_needs_frame_chain): New function.
15746 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15748 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15751 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15752 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15753 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15754 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15755 as true for strict-align.
15756 (aarch64_can_inline_p): Perform checks even when callee has no
15757 attributes to check for strict alignment.
15758 * doc/extend.texi (AArch64 Function Attributes): Document
15760 * doc/invoke.texi: (AArch64 Options): Likewise.
15762 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15764 PR tree-optimization/85853
15765 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15766 the handling of the root of the node to...
15767 (vect_slp_analyze_node_operations_1): ...this new function,
15768 and run the whole thing with the child nodes' def types
15769 set according to their SLP node's def type.
15771 2018-05-23 Richard Biener <rguenther@suse.de>
15773 PR middle-end/85874
15774 * tree-data-ref.c (create_runtime_alias_checks): Defer
15775 and ignore overflow warnings.
15777 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15779 PR tree-optimization/85822
15780 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15783 2018-05-23 Richard Biener <rguenther@suse.de>
15785 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15786 memset constants via native_interpret_expr.
15788 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15791 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15793 (cgraph_node::create_alias): Likewise.
15794 (cgraph_node::get_availability): Check ifunc_resolver instead
15795 of looking up ifunc attribute.
15796 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15797 * varasm.c (do_assemble_alias): Likewise.
15798 (assemble_alias): Likewise.
15799 (default_binds_local_p_3): Likewise.
15800 * cgraph.h (cgraph_node): Add ifunc_resolver.
15801 (cgraph_node::only_called_directly_or_aliased_p): Return false
15802 for IFUNC resolver.
15803 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15805 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15806 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15807 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15808 instead of looking up ifunc attribute.
15810 2018-05-22 Luis Machado <luis.machado@linaro.org>
15812 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15814 2018-05-22 Martin Sebor <msebor@redhat.com>
15816 PR middle-end/85359
15817 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15818 only when expasion succeeds.
15819 (expand_builtin_strcmp): Same.
15820 (expand_builtin_strncmp): Same.
15822 2018-05-22 Martin Sebor <msebor@redhat.com>
15824 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15826 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15827 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15829 * config/aarch64/aarch64-ldpstp.md: Replace uses of
15830 aarch64_mem_pair_operand with memory_operand and delete operand swapping
15832 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15833 Add check for legitimate_address.
15834 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15835 (aarch64_swap_ldrstr_operands): New.
15836 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15839 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15840 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15842 * config/aarch64/aarch64.md: New patterns to generate stp
15844 (store_pair_sw, store_pair_dw): New patterns to generate stp for
15845 single words and double words.
15846 (load_pair_sw, load_pair_dw): Likewise.
15847 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15849 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15851 * config/aarch64/aarch64-ldpstp.md: Modify peephole
15852 for different mode ldpstp and add peephole for merged zero stores.
15853 Likewise for loads.
15854 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15856 (aarch64_gen_store_pair): Rename calls to match new patterns.
15857 (aarch64_gen_load_pair): Rename calls to match new patterns.
15858 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15859 (load_pair<DREG:mode><DREG2:mode>): ... This.
15860 (store_pair<mode>): Rename to...
15861 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15862 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15863 New mode iterators.
15864 (V_INT_EQUIV): Handle SImode.
15865 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15868 2018-05-22 Martin Sebor <msebor@redhat.com>
15871 * calls.c (maybe_warn_nonstring_arg): Use string length to set
15872 or ajust the presumed bound on an operation to avoid unnecessary
15875 2018-05-22 Martin Sebor <msebor@redhat.com>
15877 PR tree-optimization/85826
15878 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15879 assuming that a DECL necesarily has a constant size.
15881 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
15883 PR middle-end/85862
15884 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15886 2018-05-22 Richard Biener <rguenther@suse.de>
15888 PR tree-optimization/85834
15889 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15890 non-constant and non-zero memset arguments.
15892 2018-05-22 Martin Liska <mliska@suse.cz>
15895 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15897 2018-05-22 Richard Biener <rguenther@suse.de>
15899 PR tree-optimization/85863
15900 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15901 comparisons when vectype is specified.
15902 (vectorizable_condition): Do not specify vectype for
15903 vect_is_simple_cond when SLP vectorizing.
15905 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
15908 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15909 define __ibm128 as long double.
15910 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15911 as a distinct type when IEEE 128-bit support is enabled.
15912 (init_float128_ieee): Fix up conversions between IFmode and IEEE
15913 128-bit types to use the correct functions.
15914 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15915 convert between 128-bit floating point types that have different
15916 modes but the same representation, instead of using gen_lowpart to
15918 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15920 (IFKF_reg): New attributes to give the register constraints for
15922 (extend<mode>tf2_internal): New insns to mark an explicit
15923 conversion between 128-bit floating point types that have a
15924 different mode but share the same representation.
15926 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
15928 PR tree-optimization/85814
15929 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15930 a null return from get_strinfo when unsharing the next
15931 strinfo in the chain.
15933 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15936 * varasm.c (weak_finish): Clean up weak_decls.
15938 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15940 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15941 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15942 UNSPEC_UADALP values.
15943 * config/aarch64/iterators.md (ABAL): New int iterator.
15946 (sur): Add mappings for the above.
15947 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15949 (aarch64_<sur>abal<mode>_4): Likewise.
15950 (aarch64_<sur>adalp<mode>_3): Likewise.
15951 (<sur>sadv16qi): New define_expand.
15953 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
15955 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15956 (*movdf_internal): Ditto.
15957 (*rcpsf2_sse): Ditto.
15958 (*rsqrtsf2_sse): Ditto.
15959 (*sqrt<mode>2_sse): Ditto.
15961 2018-05-21 Tamar Christina <tamar.christina@arm.com>
15963 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15965 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15966 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15967 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15968 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15970 * config/aarch64/arm_neon.h: Likewise.
15971 * config/aarch64/iterators.md (VQ_I): New.
15973 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
15975 * config.gcc: Add arc/t-multilib-linux to tmake_file for
15977 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15980 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
15982 * config/nds32/constraints.md (S): New constraint.
15983 * config/nds32/nds32.md (call_internal): Use constraint S.
15984 (call_value_internal): Likewise.
15985 (sibcall_internal): Likewise.
15986 (sibcall_value_internal): Likewise.
15988 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15989 Chung-Ju Wu <jasonwucj@gmail.com>
15991 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15992 into consideration.
15994 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
15995 Chung-Ju Wu <jasonwucj@gmail.com>
15997 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15998 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15999 (nds32_rtx_costs_impl): Simplify.
16000 (nds32_address_cost_impl): Simplify.
16001 (nds32_init_rtx_costs): New function.
16002 (nds32_rtx_costs_speed_prefer): Likewise.
16003 (nds32_rtx_costs_size_prefer): Likewise.
16004 (nds32_address_cost_speed_prefer): Likewise.
16005 (nds32_address_cost_speed_fwprop): Likewise.
16006 (nds32_address_cost_size_prefer): Likewise.
16007 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16008 * config/nds32/nds32.c (nds32_option_override): Use
16009 nds32_init_rtx_costs function.
16011 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16013 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16014 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16015 (TARGET_PIPELINE_N8): Likewise.
16016 (TARGET_PIPELINE_N10): Likewise.
16017 (TARGET_PIPELINE_N13): Likewise.
16018 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16020 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16022 * config/nds32/nds32-fpu.md: Update copyright year.
16024 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16026 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16028 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16030 * config/nds32/nds32.c
16031 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16032 * config/nds32/nds32.opt (minline-asm-r15): New option.
16034 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16036 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16038 * config/nds32/nds32.md (abssi2): New pattern.
16040 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16042 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16043 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16044 Merge insn pattern from sse_cvtsi2ss<round_name> and
16045 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16046 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16047 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16048 using SWI48 mode iterator.
16049 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16050 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16051 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16052 pattern from sse_cvttss2si<round_saeonly_name>
16053 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16054 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16055 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16056 using SWI48 mode iterator.
16057 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16058 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16059 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16060 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16061 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16062 using SWI48 mode iterator.
16063 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16064 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16065 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16066 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16067 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16068 SWI48 mode iterator.
16069 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16070 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16071 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16072 pattern from sse_cvttsd2si<round_saeonly_name>
16073 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16075 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16077 * config/nds32/nds32-md-auxiliary.c
16078 (nds32_valid_smw_lwm_base_p): Refine.
16079 (nds32_output_smw_single_word): Refine.
16080 (nds32_output_smw_double_word): New.
16081 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16083 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16085 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16086 (nds32_output_stack_pop): Refine.
16087 (nds32_expand_unaligned_load): Refine.
16088 (nds32_expand_unaligned_store): Refine.
16090 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16091 Chung-Ju Wu <jasonwucj@gmail.com>
16093 * config/nds32/constants.md: Add TP_REGNUM constant.
16094 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16095 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16097 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16098 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16099 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16100 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16101 and PIC code generation.
16102 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16104 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16106 * config/nds32/nds32.md: Support TLS and PIC.
16107 * config/nds32/nds32.c: Support TLS and PIC.
16108 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16109 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16112 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16114 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16115 mode with E_ prefix.
16117 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16118 Chung-Ju Wu <jasonwucj@gmail.com>
16120 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16121 * config/nds32/nds32-md-auxiliary.c
16122 (symbolic_reference_mentioned_p): New.
16123 (nds32_legitimize_ict_address): New.
16124 (nds32_expand_ict_move): New.
16125 (nds32_indirect_call_referenced_p): New.
16126 (nds32_symbol_binds_local_p): Delete.
16127 (nds32_long_call_p): Modify.
16128 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16129 * config/nds32/nds32-protos.h
16130 (symbolic_reference_mentioned_p): Declare.
16131 (nds32_legitimize_ict_address): Declare.
16132 (nds32_expand_ict_move): Declare.
16133 (nds32_indirect_call_referenced_p): Declare.
16134 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16135 (nds32_relax_group): Use nds32_ict_const_p as condition.
16136 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16137 (nds32_asm_file_start): Output ict_model directive in asm code.
16138 (nds32_legitimate_address_p): Consider indirect call.
16139 (nds32_print_operand): Consider indirect call.
16140 (nds32_print_operand_address): Consider indirect call.
16141 (nds32_insert_attributes): Handle "indirect_call" attribute.
16142 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16143 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16144 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16145 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16146 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16147 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16148 (TARGET_ICT_MODEL_SMALL): Define.
16149 (TARGET_ICT_MODEL_LARGE): Define.
16150 * config/nds32/nds32.md (movsi): Consider ict model.
16151 (call, call_value): Consider ict model.
16152 (sibcall, sibcall_value): Consider ict model.
16153 * config/nds32/nds32.opt (mict-model): New option.
16154 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16157 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16158 Monk Chiang <sh.chiang04@gmail.com>
16159 Jim Wilson <jimw@sifive.com>
16161 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16162 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16163 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16164 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16165 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16166 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16167 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16168 compute save_libcall_adjustment properly.
16169 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16170 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16171 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16172 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16173 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16174 (ABI_SPEC): Handle mabi=ilp32e.
16175 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16176 (RVE): Add RVE mask.
16177 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16178 <-march>: Add rv32e as an example.
16180 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16183 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16184 (intra_create_variable_infos): Handle C++ constructors.
16186 2018-05-18 Martin Liska <mliska@suse.cz>
16188 * passes.def: Remove a redundant pass.
16190 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16193 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16195 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16197 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16199 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16201 (armv2, armv2a, armv3, armv3m): Delete architectures.
16202 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16203 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16204 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16206 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16207 (*mulsidi3adddi): Likewise.
16208 (mulsidi3): Likewise.
16209 (*mulsidi3_nov6): Likewise.
16210 (umulsidi3): Likewise.
16211 (umulsidi3_nov6): Likewise.
16212 (umaddsidi4): Likewise.
16213 (*umulsidi3adddi): Likewise.
16214 (smulsi3_highpart): Likewise.
16215 (*smulsi3_highpart_nov6): Likewise.
16216 (umulsi3_highpart): Likewise.
16217 (*umulsi3_highpart_nov6): Likewise.
16218 * config/arm/arm.h (arm_arch3m): Delete.
16219 * config/arm/arm.c (arm_arch3m): Delete.
16220 (arm_option_override_internal): Update armv3-related comment.
16221 (arm_configure_build_target): Delete use of isa_bit_mode32.
16222 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16223 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16224 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16225 (mulsa3): Likewise.
16226 (mulusa3): Likewise.
16227 * config/arm/arm-protos.h (arm_arch3m): Delete.
16228 * config/arm/arm-tables.opt: Regenerate.
16229 * config/arm/arm-tune.md: Likewise.
16230 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16231 deleted architectures.
16233 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16235 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16236 (armv5t, armv5te): New features.
16237 (ARMv5, ARMv5e): Delete fgroups.
16238 (ARMv5t, ARMv5te): Adjust for above changes.
16239 (ARMv6m): Likewise.
16240 (armv5, armv5e): Delete arches.
16241 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16243 (*call_reg_arm): Likewise.
16244 (*call_value_reg_armv5): Likewise.
16245 (*call_value_reg_arm): Likewise.
16246 (*call_symbol): Likewise.
16247 (*call_value_symbol): Likewise.
16248 (*sibcall_insn): Likewise.
16249 (*sibcall_value_insn): Likewise.
16250 (clzsi2): Likewise.
16251 (prefetch): Likewise.
16252 (define_split and define_peephole2 dependent on arm_arch5):
16254 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16256 (TARGET_ARM_QBIT): Likewise.
16257 (TARGET_DSP_MULTIPLY): Likewise.
16258 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16259 (arm_arch5, arm_arch5e): Delete.
16260 (arm_arch5t, arm_arch5te): Declare.
16261 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16262 (arm_arch5t): Declare.
16263 (arm_option_reconfigure_globals): Update for the above.
16264 (arm_options_perform_arch_sanity_checks): Update comment, replace
16265 use of arm_arch5 with arm_arch5t.
16266 (use_return_insn): Likewise.
16267 (arm_emit_call_insn): Likewise.
16268 (output_return_instruction): Likewise.
16269 (arm_final_prescan_insn): Likewise.
16270 (arm_coproc_builtin_available): Likewise.
16271 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16272 arm_arch5e with arm_arch5t and arm_arch5te.
16273 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16274 (arm_arch5t, arm_arch5te): Declare.
16275 * config/arm/arm-tables.opt: Regenerate.
16276 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16277 * config/arm/t-multilib: Likewise.
16278 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16279 instead of arm_arch5.
16280 (*call_reg_thumb1): Likewise.
16281 (*call_value_reg_thumb1_v5): Likewise.
16282 (*call_value_reg_thumb1): Likewise.
16283 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16285 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16287 2018-05-18 Martin Liska <mliska@suse.cz>
16289 PR gcov-profile/84846
16290 * doc/gcov.texi: Document -t option of gcov tool.
16292 2018-05-18 Martin Liska <mliska@suse.cz>
16294 PR gcov-profile/84846
16295 * gcov.c (print_usage): Add new -t option.
16296 (process_args): Handle the option.
16297 (generate_results): Use stdout as output when requested by
16300 2018-05-18 Martin Liska <mliska@suse.cz>
16302 PR gcov-profile/84846
16303 * coverage.c (coverage_init): Write PWD to .gcno file.
16304 * doc/gcov.texi: Document how working directory is printed.
16305 * gcov-dump.c (dump_gcov_file): Print PWD.
16306 * gcov.c (output_intermediate_file): Likewise.
16307 (read_graph_file): Read PWD string.
16308 (output_lines): Print PWD.
16310 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16312 PR middle-end/85817
16313 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16314 for retval and return false if all args to phi are zero.
16316 2018-05-18 Richard Biener <rguenther@suse.de>
16318 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16320 (evrp_dom_walker::before_dom_children): Call it.
16322 2018-05-18 Richard Biener <rguenther@suse.de>
16324 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16325 results when processing array refs with variable index.
16327 2018-05-18 Toon Moene <toon@moene.org>
16329 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16330 directly after that of -floop-interchange. Indicate that both
16331 options are enabled by default when specifying -O3.
16333 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16335 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16336 iterator. Delete separate integer-mode vec_set<mode> expander.
16337 (aarch64_simd_vec_setv2di): Delete.
16338 (vec_setv2di): Delete.
16339 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16340 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16341 the "w, r" alternative.
16343 2018-05-18 Martin Liska <mliska@suse.cz>
16345 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16346 * tree-pass.h (make_pass_lower_switch_O0): New function.
16347 * tree-switch-conversion.c (node_has_low_bound): Remove.
16348 (node_has_high_bound): Likewise.
16349 (node_is_bounded): Likewise.
16350 (class pass_lower_switch): Make it a template type and create
16352 (pass_lower_switch::execute): Add template argument.
16353 (make_pass_lower_switch): New function.
16354 (make_pass_lower_switch_O0): New function.
16355 (do_jump_if_equal): Remove.
16356 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16357 all the hard work to tree optimization passes.
16359 2018-05-18 Martin Liska <mliska@suse.cz>
16361 * dbgcnt.c (limit_low): Renamed from limit.
16362 (limit_high): New variable.
16363 (dbg_cnt_is_enabled): Check for upper limit.
16364 (dbg_cnt): Adjust dumping.
16365 (dbg_cnt_set_limit_by_index): Add new argument for high
16367 (dbg_cnt_set_limit_by_name): Likewise.
16368 (dbg_cnt_process_single_pair): Parse new format.
16369 (dbg_cnt_process_opt): Use strtok.
16370 (dbg_cnt_list_all_counters): Remove 'value' and add
16372 * doc/invoke.texi: Document changes.
16374 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16376 * doc/sourcebuild.texi (scalar_all_fma): Document.
16377 * tree.def (FMA_EXPR): Delete.
16378 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16379 * internal-fn.c (ternary_direct): New macro.
16380 (expand_ternary_optab_fn): Likewise.
16381 (direct_ternary_optab_supported_p): Likewise.
16382 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16383 * builtins.c (fold_builtin_fma): Delete.
16384 (fold_builtin_3): Don't call it.
16385 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16386 * expr.c (expand_expr_real_2): Likewise.
16387 * fold-const.c (operand_equal_p): Likewise.
16388 (fold_ternary_loc): Likewise.
16389 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16390 * gimple.c (DEFTREECODE): Likewise.
16391 * gimplify.c (gimplify_expr): Likewise.
16392 * optabs-tree.c (optab_for_tree_code): Likewise.
16393 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16394 * tree-eh.c (operation_could_trap_p): Likewise.
16395 (stmt_could_throw_1_p): Likewise.
16396 * tree-inline.c (estimate_operator_cost): Likewise.
16397 * tree-pretty-print.c (dump_generic_node): Likewise.
16398 (op_code_prio): Likewise.
16399 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16400 * tree-ssa-operands.c (get_expr_operands): Likewise.
16401 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16402 * fold-const-call.h (fold_fma): Delete.
16403 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16404 CFN_FNMA and CFN_FNMS.
16405 (fold_fma): Delete.
16406 * genmatch.c (combined_fn): New enum.
16407 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16408 (commutative_op): New function.
16409 (commutate): Use it. Handle more than 2 operands.
16410 (dt_operand::gen_gimple_expr): Use commutative_op.
16411 (parser::parse_expr): Allow :c to be used with non-binary
16412 operators if the commutative operand is known.
16413 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16414 CFN_FMS, CFN_FNMA and CFN_FNMS.
16415 (backprop::process_assign_use): Remove FMA_EXPR handling.
16416 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16417 (gen_hsa_fma): New function.
16418 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16419 IFN_FNMA and IFN_FNMS.
16420 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16421 * gimple-fold.h (follow_all_ssa_edges): Declare.
16422 * gimple-fold.c (follow_all_ssa_edges): New function.
16423 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16424 gimple_build interface and use follow_all_ssa_edges to fold the result.
16425 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16426 instead of checking for optabs directly.
16427 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16428 rather than FMA_EXPRs.
16429 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16430 call to IFN_FMA instead of an FMA_EXPR.
16432 2018-05-17 Jim Wilson <jimw@sifive.com>
16434 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16435 sign extended promoted subreg, and the range does not have the sign bit
16436 set, then do a sign extend.
16438 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16439 test, check for sign extended subreg and/or constant operands, and
16440 do a sign extend in that case.
16442 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16444 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16445 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16447 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16448 Change logics_shift_reg to logics_shift_imm.
16449 (thunderx2t99_fp_loadpair_basic): Delete.
16450 (thunderx2t99_fp_storepair_basic): Delete.
16451 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16452 (thunderx2t99_asimd_polynomial): Delete.
16453 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16454 and neon_fp_mul_d_scalar_q.
16455 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16456 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16457 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16458 (thunderx2t99_asimd_lut): Add missing tbl types.
16459 (thunderx2t99_asimd_ext): Delete.
16460 (thunderx2t99_asimd_load1_1_mult): Delete.
16461 (thunderx2t99_asimd_load1_2_mult): Delete.
16462 (thunderx2t99_asimd_load1_ldp): New.
16463 (thunderx2t99_asimd_load1): New.
16464 (thunderx2t99_asimd_load2): Add missing *load2* types.
16465 (thunderx2t99_asimd_load3): New.
16466 (thunderx2t99_asimd_load4): New.
16467 (thunderx2t99_asimd_store1_1_mult): Delete.
16468 (thunderx2t99_asimd_store1_2_mult): Delete.
16469 (thunderx2t99_asimd_store2_mult): Delete.
16470 (thunderx2t99_asimd_store2_onelane): Delete.
16471 (thunderx2t99_asimd_store_stp): New.
16472 (thunderx2t99_asimd_store1): New.
16473 (thunderx2t99_asimd_store2): New.
16474 (thunderx2t99_asimd_store3): New.
16475 (thunderx2t99_asimd_store4): New.
16477 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16479 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16480 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16482 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16483 Segher Boessenkool <segher@kernel.crashing.org>
16486 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16489 2018-05-17 Richard Biener <rguenther@suse.de>
16491 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16492 for pruning loop and prune defs feeding only already visited PHIs.
16494 2018-05-17 Richard Biener <rguenther@suse.de>
16496 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16498 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16499 Richard Biener <rguenther@suse.de>
16501 PR tree-optimization/85793
16502 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16503 for VMAT_ELEMENTWISE.
16505 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16507 * internal-fn.h (lookup_internal_fn): Declare
16508 * internal-fn.c (lookup_internal_fn): New function.
16509 * gimple.c (gimple_build_call_from_tree): Handle calls to
16510 internal functions.
16511 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16512 internal function names.
16513 * tree-pretty-print.c (dump_generic_node): Likewise.
16514 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16516 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16518 * gimple-fold.h (gimple_build): Make the function forms take
16519 combined_fn rather than built_in_function.
16520 (gimple_simplify): Likewise.
16521 * gimple-match-head.c (gimple_simplify): Likewise.
16522 * gimple-fold.c (gimple_build): Likewise.
16523 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16524 rather than gimple_build_call_internal.
16525 (get_initial_defs_for_reduction): Likewise.
16526 (vect_create_epilog_for_reduction): Likewise.
16527 (vectorizable_live_operation): Likewise.
16529 2018-05-17 Martin Liska <mliska@suse.cz>
16531 * gimple-ssa-sprintf.c (format_directive): Do not use
16532 space in between 'G_' and '('.
16534 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16537 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16538 even if the mask is not all ones.
16541 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16543 (ix86_gimple_fold_builtin): Likewise.
16546 * config/i386/i386.c: Include tree-vector-builder.h.
16547 (ix86_vector_shift_count): New function.
16548 (ix86_fold_builtin): Fold shift builtins by scalar count.
16549 (ix86_gimple_fold_builtin): Likewise.
16551 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16552 _mm512_setzero): New intrinsics.
16554 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16555 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16557 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16558 code generation for cases where splatting a value is not useful.
16559 * simplify-rtx.c (simplify_ternary_operation): Simplify
16560 vec_merge across a vec_duplicate and a paradoxical subreg forming
16561 a vector mode to a vec_concat.
16563 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16565 * config.gcc: Support "goldmont-plus".
16566 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16568 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16569 PROCESSOR_GOLDMONT_PLUS.
16570 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16571 (processor_target_table): Add "goldmont-plus".
16572 (PTA_GOLDMONT_PLUS): Define.
16573 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16574 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16575 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16576 (fold_builtin_cpu): Add "goldmont-plus".
16577 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16578 (ix86_option_override_internal): Add "goldmont-plus".
16579 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16580 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16581 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16582 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16584 2018-05-17 Richard Biener <rguenther@suse.de>
16586 PR tree-optimization/85757
16587 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16588 remove defs that only feed that PHI from further processing.
16590 2018-05-16 Jim Wilson <jimw@sifive.com>
16592 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16594 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16596 2018-05-16 Mark Wielaard <mark@klomp.org>
16598 * dwarf2out.c (count_index_strings): New function.
16599 (output_indirect_strings): Call count_index_strings and generate
16600 header for dwarf_version >= 5.
16602 2018-05-16 Mark Wielaard <mark@klomp.org>
16604 * dwarf2out.c (dwarf_FORM): New function.
16605 (set_indirect_string): Use dwarf_FORM.
16606 (reset_indirect_string): Likewise.
16607 (size_of_die): Likewise.
16608 (value_format): Likewise.
16609 (output_die): Likewise.
16610 (add_skeleton_AT_string): Likewise.
16611 (output_macinfo_op): Likewise.
16612 (index_string): Likewise.
16613 (output_index_string_offset): Likewise.
16614 (output_index_string): Likewise.
16615 (count_index_strings): Likewise.
16617 2018-05-16 Carl Love <cel@us.ibm.com>
16619 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16620 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16622 2018-05-16 Martin Jambor <mjambor@suse.cz>
16624 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16625 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16627 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16629 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16630 (fnma<mode>4): Likewise.
16631 (fms<mode>4): Likewise.
16632 (fnms<mode>4): Likewise.
16633 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16634 (aarch64_fnma<mode>4): Likewise.
16635 (aarch64_fms<mode>4): Likewise.
16636 (aarch64_fnms<mode>4): Likewise.
16637 (aarch64_fnmadd<mode>4): Likewise.
16639 2018-05-16 Jason Merrill <jason@redhat.com>
16641 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16643 2018-05-16 Richard Biener <rguenther@suse.de>
16645 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16646 (dump_stmt_cost): Declare.
16647 (add_stmt_cost): Dump cost we add.
16648 (add_stmt_costs): New function.
16649 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16650 No longer exported.
16651 (vect_analyze_stmt): Adjust prototype.
16652 (vectorizable_condition): Likewise.
16653 (vectorizable_live_operation): Likewise.
16654 (vectorizable_reduction): Likewise.
16655 (vectorizable_induction): Likewise.
16656 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16657 cost vector to pass to vectorizable_ and record afterwards.
16658 (vect_model_reduction_cost): Take cost vector argument and adjust.
16659 (vect_model_induction_cost): Likewise.
16660 (vectorizable_reduction): Likewise.
16661 (vectorizable_induction): Likewise.
16662 (vectorizable_live_operation): Likewise.
16663 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16664 SLP_TREE_NUMBER_OF_VEC_STMTS.
16665 (vect_analyze_slp_cost_1): Remove.
16666 (vect_analyze_slp_cost): Likewise.
16667 (vect_slp_analyze_node_operations): Take visited args and
16668 a target cost vector. Avoid processing already visited stmt sets.
16669 (vect_slp_analyze_operations): Use a local cost vector to gather
16670 costs and register those of non-discarded instances.
16671 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16672 (vect_schedule_slp_instance): Remove copying of
16673 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16675 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16676 adding cost. Record cost entry location.
16677 (vect_prologue_cost_for_slp_op): Function to compute cost of
16678 a constant or invariant generated for SLP vect in the prologue,
16679 split out from vect_analyze_slp_cost_1.
16680 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16681 (vect_model_promotion_demotion_cost): Likewise.
16682 (vect_model_store_cost): Likewise, make static.
16683 (vect_model_load_cost): Likewise.
16684 (vectorizable_bswap): Add cost vector arg and adjust.
16685 (vectorizable_call): Likewise.
16686 (vectorizable_simd_clone_call): Likewise.
16687 (vectorizable_conversion): Likewise.
16688 (vectorizable_assignment): Likewise.
16689 (vectorizable_shift): Likewise.
16690 (vectorizable_operation): Likewise.
16691 (vectorizable_store): Likewise.
16692 (vectorizable_load): Likewise.
16693 (vectorizable_condition): Likewise.
16694 (vectorizable_comparison): Likewise.
16695 (can_vectorize_live_stmts): Likewise.
16696 (vect_analyze_stmt): Likewise.
16697 (vect_transform_stmt): Adjust calls to vectorizable_*.
16698 * tree-vectorizer.c: Include gimple-pretty-print.h.
16699 (dump_stmt_cost): New function.
16701 2018-05-16 Richard Biener <rguenther@suse.de>
16703 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16704 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16705 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16706 (check_name): New callback.
16707 (dse_classify_store): Track cycles via a visited bitmap of PHI
16708 defs and simplify handling of in-loop and across loop dead stores
16709 and properly fail for loop-variant refs. Handle byte-tracking with
16710 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16713 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16715 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16716 (vect_get_mask_type_for_stmt): Likewise.
16717 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16719 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16720 to determine the statement's vector type and the vector type that
16721 should be used for calculating nunits. Deal with cases in which
16722 the type has to be deferred.
16723 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16724 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16725 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16726 (vect_determine_vf_for_stmt): New functions, split out from...
16727 (vect_determine_vectorization_factor): ...here.
16728 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16729 (vect_get_mask_type_for_stmt): New functions, split out from
16730 vect_determine_vectorization_factor.
16732 2018-05-16 Richard Biener <rguenther@suse.de>
16734 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16735 verify the [VEC_]COND_EXPR embedded comparison.
16737 2018-05-15 Martin Sebor <msebor@redhat.com>
16739 PR tree-optimization/85753
16740 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16741 RECORD_TYPE in addition to ARRAY_TYPE.
16743 2018-05-15 Martin Sebor <msebor@redhat.com>
16745 PR middle-end/85643
16746 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16748 2018-05-15 Richard Biener <rguenther@suse.de>
16750 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16751 add by_clobber_p one. Change algorithm to collect all defs
16752 representing uses we need to walk and try reducing them to
16753 a single one before failing.
16754 (dse_dom_walker::dse_optimize_stmt): Adjust.
16756 2018-05-13 Mark Wielaard <mark@klomp.org>
16758 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16759 (size_of_loc_descr): Likewise.
16760 (output_loc_operands): Likewise.
16761 (output_loc_operands_raw): Likewise.
16762 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16763 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16764 (hash_loc_operands): Likewise.
16765 (compare_loc_operands): Likewise.
16767 2018-05-14 Mark Wielaard <mark@klomp.org>
16769 * dwarf2out.c (count_index_addrs): New function.
16770 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16772 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16774 PR tree-optimization/83648
16775 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16776 return value as malloc candidate.
16778 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16781 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16782 param as true in call to suggest_attribute.
16784 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16786 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16787 -mreadonly-in-sdata.
16789 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16791 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16793 (aarch64_crypto_aesd_fused): Likewise.
16795 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16797 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16798 (movsi_aarch64): Likewise.
16799 (load_pairsi): Likewise.
16800 (load_pairdi): Likewise.
16801 (store_pairsi): Likewise.
16802 (store_pairdi): Likewise.
16803 (load_pairsf): Likewise.
16804 (load_pairdf): Likewise.
16805 (store_pairsf): Likewise.
16806 (store_pairdf): Likewise.
16807 (zero_extend): Likewise.
16808 (trunc): Swap alternatives.
16809 (fcvt_target): Add '?' to prefer w over r.
16811 2018-05-14 Jakub Jelinek <jakub@redhat.com>
16814 * config/i386/i386.md: Disallow non-commutative arithmetics in
16815 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16816 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
16817 in the peephole2 before it.
16819 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
16821 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16822 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16823 (ix86_handle_option): Handle -mcldemote.
16824 * config.gcc: New header.
16825 * config/i386/cldemoteintrin.h: New file.
16826 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16827 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16829 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16830 OPTION_MASK_ISA_CLDEMOTE.
16831 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16832 (ix86_valid_target_attribute_inner_p): Ditto.
16833 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16834 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16835 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16836 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16837 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16839 * config/i386/i386.opt: Add -mcldemote.
16840 * config/i386/x86intrin.h: New header.
16841 * doc/invoke.texi: Add -mcldemote.
16843 2018-05-14 Richard Biener <rguenther@suse.de>
16845 * doc/match-and-simplify.texi: Adjust :s documentation.
16847 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
16849 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16850 intended memcpy size.
16851 (REORDER_45): Likewise.
16853 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
16855 * sort.cc: New file.
16856 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16857 * vec.c (qsort_chk): Use gcc_qsort.
16858 * Makefile.in (OBJS-libcommon): Add sort.o.
16859 (build/sort.o): New target. Use it...
16860 (BUILD_RTL): ... here, and...
16861 (build/gencfn-macros): ... here, and...
16862 (build/genmatch): ... here.
16864 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16865 Chung-Ju Wu <jasonwucj@gmail.com>
16867 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16868 * config/nds32/nds32-graywolf.md: New file.
16869 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16870 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16872 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16873 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16874 * config/nds32/nds32.md (pipeline_model): Add graywolf.
16875 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16876 * config/nds32/pipelines.md: Include n15 settings.
16878 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16879 Chung-Ju Wu <jasonwucj@gmail.com>
16881 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16882 * config/nds32/nds32-n13.md: New file.
16883 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16884 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16886 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16887 * config/nds32/nds32.md (pipeline_model): Add n13.
16888 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16889 * config/nds32/pipelines.md: Include n13 settings.
16891 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16892 Chung-Ju Wu <jasonwucj@gmail.com>
16894 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16895 * config/nds32/nds32-n10.md: New file.
16896 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16897 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16899 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16900 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16901 * config/nds32/nds32.md (pipeline_model): Add n10.
16902 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16903 * config/nds32/pipelines.md: Include n10 settings.
16905 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
16906 Kito Cheng <kito.cheng@gmail.com>
16907 Chung-Ju Wu <jasonwucj@gmail.com>
16909 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16910 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16911 Add enum values for DSP extension instructions.
16912 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16914 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16915 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16916 New code iterators.
16917 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16918 * config/nds32/nds32-dspext.md: New file for DSP implementation.
16919 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16920 * config/nds32/nds32-intrinsic.md: Likewise.
16921 * config/nds32/nds32_intrinsic.h: Likewise.
16922 * config/nds32/nds32-md-auxiliary.c: Likewise.
16923 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16924 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16925 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16926 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16927 * config/nds32/nds32-protos.h: New declarations for DSP extension.
16928 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16929 TYPE_DMAC in switch statement.
16930 * config/nds32/nds32.c: New checking and implementation for DSP
16931 extension instructions.
16932 * config/nds32/nds32.h: Likewise.
16933 * config/nds32/nds32.md: Likewise.
16934 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16935 * config/nds32/predicates.md: Implement new predicates for DSP
16938 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16940 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16941 Reformat alternatives and attributes so it is easier to identify
16942 which constraints/attributes go with which instruction.
16943 (mov<mode>_hardfloat32, FMOVE64): Likewise.
16944 (mov<mode>_softfloat32, FMOVE64): Likewise.
16945 (mov<mode>_hardfloat64, FMOVE64): Likewise.
16946 (mov<mode>_softfloat64, FMOVE64): Likewise.
16948 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
16950 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16952 (Basic PowerPC Built-in Functions): The new name of the
16953 subsection previously known as "PowerPC Built-in Functions".
16954 (Basic PowerPC Built-in Functions Available on all Configurations):
16956 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16957 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16958 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16959 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16961 2018-05-11 Martin Jambor <mjambor@suse.cz>
16964 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16967 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16970 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16972 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
16974 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16975 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16976 (ix86_handle_option): Handle -mwaitpkg.
16977 * config.gcc: New header.
16978 * config/i386/cpuid.h (bit_WAITPKG): New bit.
16979 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16980 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16982 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16983 OPTION_MASK_ISA_WAITPKG.
16984 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16985 (ix86_option_override_internal): Add PTA_WAITPKG.
16986 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16987 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16988 IX86_BUILTIN_TPAUSE.
16989 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16990 __builtin_ia32_umwait and __builtin_ia32_tpause.
16991 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16992 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16993 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16994 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16995 UNSPECV_TPAUSE): New.
16996 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16997 * config/i386/i386.opt: Add -mwaitpkg.
16998 * config/i386/waitpkgintrin.h: New file.
16999 * config/i386/x86intrin.h: New header.
17000 * doc/invoke.texi: Add -mwaitpkg.
17002 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17005 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17007 (cortex-m0): Use armv6s-m isa.
17008 (cortex-m0plus): Likewise.
17009 (cortex-m1): Likewise.
17010 (cortex-m0.small-multiply): Likewise.
17011 (cortex-m0plus.small-multiply): Likewise.
17012 (cortex-m1.small-multiply): Likewise.
17014 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17015 Jakub Jelinek <jakub@redhat.com>
17017 PR tree-optimization/85692
17018 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17019 source permute as well.
17021 2018-05-11 Martin Liska <mliska@suse.cz>
17024 * doc/extend.texi: Document LLVM style format for no_sanitize
17027 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17029 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17030 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17031 (mode_supports_vsx_dform_quad): Likewise.
17032 (mode_supports_vmx_dform): Move these functions to be next to the
17033 other mode_supports functions.
17034 (mode_supports_dq_form): Likewise.
17035 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17036 mode_supports_dq_form.
17037 (reg_offset_addressing_ok_p): Likewise.
17038 (offsettable_ok_by_alignment): Likewise.
17039 (rs6000_legitimate_offset_address_p): Likewise.
17040 (legitimate_lo_sum_address_p): Likewise.
17041 (rs6000_legitimize_address): Likewise.
17042 (rs6000_legitimize_reload_address): Likewise.
17043 (rs6000_secondary_reload_inner): Likewise.
17044 (rs6000_preferred_reload_class): Likewise.
17045 (rs6000_output_move_128bit): Likewise.
17047 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17049 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17050 Generate SImode target register for null target.
17051 <case IX86_BUILTIN_XGETBV>: Ditto.
17052 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17053 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17055 2018-05-10 Carl Love <cel@us.ibm.com>
17057 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17058 dcbtt and dcbtstt if operands[2] is 0.
17060 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17063 * config/i386/sse.md (usadv64qi): New expander.
17065 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17067 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17068 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17069 -maltivec=be support.
17070 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17071 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17072 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17073 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17074 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17075 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17076 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17077 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17078 altivec_vsumsws): Adjust.
17079 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17080 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17081 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17083 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17084 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17085 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17086 (altivec_lve<VI_char>x): Delete expand.
17087 (*altivec_lve<VI_char>x_internal): Rename to...
17088 (altivec_lve<VI_char>x): ... this.
17089 (altivec_lvxl_<mode>): Delete expand.
17090 (*altivec_lvxl_<mode>_internal): Rename to ...
17091 (altivec_lvxl_<mode>): ... this.
17092 (altivec_stvxl_<mode>): Delete expand.
17093 (*altivec_stvxl_<mode>_internal): Rename to ...
17094 (altivec_stvxl_<mode>): ... this.
17095 (altivec_stve<VI_char>x): Delete expand.
17096 (*altivec_stve<VI_char>x_internal): Rename to ...
17097 (altivec_stve<VI_char>x): ... this.
17098 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17099 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17100 reduc_plus_scal_<mode>): Adjust.
17101 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17103 (rs6000_cpu_cpp_builtins): Adjust.
17104 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17105 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17106 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17107 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17108 -maltivec=be support.
17109 (rs6000_split_vec_extract_var): Adjust.
17110 (rs6000_split_v4si_init): Adjust.
17111 (swap_selector_for_mode): Delete.
17112 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17113 altivec_expand_stvex_be): Delete.
17114 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17115 -maltivec=be support.
17116 (rs6000_gimple_fold_builtin): Ditto.
17117 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17119 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17120 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17121 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17122 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17123 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17124 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17125 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17126 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17127 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17128 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17129 anonymous split): Adjust.
17130 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17131 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17133 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17135 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17136 when --with-gxx-include-dir is also specified.
17137 * configure: Regenerate.
17139 2018-05-09 Jim Wilson <jimw@sifive.com>
17142 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17143 * config/riscv/t-withmultilib: New.
17144 * config/riscv/withmultilib.h: New.
17145 * doc/install.texi: Document RISC-V --with-multilib-list support.
17147 2018-05-09 Richard Biener <rguenther@suse.de>
17149 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17151 (vect_bb_vectorization_profitable_p): Adjust. Compute
17152 actual scalar cost using the cost vector and the add_stmt_cost
17155 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17157 PR rtl-optimization/85645
17158 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17159 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17161 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17163 PR rtl-optimization/85645
17164 * shrink-wrap.c (spread_components): Return a boolean saying if
17165 anything was changed.
17166 (try_shrink_wrapping_separate): Iterate spread_components until
17167 nothing changes anymore.
17169 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17171 PR rtl-optimization/85645
17172 * regrename.c (build_def_use): Also kill the chains that include the
17173 destination of a REG_CFA_REGISTER note.
17175 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17177 PR rtl-optimization/85645
17178 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17179 insn that has a REG_CFA_REGISTER note.
17181 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17183 * cfgexpand.c (expand_clobber): New function.
17184 (expand_gimple_stmt_1): Use it.
17185 * tree-vect-stmts.c (vect_clobber_variable): New function,
17187 (vectorizable_simd_clone_call): ...here.
17188 (vectorizable_store): Emit a clobber either side of an
17189 IFN_STORE_LANES sequence.
17190 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17192 2018-05-09 Tom de Vries <tom@codesourcery.com>
17195 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17196 (define_insn "trap_if_false"): Add exit after trap.
17198 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17200 PR rtl-optimization/85638
17201 * bb-reorder.c: Include common/common-target.h.
17202 (create_forwarder_block): New function extracted from...
17203 (fix_up_crossing_landing_pad): ...here. Rename into...
17204 (dw2_fix_up_crossing_landing_pad): ...this.
17205 (sjlj_fix_up_crossing_landing_pad): New function.
17206 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17207 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17208 from both partitions and exit the loop after one iteration.
17210 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17213 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17215 (Basic PowerPC Built-in Functions): The new name of the
17216 subsection previously known as "PowerPC Built-in Functions".
17217 (Basic PowerPC Built-in Functions Available on all Configurations):
17219 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17221 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17223 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17225 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17228 2018-05-08 Jim Wilson <jimw@sifive.com>
17230 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17231 (LD_EMUL_SUFFIX): New.
17232 (LINK_SPEC): Use it.
17234 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17236 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17238 (Basic PowerPC Built-in Functions): The new name of the
17239 subsection previously known as "PowerPC Built-in Functions".
17240 (Basic PowerPC Built-in Functions Available on all Configurations):
17242 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17244 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17246 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17248 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17251 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17254 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17255 after cmpelim optimization.
17257 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17259 * config.gcc: Support "goldmont".
17260 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17261 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17262 PROCESSOR_GOLDMONT.
17263 * config/i386/i386.c (m_GOLDMONT): Define.
17264 (processor_target_table): Add "goldmont".
17265 (PTA_GOLDMONT): Define.
17266 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17267 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17268 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17269 (fold_builtin_cpu): Add "goldmont".
17270 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17271 (ix86_option_override_internal): Add "goldmont".
17272 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17273 (processor_type): Add PROCESSOR_GOLDMONT.
17274 * config/i386/i386.md: Add CPU "glm".
17275 * config/i386/glm.md: New file.
17276 * config/i386/x86-tune.def: Add m_GOLDMONT.
17277 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17279 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17282 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17284 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17285 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17286 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17289 * config/i386/i386.c (ix86_fold_builtin): Handle
17290 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17293 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17294 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17296 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17299 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17300 (check_arch): Likewise.
17301 (check_fpu): Return the result rather than printing it.
17302 (end arch): Fix operator precedence.
17303 (end cpu): Likewise.
17304 (END): Print the result from check_fpu.
17306 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17307 Alan Hayward <alan.hayward@arm.com>
17308 David Sherwood <david.sherwood@arm.com>
17310 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17311 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17312 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17313 (*fcmuo<mode>_and): New patterns.
17315 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17317 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17318 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17319 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17320 (cmp_op, sve_imm_con): New code attributes.
17321 (SVE_COND_INT_CMP, imm_con): Delete.
17322 (cmp_op): Remove above unspecs from int attribute.
17323 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17325 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17326 comparison-specific unspecs.
17327 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17328 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17329 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17330 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17331 (*vec_fcm<cmp_op><mode>): Rename to...
17332 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17333 (*vec_fcmuo<mode>): Rename to...
17334 (*fcmuo<mode>): ...this and adjust likewise.
17335 (*pred_fcm<cmp_op><mode>): New pattern.
17336 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17337 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17339 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17341 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17342 (aarch64_emit_sve_predicated_cond): New function.
17343 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17344 (aarch64_emit_unspec_cond_or): Replace with...
17345 (aarch64_emit_sve_or_conds): ...this new function. Use
17346 aarch64_emit_sve_ptrue_op for the individual comparisons and
17347 aarch64_emit_binop to OR them together.
17348 (aarch64_emit_inverted_unspec_cond): Replace with...
17349 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17350 aarch64_emit_sve_ptrue_op for the comparison and
17351 aarch64_emit_unop to invert the result.
17352 (aarch64_expand_sve_vec_cmp_float): Update after the above
17353 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17355 2018-05-07 Nathan Sidwell <nathan@acm.org>
17357 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17358 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17359 (Backwards Compatibility): Likewise.
17361 2018-05-07 Luis Machado <luis.machado@linaro.org>
17365 2018-05-07 Luis Machado <luis.machado@linaro.org>
17367 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17368 <prefetch_dynamic_strides>: New const bool field.
17369 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17370 prefetch_dynamic_strides.
17371 (exynosm1_prefetch_tune): Likewise.
17372 (thunderxt88_prefetch_tune): Likewise.
17373 (thunderx_prefetch_tune): Likewise.
17374 (thunderx2t99_prefetch_tune): Likewise.
17375 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17377 (aarch64_override_options_internal): Update to set
17378 PARAM_PREFETCH_DYNAMIC_STRIDES.
17379 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17380 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17381 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17382 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17383 prefetch-dynamic-strides setting.
17385 2018-05-07 Luis Machado <luis.machado@linaro.org>
17387 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17388 <minimum_stride>: New const int field.
17389 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17390 minimum_stride field.
17391 (exynosm1_prefetch_tune): Likewise.
17392 (thunderxt88_prefetch_tune): Likewise.
17393 (thunderx_prefetch_tune): Likewise.
17394 (thunderx2t99_prefetch_tune): Likewise.
17395 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17396 (aarch64_override_options_internal): Update to set
17397 PARAM_PREFETCH_MINIMUM_STRIDE.
17398 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17399 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17400 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17401 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17402 stride is constant and is below the minimum stride threshold.
17404 2018-05-07 Luis Machado <luis.machado@linaro.org>
17406 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17409 2018-05-07 Luis Machado <luis.machado@linaro.org>
17411 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17412 <prefetch_dynamic_strides>: New const bool field.
17413 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17414 prefetch_dynamic_strides.
17415 (exynosm1_prefetch_tune): Likewise.
17416 (thunderxt88_prefetch_tune): Likewise.
17417 (thunderx_prefetch_tune): Likewise.
17418 (thunderx2t99_prefetch_tune): Likewise.
17419 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17421 (aarch64_override_options_internal): Update to set
17422 PARAM_PREFETCH_DYNAMIC_STRIDES.
17423 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17424 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17425 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17426 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17427 prefetch-dynamic-strides setting.
17429 2018-05-07 Luis Machado <luis.machado@linaro.org>
17431 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17432 <minimum_stride>: New const int field.
17433 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17434 minimum_stride field.
17435 (exynosm1_prefetch_tune): Likewise.
17436 (thunderxt88_prefetch_tune): Likewise.
17437 (thunderx_prefetch_tune): Likewise.
17438 (thunderx2t99_prefetch_tune): Likewise.
17439 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17440 (aarch64_override_options_internal): Update to set
17441 PARAM_PREFETCH_MINIMUM_STRIDE.
17442 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17443 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17444 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17445 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17446 stride is constant and is below the minimum stride threshold.
17448 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17451 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17452 the type is addressable. Don't force op into register if it has
17455 2018-05-05 Roland McGrath <mcgrathr@google.com>
17458 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17459 any section for which we don't know a specific type it should have,
17460 regardless of name. Previously this was done only for the exact
17461 names ".init_array", ".fini_array", and ".preinit_array".
17462 (default_elf_asm_named_section): Add comment about
17463 relationship with default_section_type_flags and SECTION_NOTYPE.
17464 (get_section): Don't consider it a type conflict if one side has
17465 SECTION_NOTYPE and the other doesn't, as long as neither has the
17466 SECTION_BSS et al used in the default_section_type_flags logic.
17468 2018-05-05 Tom de Vries <tom@codesourcery.com>
17471 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17472 (workaround_barsyncs): New function.
17473 (nvptx_reorg): Use workaround_barsyncs.
17474 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17475 (define_expand "nvptx_membar_cta"): New define_expand.
17476 (define_insn "*nvptx_membar_cta"): New insn.
17478 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17480 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17481 To improve optimization opportunities.
17482 * builtin-types.def: The new needed builtin types for the above.
17484 2018-05-04 Richard Biener <rguenther@suse.de>
17486 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17487 * gimple-ssa-store-merging.c
17488 (imm_store_chain_info::output_merged_store): Remove redundant create,
17489 release split_store vector contents on failure.
17490 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17491 scalar stmt vector on cache hit.
17493 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17495 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17497 * config.gcc (powerpc-xilinx-eabi*): Remove.
17498 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17500 (fusion_addis_mem_combo_load): Ditto.
17501 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17503 (rs6000_cpu_cpp_builtins): Ditto.
17504 * config/rs6000/rs6000-linux.c
17505 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17506 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17507 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17509 (rs6000_setup_reg_addr_masks): Ditto.
17510 (rs6000_init_hard_regno_mode_ok): Ditto.
17511 (rs6000_option_override_internal): Ditto.
17512 (legitimate_lo_sum_address_p): Ditto.
17513 (rs6000_legitimize_address): Ditto.
17514 (rs6000_legitimize_reload_address): Ditto.
17515 (rs6000_legitimate_address_p): Ditto.
17516 (abi_v4_pass_in_fpr): Ditto.
17517 (setup_incoming_varargs): Ditto.
17518 (rs6000_gimplify_va_arg): Ditto.
17519 (rs6000_split_multireg_move): Ditto.
17520 (rs6000_savres_strategy): Ditto.
17521 (rs6000_emit_prologue_components): Ditto.
17522 (rs6000_emit_epilogue_components): Ditto.
17523 (rs6000_emit_prologue): Ditto.
17524 (rs6000_emit_epilogue): Ditto.
17525 (rs6000_elf_file_end): Ditto.
17526 (rs6000_function_value): Ditto.
17527 (rs6000_libcall_value): Ditto.
17528 * config/rs6000/rs6000.h: Ditto.
17529 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17530 (TARGET_MINMAX): ... this. New.
17531 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17532 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17533 (*movsi_internal1_single): Delete.
17534 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17535 mfpu=, mxilinx-fpu): Delete.
17536 * config/rs6000/singlefp.h: Delete.
17537 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17538 * config/rs6000/t-rs6000: Ditto.
17539 * config/rs6000/t-xilinx: Delete.
17540 * config/rs6000/titan.md: Adjust for fp_type removal.
17541 * config/rs6000/vsx.md: Remove Xilinx FP support.
17542 (VStype_simple): Delete.
17543 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17544 * config/rs6000/xfpu.h: Delete.
17545 * config/rs6000/xfpu.md: Delete.
17546 * config/rs6000/xilinx.h: Delete.
17547 * config/rs6000/xilinx.opt: Delete.
17548 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17549 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17551 2018-05-04 Tom de Vries <tom@codesourcery.com>
17554 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17557 2018-05-04 Richard Biener <rguenther@suse.de>
17559 PR middle-end/85627
17560 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17561 (expand_complex_div_wide): Likewise.
17562 (expand_complex_operations_1): Likewise.
17563 (expand_complex_libcall): Preserve EH info of the original stmt.
17564 (tree_lower_complex): Handle removed blocks.
17565 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17566 on complex multiplication and division libcall builtins.
17568 2018-05-04 Richard Biener <rguenther@suse.de>
17570 PR middle-end/85574
17571 * fold-const.c (negate_expr_p): Restrict negation of operand
17572 zero of a division to when we know that can happen without
17574 (fold_negate_expr_1): Likewise.
17576 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17579 * real.h (real_nextafter): Declare.
17580 * real.c (real_nextafter): New function.
17581 * fold-const-call.c (fold_const_nextafter): New function.
17582 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17583 CASE_CFN_NEXTTOWARD.
17584 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17585 even when arg1_mode is different from arg0_mode.
17587 2018-05-03 Nathan Sidwell <nathan@acm.org>
17589 * doc/extend.texi (Deprecated Features): Remove
17590 -ffriend-injection.
17591 (Backwards Compatibility): Likewise.
17592 * doc/invoke.texi (C++ Language Options): Likewise.
17593 (C++ Dialect Options): Likewise.
17595 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17598 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17599 _mm512_mask_mullox_epi64): New intrinsics.
17601 2018-05-03 Tom de Vries <tom@codesourcery.com>
17604 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17605 dump files): Add offload-tree.
17607 2018-05-03 Richard Biener <rguenther@suse.de>
17609 PR tree-optimization/85615
17610 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17611 to loops not nested in BBs loop father to avoid creating multi-entry
17614 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17616 PR tree-optimization/70291
17617 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17618 arguments. Change return type to tree. Emit libcall as a new
17619 statement rather than replacing existing one when inplace_p is true.
17620 (expand_complex_multiplication_components): New function.
17621 (expand_complex_multiplication): Expand floating-point complex
17622 multiplication using the above.
17623 (expand_complex_division): Rename inner_type parameter to type.
17624 Update expand_complex_libcall call-site.
17625 (expand_complex_operations_1): Update expand_complex_multiplication
17626 and expand_complex_division call-sites.
17628 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17631 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17632 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17633 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17634 the highest significant bit of the shift count mask is clear. In
17635 check whether and[sq]i3 is needed verify that all significant bits
17636 of the shift count other than the highest are set.
17638 2018-05-02 Tom de Vries <tom@codesourcery.com>
17641 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17642 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17643 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17644 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17645 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17646 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17647 __builtin_goacc_parlevel_size.
17649 2018-05-02 Richard Biener <rguenther@suse.de>
17651 PR tree-optimization/85597
17652 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17653 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17656 2018-05-02 Tom de Vries <tom@codesourcery.com>
17659 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17660 dump files): Add ltrans-tree.
17662 2018-05-02 Tom de Vries <tom@codesourcery.com>
17665 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17666 dump files): Add wpa-ipa.
17668 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17670 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17671 powerpc*-*-linux*paired* target.
17672 * config/rs6000/750cl.h: Delete.
17673 * config/rs6000/paired.h: Delete.
17674 * config/rs6000/paired.md: Delete.
17675 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17677 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17678 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17679 comment. Remove paired float support.
17680 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17681 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17683 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17684 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17686 * config/rs6000/rs6000.c: Remove paired float support.
17687 (paired_expand_vector_init, paired_expand_vector_move,
17688 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17689 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17690 paired_expand_builtin, paired_expand_predicate_builtin,
17691 paired_init_builtins): Delete.
17692 * config/rs6000/rs6000.h: Remove paired float support.
17693 * config/rs6000/rs6000.md: Remove paired float support.
17694 (move_from_CR_ov_bit): Delete.
17695 * config/rs6000/rs6000.opt (mpaired): Delete.
17696 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17697 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17699 2018-05-02 Richard Biener <rguenther@suse.de>
17701 PR middle-end/85567
17702 * gimplify.c (gimplify_save_expr): When in SSA form allow
17703 SAVE_EXPRs to compute to SSA vars.
17705 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17708 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17709 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17710 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17711 clobber operands[2], instead use a new pseudo. Formatting fixes.
17713 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17715 PR tree-optimization/85586
17716 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17717 exit early for statements in the same group if the accesses are
17720 2018-05-02 Tom de Vries <tom@codesourcery.com>
17723 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17726 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17728 PR tree-optimization/85143
17729 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17731 2018-05-01 Tom de Vries <tom@codesourcery.com>
17734 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17735 not found" error message.
17737 2018-05-01 Tom de Vries <tom@codesourcery.com>
17740 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17741 * vec.c (test_ordered_remove_if): New function.
17742 (vec_c_tests): Call test_ordered_remove_if.
17743 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17744 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17745 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17746 VEC_ORDERED_REMOVE_IF.
17748 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17750 PR tree-optimization/82665
17751 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17752 pointer subtraction where arguments come from a memchr call.
17754 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17756 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17757 --push-state --as-needed and --pop-state instead of --as-needed and
17758 --no-as-needed if ld supports it.
17759 * configure: Regenerated.
17762 * doc/install.texi2html: Replace _002d with - and _002a with * in
17763 generated html files using sed.
17765 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17768 * gcc-rich-location.c (blank_line_before_p): New function.
17769 (use_new_line): New function.
17770 (gcc_rich_location::add_fixit_insert_formatted): New function.
17771 * gcc-rich-location.h
17772 (gcc_rich_location::add_fixit_insert_formatted): New function.
17774 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17776 * selftest.c (assert_streq): Rename "expected" and "actual" to
17777 "val1" and "val2". Extend NULL-handling to cover both inputs
17778 symmetrically, while still requiring both to be non-NULL for a pass.
17779 * selftest.h (assert_streq): Rename "expected" and "actual" to
17781 (ASSERT_EQ): Likewise.
17782 (ASSERT_EQ_AT): Likewise.
17783 (ASSERT_KNOWN_EQ): Likewise.
17784 (ASSERT_KNOWN_EQ_AT): Likewise.
17785 (ASSERT_NE): Likewise.
17786 (ASSERT_MAYBE_NE): Likewise.
17787 (ASSERT_MAYBE_NE_AT): Likewise.
17788 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17789 the assertion to pass.
17790 (ASSERT_STREQ_AT): Likewise.
17792 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17794 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17795 interaction with -pie.
17797 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17799 * selftest.h: Fix alphabetization of per-source-file selftest
17802 2018-04-30 Jason Merrill <jason@redhat.com>
17804 PR c++/61982 - dead stores to destroyed objects.
17805 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17808 2018-04-30 Jason Merrill <jason@redhat.com>
17810 * tree.c (build_clobber): New.
17811 * tree.h: Declare it.
17812 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17814 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17816 * diagnostic-show-locus.c (layout::layout): Update for
17817 location_get_source_line returning a char_span.
17818 (struct char_span): Move to input.h.
17819 (struct correction): Update for fields in char_span becoming
17821 (struct source_line): Update for location_get_source_line
17822 returning a char_span.
17823 (layout::print_line): Likewise.
17824 * edit-context.c (edited_file::print_content): Likewise.
17825 (edited_file::print_diff_hunk): Likewise.
17826 (edited_file::print_run_of_changed_lines): Likewise.
17827 (edited_file::get_num_lines): Likewise.
17828 (edited_line::edited_line): Likewise.
17829 * final.c (asm_show_source): Likewise.
17830 * input.c (location_get_source_line): Convert return type
17831 from const char * to char_span, losing the final "line_len"
17833 (dump_location_info): Update for the above.
17834 (get_substring_ranges_for_loc): Likewise. Use a char_span
17835 when handling the literal within the line.
17836 (test_reading_source_line): Update for location_get_source_line
17837 returning a char_span.
17838 * input.h (class char_span): Move here from
17839 diagnostic-show-locus.c, converting from a struct to a class.
17840 Make data members private.
17841 (char_span::operator bool): New.
17842 (char_span::length): New.
17843 (char_span::get_buffer): New.
17844 (char_span::operator[]): New.
17845 (char_span::subspan): Make const.
17846 (char_span::xstrdup): New.
17847 (location_get_source_line): Convert return type from const char *
17848 to char_span, losing the final "line_size" param.
17850 2018-04-30 Jan Hubicka <jh@suse.cz>
17852 * lto-wrapper.c (ltrans_priorities): New static var.
17853 (cmp_priority): New.
17854 (run_gcc): Read priorities and if doing parallel build order
17855 the Makefile by them.
17857 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17859 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17861 2018-04-30 Richard Biener <rguenther@suse.de>
17863 * tree-cfg.c (verify_address): Remove base argument, add
17864 flag whether to check TREE_ADDRESSABLE and do that.
17865 (verify_expr): Remove.
17866 (verify_types_in_gimple_reference): Add pieces from verify_expr.
17867 (verify_gimple_assign_single): Likewise.
17868 (verify_gimple_switch): Likewise.
17869 (verify_expr_location_1): Dereference tp once. Add (disabled)
17870 piece from verify_expr.
17871 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17873 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17875 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17877 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17879 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17880 (small_data_pattern): Likewise.
17881 (arc_rewrite_small_data): Likewise.
17882 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17883 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17884 (get_symbol_alignment): New function.
17885 (legitimate_small_data_address_p): Likewise.
17886 (legitimate_scaled_address): Update, call
17887 legitimate_small_data_address_p.
17888 (output_sdata): New static variable.
17889 (arc_print_operand): Update how we handle small data operands.
17890 (arc_print_operand_address): Likewise.
17891 (arc_legitimate_address_p): Update, use
17892 legitimate_small_data_address_p.
17893 (arc_rewrite_small_data_p): Remove.
17894 (arc_rewrite_small_data_1): Likewise.
17895 (arc_rewrite_small_data): Likewise.
17896 (small_data_pattern): Likewise.
17897 (compact_sda_memory_operand): Update to use
17898 legitimate_small_data_address_p and get_symbol_alignment.
17899 (prepare_move_operands): Don't rewite sdata pattern.
17900 (prepare_extend_operands): Remove.
17901 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17903 (zero_extendqisi2): Likewise.
17904 (zero_extendhisi2): Likewise.
17905 (extendqihi2): Likewise.
17906 (extendqisi2): Likewise.
17907 (extendhisi2): Likewise.
17908 (addsi3): Likewise.
17909 (subsi3): Likewise.
17910 (andsi3): Likewise.
17911 * config/arc/constraints.md (Usd): Change it to memory constraint.
17913 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17915 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17916 as source of std instructions.
17917 * config/arc/arc.md (movsi_insn): Update pattern predicate to
17918 allow 6-bit constants as source for store instructions.
17919 (movdi_insn): Update instruction pattern to allow 6-bit constants
17920 as source for store instructions.
17922 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17924 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17926 2018-04-30 Nathan Sidwell <nathan@acm.org>
17927 Sandra Loosemore <sandra@codesourcery.com>
17929 * dumpfile.c (dump_open): Allow '-' for stdout.
17930 * doc/invoke.texi (Developer Options): Document dump filename
17931 determination early. Document stdin/stdout selection.
17933 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
17935 Microblaze Target: PIC data text relative
17937 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17938 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17940 * config/microblaze/microblaze.h (microblaze_constant_address_p):
17941 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17942 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17943 New addressing mode for data-text relative position indepenedent code.
17944 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17945 'ADDRESS_SYMBOLIC_TXT_REL'.
17946 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17947 (microblaze_legitimate_pic_operand): Exclude function calls from
17948 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17949 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17951 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17952 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17953 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17954 for 'address + offset'.
17955 (microblaze_expand_prologue): Add new function prologue call for
17957 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17958 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17959 table in case of TARGET_PIC_DATA_TEXT_REL.
17960 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17961 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17962 Add new macros 'UNSPEC_TEXT',
17963 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17964 + exclude function calls from 'UNSPEC_PLT' in case of data text
17966 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17967 new target hook for generating address diff vector tables in case of
17969 * doc/tm.texi : Regenerate.
17970 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17971 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17972 of addr diff vector generation.
17973 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17974 target hook definition.
17975 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17976 Add default function for generate_pic_addr_diff_vec -> flag_pic.
17977 * doc/invoke.texi (Add new pic option): Add new microblaze pic
17978 option for data text relative.
17980 2018-04-30 Richard Biener <rguenther@suse.de>
17982 * tree-chrec.h (evolution_function_is_constant_p): Remove
17984 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17986 2018-04-30 Richard Biener <rguenther@suse.de>
17989 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17991 2018-04-30 Richard Biener <rguenther@suse.de>
17993 PR tree-optimization/28364
17994 PR tree-optimization/85275
17995 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17996 copying first exit test.
17998 2018-04-28 Mark Wielaard <mark@klomp.org>
18000 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18001 dwarf_version >= 5.
18002 (dwarf_AT): Handle DW_AT_addr_base.
18003 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18005 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18008 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18009 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18010 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18011 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18013 2018-04-28 Richard Biener <rguenther@suse.de>
18015 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18016 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18017 to reflect use. Only add interesting stmts.
18019 2018-04-27 Martin Jambor <mjambor@suse.cz>
18022 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18023 the jump function allows for passing through aggregate values.
18025 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18027 * input.h (in_system_header_at): Convert from macro to inline
18029 (from_macro_expansion_at): Likewise.
18030 (from_macro_definition_at): Likewise.
18032 2018-04-27 Jeff Law <law@redhat.com>
18034 * config.gcc: Mark tile* targets as deprecated/obsolete.
18036 2018-04-27 Richard Biener <rguenther@suse.de>
18038 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18041 2018-04-27 Richard Biener <rguenther@suse.de>
18043 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18045 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18047 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18048 with Yd constraint. Set "preferred_for_speed" attribute from
18049 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18050 with Yd constraint.
18051 (*movdi_internal): Ditto.
18052 (movti_interunit splitters): Remove
18053 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18054 (movdi_interunit splitters): Ditto.
18055 * config/i386/constraints.md (Ye): Remove.
18056 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18058 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18061 * config/aarch64/constraints.md (Usg): Limit to 31.
18062 (Usj): Limit to 63.
18064 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18066 PR tree-optimization/85529
18067 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18068 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18069 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18070 zero extension or masking of the MSB bit.
18071 (optimize_range_tests): Add FIRST_BB argument, pass it through
18072 to optimize_range_tests_var_bound.
18073 (maybe_optimize_range_tests, reassociate_bb): Adjust
18074 optimize_range_tests callers.
18076 2018-04-26 Richard Biener <rguenther@suse.de>
18077 Jakub Jelinek <jakub@redhat.com>
18079 * cgraph.h (symbol_table): Just declare debug method here.
18080 * symtab.c (symbol_table::debug): Define.
18082 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18084 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18086 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18088 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18089 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18090 (*movdi_internal): Substitute Yi and Yj constraint with x
18091 and Ym and Yn constraint with y constraint. Update "isa"
18092 attribute and set "preferred_for_speed" attribute from
18093 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18094 (*movsi_internal): Ditto.
18095 (*movdf_internal): Ditto.
18096 (*movsf_internal): Ditto.
18097 (*zero_extendsidi2): Ditto.
18098 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18099 (sse2_loadld): Ditto.
18100 (*vec_extract<ssevecmodelower>_0): Ditto.
18101 (*vec_extractv4si_0_zext_sse4): Ditto.
18102 (vec_concatv2di): Ditto.
18103 (*vec_dup<mode>): Ditto.
18104 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18105 * config/i386/constraints.md (Yi): Remove.
18110 2018-04-26 Nathan Sidwell <nathan@acm.org>
18112 * dumpfile.c (dump_open): New.
18113 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18114 (dump_finish): Detect stdio/stderr by value not name.
18116 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18118 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18120 2018-04-26 Tom de Vries <tom@codesourcery.com>
18123 * config/nvptx/nvptx.c (verify_neutering_jumps)
18124 (verify_neutering_labels): New function
18125 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18127 2018-04-26 Tom de Vries <tom@codesourcery.com>
18130 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18131 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18134 2018-04-26 Richard Biener <rguenther@suse.de>
18135 Tom de Vries <tom@codesourcery.com>
18138 * lto-streamer-out.c (output_function): Fixup loops if required to match
18139 discovery done in the reader.
18141 2018-04-26 Richard Biener <rguenther@suse.de>
18143 PR tree-optimization/85116
18144 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18145 have a loop exit from the single latch predecessor. Remove
18146 case of header with just condition.
18147 (ch_base::copy_headers): Exclude infinite loops from any
18149 (pass_ch::execute): Record exits.
18151 2018-04-26 Richard Biener <rguenther@suse.de>
18153 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18154 prologue cost vector and pass it to vect_get_load_cost.
18155 (vect_get_peeling_costs_all_drs): Likewise.
18156 (vect_peeling_hash_get_lowest_cost): Likewise.
18157 (vect_enhance_data_refs_alignment): Likewise.
18159 2018-04-26 Richard Biener <rguenther@suse.de>
18161 PR middle-end/85450
18162 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18163 checking of integer<->pointer conversions.
18164 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18165 sign-/zero-extending pointer types.
18166 (expand_omp_for_static_chunk): Likewise.
18168 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18169 Jean Lee <xiaoyur347@gmail.com>
18171 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18172 (TARGET_ASAN_SHADOW_OFFSET): Define.
18173 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18174 true for -fsanitize=address.
18176 2018-04-25 Mark Wielaard <mark@klomp.org>
18178 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18181 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18183 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18184 than "alu", remove explicit "memory" and "imm_disp" attributes.
18185 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18187 PR middle-end/85414
18188 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18189 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18190 gen_lowpart_no_emit.
18192 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18195 * config/i386/i386.c (ix86_expand_builtin): Change memory
18196 operand to XI, extend p0 to Pmode.
18197 * config/i386/i386.md: Change unspec volatile and operand
18198 1 mode to XI, change operand 0 mode to P.
18200 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18202 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18203 GET_MODE_MASK before any checking.
18204 (nds32_can_use_bset_p): Likewise.
18205 (nds32_can_use_btgl_p): Likewise.
18207 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18209 * config/nds32/nds32-doubleword.md: New define_split pattern for
18210 illegal register number.
18212 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18214 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18216 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18218 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18220 2018-04-25 Richard Biener <rguenther@suse.de>
18222 * lto-streamer.h (LTO_major_version): Bump to 8.
18224 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18226 * BASE-VER: Set to 9.0.0.
18228 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18230 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18231 in __abskf2 and __powikf2.
18233 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18236 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18237 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18238 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18239 Use the above on operand 2. Reindent.
18240 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18242 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18245 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18247 * config/i386/i386.opt (mcet): Removed.
18248 * doc/install.texi: Remove -mcet documentation.
18249 * doc/invoke.texi: Likewise.
18251 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18254 * doc/install.texi: Remove -mcet from bootstrap-cet.
18256 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18259 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18260 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18264 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18265 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18266 containing a CONST_VECTOR.
18268 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18270 * doc/install.texi: Update newlib dependency for nvptx.
18272 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18275 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18276 instead of INTVAL when shifting x left.
18278 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18280 PR tree-optimization/85478
18281 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18282 vect_grouped_store_supported for single element vectors.
18284 2018-04-24 Richard Biener <rguenther@suse.de>
18287 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18288 load cost increase to the case of non-constant step.
18290 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18293 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18294 destination if any_malformed_asm.
18296 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18298 PR middle-end/85496
18299 * expr.c (store_field): In the bitfield case, if the value comes from
18300 a function call and is returned in registers by means of a PARALLEL,
18301 do not change the mode of the temporary unless BLKmode and VOIDmode.
18303 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18305 PR rtl-optimization/85423
18306 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18307 dependencies to debug insns when the previous insn is non-debug.
18309 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18311 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18312 enums into a single definition.
18313 (fls): Fix predicates and printing.
18316 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18318 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18319 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18320 and short u6 immediate.
18321 (check_if_valid_sleep_operand): Remove.
18322 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18324 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18326 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18327 flag_always_save_lp condition.
18328 * config/nds32/nds32.opt (malways-save-lp): New option.
18330 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18332 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18333 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18334 * config/nds32/nds32.h
18335 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18336 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18338 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18340 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18341 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18343 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18344 Chung-Ju Wu <jasonwucj@gmail.com>
18346 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18348 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18349 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18351 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18353 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18355 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18357 * config/nds32/nds32-protos.h (nds32_data_alignment,
18358 nds32_local_alignment): Declare.
18359 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18360 nds32_local_alignment): New functions.
18361 (TARGET_CONSTANT_ALIGNMENT): Define.
18362 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18364 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18366 * config/nds32/nds32.c
18367 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18368 (TARGET_MODES_TIEABLE_P): Likewise.
18370 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18372 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18373 level Ofast and Og.
18375 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18376 Chung-Ju Wu <jasonwucj@gmail.com>
18378 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18379 for unaligned access.
18380 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18382 * config/nds32/nds32-intrinsic.md: Likewise.
18383 * config/nds32/nds32_intrinsic.h: Likewise.
18384 * config/nds32/nds32.h (nds32_builtins): Likewise.
18385 * config/nds32/nds32.opt (munaligned-access): New option.
18386 * config/nds32/nds32.c (nds32_asm_file_start): Display
18387 flag_unaligned_access status.
18389 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18391 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18392 -mno-relax is present.
18393 * config/riscv/linux.h (LINK_SPEC): Ditto.
18395 2018-04-20 Martin Sebor <msebor@redhat.com>
18398 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18400 (gimple_fold_builtin_stxcpy_chk): Same.
18401 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18403 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18406 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18407 __powikf2 when long double is IEEE 128-bit.
18409 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18411 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18412 step to make sure stack always aligned.
18414 2018-04-20 Carl Love <cel@us.ibm.com>
18417 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18418 size check for arg0.
18420 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18421 Tom de Vries <tom@codesourcery.com>
18424 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18425 Emit insns for calls too.
18426 (nvptx_find_par): Always look for worker-level predecessor insn.
18427 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18429 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18430 (nvptx_process_pars): Propagate frames for calls.
18432 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18435 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18437 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18438 (ix86_handle_option): Don't handle OPT_mibt.
18439 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18441 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18443 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18444 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18445 (ix86_target_macros): Define __CET__ with flag_cf_protection
18446 for -fcf-protection.
18447 * config/i386/i386.c (isa2_opts): Remove -mibt.
18448 * config/i386/i386.h (TARGET_IBT): Removed.
18449 (TARGET_IBT_P): Likewise.
18450 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18451 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18452 * config/i386/i386.opt (mcet): Update help message.
18453 (mshstk): Likewise.
18455 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18456 -mcet as an alias for -mshstk.
18458 2018-04-20 Richard Biener <rguenther@suse.de>
18460 PR middle-end/85475
18461 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18462 complexity by forcing a single use of the multiply operand.
18464 2018-04-20 Martin Jambor <mjambor@suse.cz>
18467 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18468 recursion dependency to only apply to non-clones.
18470 2018-04-20 Martin Jambor <mjambor@suse.cz>
18473 * ipa-cp.c (create_specialized_node): Check that clones of
18474 self-recursive edges exist during IPA-CP.
18476 2018-04-19 Toon Moene <toon@moene.org>
18478 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18481 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18483 PR tree-optimization/85467
18484 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18485 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18486 VECTOR_CST element to type.
18488 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18491 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18492 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18493 (builtin_longjmp): Likewise.
18494 (save_stack_nonlocal): New pattern.
18495 (restore_stack_nonlocal): Likewise.
18497 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18500 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18501 Replace ASM_OUTPUT_LABEL with fprintf.
18503 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18506 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18507 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18508 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18509 define __IBT__ and __SHSTK__ for -fcf-protection.
18510 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18512 (ix86_trampoline_init): Likewise.
18513 (x86_output_mi_thunk): Likewise.
18514 (ix86_notrack_prefixed_insn_p): Likewise.
18515 (ix86_option_override_internal): Don't disallow -fcf-protection.
18516 * config/i386/i386.md (rdssp<mode>): Also enable for
18518 (incssp<mode>): Likewise.
18519 (nop_endbr): Likewise.
18520 * config/i386/i386.opt (mcet): Change help message to built-in
18523 (mshstk): Likewise.
18524 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18525 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18526 enable CET built-in functions.
18528 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18530 * common/config/i386/i386-common.c
18531 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18532 OPTION_MASK_ISA_MOVDIRI_UNSET,
18533 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18534 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18535 * config.gcc (movdirintrin.h): New header.
18536 * config/i386/cpuid.h (bit_MOVDIRI,
18537 bit_MOVDIR64B): New bits.
18538 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18540 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18541 (VOID, PVOID, PCVOID)): New function types.
18542 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18543 __builtin_ia32_directstoreu_u64,
18544 __builtin_ia32_movdir64b): New builtins.
18545 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18546 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18548 (ix86_valid_target_attribute_inner_p): Ditto.
18549 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18550 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18551 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18552 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18553 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18554 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18555 (movdiri<mode>, movdir64b_<mode>): New.
18556 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18557 * config/i386/immintrin.h: Include movdirintrin.h.
18558 * config/i386/movdirintrin.h: New file.
18559 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18561 2018-04-19 Richard Biener <rguenther@suse.de>
18563 PR middle-end/85455
18564 * cfg.c (clear_bb_flags): When loop state says we have
18565 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18567 2018-04-19 Richard Biener <rguenther@suse.de>
18569 PR tree-optimization/84737
18570 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18571 copying restrict info.
18572 (vect_setup_realignment): Use it.
18573 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18574 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18575 the first DR to all generated stores.
18576 (vectorizable_load): Likewise for loads.
18578 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18580 PR tree-optimization/85446
18581 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18582 the integral and pointer types to have the same precision.
18584 * doc/install.texi: Document --disable-cet being the default and
18587 2018-04-18 Martin Liska <mliska@suse.cz>
18589 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18592 2018-04-18 Martin Liska <mliska@suse.cz>
18595 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18598 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18599 arguments if they are comparable.
18601 2018-04-18 Martin Liska <mliska@suse.cz>
18604 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18607 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18610 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18613 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18614 ENDBR after calling __morestack.
18616 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18619 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18620 by using gcc_base_ver to generate a gcc_driver_version, and use
18621 it when generating GCC_DRIVER_NAME.
18622 * configure: Regenerate.
18624 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18627 * config.gcc: Obsolete powerpc*-*-*spe*.
18629 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18632 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18633 (stabstr_D): Change type of unum from unsigned int to
18634 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18637 2018-04-17 Jim Wilson <jimw@sifive.com>
18640 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18641 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18642 Set arg_pointer_offset after using pretend_args_size.
18644 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18646 PR rtl-optimization/85431
18647 * dse.c (record_store): Ignore zero width stores.
18650 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18651 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18652 __builtin_stack_restore rather than after it.
18653 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18654 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18655 argument instead of virtual_dynamic_stack_rtx.
18657 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18659 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18661 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18662 Add note to error message to explain internal mapping of overloaded
18663 built-in function name to non-overloaded built-in function name.
18664 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18667 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18670 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18671 where the inputs overlap with the output.
18673 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18675 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18676 (=v, v) alternative and explicit "memory" attribute.
18677 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18678 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18680 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18681 "sselog1" type instead of "sselog".
18682 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18683 "sselog". Remove explicit "memory" attribute.
18684 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18685 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18687 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18688 "sselog1" type instead of "sselog". Remove explicit "memory"
18690 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18691 use "sselog1" type instead of "sselog". Remove explicit "memory"
18693 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18694 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18696 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18697 "sselog1" type instead of "sselog". Remove explicit "memory"
18699 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18700 use "sselog1" type instead of "sselog". Remove explicit "memory"
18704 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18706 PR middle-end/85414
18707 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18710 2018-04-17 Martin Jambor <mjambor@suse.cz>
18713 * ipa-cp.c (create_specialized_node): Call
18714 expand_all_artificial_thunks if necessary.
18716 2018-04-17 Martin Liska <mliska@suse.cz>
18719 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18720 in message, remote space in between '_G' and '('.
18722 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18725 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18726 avx512f_vmcmp<mode>3<round_saeonly_name>,
18727 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18728 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18729 avx512f_rndscale<mode><round_saeonly_name>,
18730 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18731 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18732 Use %<iptr>2 instead of %2 for -masm=intel.
18733 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18734 avx512f_vcvttss2usi<round_saeonly_name>,
18735 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18737 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18738 avx512f_vcvttsd2usi<round_saeonly_name>,
18739 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18740 Use %q1 instead of %1 for -masm=intel.
18741 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18742 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18743 of %3 for -masm=intel.
18744 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18746 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18748 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18750 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18751 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18753 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18755 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18756 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18757 %g1 and one with %0 and %1.
18758 (avx512er_vmrcp28<mode><round_saeonly_name>,
18759 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18760 %1 for -masm=intel.
18761 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18762 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18763 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18764 of %0 and %{%4%} for -masm=intel.
18765 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18766 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18767 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18768 order of %0 and %{%5%}%{z%} for -masm=intel.
18770 2018-04-17 Jan Hubicka <jh@suse.cz>
18773 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18775 2018-04-17 Martin Liska <mliska@suse.cz>
18778 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18779 for target_clone error message. Make default implementation
18780 clone to be a local declaration.
18781 (separate_attrs): Add new argument and check for an empty
18783 (expand_target_clones): Handle it.
18784 (ipa_target_clone): Make redirection just for target_clones
18787 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18788 Tom de Vries <tom@codesourcery.com>
18790 PR middle-end/84955
18791 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18792 tiled basic blocks without omp continue statements.
18794 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18797 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18798 vec_extract expression as having side effects to make sure it gets
18801 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
18804 * config/i386/i386.c (get_builtin_code_for_version): Check
18807 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
18810 * config.gcc: Support "skylake".
18811 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18813 * config/i386/i386.c (m_SKYLAKE): Define.
18814 (processor_target_table): Add "skylake".
18815 (ix86_option_override_internal): Add "skylake".
18816 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18817 PROCESSOR_CANNONLAKE.
18818 (get_builtin_code_for_version): Fix priority for
18819 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18820 PROCESSOR_SKYLAKE-AVX512.
18821 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18822 (processor_type): Add PROCESSOR_SKYLAKE.
18824 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
18825 Jason Merrill <jason@redhat.com>
18828 * convert.c (convert_to_integer_1): Use direct recursion for
18829 enumeral types and types with a precision less than the number
18830 of bits in their mode.
18832 2018-04-16 Julia Koval <julia.koval@intel.com>
18835 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18836 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18838 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
18841 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18842 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18843 and -mno-direct-move.
18845 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
18848 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18849 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18850 Ensure negative shifts result in {0}.
18852 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
18854 PR rtl-optimization/79916
18855 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18856 regs (if any) to define how to gnerate SD moves when LRA is in
18859 2018-04-13 Jakub Jelinek <jakub@redhat.com>
18861 PR rtl-optimization/85393
18862 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18863 * except.c (expand_dw2_landing_pad_for_region): Make static.
18864 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18865 a label and unconditional jump to old_bb, rather than
18866 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18869 PR rtl-optimization/85376
18870 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18871 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18872 instead of a specific value.
18874 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18875 Bin Cheng <bin.cheng@arm.com>
18877 PR tree-optimization/82965
18878 PR tree-optimization/83991
18879 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18880 by_profile_only parameter.
18881 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18882 information if the loop was predicted to iterate too many times.
18883 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18885 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18888 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18891 2018-04-13 Martin Liska <mliska@suse.cz>
18892 Jakub Jelinek <jakub@redhat.com>
18894 PR middle-end/81657
18895 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18896 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18897 * builtins.c (expand_builtin_memory_copy_args): Use
18898 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18899 handle dest_addr == pc_rtx.
18901 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
18904 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18905 asked to not generate direct moves.
18906 (fix_trunc<mode>si2_stfiwx): Similar.
18907 (fix_trunc<mode>si2_internal): Similar.
18909 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18912 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18913 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18914 lookup if dest in some wider mode is known to be const0_rtx and
18915 if so, record permanent equivalence for it to be ZERO_EXTEND of
18916 the narrower mode destination.
18918 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18920 * lto-streamer-out.c (output_function): Revert 259346.
18921 * omp-expand.c (expand_oacc_for): Likewise.
18923 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
18925 PR rtl-optimization/85354
18926 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18927 * sel-sched.c (sel_global_init): ... here.
18929 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
18932 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18933 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18934 mode for PE-COFF targets.
18935 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18936 (i386_pe_asm_lto_end): Likewise.
18937 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18938 (TARGET_ASM_LTO_END): Likewise.
18939 * config/i386/winnt.c (saved_debug_info_level): New static variable.
18940 (i386_pe_asm_lto_start): New function.
18941 (i386_pe_asm_lto_end): Likewise.
18943 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18944 Richard Biener <rguenther@suse.de>
18946 PR middle-end/84955
18947 * lto-streamer-out.c (output_function): Fix CFG loop state before
18949 * omp-expand.c (expand_oacc_for): Handle calls to internal
18950 functions like regular functions.
18952 2018-04-12 Richard Biener <rguenther@suse.de>
18955 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18956 for the early LTO debug to properly generate references to it
18957 during DIE emission. Do not re-use that for the skeleton for
18959 (dwarf2out_early_finish): Likewise.
18961 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18964 * config/i386/sse.md
18965 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18966 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18967 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18968 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18969 and output is a reg, avoid creating invalid lowpart subreg, but
18970 instead split into a 512-bit move. Don't split if not AVX512VL,
18971 input is xmm16+ reg and output is a mem.
18972 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18973 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18974 xmm16+ reg and output is a mem.
18976 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18978 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18979 also for flag_dwarf2_cfi_asm.
18981 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18983 PR rtl-optimization/85342
18984 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18985 a bool scalar var inside of the loop instead. Don't try to update
18986 recog_data.operand after failed apply_change_group.
18988 2018-04-12 Tom de Vries <tom@codesourcery.com>
18991 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18992 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
18993 array with flexible array member as array without given dimension.
18994 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18995 argument for undefined param to true.
18997 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19000 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19001 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19002 from PowerPC section.
19003 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19004 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19005 help text that is too long.
19006 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19007 help text that is too long.
19008 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19009 help text that is too long.
19011 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19013 * config/alpha/alpha.md (stack_probe_internal): Rename
19014 from "probe_stack". Update all callers.
19016 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19018 PR rtl-optimization/84566
19019 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19020 sched_macro_fuse_insns.
19022 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19025 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19026 (compute_block_dependences): ... from here.
19028 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19030 PR tree-optimization/85331
19031 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19032 from int to HOST_WIDE_INT.
19034 2018-04-11 Martin Jambor <mjambor@suse.cz>
19037 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19038 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19039 not the same as the source val.
19040 (cgraph_edge_brings_value_p): New parameter.
19041 (gather_edges_for_value): Pass destination value to
19042 cgraph_edge_brings_value_p.
19043 (perhaps_add_new_callers): Likewise.
19044 (get_info_about_necessary_edges): Likewise and exclude values brought
19045 only by self-recursive edges.
19046 (create_specialized_node): Redirect only clones of self-calling edges.
19047 (+self_recursive_pass_through_p): New function.
19048 (find_more_scalar_values_for_callers_subset): Use it.
19049 (find_aggregate_values_for_callers_subset): Likewise.
19050 (known_aggs_to_agg_replacement_list): Removed.
19051 (decide_whether_version_node): Re-calculate known constants for all
19052 remaining context clones.
19054 2018-04-11 Richard Biener <rguenther@suse.de>
19057 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19058 from early DWARF output.
19059 (dwarf2out_early_finish): Output line info unconditionally into
19060 early DWARF and add reference to it.
19062 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19065 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19066 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19067 other than V2DFmode using iptr mode attribute.
19068 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19070 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19072 PR rtl-optimization/84659
19073 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19075 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19078 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19080 (output_loc_list): Pass address of a dummy size variable even in the
19081 locview handling loop.
19082 (index_location_lists): Add comment on why skip_loc_list_entry can't
19085 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19088 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19091 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19094 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19095 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19096 and -mstring-compare-inline-limit.
19098 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19101 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19102 for stack clash protection in a register whenever we need it to be in
19105 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19107 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19108 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19110 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19113 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19115 (mlong-double-): Ditto.
19116 * config/rs6000/sysv4.opt (msdata=): Ditto.
19117 (mtls-size=): Ditto.
19119 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19121 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19122 erroneous entries for
19123 "vector int vec_ldl (int, long int *)", and
19124 "vector unsigned int vec_ldl (int, unsigned long int *)".
19125 Add comments and entries for
19126 "vector bool char vec_ldl (int, bool char *)",
19127 "vector bool short vec_ldl (int, bool short *)",
19128 "vector bool int vec_ldl (int, bool int *)",
19129 "vector bool long long vec_ldl (int, bool long long *)",
19130 "vector pixel vec_ldl (int, pixel *)",
19131 "vector long long vec_ldl (int, long long *)",
19132 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19133 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19134 type tree bool_long_long_type_node and correct definition of
19135 bool_V2DI_type_node to make reference to this new type tree.
19136 (rs6000_mangle_type): Replace erroneous reference to
19137 bool_long_type_node with bool_long_long_type_node.
19138 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19139 comments to emphasize sign distinctions for char and int types and
19140 replace RS6000_BTI_bool_long constant with
19141 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19142 use of RS6000_BTI_pixel.
19143 (bool_long_type_node): Remove this macro definition.
19144 (bool_long_long_type_node): New macro definition
19146 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19148 PR rtl-optimization/85300
19149 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19150 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19151 simplify_unary_operation fails.
19153 2018-04-10 Martin Liska <mliska@suse.cz>
19155 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19156 cgraph_edge and ipa_ref.
19158 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19162 * config/i386/sse.md
19163 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19164 computation of the VEC_MERGE selector from mask.
19165 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19166 Fix decoding of the VEC_MERGE selector into mask.
19168 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19170 PR tree-optimization/85286
19171 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19173 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19175 * final.c (final_1): Set insn_last_address as well as
19176 insn_current_address.
19178 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19181 * explow.c (emit_stack_probe): Call validize_mem on memory location
19182 before passing it to gen_probe_stack. Create address operand and
19183 legitimize it for the probe_stack_address case.
19185 2018-04-09 Jan Hubicka <jh@suse.cz>
19188 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19189 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19190 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19192 (free_lang_data): Rebuild type inheritance graph.
19194 2018-04-09 Martin Sebor <msebor@redhat.com>
19196 * invoke.texi (-finline-small-functions): Mention other optimization
19198 (-findirect-inlining, -fpartial-inlining): Same.
19199 (-finline-functions-called-once): Same.
19200 (-freorder-blocks-and-partition): Same.
19202 2018-04-09 Jan Hubicka <jh@suse.cz>
19205 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19206 jumps; choose last target that matches the criteria (i.e.
19207 no partition changes for non-crossing jumps).
19208 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19209 support for redirecting crossing jumps to non-crossing.
19211 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19213 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19214 also for naked functions.
19216 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19218 * config/arc/arc.md (add_shift): New pattern.
19219 (add_shift2): Likewise.
19220 (sub_shift): Likewise.
19221 (sub_shift_cmp0_noout): Likewise.
19222 (compare_si_ashiftsi): Likewise.
19223 (xbfu_cmp0_noout): New combine pattern.
19224 (xbfu_cmp0"): Likewise.
19225 (movsi_set_cc_insn): Place the predicable variant first.
19226 (commutative_binary_cmp0_noout): Remove clobber.
19227 (commutative_binary_cmp0): New pattern.
19228 (noncommutative_binary_cmp0): Likewise.
19229 (noncommutative_binary_cmp0_noout): Likewise.
19230 (noncommutative_binary_comparison_result_used): Removed.
19231 (rsub_cmp0): New pattern.
19232 (rsub_cmp0_noout): Likewise.
19233 (extzvsi): Changed, keep only meaningful variants.
19234 (SQH, SEZ): New iterators.
19235 (SQH_postfix): New mode attribute.
19236 (SEZ_prefix): New code attribute.
19237 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19238 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19239 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19240 of numerical value.
19241 (noncommutative_operator): Check the availability of barrel
19244 2018-04-09 Richard Biener <rguenther@suse.de>
19246 PR tree-optimization/85284
19247 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19248 Only use the niter constraining form of simple_iv when the exit
19249 is always executed.
19251 2018-04-09 Tom de Vries <tom@codesourcery.com>
19254 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19255 (define_expand "*memory_barrier"): New define_expand.
19256 (define_insn "memory_barrier"): New insn.
19258 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19260 PR rtl-optimization/80463
19261 PR rtl-optimization/83972
19262 PR rtl-optimization/83480
19264 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19265 correct producer for the insn.
19266 (tidy_control_flow): Fixup seqnos in case of debug insns.
19268 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19270 PR rtl-optimization/83913
19272 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19273 different sched-times when merging exprs.
19275 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19277 PR rtl-optimization/83962
19279 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19280 tidy_fallthru_edge and tidy_control_flow.
19282 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19284 PR rtl-optimization/83530
19286 * sel-sched.c (force_next_insn): New global variable.
19287 (remove_insn_for_debug): When force_next_insn is true, also leave only
19288 next insn in the ready list.
19289 (sel_sched_region): When the region wasn't scheduled, make another pass
19290 over it with force_next_insn set to 1.
19292 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19294 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19296 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19297 for interrupt control.
19298 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19299 functions for interrupt control.
19300 * config/nds32/nds32-intrinsic.md: Likewise.
19301 * config/nds32/nds32_intrinsic.h: Likewise.
19302 * config/nds32/nds32.h (nds32_builtins): Likewise.
19304 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19306 * config/nds32/nds32.c (nds32_init_machine_status,
19307 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19308 strict_aligned_p field.
19309 (nds32_expand_to_rtl_hook): New function.
19310 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19311 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19313 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19314 Chung-Ju Wu <jasonwucj@gmail.com>
19316 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19317 * config/nds32/nds32-n7.md: New file.
19318 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19319 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19321 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19322 * config/nds32/nds32.md (pipeline_model): Add n7.
19323 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19324 * config/nds32/pipelines.md: Include n7 settings.
19326 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19327 Chung-Ju Wu <jasonwucj@gmail.com>
19329 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19330 * config/nds32/nds32-e8.md: New file.
19331 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19332 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19334 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19335 * config/nds32/nds32.md (pipeline_model): Add e8.
19336 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19337 * config/nds32/pipelines.md: Include e8 settings.
19339 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19340 Chung-Ju Wu <jasonwucj@gmail.com>
19342 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19343 * config/nds32/nds32-n8.md: New file.
19344 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19345 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19347 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19348 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19349 * config/nds32/nds32.md (pipeline_model): Add n8.
19350 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19351 * config/nds32/pipelines.md: Include n8 settings.
19353 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19354 Chung-Ju Wu <jasonwucj@gmail.com>
19356 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19357 * config/nds32/nds32-n9-2r1w.md: New file.
19358 * config/nds32/nds32-n9-3r2w.md: New file.
19359 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19360 nds32_register_ports): New or modify for cpu n9.
19361 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19363 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19364 * config/nds32/nds32-utils.c: New file.
19365 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19366 TARGET_MUL_SLOW): Define.
19367 * config/nds32/nds32.md (pipeline_model): New attribute.
19368 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19369 New options that support cpu n9.
19370 * config/nds32/pipelines.md: Include n9 settings.
19371 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19373 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19375 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19376 information if necessary.
19377 (output_cond_branch_compare_zero): Likewise.
19378 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19379 (nds32_target_alignment): Refine for alignment.
19380 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19381 (FUNCTION_BOUNDARY): Modify.
19382 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19384 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19386 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19388 * config/nds32/constants.md (unspec_volatile_element): Add values for
19389 TLB operation and data prefetch.
19390 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19391 functions for TLB operation and data prefetch.
19392 * config/nds32/nds32-intrinsic.md: Likewise.
19393 * config/nds32/nds32_intrinsic.h: Likewise.
19394 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19395 (nds32_print_operand): Likewise.
19396 * config/nds32/nds32.h (nds32_builtins): Likewise.
19398 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19399 Andrew Pinski <pinsika@gcc.gnu.org>
19401 PR middle-end/82976
19402 * match.pd: Use constant_boolean_node of correct type instead of
19403 boolean_true_node or boolean_false_node for simplifying
19404 pointer comparisons to zero.
19406 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19408 PR tree-optimization/80021
19409 * tree.c (verify_type_variant): Make error call in verify_variant_match
19410 translatable and remove final full stop.
19412 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19414 * config/nds32/constants.md (unspec_volatile_element): Add
19415 UNSPEC_VOLATILE_EH_RETURN.
19416 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19417 nds32_output_stack_pop): Support dwarf exception handling process.
19418 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19419 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19420 exception handling process.
19421 (nds32_compute_stack_frame): Likewise.
19422 (nds32_return_addr_rtx): Likewise.
19423 (nds32_initial_elimination_offset): Likewise.
19424 (nds32_expand_prologue): Likewise.
19425 (nds32_expand_epilogue): Likewise.
19426 (nds32_dynamic_chain_address): New function.
19427 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19428 exception handling.
19429 (DYNAMIC_CHAIN_ADDRESS): Define.
19430 (EH_RETURN_DATA_REGNO): Define.
19431 (EH_RETURN_STACKADJ_RTX): Define.
19432 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19433 patterns for dwarf exception handling.
19435 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19437 * config/nds32/nds32.h: Clean up obsolete macros.
19439 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19441 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19442 Add enum values for particular instructions.
19443 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19444 particular intrinsic functions.
19445 * config/nds32/nds32-intrinsic.md: Likewise.
19446 * config/nds32/nds32_intrinsic.h: Likewise.
19447 * config/nds32/nds32.h (nds32_builtins): Likewise.
19448 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19449 (btst, ave): New patterns for particular instructions.
19451 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19453 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19454 Add enum values for atomic load/store and memory sync.
19455 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19457 * config/nds32/nds32-intrinsic.md: Likewise.
19458 * config/nds32/nds32_intrinsic.h: Likewise.
19459 * config/nds32/nds32.h (nds32_builtins): Likewise.
19461 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19463 PR tree-optimization/85257
19464 * fold-const.c (native_encode_vector): If not all elts could fit
19465 and off is -1, return 0 rather than offset.
19466 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19467 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19468 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19469 adjust buffer in native_interpret_expr call.
19471 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19473 * config/nds32/constants.md (unspec_volatile_element): Add cache
19474 control enum values.
19475 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19476 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19477 * config/nds32/nds32.c (nds32_cctl_names): New.
19478 (nds32_print_operand): Handle cache control register names.
19479 * config/nds32/nds32.h (nds32_builtins): New enum values.
19480 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19482 * config/nds32/nds32.md (type): Add mmu.
19483 * config/nds32/pipelines.md (simple_insn): Add mmu.
19485 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19487 * config/nds32/nds32.md (type): Remove call.
19488 * config/nds32/pipelines.md (simple_insn): Likewise.
19490 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19492 * config/nds32/constants.md (unspec_volatile_element): Add
19493 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19494 UNSPEC_VOLATILE_FMFCFG.
19495 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19496 description for fmfcfg and fmfcsr.
19497 (bdesc_1arg): Add fmtcsr.
19498 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19499 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19500 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19501 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19502 unspec_fmfcfg): New patterns.
19503 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19504 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19505 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19506 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19507 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19508 __nds32__fmfcfg): Define.
19510 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19512 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19513 intrinsic register names.
19514 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19515 intrinsic register enum values and macros.
19517 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19519 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19520 for load/store addressing form.
19521 (nds32_print_operand_address): Likewise.
19523 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19526 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19527 based on LABEL_REF. Remove useless assertion.
19528 (pic_address_needs_scratch): Fix formatting.
19529 (sparc_legitimize_pic_address): Minor tweaks.
19530 (sparc_delegitimize_address): Adjust assertion accordingly.
19531 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19532 into symbolic_operand.
19533 (movsi_high_pic_label_ref): Likewise.
19534 (movsi_lo_sum_pic_label_ref): Likewise.
19535 (movdi_pic_label_ref): Likewise.
19536 (movdi_high_pic_label_ref): Likewise.
19537 (movdi_lo_sum_pic_label_ref): Likewise.
19539 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19541 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19542 custom LIB_SPEC setup.
19544 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19545 Kito Cheng <kito.cheng@gmail.com>
19547 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19548 * config/riscv/freebsd.h: New.
19550 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19552 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19553 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19556 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19557 Kito Cheng <kito.cheng@gmail.com>
19559 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19560 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19561 * config/nds32/nds32-protos.h (nds32_output_call,
19562 nds32_output_return): Declare.
19563 * config/nds32/nds32.md: Refine all the call and return patterns.
19565 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19568 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19569 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19571 PR rtl-optimization/84872
19572 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19573 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19574 EDGE_CROSSING edge.
19576 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19578 * expr.c (copy_blkmode_to_reg): Revert 254862.
19579 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19581 2018-04-06 Richard Biener <rguenther@suse.de>
19583 PR middle-end/85244
19584 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19585 after seeing a component reference with an adjacent field. Treat
19586 refs to arrays at struct end of external decls similar to
19587 refs to unconstrained commons.
19589 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19592 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19593 look through SAVE_EXPRs with non-side-effects argument. Adjust
19595 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19598 2018-04-06 Richard Biener <rguenther@suse.de>
19600 PR middle-end/85180
19601 * alias.c (find_base_term): New wrapper around find_base_term
19602 unwinding CSELIB_VAL_PTR changes.
19603 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19606 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19608 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19610 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19611 constant definitions.
19612 ("nop"): lr 0,0 -> nopr r0
19613 ("nop_lr0", "nop_lr1"): New insn definitions.
19615 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19617 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19618 NDS32_V3PUSH_AVAILABLE_P macro.
19620 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19621 Chung-Ju Wu <jasonwucj@gmail.com>
19623 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19624 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19625 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19626 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19627 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19628 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19629 * config/nds32/constraints.md: New constraints and checking for hard
19630 float configuration.
19631 * config/nds32/iterators.md: New mode iterator and attribute for hard
19632 float configuration.
19633 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19635 * config/nds32/nds32-fpu.md: New file.
19636 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19637 deal with hard float code generation.
19638 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19640 (abi_type, float_reg_number): New enum type.
19641 * config/nds32/nds32-predicates.c: New predicates for hard float.
19642 * config/nds32/nds32-protos.h: Declare functions for hard float.
19643 * config/nds32/nds32.c: Implementation for hard float configuration.
19644 * config/nds32/nds32.h: Definitions for hard float configuration.
19645 * config/nds32/nds32.md: Include hard float machine description and
19646 modify patterns for hard float configuration.
19647 * config/nds32/nds32.opt: New options for hard float configuration.
19648 * config/nds32/predicates.md: New predicates for hard float
19651 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19653 * common/config/nds32/nds32-common.c
19654 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19656 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19658 PR middle-end/85195
19659 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19660 CONSTRUCTOR_ELT (ctor, ...)->value.
19662 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19665 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19667 2018-04-05 Tom de Vries <tom@codesourcery.com>
19670 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19673 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19674 Kito Cheng <kito.cheng@gmail.com>
19676 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19677 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19678 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19679 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19681 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19682 Kito Cheng <kito.cheng@gmail.com>
19684 * config/nds32/constraints.md (Ufe): New memory constraint.
19685 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19686 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19687 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19689 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19690 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19692 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19694 * config/nds32/nds32.md: Use optimize_size in the condition for
19695 alu-shift instructions.
19697 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19699 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19701 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19703 * config/nds32/nds32.md (negsi2): Refine pattern.
19705 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19706 Chung-Ju Wu <jasonwucj@gmail.com>
19708 * config/nds32/iterators.md (shift_rotate): New code iterator.
19709 (shift): New code attribute.
19710 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19711 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19712 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19713 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19714 bit-wise operations.
19715 (andsi3, *andsi3): Ditto.
19716 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19717 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19718 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19719 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19720 nds32_ior_operand, nds32_xor_operand): New predicates.
19722 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19724 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19725 (addsi3, subsi3): ... this.
19727 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19729 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19731 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19733 * config/nds32/nds32.md: Adjust indention.
19735 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19737 * config/nds32/nds32.md (feature): New attribute.
19739 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19741 * config/nds32/nds32.md (subtype): New attribute.
19743 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19746 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19747 expansion to perform a bitwise AND of the argument followed by a
19748 boolean negation of the result.
19750 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19752 PR rtl-optimization/84878
19753 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19754 the basic block. Assert the use reference is not artificial and that
19755 it has an associated insn.
19757 2018-04-04 Michael Matz <matz@suse.de>
19759 * builtins.c (compute_objsize): Pass correct operand
19760 to array_at_struct_end_p.
19762 2018-04-04 Richard Biener <rguenther@suse.de>
19765 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19766 from contexts for DINFO_LEVEL_TERSE and below.
19768 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19770 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19771 resiter_operand condition.
19772 * config/nds32/nds32.md (*move<mode>): Ditto.
19774 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19775 Monk Chiang <sh.chiang04@gmail.com>
19777 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19779 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19781 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19783 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19784 Kito Cheng <kito.cheng@gmail.com>
19786 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19787 nds32_cond_code_str, output_cond_branch,
19788 output_cond_branch_compare_zero, nds32_expand_cbranch,
19789 nds32_expand_cstore, nds32_expand_movcc,
19790 nds32_output_cbranchsi4_equality_zero,
19791 nds32_output_cbranchsi4_equality_reg,
19792 nds32_output_cbranchsi4_equality_reg_or_const_int,
19793 nds32_output_cbranchsi4_greater_less_zero: New functions.
19794 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19795 nds32_expand_cstore, nds32_expand_movcc,
19796 nds32_output_cbranchsi4_equality_zero,
19797 nds32_output_cbranchsi4_equality_reg,
19798 nds32_output_cbranchsi4_equality_reg_or_const_int,
19799 nds32_output_cbranchsi4_greater_less_zero): Declare.
19800 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19801 nds32_rimm11s_operand): New predicates.
19802 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19803 * config/nds32/nds32.md: Rewrite all the branch and conditional move
19806 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19808 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19809 * config/nds32/nds32.md: Ditto.
19810 * config/nds32/pipelines.md: Ditto.
19812 2018-04-04 Richard Biener <rguenther@suse.de>
19814 PR tree-optimization/85168
19815 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19816 propagating abnormals.
19818 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19820 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19822 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19823 Kito Cheng <kito.cheng@gmail.com>
19825 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19826 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19827 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19828 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19829 * config/nds32/nds32.md (sibcall_internal): New.
19830 (sibcall_register): Remove.
19831 (sibcall_immediate): Remove.
19832 (sibcall_value_internal): New.
19833 (sibcall_value_register): Remove.
19834 (sibcall_value_immediate): Remove.
19835 * config/nds32/predicates.md (nds32_general_register_operand): New.
19836 (nds32_call_address_operand): New.
19838 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19840 PR rtl-optimization/85167
19841 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19842 bb_defs if *split_p, instead preinitialize it to NULL.
19844 PR tree-optimization/85156
19845 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19846 evaluating the argument multiple times.
19848 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
19850 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19852 (_mm_cvtpd_ps): Likewise.
19853 (_mm_cvttpd_epi32): Likewise.
19854 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19855 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19856 vector, pixel, and bool following altivec.h include.
19858 2018-04-03 Martin Sebor <msebor@redhat.com>
19860 * doc/extend.texi (Common Function Attributes): Clarify.
19861 (const attribute): Likewise.
19862 (pure attribute): Likewise.
19864 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19867 * config/i386/i386.c (ix86_expand_vector_set): Use
19868 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
19870 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
19872 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19873 instructions when changing rounding bits to preserve precision bits
19874 in the x87 control word.
19876 2018-04-03 Martin Liska <mliska@suse.cz>
19878 PR tree-optimization/82491
19879 * rtl.h (strip_offset_and_add): Replace += suboffset with
19880 poly_uint64 () + suboffset.
19882 2018-03-29 Martin Liska <mliska@suse.cz>
19883 Martin Jambor <mjambor@suse.cz>
19886 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19887 param_type is not an integral or pointer type.
19889 2018-04-03 Richard Biener <rguenther@suse.de>
19891 * sese.h (recompute_all_dominators): Remove.
19893 2018-04-02 Martin Sebor <msebor@redhat.com>
19895 * doc/invoke.texi (-Wrestrict): Fix typos.
19897 2018-04-02 Jim Wilson <jimw@sifive.com>
19899 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19900 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19901 (<optab>di3, <optab>si3_extend): Likewise.
19902 (<optab>si3_mask, <optab>si3_mask_1): New.
19903 (<optab>di3_mask, <optab>di3_mask_1): New.
19904 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19905 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19906 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19908 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
19910 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19913 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
19915 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19916 (nds32_canonicalize_comparison): New function.
19918 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19919 Kito Cheng <kito.cheng@gmail.com>
19920 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19922 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19923 * config/nds32/constants.md (unspec_volatile_element): Add
19924 UNSPEC_VOLATILE_RELAX_GROUP.
19925 * config/nds32/nds32-relax-opt.c: New file.
19926 * config/nds32/nds32-predicates.c
19927 (nds32_symbol_load_store_p): New function.
19928 * config/nds32/nds32-protos.h
19929 (nds32_symbol_load_store_p): Declare function.
19930 (make_pass_nds32_relax_opt): Declare new rtl pass function.
19931 * config/nds32/nds32.c
19932 (nds32_register_pass): New function to register pass.
19933 (nds32_register_passes): New function to register passes.
19934 * config/nds32/nds32.md (relax_group): New pattern.
19935 * config/nds32/nds32.opt (mrelax-hint): New option.
19936 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19938 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
19940 * config/nds32/t-nds32: Modify files dependency.
19942 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19944 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19945 (PROFILE_HOOK): Define its implementation.
19947 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19949 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19950 type and 32-bit size.
19952 2018-04-01 Jakub Jelinek <jakub@redhat.com>
19954 PR middle-end/85090
19955 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19956 (V_128_256): New mode iterator.
19957 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19958 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19959 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19961 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19962 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19964 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
19967 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19968 NaN inputs correctly.
19970 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
19973 * config/rs6000/vsx.md (??r): New mode attribute.
19974 (*vsx_mov<mode>_64bit): Use it.
19975 (*vsx_mov<mode>_32bit): Likewise.
19977 2018-03-30 Martin Sebor <msebor@redhat.com>
19979 PR tree-optimization/84818
19980 * builtins.c (check_access): Use warning_n.
19982 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19985 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19987 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19990 2018-03-30 Julia Koval <julia.koval@intel.com>
19993 * x86-tune.def (movx, partial_reg_dependency): Enable for
19996 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
19998 PR inline-asm/84985
19999 * lra-constraints.c (process_alt_operands): Move setting
20000 this_alternative_matches below.
20002 2018-03-29 Martin Liska <mliska@suse.cz>
20005 * doc/invoke.texi: Document how LTO works with debug info.
20006 Describe auto-load support of binutils. Mention 'x86-64'
20007 as valid option value of -march option.
20009 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20011 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20014 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20015 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20016 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20019 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20022 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20023 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20024 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20025 for RS6000_BTM_POWERPC64.
20026 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20027 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20028 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20031 (DIVDEU): Likewise.
20033 2018-03-28 Carl Love <cel@us.ibm.com>
20036 2017-09-27 Carl Love <cel@us.ibm.com>
20038 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20039 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20040 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20043 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20045 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20046 instead of __vector bool.
20047 (_mm_max_pu8): Likewise.
20048 (_mm_min_pi16): Likewise.
20050 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20053 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20054 (DIVWEUO): Likewise.
20055 (DIVDEO): Likewise.
20056 (DIVDEUO): Likewise.
20057 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20058 DIVWEUO and DIVDEUO.
20059 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20060 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20061 (div_extend): Likewise.
20062 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20064 (__builtin_divweuo): Likewise.
20065 (__builtin_divdeo): Likewise.
20066 (__builtin_divdeuo): Likewise.
20068 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20071 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20072 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20074 PR tree-optimization/82004
20075 * gimple-match-head.c (optimize_pow_to_exp): New function.
20076 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20077 Don't fold to exp if optimize_pow_to_exp is false.
20079 2018-03-28 Martin Liska <mliska@suse.cz>
20082 * calls.c (initialize_argument_information): Fix trailing space.
20083 * common.opt: Fix typo and provide better explanation for
20084 -fsanitize-coverage option.
20085 * config/i386/i386.opt: Fix typo.
20087 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20088 Martin Liska <mliska@suse.cz>
20091 * gimplify.c (asan_poison_variable): Don't do the check for
20092 gimplify_omp_ctxp here.
20093 (gimplify_decl_expr): Do it here.
20094 (gimplify_target_expr): Likewise.
20096 2018-03-28 Martin Liska <mliska@suse.cz>
20099 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20100 chkp_type_bounds_count if MPX is not enabled.
20102 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20104 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20106 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20109 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20110 function to create the function decl for complex long double
20111 multiply and divide for -mabi=ieeelongdouble.
20112 (init_float128_ieee): Call it.
20114 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20117 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20118 -fcf-protection=branch -mibt.
20119 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20121 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20124 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20125 arm_word_relocations.
20127 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20130 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20131 extern array declarations.
20133 2018-03-27 Richard Biener <rguenther@suse.de>
20135 PR middle-end/84067
20136 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20137 explicit single_use checks.
20139 2018-03-27 Richard Biener <rguenther@suse.de>
20141 PR tree-optimization/85082
20142 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20145 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20147 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20148 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20149 Turn on fasynchronous-unwind-tables and funwind-tables.
20151 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20154 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20155 (*bmi_blsr_<mode>_ccz): Ditto.
20157 2018-03-26 Tom de Vries <tom@codesourcery.com>
20159 PR tree-optimization/85063
20160 * omp-general.c (offloading_function_p): New function. Factor out
20162 * omp-offload.c (pass_omp_target_link::gate): ... here.
20163 * omp-general.h (offloading_function_p): Declare.
20164 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20165 with attribute omp declare target for offloading functions.
20167 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20169 PR tree-optimization/84005
20170 * tree-data-ref.h (get_base_for_alignment): Declare.
20171 * tree-data-ref.c (get_base_for_alignment_1): New function.
20172 (get_base_for_alignment): Likewise.
20173 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20174 get_base_for_alignment to find a suitable base object, instead
20175 of always using drb->base_address.
20177 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20179 PR inline-asm/85022
20180 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20181 known size by default.
20183 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20185 PR inline-asm/85030
20186 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20187 and non BLKmode operands.
20189 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20192 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20193 Clean up attributes.
20195 2018-03-23 Richard Biener <rguenther@suse.de>
20198 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20199 we are going to emit early debug for LTO.
20201 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20203 PR inline-asm/85034
20204 * function.c (match_asm_constraints_1): Don't optimize if input
20205 doesn't satisfy general_operand predicate for output's mode.
20207 PR inline-asm/85022
20208 * alias.c (write_dependence_p): Don't require for x_canonicalized
20209 non-VOIDmode if x has VOIDmode.
20212 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20213 just don't try to optimize it rather than assert it never happens.
20215 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20217 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20218 macro expansions for definition of ST_INTERNAL_<mode> and
20219 LD_INTERNAL_<mode> builtins.
20220 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20222 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20224 (altivec_expand_st_builtin): Likewise.
20225 (altivec_expand_builtin): Remove calls to deleted functions.
20226 (rs6000_address_for_altivec): Delete this function.
20227 * config/rs6000/vector.md: Remove expands for
20228 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20230 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20233 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20234 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20235 re-computing once computed.
20236 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20237 (arm_init_machine_status): Initialize
20238 machine->static_chain_stack_bytes.
20240 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20243 * doc/extend.texi: Add four new prototypes for vec_ld.
20244 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20245 definitions for more logical presentation.
20246 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20247 entries for V1TI variants of __builtin_altivec_ld builtin.
20248 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20249 handling of V1TI variant of LVX icode pattern.
20250 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20251 (rs6000_gimple_fold_builtin): Likewise.
20252 (altivec_init_builtins): Add code to define
20253 __builtin_altivec_lvx_v1ti function.
20255 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20257 PR inline-asm/84941
20258 * function.c (match_asm_constraints_1): Don't do the optimization
20259 if input isn't a REG, SUBREG, MEM or constant.
20261 2018-03-22 Tom de Vries <tom@codesourcery.com>
20263 PR tree-optimization/84956
20264 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20265 bb_has_abnormal_pred.
20267 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20270 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20271 DECL_INITIAL (decl) to decl at the end.
20272 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20273 adjust the comment.
20275 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20277 * doc/extend.texi (__builtin_tgmath): Document when complex
20278 integer types are treated as _Complex _Float64.
20280 2018-03-21 Tom de Vries <tom@codesourcery.com>
20282 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20284 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20286 PR tree-optimization/84960
20287 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20288 if it is ENTRY block, move them into single succ of ENTRY in that case.
20290 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20292 PR tree-optimization/84811
20293 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20294 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20295 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20296 (known_subrange_p): Update accordingly. Cast each value involved
20297 in the size comparison, rather than casting the result of the
20300 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20302 PR tree-optimization/84982
20303 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20304 by flipping the least significant bit rather than all bits from
20305 bitpos to bitpos + bitsize - 1.
20307 2018-03-21 Nathan Sidwell <nathan@acm.org>
20309 * doc/extend.texi (Deprecated Features): Remove mention of
20310 long-deleted deprecations.
20312 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20315 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20316 * configure: Regenerate.
20318 2018-03-21 Tom de Vries <tom@codesourcery.com>
20320 PR tree-optimization/83126
20321 * tree-parloops.c (num_phis): New function.
20322 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20324 2018-03-21 Nathan Sidwell <nathan@acm.org>
20326 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20327 mention anon-struct/union members and trailing attributes.
20329 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20331 PR tree-optimization/84969
20332 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20333 builtin memset partitions if they set different rhs values.
20335 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20337 PR rtl-optimization/84989
20338 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20339 VEC_DUPLICATE with scalar result mode.
20341 2018-03-21 Martin Liska <mliska@suse.cz>
20344 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20345 not intended return statement.
20347 2018-03-21 Martin Liska <mliska@suse.cz>
20350 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20351 (chkp_find_bound_slots_1): Limit number of iterations.
20353 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20356 * Minor grammar fixes for x86 options.
20358 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20361 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20362 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20364 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20367 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20368 (altivec_lvx_<mode>_1op): Likewise.
20369 (altivec_stvx_<mode>_2op): Likewise.
20370 (altivec_stvx_<mode>_1op): Likewise.
20371 (altivec_lvx_<VM2:mode>): New define_expand.
20372 (altivec_stvx_<VM2:mode>): Likewise.
20373 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20374 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20375 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20376 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20377 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20378 (rs6000_gen_lvx): Likewise.
20379 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20380 (altivec_expand_stv_builtin): Likewise.
20381 (altivec_expand_builtin): Likewise.
20382 * config/rs6000/vector.md: Likewise.
20384 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20387 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20390 2018-03-20 Richard Biener <rguenther@suse.de>
20393 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20394 sign-conversions as zero, fall back to standard scalar_stmt
20397 2018-03-20 Martin Liska <mliska@suse.cz>
20400 * predict.c (rebuild_frequencies): Handle case when we have
20401 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20403 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20406 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20407 flag_section_anchors.
20408 * varasm.c (use_blocks_for_decl_p): Remove hack for
20409 dw2_force_const_mem.
20412 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20414 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20415 be created, use lowpart_subreg of operands[0] rather than operands[0]
20417 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20418 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20419 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20420 and n constraint instead of aarch64_shift_imm_di and Usd.
20421 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20422 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20424 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20427 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20428 to favor GPR over NEON registers.
20429 (<shift>di3_neon): Likewise.
20431 2018-03-20 Tom de Vries <tom@codesourcery.com>
20434 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20435 (nvptx_process_pars): Emit bar.sync asap and alap.
20437 2018-03-20 Tom de Vries <tom@codesourcery.com>
20440 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20441 seen_label if seen_label is already set.
20443 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20446 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20447 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20448 Use 1U instead of 1. Formatting fixes.
20451 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20452 instead of TREE_TYPE (s1) for the return value.
20454 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20456 PR tree-optimization/84946
20457 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20458 bitsize + bitsize in poly_uint64 rather than poly_int64.
20461 * dwarf2asm.c: Include fold-const.c.
20462 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20463 of decl rather than decl itself.
20465 PR rtl-optimization/84643
20466 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20468 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20471 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20472 calling assemble_variable.
20474 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20477 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20478 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20480 2018-03-19 Jim Wilson <jimw@sifive.com>
20483 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20484 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20485 (riscv_first_stack_step): Likewise.
20486 (riscv_option_override): Use STACK_BOUNDARY instead of
20487 MIN_STACK_BOUNDARY.
20488 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20489 MIN_STACK_BOUNDARY.
20490 (BIGGEST_ALIGNMENT): Set to 128.
20491 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20492 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20495 2018-03-19 Richard Biener <rguenther@suse.de>
20497 PR tree-optimization/84933
20498 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20499 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20501 2018-03-19 Richard Biener <rguenther@suse.de>
20503 PR tree-optimization/84859
20504 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20505 (cond_if_else_store_replacement): Perform sinking operation on
20506 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20507 Generalize what a BB with a single eligible store is.
20509 2018-03-19 Richard Biener <rguenther@suse.de>
20511 PR tree-optimization/84929
20512 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20513 chrec_is_positive against non-chrec arg.
20515 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20518 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20520 2018-03-18 Martin Liska <mliska@suse.cz>
20522 PR rtl-optimization/84635
20523 * regrename.c (build_def_use): Use matches_mode only when
20526 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20528 PR tree-optimization/84913
20529 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20530 vectorize chains of COND_EXPRs.
20532 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20534 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20536 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20538 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20540 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20542 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20544 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20545 Kito Cheng <kito.cheng@gmail.com>
20547 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20548 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20549 (nds32_adjust_reg_alloc_order): New function.
20550 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20552 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20554 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20555 nds32_print_operand, nds32_print_operand_address): Use
20556 HOST_WIDE_INT_PRINT_DEC instead.
20558 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20560 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20562 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20565 * config/i386/i386.c (initial_ix86_tune_features,
20566 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20567 unsigned long long.
20568 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20569 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20570 rather than 1u << ix86_tune. Formatting fix.
20571 (ix86_option_override_internal): Change ix86_arch_mask from
20572 unsigned int to unsigned HOST_WIDE_INT, initialize to
20573 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20574 (ix86_function_specific_restore): Likewise.
20576 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20579 * postreload.c (reload_combine_recognize_pattern): Perform
20580 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20581 truncate_int_for_mode the result for the destination's mode.
20584 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20585 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20587 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20590 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20593 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20594 regno_allocno_class_array and sorted_pseudos.
20595 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20596 insns where regno is used.
20598 2018-03-16 Martin Liska <mliska@suse.cz>
20601 * multiple_target.c (create_dispatcher_calls): Redirect
20602 reference in the symbol table.
20604 2018-03-16 Martin Liska <mliska@suse.cz>
20607 * multiple_target.c (create_dispatcher_calls): Redirect also
20610 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20614 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20615 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20616 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20618 2018-03-16 Julia Koval <julia.koval@intel.com>
20620 * doc/invoke.texi (Skylake Server): Add CLWB.
20621 Cannonlake): Remove CLWB.
20623 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20625 PR tree-optimization/84841
20626 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20628 (FLOAT_ONE_CONST_TYPE): Define.
20629 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20630 (sort_by_operand_rank): Put entries with higher constant_type last
20631 rather than first to match comments.
20633 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20635 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20638 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20641 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20642 check and use address of target always.
20644 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20647 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20648 (indirect_thunk_bnd_needed): Likewise.
20649 (indirect_thunks_used): Likewise.
20650 (indirect_thunks_bnd_used): Likewise.
20651 (indirect_return_needed): New.
20652 (indirect_return_bnd_needed): Likewise.
20653 (output_indirect_thunk_function): Add a bool argument for
20655 (output_indirect_thunk_function): Don't generate alias for
20656 function return thunk.
20657 (ix86_code_end): Call output_indirect_thunk_function to generate
20658 function return thunks.
20659 (ix86_output_function_return): Set indirect_return_bnd_needed
20660 and indirect_return_needed instead of indirect_thunk_bnd_needed
20661 and indirect_thunk_needed.
20663 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20665 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20666 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20667 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20669 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20670 Paul Hua <paul.hua.gm@gmail.com>
20673 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20675 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20677 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20678 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20679 resp. SFmode cases.
20681 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20684 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20685 instead of GET_MODE_SIZE when comparing Units.
20687 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20690 * varasm.c (hash_section): Return an unchangeble hash value
20691 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20692 Return !aarch64_can_use_per_function_literal_pools_p ().
20694 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20697 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20698 rather than address of cmode as last argument to prepare_cmp_insn.
20700 2018-03-15 Julia Koval <julia.koval@intel.com>
20702 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20703 F_AVX512VNNI, F_AVX512BITALG): New.
20705 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20708 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20709 insn for floating-point loads and stores.
20711 2018-03-14 Carl Love <cel@us.ibm.com>
20713 * config/rs6000/rs6000-c.c: Add macro definitions for
20714 ALTIVEC_BUILTIN_VEC_PERMXOR.
20715 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20716 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20717 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20718 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20720 * config/doc/extend.texi: Add prototypes for vec_permxor.
20722 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20725 * diagnostic-show-locus.c (class layout_point): Convert m_line
20726 from int to linenum_type.
20727 (line_span::comparator): Use linenum "compare" function when
20728 comparing line numbers.
20729 (test_line_span): New function.
20730 (layout_range::contains_point): Convert param "row" from int to
20732 (layout_range::intersects_line_p): Likewise.
20733 (layout::will_show_line_p): Likewise.
20734 (layout::print_source_line): Likewise.
20735 (layout::should_print_annotation_line_p): Likewise.
20736 (layout::print_annotation_line): Likewise.
20737 (layout::print_leading_fixits): Likewise.
20738 (layout::annotation_line_showed_range_p): Likewise.
20739 (struct line_corrections): Likewise for field m_row.
20740 (line_corrections::line_corrections): Likewise for param "row".
20741 (layout::print_trailing_fixits): Likewise.
20742 (layout::get_state_at_point): Likewise.
20743 (layout::get_x_bound_for_row): Likewise.
20744 (layout::print_line): Likewise.
20745 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20746 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20747 * input.c (selftest::test_linenum_comparisons): New function.
20748 (selftest::input_c_tests): Call it.
20749 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20750 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20751 * selftest.h (ASSERT_GT): New macro.
20752 (ASSERT_GT_AT): New macro.
20753 (ASSERT_LT): New macro.
20754 (ASSERT_LT_AT): New macro.
20756 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20758 PR rtl-optimization/84780
20759 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20761 2018-03-14 Martin Liska <mliska@suse.cz>
20763 * tree.c (record_node_allocation_statistics): Use
20764 get_stats_node_kind.
20765 (get_stats_node_kind): New function extracted from
20766 record_node_allocation_statistics.
20767 (free_node): Use get_stats_node_kind.
20769 2018-03-14 Richard Biener <rguenther@suse.de>
20771 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20772 that the value-set of ANTIC_IN doesn't grow.
20775 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20777 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20778 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20780 2018-03-14 Julia Koval <julia.koval@intel.com>
20782 * config.gcc (icelake-client, icelake-server): New.
20784 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20785 (initial_ix86_arch_features): Ditto.
20786 (PTA_SKYLAKE): Add SGX.
20787 (PTA_ICELAKE): Remove.
20788 (PTA_ICELAKE_CLIENT): New.
20789 (PTA_ICELAKE_SERVER): New.
20790 (ix86_option_override_internal): Split up icelake on icelake client and
20792 (get_builtin_code_for_version): Ditto.
20793 (fold_builtin_cpu): Ditto.
20794 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20795 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20796 * config/i386/i386.h (processor_type): Ditto.
20797 * doc/invoke.texi: Ditto.
20799 2018-03-14 Jakub Jelinek <jakub@redhat.com>
20802 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20803 INTEGER_CST offset, add it together with bitpos / 8 and
20804 sign extend based on POINTER_SIZE.
20808 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
20811 * config/i386/constraints.md (Yc): New register constraint.
20812 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20813 Use Yc constraint for alternative 2 of operand 0. Remove
20814 preferred_for_speed attribute.
20816 2018-03-14 Richard Biener <rguenther@suse.de>
20818 PR tree-optimization/84830
20819 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20820 with the old one to avoid oscillations.
20822 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
20825 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20827 (assign_by_spills): Return a flag of reload assignment failure.
20828 Do not process the reload assignment failures. Do not spill other
20829 reload pseudos if they has the same reg class. Update n if
20831 (lra_assign): Add a return arg. Set up from the result of
20832 assign_by_spills call.
20833 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20834 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20835 usage_insns if it is not NULL.
20836 (spill_hard_reg_in_range): New function.
20837 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20838 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20839 function prototypes.
20840 (lra_assign): Change prototype.
20841 * lra.c (lra): Add code to deal with fails by splitting hard reg
20844 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
20846 * config/riscv/riscv.opt (mrelax): New option.
20847 * config/riscv/riscv.c (riscv_file_start): Emit ".option
20848 "norelax" when riscv_mrelax is disabled.
20849 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20851 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20854 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20855 reassociation for int modes.
20857 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20859 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20860 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20862 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20863 * config/aarch64/aarch64-sve.md
20864 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20865 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20866 (*extend<mode><Vwide>2): Rename to...
20867 (aarch64_sve_extend<mode><Vwide>2): ...this.
20868 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20869 renaming the old pattern to...
20870 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
20872 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20873 define_expand, renaming the old pattern to...
20874 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20875 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20876 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20877 account when deciding which SVE instruction the optab should use.
20878 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20880 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20882 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20883 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20884 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20885 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20886 (tlsdesc_small_<mode>): Turn a define_expand and use
20887 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
20888 (tlsdesc_small_advsimd_<mode>): ...this.
20889 (tlsdesc_small_sve_<mode>): New pattern.
20891 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20893 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20894 (UNSPEC_UMUL_HIGHPART): New constants.
20895 (MUL_HIGHPART): New int iteraor.
20896 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20897 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20899 (*<su>mul<mode>3_highpart): New define_insn.
20901 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20904 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20907 2018-03-13 Martin Liska <mliska@suse.cz>
20910 * (sem_item_optimizer::sem_item_optimizer): Initialize new
20912 (sem_item_optimizer::~sem_item_optimizer): Release it.
20913 (sem_item_optimizer::merge_classes): Register variable aliases.
20914 (sem_item_optimizer::fixup_pt_set): New function.
20915 (sem_item_optimizer::fixup_points_to_sets): Likewise.
20916 * ipa-icf.h: Declare new variables and functions.
20918 2018-03-13 Jakub Jelinek <jakub@redhat.com>
20920 PR middle-end/84834
20921 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20922 integer_pow2p@2 and test integer_pow2p in condition.
20923 (A < 0 ? C : 0): Similarly for @1.
20925 PR middle-end/84831
20926 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20927 characters starting at p contain '\0' character, don't look beyond
20931 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20932 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20935 * reg-stack.c (change_stack): Change update_end var from int to
20936 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20937 also call set_block_for_insn on the newly added insns and rescan.
20940 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20941 on the last operand.
20944 * tree.c (stabilize_reference_1): Return save_expr (e) for
20945 STATEMENT_LIST even if it doesn't have side-effects.
20947 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
20949 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20951 2018-03-12 Renlin Li <renlin.li@arm.com>
20953 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20954 aarch64_output_scalar_simd_mov_immediate.
20956 2018-03-12 Martin Sebor <msebor@redhat.com>
20958 PR tree-optimization/83456
20959 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20960 for perfectly overlapping calls to memcpy.
20961 (gimple_fold_builtin_memory_chk): Same.
20962 (gimple_fold_builtin_strcpy): Handle no-warning.
20963 (gimple_fold_builtin_stxcpy_chk): Same.
20964 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20966 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20968 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20969 parameter. Use it for SFmode.
20970 (rs6000_function_arg_advance_1): Adjust.
20971 (rs6000_function_arg): Adjust.
20972 (rs6000_gimplify_va_arg): Pass false for that new parameter.
20974 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20976 PR rtl-optimization/84169
20977 PR rtl-optimization/84780
20978 * combine.c (can_combine_p): Check for a 2-insn combination whether
20979 the destination register is used between the two insns, too.
20981 2018-03-12 Richard Biener <rguenther@suse.de>
20983 PR tree-optimization/84803
20984 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20985 for refs DR analysis didn't process.
20987 2018-03-12 Richard Biener <rguenther@suse.de>
20989 PR tree-optimization/84777
20990 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20991 force-vectorize loops ignore whether we are optimizing for size.
20993 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
20995 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20996 (TARGET_MD_ASM_ADJUST): Define.
20998 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
20999 Kito Cheng <kito.cheng@gmail.com>
21000 Chung-Ju Wu <jasonwucj@gmail.com>
21002 * config/nds32/nds32.c (nds32_compute_stack_frame,
21003 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21004 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21005 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21006 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21007 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21008 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21009 * config/nds32/nds32.md (prologue, epilogue): Use macro
21010 NDS32_V3PUSH_AVAILABLE_P to do checking.
21012 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21015 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21016 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21017 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21018 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21019 addition of most attributes on !orig_type_die or the attribute not
21020 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21022 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21023 Chung-Ju Wu <jasonwucj@gmail.com>
21025 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21026 __NDS32_VH__ macro.
21027 * config/nds32/nds32.opt (mvh): New option.
21029 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21030 Chung-Ju Wu <jasonwucj@gmail.com>
21032 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21034 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21035 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21038 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21039 Chung-Ju Wu <jasonwucj@gmail.com>
21041 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21043 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21044 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21046 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21047 Kito Cheng <kito.cheng@gmail.com>
21048 Chung-Ju Wu <jasonwucj@gmail.com>
21050 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21051 UNSPEC_FFMISM and UNSPEC_FLMISM.
21052 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21053 for ffb, ffmism and flmism.
21054 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21055 (unspec_ffmism): Ditto.
21056 (unspec_flmism): Ditto.
21057 (nds32_expand_builtin_impl): Check if string extension is available.
21058 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21059 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21061 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21064 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21067 * lra-assigns.c (assign_by_spills): Return a flag of reload
21068 assignment failure. Do not process the reload assignment
21069 failures. Do not spill other reload pseudos if they has the same
21071 (lra_assign): Add a return arg. Set up from the result of
21072 assign_by_spills call.
21073 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21074 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21075 usage_insns if it is not NULL.
21076 (spill_hard_reg_in_range): New function.
21077 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21078 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21079 function prototypes.
21080 (lra_assign): Change prototype.
21081 * lra.c (lra): Add code to deal with fails by splitting hard reg
21084 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21087 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21089 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21092 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21093 (dw_val_node): Add val_symbolic_view.
21094 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21095 (symview_upper_bound): New.
21096 (new_line_info_table): Initialize symviews_since_reset.
21097 (dwarf2out_source_line): Count symviews_since_reset and set
21098 symview_upper_bound.
21099 (dw_val_equal_p): Handle symview.
21100 (add_AT_symview): New.
21101 (print_dw_val): Handle symview.
21102 (attr_checksum, attr_checksum_ordered): Likewise.
21103 (same_dw_val_p, size_of_die): Likewise.
21104 (value_format, output_die): Likewise.
21105 (add_high_low_attributes): Use add_AT_symview for entry_view.
21106 (dwarf2out_finish): Reset symview_upper_bound, clear
21109 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21112 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21113 Add strict argument and use it.
21114 (rs6000_split_multireg_move): Update for new strict argument.
21115 (mem_operand_gpr): Disallow all non-offsettable addresses.
21116 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21118 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21121 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21122 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21123 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21126 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21127 decl, use remap_type if we want to use the type.
21129 2018-03-09 Martin Sebor <msebor@redhat.com>
21131 PR tree-optimization/84526
21132 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21134 (builtin_access::generic_overlap): Be prepared to handle non-array
21137 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21139 PR rtl-optimization/84682
21140 * lra-constraints.c (process_address_1): Check is_address flag
21141 for address constraints.
21142 (process_alt_operands): Likewise.
21143 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21144 preprocess_constraints.
21145 * recog.h (preprocess_constraints): Add oploc parameter.
21147 * recog.c (preprocess_constraints): Test address_operand for
21148 CT_ADDRESS constraints.
21150 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21153 * lra-assigns.c (assign_by_spills): Return a flag of reload
21154 assignment failure. Do not process the reload assignment
21155 failures. Do not spill other reload pseudos if they has the same
21157 (lra_assign): Add a return arg. Set up from the result of
21158 assign_by_spills call.
21159 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21160 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21161 usage_insns if it is not NULL.
21162 (spill_hard_reg_in_range): New function.
21163 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21164 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21165 function prototypes.
21166 (lra_assign): Change prototype.
21167 * lra.c (lra): Add code to deal with fails by splitting hard reg
21170 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21173 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21174 Accept complain bool parameter. Only emit errors if it is true.
21175 (arm_parse_cpu_option_name): Likewise.
21176 (arm_target_thumb_only): Adjust callers of the above.
21177 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21178 prototype to take a default true bool parameter.
21179 (arm_parse_arch_option_name): Likewise.
21181 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21182 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21186 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21187 * configure: Regenerate.
21188 * configure.ac ("linker --version-script option"): New.
21189 ("linker soname option"): New.
21191 2018-03-09 Richard Biener <rguenther@suse.de>
21193 PR tree-optimization/84775
21194 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21195 immediate uses of predicate stmts and mark them modified.
21198 PR tree-optimization/84178
21199 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21201 (version_loop_for_if_conversion): Delay update_ssa call.
21202 (tree_if_conversion): Delay update_ssa until after predicate
21205 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21208 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21209 when the function accesses prior frames.
21211 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21214 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21215 gen_llsym, otherwise call maybe_gen_llsym.
21217 PR inline-asm/84742
21218 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21219 has ',' character inside of it.
21221 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21224 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21225 as clobbering CC_REGNUM.
21227 2018-03-08 Richard Biener <rguenther@suse.de>
21229 PR middle-end/84552
21230 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21231 (follow_copies_to_constant): Do not follow SSA names registered
21234 2018-03-08 Richard Biener <rguenther@suse.de>
21236 PR tree-optimization/84178
21237 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21239 (version_loop_for_if_conversion): Delay update_ssa call.
21240 (tree_if_conversion): Delay update_ssa until after predicate
21243 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21245 PR tree-optimization/84178
21246 * tree-if-conv.c (release_bb_predicate): Remove the
21247 the assertion that the stmts have NULL use_ops.
21248 Discard the statements, asserting that they haven't
21249 yet been added to a BB.
21251 2018-03-08 Richard Biener <rguenther@suse.de>
21253 PR tree-optimization/84746
21254 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21255 (phi_translate): Pass in destination ANTIC_OUT set.
21256 (phi_translate_1): Likewise. For a simplified result lookup
21257 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21258 (phi_translate_set): Adjust.
21259 (do_pre_regular_insertion): Likewise.
21260 (do_pre_partial_partial_insertion): Likewise.
21262 2018-03-08 Martin Liska <mliska@suse.cz>
21264 PR gcov-profile/84735
21265 * doc/gcov.texi: Document usage of profile files.
21266 * gcov-io.h: Document changes in the format.
21268 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21272 * dwarf2out.c (struct dw_line_info_table): Update comments for
21274 (FORCE_RESET_NEXT_VIEW): New.
21275 (FORCE_RESETTING_VIEW_P): New.
21276 (RESETTING_VIEW_P): Check for -1 too.
21277 (ZERO_VIEW_P): Likewise.
21278 (new_line_info_table): Force-reset next view.
21279 (dwarf2out_begin_function): Likewise.
21280 (dwarf2out_source_line): Simplify zero_view_p initialization.
21281 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21282 view directly. Omit view when omitting .loc at line 0.
21284 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21286 PR tree-optimization/84740
21287 * tree-switch-conversion.c (process_switch): Call build_constructors
21288 only if info.phi_count is non-zero.
21290 PR tree-optimization/84739
21291 * tree-tailcall.c (find_tail_calls): Check call arguments against
21292 DECL_ARGUMENTS (current_function_decl) rather than
21293 DECL_ARGUMENTS (func) when checking for tail recursion.
21295 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21297 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21298 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21299 Volker Reichelt's entry and add entries for people that perform
21300 GCC fuzzy testing and report numerous bugs.
21302 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21305 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21306 readonly data in sdata, if that is disabled.
21307 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21308 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21309 -mreadonly-in-sdata option.
21311 2018-03-07 Martin Sebor <msebor@redhat.com>
21313 PR tree-optimization/84468
21314 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21315 basic block when looking for nul assignment.
21317 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21320 * except.h (output_function_exception_table): Adjust prototype.
21321 * except.c (output_function_exception_table): Remove FNNAME parameter
21322 and add SECTION parameter. Ouput one part of the table at a time.
21323 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21324 the first part of the exception table and emit unwind directives.
21325 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21326 (i386_pe_seh_cold_init): Likewise.
21327 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21328 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21329 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21330 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21331 * config/i386/winnt.c: Include except.h.
21332 (struct seh_frame_state): Add reg_offset, after_prologue and
21333 in_cold_section fields.
21334 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21335 (i386_pe_seh_cold_init): New function.
21336 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21337 to seh->in_cold_section.
21338 (seh_emit_push): Record the offset of the push.
21339 (seh_emit_save): Record the offet of the save.
21340 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21341 Test seh->after_prologue to disregard the epilogue.
21342 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21343 (i386_pe_end_cold_function): New function.
21345 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21348 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21349 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21352 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21354 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21355 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21357 PR middle-end/84723
21358 * multiple_target.c: Include tree-inline.h and intl.h.
21359 (expand_target_clones): Diagnose and fail if node->definition and
21360 !tree_versionable_function_p (node->decl).
21362 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21364 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21366 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21367 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21368 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21370 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21373 * combine.c (try_combine): Use reg_or_subregno instead of handling
21374 just paradoxical SUBREGs and REGs.
21376 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21378 * config/arc/arc.c (arc_finalize_pic): Remove function.
21379 (arc_must_save_register): We use single base PIC register, remove
21380 checks to save/restore the PIC register.
21381 (arc_expand_prologue): Likewise.
21382 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21384 (arc_verify_short): Likewise.
21385 (arc_attr_type): Likewise.
21386 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21387 (walk_stores): Likewise.
21388 (arc_address_cost): Make it static.
21389 (arc_verify_short): Likewise.
21390 (branch_dest): Likewise.
21391 (arc_attr_type): Likewise.
21392 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21393 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21394 (arc_final_prescan_insn): Remove inserting the nops due to
21395 hardware hazards. It is done in reorg step.
21396 (insn_length_variant_t): Remove.
21397 (insn_length_parameters_t): Likewise.
21398 (arc_insn_length_parameters): Likewise.
21399 (arc_get_insn_variants): Likewise.
21400 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21402 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21404 PR inline-asm/84683
21405 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21408 PR tree-optimization/84687
21409 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21411 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21413 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21415 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21416 Rename to ppc_speculation_barrier.
21417 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21418 __builtin_ppc_speculation_barrier.
21420 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21423 * combine.c (combine_simplify_rtx): Don't try to simplify if
21424 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21427 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21429 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21430 to 32 bytes when compiling for POWER9.
21432 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21435 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21436 regparm >= 3 with no arg reg available also for calls with
21437 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21440 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21442 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21444 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21447 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21449 2018-03-05 Richard Biener <rguenther@suse.de>
21451 PR tree-optimization/84486
21452 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21453 When inserting a __builtin_assume_aligned call set the LHS
21454 SSA name alignment info accordingly.
21456 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21458 PR tree-optimization/84114
21459 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21460 Avoid reassociation of FLOAT_MODE addition.
21462 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21464 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21465 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21466 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21467 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21468 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21469 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21470 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21472 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21473 __builtin_ia32_wbinvd): New builtins.
21474 (SPECIAL_ARGS2): New.
21475 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21476 (SPECIAL_ARGS2): New.
21477 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21478 (ix86_valid_target_attribute_inner_p): Ditto.
21479 (ix86_init_mmx_sse_builtins): Add special_args2.
21480 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21481 TARGET_WBNOINVD_P): New.
21482 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21483 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21484 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21485 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21486 * config/i386/pconfigintrin.h: New file.
21487 * config/i386/wbnoinvdintrin.h: Ditto.
21488 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21490 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21492 2018-03-05 Richard Biener <rguenther@suse.de>
21494 PR tree-optimization/84670
21495 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21497 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21498 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21499 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21500 doesn't grow if all successors (recursively) were visited at least
21503 2018-03-05 Richard Biener <rguenther@suse.de>
21505 PR tree-optimization/84650
21506 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21507 if executed in the loop pipeline.
21509 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21511 * doc/configfiles.texi (Configuration Files): Move info about
21512 conditionalizing $target-protos.h to...
21513 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21514 differs from $target-protos.h.
21516 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21517 Chung-Ju Wu <jasonwucj@gmail.com>
21519 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21520 * config/nds32/nds32-multiple.md (setmemsi): Define.
21521 * config/nds32/nds32-memory-manipulation.c
21522 (nds32_gen_dup_4_byte_to_word_value): New.
21523 (emit_setmem_word_loop): New.
21524 (emit_setmem_byte_loop): New.
21525 (nds32_expand_setmem_loop): New.
21526 (nds32_expand_setmem_loop_v3m): New.
21527 (nds32_expand_setmem_unroll): New.
21528 (nds32_expand_setmem): New.
21530 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21531 Chung-Ju Wu <jasonwucj@gmail.com>
21533 * config/nds32/nds32-memory-manipulation.c
21534 (nds32_emit_load_store): New.
21535 (nds32_emit_post_inc_load_store): New.
21536 (nds32_emit_mem_move): New.
21537 (nds32_emit_mem_move_block): New.
21538 (nds32_expand_movmemsi_loop_unknown_size): New.
21539 (nds32_expand_movmemsi_loop_known_size): New.
21540 (nds32_expand_movmemsi_loop): New.
21541 (nds32_expand_movmemsi_unroll): New.
21542 (nds32_expand_movmemqi): Rename ...
21543 (nds32_expand_movmemsi): ... to this.
21544 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21545 (movmemsi): ... to this.
21546 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21547 (nds32_expand_movmemsi): ... to this.
21549 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21550 Monk Chiang <sh.chiang04@gmail.com>
21551 Chung-Ju Wu <jasonwucj@gmail.com>
21553 * config/nds32/nds32-protos.h
21554 (nds32_expand_load_multiple): New arguments.
21555 (nds32_expand_store_multiple): Ditto.
21556 (nds32_valid_multiple_load_store): Rename ...
21557 (nds32_valid_multiple_load_store_p): ... to this.
21558 * config/nds32/nds32-memory-manipulation.c
21559 (nds32_expand_load_multiple): Refine implementation.
21560 (nds32_expand_store_multiple): Ditto.
21561 * config/nds32/nds32-multiple.md
21562 (load_multiple): Update nds32_expand_load_multiple interface.
21563 (store_multiple): Update nds32_expand_store_multiple interface.
21564 * config/nds32/nds32-predicates.c
21565 (nds32_valid_multiple_load_store): Rename ...
21566 (nds32_valid_multiple_load_store_p): ... to this and refine
21568 * config/nds32/predicates.md
21569 (nds32_load_multiple_and_update_address_operation): New predicate.
21570 (nds32_store_multiple_and_update_address_operation): New predicate.
21572 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21573 Chung-Ju Wu <jasonwucj@gmail.com>
21575 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21576 (combo): New attribute.
21577 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21579 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21581 * config/nds32/nds32.opt: Change -mcmodel= default value.
21583 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21584 Monk Chiang <sh.chiang04@gmail.com>
21585 Chung-Ju Wu <jasonwucj@gmail.com>
21587 * config/nds32/constants.md (unspec_element): New enum.
21588 * config/nds32/constraints.md (Umw): New constraint.
21589 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21590 * config/nds32/nds32-intrinsic.md: Likewise.
21591 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21592 (nds32_valid_smw_lwm_base_p): New.
21593 (nds32_output_smw_single_word): New.
21594 (nds32_output_lmw_single_word): New.
21595 (nds32_expand_unaligned_load): New.
21596 (nds32_expand_unaligned_store): New.
21597 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21598 (nds32_output_smw_single_word): Declare.
21599 (nds32_output_lmw_single_word): Declare.
21600 (nds32_expand_unaligned_load): Declare.
21601 (nds32_expand_unaligned_store): Declare.
21602 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21603 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21604 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21605 NDS32_BUILTIN_UASTORE_DW.
21606 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21609 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21610 Kito Cheng <kito.cheng@gmail.com>
21611 Chung-Ju Wu <jasonwucj@gmail.com>
21613 * config/nds32/nds32-intrinsic.c
21614 (nds32_expand_builtin_null_ftype_reg): Delete.
21615 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21616 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21617 (nds32_read_argument): New.
21618 (nds32_legitimize_target): Ditto.
21619 (nds32_legitimize_argument): Ditto.
21620 (nds32_check_constant_argument): Ditto.
21621 (nds32_expand_unop_builtin): Ditto.
21622 (nds32_expand_unopimm_builtin): Ditto.
21623 (nds32_expand_binop_builtin): Ditto.
21624 (nds32_builtin_decl_impl): Ditto.
21625 (builtin_description): Ditto.
21626 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21627 (nds32_init_builtins_impl): Ditto.
21628 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21629 (nds32_builtin_decl): New.
21630 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21631 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21633 2018-03-02 Jeff Law <law@redhat.com>
21635 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21636 (redundant_insn, fill_simple_delay_slots): Likewise.
21637 (fill_slots_from_thread): Likewise.
21638 * resource.c (mark_referenced_resources): Likewise.
21639 (mark_set_resources, find_dead_or_set_registers): Likewise.
21641 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21643 * substring-locations.h (format_warning_va): Formatting fix for
21644 ATTRIBUTE_GCC_DIAG.
21645 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21647 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21648 * substring-locations.c: Include intl.h.
21649 (format_warning_va): Turned into small wrapper around
21650 format_warning_n_va, renamed to ...
21651 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21652 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21654 (format_warning_at_substring_n): New function.
21655 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21656 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21657 format_warning_at_substring with just a shorter name instead of
21658 const function pointer.
21659 (fmtwarn_n): New function.
21660 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21661 appropriate, get rid of all the fmtstr temporaries, move conditionals
21662 with G_() wrapped string literals directly into fmtwarn arguments,
21663 cast dir.len to (int), formatting fixes.
21665 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21667 * doc/invoke.texi: Remove "Cilk Plus" references.
21669 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21670 Richard Biener <rguenther@suse.de>
21673 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21674 for error or warning attributes if CALL_FROM_THUNK_P is set.
21677 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21680 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21681 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21684 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21685 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21687 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21688 instead of -1U in last predictors element's probability member.
21690 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21693 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21694 arguments if they are comparable.
21696 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21698 PR tree-optimization/84634
21699 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21700 masks and masked_loop_p with a single loop_masks, making sure it's
21701 null for bb vectorization.
21703 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21705 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21706 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21707 loop->force_vectorize to check whether there is no alias.
21709 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21712 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21714 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21716 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21717 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21718 instead of a loop around prev_real_insn.
21719 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21722 PR inline-asm/84625
21723 * config/i386/i386.c (ix86_print_operand): Use conditional
21724 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21727 2018-03-02 Richard Biener <rguenther@suse.de>
21729 PR tree-optimization/84427
21730 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21731 (bitmap_set_subtract_values): Rewrite to handle multiple
21734 (prune_clobbered_mems): Likewise.
21735 (phi_translate): Take edge instead of pred/phiblock.
21736 (phi_translate_1): Likewise.
21737 (phi_translate_set): Likewise. Insert all translated
21738 exprs for a value into the set, keeping possibly multiple
21739 expressions per value.
21740 (compute_antic_aux): Adjust for phi_translate changes.
21741 When intersecting union the expressions and prune those
21742 not in the final value set, keeping possibly multiple
21743 expressions per value. Do not use value-insertion
21744 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21745 all expressions. Add verification that the value-sets
21746 only shrink during iteration.
21747 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21748 (do_pre_regular_insertion): Likewise.
21749 (do_pre_partial_partial_insertion): Likewise.
21751 2018-03-02 Richard Biener <rguenther@suse.de>
21754 * config/darwin.c (saved_debug_info_level): New static global.
21755 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21756 (darwin_asm_lto_end): Restore debug info generation settings.
21758 2018-03-01 Martin Liska <mliska@suse.cz>
21761 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21762 volatile arguments.
21764 2018-03-01 Richard Biener <rguenther@suse.de>
21767 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21768 type annotation with LTO when debug was disabled at compile-time.
21770 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21772 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21774 (mips_final_postscan_insn): Likewise.
21776 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21778 PR rtl-optimization/84528
21779 * alias.c (init_alias_target): Add commentary.
21780 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21781 a unique base value if the frame pointer is not eliminated
21782 to the stack pointer.
21784 2018-03-01 Tom de Vries <tom@codesourcery.com>
21786 PR rtl-optimization/83327
21787 * lra-int.h (hard_regs_spilled_into): Declare.
21788 * lra.c (hard_regs_spilled_into): Define.
21789 (init_reg_info): Init hard_regs_spilled_into.
21790 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21791 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21792 (process_bb_lives): Handle hard_regs_spilled_into.
21793 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21794 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21796 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
21798 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21799 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21800 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21801 * config/rs6000/aix72.h: New file.
21803 2018-02-28 Jakub Jelinek <jakub@redhat.com>
21805 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21806 instead of warning_at with conditional singular and plural messages
21810 * stor-layout.c (update_alignment_for_field): For
21811 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21812 && !DECL_PACKED (field), do the alignment update, just use
21813 only desired_align instead of MAX (type_align, desired_align)
21815 (place_field): Don't do known_align < desired_align handling
21816 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21817 is non-NULL, instead do it after rli->prev_field handling and
21818 only if not within a bitfield word. For DECL_PACKED (field)
21819 use type_align of BITS_PER_UNIT.
21821 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
21823 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21824 superfluous parentheses and trailing spaces.
21826 2018-02-28 Richard Biener <rguenther@suse.de>
21828 PR tree-optimization/84584
21829 * graphite-scop-detection.c (scop_detection::add_scop): Discard
21830 SCoPs with fake exit edge.
21832 2018-02-28 Martin Liska <mliska@suse.cz>
21835 * timevar.c (timer::print): Fix format to properly print 100%
21838 2018-02-28 Richard Biener <rguenther@suse.de>
21840 PR middle-end/84607
21841 * genmatch.c (capture_info::walk_match): Do not mark
21842 captured expressions without operands as expr_p given
21843 they act more like predicates and should be subject to
21844 "lost tail" side-effect preserving.
21846 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
21848 PR rtl-optimization/81611
21849 * auto-inc-dec.c (attempt_change): Move dead note from
21850 mem_insn if it's the next use of regno
21851 (find_address): Take address use of reg holding
21852 non-incremented value. Add parm to limit search to the named
21854 (merge_in_block): Attempt to use a mem insn that is the next
21855 use of the original regno.
21857 2018-02-27 Martin Sebor <msebor@redhat.com>
21860 * doc/invoke.texi (-Wmissing-attributes): New option.
21861 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21863 2018-02-27 Martin Sebor <msebor@redhat.com>
21865 PR translation/84207
21866 * diagnostic-core.h (warning_n, error_n, inform_n): Change
21867 n argument to unsigned HOST_WIDE_INT.
21868 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21869 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
21870 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21871 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21873 2018-02-27 Richard Biener <rguenther@suse.de>
21875 PR tree-optimization/84512
21876 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21877 Do not use the estimate returned from record_stmt_cost for
21878 the scalar iteration cost but sum properly using add_stmt_cost.
21880 2018-02-27 Richard Biener <rguenther@suse.de>
21882 PR tree-optimization/84466
21883 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21884 Adjust last change to less strictly validate use operands.
21886 2018-02-27 Martin Liska <mliska@suse.cz>
21888 PR gcov-profile/84548
21889 * gcov.c (process_file): Allow partial overlap and consider it
21890 also as group functions.
21891 (output_lines): Properly calculate range of lines for a group.
21893 2018-02-27 Martin Liska <mliska@suse.cz>
21895 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21896 'ggc' suffixes. Change first column width.
21897 (timer::print): Fix formatting of the column.
21899 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
21901 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21902 preserve inline entry blocks for the sake of debug inline
21903 entry point markers alone.
21904 (remove_unused_locals): Suggest in comments a better place to
21905 force the preservation of inline entry blocks that are
21906 otherwise unused, but do not preserve them.
21908 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21910 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21912 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21915 * config/i386/constraints.md (Bs): Replace
21916 ix86_indirect_branch_register with
21917 TARGET_INDIRECT_BRANCH_REGISTER.
21919 * config/i386/i386.md (indirect_jump): Likewise.
21920 (tablejump): Likewise.
21921 (*sibcall_memory): Likewise.
21922 (*sibcall_value_memory): Likewise.
21923 Peepholes of indirect call and jump via memory: Likewise.
21924 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21925 (*sibcall_value_GOT_32): Likewise.
21926 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21927 (GOT_memory_operand): Likewise.
21928 (call_insn_operand): Likewise.
21929 (sibcall_insn_operand): Likewise.
21930 (GOT32_symbol_operand): Likewise.
21931 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21933 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21935 PR rtl-optimization/83496
21936 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21937 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
21938 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21939 redundant insn, if any.
21940 (relax_delay_slots): Likewise.
21941 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21943 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
21945 PR tree-optimization/83965
21946 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21947 that grouped statements are part of a reduction chain. Return
21948 true if the statement is not marked as a reduction itself but
21949 is part of a group.
21950 (vect_recog_dot_prod_pattern): Don't check whether the statement
21951 is part of a group here.
21952 (vect_recog_sad_pattern): Likewise.
21953 (vect_recog_widen_sum_pattern): Likewise.
21955 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21958 * final.c (rest_of_clean_state): Also look for calls inside sequences.
21960 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21963 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21965 (ix86_output_indirect_function_return): New prototype.
21966 (ix86_split_simple_return_pop_internal): Likewise.
21967 * config/i386/i386.c (indirect_return_via_cx): New.
21968 (indirect_return_via_cx_bnd): Likewise.
21969 (indirect_thunk_name): Handle return va CX_REG.
21970 (output_indirect_thunk_function): Create alias for
21971 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21972 (ix86_output_indirect_jmp): Remove the bool argument.
21973 (ix86_output_indirect_function_return): New function.
21974 (ix86_split_simple_return_pop_internal): Likewise.
21975 * config/i386/i386.md (*indirect_jump): Don't pass false
21976 to ix86_output_indirect_jmp.
21977 (*tablejump_1): Likewise.
21978 (simple_return_pop_internal): Change it to define_insn_and_split.
21979 Call ix86_split_simple_return_pop_internal to split it for
21980 -mfunction-return=.
21981 (simple_return_indirect_internal): Call
21982 ix86_output_indirect_function_return instead of
21983 ix86_output_indirect_jmp.
21985 2018-02-26 Jakub Jelinek <jakub@redhat.com>
21988 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21989 memset and value initialization afterwards.
21991 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
21993 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21995 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21998 * common/config/aarch64/aarch64-common.c
21999 (aarch_option_optimization_table[]): Switch
22000 off fomit-frame-pointer
22002 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22003 Chung-Ju Wu <jasonwucj@gmail.com>
22005 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22007 (store_multiple): Ditto.
22009 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22011 * config.gcc: Add --with-cpu support for nds32 target.
22012 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22013 * config/nds32/nds32.opt: Add -mcpu= option.
22015 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22017 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22018 isel=yes): Warn for these deprecated options.
22020 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22022 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22023 ISA_2_5_MASKS_EMBEDDED.
22025 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22027 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22028 p->max as pointers rather than using iterative_hash_expr.
22030 2018-02-23 Carl Love <cel@us.ibm.com>
22032 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22033 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22035 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22036 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22037 P8V_BUILTIN_VEC_VUNSIGNED2.
22039 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22042 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22043 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22045 * lra-constraints.c (curr_insn_transform): Set up
22046 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22048 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22049 * lra-eliminations.c (spill_pseudos): Ditto.
22050 (process_insn_for_elimination): Ditto.
22051 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22052 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22053 LRA_NON_CLOBBERED_ALT.
22055 2018-02-22 Martin Sebor <msebor@redhat.com>
22057 PR tree-optimization/84480
22058 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22059 to maybe_diag_stxncpy_trunc. Call it.
22060 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22061 from gimple_fold_builtin_strcpy. Print inlining stack.
22062 (handle_builtin_stxncpy): Print inlining stack.
22063 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22065 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22068 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22069 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22070 and -fcheck-pointer-bounds are used together.
22071 (indirect_thunk_prefix): New enum.
22072 (indirect_thunk_need_prefix): New function.
22073 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22074 "_nt" instead of "_bnd" for NOTRACK prefix.
22075 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22076 (output_indirect_thunk_function): Likewise.
22078 (ix86_code_end): Update output_indirect_thunk_function calls.
22079 (ix86_output_indirect_branch_via_reg): Replace
22080 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22081 (ix86_output_indirect_branch_via_push): Likewise.
22082 (ix86_output_function_return): Likewise.
22083 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22084 incompatible with -fcf-protection=branch and
22085 -fcheck-pointer-bounds.
22087 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22090 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22091 Change gcc_assert call to output_operand_lossage.
22093 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22095 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22097 2018-02-22 DJ Delorie <dj@redhat.com>
22098 Sebastian Perta <sebastian.perta@renesas.com>
22099 Oleg Endo <olegendo@gcc.gnu.org>
22101 * config/rx/rx.c (rx_rtx_costs): New function.
22102 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22104 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22106 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22108 2018-02-22 Martin Liska <mliska@suse.cz>
22111 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22112 Add "native" as a possible value.
22114 2018-02-22 Martin Liska <mliska@suse.cz>
22117 * config/i386/i386.c (ix86_option_override_internal):
22118 Add "native" as a possible value for -march and -mtune.
22120 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22123 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22124 to all type variants.
22126 PR tree-optimization/84503
22127 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22128 width as info->bitpos + info->bitsize - start.
22129 (merged_store_group::merge_overlapping): Simplify width computation.
22130 (check_no_overlap): New function.
22131 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22132 start + width and last_order of the group, fail if check_no_overlap
22134 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22135 to group if check_no_overlap fails.
22137 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22139 * config/rs6000/altivec.md: Delete contraint arguments to
22140 define_expand, define_split, and define_peephole2, and in
22141 define_insn_and_split if always unused.
22142 * config/rs6000/darwin.md: Ditto.
22143 * config/rs6000/dfp.md: Ditto.
22144 * config/rs6000/rs6000.md: Ditto.
22145 * config/rs6000/sync.md: Ditto.
22146 * config/rs6000/vector.md: Ditto.
22147 * config/rs6000/vsx.md: Ditto.
22149 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22151 * config/rs6000/altivec.md: Write output control strings as braced
22152 blocks instead of double-quoted strings.
22153 * config/rs6000/darwin.md: Ditto.
22154 * config/rs6000/rs6000.md: Ditto.
22155 * config/rs6000/vector.md: Ditto.
22156 * config/rs6000/vsx.md: Ditto.
22158 2018-02-21 Jason Merrill <jason@redhat.com>
22160 PR c++/84314 - ICE with templates and fastcall attribute.
22161 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22163 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22165 * ipa-cp.c (determine_versionability): Fix comment typos.
22167 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22170 * ipa-cp.c (determine_versionability): Do not version functions caling
22173 2018-02-21 Martin Liska <mliska@suse.cz>
22176 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22177 Add "native" as a possible value.
22178 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22179 the macro when native cpu detection is available.
22181 2018-02-21 Martin Liska <mliska@suse.cz>
22184 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22185 Add "native" as a possible value.
22186 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22187 when native cpu detection is available.
22189 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22190 Martin Sebor <msebor@redhat.com>
22192 PR tree-optimization/84478
22193 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22195 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22196 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22197 support which is conservatively correct, for 2 only stay conservative
22198 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22199 argument to the 2 argument get_range_strlen, adjust 6 arg
22200 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22202 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22203 (gimple_fold_builtin_strlen): Pass true as last argument to
22206 2018-02-20 Martin Sebor <msebor@redhat.com>
22208 PR middle-end/84095
22209 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22210 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22211 (builtin_memref::builtin_memref): Factor out parts into
22212 set_base_and_offset and call it.
22214 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22216 PR middle-end/84406
22217 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22218 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22219 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22220 search at the associated MODE_INT.
22222 2018-02-20 Jeff Law <law@redhat.com>
22224 PR middle-end/82123
22225 PR tree-optimization/81592
22226 PR middle-end/79257
22227 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22228 for range data rather than using global data.
22229 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22230 range data rather than using global data.
22231 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22232 pass it to children as needed.
22233 (struct directive::fmtresult): Similarly.
22234 (struct directive::set_width): Similarly.
22235 (struct directive::set_precision): Similarly.
22236 (format_integer, format_directive, parse_directive): Similarly.
22237 (format_none): Accept unnamed vr_values parameter.
22238 (format_percent, format_floating, format_character): Similarly.
22239 (format_string, format_plain): Similarly.
22240 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22241 the EVRP range analyzer for range data rather than using global data.
22242 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22243 gimple-ssa-evrp-analyze.h
22244 (class sprintf_dom_walker): Add after_dom_children member function.
22245 Add evrp_range_analyzer member.
22246 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22247 range analyzer as needed.
22248 (sprintf_dom_walker::after_dom_children): New member function.
22249 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22251 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22252 (evrp_range_analyzer::pop_to_marker): Likewise.
22254 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22256 PR tree-optimization/84419
22257 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22258 with the required type if its current type is compatible but
22261 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22263 PR middle-end/82004
22264 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22265 after vectorization.
22267 2018-02-20 Martin Liska <mliska@suse.cz>
22270 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22271 possible values if we don't have a hint.
22273 2018-02-20 Martin Liska <mliska@suse.cz>
22277 * final.c (shorten_branches): Build align_tab array with one
22279 * opts.c (finish_options): Add alignment option limit check.
22280 (MAX_CODE_ALIGN): Likewise.
22281 (MAX_CODE_ALIGN_VALUE): Likewise.
22282 * doc/invoke.texi: Document maximum allowed option value for
22283 all -falign-* options.
22285 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22288 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22289 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22290 * var-tracking.c (emit_note_insn_var_location): Remove all references
22291 to NOTE_INSN_CALL_ARG_LOCATION.
22292 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22293 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22294 Use copy_rtx_if_shared.
22295 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22296 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22297 (dwarf2out_var_location): Remove handling of
22298 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22300 * final.c (final_scan_insn): Remove all references to
22301 NOTE_INSN_CALL_ARG_LOCATION.
22302 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22303 before dumping final insns.
22304 * except.c (emit_note_eh_region_end): Remove all references to
22305 NOTE_INSN_CALL_ARG_LOCATION.
22306 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22307 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22308 * config/arc/arc.c (hwloop_optimize): Likewise.
22309 * config/arm/arm.c (create_fix_barrier): Likewise.
22310 * config/s390/s390.c (s390_chunkify_start): Likewise.
22311 * config/sh/sh.c (find_barrier): Likewise.
22312 * config/i386/i386.c (rest_of_insert_endbranch,
22313 ix86_seh_fixup_eh_fallthru): Likewise.
22314 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22315 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22316 * config/frv/frv.c (frv_function_prologue): Likewise.
22317 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22319 (note_outside_basic_block_p): Remove all references to
22320 NOTE_INSN_CALL_ARG_LOCATION.
22321 * gengtype.c (adjust_field_rtx_def): Likewise.
22322 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22324 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22325 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22328 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22331 PR tree-optimization/84452
22332 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22333 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22336 2018-02-19 Martin Liska <mliska@suse.cz>
22339 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22341 2018-02-19 Martin Liska <mliska@suse.cz>
22342 Richard Sandiford <richard.sandiford@linaro.org>
22344 PR tree-optimization/82491
22345 * gimple-fold.c (get_base_constructor): Make earlier bail out
22348 2018-02-19 Carl Love <cel@us.ibm.com>
22350 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22351 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22353 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22354 P8V_BUILTIN_VEC_NEG.
22356 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22358 * config/rl78/rl78.md (movdf): New define expand.
22360 2018-02-19 Martin Liska <mliska@suse.cz>
22363 * doc/invoke.texi: Fix typo.
22364 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22366 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22368 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22369 handle rs6000_single_float and rs6000_double_float specially for
22372 2018-02-16 Jeff Law <law@redhat.com>
22374 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22375 (pop_regs): Use it.
22377 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22380 * ipa-inline.c (inline_small_functions): Fix a typo.
22382 2018-02-16 Nathan Sidwell <nathan@acm.org>
22384 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22386 2018-02-16 Carl Love <cel@us.ibm.com>
22388 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22389 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22390 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22391 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22392 expansion to P8V_BUILTIN_VEC_FLOAT2.
22394 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22396 PR rtl-optimization/70023
22397 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22398 src_regno into account.
22400 2018-02-16 Carl Love <cel@us.ibm.com>
22402 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22403 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22404 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22405 * config/rs6000/rs6000.c: Remove case statements for
22406 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22407 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22408 and P9V_BUILTIN_VEC_VINSERT4B.
22409 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22410 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22411 * config/rs6000/vsx.md:
22412 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22415 2018-02-16 Carl Love <cel@us.ibm.com>
22417 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22419 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22421 * config/rs6000/rs6000-c.c: Add the definitions for
22422 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22423 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22424 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22425 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22426 definition for insert4b and define insn *insert3b_internal.
22427 * doc/extend.texi: Add documentation for vec_extract4b.
22429 2018-02-16 Nathan Sidwell <nathan@acm.org>
22431 * doc/extend.texi (Backwards Compatibility): Mention friend
22432 injection. Note for-scope is deprecated.
22433 * doc/invoke.texi (-ffriend-injection): Deprecate.
22435 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22437 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22438 that moved to I2, also allow destinations that are a paradoxical
22439 subreg (instead of a normal reg).
22441 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22444 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22447 2018-02-16 Richard Biener <rguenther@suse.de>
22449 PR tree-optimization/84037
22450 PR tree-optimization/84016
22452 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22453 Adjust vec_construct for the fact we need additional higher latency
22454 128bit inserts for AVX256 and AVX512 vector builds.
22455 (ix86_add_stmt_cost): Scale vector construction cost for
22458 2018-02-16 Richard Biener <rguenther@suse.de>
22460 PR tree-optimization/84417
22461 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22462 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22463 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22465 2018-02-16 Martin Liska <mliska@suse.cz>
22468 * internal-fn.def (ASAN_CHECK): Set proper flags.
22469 (ASAN_MARK): Likewise.
22471 2018-02-16 Julia Koval <julia.koval@intel.com>
22473 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22474 from PTA_CANNONLAKE.
22476 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22479 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22480 Use ++iter rather than iter++ for std::list iterators.
22481 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22482 defer deleting them until all nodes in the forest are processed. Do
22483 free even leaf nodes. Change to_process into auto_vec.
22486 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22487 * vec.h (vec_default_construct): Use memset instead of placement new
22488 if BROKEN_VALUE_INITIALIZATION is defined.
22489 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22490 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22493 PR rtl-optimization/83723
22494 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22495 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22496 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22498 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22500 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22502 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22504 PR rtl-optimization/81443
22505 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22506 from inner REGs to paradoxical SUBREGs.
22508 2018-02-16 Richard Biener <rguenther@suse.de>
22510 PR tree-optimization/84399
22511 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22512 For operands we can analyze at their definition make sure we can
22513 analyze them at each use as well.
22515 2018-02-16 Richard Biener <rguenther@suse.de>
22517 PR tree-optimization/84190
22518 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22519 volatile accesses if the decl isn't volatile.
22521 2018-02-15 Jason Merrill <jason@redhat.com>
22523 PR c++/84314 - ICE with templates and fastcall attribute.
22524 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22525 TYPE_CANONICAL on an existing type.
22527 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22529 PR tree-optimization/84383
22530 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22531 dstoff nor call operand_equal_p if dstbase is NULL.
22533 PR tree-optimization/84334
22534 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22535 also a CONSTANT_CLASS_P, punt.
22537 2018-02-14 Jim Wilson <jimw@sifive.com>
22539 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22540 first SMALL_OPERAND check. New local min_second_step. Move assert
22541 to where locals are set. Add TARGET_RVC support.
22542 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22544 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22546 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22548 2018-02-14 Martin Sebor <msebor@redhat.com>
22550 PR tree-optimization/83698
22551 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22552 arrays constrain the offset range to their bounds.
22553 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22554 (builtin_access::overlap): Avoid setting the size of overlap if it's
22556 (maybe_diag_overlap): Also consider arrays when deciding what values
22557 of offsets to include in diagnostics.
22559 2018-02-14 Martin Sebor <msebor@redhat.com>
22562 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22563 that correspond to the kind of a declaration.
22565 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22568 * config/pa/pa.md: Load address of PIC label using the linkage table
22569 if the label is nonlocal.
22571 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22573 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22574 warning message if user requests -maltivec=be.
22575 * doc/invoke.texi: Document deprecation of -maltivec=be.
22577 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22580 * config/rs6000/rs6000-c.c: Update definitions for
22581 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22582 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22584 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22587 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22588 add _get_ssp intrinsics. Remove argument from
22589 __builtin_ia32_rdssp[d|q].
22590 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22591 * config/i386/i386-builtin.def: Remove argument from
22592 __builtin_ia32_rdssp[d|q].
22593 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22594 ix86_expand_special_args_builtin for _rdssp[d|q].
22595 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22596 Clear register before usage.
22597 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22598 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22600 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22602 PR tree-optimization/84357
22603 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22604 operand 1 of an ARRAY_REF too.
22606 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22609 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22610 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22612 (set_of_reg): New struct.
22613 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22614 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22615 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22617 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22618 Split into bitclr, bitset, bitinvert patterns if appropriate.
22619 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22620 use rx_fuse_in_memory_bitop.
22621 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22622 to named insn, correct maximum insn length.
22624 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22627 * machmode.def: Define a complex mode for PARTIAL_INT.
22628 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22630 * doc/rtl.texi: Document CSPImode.
22631 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22633 (msp430_hard_regno_nregs_with_padding): Likewise.
22635 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22638 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22640 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22642 PR rtl-optimization/84169
22643 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22644 we generated a parallel as new i3 and we split that to new i2 and i3
22645 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22646 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22647 those to i2, not i1. Partially rewrite this scan code.
22649 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22652 * stor-layout.c (place_field): For variable length fields, adjust
22653 offset_align afterwards not just based on the field's alignment,
22654 but also on the size.
22656 PR middle-end/84309
22657 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22658 of exps and logs in the use_exp2 case.
22660 2018-02-13 Jeff Law <law@redhat.com>
22662 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22663 entry for "vector".
22665 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22668 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22672 * common.opt (gas-loc-support, gas-locview-support): New.
22673 (ginline-points, ginternal-reset-location-views): New.
22674 * doc/invoke.texi: Document them. Use @itemx where intended.
22675 (gvariable-location-views): Adjust.
22676 * target.def (reset_location_view): New.
22677 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22678 (TARGET_RESET_LOCATION_VIEW): New.
22679 * doc/tm.texi: Rebuilt.
22680 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22681 (dwarf2out_default_as_locview_support): New.
22682 (output_asm_line_debug_info): Use option variables.
22683 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22684 (output_loc_list): Likewise.
22685 (add_high_low_attributes): Check option variables.
22686 Don't output entry view attribute in strict mode.
22687 (gen_inlined_subroutine_die): Check option variables.
22688 (dwarf2out_inline_entry): Likewise.
22689 (init_sections_and_labels): Likewise.
22690 (dwarf2out_early_finish): Likewise.
22691 (maybe_reset_location_view): New, from...
22692 (dwarf2out_var_location): ... here. Call it.
22693 * debug.h (dwarf2out_default_as_loc_support): Declare.
22694 (dwarf2out_default_as_locview_support): Declare.
22695 * hooks.c (hook_int_rtx_insn_0): New.
22696 * hooks.h (hook_int_rtx_insn_0): Declare.
22697 * toplev.c (process_options): Take -gas-loc-support and
22698 -gas-locview-support from dwarf2out. Enable
22699 -gvariable-location-views by default only with locview
22700 assembler support. Enable -ginternal-reset-location-views by
22701 default only if the target defines the corresponding hook.
22702 Enable -ginline-points by default if location views are
22703 enabled; force it disabled if statement frontiers are
22705 * tree-inline.c (expand_call_inline): Check option variables.
22706 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22708 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22710 PR tree-optimization/84321
22711 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22712 handling. Also check whether the anti-range contains any values
22713 that satisfy the mask; switch to a VR_RANGE if not.
22715 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22718 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22720 2018-02-13 Martin Jambor <mjambor@suse.cz>
22723 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22724 of call statements, also set location of a load to a temporary.
22726 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22728 * config/rl78/rl78.c (add_vector_labels): New function.
22729 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22730 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22731 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22732 which checks that no arguments are passed.
22733 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22734 * doc/extend.texi: Documentation for the new attribute.
22736 2018-02-13 Andreas Schwab <schwab@suse.de>
22738 * config/riscv/linux.h (CPP_SPEC): Define.
22740 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22743 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22744 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22745 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22746 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22747 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22748 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22749 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22750 temporarily for AES and PCLMUL builtins.
22752 PR tree-optimization/84339
22753 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22754 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22757 PR middle-end/84309
22758 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22759 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22760 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22762 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22764 * omp-simd-clone.h: New file.
22765 * omp-simd-clone.c: Include omp-simd-clone.h.
22766 (expand_simd_clones): No longer static.
22767 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22768 cgraph.h and omp-simd-clone.h.
22769 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22770 (vect_recog_widen_shift_pattern): Formatting fix.
22771 (vect_pattern_recog_1): Don't check optab for calls.
22774 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22775 operands[2] into a REG before using gen_lowpart on it.
22777 2018-02-12 Jeff Law <law@redhat.com>
22780 * config/sh/sh.c (find_barrier): Consider a sibling call
22783 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22784 successfully back substituting a reg.
22786 2018-02-12 Richard Biener <rguenther@suse.de>
22788 PR tree-optimization/84037
22789 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22790 parameter, move visited init to caller.
22791 (vect_slp_analyze_operations): Separate cost from validity
22792 check, initialize visited once for all instances.
22793 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22795 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22797 (vect_model_promotion_demotion_cost): Likewise.
22798 (vectorizable_bswap): Guard cost modeling with !slp_node
22799 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22801 (vectorizable_call): Likewise.
22802 (vectorizable_conversion): Likewise.
22803 (vectorizable_assignment): Likewise.
22804 (vectorizable_shift): Likewise.
22805 (vectorizable_operation): Likewise.
22806 (vectorizable_store): Likewise.
22807 (vectorizable_load): Likewise.
22808 (vectorizable_condition): Likewise.
22809 (vectorizable_comparison): Likewise.
22811 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
22814 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22815 (ASAN_MARK): Fix fnspec to account for return value, change pointer
22816 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22818 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22820 PR middle-end/83665
22821 * params.def (inline-min-speedup): Increase from 8 to 15.
22822 (max-inline-insns-auto): Decrease from 40 to 30.
22823 * ipa-split.c (consider_split): Add some buffer for function to
22824 be considered inlining candidate.
22825 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22828 2018-02-12 Richard Biener <rguenther@suse.de>
22830 PR tree-optimization/84037
22831 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22832 matched stmts if we cannot swap the non-matched ones.
22834 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22836 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22837 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22838 _mm_maskz_scalef_round_ss): New intrinsics.
22839 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22840 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22841 __builtin_ia32_scalefss_round): Remove.
22842 (__builtin_ia32_scalefsd_mask_round,
22843 __builtin_ia32_scalefss_mask_round): New intrinsics.
22844 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22845 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22846 ((match_operand:VF_128 2 "<round_nimm_predicate>"
22847 "<round_constraint>")): Changed to ...
22848 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22849 "<round_scalar_constraint>")): ... this.
22850 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22851 %0, %1, %2<round_op3>}"): Changed to ...
22852 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22853 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22854 %2<round_scalar_mask_op3>}"): ... this.
22855 * config/i386/subst.md (round_scalar_nimm_predicate): New.
22857 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22859 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22860 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22861 (_mm_maskz_sqrt_round_ss): New intrinsics.
22862 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22863 (__builtin_ia32_sqrtsd_mask_round)
22864 (__builtin_ia32_sqrtss_mask_round): New builtins.
22865 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22866 (__builtin_ia32_sqrtss_round): Remove.
22867 (__builtin_ia32_sqrtsd_mask_round)
22868 (__builtin_ia32_sqrtss_mask_round): New builtins.
22869 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22870 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22871 ((match_operand:VF_128 1 "vector_operand"
22872 "xBm,<round_constraint>")): Changed to ...
22873 ((match_operand:VF_128 1 "vector_operand"
22874 "xBm,<round_scalar_constraint>")): ... this.
22875 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22876 %0, %2, %<iptr>1<round_op3>}): Changed to ...
22877 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22878 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22879 %<iptr>1<round_scalar_mask_op3>}): ... this.
22880 ((set_attr "prefix" "<round_prefix>")): Changed to ...
22881 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22883 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
22886 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22887 Cast vec_cmpeq result to correct type.
22888 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22889 Cast vec_cmpgt result to correct type.
22891 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
22893 * final.c (final_scan_insn_1): Renamed from...
22894 (final_scan_insn): ... this. New wrapper, to recover
22895 seen from the outermost call in recursive ones.
22896 * config/sparc/sparc.c (output_return): Drop seen from call.
22897 (output_sibcall): Likewise.
22898 * config/visium/visium.c (output_branch): Likewise.
22900 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
22902 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22905 2018-02-10 Alan Modra <amodra@gmail.com>
22908 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22909 Specify LR as an input.
22911 2018-02-10 Jakub Jelinek <jakub@redhat.com>
22914 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22915 remove_member_access_dummy_vars): New functions.
22916 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22917 lower_omp_1, execute_lower_omp): Use them.
22919 PR rtl-optimization/84308
22920 * shrink-wrap.c (spread_components): Release todo vector.
22922 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
22924 PR rtl-optimization/57193
22925 * ira-color.c (struct allocno_color_data): Add member
22926 conflict_allocno_hard_prefs.
22927 (update_conflict_allocno_hard_prefs): New.
22928 (bucket_allocno_compare_func): Add a preference based on
22929 conflict_allocno_hard_prefs.
22930 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22931 (color_allocnos): Remove a dead code. Initiate
22932 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
22934 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22937 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22938 constraint from =wa to wa. Avoid a subreg on the output operand,
22939 instead use a pseudo and subreg it in a move.
22940 (p9_xxbrd_<mode>): Changed to ...
22941 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22942 (p9_xxbrd_v2df): New expander.
22943 (p9_xxbrw_<mode>): Changed to ...
22944 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22945 (p9_xxbrw_v4sf): New expander.
22947 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22949 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22951 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
22954 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22955 multiply in 32-bit mode.
22956 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22957 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22960 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22962 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22963 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22964 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22965 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22967 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
22970 * dwarf2out.c (is_trivial_indirect_ref): New function.
22971 (dwarf2out_late_global_decl): Do not generate a location
22972 attribute for variables that have a non-trivial DECL_VALUE_EXPR
22973 and that are not defined in the current unit.
22975 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22977 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22978 instead of a libcall for UNORDERED.
22980 2018-02-09 Tamar Christina <tamar.christina@arm.com>
22983 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22984 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22986 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22989 * config/s390/s390.c (s390_set_current_function): Invoke
22990 s390_indirect_branch_settings also if fndecl didn't change.
22992 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
22994 * config/rs6000/rs6000.md (blockage): Set length to zero.
22996 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22998 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23000 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23003 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23004 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23008 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23009 PARALLEL incoming that failed vt_get_decl_and_offset check.
23011 PR middle-end/84237
23012 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23013 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23015 (get_variable_section): For decls in named .bss* sections pass true as
23016 second argument to bss_initializer_p.
23018 2018-02-09 Marek Polacek <polacek@redhat.com>
23019 Jakub Jelinek <jakub@redhat.com>
23022 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23023 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23024 Sync some changes from cxx_fold_indirect_ref.
23026 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23028 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23030 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23031 (BLOCK_INLINE_ENTRY_LABEL): New.
23032 (dwarf2out_var_location): Disregard inline entry markers.
23033 (inline_entry_data): New struct.
23034 (inline_entry_data_hasher): New hashtable type.
23035 (inline_entry_data_hasher::hash): New.
23036 (inline_entry_data_hasher::equal): New.
23037 (inline_entry_data_table): New variable.
23038 (add_high_low_attributes): Add DW_AT_entry_pc and
23039 DW_AT_GNU_entry_view attributes if a pending entry is found
23040 in inline_entry_data_table. Add old entry_pc attribute only
23041 if debug nonbinding markers are disabled.
23042 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23043 markers are enabled.
23044 (block_within_block_p, dwarf2out_inline_entry): New.
23045 (dwarf2out_finish): Check that no entries remained in
23046 inline_entry_data_table.
23047 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23048 (final_scan_insn, notice_source_line): Likewise.
23049 (rest_of_clean_state): Skip inline entry markers.
23050 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23052 * gimple.c (gimple_build_debug_inline_entry): New.
23053 * gimple.h (enum gimple_debug_subcode): Add
23054 GIMPLE_DEBUG_INLINE_ENTRY.
23055 (gimple_build_debug_inline_entry): Declare.
23056 (gimple_debug_inline_entry_p): New.
23057 (gimple_debug_nonbind_marker_p): Adjust.
23058 * insn-notes.def (INLINE_ENTRY): New.
23059 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23060 inline entry marker notes.
23061 (print_insn): Likewise.
23062 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23063 (INSN_DEBUG_MARKER_KIND): Likewise.
23064 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23065 * tree-inline.c (expand_call_inline): Build and insert
23066 debug_inline_entry stmt.
23067 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23068 inline entry blocks early, if nonbind markers are enabled.
23069 (dump_scope_block): Dump fragment info.
23070 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23071 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23072 (gimple_build_debug_inline_entry): New.
23073 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23074 Enable/disable inline entry points too.
23075 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23076 (DEBUG_INSN): Describe inline entry markers.
23078 * common.opt (gvariable-location-views): New.
23079 (gvariable-location-views=incompat5): New.
23080 * config.in: Rebuilt.
23081 * configure: Rebuilt.
23082 * configure.ac: Test assembler for view support.
23083 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23084 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23085 * dwarf2out.c (var_loc_view): New typedef.
23086 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23087 (dwarf2out_locviews_in_attribute): New.
23088 (dwarf2out_locviews_in_loclist): New.
23089 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23090 (enum dw_line_info_opcode): Add LI_adv_address.
23091 (struct dw_line_info_table): Add view.
23092 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23093 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23094 (zero_view_p): New variable.
23095 (ZERO_VIEW_P): New macro.
23096 (output_asm_line_debug_info): New.
23097 (struct var_loc_node): Add view.
23098 (add_AT_view_list, AT_loc_list): New.
23099 (add_var_loc_to_decl): Add view param. Test it against last.
23100 (new_loc_list): Add view params. Record them.
23101 (AT_loc_list_ptr): Handle loc and view lists.
23102 (view_list_to_loc_list_val_node): New.
23103 (print_dw_val): Handle dw_val_class_view_list.
23104 (size_of_die): Likewise.
23105 (value_format): Likewise.
23106 (loc_list_has_views): New.
23107 (gen_llsym): Set vl_symbol too.
23108 (maybe_gen_llsym, skip_loc_list_entry): New.
23109 (dwarf2out_maybe_output_loclist_view_pair): New.
23110 (output_loc_list): Output view list or entries too.
23111 (output_view_list_offset): New.
23112 (output_die): Handle dw_val_class_view_list.
23113 (output_dwarf_version): New.
23114 (output_compilation_unit_header): Use it.
23115 (output_skeleton_debug_sections): Likewise.
23116 (output_rnglists, output_line_info): Likewise.
23117 (output_pubnames, output_aranges): Update version comments.
23118 (output_one_line_info_table): Output view numbers in asm comments.
23119 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23120 Call maybe_gen_llsym.
23121 (loc_list_from_tree_1): Adjust.
23122 (add_AT_location_description): Create view list attribute if
23123 needed, check it's absent otherwise.
23124 (convert_cfa_to_fb_loc_list): Adjust.
23125 (maybe_emit_file): Call output_asm_line_debug_info for test.
23126 (dwarf2out_var_location): Reset views as needed. Precompute
23127 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23128 attribute. Set view.
23129 (new_line_info_table): Reset next view.
23130 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23131 (dwarf2out_source_line): Likewise. Output view resets and labels to
23132 the assembler, or select appropriate line info opcodes.
23133 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23134 (optimize_string_length): Catch it. Adjust.
23135 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23136 dw_val_class_view_list, and remove it if no longer needed.
23137 (hash_loc_list): Hash view numbers.
23138 (loc_list_hasher::equal): Compare them.
23139 (optimize_location_lists): Check whether a view list symbol is
23140 needed, and whether the locview attribute is present, and
23141 whether they match. Remove the locview attribute if no longer
23143 (index_location_lists): Call skip_loc_list_entry for test.
23144 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23145 Use output_dwarf_version.
23146 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23147 (struct dw_val_node): Add val_view_list.
23148 * final.c (SEEN_NEXT_VIEW): New.
23149 (set_next_view_needed): New.
23150 (clear_next_view_needed): New.
23151 (maybe_output_next_view): New.
23152 (final_start_function): Rename to...
23153 (final_start_function_1): ... this. Take pointer to FIRST,
23154 add SEEN parameter. Emit param bindings in the initial view.
23155 (final_start_function): Reintroduce SEEN-less interface.
23156 (final): Rename to...
23157 (final_1): ... this. Take SEEN parameter. Output final pending
23158 next view at the end.
23159 (final): Reintroduce seen-less interface.
23160 (final_scan_insn): Output pending next view before switching
23161 sections or ending a block. Mark the next view as needed when
23162 outputting variable locations. Notify debug backend of section
23163 changes, and of location view changes.
23164 (rest_of_handle_final): Adjust.
23165 * toplev.c (process_options): Autodetect value for debug variable
23166 location views option. Warn on incompat5 without -gdwarf-5.
23167 * doc/invoke.texi (gvariable-location-views): New.
23168 (gvariable-location-views=incompat5): New.
23169 (gno-variable-location-views): New.
23171 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23173 PR tree-optimization/84136
23174 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23175 that the result of find_edge is non-NULL.
23177 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23180 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23181 storing integer register in SImode. Fix cost of 256 and 512
23182 byte aligned SSE register store.
23184 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23186 * config/i386/i386.c (ix86_multiplication_cost): Fix
23187 multiplication cost for TARGET_AVX512DQ.
23189 2018-02-08 Marek Polacek <polacek@redhat.com>
23191 PR tree-optimization/84238
23192 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23195 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23197 PR tree-optimization/84265
23198 * tree-vect-stmts.c (vectorizable_store): Don't treat
23199 VMAT_CONTIGUOUS accesses as grouped.
23200 (vectorizable_load): Likewise.
23202 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23204 PR tree-optimization/81635
23205 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23206 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23207 (test_round_for_mask): New functions.
23208 (wide_int_cc_tests): Call test_round_for_mask.
23209 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23210 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23211 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23212 range returned by get_range_info.
23214 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23217 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23218 * symtab.c: Include builtins.h
23219 (symtab_node::output_to_lto_symbol_table_p): Move here
23220 from lto-streamer-out.c:output_symbol_p.
23221 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23222 (output_symbol_p): Move all logic to symtab.c
23223 (produce_symtab): Update.
23225 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23227 * config/s390/s390-opts.h (enum indirect_branch): Define.
23228 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23229 (s390_indirect_branch_via_thunk)
23230 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23231 (enum s390_indirect_branch_type): Define.
23232 * config/s390/s390.c (struct s390_frame_layout, struct
23233 machine_function): Remove.
23234 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23235 (indirect_branch_table_label_no, indirect_branch_table_name):
23237 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23238 (enum s390_indirect_branch_option): Define.
23239 (s390_return_addr_from_memory): New function.
23240 (s390_handle_string_attribute): New function.
23241 (s390_attribute_table): Add new attribute handler.
23242 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23243 (s390_indirect_branch_via_thunk): New function.
23244 (s390_indirect_branch_via_inline_thunk): New function.
23245 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23246 sibling call optimization for non z10 compiles.
23247 (s390_emit_call): Force indirect branch target to be a single
23248 register. Add r1 clobber for non-z10 compiles.
23249 (s390_emit_epilogue): Emit return jump via return_use expander.
23250 (s390_reorg): Handle JUMP_INSNs as execute targets.
23251 (s390_option_override_internal): Perform validity checks for the
23252 new command line options.
23253 (s390_indirect_branch_attrvalue): New function.
23254 (s390_indirect_branch_settings): New function.
23255 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23256 (s390_output_indirect_thunk_function): New function.
23257 (s390_code_end): Implement target hook.
23258 (s390_case_values_threshold): Implement target hook.
23259 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23261 * config/s390/s390.h (struct s390_frame_layout)
23262 (struct machine_function): Move here from s390.c.
23263 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23264 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23265 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23266 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23267 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23268 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23269 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23270 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23271 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23272 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23273 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23274 (mnemonic attribute): Add values which aren't recognized
23276 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23277 pattern for branch conversion. Fix mnemonic attribute.
23278 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23279 indirect branch via thunk if requested.
23280 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23281 ("*indirect_jump"): Disable for branch conversion using out of
23283 ("indirect_jump_via_thunk<mode>_z10")
23284 ("indirect_jump_via_thunk<mode>")
23285 ("indirect_jump_via_inlinethunk<mode>_z10")
23286 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23287 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23288 ("casesi_jump_via_inlinethunk<mode>_z10")
23289 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23290 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23291 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23292 ("*indirect2_jump"): Disable for branch conversion.
23293 ("casesi_jump"): Turn into expander and expand patterns for branch
23295 ("return_use"): New expander.
23296 ("*return"): Emit return via thunk and rename it to ...
23297 ("*return<mode>"): ... this one.
23298 * config/s390/s390.opt: Add new options and and enum for the
23301 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23303 * lra-constraints.c (match_reload): Unconditionally use
23304 gen_lowpart_SUBREG, rather than selecting between that
23305 and equivalent gen_rtx_SUBREG code.
23307 2018-02-08 Richard Biener <rguenther@suse.de>
23309 PR tree-optimization/84233
23310 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23311 changed flag instead of boguously re-using phi_inserted.
23313 2018-02-08 Martin Jambor <mjambor@suse.cz>
23315 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23316 static local variables.
23318 2018-02-08 Richard Biener <rguenther@suse.de>
23320 PR tree-optimization/84278
23321 * tree-vect-stmts.c (vectorizable_store): When looking for
23322 smaller vector types to perform grouped strided loads/stores
23323 make sure the mode is supported by the target.
23324 (vectorizable_load): Likewise.
23326 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23328 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23329 Increase LDP/STP opportunities by adding adjacent callee-saves.
23331 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23333 PR rtl-optimization/84068
23334 PR rtl-optimization/83459
23335 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23337 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23339 PR tree-optimization/84224
23340 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23341 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23342 non-zero arguments.
23344 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23347 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23348 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23349 count, remove one USE.
23351 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23353 * doc/install.texi (Configuration): Document the
23354 --with-long-double-format={ibm,ieee} PowerPC configuration
23358 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23359 Convert from define_expand to be define_insn_and_split. Rework
23360 float/double/_Float128 conversions to QI/HI/SImode to work with
23361 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23362 conversions to QI/HImode types did a store and then a load to
23363 truncate the value. For conversions to VSX registers, don't split
23364 the insn, instead emit the code directly. Use the code iterator
23365 any_fix to combine signed and unsigned conversions.
23366 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23367 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23368 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23369 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23370 (fix_<mode>di2_hw): Likewise.
23371 (fixuns_<mode>di2_hw): Likewise.
23372 (fix_<mode>si2_hw): Likewise.
23373 (fixuns_<mode>si2_hw): Likewise.
23374 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23375 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23376 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23377 fix<uns>_trunc<SFDF:mode>si2_p8.
23378 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23379 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23380 (fix<uns>_<mode>_mem): Likewise.
23381 (fctiw<u>z_<mode>_mem): Likewise.
23382 (fix<uns>_<mode>_mem): Likewise.
23383 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23384 the register allocator from doing a direct move to the GPRs to do
23385 a store, and instead use the ISA 3.0 store byte/half-word from
23386 vector register instruction. For IEEE 128-bit floating point,
23387 also optimize stores of 32-bit ints.
23388 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23390 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23392 * genextract.c (push_pathstr_operand): New function to support
23394 (walk_rtx): Call push_pathstr_operand.
23395 (print_path): Support [a-zA-Z].
23397 2018-02-07 Richard Biener <rguenther@suse.de>
23399 PR tree-optimization/84037
23400 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23401 (cse_and_gimplify_to_preheader): Declare.
23402 (vect_get_place_in_interleaving_chain): Likewise.
23403 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23405 (_loop_vec_info::~_loop_vec_info): Delete it.
23406 (cse_and_gimplify_to_preheader): New function.
23407 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23408 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23409 (vectorizable_load): Likewise. For grouped stores always base
23410 the IV on the first element.
23411 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23412 condition before gimplifying.
23414 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23416 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23417 *DIV_EXPR and *MOD_EXPR.
23419 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23422 * config/i386/i386.c (ix86_option_override_internal): Mask out
23423 the CF_SET bit when checking -fcf-protection.
23425 2018-02-07 Tom de Vries <tom@codesourcery.com>
23428 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23431 2018-02-07 Richard Biener <rguenther@suse.de>
23433 PR tree-optimization/84204
23434 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23437 PR tree-optimization/84205
23438 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23439 special-case isl_ast_op_zdiv_r.
23441 PR tree-optimization/84223
23442 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23443 Only add conditions from within the region.
23444 (gather_bbs::after_dom_children): Adjust.
23446 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23449 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23450 * config/avr/avr.md: Only post-reload split REG-REG moves if
23451 either register is GENERAL_REG_P.
23453 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23455 PR tree-optimization/84235
23456 * tree-ssa-scopedtables.c
23457 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23458 if the subtraction is performed in floating point type where NaNs are
23459 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23460 build 1. Formatting fix.
23462 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23465 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23466 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23467 and skip it regardless of bb boundaries. Use CALL_P macro,
23468 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23469 unnecessarily, formatting fix.
23471 2018-02-06 Michael Collison <michael.collison@arm.com>
23473 * config/arm/thumb2.md:
23474 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23475 (*thumb_mov_notscc): Ditto.
23477 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23480 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23481 unsigned_fix, not "s".
23483 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23485 * configure.ac (gcc_fn_eh_frame_ro): New function.
23486 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23487 correct .eh_frame permissions.
23488 * configure: Regenerate.
23490 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23492 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23493 irrelevant options.
23495 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23497 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23498 Display warning message for -mno-speculate-indirect-jumps.
23500 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23502 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23504 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23506 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23508 PR tree-optimization/84225
23509 * tree-eh.c (find_trapping_overflow): Only call
23510 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23512 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23515 * config/i386/i386.c: Reimplement the check of possible options
23516 -mibt/-mshstk conbination. Change error messages.
23517 * doc/invoke.texi: Fix a typo: remove extra '='.
23519 2018-02-06 Marek Polacek <polacek@redhat.com>
23521 PR tree-optimization/84228
23522 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23524 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23527 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23528 emitted arch directives.
23529 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23530 __ARM_FEATURE_COPROC before changing architectures.
23532 2018-02-06 Richard Biener <rguenther@suse.de>
23534 * config/i386/i386.c (print_reg): Fix typo.
23535 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23537 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23539 * configure: Regenerate.
23541 2018-02-05 Martin Sebor <msebor@redhat.com>
23543 PR tree-optimization/83369
23544 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23547 2018-02-05 Martin Liska <mliska@suse.cz>
23549 * doc/invoke.texi: Cherry-pick upstream r323995.
23551 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23553 * ira.c (ira_init_register_move_cost): Adjust comment.
23555 2018-02-05 Martin Liska <mliska@suse.cz>
23557 PR gcov-profile/84137
23558 * doc/gcov.texi: Fix typo in documentation.
23560 2018-02-05 Martin Liska <mliska@suse.cz>
23562 PR gcov-profile/83879
23563 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23564 using dlopen functionality.
23566 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23568 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23569 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23570 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23571 _mm_maskz_range_round_ss): New intrinsics.
23572 (__builtin_ia32_rangesd128_round)
23573 (__builtin_ia32_rangess128_round): Remove.
23574 (__builtin_ia32_rangesd128_mask_round,
23575 __builtin_ia32_rangess128_mask_round): New builtins.
23576 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23577 __builtin_ia32_rangess128_round): Remove.
23578 (__builtin_ia32_rangesd128_mask_round,
23579 __builtin_ia32_rangess128_mask_round): New builtins.
23580 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23581 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23582 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23583 "<round_saeonly_constraint>")): Changed to ...
23584 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23585 "<round_saeonly_scalar_constraint>")): ... this.
23586 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23587 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23588 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23589 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23590 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23592 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23594 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23596 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23597 Remove all values except native, 8540 and 8548.
23599 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23601 * config/i386/i386.c (ix86_output_function_return): Pass
23602 INVALID_REGNUM, instead of -1, as invalid register number to
23603 indirect_thunk_name and output_indirect_thunk.
23605 2018-02-02 Julia Koval <julia.koval@intel.com>
23607 * config.gcc: Add -march=icelake.
23608 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23609 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23610 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23611 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23612 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23613 (processor_target_table): Add icelake.
23614 (ix86_option_override_internal): Handle new PTAs.
23615 (get_builtin_code_for_version): Handle icelake.
23616 (M_INTEL_COREI7_ICELAKE): New.
23617 (fold_builtin_cpu): Handle icelake.
23618 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23619 * doc/invoke.texi: Add -march=icelake.
23621 2018-02-02 Julia Koval <julia.koval@intel.com>
23623 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23624 to wide_int_bitmask.
23625 * wide-int-bitmask.h: New.
23627 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23630 * config/i386/i386.md: Replace Pmode with word_mode in
23631 builtin_setjmp_setup and builtin_longjmp to support x32.
23633 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23637 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23639 (rs6000_supported_cpu_names): New static variable.
23640 (linux_cpu_translation_table): Likewise.
23641 (elf_platform) <cpu>: Define new static variable and use it.
23642 Translate kernel AT_PLATFORM name to canonical name if needed.
23643 Error if platform name is unknown.
23645 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23648 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23650 2018-02-01 Jeff Law <law@redhat.com>
23653 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23654 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23655 the scratch if RELEASE_VIA_POP is false.
23656 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23657 If we have to save a temporary register, decrement SIZE appropriately.
23658 Pass new arguments to release_scratch_register_on_entry.
23659 (ix86_adjust_stack_and_probe): Likewise.
23660 (ix86_emit_probe_stack_range): Pass new arguments to
23661 release_scratch_register_on_entry.
23663 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23665 PR rtl-optimization/84157
23666 * combine.c (change_zero_ext): Use REG_P predicate in
23667 front of HARD_REGISTER_P predicate.
23669 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23671 * config/avr/avr.c (avr_option_override): Move disabling of
23672 -fdelete-null-pointer-checks to...
23673 * common/config/avr/avr-common.c (avr_option_optimization_table):
23676 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23678 PR tree-optimization/81635
23679 * tree-data-ref.c (split_constant_offset_1): For types that
23680 wrap on overflow, try to use range info to prove that wrapping
23683 2018-02-01 Renlin Li <renlin.li@arm.com>
23686 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23687 TAILCALL_ADDR_REGS.
23688 (aarch64_register_move_cost): Likewise.
23689 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23690 TAILCALL_ADDR_REGS.
23691 (REG_CLASS_NAMES): Likewise.
23692 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23693 TAILCALL_ADDR_REGS. Remove IP registers.
23694 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23696 2018-02-01 Richard Biener <rguenther@suse.de>
23698 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23699 for specifying RPO order and allow NULL for that.
23700 * domwalk.c (dom_walker::dom_walker): Likewise.
23701 (dom_walker::walk): Handle NULL RPO order.
23702 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23704 (rewrite_update_dom_walker): Likewise.
23705 (mark_def_dom_walker): Likewise.
23707 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23709 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23710 (aarch64_maybe_expand_sve_subreg_move): Declare.
23711 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23712 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23714 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23715 that are semantically a reverse operation.
23716 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23717 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23718 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23720 (aarch64_can_change_mode_class): For big-endian, forbid changes
23721 between two SVE modes if they have different element sizes.
23723 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23725 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23726 the TImode handling for big-endian targets.
23728 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23730 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23731 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23733 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23734 Remove BSWAP handing for big-endian targets and use the form of
23735 LD1RQ appropariate for the mode.
23737 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23739 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23740 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23741 duplicated element.
23743 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23746 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23747 check for operands that need to go through aarch64_sve_reload_be.
23749 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23751 PR tree-optimization/81661
23752 PR tree-optimization/84117
23753 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23754 * tree-eh.c: Include gimplify.h.
23755 (find_trapping_overflow, replace_trapping_overflow,
23756 rewrite_to_non_trapping_overflow): New functions.
23757 * tree-vect-loop.c: Include tree-eh.h.
23758 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23759 * tree-data-ref.c: Include tree-eh.h.
23760 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23762 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23764 PR rtl-optimization/84123
23765 * combine.c (change_zero_ext): Check if hard register satisfies
23766 can_change_dest_mode before calling gen_lowpart_SUBREG.
23768 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23771 * ira.c (ira_init_register_move_cost): Remove assert.
23773 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23775 PR rtl-optimization/84071
23776 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23777 * doc/tm.texi: Regenerate.
23779 2018-01-31 Richard Biener <rguenther@suse.de>
23781 PR tree-optimization/84132
23782 * tree-data-ref.c (analyze_miv_subscript): Properly
23783 check whether evolution_function_is_affine_multivariate_p
23784 before calling gcd_of_steps_may_divide_p.
23786 2018-01-31 Julia Koval <julia.koval@intel.com>
23789 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23790 * config/i386/i386.md (rdpid_rex64) New.
23791 (rdpid): Make 32bit only.
23793 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23796 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23797 an IDENTIFIER_NODE for FUNCTION_TYPE's.
23799 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23802 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23804 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23806 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23808 PR rtl-optimization/84071
23809 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23810 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23812 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23814 * config/arc/arc.c (arc_handle_aux_attribute): New function.
23815 (arc_attribute_table): Add 'aux' attribute.
23816 (arc_in_small_data_p): Consider aux like variables.
23817 (arc_is_aux_reg_p): New function.
23818 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23819 (arc_get_aux_arg): New function.
23820 (prepare_move_operands): Handle aux-register access.
23821 (arc_handle_aux_attribute): New function.
23822 * doc/extend.texi (ARC Variable attributes): Add subsection.
23824 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23826 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23827 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23828 (arc_attribute_table): Add 'uncached' attribute.
23829 (arc_print_operand): Print '.di' flag for uncached memory
23831 (arc_in_small_data_p): Do not consider for small data the uncached
23833 (arc_is_uncached_mem_p): New function.
23834 * config/arc/predicates.md (compact_store_memory_operand): Check
23835 for uncached memory accesses.
23836 (nonvol_nonimm_operand): Likewise.
23837 * doc/extend.texi (ARC Type Attribute): New subsection.
23839 2018-01-31 Jakub Jelinek <jakub@redhat.com>
23842 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23843 falign-loops=): Add Optimization flag.
23845 2018-01-30 Jeff Law <law@redhat.com>
23848 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23849 INT_REGISTERS_SAVED. Check it prior to calling
23850 get_scratch_register_on_entry.
23851 (ix86_adjust_stack_and_probe): Similarly.
23852 (ix86_emit_probe_stack_range): Similarly.
23853 (ix86_expand_prologue): Corresponding changes.
23855 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23858 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23859 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23861 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
23864 * lra-constraints.c (curr_insn_transform): Process AND in the
23867 2018-01-30 Jakub Jelinek <jakub@redhat.com>
23869 PR rtl-optimization/83986
23870 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23871 dependence against last_pending_memory_flush in addition to
23872 pending_jump_insns.
23874 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
23876 PR tree-optimization/81611
23877 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23880 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23883 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23886 2018-01-30 Richard Biener <rguenther@suse.de>
23887 Jakub Jelinek <jakub@redhat.com>
23889 PR tree-optimization/84111
23890 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23891 inner loops added during recursion, as they don't have up-to-date
23894 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23897 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23898 (can_inline_edge_by_limits_p): ... here.
23899 (can_early_inline_edge_p, check_callers,
23900 update_caller_keys, update_callee_keys, recursive_inlining,
23901 add_new_edges_to_heap, speculation_useful_p,
23902 inline_small_functions,
23903 inline_small_functions, flatten_function,
23904 inline_to_all_callers_1): Update.
23906 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23908 * profile-count.c (profile_count::combine_with_ipa_count): Handle
23911 2018-01-30 Richard Biener <rguenther@suse.de>
23913 PR tree-optimization/83008
23914 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23915 invariant and constant vector uses in stmts when they need
23916 more than one stmt.
23918 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23921 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23922 * configure: Regenerate.
23924 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23926 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23928 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23929 Use gen_rtx_REG rather than gen_lowpart.
23931 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23933 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23934 rather than 0 when creating partial subregs.
23936 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23938 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23941 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
23944 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23945 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23946 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23947 flags. This restores the settings used before the 2017-07-24.
23948 Turning off pre increment/decrement/modify allows IVOPTS to
23949 optimize DF/SF loops where the index is an int.
23951 2018-01-29 Richard Biener <rguenther@suse.de>
23952 Kelvin Nilsen <kelvin@gcc.gnu.org>
23955 * tree-vect-stmts.c (vectorizable_call): Don't call
23956 targetm.vectorize_builtin_md_vectorized_function if callee is
23959 2018-01-22 Carl Love <cel@us.ibm.com>
23961 * doc/extend.tex: Fix typo in second arg in
23962 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23964 2018-01-29 Richard Biener <rguenther@suse.de>
23966 PR tree-optimization/84086
23967 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23968 (flush_ssaname_freelist): When SSA names were released reset
23969 the SCEV hash table.
23971 2018-01-29 Richard Biener <rguenther@suse.de>
23973 PR tree-optimization/84057
23974 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23975 removed paths when removing edges.
23977 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
23979 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23980 -mfunction-return=@var{choice}.
23982 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
23984 PR diagnostic/84034
23985 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23986 Handle CR like TAB.
23987 (layout::print_source_line): Likewise.
23988 (test_get_line_width_without_trailing_whitespace): Add test cases.
23990 2018-01-27 Jakub Jelinek <jakub@redhat.com>
23992 PR middle-end/84040
23993 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23996 2018-01-26 Jim Wilson <jimw@sifive.com>
23998 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24000 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24003 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24005 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24006 and CMP + SUB-immediate -> SUBS.
24008 2018-01-26 Martin Sebor <msebor@redhat.com>
24010 PR tree-optimization/83896
24011 * tree-ssa-strlen.c (get_string_len): Rename...
24012 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24013 Avoid assuming length is constant.
24014 (handle_char_store): Use HOST_WIDE_INT for string length.
24016 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24019 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24020 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24022 2018-01-26 Richard Biener <rguenther@suse.de>
24024 PR rtl-optimization/84003
24025 * dse.c (record_store): Only record redundant stores when
24026 the earlier store aliases at least all accesses the later one does.
24028 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24030 PR rtl-optimization/83985
24031 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24032 REG_CFA_RESTORE insns.
24033 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24034 REG_CFA_RESTORE insns here.
24037 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24038 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24040 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24042 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24043 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24044 (arc_init): Likewise.
24045 (arc_override_options): Likewise.
24046 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24048 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24050 * config/arc/arc.h (TARGET_DBNZ): Define.
24051 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24052 properly set the tune attribute.
24053 (dbnz): Use TARGET_DBNZ guard.
24054 * config/arc/arc.opt (mtune): Add core3 option.
24056 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24058 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24059 recognize new pic like addresses.
24060 (arc_delegitimize_address): Clean up.
24062 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24064 * config/arc/arc-arches.def: Option mrf16 valid for all
24066 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24067 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24068 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24069 * config/arc/arc-tables.opt: Regenerate.
24070 * config/arc/arc.c (arc_conditional_register_usage): Handle
24071 reduced register file case.
24072 (arc_file_start): Set must have build attributes.
24073 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24074 mrf16 option value.
24075 * config/arc/arc.opt (mrf16): Add new option.
24076 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24077 * config/arc/genmultilib.awk: Handle new mrf16 option.
24078 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24079 * config/arc/t-multilib: Regenerate.
24080 * doc/invoke.texi (ARC Options): Document mrf16 option.
24082 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24084 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24085 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24086 (arc_attribute_table): Add 'secure_call' attribute.
24087 (arc_print_operand): Print secure call operand.
24088 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24090 (arc_is_secure_call_p): New function. * config/arc/arc.md
24091 (call_i): Add support for sjli instruction.
24092 (call_value_i): Likewise.
24093 * config/arc/constraints.md (Csc): New constraint.
24095 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24096 John Eric Martin <John.Martin@emmicro-us.com>
24098 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24099 * config/arc/arc.c (_arc_jli_section): New struct.
24100 (arc_jli_section): New type.
24101 (rc_jli_sections): New static variable.
24102 (arc_handle_jli_attribute): New function.
24103 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24104 (arc_file_end): New function.
24105 (TARGET_ASM_FILE_END): Define.
24106 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24107 (arc_add_jli_section): New function.
24108 (jli_call_scan): Likewise.
24109 (arc_reorg): Call jli_call_scan.
24110 (arc_output_addsi): Remove 'S' from printing asm operand.
24111 (arc_is_jli_call_p): New function.
24112 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24114 (movhi_insn): Likewise.
24115 (movsi_insn): Likewise.
24116 (movsi_set_cc_insn): Likewise.
24117 (loadqi_update): Likewise.
24118 (load_zeroextendqisi_update): Likewise.
24119 (load_signextendqisi_update): Likewise.
24120 (loadhi_update): Likewise.
24121 (load_zeroextendhisi_update): Likewise.
24122 (load_signextendhisi_update): Likewise.
24123 (loadsi_update): Likewise.
24124 (loadsf_update): Likewise.
24125 (movsicc_insn): Likewise.
24126 (bset_insn): Likewise.
24127 (bxor_insn): Likewise.
24128 (bclr_insn): Likewise.
24129 (bmsk_insn): Likewise.
24130 (bicsi3_insn): Likewise.
24131 (cmpsi_cc_c_insn): Likewise.
24132 (movsi_ne): Likewise.
24133 (movsi_cond_exec): Likewise.
24134 (clrsbsi2): Likewise.
24135 (norm_f): Likewise.
24145 (call_i): Remove 'S' asm letter, add jli instruction.
24146 (call_value_i): Likewise.
24147 * config/arc/arc.op (mjli-always): New option.
24148 * config/arc/constraints.md (Cji): New constraint.
24149 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24151 (subsf3_fpx): Likewise.
24152 (mulsf3_fpx): Likewise.
24153 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24155 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24156 function attrbutes.
24157 * doc/invoke.texi (ARC): Document mjli-always option.
24159 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24161 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24162 avoid addition with 0 and use incw and decw where possible.
24164 2018-01-26 Richard Biener <rguenther@suse.de>
24166 PR tree-optimization/81082
24167 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24168 association if it requires casting to unsigned.
24169 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24170 from fold_plusminus_mult_expr to catch important cases late when
24171 range info is available.
24173 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24175 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24176 * configure.ac (hidden_linkonce): New test.
24177 * configure: Regenerate.
24178 * config.in: Regenerate.
24180 2018-01-26 Julia Koval <julia.koval@intel.com>
24182 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24183 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24184 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24185 _mm_mask_bitshuffle_epi64_mask): Fix type.
24186 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24187 USI_FTYPE_V4DI_V4DI_USI): Remove.
24188 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24189 __builtin_ia32_vpshufbitqmb256_mask,
24190 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24191 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24192 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24194 2018-01-26 Alan Modra <amodra@gmail.com>
24197 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24198 UNSPEC_VBPERMQ. Sort other unspecs.
24200 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24202 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24204 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24206 PR middle-end/83055
24207 * predict.c (drop_profile): Do not push/pop cfun; update also
24209 (handle_missing_profiles): Fix logic looking for zero profiles.
24211 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24213 PR middle-end/83977
24214 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24215 on functions with #pragma omp declare simd or functions with simd
24217 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24218 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24219 Remove trailing \n from warning_at calls.
24221 2018-01-25 Tom de Vries <tom@codesourcery.com>
24224 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24225 for neutered workers.
24227 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24230 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24231 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24233 2018-01-24 Jeff Law <law@redhat.com>
24236 * i386.c (get_probe_interval): Move to earlier point.
24237 (ix86_compute_frame_layout): If -fstack-clash-protection and
24238 the frame is larger than the probe interval, then use pushes
24239 to save registers rather than reg->mem moves.
24240 (ix86_expand_prologue): Remove conditional for int_registers_saved
24243 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24246 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24247 min/max for never referenced object.
24249 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24251 PR middle-end/83977
24252 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24254 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24255 attributes from DECL_ATTRIBUTES (decl) without affecting
24256 DECL_ATTRIBUTES (current_function_decl).
24257 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24258 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24260 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24262 PR tree-optimization/83979
24263 * fold-const.c (fold_comparison): Use constant_boolean_node
24264 instead of boolean_{true,false}_node.
24266 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24268 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24271 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24273 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24274 Simplify the clause that sets the length attribute.
24275 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24276 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24277 clause that sets the length attribute.
24278 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24280 2018-01-24 Tom de Vries <tom@codesourcery.com>
24283 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24284 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24285 Add strict parameter.
24286 (prevent_branch_around_nothing): Insert dummy insn between branch to
24287 label and label with no ptx insn inbetween.
24288 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24290 2018-01-24 Tom de Vries <tom@codesourcery.com>
24293 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24294 for neutered threads in warp.
24295 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24297 2018-01-24 Richard Biener <rguenther@suse.de>
24299 PR tree-optimization/83176
24300 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24303 2018-01-24 Richard Biener <rguenther@suse.de>
24305 PR tree-optimization/82819
24306 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24307 code generating pluses that are no-ops in the target precision.
24309 2018-01-24 Richard Biener <rguenther@suse.de>
24311 PR middle-end/84000
24312 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24314 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24316 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24317 to merge probabilities.
24318 * predict.c (probably_never_executed): Also mark as cold functions
24319 with global 0 profile and guessed local profile.
24320 * profile-count.c (profile_probability::combine_with_count): New
24322 * profile-count.h (profile_probability::operator*,
24323 profile_probability::operator*=, profile_probability::operator/,
24324 profile_probability::operator/=): Reduce precision to adjusted
24325 and set value to guessed on contradictory divisions.
24326 (profile_probability::combine_with_freq): Remove.
24327 (profile_probability::combine_wiht_count): Declare.
24328 (profile_count::force_nonzero):: Set to adjusted.
24329 (profile_count::probability_in):: Set quality to adjusted.
24330 * tree-ssa-tail-merge.c (replace_block_by): Use
24331 combine_with_count.
24333 2018-01-23 Andrew Waterman <andrew@sifive.com>
24334 Jim Wilson <jimw@sifive.com>
24336 * config/riscv/riscv.c (riscv_stack_boundary): New.
24337 (riscv_option_override): Set riscv_stack_boundary. Handle
24338 riscv_preferred_stack_boundary_arg.
24339 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24340 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24341 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24342 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24343 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24344 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24346 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24349 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24350 of struct ix86_frame.
24351 (ix86_expand_epilogue): Likewise. Add a local variable for
24352 the reg_save_offset field in struct ix86_frame.
24354 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24356 PR tree-optimization/82604
24357 * tree-loop-distribution.c (enum partition_kind): New enum item
24358 PKIND_PARTIAL_MEMSET.
24359 (partition_builtin_p): Support above new enum item.
24360 (generate_code_for_partition): Ditto.
24361 (compute_access_range): Differentiate cases that equality can be
24362 proven at all loops, the innermost loops or no loops.
24363 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24364 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24365 (finalize_partitions, distribute_loop): Don't fuse partition of
24366 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24367 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24368 parloop is enabled.
24370 2018-01-23 Martin Liska <mliska@suse.cz>
24372 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24373 order to ignore the predictor.
24374 (PRED_POLYMORPHIC_CALL): Likewise.
24375 (PRED_RECURSIVE_CALL): Likewise.
24377 2018-01-23 Martin Liska <mliska@suse.cz>
24379 * tree-profile.c (tree_profiling): Print function header to
24380 aware reader which function we are working on.
24381 * value-prof.c (gimple_find_values_to_profile): Do not print
24382 not interesting value histograms.
24384 2018-01-23 Martin Liska <mliska@suse.cz>
24386 * profile-count.h (enum profile_quality): Add
24387 profile_uninitialized as the first value. Do not number values
24388 as they are zero based.
24389 (profile_count::verify): Update sanity check.
24390 (profile_probability::verify): Likewise.
24392 2018-01-23 Nathan Sidwell <nathan@acm.org>
24394 * doc/invoke.texi (ffor-scope): Deprecate.
24396 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24398 PR tree-optimization/83510
24399 * domwalk.c (set_all_edges_as_executable): New function.
24400 (dom_walker::dom_walker): Convert bool param
24401 "skip_unreachable_blocks" to enum reachability. Move setup of
24402 edge flags to set_all_edges_as_executable and only do it when
24403 reachability is REACHABLE_BLOCKS.
24404 * domwalk.h (enum dom_walker::reachability): New enum.
24405 (dom_walker::dom_walker): Convert bool param
24406 "skip_unreachable_blocks" to enum reachability.
24407 (set_all_edges_as_executable): New decl.
24408 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24409 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24411 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24412 but converting true to REACHABLE_BLOCKS.
24413 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24415 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24416 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24417 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24419 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24420 if check_all_array_refs will be called.
24422 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24424 * tree.c (selftest::test_location_wrappers): Add more test
24427 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24429 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24430 (selftest::test_bit_in_range): Likewise.
24432 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24435 * doc/sourcebuild.texi (vect_float): Say that the selector
24436 only describes the situation when -funsafe-math-optimizations is on.
24437 (vect_float_strict): Document.
24439 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24441 PR tree-optimization/83965
24442 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24443 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24444 instead of checking only for a reduction.
24445 (vect_recog_widen_sum_pattern): Likewise.
24447 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24449 * predict.c (probably_never_executed): Only use precise profile info.
24450 (compute_function_frequency): Skip after inlining hack since we now
24451 have quality checking.
24453 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24455 * profile-count.h (profile_probability::very_unlikely,
24456 profile_probability::unlikely, profile_probability::even): Set
24457 precision to guessed.
24459 2018-01-23 Richard Biener <rguenther@suse.de>
24461 PR tree-optimization/83963
24462 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24463 Properly terminate dominator walk when crossing the exit edge not
24464 when visiting its source block.
24466 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24469 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24470 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24472 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24474 PR tree-optimization/83957
24475 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24476 semicolon after for body surrounded by braces.
24478 PR tree-optimization/83081
24479 * profile-count.h (profile_probability::split): New method.
24480 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24481 Use profile_probability::split.
24482 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24483 when splitting a single conditional jump into 2.
24485 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24487 PR tree-optimization/69452
24488 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24491 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24493 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24494 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24495 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24497 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24499 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24501 * config/rl78/rl78.md (movdi): New define_expand.
24502 * config/rl78/rl78.c (rl78_split_movdi): New function.
24504 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24507 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24509 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24510 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24511 128-bit to produce an UNSPEC move to get the double word with the
24512 signbit and then a shift directly to do signbit.
24513 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24514 implementation with a new version that just does either a direct
24515 move or a regular move. Move memory interface to separate insns.
24516 Move insns so they are next to the expander.
24517 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24518 with signbit move. Split big and little endian case.
24519 (signbit<mode>2_dm_mem_le): Likewise.
24520 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24521 (signbit<mode>2_dm2): Likewise.
24523 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24525 * config/rl78/rl78.md (anddi3): New define_expand.
24527 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24529 * config/rl78/rl78.md (umindi3): New define_expand.
24531 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24533 * config/rl78/rl78.md (smindi3): New define_expand.
24535 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24537 * config/rl78/rl78.md (smaxdi3): New define_expand.
24539 2018-01-22 Carl Love <cel@us.ibm.com>
24541 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24542 LVX_V1TI): Add macro expansion.
24543 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24544 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24545 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24546 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24547 Change check to determine if the instruction is a byte reversing
24548 entry. Fix typo in comment.
24549 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24550 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24551 Add def_builtin calls for new builtins.
24552 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24553 Add define_insn expansion.
24555 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24557 * config/rl78/rl78.md (umaxdi3): New define_expand.
24559 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24561 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24562 for non-QImode registers.
24564 2018-01-22 Richard Biener <rguenther@suse.de>
24566 PR tree-optimization/83963
24567 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24568 including the loop exit block.
24569 (scop_detection::merge_sese): Likewise.
24570 (scop_detection::add_scop): Do it here instead.
24572 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24574 * doc/sourcebuild.texi (arm_softfloat): Document.
24576 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24579 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24580 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24581 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24583 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24584 David Edelsohn <dje.gcc@gmail.com>
24587 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24588 Change "crset eq" to "crset 2".
24589 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24590 (*call_indirect_aix<mode>_nospec): Likewise.
24591 (*call_value_indirect_aix<mode>_nospec): Likewise.
24592 (*call_indirect_elfv2<mode>_nospec): Likewise.
24593 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24594 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24595 change assembly output from . to $.
24596 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24597 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24598 (*tablejump<mode>_internal1_nospec): Likewise.
24600 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24603 * config/sh/sh_optimize_sett_clrt.cc:
24604 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24606 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24608 PR tree-optimization/83940
24609 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24610 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24611 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24612 use it to pass back the definition type.
24613 (vect_check_store_rhs): Likewise rhs_dt_out.
24614 (vect_build_gather_load_calls): Add a mask_dt argument and use
24615 it instead of a call to vect_is_simple_use.
24616 (vectorizable_store): Update calls to vect_check_load_store_mask
24617 and vect_check_store_rhs. Use the dt returned by the latter instead
24618 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24619 instead of calls to vect_is_simple_use. Pass the scalar rather
24620 than the vector operand to vect_is_simple_use when handling
24621 second and subsequent copies of an rhs value.
24622 (vectorizable_load): Update calls to vect_check_load_store_mask
24623 and vect_build_gather_load_calls. Use the cached mask_dt and
24624 gs_info.offset_dt instead of calls to vect_is_simple_use.
24626 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24628 PR middle-end/83945
24629 * tree-emutls.c: Include gimplify.h.
24630 (lower_emutls_2): New function.
24631 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24632 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24633 it before further processing.
24636 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24637 UINTVAL (trueop1) instead of INTVAL (op1).
24639 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24643 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24644 INCOMING_FRAME_SP_OFFSET if not defined.
24645 (scan_trace): Add ENTRY argument. If true and
24646 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24647 emit a note to adjust the CFA offset.
24648 (create_cfi_notes): Adjust scan_trace callers.
24649 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24650 INCOMING_FRAME_SP_OFFSET in the CIE.
24651 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24652 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24654 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24655 * doc/tm.texi: Regenerated.
24657 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24659 PR rtl-optimization/83147
24660 * lra-constraints.c (remove_inheritance_pseudos): Use
24661 lra_substitute_pseudo_within_insn.
24663 2018-01-19 Tom de Vries <tom@codesourcery.com>
24664 Cesar Philippidis <cesar@codesourcery.com>
24667 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24669 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24672 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24673 spaces for function labels.
24675 2018-01-19 Martin Liska <mliska@suse.cz>
24677 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24678 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24679 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24680 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24681 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24682 (PRED_CONST_RETURN): Change from 69 to 65.
24683 (PRED_NULL_RETURN): Change from 91 to 71.
24684 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24685 (PRED_LOOP_GUARD): Change from 66 to 73.
24687 2018-01-19 Martin Liska <mliska@suse.cz>
24689 * predict.c (predict_insn_def): Add new assert.
24690 (struct branch_predictor): Change type to signed integer.
24691 (test_prediction_value_range): Amend test to cover
24692 PROB_UNINITIALIZED.
24693 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24694 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24695 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24696 (PRED_LOOP_IV_COMPARE): Likewise.
24697 * predict.h (PROB_UNINITIALIZED): Define new constant.
24699 2018-01-19 Martin Liska <mliska@suse.cz>
24701 * predict.c (dump_prediction): Add new format for
24702 analyze_brprob.py script which is enabled with -details
24704 * profile-count.h (precise_p): New function.
24706 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24708 PR tree-optimization/83922
24709 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24710 there are no statements that need masking.
24711 (vect_active_double_reduction_p): New function.
24712 (vect_analyze_loop_operations): Use it when handling phis that
24713 are not in the loop header.
24715 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24717 PR tree-optimization/83914
24718 * tree-vect-loop.c (vectorizable_induction): Don't convert
24719 init_expr or apply the peeling adjustment for inductions
24720 that are nested within the vectorized loop.
24722 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24724 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24727 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24731 * function.h (gimplify_parameters): Add gimple_seq * argument.
24732 * function.c: Include gimple.h and options.h.
24733 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24734 for the added local temporaries if needed.
24735 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24736 if there are any parameter cleanups, wrap whole body into a
24737 try/finally with the cleanups.
24739 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24742 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24743 Use GET_MODE_CLASS for scalar floating point.
24745 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24749 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24750 Fix call of call_cgraph_insertion_hooks.
24752 2018-01-18 Martin Sebor <msebor@redhat.com>
24754 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24756 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24759 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24762 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24765 * common.opt: (-ffile-prefix-map): New option.
24766 * opts.c (common_handle_option): Defer it.
24767 * opts-global.c (handle_common_deferred_options): Handle it.
24768 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24769 * file-prefix-map.h: New file.
24770 (remap_debug_filename, add_debug_prefix_map): ...here.
24771 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24772 * final.c (debug_prefix_map, add_debug_prefix_map
24773 remap_debug_filename): Move to...
24774 * file-prefix-map.c: New file.
24775 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24776 generalize, get rid of alloca(), use strrchr() instead of strchr().
24777 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24778 Implement in terms of add_prefix_map().
24779 (remap_macro_filename, remap_debug_filename): Implement in term of
24781 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24782 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24783 * dbxout.c: Include file-prefix-map.h.
24784 * varasm.c: Likewise.
24785 * vmsdbgout.c: Likewise.
24786 * xcoffout.c: Likewise.
24787 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24788 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24789 * doc/invoke.texi (-ffile-prefix-map): Document.
24790 (-fdebug-prefix-map): Update description.
24792 2018-01-18 Martin Liska <mliska@suse.cz>
24794 * config/i386/i386.c (indirect_thunk_name): Document that also
24796 (output_indirect_thunk): Document why both instructions
24797 (pause and lfence) are generated.
24799 2018-01-18 Richard Biener <rguenther@suse.de>
24801 PR tree-optimization/83887
24802 * graphite-scop-detection.c
24803 (scop_detection::get_nearest_dom_with_single_entry): Remove.
24804 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24805 (scop_detection::merge_sese): Re-implement with a flood-fill
24806 algorithm that properly finds a SESE region if it exists.
24808 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24811 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24812 pointer_diff optimizations use view_convert instead of convert.
24814 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24816 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24817 Generate different code for -mno-speculate-indirect-jumps.
24818 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24819 (*call_indirect_aix<mode>): Disable for
24820 -mno-speculate-indirect-jumps.
24821 (*call_indirect_aix<mode>_nospec): New define_insn.
24822 (*call_value_indirect_aix<mode>): Disable for
24823 -mno-speculate-indirect-jumps.
24824 (*call_value_indirect_aix<mode>_nospec): New define_insn.
24825 (*sibcall_nonlocal_sysv<mode>): Generate different code for
24826 -mno-speculate-indirect-jumps.
24827 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24829 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
24831 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24832 long double type, set the flags for noting the default long double
24833 type, even if we don't pass or return a long double type.
24835 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
24838 * ipa-inline.c (flatten_function): Do not overwrite final inlining
24841 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
24843 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24844 support for merge[hl].
24845 (fold_mergehl_helper): New helper function.
24846 (tree-vector-builder.h): New #include for tree_vector_builder usage.
24847 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24848 (altivec_vmrglw_direct): Add xxmrglw insn.
24850 2018-01-17 Andrew Waterman <andrew@sifive.com>
24852 * config/riscv/riscv.c (riscv_conditional_register_usage): If
24853 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24855 2018-01-17 David Malcolm <dmalcolm@redhat.com>
24858 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24859 call the lto_location_cache before reading the
24860 DECL_SOURCE_LOCATION of the types.
24862 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
24863 Richard Sandiford <richard.sandiford@linaro.org>
24865 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24866 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24867 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24868 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24869 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24871 * config/aarch64/constraints.md (aarch64_movti_operand):
24873 * config/aarch64/predicates.md (Uti): Add new constraint.
24875 2018-01-17 Carl Love <cel@us.ibm.com>
24877 * config/rs6000/vsx.md (define_expand xl_len_r,
24878 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24879 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24881 (define_expand, define_insn): Move the shift left from the
24882 define_insn to the define_expand for lxvl and stxvl instructions.
24883 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24884 and XL_LEN_R definitions to PURE.
24886 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
24888 * config/i386/i386.c (indirect_thunk_name): Declare regno
24889 as unsigned int. Compare regno with INVALID_REGNUM.
24890 (output_indirect_thunk): Ditto.
24891 (output_indirect_thunk_function): Ditto.
24892 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
24893 in the call to output_indirect_thunk_function.
24895 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
24897 PR middle-end/83884
24898 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24899 rather than the size of inner_type to determine the stack slot size
24900 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24902 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
24905 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24908 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
24910 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24911 endian Linux systems to optionally enable multilibs for selecting
24912 the long double type if the user configured an explicit type.
24913 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24914 have no long double multilibs if not defined.
24915 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24916 warn if the user used -mabi={ieee,ibm}longdouble and we built
24917 multilibs for long double.
24918 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24919 appropriate multilib option.
24920 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24922 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24923 for building long double multilibs.
24924 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24926 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
24928 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24931 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24933 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24936 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24939 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24942 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24944 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24945 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24947 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
24949 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24950 different rtl trees depending on TARGET_64BIT.
24951 (rs6000_gen_lvx): Likewise.
24953 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24955 * config/visium/visium.md (nop): Tweak comment.
24956 (hazard_nop): Likewise.
24958 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24960 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24961 -mspeculate-indirect-jumps.
24962 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24963 for -mno-speculate-indirect-jumps.
24964 (*call_indirect_elfv2<mode>_nospec): New define_insn.
24965 (*call_value_indirect_elfv2<mode>): Disable for
24966 -mno-speculate-indirect-jumps.
24967 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24968 (indirect_jump): Emit different RTL for
24969 -mno-speculate-indirect-jumps.
24970 (*indirect_jump<mode>): Disable for
24971 -mno-speculate-indirect-jumps.
24972 (*indirect_jump<mode>_nospec): New define_insn.
24973 (tablejump): Emit different RTL for
24974 -mno-speculate-indirect-jumps.
24975 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24976 (tablejumpsi_nospec): New define_expand.
24977 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24978 (tablejumpdi_nospec): New define_expand.
24979 (*tablejump<mode>_internal1): Disable for
24980 -mno-speculate-indirect-jumps.
24981 (*tablejump<mode>_internal1_nospec): New define_insn.
24982 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24985 2018-01-16 Artyom Skrobov tyomitch@gmail.com
24987 * caller-save.c (insert_save): Drop unnecessary parameter. All
24990 2018-01-16 Jakub Jelinek <jakub@redhat.com>
24991 Richard Biener <rguenth@suse.de>
24994 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24995 return early, inline manually is_gimple_sizepos. Make sure if we
24996 call gimplify_expr we don't end up with a gimple constant.
24997 * tree.c (variably_modified_type_p): Don't return true for
24998 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
24999 * gimplify.h (is_gimple_sizepos): Remove.
25001 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25003 PR tree-optimization/83857
25004 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25005 vectorizable_live_operation for pure SLP statements.
25006 (vectorizable_live_operation): Handle PHIs.
25008 2018-01-16 Richard Biener <rguenther@suse.de>
25010 PR tree-optimization/83867
25011 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25012 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25014 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25017 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25018 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25019 If off is not INTEGER_CST, issue a may not be aligned warning
25020 rather than isn't aligned. Use isn%'t rather than isn't.
25021 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25023 <case MULT_EXPR>: Improve the case when bottom and one of the
25024 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25025 operand, in that case check if the other operand is multiple of
25026 bottom divided by the INTEGER_CST operand.
25028 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25031 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25032 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25033 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25034 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25035 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25036 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25037 (pa_function_arg_size): New function.
25039 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25041 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25042 in a separate statement.
25044 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25046 PR tree-optimization/83847
25047 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25048 group gathers and scatters.
25050 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25052 PR rtl-optimization/86620
25053 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25055 PR rtl-optimization/83213
25056 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25057 to last if both are JUMP_INSNs.
25059 PR tree-optimization/83843
25060 * gimple-ssa-store-merging.c
25061 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25062 store_immediate_info for bswap/nop orig_stores.
25064 2018-01-15 Andrew Waterman <andrew@sifive.com>
25066 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25068 <UDIV>: Increase cost if !TARGET_DIV.
25070 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25072 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25073 (define_attr "cr_logical_3op"): New.
25074 (cceq_ior_compare): Adjust.
25075 (cceq_ior_compare_complement): Adjust.
25076 (*cceq_rev_compare): Adjust.
25077 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25078 (is_cracked_insn): Adjust.
25079 (insn_must_be_first_in_group): Adjust.
25080 * config/rs6000/40x.md: Adjust.
25081 * config/rs6000/440.md: Adjust.
25082 * config/rs6000/476.md: Adjust.
25083 * config/rs6000/601.md: Adjust.
25084 * config/rs6000/603.md: Adjust.
25085 * config/rs6000/6xx.md: Adjust.
25086 * config/rs6000/7450.md: Adjust.
25087 * config/rs6000/7xx.md: Adjust.
25088 * config/rs6000/8540.md: Adjust.
25089 * config/rs6000/cell.md: Adjust.
25090 * config/rs6000/e300c2c3.md: Adjust.
25091 * config/rs6000/e500mc.md: Adjust.
25092 * config/rs6000/e500mc64.md: Adjust.
25093 * config/rs6000/e5500.md: Adjust.
25094 * config/rs6000/e6500.md: Adjust.
25095 * config/rs6000/mpc.md: Adjust.
25096 * config/rs6000/power4.md: Adjust.
25097 * config/rs6000/power5.md: Adjust.
25098 * config/rs6000/power6.md: Adjust.
25099 * config/rs6000/power7.md: Adjust.
25100 * config/rs6000/power8.md: Adjust.
25101 * config/rs6000/power9.md: Adjust.
25102 * config/rs6000/rs64.md: Adjust.
25103 * config/rs6000/titan.md: Adjust.
25105 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25107 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25108 ix86_indirect_branch_register logic.
25110 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25112 * config/i386/constraints.md (Bs): Update
25113 ix86_indirect_branch_register check. Don't check
25114 ix86_indirect_branch_register with GOT_memory_operand.
25116 * config/i386/predicates.md (GOT_memory_operand): Don't check
25117 ix86_indirect_branch_register here.
25118 (GOT32_symbol_operand): Likewise.
25120 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25122 * config/i386/predicates.md (constant_call_address_operand):
25123 Rewrite ix86_indirect_branch_register logic.
25124 (sibcall_insn_operand): Likewise.
25126 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25128 * config/i386/constraints.md (Bs): Replace
25129 ix86_indirect_branch_thunk_register with
25130 ix86_indirect_branch_register.
25132 * config/i386/i386.md (indirect_jump): Likewise.
25133 (tablejump): Likewise.
25134 (*sibcall_memory): Likewise.
25135 (*sibcall_value_memory): Likewise.
25136 Peepholes of indirect call and jump via memory: Likewise.
25137 * config/i386/i386.opt: Likewise.
25138 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25139 (GOT_memory_operand): Likewise.
25140 (call_insn_operand): Likewise.
25141 (sibcall_insn_operand): Likewise.
25142 (GOT32_symbol_operand): Likewise.
25144 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25146 PR middle-end/83837
25147 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25148 type rather than type addr's type points to.
25149 (expand_omp_atomic_mutex): Likewise.
25150 (expand_omp_atomic): Likewise.
25152 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25155 * config/i386/i386.c (output_indirect_thunk_function): Use
25156 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25157 for __x86_return_thunk.
25159 2018-01-15 Richard Biener <rguenther@suse.de>
25161 PR middle-end/83850
25162 * expmed.c (extract_bit_field_1): Fix typo.
25164 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25167 * config/arm/iterators.md (VF): New mode iterator.
25168 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25169 Remove integer-related logic from pattern.
25170 (neon_vabd<mode>_3): Likewise.
25172 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25174 PR middle-end/82694
25175 * common.opt (fstrict-overflow): No longer an alias.
25176 (fwrapv-pointer): New option.
25177 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25178 also for pointer types based on flag_wrapv_pointer.
25179 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25180 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25181 opts->x_flag_wrapv got set.
25182 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25183 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25184 POINTER_TYPE_OVERFLOW_UNDEFINED.
25185 * match.pd: Likewise in address comparison pattern.
25186 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25188 2018-01-15 Richard Biener <rguenther@suse.de>
25191 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25192 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25193 Reset type names to their identifier if their TYPE_DECL doesn't
25194 have linkage (and thus is used for ODR and devirt).
25195 (save_debug_info_for_decl): Remove.
25196 (save_debug_info_for_type): Likewise.
25197 (add_tree_to_fld_list): Adjust.
25198 * tree-pretty-print.c (dump_generic_node): Make dumping of
25199 type names more robust.
25201 2018-01-15 Richard Biener <rguenther@suse.de>
25203 * BASE-VER: Bump to 8.0.1.
25205 2018-01-14 Martin Sebor <msebor@redhat.com>
25208 * builtins.c (check_access): Avoid warning when the no-warning bit
25211 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25213 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25214 * ira-color (allocno_hard_regs_compare): Likewise.
25216 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25219 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25220 Use .pushsection/.popsection.
25222 2018-01-14 Martin Sebor <msebor@redhat.com>
25225 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25227 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25229 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25230 entry from extra_headers.
25231 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25232 extra_headers, make the list bitwise identical to the i?86-*-* one.
25234 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25236 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25237 -mcmodel=large with -mindirect-branch=thunk,
25238 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25239 -mfunction-return=thunk-extern.
25240 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25241 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25242 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25244 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25246 * config/i386/i386.c (print_reg): Print the name of the full
25247 integer register without '%'.
25248 (ix86_print_operand): Handle 'V'.
25249 * doc/extend.texi: Document 'V' modifier.
25251 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25253 * config/i386/constraints.md (Bs): Disallow memory operand for
25254 -mindirect-branch-register.
25256 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25257 (GOT_memory_operand): Likewise.
25258 (call_insn_operand): Likewise.
25259 (sibcall_insn_operand): Likewise.
25260 (GOT32_symbol_operand): Likewise.
25261 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25262 for -mindirect-branch-register.
25263 (tablejump): Likewise.
25264 (*sibcall_memory): Likewise.
25265 (*sibcall_value_memory): Likewise.
25266 Disallow peepholes of indirect call and jump via memory for
25267 -mindirect-branch-register.
25268 (*call_pop): Replace m with Bw.
25269 (*call_value_pop): Likewise.
25270 (*sibcall_pop_memory): Replace m with Bs.
25271 * config/i386/i386.opt (mindirect-branch-register): New option.
25272 * doc/invoke.texi: Document -mindirect-branch-register option.
25274 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25276 * config/i386/i386-protos.h (ix86_output_function_return): New.
25277 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25278 set function_return_type.
25279 (indirect_thunk_name): Add ret_p to indicate thunk for function
25281 (output_indirect_thunk_function): Pass false to
25282 indirect_thunk_name.
25283 (ix86_output_indirect_branch_via_reg): Likewise.
25284 (ix86_output_indirect_branch_via_push): Likewise.
25285 (output_indirect_thunk_function): Create alias for function
25286 return thunk if regno < 0.
25287 (ix86_output_function_return): New function.
25288 (ix86_handle_fndecl_attribute): Handle function_return.
25289 (ix86_attribute_table): Add function_return.
25290 * config/i386/i386.h (machine_function): Add
25291 function_return_type.
25292 * config/i386/i386.md (simple_return_internal): Use
25293 ix86_output_function_return.
25294 (simple_return_internal_long): Likewise.
25295 * config/i386/i386.opt (mfunction-return=): New option.
25296 (indirect_branch): Mention -mfunction-return=.
25297 * doc/extend.texi: Document function_return function attribute.
25298 * doc/invoke.texi: Document -mfunction-return= option.
25300 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25302 * config/i386/i386-opts.h (indirect_branch): New.
25303 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25304 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25305 with local indirect jump when converting indirect call and jump.
25306 (ix86_set_indirect_branch_type): New.
25307 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25308 (indirectlabelno): New.
25309 (indirect_thunk_needed): Likewise.
25310 (indirect_thunk_bnd_needed): Likewise.
25311 (indirect_thunks_used): Likewise.
25312 (indirect_thunks_bnd_used): Likewise.
25313 (INDIRECT_LABEL): Likewise.
25314 (indirect_thunk_name): Likewise.
25315 (output_indirect_thunk): Likewise.
25316 (output_indirect_thunk_function): Likewise.
25317 (ix86_output_indirect_branch_via_reg): Likewise.
25318 (ix86_output_indirect_branch_via_push): Likewise.
25319 (ix86_output_indirect_branch): Likewise.
25320 (ix86_output_indirect_jmp): Likewise.
25321 (ix86_code_end): Call output_indirect_thunk_function if needed.
25322 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25324 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25325 (ix86_attribute_table): Add indirect_branch.
25326 * config/i386/i386.h (machine_function): Add indirect_branch_type
25327 and has_local_indirect_jump.
25328 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25330 (tablejump): Likewise.
25331 (*indirect_jump): Use ix86_output_indirect_jmp.
25332 (*tablejump_1): Likewise.
25333 (simple_return_indirect_internal): Likewise.
25334 * config/i386/i386.opt (mindirect-branch=): New option.
25335 (indirect_branch): New.
25338 (thunk-inline): Likewise.
25339 (thunk-extern): Likewise.
25340 * doc/extend.texi: Document indirect_branch function attribute.
25341 * doc/invoke.texi: Document -mindirect-branch= option.
25343 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25346 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25348 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25350 * ipa-inline.c (want_inline_small_function_p): Return false if
25351 inlining has already failed with CIF_FINAL_ERROR.
25352 (update_caller_keys): Call want_inline_small_function_p before
25354 (update_callee_keys): Likewise.
25356 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25358 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25360 (rs6000_quadword_masked_address_p): Likewise.
25361 (quad_aligned_load_p): Likewise.
25362 (quad_aligned_store_p): Likewise.
25363 (const_load_sequence_p): Add comment to describe the outer-most loop.
25364 (mimic_memory_attributes_and_flags): New function.
25365 (rs6000_gen_stvx): Likewise.
25366 (replace_swapped_aligned_store): Likewise.
25367 (rs6000_gen_lvx): Likewise.
25368 (replace_swapped_aligned_load): Likewise.
25369 (replace_swapped_load_constant): Capitalize argument name in
25370 comment describing this function.
25371 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25372 and stores that access quad-word aligned addresses and replace
25373 with stvx or lvx instructions when appropriate.
25374 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25375 New function prototype.
25376 (rs6000_quadword_masked_address_p): Likewise.
25377 (rs6000_gen_lvx): Likewise.
25378 (rs6000_gen_stvx): Likewise.
25379 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25380 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25381 when memory address is aligned.
25382 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25383 this split to select lvx instruction when memory address is aligned.
25384 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25385 instruction when memory address is aligned.
25386 (*vsx_le_perm_load_v16qi): Likewise.
25387 (four unnamed splitters): Modify to select the stvx instruction
25388 when memory is aligned.
25390 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25392 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25393 which appears in the queue multiple times.
25395 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25396 Alan Hayward <alan.hayward@arm.com>
25397 David Sherwood <david.sherwood@arm.com>
25399 * tree-vectorizer.h (vec_lower_bound): New structure.
25400 (_loop_vec_info): Add check_nonzero and lower_bounds.
25401 (LOOP_VINFO_CHECK_NONZERO): New macro.
25402 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25403 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25404 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25405 fields. Make seg_len the distance travelled, not including the
25407 (dr_direction_indicator): Declare.
25408 (dr_zero_step_indicator): Likewise.
25409 (dr_known_forward_stride_p): Likewise.
25410 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25412 (runtime_alias_check_p): Allow runtime alias checks with
25414 (operator ==): Compare access_size and align.
25415 (prune_runtime_alias_test_list): Rework for new distinction between
25416 the access_size and seg_len.
25417 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25419 (get_segment_min_max): New function.
25420 (create_intersect_range_checks): Use it.
25421 (dr_step_indicator): New function.
25422 (dr_direction_indicator): Likewise.
25423 (dr_zero_step_indicator): Likewise.
25424 (dr_known_forward_stride_p): Likewise.
25425 * tree-loop-distribution.c (data_ref_segment_size): Return
25426 DR_STEP * (niters - 1).
25427 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25429 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25430 (vect_preserves_scalar_order_p): New function, split out from...
25431 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25432 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25433 (vect_vfa_access_size): New function.
25434 (vect_vfa_align): Likewise.
25435 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25436 (dump_lower_bound): New function.
25437 (vect_check_lower_bound): Likewise.
25438 (vect_small_gap_p): Likewise.
25439 (vectorizable_with_step_bound_p): Likewise.
25440 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25441 depencies if the vectorization factor is 1. Convert the checks
25442 for nonzero steps into checks on the bounds of DR_STEP. Try using
25443 a bunds check for variable steps if the minimum required step is
25444 relatively small. Update calls to the dr_with_seg_len
25445 constructor and to vect_compile_time_alias.
25446 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25448 (vect_loop_versioning): Call it.
25449 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25451 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25453 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25454 Alan Hayward <alan.hayward@arm.com>
25455 David Sherwood <david.sherwood@arm.com>
25457 * doc/sourcebuild.texi (vect_scatter_store): Document.
25458 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25460 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25462 * genopinit.c (main): Add supports_vec_scatter_store and
25463 supports_vec_scatter_store_cached to target_optabs.
25464 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25465 IFN_MASK_SCATTER_STORE.
25466 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25468 * internal-fn.h (internal_store_fn_p): Declare.
25469 (internal_fn_stored_value_index): Likewise.
25470 * internal-fn.c (scatter_store_direct): New macro.
25471 (expand_scatter_store_optab_fn): New function.
25472 (direct_scatter_store_optab_supported_p): New macro.
25473 (internal_store_fn_p): New function.
25474 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25475 IFN_MASK_SCATTER_STORE.
25476 (internal_fn_mask_index): Likewise.
25477 (internal_fn_stored_value_index): New function.
25478 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25479 for scatter stores.
25480 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25481 * optabs-query.c (supports_vec_scatter_store_p): New function.
25482 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25483 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25484 true for scatter stores.
25485 (vect_gather_scatter_fn_p): Handle scatter stores too.
25486 (vect_check_gather_scatter): Consider using scatter stores if
25487 supports_vec_scatter_store_p.
25488 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25489 scatter stores too.
25490 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25491 internal_fn_stored_value_index.
25492 (check_load_store_masking): Handle scatter stores too.
25493 (vect_get_store_rhs): Make public.
25494 (vectorizable_call): Use internal_store_fn_p.
25495 (vectorizable_store): Handle scatter store internal functions.
25496 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25497 when deciding whether the end of the group has been reached.
25498 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25499 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25500 (mask_scatter_store<mode>): New insns.
25502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25503 Alan Hayward <alan.hayward@arm.com>
25504 David Sherwood <david.sherwood@arm.com>
25506 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25507 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25508 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25510 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25511 Use vect_truncate_gather_scatter_offset if we can't treat the
25512 operation as a normal gather load or scatter store.
25513 (get_group_load_store_type): Take the gather_scatter_info
25514 as argument. Try using a gather load or scatter store for
25515 single-element groups.
25516 (get_load_store_type): Update calls to get_group_load_store_type
25517 and vect_use_strided_gather_scatters_p.
25519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25520 Alan Hayward <alan.hayward@arm.com>
25521 David Sherwood <david.sherwood@arm.com>
25523 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25524 optional tree argument.
25525 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25527 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25528 but continue to use the current value as a fallback.
25529 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25530 to compare the updates.
25531 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25532 (get_load_store_type): Use it when handling a strided access.
25533 (vect_get_strided_load_store_ops): New function.
25534 (vect_get_data_ptr_increment): Likewise.
25535 (vectorizable_load): Handle strided gather loads. Always pass
25536 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25538 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25539 Alan Hayward <alan.hayward@arm.com>
25540 David Sherwood <david.sherwood@arm.com>
25542 * doc/md.texi (gather_load@var{m}): Document.
25543 (mask_gather_load@var{m}): Likewise.
25544 * genopinit.c (main): Add supports_vec_gather_load and
25545 supports_vec_gather_load_cached to target_optabs.
25546 * optabs-tree.c (init_tree_optimization_optabs): Use
25547 ggc_cleared_alloc to allocate target_optabs.
25548 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25549 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25551 * internal-fn.h (internal_load_fn_p): Declare.
25552 (internal_gather_scatter_fn_p): Likewise.
25553 (internal_fn_mask_index): Likewise.
25554 (internal_gather_scatter_fn_supported_p): Likewise.
25555 * internal-fn.c (gather_load_direct): New macro.
25556 (expand_gather_load_optab_fn): New function.
25557 (direct_gather_load_optab_supported_p): New macro.
25558 (direct_internal_fn_optab): New function.
25559 (internal_load_fn_p): Likewise.
25560 (internal_gather_scatter_fn_p): Likewise.
25561 (internal_fn_mask_index): Likewise.
25562 (internal_gather_scatter_fn_supported_p): Likewise.
25563 * optabs-query.c (supports_at_least_one_mode_p): New function.
25564 (supports_vec_gather_load_p): Likewise.
25565 * optabs-query.h (supports_vec_gather_load_p): Declare.
25566 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25567 and memory_type field.
25568 (NUM_PATTERNS): Bump to 15.
25569 * tree-vect-data-refs.c: Include internal-fn.h.
25570 (vect_gather_scatter_fn_p): New function.
25571 (vect_describe_gather_scatter_call): Likewise.
25572 (vect_check_gather_scatter): Try using internal functions for
25573 gather loads. Recognize existing calls to a gather load function.
25574 (vect_analyze_data_refs): Consider using gather loads if
25575 supports_vec_gather_load_p.
25576 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25577 (vect_get_gather_scatter_offset_type): Likewise.
25578 (vect_convert_mask_for_vectype): Likewise.
25579 (vect_add_conversion_to_patterm): Likewise.
25580 (vect_try_gather_scatter_pattern): Likewise.
25581 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25582 (vect_vect_recog_func_ptrs): Add it.
25583 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25584 internal_fn_mask_index and internal_gather_scatter_fn_p.
25585 (check_load_store_masking): Take the gather_scatter_info as an
25586 argument and handle gather loads.
25587 (vect_get_gather_scatter_ops): New function.
25588 (vectorizable_call): Check internal_load_fn_p.
25589 (vectorizable_load): Likewise. Handle gather load internal
25591 (vectorizable_store): Update call to check_load_store_masking.
25592 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25593 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25594 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25595 (aarch64_gather_scale_operand_d): New predicates.
25596 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25597 (mask_gather_load<mode>): New insns.
25599 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25600 Alan Hayward <alan.hayward@arm.com>
25601 David Sherwood <david.sherwood@arm.com>
25603 * optabs.def (fold_left_plus_optab): New optab.
25604 * doc/md.texi (fold_left_plus_@var{m}): Document.
25605 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25606 * internal-fn.c (fold_left_direct): Define.
25607 (expand_fold_left_optab_fn): Likewise.
25608 (direct_fold_left_optab_supported_p): Likewise.
25609 * fold-const-call.c (fold_const_fold_left): New function.
25610 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25611 * tree-parloops.c (valid_reduction_p): New function.
25612 (gather_scalar_reductions): Use it.
25613 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25614 (vect_finish_replace_stmt): Declare.
25615 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25616 (needs_fold_left_reduction_p): New function, split out from...
25617 (vect_is_simple_reduction): ...here. Accept reductions that
25618 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25619 (vect_force_simple_reduction): Also store the reduction type in
25620 the assignment's STMT_VINFO_REDUC_TYPE.
25621 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25622 (merge_with_identity): New function.
25623 (vect_expand_fold_left): Likewise.
25624 (vectorize_fold_left_reduction): Likewise.
25625 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25626 scalar phi in place for it. Check for target support and reject
25627 cases that would reassociate the operation. Defer the transform
25628 phase to vectorize_fold_left_reduction.
25629 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25630 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25631 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25635 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25636 call to ifc_temp_var.
25638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25639 Alan Hayward <alan.hayward@arm.com>
25640 David Sherwood <david.sherwood@arm.com>
25642 * target.def (legitimize_address_displacement): Take the original
25643 offset as a poly_int.
25644 * targhooks.h (default_legitimize_address_displacement): Update
25646 * targhooks.c (default_legitimize_address_displacement): Likewise.
25647 * doc/tm.texi: Regenerate.
25648 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25649 as an argument, moving assert of ad->disp == ad->disp_term to...
25650 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25651 Try calling targetm.legitimize_address_displacement before expanding
25652 the address rather than afterwards, and adjust for the new interface.
25653 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25654 Match the new hook interface. Handle SVE addresses.
25655 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25656 new hook interface.
25658 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25660 * Makefile.in (OBJS): Add early-remat.o.
25661 * target.def (select_early_remat_modes): New hook.
25662 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25663 * doc/tm.texi: Regenerate.
25664 * targhooks.h (default_select_early_remat_modes): Declare.
25665 * targhooks.c (default_select_early_remat_modes): New function.
25666 * timevar.def (TV_EARLY_REMAT): New timevar.
25667 * passes.def (pass_early_remat): New pass.
25668 * tree-pass.h (make_pass_early_remat): Declare.
25669 * early-remat.c: New file.
25670 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25672 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25674 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25675 Alan Hayward <alan.hayward@arm.com>
25676 David Sherwood <david.sherwood@arm.com>
25678 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25679 vfm1 with a bound_epilog parameter.
25680 (vect_do_peeling): Update calls accordingly, and move the prologue
25681 call earlier in the function. Treat the base bound_epilog as 0 for
25682 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25683 this base when peeling for gaps.
25684 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25685 with fully-masked loops.
25686 (vect_estimate_min_profitable_iters): Handle the single peeled
25687 iteration in that case.
25689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25690 Alan Hayward <alan.hayward@arm.com>
25691 David Sherwood <david.sherwood@arm.com>
25693 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25694 single-element interleaving even if the size is not a power of 2.
25695 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25696 accesses for single-element interleaving if the group size is
25699 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25700 Alan Hayward <alan.hayward@arm.com>
25701 David Sherwood <david.sherwood@arm.com>
25703 * doc/md.texi (fold_extract_last_@var{m}): Document.
25704 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25705 * optabs.def (fold_extract_last_optab): New optab.
25706 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25707 * internal-fn.c (fold_extract_direct): New macro.
25708 (expand_fold_extract_optab_fn): Likewise.
25709 (direct_fold_extract_optab_supported_p): Likewise.
25710 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25711 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25712 EXTRACT_LAST_REDUCTION.
25713 (get_initial_def_for_reduction): Do not create an initial vector
25714 for EXTRACT_LAST_REDUCTION reductions.
25715 (vectorizable_reduction): Leave the scalar phi in place for
25716 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25717 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25718 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25719 transform phase to vectorizable_condition.
25720 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25722 (vect_finish_stmt_generation): ...here.
25723 (vect_finish_replace_stmt): New function.
25724 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25725 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25727 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25729 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25730 Alan Hayward <alan.hayward@arm.com>
25731 David Sherwood <david.sherwood@arm.com>
25733 * doc/md.texi (extract_last_@var{m}): Document.
25734 * optabs.def (extract_last_optab): New optab.
25735 * internal-fn.def (EXTRACT_LAST): New internal function.
25736 * internal-fn.c (cond_unary_direct): New macro.
25737 (expand_cond_unary_optab_fn): Likewise.
25738 (direct_cond_unary_optab_supported_p): Likewise.
25739 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25740 loops using EXTRACT_LAST.
25741 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25742 (extract_last_<mode>): ...this optab.
25743 (vec_extract<mode><Vel>): Update accordingly.
25745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25746 Alan Hayward <alan.hayward@arm.com>
25747 David Sherwood <david.sherwood@arm.com>
25749 * target.def (empty_mask_is_expensive): New hook.
25750 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25751 * doc/tm.texi: Regenerate.
25752 * targhooks.h (default_empty_mask_is_expensive): Declare.
25753 * targhooks.c (default_empty_mask_is_expensive): New function.
25754 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25755 if the target says that empty masks are expensive.
25756 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25758 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25761 Alan Hayward <alan.hayward@arm.com>
25762 David Sherwood <david.sherwood@arm.com>
25764 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25765 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25766 (vect_use_loop_mask_for_alignment_p): New function.
25767 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25768 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25769 niters_skip argument. Make sure that the first niters_skip elements
25770 of the first iteration are inactive.
25771 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25772 Update call to vect_set_loop_masks_directly.
25773 (get_misalign_in_elems): New function, split out from...
25774 (vect_gen_prolog_loop_niters): ...here.
25775 (vect_update_init_of_dr): Take a code argument that specifies whether
25776 the adjustment should be added or subtracted.
25777 (vect_update_init_of_drs): Likewise.
25778 (vect_prepare_for_masked_peels): New function.
25779 (vect_do_peeling): Skip prologue peeling if we're using a mask
25780 instead. Update call to vect_update_inits_of_drs.
25781 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25783 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25784 alignment. Do not include the number of peeled iterations in
25785 the minimum threshold in that case.
25786 (vectorizable_induction): Adjust the start value down by
25787 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25788 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25789 Take the number of skipped iterations into account when calculating
25791 * tree-vect-stmts.c (vect_gen_while_not): New function.
25793 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25794 Alan Hayward <alan.hayward@arm.com>
25795 David Sherwood <david.sherwood@arm.com>
25797 * doc/sourcebuild.texi (vect_fully_masked): Document.
25798 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25799 default value to 0.
25800 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25802 (vect_analyze_loop_2): ...here. Don't check the vectorization
25803 factor against the number of loop iterations if the loop is
25806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25807 Alan Hayward <alan.hayward@arm.com>
25808 David Sherwood <david.sherwood@arm.com>
25810 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25811 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25812 (dump_groups): Update accordingly.
25813 (iv_use::mem_type): New member variable.
25814 (address_p): New function.
25815 (record_use): Add a mem_type argument and initialize the new
25817 (record_group_use): Add a mem_type argument. Use address_p.
25818 Remove obsolete null checks of base_object. Update call to record_use.
25819 (find_interesting_uses_op): Update call to record_group_use.
25820 (find_interesting_uses_cond): Likewise.
25821 (find_interesting_uses_address): Likewise.
25822 (get_mem_type_for_internal_fn): New function.
25823 (find_address_like_use): Likewise.
25824 (find_interesting_uses_stmt): Try find_address_like_use before
25825 calling find_interesting_uses_op.
25826 (addr_offset_valid_p): Use the iv mem_type field as the type
25827 of the addressed memory.
25828 (add_autoinc_candidates): Likewise.
25829 (get_address_cost): Likewise.
25830 (split_small_address_groups_p): Use address_p.
25831 (split_address_groups): Likewise.
25832 (add_iv_candidate_for_use): Likewise.
25833 (autoinc_possible_for_pair): Likewise.
25834 (rewrite_groups): Likewise.
25835 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25836 (determine_group_iv_cost): Update after split of USE_ADDRESS.
25837 (get_alias_ptr_type_for_ptr_address): New function.
25838 (rewrite_use_address): Rewrite address uses in calls that were
25839 identified by find_address_like_use.
25841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25842 Alan Hayward <alan.hayward@arm.com>
25843 David Sherwood <david.sherwood@arm.com>
25845 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25847 * gimple-expr.h (is_gimple_addressable: Likewise.
25848 * gimple-expr.c (is_gimple_address): Likewise.
25849 * internal-fn.c (expand_call_mem_ref): New function.
25850 (expand_mask_load_optab_fn): Use it.
25851 (expand_mask_store_optab_fn): Likewise.
25853 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25854 Alan Hayward <alan.hayward@arm.com>
25855 David Sherwood <david.sherwood@arm.com>
25857 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25858 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25859 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25860 (cond_umax@var{mode}): Document.
25861 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25862 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25863 (cond_umin_optab, cond_umax_optab): New optabs.
25864 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25865 (COND_IOR, COND_XOR): New internal functions.
25866 * internal-fn.h (get_conditional_internal_fn): Declare.
25867 * internal-fn.c (cond_binary_direct): New macro.
25868 (expand_cond_binary_optab_fn): Likewise.
25869 (direct_cond_binary_optab_supported_p): Likewise.
25870 (get_conditional_internal_fn): New function.
25871 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25872 Cope with reduction statements that are vectorized as calls rather
25874 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25875 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25876 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25877 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25878 (UNSPEC_COND_EOR): New unspecs.
25879 (optab): Add mappings for them.
25880 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25881 (sve_int_op, sve_fp_op): New int attributes.
25883 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25884 Alan Hayward <alan.hayward@arm.com>
25885 David Sherwood <david.sherwood@arm.com>
25887 * optabs.def (while_ult_optab): New optab.
25888 * doc/md.texi (while_ult@var{m}@var{n}): Document.
25889 * internal-fn.def (WHILE_ULT): New internal function.
25890 * internal-fn.h (direct_internal_fn_supported_p): New override
25891 that takes two types as argument.
25892 * internal-fn.c (while_direct): New macro.
25893 (expand_while_optab_fn): New function.
25894 (convert_optab_supported_p): Likewise.
25895 (direct_while_optab_supported_p): New macro.
25896 * wide-int.h (wi::udiv_ceil): New function.
25897 * tree-vectorizer.h (rgroup_masks): New structure.
25898 (vec_loop_masks): New typedef.
25899 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25900 and fully_masked_p.
25901 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25902 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25903 (vect_max_vf): New function.
25904 (slpeel_make_loop_iterate_ntimes): Delete.
25905 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25906 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25907 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25908 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25909 internal-fn.h, stor-layout.h and optabs-query.h.
25910 (vect_set_loop_mask): New function.
25911 (add_preheader_seq): Likewise.
25912 (add_header_seq): Likewise.
25913 (interleave_supported_p): Likewise.
25914 (vect_maybe_permute_loop_masks): Likewise.
25915 (vect_set_loop_masks_directly): Likewise.
25916 (vect_set_loop_condition_masked): Likewise.
25917 (vect_set_loop_condition_unmasked): New function, split out from
25918 slpeel_make_loop_iterate_ntimes.
25919 (slpeel_make_loop_iterate_ntimes): Rename to..
25920 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
25921 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25922 (vect_do_peeling): Update call accordingly.
25923 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25925 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25926 mask_compare_type, can_fully_mask_p and fully_masked_p.
25927 (release_vec_loop_masks): New function.
25928 (_loop_vec_info): Use it to free the loop masks.
25929 (can_produce_all_loop_masks_p): New function.
25930 (vect_get_max_nscalars_per_iter): Likewise.
25931 (vect_verify_full_masking): Likewise.
25932 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25933 retries, and free the mask rgroups before retrying. Check loop-wide
25934 reasons for disallowing fully-masked loops. Make the final decision
25935 about whether use a fully-masked loop or not.
25936 (vect_estimate_min_profitable_iters): Do not assume that peeling
25937 for the number of iterations will be needed for fully-masked loops.
25938 (vectorizable_reduction): Disable fully-masked loops.
25939 (vectorizable_live_operation): Likewise.
25940 (vect_halve_mask_nunits): New function.
25941 (vect_double_mask_nunits): Likewise.
25942 (vect_record_loop_mask): Likewise.
25943 (vect_get_loop_mask): Likewise.
25944 (vect_transform_loop): Handle the case in which the final loop
25945 iteration might handle a partial vector. Call vect_set_loop_condition
25946 instead of slpeel_make_loop_iterate_ntimes.
25947 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25948 (check_load_store_masking): New function.
25949 (prepare_load_store_mask): Likewise.
25950 (vectorizable_store): Handle fully-masked loops.
25951 (vectorizable_load): Likewise.
25952 (supportable_widening_operation): Use vect_halve_mask_nunits for
25954 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25955 (vect_gen_while): New function.
25956 * config/aarch64/aarch64.md (umax<mode>3): New expander.
25957 (aarch64_uqdec<mode>): New insn.
25959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25960 Alan Hayward <alan.hayward@arm.com>
25961 David Sherwood <david.sherwood@arm.com>
25963 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25964 (reduc_xor_scal_optab): New optabs.
25965 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25966 (reduc_xor_scal_@var{m}): Document.
25967 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25968 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25969 internal functions.
25970 * fold-const-call.c (fold_const_call): Handle them.
25971 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25972 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25973 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25974 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25975 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25976 (UNSPEC_XORV): New unspecs.
25977 (optab): Add entries for them.
25978 (BITWISEV): New int iterator.
25979 (bit_reduc_op): New int attributes.
25981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25982 Alan Hayward <alan.hayward@arm.com>
25983 David Sherwood <david.sherwood@arm.com>
25985 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25986 * internal-fn.def (VEC_SHL_INSERT): New internal function.
25987 * optabs.def (vec_shl_insert_optab): New optab.
25988 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25989 (duplicate_and_interleave): Likewise.
25990 * tree-vect-loop.c: Include internal-fn.h.
25991 (neutral_op_for_slp_reduction): New function, split out from
25992 get_initial_defs_for_reduction.
25993 (get_initial_def_for_reduction): Handle option 2 for variable-length
25994 vectors by loading the neutral value into a vector and then shifting
25995 the initial value into element 0.
25996 (get_initial_defs_for_reduction): Replace the code argument with
25997 the neutral value calculated by neutral_op_for_slp_reduction.
25998 Use gimple_build_vector for constant-length vectors.
25999 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26000 but the first group_size elements have a neutral value.
26001 Use duplicate_and_interleave otherwise.
26002 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26003 Update call to get_initial_defs_for_reduction. Handle SLP
26004 reductions for variable-length vectors by creating one vector
26005 result for each scalar result, with the elements associated
26006 with other scalar results stubbed out with the neutral value.
26007 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26008 Require IFN_VEC_SHL_INSERT for double reductions on
26009 variable-length vectors, or SLP reductions that have
26010 a neutral value. Require can_duplicate_and_interleave_p
26011 support for variable-length unchained SLP reductions if there
26012 is no neutral value, such as for MIN/MAX reductions. Also require
26013 the number of vector elements to be a multiple of the number of
26014 SLP statements when doing variable-length unchained SLP reductions.
26015 Update call to vect_create_epilog_for_reduction.
26016 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26017 and remove initial values.
26018 (duplicate_and_interleave): Make public.
26019 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26020 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26022 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26023 Alan Hayward <alan.hayward@arm.com>
26024 David Sherwood <david.sherwood@arm.com>
26026 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26027 (can_duplicate_and_interleave_p): New function.
26028 (vect_get_and_check_slp_defs): Take the vector of statements
26029 rather than just the current one. Remove excess parentheses.
26030 Restriction rejectinon of vect_constant_def and vect_external_def
26031 for variable-length vectors to boolean types, or types for which
26032 can_duplicate_and_interleave_p is false.
26033 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26034 (duplicate_and_interleave): New function.
26035 (vect_get_constant_vectors): Use gimple_build_vector for
26036 constant-length vectors and suitable variable-length constant
26037 vectors. Use duplicate_and_interleave for other variable-length
26038 vectors. Don't defer the update when inserting new statements.
26040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26041 Alan Hayward <alan.hayward@arm.com>
26042 David Sherwood <david.sherwood@arm.com>
26044 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26045 min_profitable_iters doesn't go negative.
26047 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26048 Alan Hayward <alan.hayward@arm.com>
26049 David Sherwood <david.sherwood@arm.com>
26051 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26052 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26053 * optabs.def (vec_mask_load_lanes_optab): New optab.
26054 (vec_mask_store_lanes_optab): Likewise.
26055 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26056 (MASK_STORE_LANES): Likewise.
26057 * internal-fn.c (mask_load_lanes_direct): New macro.
26058 (mask_store_lanes_direct): Likewise.
26059 (expand_mask_load_optab_fn): Handle masked operations.
26060 (expand_mask_load_lanes_optab_fn): New macro.
26061 (expand_mask_store_optab_fn): Handle masked operations.
26062 (expand_mask_store_lanes_optab_fn): New macro.
26063 (direct_mask_load_lanes_optab_supported_p): Likewise.
26064 (direct_mask_store_lanes_optab_supported_p): Likewise.
26065 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26067 (vect_load_lanes_supported): Likewise.
26068 * tree-vect-data-refs.c (strip_conversion): New function.
26069 (can_group_stmts_p): Likewise.
26070 (vect_analyze_data_ref_accesses): Use it instead of checking
26071 for a pair of assignments.
26072 (vect_store_lanes_supported): Take a masked_p parameter.
26073 (vect_load_lanes_supported): Likewise.
26074 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26075 vect_store_lanes_supported and vect_load_lanes_supported.
26076 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26077 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26078 parameter. Don't allow gaps for masked accesses.
26079 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26080 and vect_load_lanes_supported.
26081 (get_load_store_type): Take a masked_p parameter and update
26082 call to get_group_load_store_type.
26083 (vectorizable_store): Update call to get_load_store_type.
26084 Handle IFN_MASK_STORE_LANES.
26085 (vectorizable_load): Update call to get_load_store_type.
26086 Handle IFN_MASK_LOAD_LANES.
26088 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26089 Alan Hayward <alan.hayward@arm.com>
26090 David Sherwood <david.sherwood@arm.com>
26092 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26094 * config/aarch64/aarch64-protos.h
26095 (aarch64_sve_struct_memory_operand_p): Declare.
26096 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26097 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26098 (VPRED, vpred): Handle SVE structure modes.
26099 * config/aarch64/constraints.md (Utx): New constraint.
26100 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26101 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26102 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26103 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26104 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26105 structure modes. Split into pieces after RA.
26106 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26107 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26109 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26110 SVE structure modes.
26111 (aarch64_classify_address): Likewise.
26112 (sizetochar): Move earlier in file.
26113 (aarch64_print_operand): Handle SVE register lists.
26114 (aarch64_array_mode): New function.
26115 (aarch64_sve_struct_memory_operand_p): Likewise.
26116 (TARGET_ARRAY_MODE): Redefine.
26118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26119 Alan Hayward <alan.hayward@arm.com>
26120 David Sherwood <david.sherwood@arm.com>
26122 * target.def (array_mode): New target hook.
26123 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26124 * doc/tm.texi: Regenerate.
26125 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26126 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26127 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26128 targetm.array_mode.
26129 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26132 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26133 Alan Hayward <alan.hayward@arm.com>
26134 David Sherwood <david.sherwood@arm.com>
26136 * fold-const.c (fold_binary_loc): Check the argument types
26137 rather than the result type when testing for a vector operation.
26139 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26141 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26142 * doc/tm.texi: Regenerate.
26144 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26145 Alan Hayward <alan.hayward@arm.com>
26146 David Sherwood <david.sherwood@arm.com>
26148 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26149 (sve): Document new AArch64 extension.
26150 * doc/md.texi (w): Extend the description of the AArch64
26151 constraint to include SVE vectors.
26152 (Upl, Upa): Document new AArch64 predicate constraints.
26153 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26155 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26156 (msve-vector-bits=): New option.
26157 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26158 SVE when these are disabled.
26159 (sve): New extension.
26160 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26161 modes. Adjust their number of units based on aarch64_sve_vg.
26162 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26163 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26164 aarch64_addr_query_type.
26165 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26166 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26167 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26168 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26169 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26170 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26171 (aarch64_simd_imm_zero_p): Delete.
26172 (aarch64_check_zero_based_sve_index_immediate): Declare.
26173 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26174 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26175 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26176 (aarch64_sve_float_mul_immediate_p): Likewise.
26177 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26178 rather than an rtx.
26179 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26180 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26181 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26182 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26183 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26184 (aarch64_regmode_natural_size): Likewise.
26185 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26186 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26188 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26189 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26190 for VG and the SVE predicate registers.
26191 (V_ALIASES): Add a "z"-prefixed alias.
26192 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26193 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26194 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26195 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26196 (REG_CLASS_NAMES): Add entries for them.
26197 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26198 and the predicate registers.
26199 (aarch64_sve_vg): Declare.
26200 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26201 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26202 (REGMODE_NATURAL_SIZE): Define.
26203 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26205 * config/aarch64/aarch64.c: Include cfgrtl.h.
26206 (simd_immediate_info): Add a constructor for series vectors,
26207 and an associated step field.
26208 (aarch64_sve_vg): New variable.
26209 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26210 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26211 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26212 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26213 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26214 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26215 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26216 (aarch64_get_mask_mode): New functions.
26217 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26218 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26219 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26220 predicate modes and predicate registers. Explicitly restrict
26221 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26222 to store a vector mode if it is recognized by
26223 aarch64_classify_vector_mode.
26224 (aarch64_regmode_natural_size): New function.
26225 (aarch64_hard_regno_caller_save_mode): Return the original mode
26227 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26228 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26229 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26230 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26232 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26233 does not overlap dest if the function is frame-related. Handle
26235 (aarch64_split_add_offset): New function.
26236 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26237 them aarch64_add_offset.
26238 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26239 and update call to aarch64_sub_sp.
26240 (aarch64_add_cfa_expression): New function.
26241 (aarch64_expand_prologue): Pass extra temporary registers to the
26242 functions above. Handle the case in which we need to emit new
26243 DW_CFA_expressions for registers that were originally saved
26244 relative to the stack pointer, but now have to be expressed
26245 relative to the frame pointer.
26246 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26248 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26249 IP0 and IP1 values for SVE frames.
26250 (aarch64_expand_vec_series): New function.
26251 (aarch64_expand_sve_widened_duplicate): Likewise.
26252 (aarch64_expand_sve_const_vector): Likewise.
26253 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26254 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26255 into the register, rather than emitting a SET directly.
26256 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26257 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26258 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26259 (offset_9bit_signed_scaled_p): New functions.
26260 (aarch64_replicate_bitmask_imm): New function.
26261 (aarch64_bitmask_imm): Use it.
26262 (aarch64_cannot_force_const_mem): Reject expressions involving
26263 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26264 (aarch64_classify_index): Handle SVE indices, by requiring
26265 a plain register index with a scale that matches the element size.
26266 (aarch64_classify_address): Handle SVE addresses. Assert that
26267 the mode of the address is VOIDmode or an integer mode.
26268 Update call to aarch64_classify_symbol.
26269 (aarch64_classify_symbolic_expression): Update call to
26270 aarch64_classify_symbol.
26271 (aarch64_const_vec_all_in_range_p): New function.
26272 (aarch64_print_vector_float_operand): Likewise.
26273 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26274 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26275 and the FP immediates 1.0 and 0.5.
26276 (aarch64_print_address_internal): Handle SVE addresses.
26277 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26278 (aarch64_regno_regclass): Handle predicate registers.
26279 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26281 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26282 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26283 (aarch64_convert_sve_vector_bits): New function.
26284 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26285 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26286 rather than an rtx.
26287 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26288 Handle SVE vector and predicate modes. Accept VL-based constants
26289 that need only one temporary register, and VL offsets that require
26290 no temporary registers.
26291 (aarch64_conditional_register_usage): Mark the predicate registers
26292 as fixed if SVE isn't available.
26293 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26294 Return true for SVE vector and predicate modes.
26295 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26296 rather than an unsigned int. Handle SVE modes.
26297 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26299 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26301 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26302 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26303 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26304 (aarch64_sve_float_mul_immediate_p): New functions.
26305 (aarch64_sve_valid_immediate): New function.
26306 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26307 Explicitly reject structure modes. Check for INDEX constants.
26308 Handle PTRUE and PFALSE constants.
26309 (aarch64_check_zero_based_sve_index_immediate): New function.
26310 (aarch64_simd_imm_zero_p): Delete.
26311 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26312 vector modes. Accept constants in the range of CNT[BHWD].
26313 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26314 ask for an Advanced SIMD mode.
26315 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26316 (aarch64_simd_vector_alignment): Handle SVE predicates.
26317 (aarch64_vectorize_preferred_vector_alignment): New function.
26318 (aarch64_simd_vector_alignment_reachable): Use it instead of
26320 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26321 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26323 (MAX_VECT_LEN): Delete.
26324 (expand_vec_perm_d): Add a vec_flags field.
26325 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26326 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26327 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26329 (aarch64_evpc_rev): Rename to...
26330 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26331 (aarch64_evpc_rev_global): New function.
26332 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26333 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26335 (aarch64_evpc_sve_tbl): New function.
26336 (aarch64_expand_vec_perm_const_1): Update after rename of
26337 aarch64_evpc_rev. Handle SVE permutes too, trying
26338 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26339 than aarch64_evpc_tbl.
26340 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26341 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26342 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26343 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26344 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26345 (aarch64_expand_sve_vcond): New functions.
26346 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26347 of aarch64_vector_mode_p.
26348 (aarch64_dwarf_poly_indeterminate_value): New function.
26349 (aarch64_compute_pressure_classes): Likewise.
26350 (aarch64_can_change_mode_class): Likewise.
26351 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26352 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26353 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26354 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26355 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26356 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26357 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26358 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26360 (Dn, Dl, Dr): Accept const as well as const_vector.
26361 (Dz): Likewise. Compare against CONST0_RTX.
26362 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26363 of "vector" where appropriate.
26364 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26365 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26366 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26367 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26368 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26369 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26370 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26371 (v_int_equiv): Extend to SVE modes.
26372 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26374 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26375 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26376 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26377 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26378 (SVE_COND_FP_CMP): New int iterators.
26379 (perm_hilo): Handle the new unpack unspecs.
26380 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26382 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26383 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26384 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26385 (aarch64_equality_operator, aarch64_constant_vector_operand)
26386 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26387 (aarch64_sve_nonimmediate_operand): Likewise.
26388 (aarch64_sve_general_operand): Likewise.
26389 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26390 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26391 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26392 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26393 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26394 (aarch64_sve_float_arith_immediate): Likewise.
26395 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26396 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26397 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26398 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26399 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26400 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26401 (aarch64_sve_float_arith_operand): Likewise.
26402 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26403 (aarch64_sve_float_mul_operand): Likewise.
26404 (aarch64_sve_vec_perm_operand): Likewise.
26405 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26406 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26407 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26408 as well as const_vector.
26409 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26410 in file. Use CONST0_RTX and CONSTM1_RTX.
26411 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26412 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26413 Use aarch64_simd_imm_zero.
26414 * config/aarch64/aarch64-sve.md: New file.
26415 * config/aarch64/aarch64.md: Include it.
26416 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26417 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26418 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26419 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26420 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26421 (sve): New attribute.
26422 (enabled): Disable instructions with the sve attribute unless
26424 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26425 aarch64_expand_mov_immediate.
26426 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26427 CNT[BHSD] immediates.
26428 (movti): Split CONST_POLY_INT moves into two halves.
26429 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26430 Split additions that need a temporary here if the destination
26431 is the stack pointer.
26432 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26433 (*add<mode>3_poly_1): New instruction.
26434 (set_clobber_cc): New expander.
26436 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26438 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26439 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26440 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26441 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26442 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26443 Change innermode from fixed_mode_size to machine_mode.
26444 (simplify_subreg): Update call accordingly. Handle a constant-sized
26445 subreg of a variable-length CONST_VECTOR.
26447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26448 Alan Hayward <alan.hayward@arm.com>
26449 David Sherwood <david.sherwood@arm.com>
26451 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26452 (add_offset_to_base): New function, split out from...
26453 (create_mem_ref): ...here. When handling a scale other than 1,
26454 check first whether the address is valid without the offset.
26455 Add it into the base if so, leaving the index and scale as-is.
26457 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26460 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26461 fold_for_warn before checking if arg2 is INTEGER_CST.
26463 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26465 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26466 (store_multiple_operation): Delete.
26467 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26468 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26469 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26470 guarded by TARGET_STRING.
26471 (rs6000_output_load_multiple): Delete.
26472 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26473 OPTION_MASK_STRING / TARGET_STRING handling.
26474 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26475 (const rs6000_opt_masks) <"string">: Change mask to 0.
26476 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26477 (MASK_STRING): Delete.
26478 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26480 (load_multiple): Delete.
26487 (store_multiple): Delete.
26494 (movmemsi_8reg): Delete.
26495 (corresponding unnamed define_insn): Delete.
26496 (movmemsi_6reg): Delete.
26497 (corresponding unnamed define_insn): Delete.
26498 (movmemsi_4reg): Delete.
26499 (corresponding unnamed define_insn): Delete.
26500 (movmemsi_2reg): Delete.
26501 (corresponding unnamed define_insn): Delete.
26502 (movmemsi_1reg): Delete.
26503 (corresponding unnamed define_insn): Delete.
26504 * config/rs6000/rs6000.opt (mno-string): New.
26505 (mstring): Replace by deprecation warning stub.
26506 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26508 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26510 * regrename.c (regrename_do_replace): If replacing the same
26511 reg multiple times, try to reuse last created gen_raw_REG.
26514 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26515 main to workaround a bug in GDB.
26517 2018-01-12 Tom de Vries <tom@codesourcery.com>
26520 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26522 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26524 PR rtl-optimization/80481
26525 * ira-color.c (get_cap_member): New function.
26526 (allocnos_conflict_by_live_ranges_p): Use it.
26527 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26528 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26530 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26533 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26534 (*saddl_se_1): Ditto.
26535 (*ssubsi_1): Ditto.
26536 (*ssubl_se_1): Ditto.
26538 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26540 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26541 rather than wi::to_widest for DR_INITs.
26542 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26543 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26544 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26546 (vect_analyze_group_access_1): Note that here.
26548 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26550 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26551 polynomial type sizes.
26553 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26555 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26556 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26557 (gimple_add_tmp_var): Likewise.
26559 2018-01-12 Martin Liska <mliska@suse.cz>
26561 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26562 (gimple_alloc_sizes): Likewise.
26563 (dump_gimple_statistics): Use PRIu64 in printf format.
26564 * gimple.h: Change uint64_t to int.
26566 2018-01-12 Martin Liska <mliska@suse.cz>
26568 * tree-core.h: Use uint64_t instead of int.
26569 * tree.c (tree_node_counts): Likewise.
26570 (tree_node_sizes): Likewise.
26571 (dump_tree_statistics): Use PRIu64 in printf format.
26573 2018-01-12 Martin Liska <mliska@suse.cz>
26575 * Makefile.in: As qsort_chk is implemented in vec.c, add
26576 vec.o to linkage of gencfn-macros.
26577 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26578 passing the info to record_node_allocation_statistics.
26579 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26581 * ggc-common.c (struct ggc_usage): Add operator== and use
26582 it in operator< and compare function.
26583 * mem-stats.h (struct mem_usage): Likewise.
26584 * vec.c (struct vec_usage): Remove operator< and compare
26585 function. Can be simply inherited.
26587 2018-01-12 Martin Jambor <mjambor@suse.cz>
26590 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26591 * tree-ssa-math-opts.c: Include domwalk.h.
26592 (convert_mult_to_fma_1): New function.
26593 (fma_transformation_info): New type.
26594 (fma_deferring_state): Likewise.
26595 (cancel_fma_deferring): New function.
26596 (result_of_phi): Likewise.
26597 (last_fma_candidate_feeds_initial_phi): Likewise.
26598 (convert_mult_to_fma): Added deferring logic, split actual
26599 transformation to convert_mult_to_fma_1.
26600 (math_opts_dom_walker): New type.
26601 (math_opts_dom_walker::after_dom_children): New method, body moved
26602 here from pass_optimize_widening_mul::execute, added deferring logic
26604 (pass_optimize_widening_mul::execute): Moved most of code to
26605 math_opts_dom_walker::after_dom_children.
26606 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26607 * config/i386/i386.c (ix86_option_override_internal): Added
26608 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26610 2018-01-12 Richard Biener <rguenther@suse.de>
26613 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26614 inline instance vars.
26616 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26619 * config/rx/rx.c (rx_is_restricted_memory_address):
26620 Handle SUBREG case.
26622 2018-01-12 Richard Biener <rguenther@suse.de>
26624 PR tree-optimization/80846
26625 * target.def (split_reduction): New target hook.
26626 * targhooks.c (default_split_reduction): New function.
26627 * targhooks.h (default_split_reduction): Declare.
26628 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26629 target requests first reduce vectors by combining low and high
26631 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26632 (get_vectype_for_scalar_type_and_size): Export.
26633 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26634 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26635 * doc/tm.texi: Regenerate.
26636 * config/i386/i386.c (ix86_split_reduction): Implement
26637 TARGET_VECTORIZE_SPLIT_REDUCTION.
26639 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26642 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26643 in PIC mode except for TARGET_VXWORKS_RTP.
26644 * config/sparc/sparc.c: Include cfgrtl.h.
26645 (TARGET_INIT_PIC_REG): Define.
26646 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26647 (sparc_pic_register_p): New predicate.
26648 (sparc_legitimate_address_p): Use it.
26649 (sparc_legitimize_pic_address): Likewise.
26650 (sparc_delegitimize_address): Likewise.
26651 (sparc_mode_dependent_address_p): Likewise.
26652 (gen_load_pcrel_sym): Remove 4th parameter.
26653 (load_got_register): Adjust call to above. Remove obsolete stuff.
26654 (sparc_expand_prologue): Do not call load_got_register here.
26655 (sparc_flat_expand_prologue): Likewise.
26656 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26657 (sparc_use_pseudo_pic_reg): New function.
26658 (sparc_init_pic_reg): Likewise.
26659 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26660 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26662 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26664 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26665 Add item for branch_cost.
26667 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26669 PR rtl-optimization/83565
26670 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26671 not extend the result to a larger mode for rotate operations.
26672 (num_sign_bit_copies1): Likewise.
26674 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26677 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26679 Use values-Xc.o for -pedantic.
26680 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26682 2018-01-12 Martin Liska <mliska@suse.cz>
26685 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26687 (possible_polymorphic_call_targets): Use it.
26688 (ipa_devirt): Likewise.
26690 2018-01-12 Martin Liska <mliska@suse.cz>
26692 * profile-count.h (enum profile_quality): Use 0 as invalid
26693 enum value of profile_quality.
26695 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26697 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26698 -mext-string options.
26700 2018-01-12 Richard Biener <rguenther@suse.de>
26702 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26703 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26704 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26706 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26708 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26710 * configure.ac (--with-long-double-format): Add support for the
26711 configuration option to change the default long double format on
26713 * config.gcc (powerpc*-linux*-*): Likewise.
26714 * configure: Regenerate.
26715 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26716 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26717 used without modification.
26719 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26721 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26722 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26723 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26724 MISC_BUILTIN_SPEC_BARRIER.
26725 (rs6000_init_builtins): Likewise.
26726 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26728 (speculation_barrier): New define_insn.
26729 * doc/extend.texi: Document __builtin_speculation_barrier.
26731 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26734 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26735 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26736 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26738 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26739 integral modes instead of "ss" and "sd".
26740 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26741 vectors with 32-bit and 64-bit elements.
26742 (vecdupssescalarmodesuffix): New mode attribute.
26743 (vec_dup<mode>): Use it.
26745 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26748 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26749 frame if argument is passed on stack.
26751 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26754 * ree.c (combine_reaching_defs): Optimize also
26755 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26756 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26758 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26760 PR middle-end/83189
26761 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26763 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26765 PR middle-end/83718
26766 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26767 after they are computed.
26769 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26771 PR tree-optimization/83695
26772 * gimple-loop-linterchange.cc
26773 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26774 reset cached scev information after interchange.
26775 (pass_linterchange::execute): Remove call to scev_reset_htab.
26777 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26779 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26780 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26781 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26782 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26783 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26784 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26785 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26786 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26787 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26788 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26789 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26790 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26791 (V_lane_reg): Likewise.
26792 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26794 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26795 (vfmal_lane_low<mode>_intrinsic,
26796 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26797 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26798 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26799 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26800 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26801 vfmsl_lane_high<mode>_intrinsic): New define_insns.
26803 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26805 * config/arm/arm-cpus.in (fp16fml): New feature.
26806 (ALL_SIMD): Add fp16fml.
26807 (armv8.2-a): Add fp16fml as an option.
26808 (armv8.3-a): Likewise.
26809 (armv8.4-a): Add fp16fml as part of fp16.
26810 * config/arm/arm.h (TARGET_FP16FML): Define.
26811 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26813 * config/arm/arm-modes.def (V2HF): Define.
26814 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26815 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26816 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26817 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26818 vfmsl_low, vfmsl_high): New set of builtins.
26819 * config/arm/iterators.md (PLUSMINUS): New code iterator.
26820 (vfml_op): New code attribute.
26821 (VFMLHALVES): New int iterator.
26822 (VFML, VFMLSEL): New mode attributes.
26823 (V_reg): Define mapping for V2HF.
26824 (V_hi, V_lo): New mode attributes.
26825 (VF_constraint): Likewise.
26826 (vfml_half, vfml_half_selector): New int attributes.
26827 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26829 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26830 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26832 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26833 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26834 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26835 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
26837 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26838 Document new effective target and option set.
26840 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26842 * config/arm/arm-cpus.in (armv8_4): New feature.
26843 (ARMv8_4a): New fgroup.
26844 (armv8.4-a): New arch.
26845 * config/arm/arm-tables.opt: Regenerate.
26846 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26847 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26848 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26849 Add matching rules for -march=armv8.4-a and extensions.
26850 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26852 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
26855 * config/rx/rx.md (BW): New mode attribute.
26856 (sync_lock_test_and_setsi): Add mode suffix to insn output.
26858 2018-01-11 Richard Biener <rguenther@suse.de>
26860 PR tree-optimization/83435
26861 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26862 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26863 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26865 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26866 Alan Hayward <alan.hayward@arm.com>
26867 David Sherwood <david.sherwood@arm.com>
26869 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26871 (aarch64_classify_address): Initialize it. Track polynomial offsets.
26872 (aarch64_print_address_internal): Use it to check for a zero offset.
26874 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26875 Alan Hayward <alan.hayward@arm.com>
26876 David Sherwood <david.sherwood@arm.com>
26878 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26879 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26880 Return a poly_int64 rather than a HOST_WIDE_INT.
26881 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26882 rather than a HOST_WIDE_INT.
26883 * config/aarch64/aarch64.h (aarch64_frame): Protect with
26884 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
26885 hard_fp_offset, frame_size, initial_adjust, callee_offset and
26886 final_offset from HOST_WIDE_INT to poly_int64.
26887 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26888 to_constant when getting the number of units in an Advanced SIMD
26890 (aarch64_builtin_vectorized_function): Check for a constant number
26892 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26894 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26895 attribute instead of GET_MODE_NUNITS.
26896 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26897 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26898 GET_MODE_SIZE for fixed-size registers.
26899 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26900 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26901 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26902 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26903 (aarch64_print_operand, aarch64_print_address_internal)
26904 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26905 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26906 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26907 Handle polynomial GET_MODE_SIZE.
26908 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
26909 wider than SImode without modification.
26910 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26911 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26912 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26913 passing and returning SVE modes.
26914 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26915 rather than GEN_INT.
26916 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26917 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26918 (aarch64_allocate_and_probe_stack_space): Likewise.
26919 (aarch64_layout_frame): Cope with polynomial offsets.
26920 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26921 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
26922 polynomial offsets.
26923 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26924 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26925 poly_int64 rather than a HOST_WIDE_INT.
26926 (aarch64_get_separate_components, aarch64_process_components)
26927 (aarch64_expand_prologue, aarch64_expand_epilogue)
26928 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26929 (aarch64_anchor_offset): New function, split out from...
26930 (aarch64_legitimize_address): ...here.
26931 (aarch64_builtin_vectorization_cost): Handle polynomial
26932 TYPE_VECTOR_SUBPARTS.
26933 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26935 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26936 number of elements from the PARALLEL rather than the mode.
26937 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26938 rather than GET_MODE_BITSIZE.
26939 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26940 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26941 (aarch64_expand_vec_perm_const_1): Handle polynomial
26942 d->perm.length () and d->perm elements.
26943 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
26944 Apply to_constant to d->perm elements.
26945 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26946 polynomial CONST_VECTOR_NUNITS.
26947 (aarch64_move_pointer): Take amount as a poly_int64 rather
26949 (aarch64_progress_pointer): Avoid temporary variable.
26950 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26951 the mode attribute instead of GET_MODE.
26953 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26954 Alan Hayward <alan.hayward@arm.com>
26955 David Sherwood <david.sherwood@arm.com>
26957 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26958 x exists before using it.
26959 (aarch64_add_constant_internal): Rename to...
26960 (aarch64_add_offset_1): ...this. Replace regnum with separate
26961 src and dest rtxes. Handle the case in which they're different,
26962 including when the offset is zero. Replace scratchreg with an rtx.
26963 Use 2 additions if there is no spare register into which we can
26964 move a 16-bit constant.
26965 (aarch64_add_constant): Delete.
26966 (aarch64_add_offset): Replace reg with separate src and dest
26967 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
26968 Use aarch64_add_offset_1.
26969 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26970 an rtx rather than an int. Take the delta as a poly_int64
26971 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
26972 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26973 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26974 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26975 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26976 and aarch64_add_sp.
26977 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26978 aarch64_add_constant.
26980 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26982 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26983 Use scalar_float_mode.
26985 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26987 * config/aarch64/aarch64-simd.md
26988 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26989 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26990 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26991 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26992 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26993 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26994 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26995 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26996 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26997 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26999 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27002 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27003 targ_options->x_arm_arch_string is non NULL.
27005 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27007 * config/aarch64/aarch64.h
27008 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27010 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27013 * expmed.c (emit_store_flag_force): Swap if const op0
27014 and change VOIDmode to mode of op0.
27016 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27018 PR rtl-optimization/83761
27019 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27020 than bytes to mode_for_size.
27022 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27024 PR middle-end/83189
27025 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27026 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27029 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27031 PR middle-end/83575
27032 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27033 when in layout mode.
27034 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27035 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27038 2018-01-10 Michael Collison <michael.collison@arm.com>
27040 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27041 * config/aarch64/aarch64-option-extension.def: Add
27042 AARCH64_OPT_EXTENSION of 'fp16fml'.
27043 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27044 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27045 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27046 * config/aarch64/constraints.md (Ui7): New constraint.
27047 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27048 (VFMLA_SEL_W): Ditto.
27051 (VFMLA16_LOW): New int iterator.
27052 (VFMLA16_HIGH): Ditto.
27053 (UNSPEC_FMLAL): New unspec.
27054 (UNSPEC_FMLSL): Ditto.
27055 (UNSPEC_FMLAL2): Ditto.
27056 (UNSPEC_FMLSL2): Ditto.
27057 (f16mac): New code attribute.
27058 * config/aarch64/aarch64-simd-builtins.def
27059 (aarch64_fmlal_lowv2sf): Ditto.
27060 (aarch64_fmlsl_lowv2sf): Ditto.
27061 (aarch64_fmlalq_lowv4sf): Ditto.
27062 (aarch64_fmlslq_lowv4sf): Ditto.
27063 (aarch64_fmlal_highv2sf): Ditto.
27064 (aarch64_fmlsl_highv2sf): Ditto.
27065 (aarch64_fmlalq_highv4sf): Ditto.
27066 (aarch64_fmlslq_highv4sf): Ditto.
27067 (aarch64_fmlal_lane_lowv2sf): Ditto.
27068 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27069 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27070 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27071 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27072 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27073 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27074 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27075 (aarch64_fmlal_lane_highv2sf): Ditto.
27076 (aarch64_fmlsl_lane_highv2sf): Ditto.
27077 (aarch64_fmlal_laneq_highv2sf): Ditto.
27078 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27079 (aarch64_fmlalq_lane_highv4sf): Ditto.
27080 (aarch64_fmlsl_lane_highv4sf): Ditto.
27081 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27082 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27083 * config/aarch64/aarch64-simd.md:
27084 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27085 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27086 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27087 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27088 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27089 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27090 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27091 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27092 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27093 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27094 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27095 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27096 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27097 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27098 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27099 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27100 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27101 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27102 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27103 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27104 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27105 (vfmlsl_low_u32): Ditto.
27106 (vfmlalq_low_u32): Ditto.
27107 (vfmlslq_low_u32): Ditto.
27108 (vfmlal_high_u32): Ditto.
27109 (vfmlsl_high_u32): Ditto.
27110 (vfmlalq_high_u32): Ditto.
27111 (vfmlslq_high_u32): Ditto.
27112 (vfmlal_lane_low_u32): Ditto.
27113 (vfmlsl_lane_low_u32): Ditto.
27114 (vfmlal_laneq_low_u32): Ditto.
27115 (vfmlsl_laneq_low_u32): Ditto.
27116 (vfmlalq_lane_low_u32): Ditto.
27117 (vfmlslq_lane_low_u32): Ditto.
27118 (vfmlalq_laneq_low_u32): Ditto.
27119 (vfmlslq_laneq_low_u32): Ditto.
27120 (vfmlal_lane_high_u32): Ditto.
27121 (vfmlsl_lane_high_u32): Ditto.
27122 (vfmlal_laneq_high_u32): Ditto.
27123 (vfmlsl_laneq_high_u32): Ditto.
27124 (vfmlalq_lane_high_u32): Ditto.
27125 (vfmlslq_lane_high_u32): Ditto.
27126 (vfmlalq_laneq_high_u32): Ditto.
27127 (vfmlslq_laneq_high_u32): Ditto.
27128 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27129 (AARCH64_FL_FOR_ARCH8_4): New.
27130 (AARCH64_ISA_F16FML): New ISA flag.
27131 (TARGET_F16FML): New feature flag for fp16fml.
27132 (doc/invoke.texi): Document new fp16fml option.
27134 2018-01-10 Michael Collison <michael.collison@arm.com>
27136 * config/aarch64/aarch64-builtins.c:
27137 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27138 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27139 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27140 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27141 (AARCH64_ISA_SHA3): New ISA flag.
27142 (TARGET_SHA3): New feature flag for sha3.
27143 * config/aarch64/iterators.md (sha512_op): New int attribute.
27144 (CRYPTO_SHA512): New int iterator.
27145 (UNSPEC_SHA512H): New unspec.
27146 (UNSPEC_SHA512H2): Ditto.
27147 (UNSPEC_SHA512SU0): Ditto.
27148 (UNSPEC_SHA512SU1): Ditto.
27149 * config/aarch64/aarch64-simd-builtins.def
27150 (aarch64_crypto_sha512hqv2di): New builtin.
27151 (aarch64_crypto_sha512h2qv2di): Ditto.
27152 (aarch64_crypto_sha512su0qv2di): Ditto.
27153 (aarch64_crypto_sha512su1qv2di): Ditto.
27154 (aarch64_eor3qv8hi): Ditto.
27155 (aarch64_rax1qv2di): Ditto.
27156 (aarch64_xarqv2di): Ditto.
27157 (aarch64_bcaxqv8hi): Ditto.
27158 * config/aarch64/aarch64-simd.md:
27159 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27160 (aarch64_crypto_sha512su0qv2di): Ditto.
27161 (aarch64_crypto_sha512su1qv2di): Ditto.
27162 (aarch64_eor3qv8hi): Ditto.
27163 (aarch64_rax1qv2di): Ditto.
27164 (aarch64_xarqv2di): Ditto.
27165 (aarch64_bcaxqv8hi): Ditto.
27166 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27167 (vsha512h2q_u64): Ditto.
27168 (vsha512su0q_u64): Ditto.
27169 (vsha512su1q_u64): Ditto.
27170 (veor3q_u16): Ditto.
27171 (vrax1q_u64): Ditto.
27172 (vxarq_u64): Ditto.
27173 (vbcaxq_u16): Ditto.
27174 * config/arm/types.md (crypto_sha512): New type attribute.
27175 (crypto_sha3): Ditto.
27176 (doc/invoke.texi): Document new sha3 option.
27178 2018-01-10 Michael Collison <michael.collison@arm.com>
27180 * config/aarch64/aarch64-builtins.c:
27181 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27182 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27183 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27184 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27185 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27186 (AARCH64_ISA_SM4): New ISA flag.
27187 (TARGET_SM4): New feature flag for sm4.
27188 * config/aarch64/aarch64-simd-builtins.def
27189 (aarch64_sm3ss1qv4si): Ditto.
27190 (aarch64_sm3tt1aq4si): Ditto.
27191 (aarch64_sm3tt1bq4si): Ditto.
27192 (aarch64_sm3tt2aq4si): Ditto.
27193 (aarch64_sm3tt2bq4si): Ditto.
27194 (aarch64_sm3partw1qv4si): Ditto.
27195 (aarch64_sm3partw2qv4si): Ditto.
27196 (aarch64_sm4eqv4si): Ditto.
27197 (aarch64_sm4ekeyqv4si): Ditto.
27198 * config/aarch64/aarch64-simd.md:
27199 (aarch64_sm3ss1qv4si): Ditto.
27200 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27201 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27202 (aarch64_sm4eqv4si): Ditto.
27203 (aarch64_sm4ekeyqv4si): Ditto.
27204 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27205 (sm3part_op): Ditto.
27206 (CRYPTO_SM3TT): Ditto.
27207 (CRYPTO_SM3PART): Ditto.
27208 (UNSPEC_SM3SS1): New unspec.
27209 (UNSPEC_SM3TT1A): Ditto.
27210 (UNSPEC_SM3TT1B): Ditto.
27211 (UNSPEC_SM3TT2A): Ditto.
27212 (UNSPEC_SM3TT2B): Ditto.
27213 (UNSPEC_SM3PARTW1): Ditto.
27214 (UNSPEC_SM3PARTW2): Ditto.
27215 (UNSPEC_SM4E): Ditto.
27216 (UNSPEC_SM4EKEY): Ditto.
27217 * config/aarch64/constraints.md (Ui2): New constraint.
27218 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27219 * config/arm/types.md (crypto_sm3): New type attribute.
27220 (crypto_sm4): Ditto.
27221 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27222 (vsm3tt1aq_u32): Ditto.
27223 (vsm3tt1bq_u32): Ditto.
27224 (vsm3tt2aq_u32): Ditto.
27225 (vsm3tt2bq_u32): Ditto.
27226 (vsm3partw1q_u32): Ditto.
27227 (vsm3partw2q_u32): Ditto.
27228 (vsm4eq_u32): Ditto.
27229 (vsm4ekeyq_u32): Ditto.
27230 (doc/invoke.texi): Document new sm4 option.
27232 2018-01-10 Michael Collison <michael.collison@arm.com>
27234 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27235 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27236 (AARCH64_FL_FOR_ARCH8_4): New.
27237 (AARCH64_FL_V8_4): New flag.
27238 (doc/invoke.texi): Document new armv8.4-a option.
27240 2018-01-10 Michael Collison <michael.collison@arm.com>
27242 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27243 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27244 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27245 * config/aarch64/aarch64-option-extension.def: Add
27246 AARCH64_OPT_EXTENSION of 'sha2'.
27247 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27248 (crypto): Disable sha2 and aes if crypto disabled.
27249 (crypto): Enable aes and sha2 if enabled.
27250 (simd): Disable sha2 and aes if simd disabled.
27251 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27253 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27254 (TARGET_SHA2): New feature flag for sha2.
27255 (TARGET_AES): New feature flag for aes.
27256 * config/aarch64/aarch64-simd.md:
27257 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27258 conditional on TARGET_AES.
27259 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27260 (aarch64_crypto_sha1hsi): Make pattern conditional
27262 (aarch64_crypto_sha1hv4si): Ditto.
27263 (aarch64_be_crypto_sha1hv4si): Ditto.
27264 (aarch64_crypto_sha1su1v4si): Ditto.
27265 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27266 (aarch64_crypto_sha1su0v4si): Ditto.
27267 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27268 (aarch64_crypto_sha256su0v4si): Ditto.
27269 (aarch64_crypto_sha256su1v4si): Ditto.
27270 (doc/invoke.texi): Document new aes and sha2 options.
27272 2018-01-10 Martin Sebor <msebor@redhat.com>
27274 PR tree-optimization/83781
27275 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27278 2018-01-11 Martin Sebor <msebor@gmail.com>
27279 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27281 PR tree-optimization/83501
27282 PR tree-optimization/81703
27284 * tree-ssa-strlen.c (get_string_cst): Rename...
27285 (get_string_len): ...to this. Handle global constants.
27286 (handle_char_store): Adjust.
27288 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27289 Jim Wilson <jimw@sifive.com>
27291 * config/riscv/riscv-protos.h (riscv_output_return): New.
27292 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27293 (riscv_attribute_table, riscv_output_return),
27294 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27295 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27296 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27298 (riscv_expand_prologue): Add early return for naked function.
27299 (riscv_expand_epilogue): Likewise.
27300 (riscv_function_ok_for_sibcall): Return false for naked function.
27301 (riscv_set_current_function): New.
27302 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27303 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27304 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27305 * doc/extend.texi (RISC-V Function Attributes): New.
27307 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27309 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27310 check for 128-bit long double before checking TCmode.
27311 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27312 128-bit long doubles before checking TFmode or TCmode.
27313 (FLOAT128_IBM_P): Likewise.
27315 2018-01-10 Martin Sebor <msebor@redhat.com>
27317 PR tree-optimization/83671
27318 * builtins.c (c_strlen): Unconditionally return zero for the empty
27320 Use -Warray-bounds for warnings.
27321 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27322 for non-constant array indices with COMPONENT_REF, arrays of
27323 arrays, and pointers to arrays.
27324 (gimple_fold_builtin_strlen): Determine and set length range for
27325 non-constant character arrays.
27327 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27329 PR middle-end/81897
27330 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27333 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27335 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27337 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27340 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27341 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27342 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27343 indexed_or_indirect_operand predicate.
27344 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27345 (*vsx_le_perm_load_v8hi): Likewise.
27346 (*vsx_le_perm_load_v16qi): Likewise.
27347 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27348 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27349 (*vsx_le_perm_store_v8hi): Likewise.
27350 (*vsx_le_perm_store_v16qi): Likewise.
27351 (eight unnamed splitters): Likewise.
27353 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27355 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27356 * config/rs6000/emmintrin.h: Likewise.
27357 * config/rs6000/mmintrin.h: Likewise.
27358 * config/rs6000/xmmintrin.h: Likewise.
27360 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27363 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27365 * tree.c (tree_nop_conversion): Return true for location wrapper
27367 (maybe_wrap_with_location): New function.
27368 (selftest::check_strip_nops): New function.
27369 (selftest::test_location_wrappers): New function.
27370 (selftest::tree_c_tests): Call it.
27371 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27372 (maybe_wrap_with_location): New decl.
27373 (EXPR_LOCATION_WRAPPER_P): New macro.
27374 (location_wrapper_p): New inline function.
27375 (tree_strip_any_location_wrapper): New inline function.
27377 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27380 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27381 stack_realign_offset for the largest alignment of stack slot
27383 (ix86_find_max_used_stack_alignment): New function.
27384 (ix86_finalize_stack_frame_flags): Use it. Set
27385 max_used_stack_alignment if we don't realign stack.
27386 * config/i386/i386.h (machine_function): Add
27387 max_used_stack_alignment.
27389 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27391 * config/arm/arm.opt (-mbranch-cost): New option.
27392 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27395 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27398 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27399 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27401 2018-01-10 Richard Biener <rguenther@suse.de>
27404 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27405 early out so it also covers the case where we have a non-NULL
27408 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27410 PR tree-optimization/83753
27411 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27412 for non-strided grouped accesses if the number of elements is 1.
27414 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27417 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27418 * i386.h (TARGET_USE_GATHER): Define.
27419 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27421 2018-01-10 Martin Liska <mliska@suse.cz>
27424 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27425 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27427 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27428 CLEANUP_NO_PARTITIONING is not set.
27430 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27432 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27433 for vectors, as a partial revert of r254296.
27434 * rtl.h (const_vec_p): Delete.
27435 (const_vec_duplicate_p): Don't test for vector CONSTs.
27436 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27437 * expmed.c (make_tree): Likewise.
27440 * common.md (E, F): Use CONSTANT_P instead of checking for
27442 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27443 checking for CONST_VECTOR.
27445 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27447 PR middle-end/83575
27448 * predict.c (force_edge_cold): Handle in more sane way edges
27449 with no prediction.
27451 2018-01-09 Carl Love <cel@us.ibm.com>
27453 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27455 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27456 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27457 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27458 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27459 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27460 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27461 * config/rs6000/rs6000-protos.h: Add extern defition for
27462 rs6000_generate_float2_double_code.
27463 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27465 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27466 (float2_v2df): Add define_expand.
27468 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27471 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27472 op_mode in the force_to_mode call.
27474 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27476 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27477 instead of checking each element individually.
27478 (aarch64_evpc_uzp): Likewise.
27479 (aarch64_evpc_zip): Likewise.
27480 (aarch64_evpc_ext): Likewise.
27481 (aarch64_evpc_rev): Likewise.
27482 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27483 instead of checking each element individually. Return true without
27485 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27486 whether all selected elements come from the same input, instead of
27487 checking each element individually. Remove calls to gen_rtx_REG,
27488 start_sequence and end_sequence and instead assert that no rtl is
27491 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27493 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27494 order of HIGH and CONST checks.
27496 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27498 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27499 if the destination isn't an SSA_NAME.
27501 2018-01-09 Richard Biener <rguenther@suse.de>
27503 PR tree-optimization/83668
27504 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27506 (canonicalize_loop_form): ... here, renamed from ...
27507 (canonicalize_loop_closed_ssa_form): ... this and amended to
27508 swap successor edges for loop exit blocks to make us use
27509 the RPO order we need for initial schedule generation.
27511 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27513 PR tree-optimization/64811
27514 * match.pd: When optimizing comparisons with Inf, avoid
27515 introducing or losing exceptions from comparisons with NaN.
27517 2018-01-09 Martin Liska <mliska@suse.cz>
27520 * asan.c (shadow_mem_size): Add gcc_assert.
27522 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27524 Don't save registers in main().
27527 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27528 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27529 * config/avr/avr.c (avr_set_current_function): Don't error if
27530 naked, OS_task or OS_main are specified at the same time.
27531 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27533 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27535 * common/config/avr/avr-common.c (avr_option_optimization_table):
27536 Switch on -mmain-is-OS_task for optimizing compilations.
27538 2018-01-09 Richard Biener <rguenther@suse.de>
27540 PR tree-optimization/83572
27541 * graphite.c: Include cfganal.h.
27542 (graphite_transform_loops): Connect infinite loops to exit
27543 and remove fake edges at the end.
27545 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27547 * ipa-inline.c (edge_badness): Revert accidental checkin.
27549 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27552 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27553 symbols; not inline clones.
27555 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27558 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27559 hard registers. Formatting fixes.
27561 PR preprocessor/83722
27562 * gcc.c (try_generate_repro): Pass
27563 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27564 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27567 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27568 Kito Cheng <kito.cheng@gmail.com>
27570 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27571 (riscv_leaf_function_p): Delete.
27572 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27574 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27576 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27578 (do_ifelse): New function.
27579 (do_isel): New function.
27580 (do_sub3): New function.
27581 (do_add3): New function.
27582 (do_load_mask_compare): New function.
27583 (do_overlap_load_compare): New function.
27584 (expand_compare_loop): New function.
27585 (expand_block_compare): Call expand_compare_loop() when appropriate.
27586 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27587 option description.
27588 (-mblock-compare-inline-loop-limit): New option.
27590 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27593 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27594 Reverse order of second and third operands in first alternative.
27595 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27596 of first and second elements in UNSPEC_VPERMR vector.
27597 (altivec_expand_vec_perm_le): Likewise.
27599 2018-01-08 Jeff Law <law@redhat.com>
27601 PR rtl-optimizatin/81308
27602 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27603 (process_switch): If group_case_labels makes a change, then set
27605 (pass_convert_switch::execute): If a switch is converted, then
27606 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27608 PR rtl-optimization/81308
27609 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27612 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27614 PR target/83663 - Revert r255946
27615 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27616 generation for cases where splatting a value is not useful.
27617 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27618 across a vec_duplicate and a paradoxical subreg forming a vector
27619 mode to a vec_concat.
27621 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27623 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27624 -march=armv8.3-a variants.
27625 * config/arm/t-multilib: Likewise.
27626 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27628 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27630 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27632 (cceq_ior_compare_complement): Give it a name so I can use it, and
27633 change boolean_or_operator predicate to boolean_operator so it can
27634 be used to generate a crand.
27635 (eqne): New code iterator.
27636 (bd/bd_neg): New code_attrs.
27637 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27638 a single define_insn.
27639 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27640 decrement (bdnzt/bdnzf/bdzt/bdzf).
27641 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27642 with the new names of the branch decrement patterns, and added the
27643 names of the branch decrement conditional patterns.
27645 2018-01-08 Richard Biener <rguenther@suse.de>
27647 PR tree-optimization/83563
27648 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27651 2018-01-08 Richard Biener <rguenther@suse.de>
27653 PR middle-end/83713
27654 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27656 2018-01-08 Richard Biener <rguenther@suse.de>
27658 PR tree-optimization/83685
27659 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27660 references to abnormals.
27662 2018-01-08 Richard Biener <rguenther@suse.de>
27665 * dwarf2out.c (output_indirect_strings): Handle empty
27666 skeleton_debug_str_hash.
27667 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27669 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27671 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27672 (emit_store_direct): Likewise.
27673 (arc_trampoline_adjust_address): Likewise.
27674 (arc_asm_trampoline_template): New function.
27675 (arc_initialize_trampoline): Use asm_trampoline_template.
27676 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27677 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27678 * config/arc/arc.md (flush_icache): Delete pattern.
27680 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27682 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27683 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27686 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27689 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27690 by not USED_FOR_TARGET.
27691 (make_pass_resolve_sw_modes): Likewise.
27693 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27695 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27698 2018-01-08 Richard Biener <rguenther@suse.de>
27700 PR middle-end/83580
27701 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27703 2018-01-08 Richard Biener <rguenther@suse.de>
27705 PR middle-end/83517
27706 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27708 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27710 PR middle-end/81897
27711 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27712 basic blocks with a small number of successors.
27713 (convert_control_dep_chain_into_preds): Improve handling of
27715 (dump_predicates): Split apart into...
27716 (dump_pred_chain): ...here...
27717 (dump_pred_info): ...and here.
27718 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27719 (can_chain_union_be_invalidated_p): Improve check for invalidation
27721 (uninit_uses_cannot_happen): Avoid unnecessary if
27722 convert_control_dep_chain_into_preds yielded nothing.
27724 2018-01-06 Martin Sebor <msebor@redhat.com>
27726 PR tree-optimization/83640
27727 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27728 subtracting negative offset from size.
27729 (builtin_access::overlap): Adjust offset bounds of the access to fall
27730 within the size of the object if possible.
27732 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27734 PR rtl-optimization/83699
27735 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27736 extract_bit_field_as_subreg to cases in which the extracted
27737 value is also a vector.
27739 * lra-constraints.c (process_alt_operands): Test for the equivalence
27740 substitutions when detecting a possible reload cycle.
27742 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27745 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27746 by default if flag_selective_schedling{,2}. Formatting fixes.
27748 PR rtl-optimization/83682
27749 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27750 if it has non-VECTOR_MODE element mode.
27751 (vec_duplicate_p): Likewise.
27753 PR middle-end/83694
27754 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27755 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27757 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27760 * config/i386/i386-builtin.def
27761 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27762 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27763 Require also OPTION_MASK_ISA_AVX512F in addition to
27764 OPTION_MASK_ISA_GFNI.
27765 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27766 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27767 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27768 to OPTION_MASK_ISA_GFNI.
27769 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27770 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27771 OPTION_MASK_ISA_AVX512BW.
27772 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27773 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27774 addition to OPTION_MASK_ISA_GFNI.
27775 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27776 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27777 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27778 to OPTION_MASK_ISA_GFNI.
27779 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27780 a requirement for all ISAs rather than any of them with a few
27782 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27784 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27785 bitmasks to be enabled with 3 exceptions, instead of requiring any
27786 enabled ISA with lots of exceptions.
27787 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27788 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27789 Change avx512bw in isa attribute to avx512f.
27790 * config/i386/sgxintrin.h: Add license boilerplate.
27791 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27792 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27793 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27794 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27796 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27797 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27798 temporarily sse2 rather than sse if not enabled already.
27801 * config/i386/sse.md (VI248_VLBW): Rename to ...
27802 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
27803 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27804 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27805 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27806 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27807 mode iterator instead of VI248_VLBW.
27809 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
27811 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27812 (record_modified): Skip clobbers; add debug output.
27813 (param_change_prob): Use sreal frequencies.
27815 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27817 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27818 punt for user-aligned variables.
27820 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27822 * tree-chrec.c (chrec_contains_symbols): Return true for
27825 2018-01-05 Sudakshina Das <sudi.das@arm.com>
27828 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27829 of (x|y) == x for BICS pattern.
27831 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27833 PR tree-optimization/83605
27834 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27835 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27838 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
27840 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27841 * config/epiphany/rtems.h: New file.
27843 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27844 Uros Bizjak <ubizjak@gmail.com>
27847 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27848 QIreg_operand instead of register_operand predicate.
27849 * config/i386/i386.c (ix86_rop_should_change_byte_p,
27850 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27851 comments instead of -fmitigate[-_]rop.
27853 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27856 * cgraphunit.c (symbol_table::compile): Switch to text_section
27857 before calling assembly_start debug hook.
27858 * run-rtl-passes.c (run_rtl_passes): Likewise.
27861 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27863 * tree-vrp.c (extract_range_from_binary_expr_1): Check
27864 range_int_cst_p rather than !symbolic_range_p before calling
27865 extract_range_from_multiplicative_op_1.
27867 2018-01-04 Jeff Law <law@redhat.com>
27869 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27870 redundant test in assertion.
27872 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27874 * doc/rtl.texi: Document machine_mode wrapper classes.
27876 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27878 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27879 using tree_to_uhwi.
27881 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27883 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27884 the VEC_PERM_EXPR fold to fail.
27886 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27889 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27890 to switched_sections.
27892 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27895 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27896 test for d.testing.
27898 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
27901 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27902 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27904 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27907 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27908 is BLKmode and bitpos not zero or mode change is needed.
27910 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27913 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27916 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
27919 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27920 instead of MULT rtx. Update all corresponding splitters.
27921 (*saddl_se): Ditto.
27922 (*ssub<modesuffix>): Ditto.
27923 (*ssubl_se): Ditto.
27924 (*cmp_sadd_di): Update split patterns.
27925 (*cmp_sadd_si): Ditto.
27926 (*cmp_sadd_sidi): Ditto.
27927 (*cmp_ssub_di): Ditto.
27928 (*cmp_ssub_si): Ditto.
27929 (*cmp_ssub_sidi): Ditto.
27930 * config/alpha/predicates.md (const23_operand): New predicate.
27931 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27932 Look for ASHIFT, not MULT inner operand.
27933 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27935 2018-01-04 Martin Liska <mliska@suse.cz>
27937 PR gcov-profile/83669
27938 * gcov.c (output_intermediate_file): Add version to intermediate
27940 * doc/gcov.texi: Document new field 'version' in intermediate
27941 file format. Fix location of '-k' option of gcov command.
27943 2018-01-04 Martin Liska <mliska@suse.cz>
27946 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27948 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27950 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27952 2018-01-03 Martin Sebor <msebor@redhat.com>
27954 PR tree-optimization/83655
27955 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27956 checking calls with invalid arguments.
27958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27960 * tree-vect-stmts.c (vect_get_store_rhs): New function.
27961 (vectorizable_mask_load_store): Delete.
27962 (vectorizable_call): Return false for masked loads and stores.
27963 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
27964 instead of gimple_assign_rhs1.
27965 (vectorizable_load): Handle IFN_MASK_LOAD.
27966 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27970 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27972 (vectorizable_mask_load_store): ...here.
27973 (vectorizable_load): ...and here.
27975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27977 * tree-vect-stmts.c (vect_build_all_ones_mask)
27978 (vect_build_zero_merge_argument): New functions, split out from...
27979 (vectorizable_load): ...here.
27981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27983 * tree-vect-stmts.c (vect_check_store_rhs): New function,
27985 (vectorizable_mask_load_store): ...here.
27986 (vectorizable_store): ...and here.
27988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27990 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27992 (vectorizable_mask_load_store): ...here.
27994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27996 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27997 (vect_model_store_cost): Take a vec_load_store_type instead of a
27999 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28000 (vect_model_store_cost): Take a vec_load_store_type instead of a
28002 (vectorizable_mask_load_store): Update accordingly.
28003 (vectorizable_store): Likewise.
28004 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28006 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28008 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28009 IFN_MASK_LOAD calls here rather than...
28010 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28013 Alan Hayward <alan.hayward@arm.com>
28014 David Sherwood <david.sherwood@arm.com>
28016 * expmed.c (extract_bit_field_1): For vector extracts,
28017 fall back to extract_bit_field_as_subreg if vec_extract
28020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28021 Alan Hayward <alan.hayward@arm.com>
28022 David Sherwood <david.sherwood@arm.com>
28024 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28025 they are variable or constant sized.
28026 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28027 slots for constant-sized data.
28029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28030 Alan Hayward <alan.hayward@arm.com>
28031 David Sherwood <david.sherwood@arm.com>
28033 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28034 handling COND_EXPRs with boolean comparisons, try to find a better
28035 basis for the mask type than the boolean itself.
28037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28039 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28040 is calculated and how it can be overridden.
28041 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28042 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28044 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28048 Alan Hayward <alan.hayward@arm.com>
28049 David Sherwood <david.sherwood@arm.com>
28051 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28052 Remove the mode argument.
28053 (aarch64_simd_valid_immediate): Remove the mode and inverse
28055 * config/aarch64/iterators.md (bitsize): New iterator.
28056 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28057 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28058 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28059 aarch64_simd_valid_immediate.
28060 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28061 (aarch64_reg_or_bic_imm): Likewise.
28062 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28063 with an insn_type enum and msl with a modifier_type enum.
28064 Replace element_width with a scalar_mode. Change the shift
28065 to unsigned int. Add constructors for scalar_float_mode and
28066 scalar_int_mode elements.
28067 (aarch64_vect_float_const_representable_p): Delete.
28068 (aarch64_can_const_movi_rtx_p)
28069 (aarch64_simd_scalar_immediate_valid_for_move)
28070 (aarch64_simd_make_constant): Update call to
28071 aarch64_simd_valid_immediate.
28072 (aarch64_advsimd_valid_immediate_hs): New function.
28073 (aarch64_advsimd_valid_immediate): Likewise.
28074 (aarch64_simd_valid_immediate): Remove mode and inverse
28075 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28076 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28077 and aarch64_float_const_representable_p on the result.
28078 (aarch64_output_simd_mov_immediate): Remove mode argument.
28079 Update call to aarch64_simd_valid_immediate and use of
28080 simd_immediate_info.
28081 (aarch64_output_scalar_simd_mov_immediate): Update call
28084 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28085 Alan Hayward <alan.hayward@arm.com>
28086 David Sherwood <david.sherwood@arm.com>
28088 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28089 (mode_nunits): Likewise CONST_MODE_NUNITS.
28090 * machmode.def (ADJUST_NUNITS): Document.
28091 * genmodes.c (mode_data::need_nunits_adj): New field.
28092 (blank_mode): Update accordingly.
28093 (adj_nunits): New variable.
28094 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28096 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28097 listed in adj_nunits.
28098 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28099 listed in adj_nunits. Don't emit case statements for such modes.
28100 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28101 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28102 nothing if adj_nunits is nonnull.
28103 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28104 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28105 (emit_mode_fbit): Update use of print_maybe_const_decl.
28106 (emit_move_size): Likewise. Treat the array as non-const
28108 (emit_mode_adjustments): Handle adj_nunits.
28110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28112 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28113 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28114 (VECTOR_MODES): Use it.
28115 (make_vector_modes): Take the prefix as an argument.
28117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28118 Alan Hayward <alan.hayward@arm.com>
28119 David Sherwood <david.sherwood@arm.com>
28121 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28122 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28123 for MODE_VECTOR_BOOL.
28124 * machmode.def (VECTOR_BOOL_MODE): Document.
28125 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28126 (make_vector_bool_mode): New function.
28127 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28129 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28130 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28132 * stor-layout.c (int_mode_for_mode): Likewise.
28133 * tree.c (build_vector_type_for_mode): Likewise.
28134 * varasm.c (output_constant_pool_2): Likewise.
28135 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28136 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28137 for MODE_VECTOR_BOOL.
28138 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28139 of mode class checks.
28140 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28141 instead of a list of mode class checks.
28142 (expand_vector_scalar_condition): Likewise.
28143 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28146 Alan Hayward <alan.hayward@arm.com>
28147 David Sherwood <david.sherwood@arm.com>
28149 * machmode.h (mode_size): Change from unsigned short to
28151 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28152 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28153 or if measurement_type is not polynomial.
28154 (fixed_size_mode::includes_p): Check for constant-sized modes.
28155 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28156 return a poly_uint16 rather than an unsigned short.
28157 (emit_mode_size): Change the type of mode_size from unsigned short
28158 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28159 (emit_mode_adjustments): Cope with polynomial vector sizes.
28160 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28162 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28164 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28165 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28166 * caller-save.c (setup_save_areas): Likewise.
28167 (replace_reg_with_saved_mem): Likewise.
28168 * calls.c (emit_library_call_value_1): Likewise.
28169 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28170 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28171 (gen_lowpart_for_combine): Likewise.
28172 * convert.c (convert_to_integer_1): Likewise.
28173 * cse.c (equiv_constant, cse_insn): Likewise.
28174 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28175 (cselib_subst_to_values): Likewise.
28176 * dce.c (word_dce_process_block): Likewise.
28177 * df-problems.c (df_word_lr_mark_ref): Likewise.
28178 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28179 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28180 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28181 (rtl_for_decl_location): Likewise.
28182 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28183 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28184 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28185 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28186 (expand_expr_real_1): Likewise.
28187 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28188 (pad_below): Likewise.
28189 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28190 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28191 * ira.c (get_subreg_tracking_sizes): Likewise.
28192 * ira-build.c (ira_create_allocno_objects): Likewise.
28193 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28194 (ira_sort_regnos_for_alter_reg): Likewise.
28195 * ira-costs.c (record_operand_costs): Likewise.
28196 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28197 (resolve_simple_move): Likewise.
28198 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28199 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28200 (lra_constraints): Likewise.
28201 (CONST_POOL_OK_P): Reject variable-sized modes.
28202 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28203 (add_pseudo_to_slot, lra_spill): Likewise.
28204 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28205 * optabs-query.c (get_best_extraction_insn): Likewise.
28206 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28207 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28208 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28209 * recog.c (offsettable_address_addr_space_p): Likewise.
28210 * regcprop.c (maybe_mode_change): Likewise.
28211 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28212 * regrename.c (build_def_use): Likewise.
28213 * regstat.c (dump_reg_info): Likewise.
28214 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28215 (find_reloads, find_reloads_subreg_address): Likewise.
28216 * reload1.c (eliminate_regs_1): Likewise.
28217 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28218 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28219 (simplify_binary_operation_1, simplify_subreg): Likewise.
28220 * targhooks.c (default_function_arg_padding): Likewise.
28221 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28222 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28223 (verify_gimple_assign_ternary): Likewise.
28224 * tree-inline.c (estimate_move_cost): Likewise.
28225 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28226 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28227 (get_address_cost_ainc): Likewise.
28228 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28229 (vect_supportable_dr_alignment): Likewise.
28230 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28231 (vectorizable_reduction): Likewise.
28232 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28233 (vectorizable_operation, vectorizable_load): Likewise.
28234 * tree.c (build_same_sized_truth_vector_type): Likewise.
28235 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28236 * var-tracking.c (emit_note_insn_var_location): Likewise.
28237 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28238 (ADDR_VEC_ALIGN): Likewise.
28240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28241 Alan Hayward <alan.hayward@arm.com>
28242 David Sherwood <david.sherwood@arm.com>
28244 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28246 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28247 or if measurement_type is polynomial.
28248 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28249 * combine.c (make_extraction): Likewise.
28250 * dse.c (find_shift_sequence): Likewise.
28251 * dwarf2out.c (mem_loc_descriptor): Likewise.
28252 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28253 (extract_bit_field, extract_low_bits): Likewise.
28254 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28255 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28256 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28257 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28258 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28259 * reload.c (find_reloads): Likewise.
28260 * reload1.c (alter_reg): Likewise.
28261 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28262 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28263 * tree-if-conv.c (predicate_mem_writes): Likewise.
28264 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28265 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28266 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28267 * valtrack.c (dead_debug_insert_temp): Likewise.
28268 * varasm.c (mergeable_constant_section): Likewise.
28269 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28272 Alan Hayward <alan.hayward@arm.com>
28273 David Sherwood <david.sherwood@arm.com>
28275 * expr.c (expand_assignment): Cope with polynomial mode sizes
28276 when assigning to a CONCAT.
28278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28279 Alan Hayward <alan.hayward@arm.com>
28280 David Sherwood <david.sherwood@arm.com>
28282 * machmode.h (mode_precision): Change from unsigned short to
28284 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28286 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28287 or if measurement_type is not polynomial.
28288 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28289 in which the mode is already known to be a scalar_int_mode.
28290 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28291 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28293 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28294 for GET_MODE_PRECISION.
28295 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28296 for GET_MODE_PRECISION.
28297 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28299 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28300 (expand_field_assignment, make_extraction): Likewise.
28301 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28302 (get_last_value): Likewise.
28303 * convert.c (convert_to_integer_1): Likewise.
28304 * cse.c (cse_insn): Likewise.
28305 * expr.c (expand_expr_real_1): Likewise.
28306 * lra-constraints.c (simplify_operand_subreg): Likewise.
28307 * optabs-query.c (can_atomic_load_p): Likewise.
28308 * optabs.c (expand_atomic_load): Likewise.
28309 (expand_atomic_store): Likewise.
28310 * ree.c (combine_reaching_defs): Likewise.
28311 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28312 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28313 * tree.h (type_has_mode_precision_p): Likewise.
28314 * ubsan.c (instrument_si_overflow): Likewise.
28316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28317 Alan Hayward <alan.hayward@arm.com>
28318 David Sherwood <david.sherwood@arm.com>
28320 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28321 polynomial numbers of units.
28322 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28323 (valid_vector_subparts_p): New function.
28324 (build_vector_type): Remove temporary shim and take the number
28325 of units as a poly_uint64 rather than an int.
28326 (build_opaque_vector_type): Take the number of units as a
28327 poly_uint64 rather than an int.
28328 * tree.c (build_vector_from_ctor): Handle polynomial
28329 TYPE_VECTOR_SUBPARTS.
28330 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28331 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28332 (build_vector_from_val): If the number of units is variable,
28333 use build_vec_duplicate_cst for constant operands and
28334 VEC_DUPLICATE_EXPR otherwise.
28335 (make_vector_type): Remove temporary is_constant ().
28336 (build_vector_type, build_opaque_vector_type): Take the number of
28337 units as a poly_uint64 rather than an int.
28338 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28340 * cfgexpand.c (expand_debug_expr): Likewise.
28341 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28342 (store_constructor, expand_expr_real_1): Likewise.
28343 (const_scalar_mask_from_tree): Likewise.
28344 * fold-const-call.c (fold_const_reduction): Likewise.
28345 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28346 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28347 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28348 (fold_relational_const): Likewise.
28349 (native_interpret_vector): Likewise. Change the size from an
28350 int to an unsigned int.
28351 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28352 TYPE_VECTOR_SUBPARTS.
28353 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28354 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28355 duplicating a non-constant operand into a variable-length vector.
28356 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28357 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28358 * ipa-icf.c (sem_variable::equals): Likewise.
28359 * match.pd: Likewise.
28360 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28361 * print-tree.c (print_node): Likewise.
28362 * stor-layout.c (layout_type): Likewise.
28363 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28364 * tree-cfg.c (verify_gimple_comparison): Likewise.
28365 (verify_gimple_assign_binary): Likewise.
28366 (verify_gimple_assign_ternary): Likewise.
28367 (verify_gimple_assign_single): Likewise.
28368 * tree-pretty-print.c (dump_generic_node): Likewise.
28369 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28370 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28371 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28372 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28373 (vect_shift_permute_load_chain): Likewise.
28374 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28375 (expand_vector_condition, optimize_vector_constructor): Likewise.
28376 (lower_vec_perm, get_compute_type): Likewise.
28377 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28378 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28379 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28380 (vect_recog_mask_conversion_pattern): Likewise.
28381 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28382 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28383 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28384 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28385 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28386 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28387 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28388 (supportable_widening_operation): Likewise.
28389 (supportable_narrowing_operation): Likewise.
28390 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28392 * varasm.c (output_constant): Likewise.
28394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28395 Alan Hayward <alan.hayward@arm.com>
28396 David Sherwood <david.sherwood@arm.com>
28398 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28399 so that both the length == 3 and length != 3 cases set up their
28400 own permute vectors. Add comments explaining why we know the
28401 number of elements is constant.
28402 (vect_permute_load_chain): Likewise.
28404 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28405 Alan Hayward <alan.hayward@arm.com>
28406 David Sherwood <david.sherwood@arm.com>
28408 * machmode.h (mode_nunits): Change from unsigned char to
28410 (ONLY_FIXED_SIZE_MODES): New macro.
28411 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28412 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28413 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28415 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28416 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28417 or if measurement_type is not polynomial.
28418 * genmodes.c (ZERO_COEFFS): New macro.
28419 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28421 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28422 Use ZERO_COEFFS when emitting initializers.
28423 * data-streamer.h (bp_pack_poly_value): New function.
28424 (bp_unpack_poly_value): Likewise.
28425 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28426 for GET_MODE_NUNITS.
28427 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28428 for GET_MODE_NUNITS.
28429 * tree.c (make_vector_type): Remove temporary shim and make
28430 the real function take the number of units as a poly_uint64
28431 rather than an int.
28432 (build_vector_type_for_mode): Handle polynomial nunits.
28433 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28434 * emit-rtl.c (const_vec_series_p_1): Likewise.
28435 (gen_rtx_CONST_VECTOR): Likewise.
28436 * fold-const.c (test_vec_duplicate_folding): Likewise.
28437 * genrecog.c (validate_pattern): Likewise.
28438 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28439 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28440 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28441 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28442 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28443 * rtlanal.c (subreg_get_info): Likewise.
28444 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28445 (vect_grouped_load_supported): Likewise.
28446 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28447 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28448 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28449 (simplify_const_unary_operation, simplify_binary_operation_1)
28450 (simplify_const_binary_operation, simplify_ternary_operation)
28451 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28452 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28453 instead of CONST_VECTOR_NUNITS.
28454 * varasm.c (output_constant_pool_2): Likewise.
28455 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28456 explicit-encoded elements in the XVEC for variable-length vectors.
28458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28460 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28463 Alan Hayward <alan.hayward@arm.com>
28464 David Sherwood <david.sherwood@arm.com>
28466 * coretypes.h (fixed_size_mode): Declare.
28467 (fixed_size_mode_pod): New typedef.
28468 * builtins.h (target_builtins::x_apply_args_mode)
28469 (target_builtins::x_apply_result_mode): Change type to
28470 fixed_size_mode_pod.
28471 * builtins.c (apply_args_size, apply_result_size, result_vector)
28472 (expand_builtin_apply_args_1, expand_builtin_apply)
28473 (expand_builtin_return): Update accordingly.
28475 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28477 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28478 * cselib.c (cselib_hash_rtx): Likewise.
28479 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28480 CONST_VECTOR encoding.
28482 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28483 Jeff Law <law@redhat.com>
28486 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28487 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28488 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28489 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28492 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28493 explicitly probe *sp in a noreturn function if there were any callee
28494 register saves or frame pointer is needed.
28496 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28499 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28500 BLKmode for ternary, binary or unary expressions.
28503 * var-tracking.c (delete_vta_debug_insn): New inline function.
28504 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28505 insns from get_insns () to NULL instead of each bb separately.
28506 Use delete_vta_debug_insn. No longer static.
28507 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28508 delete_vta_debug_insns callers.
28509 * rtl.h (delete_vta_debug_insns): Declare.
28510 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28511 instead of variable_tracking_main.
28513 2018-01-03 Martin Sebor <msebor@redhat.com>
28515 PR tree-optimization/83603
28516 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28517 arguments past the endof the argument list in functions declared
28518 without a prototype.
28519 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28520 Avoid checking when arguments are null.
28522 2018-01-03 Martin Sebor <msebor@redhat.com>
28525 * doc/extend.texi (attribute const): Fix a typo.
28526 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28527 issuing -Wsuggest-attribute for void functions.
28529 2018-01-03 Martin Sebor <msebor@redhat.com>
28531 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28532 offset_int::from instead of wide_int::to_shwi.
28533 (maybe_diag_overlap): Remove assertion.
28534 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28535 * gimple-ssa-sprintf.c (format_directive): Same.
28536 (parse_directive): Same.
28537 (sprintf_dom_walker::compute_format_length): Same.
28538 (try_substitute_return_value): Same.
28540 2018-01-03 Jeff Law <law@redhat.com>
28542 PR middle-end/83654
28543 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28544 non-constant residual for zero at runtime and avoid probing in
28545 that case. Reorganize code for trailing problem to mirror handling
28548 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28550 PR tree-optimization/83501
28551 * tree-ssa-strlen.c (get_string_cst): New.
28552 (handle_char_store): Call get_string_cst.
28554 2018-01-03 Martin Liska <mliska@suse.cz>
28556 PR tree-optimization/83593
28557 * tree-ssa-strlen.c: Include tree-cfg.h.
28558 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28559 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28560 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28562 (strlen_dom_walker::before_dom_children): Call
28563 gimple_purge_dead_eh_edges. Dump tranformation with details
28565 (strlen_dom_walker::before_dom_children): Update call by adding
28566 new argument cleanup_eh.
28567 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28569 2018-01-03 Martin Liska <mliska@suse.cz>
28572 * cif-code.def (VARIADIC_THUNK): New enum value.
28573 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28576 2018-01-03 Jan Beulich <jbeulich@suse.com>
28578 * sse.md (mov<mode>_internal): Tighten condition for when to use
28579 vmovdqu<ssescalarsize> for TI and OI modes.
28581 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28583 Update copyright years.
28585 2018-01-03 Martin Liska <mliska@suse.cz>
28588 * ipa-visibility.c (function_and_variable_visibility): Skip
28589 functions with noipa attribure.
28591 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28593 * gcc.c (process_command): Update copyright notice dates.
28594 * gcov-dump.c (print_version): Ditto.
28595 * gcov.c (print_version): Ditto.
28596 * gcov-tool.c (print_version): Ditto.
28597 * gengtype.c (create_file): Ditto.
28598 * doc/cpp.texi: Bump @copying's copyright year.
28599 * doc/cppinternals.texi: Ditto.
28600 * doc/gcc.texi: Ditto.
28601 * doc/gccint.texi: Ditto.
28602 * doc/gcov.texi: Ditto.
28603 * doc/install.texi: Ditto.
28604 * doc/invoke.texi: Ditto.
28606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28608 * vector-builder.h (vector_builder::m_full_nelts): Change from
28609 unsigned int to poly_uint64.
28610 (vector_builder::full_nelts): Update prototype accordingly.
28611 (vector_builder::new_vector): Likewise.
28612 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28613 (vector_builder::operator ==): Likewise.
28614 (vector_builder::finalize): Likewise.
28615 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28616 Take the number of elements as a poly_uint64 rather than an
28618 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28619 from unsigned int to poly_uint64.
28620 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28621 (vec_perm_indices::new_vector): Likewise.
28622 (vec_perm_indices::length): Likewise.
28623 (vec_perm_indices::nelts_per_input): Likewise.
28624 (vec_perm_indices::input_nelts): Likewise.
28625 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28626 number of elements per input as a poly_uint64 rather than an
28627 unsigned int. Use the original encoding for variable-length
28628 vectors, rather than clamping each individual element.
28629 For the second and subsequent elements in each pattern,
28630 clamp the step and base before clamping their sum.
28631 (vec_perm_indices::series_p): Handle polynomial element counts.
28632 (vec_perm_indices::all_in_range_p): Likewise.
28633 (vec_perm_indices_to_tree): Likewise.
28634 (vec_perm_indices_to_rtx): Likewise.
28635 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28636 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28637 (tree_vector_builder::new_binary_operation): Handle polynomial
28638 element counts. Return false if we need to know the number
28639 of elements at compile time.
28640 * fold-const.c (fold_vec_perm): Punt if the number of elements
28641 isn't known at compile time.
28643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28645 * vec-perm-indices.h (vec_perm_builder): Change element type
28646 from HOST_WIDE_INT to poly_int64.
28647 (vec_perm_indices::element_type): Update accordingly.
28648 (vec_perm_indices::clamp): Handle polynomial element_types.
28649 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28650 (vec_perm_indices::all_in_range_p): Likewise.
28651 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28653 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28654 polynomial vec_perm_indices element types.
28655 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28656 * fold-const.c (fold_vec_perm): Likewise.
28657 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28658 * tree-vect-generic.c (lower_vec_perm): Likewise.
28659 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28660 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28661 element type to HOST_WIDE_INT.
28663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28664 Alan Hayward <alan.hayward@arm.com>
28665 David Sherwood <david.sherwood@arm.com>
28667 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28668 rather than an int. Use plus_constant.
28669 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28670 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28673 Alan Hayward <alan.hayward@arm.com>
28674 David Sherwood <david.sherwood@arm.com>
28676 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28677 a HOST_WIDE_INT to a poly_int64.
28679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28680 Alan Hayward <alan.hayward@arm.com>
28681 David Sherwood <david.sherwood@arm.com>
28683 * calls.c (load_register_parameters): Cope with polynomial
28684 mode sizes. Require a constant size for BLKmode parameters
28685 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28686 forces a parameter to be padded at the lsb end in order to
28687 fill a complete number of words, require the parameter size
28688 to be ordered wrt UNITS_PER_WORD.
28690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28691 Alan Hayward <alan.hayward@arm.com>
28692 David Sherwood <david.sherwood@arm.com>
28694 * reload1.c (spill_stack_slot_width): Change element type
28695 from unsigned int to poly_uint64_pod.
28696 (alter_reg): Treat mode sizes as polynomial.
28698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28699 Alan Hayward <alan.hayward@arm.com>
28700 David Sherwood <david.sherwood@arm.com>
28702 * reload.c (complex_word_subreg_p): New function.
28703 (reload_inner_reg_of_subreg, push_reload): Use it.
28705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28706 Alan Hayward <alan.hayward@arm.com>
28707 David Sherwood <david.sherwood@arm.com>
28709 * lra-constraints.c (process_alt_operands): Reject matched
28710 operands whose sizes aren't ordered.
28711 (match_reload): Refer to this check here.
28713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28714 Alan Hayward <alan.hayward@arm.com>
28715 David Sherwood <david.sherwood@arm.com>
28717 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28718 that the mode size is in the set {1, 2, 4, 8, 16}.
28720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28721 Alan Hayward <alan.hayward@arm.com>
28722 David Sherwood <david.sherwood@arm.com>
28724 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28725 Use plus_constant instead of gen_rtx_PLUS.
28727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28728 Alan Hayward <alan.hayward@arm.com>
28729 David Sherwood <david.sherwood@arm.com>
28731 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28732 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28733 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28734 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28735 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28736 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28737 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28738 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28739 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28740 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28742 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28743 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28744 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28745 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28746 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28747 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28748 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28749 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28750 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28751 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28753 * expr.c (emit_move_resolve_push): Treat the input and result
28754 of PUSH_ROUNDING as a poly_int64.
28755 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28756 (emit_push_insn): Likewise.
28757 * lra-eliminations.c (mark_not_eliminable): Likewise.
28758 * recog.c (push_operand): Likewise.
28759 * reload1.c (elimination_effects): Likewise.
28760 * rtlanal.c (nonzero_bits1): Likewise.
28761 * calls.c (store_one_arg): Likewise. Require the padding to be
28762 known at compile time.
28764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28765 Alan Hayward <alan.hayward@arm.com>
28766 David Sherwood <david.sherwood@arm.com>
28768 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28769 Use plus_constant instead of gen_rtx_PLUS.
28771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28772 Alan Hayward <alan.hayward@arm.com>
28773 David Sherwood <david.sherwood@arm.com>
28775 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28776 rather than an int.
28778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28779 Alan Hayward <alan.hayward@arm.com>
28780 David Sherwood <david.sherwood@arm.com>
28782 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28783 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28784 via stack temporaries. Treat the mode size as polynomial too.
28786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28787 Alan Hayward <alan.hayward@arm.com>
28788 David Sherwood <david.sherwood@arm.com>
28790 * expr.c (expand_expr_real_2): When handling conversions involving
28791 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28792 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28793 as a poly_uint64 too.
28795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28796 Alan Hayward <alan.hayward@arm.com>
28797 David Sherwood <david.sherwood@arm.com>
28799 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28802 Alan Hayward <alan.hayward@arm.com>
28803 David Sherwood <david.sherwood@arm.com>
28805 * combine.c (can_change_dest_mode): Handle polynomial
28806 REGMODE_NATURAL_SIZE.
28807 * expmed.c (store_bit_field_1): Likewise.
28808 * expr.c (store_constructor): Likewise.
28809 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28810 and polynomial REGMODE_NATURAL_SIZE.
28811 (gen_lowpart_common): Likewise.
28812 * reginfo.c (record_subregs_of_mode): Likewise.
28813 * rtlanal.c (read_modify_subreg_p): Likewise.
28815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28816 Alan Hayward <alan.hayward@arm.com>
28817 David Sherwood <david.sherwood@arm.com>
28819 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28820 numbers of elements.
28822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28823 Alan Hayward <alan.hayward@arm.com>
28824 David Sherwood <david.sherwood@arm.com>
28826 * match.pd: Cope with polynomial numbers of vector elements.
28828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28829 Alan Hayward <alan.hayward@arm.com>
28830 David Sherwood <david.sherwood@arm.com>
28832 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28833 in a POINTER_PLUS_EXPR.
28835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28836 Alan Hayward <alan.hayward@arm.com>
28837 David Sherwood <david.sherwood@arm.com>
28839 * omp-simd-clone.c (simd_clone_subparts): New function.
28840 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28841 (ipa_simd_modify_function_body): Likewise.
28843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28844 Alan Hayward <alan.hayward@arm.com>
28845 David Sherwood <david.sherwood@arm.com>
28847 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28848 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28849 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28850 (expand_vector_condition, vector_element): Likewise.
28851 (subparts_gt): New function.
28852 (get_compute_type): Use subparts_gt.
28853 (count_type_subparts): Delete.
28854 (expand_vector_operations_1): Use subparts_gt instead of
28855 count_type_subparts.
28857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28858 Alan Hayward <alan.hayward@arm.com>
28859 David Sherwood <david.sherwood@arm.com>
28861 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28862 (vect_compile_time_alias): ...this new function. Do the calculation
28863 on poly_ints rather than trees.
28864 (vect_prune_runtime_alias_test_list): Update call accordingly.
28866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28867 Alan Hayward <alan.hayward@arm.com>
28868 David Sherwood <david.sherwood@arm.com>
28870 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28872 (vect_schedule_slp_instance): Likewise.
28874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28875 Alan Hayward <alan.hayward@arm.com>
28876 David Sherwood <david.sherwood@arm.com>
28878 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28879 constant and extern definitions for variable-length vectors.
28880 (vect_get_constant_vectors): Note that the number of units
28881 is known to be constant.
28883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28884 Alan Hayward <alan.hayward@arm.com>
28885 David Sherwood <david.sherwood@arm.com>
28887 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28888 of units as polynomial. Choose between WIDE and NARROW based
28891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28892 Alan Hayward <alan.hayward@arm.com>
28893 David Sherwood <david.sherwood@arm.com>
28895 * tree-vect-stmts.c (simd_clone_subparts): New function.
28896 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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-stmts.c (vectorizable_call): Treat the number of
28903 vectors as polynomial. Use build_index_vector for
28904 IFN_GOMP_SIMD_LANE.
28906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28907 Alan Hayward <alan.hayward@arm.com>
28908 David Sherwood <david.sherwood@arm.com>
28910 * tree-vect-stmts.c (get_load_store_type): Treat the number of
28911 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28912 for variable-length vectors.
28913 (vectorizable_mask_load_store): Treat the number of units as
28914 polynomial, asserting that it is constant if the condition has
28915 already been enforced.
28916 (vectorizable_store, vectorizable_load): Likewise.
28918 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28919 Alan Hayward <alan.hayward@arm.com>
28920 David Sherwood <david.sherwood@arm.com>
28922 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28923 of units as polynomial. Punt if we can't tell at compile time
28924 which vector contains the final result.
28926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28927 Alan Hayward <alan.hayward@arm.com>
28928 David Sherwood <david.sherwood@arm.com>
28930 * tree-vect-loop.c (vectorizable_induction): Treat the number
28931 of units as polynomial. Punt on SLP inductions. Use an integer
28932 VEC_SERIES_EXPR for variable-length integer reductions. Use a
28933 cast of such a series for variable-length floating-point
28936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28937 Alan Hayward <alan.hayward@arm.com>
28938 David Sherwood <david.sherwood@arm.com>
28940 * tree.h (build_index_vector): Declare.
28941 * tree.c (build_index_vector): New function.
28942 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28943 of units as polynomial, forcibly converting it to a constant if
28944 vectorizable_reduction has already enforced the condition.
28945 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
28946 to create a {1,2,3,...} vector.
28947 (vectorizable_reduction): Treat the number of units as polynomial.
28948 Choose vectype_in based on the largest scalar element size rather
28949 than the smallest number of units. Enforce the restrictions
28952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28953 Alan Hayward <alan.hayward@arm.com>
28954 David Sherwood <david.sherwood@arm.com>
28956 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28957 number of units as polynomial.
28959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28960 Alan Hayward <alan.hayward@arm.com>
28961 David Sherwood <david.sherwood@arm.com>
28963 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28964 * target.def (autovectorize_vector_sizes): Return the vector sizes
28965 by pointer, using vector_sizes rather than a bitmask.
28966 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28967 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28968 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28970 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28971 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28972 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28973 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28974 * omp-general.c (omp_max_vf): Likewise.
28975 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28976 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28977 * tree-vect-loop.c (vect_analyze_loop): Likewise.
28978 * tree-vect-slp.c (vect_slp_bb): Likewise.
28979 * doc/tm.texi: Regenerate.
28980 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28982 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28983 the vector size as a poly_uint64 rather than an unsigned int.
28984 (current_vector_size): Change from an unsigned int to a poly_uint64.
28985 (get_vectype_for_scalar_type): Update accordingly.
28986 * tree.h (build_truth_vector_type): Take the size and number of
28987 units as a poly_uint64 rather than an unsigned int.
28988 (build_vector_type): Add a temporary overload that takes
28989 the number of units as a poly_uint64 rather than an unsigned int.
28990 * tree.c (make_vector_type): Likewise.
28991 (build_truth_vector_type): Take the number of units as a poly_uint64
28992 rather than an unsigned int.
28994 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28995 Alan Hayward <alan.hayward@arm.com>
28996 David Sherwood <david.sherwood@arm.com>
28998 * target.def (get_mask_mode): Take the number of units and length
28999 as poly_uint64s rather than unsigned ints.
29000 * targhooks.h (default_get_mask_mode): Update accordingly.
29001 * targhooks.c (default_get_mask_mode): Likewise.
29002 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29003 * doc/tm.texi: Regenerate.
29005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29006 Alan Hayward <alan.hayward@arm.com>
29007 David Sherwood <david.sherwood@arm.com>
29009 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29010 * omp-general.c (omp_max_vf): Likewise.
29011 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29012 (expand_omp_simd): Handle polynomial safelen.
29013 * omp-low.c (omplow_simd_context): Add a default constructor.
29014 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29015 (lower_rec_simd_input_clauses): Update accordingly.
29016 (lower_rec_input_clauses): Likewise.
29018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29019 Alan Hayward <alan.hayward@arm.com>
29020 David Sherwood <david.sherwood@arm.com>
29022 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29023 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29024 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29025 (vect_analyze_slp_cost): Likewise.
29026 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29027 (vect_model_load_cost): Likewise.
29029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29030 Alan Hayward <alan.hayward@arm.com>
29031 David Sherwood <david.sherwood@arm.com>
29033 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29034 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29035 from an unsigned int * to a poly_uint64_pod *.
29036 (calculate_unrolling_factor): New function.
29037 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29040 Alan Hayward <alan.hayward@arm.com>
29041 David Sherwood <david.sherwood@arm.com>
29043 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29044 from an unsigned int to a poly_uint64.
29045 (_loop_vec_info::slp_unrolling_factor): Likewise.
29046 (_loop_vec_info::vectorization_factor): Change from an int
29048 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29049 (vect_get_num_vectors): New function.
29050 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29051 (vect_get_num_copies): Use vect_get_num_vectors.
29052 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29053 to an unsigned int *.
29054 (vect_analyze_data_refs): Change min_vf from an int * to a
29056 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29057 than an unsigned HOST_WIDE_INT.
29058 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29059 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29060 to an unsigned int *.
29061 (vect_analyze_data_ref_dependences): Likewise.
29062 (vect_compute_data_ref_alignment): Handle polynomial vf.
29063 (vect_enhance_data_refs_alignment): Likewise.
29064 (vect_prune_runtime_alias_test_list): Likewise.
29065 (vect_shift_permute_load_chain): Likewise.
29066 (vect_supportable_dr_alignment): Likewise.
29067 (dependence_distance_ge_vf): Take the vectorization factor as a
29068 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29069 (vect_analyze_data_refs): Change min_vf from an int * to a
29071 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29072 vfm1 as a poly_uint64 rather than an int. Make the same change
29073 for the returned bound_scalar.
29074 (vect_gen_vector_loop_niters): Handle polynomial vf.
29075 (vect_do_peeling): Likewise. Update call to
29076 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29077 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29079 * tree-vect-loop.c (vect_determine_vectorization_factor)
29080 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29081 (vect_get_known_peeling_cost): Likewise.
29082 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29083 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29084 (vect_transform_loop): Likewise. Use the lowest possible VF when
29085 updating the upper bounds of the loop.
29086 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29087 rather than an int.
29088 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29089 polynomial unroll factors.
29090 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29091 (vect_make_slp_decision): Likewise.
29092 (vect_supported_load_permutation_p): Likewise, and polynomial
29094 (vect_analyze_slp_cost): Handle polynomial vf.
29095 (vect_slp_analyze_node_operations): Likewise.
29096 (vect_slp_analyze_bb_1): Likewise.
29097 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29098 than an unsigned HOST_WIDE_INT.
29099 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29100 (vectorizable_load): Handle polynomial vf.
29101 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29103 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29106 Alan Hayward <alan.hayward@arm.com>
29107 David Sherwood <david.sherwood@arm.com>
29109 * match.pd: Handle bit operations involving three constants
29110 and try to fold one pair.
29112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29114 * tree-vect-loop-manip.c: Include gimple-fold.h.
29115 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29116 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29117 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29118 Add a path that uses a step of VF instead of 1, but disable it
29120 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29121 and niters_no_overflow parameters. Update calls to
29122 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29123 Create a new SSA name if the latter choses to use a ste other
29124 than zero, and return it via niters_vector_mult_vf_var.
29125 * tree-vect-loop.c (vect_transform_loop): Update calls to
29126 vect_do_peeling, vect_gen_vector_loop_niters and
29127 slpeel_make_loop_iterate_ntimes.
29128 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29129 (vect_gen_vector_loop_niters): Update declarations after above changes.
29131 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29133 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29134 128-bit round to integer instructions.
29135 (ceil<mode>2): Likewise.
29136 (btrunc<mode>2): Likewise.
29137 (round<mode>2): Likewise.
29139 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29141 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29142 unaligned VSX load/store on P8/P9.
29143 (expand_block_clear): Allow the use of unaligned VSX
29144 load/store on P8/P9.
29146 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29148 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29150 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29151 swap associated with both a load and a store.
29153 2018-01-02 Andrew Waterman <andrew@sifive.com>
29155 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29156 * config/riscv/riscv.md (clear_cache): Use it.
29158 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29160 * web.c: Remove out-of-date comment.
29162 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29164 * expr.c (fixup_args_size_notes): Check that any existing
29165 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29166 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29167 (emit_single_push_insn): ...here.
29169 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29171 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29172 (const_vector_encoded_nelts): New function.
29173 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29174 (const_vector_int_elt, const_vector_elt): Declare.
29175 * emit-rtl.c (const_vector_int_elt_1): New function.
29176 (const_vector_elt): Likewise.
29177 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29178 of CONST_VECTOR_ELT.
29180 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29182 * expr.c: Include rtx-vector-builder.h.
29183 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29184 directly on the tree encoding.
29185 (const_vector_from_tree): Likewise.
29186 * optabs.c: Include rtx-vector-builder.h.
29187 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29188 sequence of "u" values.
29189 * vec-perm-indices.c: Include rtx-vector-builder.h.
29190 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29191 directly on the vec_perm_indices encoding.
29193 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29195 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29196 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29197 * rtx-vector-builder.h: New file.
29198 * rtx-vector-builder.c: Likewise.
29199 * rtl.h (rtx_def::u2): Add a const_vector field.
29200 (CONST_VECTOR_NPATTERNS): New macro.
29201 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29202 (CONST_VECTOR_DUPLICATE_P): Likewise.
29203 (CONST_VECTOR_STEPPED_P): Likewise.
29204 (CONST_VECTOR_ENCODED_ELT): Likewise.
29205 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29206 (unwrap_const_vec_duplicate): Likewise.
29207 (const_vec_series_p): Check for a non-duplicated vector encoding.
29208 Say that the function only returns true for integer vectors.
29209 * emit-rtl.c: Include rtx-vector-builder.h.
29210 (gen_const_vec_duplicate_1): Delete.
29211 (gen_const_vector): Call gen_const_vec_duplicate instead of
29212 gen_const_vec_duplicate_1.
29213 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29214 (gen_const_vec_duplicate): Use rtx_vector_builder.
29215 (gen_const_vec_series): Likewise.
29216 (gen_rtx_CONST_VECTOR): Likewise.
29217 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29218 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29219 Build a new vector rather than modifying a CONST_VECTOR in-place.
29220 (handle_special_swappables): Update call accordingly.
29221 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29222 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29223 Build a new vector rather than modifying a CONST_VECTOR in-place.
29224 (handle_special_swappables): Update call accordingly.
29226 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29228 * simplify-rtx.c (simplify_const_binary_operation): Use
29229 CONST_VECTOR_ELT instead of XVECEXP.
29231 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29233 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29234 the selector elements to be different from the data elements
29235 if the selector is a VECTOR_CST.
29236 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29237 ssizetype for the selector.
29239 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29241 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29242 before testing each element individually.
29243 * tree-vect-generic.c (lower_vec_perm): Likewise.
29245 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29247 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29248 * selftest-run-tests.c (selftest::run_tests): Call it.
29249 * vector-builder.h (vector_builder::operator ==): New function.
29250 (vector_builder::operator !=): Likewise.
29251 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29252 (vec_perm_indices::all_from_input_p): New function.
29253 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29254 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29255 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29256 instead of reading the VECTOR_CST directly. Detect whether both
29257 vector inputs are the same before constructing the vec_perm_indices,
29258 and update the number of inputs argument accordingly. Use the
29259 utility functions added above. Only construct sel2 if we need to.
29261 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29263 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29264 the broadcast of the low byte.
29265 (expand_mult_highpart): Use an explicit encoding for the permutes.
29266 * optabs-query.c (can_mult_highpart_p): Likewise.
29267 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29268 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29269 (vectorizable_bswap): Likewise.
29270 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29271 explicit encoding for the power-of-2 permutes.
29272 (vect_permute_store_chain): Likewise.
29273 (vect_grouped_load_supported): Likewise.
29274 (vect_permute_load_chain): Likewise.
29276 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29278 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29279 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29280 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29281 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29282 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29283 (vect_gen_perm_mask_any): Likewise.
29285 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29287 * int-vector-builder.h: New file.
29288 * vec-perm-indices.h: Include int-vector-builder.h.
29289 (vec_perm_indices): Redefine as an int_vector_builder.
29290 (auto_vec_perm_indices): Delete.
29291 (vec_perm_builder): Redefine as a stand-alone class.
29292 (vec_perm_indices::vec_perm_indices): New function.
29293 (vec_perm_indices::clamp): Likewise.
29294 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29295 (vec_perm_indices::new_vector): New function.
29296 (vec_perm_indices::new_expanded_vector): Update for new
29297 vec_perm_indices class.
29298 (vec_perm_indices::rotate_inputs): New function.
29299 (vec_perm_indices::all_in_range_p): Operate directly on the
29300 encoded form, without computing elided elements.
29301 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29302 encoding. Update for new vec_perm_indices class.
29303 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29304 the given vec_perm_builder.
29305 (expand_vec_perm_var): Update vec_perm_builder constructor.
29306 (expand_mult_highpart): Use vec_perm_builder instead of
29307 auto_vec_perm_indices.
29308 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29309 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29310 or double series encoding as appropriate.
29311 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29312 vec_perm_indices instead of auto_vec_perm_indices.
29313 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29314 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29315 (vect_permute_store_chain): Likewise.
29316 (vect_grouped_load_supported): Likewise.
29317 (vect_permute_load_chain): Likewise.
29318 (vect_shift_permute_load_chain): Likewise.
29319 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29320 (vect_transform_slp_perm_load): Likewise.
29321 (vect_schedule_slp_instance): Likewise.
29322 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29323 (vectorizable_mask_load_store): Likewise.
29324 (vectorizable_bswap): Likewise.
29325 (vectorizable_store): Likewise.
29326 (vectorizable_load): Likewise.
29327 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29328 vec_perm_indices instead of auto_vec_perm_indices. Use
29329 tree_to_vec_perm_builder to read the vector from a tree.
29330 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29331 vec_perm_builder instead of a vec_perm_indices.
29332 (have_whole_vector_shift): Use vec_perm_builder and
29333 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29334 truncation to calc_vec_perm_mask_for_shift.
29335 (vect_create_epilog_for_reduction): Likewise.
29336 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29337 from auto_vec_perm_indices to vec_perm_indices.
29338 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29339 instead of changing individual elements.
29340 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29341 the vector in d.perm.
29342 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29343 from auto_vec_perm_indices to vec_perm_indices.
29344 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29345 instead of changing individual elements.
29346 (arm_vectorize_vec_perm_const): Use new_vector to install
29347 the vector in d.perm.
29348 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29349 Update vec_perm_builder constructor.
29350 (rs6000_expand_interleave): Likewise.
29351 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29352 (rs6000_expand_interleave): Likewise.
29354 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29356 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29357 to qimode could truncate the indices.
29358 * optabs.c (expand_vec_perm_var): Likewise.
29360 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29362 * Makefile.in (OBJS): Add vec-perm-indices.o.
29363 * vec-perm-indices.h: New file.
29364 * vec-perm-indices.c: Likewise.
29365 * target.h (vec_perm_indices): Replace with a forward class
29367 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29368 * optabs.h: Include vec-perm-indices.h.
29369 (expand_vec_perm): Delete.
29370 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29371 (expand_vec_perm_const): Declare.
29372 * target.def (vec_perm_const_ok): Replace with...
29373 (vec_perm_const): ...this new hook.
29374 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29375 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29376 * doc/tm.texi: Regenerate.
29377 * optabs.def (vec_perm_const): Delete.
29378 * doc/md.texi (vec_perm_const): Likewise.
29379 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29380 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29381 expand_vec_perm for constant permutation vectors. Assert that
29382 the mode of variable permutation vectors is the integer equivalent
29383 of the mode that is being permuted.
29384 * optabs-query.h (selector_fits_mode_p): Declare.
29385 * optabs-query.c: Include vec-perm-indices.h.
29386 (selector_fits_mode_p): New function.
29387 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29388 is defined, instead of checking whether the vec_perm_const_optab
29389 exists. Use targetm.vectorize.vec_perm_const instead of
29390 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29391 fit in the vector mode before using a variable permute.
29392 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29393 vec_perm_indices instead of an rtx.
29394 (expand_vec_perm): Replace with...
29395 (expand_vec_perm_const): ...this new function. Take the selector
29396 as a vec_perm_indices rather than an rtx. Also take the mode of
29397 the selector. Update call to shift_amt_for_vec_perm_mask.
29398 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29399 Use vec_perm_indices::new_expanded_vector to expand the original
29400 selector into bytes. Check whether the indices fit in the vector
29401 mode before using a variable permute.
29402 (expand_vec_perm_var): Make global.
29403 (expand_mult_highpart): Use expand_vec_perm_const.
29404 * fold-const.c: Includes vec-perm-indices.h.
29405 * tree-ssa-forwprop.c: Likewise.
29406 * tree-vect-data-refs.c: Likewise.
29407 * tree-vect-generic.c: Likewise.
29408 * tree-vect-loop.c: Likewise.
29409 * tree-vect-slp.c: Likewise.
29410 * tree-vect-stmts.c: Likewise.
29411 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29413 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29414 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29415 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29416 (aarch64_vectorize_vec_perm_const): ...this new function.
29417 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29418 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29419 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29420 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29421 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29422 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29423 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29425 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29426 check for NEON modes.
29427 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29428 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29429 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29430 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29432 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29433 the old VEC_PERM_CONST conditions.
29434 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29435 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29436 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29437 (ia64_vectorize_vec_perm_const_ok): Merge into...
29438 (ia64_vectorize_vec_perm_const): ...this new function.
29439 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29440 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29441 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29442 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29443 * config/mips/mips.c (mips_expand_vec_perm_const)
29444 (mips_vectorize_vec_perm_const_ok): Merge into...
29445 (mips_vectorize_vec_perm_const): ...this new function.
29446 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29447 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29448 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29449 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29450 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29451 (rs6000_expand_vec_perm_const): Delete.
29452 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29454 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29455 (altivec_expand_vec_perm_const_le): Take each operand individually.
29456 Operate on constant selectors rather than rtxes.
29457 (altivec_expand_vec_perm_const): Likewise. Update call to
29458 altivec_expand_vec_perm_const_le.
29459 (rs6000_expand_vec_perm_const): Delete.
29460 (rs6000_vectorize_vec_perm_const_ok): Delete.
29461 (rs6000_vectorize_vec_perm_const): New function.
29462 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29463 an element count and rtx array.
29464 (rs6000_expand_extract_even): Update call accordingly.
29465 (rs6000_expand_interleave): Likewise.
29466 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29467 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29468 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29469 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29470 (rs6000_expand_vec_perm_const): Delete.
29471 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29472 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29473 (altivec_expand_vec_perm_const_le): Take each operand individually.
29474 Operate on constant selectors rather than rtxes.
29475 (altivec_expand_vec_perm_const): Likewise. Update call to
29476 altivec_expand_vec_perm_const_le.
29477 (rs6000_expand_vec_perm_const): Delete.
29478 (rs6000_vectorize_vec_perm_const_ok): Delete.
29479 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29480 reference to the SPE evmerge intructions.
29481 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29482 an element count and rtx array.
29483 (rs6000_expand_extract_even): Update call accordingly.
29484 (rs6000_expand_interleave): Likewise.
29485 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29486 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29488 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29490 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29492 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29493 vector mode and that that mode matches the mode of the data
29495 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29496 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29497 directly using expand_vec_perm_1 when forcing selectors into
29499 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29501 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29503 * optabs-query.h (can_vec_perm_p): Delete.
29504 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29505 * optabs-query.c (can_vec_perm_p): Split into...
29506 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29507 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29508 particular selector is valid.
29509 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29510 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29511 (vect_grouped_load_supported): Likewise.
29512 (vect_shift_permute_load_chain): Likewise.
29513 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29514 (vect_transform_slp_perm_load): Likewise.
29515 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29516 (vectorizable_bswap): Likewise.
29517 (vect_gen_perm_mask_checked): Likewise.
29518 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29519 implementations of variable permutation vectors into account
29520 when deciding which selector to use.
29521 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29522 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29523 with a false third argument.
29524 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29525 to test whether the constant selector is valid and can_vec_perm_var_p
29526 to test whether a variable selector is valid.
29528 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29530 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29531 * optabs-query.c (can_vec_perm_p): Likewise.
29532 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29533 instead of vec_perm_indices.
29534 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29535 (vect_gen_perm_mask_checked): Likewise,
29536 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29537 (vect_gen_perm_mask_checked): Likewise,
29539 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29541 * optabs-query.h (qimode_for_vec_perm): Declare.
29542 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29543 (qimode_for_vec_perm): ...this new function.
29544 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29546 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29548 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29549 does not have a conditional at the top.
29551 2018-01-02 Richard Biener <rguenther@suse.de>
29553 * ipa-inline.c (big_speedup_p): Fix expression.
29555 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29558 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29561 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29565 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29566 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29567 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29568 cond_taken_branch_cost 3->4.
29570 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29572 PR tree-optimization/83581
29573 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29574 TODO_cleanup_cfg if any changes have been made.
29576 PR middle-end/83608
29577 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29578 convert_modes if target mode has the right side, but different mode
29581 PR middle-end/83609
29582 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29583 last argument when extracting from CONCAT. If either from_real or
29584 from_imag is NULL, use expansion through memory. If result is not
29585 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29586 the parts directly to inner mode, if even that fails, use expansion
29589 PR middle-end/83623
29590 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29591 check for bswap in mode rather than HImode and use that in expand_unop
29594 Copyright (C) 2018 Free Software Foundation, Inc.
29596 Copying and distribution of this file, with or without modification,
29597 are permitted in any medium without royalty provided the copyright
29598 notice and this notice are preserved.