1 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3 * gcc/config/aarch64/falkor-tag-collision-avoidance.c
4 (execute_tag_collision_avoidance): Call df_note_add_problem.
6 2018-10-30 Martin Liska <mliska@suse.cz>
8 * doc/extend.texi: Fix typo in documentation
9 of __builtin_expect_with_probability.
11 2018-10-29 David Malcolm <dmalcolm@redhat.com>
14 * input.c (get_substring_ranges_for_loc): Detect if
15 linemap_resolve_location gives us a NULL map, and reject
18 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
20 * config.gcc (xstormy16-*-elf): Set tm_d_file.
22 2018-10-29 David Malcolm <dmalcolm@redhat.com>
23 Martin Sebor <msebor@redhat.com>
24 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
26 * doc/ux.texi (Quoting): New subsection, adapted from material at
27 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
28 MartinSebor and ManuelLopezIbanez.
29 (Fix-it hints): Note that fix-it hints shouldn't be marked for
32 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
35 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
38 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
40 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
42 2018-10-29 Paul Koning <ni1d@arrl.net>
44 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
46 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
48 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
49 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
50 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
51 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
52 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
53 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
54 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
55 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
56 Change 'vector' to '__vector'.
57 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
58 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
59 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
60 _mm_avg_pu16): Likewise. And, whitespace corrections.
62 2018-10-29 Richard Biener <rguenther@suse.de>
64 PR tree-optimization/87785
65 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
68 2018-10-29 Olivier Hainque <hainque@adacore.com>
70 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
72 2018-10-29 Olivier Hainque <hainque@adacore.com>
74 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
75 ports configuration macro, defaults to "gnu".
76 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
77 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
79 2018-10-29 Olivier Hainque <hainque@adacore.com>
81 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
83 2018-10-29 Richard Biener <rguenther@suse.de>
85 PR tree-optimization/87790
86 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
87 (vect_make_slp_decision): Adjust.
88 (vect_slp_analyze_bb_1): Likewise.
89 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
92 2018-10-29 Richard Biener <rguenther@suse.de>
94 PR tree-optimization/87785
95 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
97 (vect_build_slp_tree): Likewise.
98 (vect_gather_slp_loads): New function.
99 (vect_analyze_slp_instance): Gather loads separately from the
102 2018-10-29 Martin Liska <mliska@suse.cz>
104 * Makefile.in: Make dependency to json.o.
105 * doc/gcov.texi: Document new JSON format, remove
106 old intermediate format documentation.
107 * gcov.c (struct function_info): Come up with m_name and
109 (function_info::function_info): Initialize it.
110 (function_info::~function_info): Release it.
111 (main): Rename flag_intermediate_format to flag_json_format.
112 (print_usage): Describe --json-format.
113 (process_args): Set flag_json_format.
114 (output_intermediate_line): Remove.
115 (output_intermediate_json_line): Likewise.
116 (get_gcov_intermediate_filename): Return new extension
118 (output_intermediate_file): Implement JSON emission.
119 (output_json_intermediate_file): Implement JSON emission.
120 (generate_results): Use ::get_name for function name.
121 Handle JSON output file.
122 (read_graph_file): Use ::get_name instead of cplus_demangle.
123 (read_count_file): Likewise.
124 (solve_flow_graph): Likewise.
125 (add_line_counts): Likewise.
126 (accumulate_line_counts): Use new flag_json_format.
127 (output_function_details): Use ::get_name instead of cplus_demangle.
128 (output_lines): Likewise.
129 * json.cc (test_writing_literals): Add new tests.
130 * json.h (class literal): Add new boolean constructor.
132 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
134 PR rtl-optimization/87701
135 PR rtl-optimization/87780
136 * combine.c (make_more_copies): Rewrite.
138 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
140 * doc/generic.texi (ABSU_EXPR): Document.
141 * match.pd (absu(x)*absu(x) -> x*x): Handle.
142 (absu(absu(X)) -> absu(X)): Likewise.
143 (absu(-X) -> absu(X)): Likewise.
144 (absu(X) where X is nonnegative -> X): Likewise.
146 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
148 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
149 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
150 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
151 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
152 (s-tm-texi): Also check timestamp on d-target.def.
153 (generated_files): Add TM_D_H and d-target-hooks-def.h.
154 (build/genhooks.o): Also depend on D_TARGET_DEF.
155 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
157 * config/aarch64/aarch64-d.c: New file.
158 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
160 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
162 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
163 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
164 * config/arm/arm-d.c: New file.
165 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
166 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
167 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
168 * config/arm/t-arm (arm-d.o): New rule.
169 * config/default-d.c: New file.
170 * config/glibc-d.c: New file.
171 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
172 * config/i386/i386-d.c: New file.
173 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
174 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
175 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
176 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
177 * config/i386/t-i386 (i386-d.o): New rule.
178 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
179 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
180 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
181 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
182 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
183 * config/mips/mips-d.c: New file.
184 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
185 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
186 * config/mips/t-mips (mips-d.o): New rule.
187 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
188 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
189 * config/powerpcspe/powerpcspe-d.c: New file.
190 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
192 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
193 Support GNU D by using 0 as the language type.
194 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
195 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
196 * config/riscv/riscv-d.c: New file.
197 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
199 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
200 * config/riscv/t-riscv (riscv-d.o): New rule.
201 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
202 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
203 * config/rs6000/rs6000-d.c: New file.
204 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
206 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
207 Support GNU D by using 0 as the language type.
208 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
209 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
210 * config/s390/s390-d.c: New file.
211 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
212 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
213 * config/s390/t-s390 (s390-d.o): New rule.
214 * config/sparc/sparc-d.c: New file.
215 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
217 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
218 * config/sparc/t-sparc (sparc-d.o): New rule.
219 * config/t-glibc (glibc-d.o): New rule.
220 * configure: Regenerated.
221 * configure.ac (tm_d_file): New variable.
222 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
223 * doc/contrib.texi (Contributors): Add self for the D frontend.
224 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
225 * doc/install.texi (Configuration): Mention libphobos as an option for
226 --enable-shared. Mention d as an option for --enable-languages.
227 (Testing): Mention check-d as a target.
228 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
229 name suffixes. Mention d as a -x option.
230 * doc/sourcebuild.texi (Top Level): Mention libphobos.
231 * doc/standards.texi (Standards): Add section on D language.
232 * doc/tm.texi: Regenerated.
233 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
234 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
235 * dwarf2out.c (is_dlang): New function.
236 (gen_compile_unit_die): Use DW_LANG_D for D.
237 (declare_in_namespace): Return module die for D, instead of adding
238 extra declarations into the namespace.
239 (gen_namespace_die): Generate DW_TAG_module for D.
240 (gen_decl_die): Handle CONST_DECLSs for D.
241 (dwarf2out_decl): Likewise.
242 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
243 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
245 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
246 * genhooks.c: Include d/d-target.def.
248 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
251 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
252 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
253 (STACK_DYNAMIC_OFFSET): Likewise.
255 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
258 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
261 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
263 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
264 return type and other typos.
266 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
268 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
269 a shorter sequence with fewer branches.
270 (emit_final_str_compare_gpr): Ditto.
272 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
274 * config/rs6000/tmmintrin.h: New file.
275 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
277 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
279 * config/rs6000/mmintrin.h: Enable 32bit compilation.
280 * config/rs6000/xmmintrin.h: Likewise.
282 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
284 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
286 2018-10-26 Richard Biener <rguenther@suse.de>
288 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
290 (vect_mark_slp_stmts_relevant): Likewise.
291 (vect_detect_hybrid_slp_stmts): Likewise.
292 (vect_bb_slp_scalar_cost): Likewise.
293 (vect_remove_slp_scalar_calls): Likewise.
295 2018-10-26 Jan Hubicka <jh@suse.cz>
297 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
298 (warn_types_mismatch): Fix walk of DECL_NAME.
299 (odr_types_equivalent_p): Fix overactive assert.
301 2018-10-26 Richard Biener <rguenther@suse.de>
303 PR tree-optimization/87105
304 * tree-vectorizer.h (_slp_tree::refcnt): New member.
305 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
307 (vect_create_new_slp_node): Initialize refcnt to one.
309 (scalar_stmts_set_t, bst_fail): Remove.
310 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
311 (vect_build_slp_tree): Add bst_map argument and lookup
312 already created SLP nodes.
313 (vect_print_slp_tree): Handle a SLP graph, print SLP node
315 (vect_slp_rearrange_stmts): Handle a SLP graph.
316 (vect_analyze_slp_instance): Adjust and free SLP nodes from
317 the CSE map. Fix indenting.
318 (vect_schedule_slp_instance): Add short-cut.
320 2018-10-26 Martin Liska <mliska@suse.cz>
323 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
324 addr_expr and not with pointers.
326 2018-10-26 Jan Hubicka <jh@suse.cz>
328 * tree.c (free_lang_data_in_type): Only check main variants.
329 * ipa-devirt.c (warn_odr): Make static.
330 (types_same_for_odr): Drop strict variant.
331 (types_odr_comparable): Likewise.
332 (odr_or_derived_type_p): Look for main variants.
333 (odr_name_hasher::equal): Cleanup comment.
334 (odr_subtypes_equivalent): Add warn and warned arguments; check main
336 (type_variants_equivalent_p): break out from ...
337 (odr_types_equivalent): ... here; go for main variants where needed.
338 (warn_odr): ... here; turn static.
339 (warn_types_mismatch): Compare mangled names of main variants.
340 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
341 (type_with_linkage_p): Sanity check that we look at main variant.
342 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
343 * tree.h (types_same_for_odr): Drop strict argument.
345 2018-10-26 Richard Biener <rguenther@suse.de>
347 PR tree-optimization/87746
348 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
349 Simplify and fix WRT strided store groups with size not
350 equal to step in element count.
351 (vect_analyze_group_access_1): Dump the whole group.
353 2018-10-25 Carl Love <cel@us.ibm.com>
355 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
356 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
357 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
358 precicion entry for each overloaded builtin.
359 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
360 VSCEDPUO): Rename overloaded name.
361 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
362 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
363 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
364 define_expand for xscmpexqp instruction.
365 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
367 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
368 Jinsong Ji <jji@us.ibm.com>
370 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
371 function with vec_sl.
372 (_mm_slli_epi32): Likewise.
373 (_mm_slli_epi64): Likewise.
374 (_mm_srai_epi16): Replace deprecated function with vec_sra.
375 (_mm_srai_epi32): Likewise.
376 (_mm_srli_epi16): Replace deprecated function with vec_sr.
377 (_mm_srli_epi32): Likewise.
378 (_mm_srli_epi64): Likewise.
379 (_mm_sll_epi16): Replace deprecated function with vec_sl.
380 (_mm_sll_epi32): Likewise.
381 (_mm_sll_epi64): Likewise.
382 (_mm_sra_epi16): Replace deprecated function with vec_sra.
383 (_mm_sra_epi32): Likewise.
384 (_mm_srl_epi16): Replace deprecated function with vec_sr.
385 (_mm_srl_epi32): Likewise.
386 (_mm_srl_epi64): Likewise.
388 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
389 Jinsong Ji <jji@us.ibm.com>
391 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
392 comparison operators with vec_cmp* for compatibility due to
393 unfortunate history; clean up formatting and use types more
395 (_mm_sll_epi32): Likewise.
396 (_mm_sll_epi64): Likewise.
397 (_mm_srl_epi16): Likewise.
398 (_mm_srl_epi32): Likewise.
399 (_mm_srl_epi64): Likewise.
401 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
402 Jinsong Ji <jji@us.ibm.com>
404 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
405 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
406 __vector __bool int. Use vec_cmpgt in preference to deprecated
407 function vec_vcmpgtfp.
408 (_mm_max_ps): Likewise.
410 2018-10-25 Jeff Law <law@redhat.com>
412 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
415 2018-10-25 Martin Sebor <msebor@redhat.com>
417 * doc/extend.texi (aligned): Expand attribute description.
418 (Alignment): Rename section. Discuss function arguments.
420 2018-10-25 Jan Hubicka <jh@suse.cz>
422 * ipa-devirt.c (main_odr_variant): Remove.
423 (hash_odr_name, types_same_for_odr, types_odr_comparable,
424 odr_name_hasher::equal, odr_subtypes_equivalent_p):
425 Drop use of main_odr_variant.
426 (add_type_duplicate): Silence confused warnings on integer types.
427 (get_odr_type): Always look for main variant.
428 (register_odr_type): Simplify.
430 2018-10-25 Richard Biener <rguenther@suse.de>
432 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
433 Initialize ng to silence error with release checking bootstrap.
435 2018-10-25 Richard Biener <rguenther@suse.de>
437 * tree-if-conv.c: Include tree-ssa-sccvn.h.
438 (tree_if_conversion): Run CSE on the if-converted loop body.
440 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
442 * config/s390/constraints.md (ZL): New constraint.
443 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
445 * config/s390/s390.md (movdi_larl): Remove.
446 (movdi_64): Add the LARL alternative.
448 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
451 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
452 (RTX_CODE_HWINT_P): New macro.
453 (rtx_code_size): Use RTX_CODE_HWINT_P ().
455 2018-10-25 Jan Hubicka <jh@suse.cz>
457 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
460 2018-10-25 Richard Biener <rguenther@suse.de>
462 PR tree-optimization/87665
463 PR tree-optimization/87745
464 * tree-vectorizer.h (get_earlier_stmt): Remove.
465 (get_later_stmt): Pick up UID from the original non-pattern stmt.
467 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
469 * options.texi (Deprecated): Move list to Var section.
471 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
472 Jinsong Ji <jji@us.ibm.com>
474 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
475 __vector long to __vector long long.
476 (_mm_cvtpd_ps): Likewise.
477 (_mm_cvttpd_epi32): Likewise.
478 (_mm_cvtpi32_pd): Likewise.
479 (_mm_unpackhi_epi64): Likewise.
480 (_mm_unpacklo_epi64): Likewise.
482 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
484 PR rtl-optimization/87720
485 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
487 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
489 * gimple-ssa-isolate-paths.c
490 (find_implicit_erroneous_behavior): Do not change code if the
491 pass is running for warnings only.
492 (find_explicit_erroneous_behavior): Likewise.
494 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
496 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
497 Define as rs6000_mangle_decl_assembler_name.
498 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
499 long double to IEEE long double, switch the names of the long
500 double built-in functions to be <func>f128 instead of <func>l.
502 2018-10-24 Martin Sebor <msebor@redhat.com>
504 * doc/extend.texi (nonnull): List no-argument form. Reference
505 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
507 2018-10-24 Richard Biener <rguenther@suse.de>
509 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
511 2018-10-24 Martin Liska <mliska@suse.cz>
513 PR tree-optimization/84436
514 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
516 (switch_conversion::contains_linear_function_p): New.
517 (switch_conversion::build_one_array): Support linear
518 transformation on input.
519 * tree-switch-conversion.h (struct switch_conversion): Add
520 contains_linear_function_p declaration.
522 2018-10-24 Richard Biener <rguenther@suse.de>
524 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
525 if its argument is CONSTANT_CLASS_P.
527 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
529 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
530 it is wrong for forward declarations.
532 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
534 * config/s390/s390.c (s390_check_qrst_address): Add the missing
535 SYMBOL_REF_P () check.
537 2018-10-24 Richard Biener <rguenther@suse.de>
539 PR tree-optimization/87105
540 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
542 (vect_analyze_data_ref_accesses): Handle duplicate loads and
543 stores by splitting the affected group after the fact.
544 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
545 fail the SLP build because of size constraints.
547 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
549 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
550 * configure: Regenerate.
551 * config.in: Regenerate.
552 * varasm.c (mergeable_string_section): Use readonly_data_section
553 if linker doesn't support SHF_MERGE with alignment > 8.
554 (mergeable_constant_section): Likewise.
556 2018-10-24 Richard Biener <rguenther@suse.de>
558 PR tree-optimization/84013
559 * tree-ssa-structalias.c (struct msdi_data): New struct for
560 marshalling data to walk_stmt_load_store_ops.
561 (maybe_set_dependence_info): Refactor as callback for
562 walk_stmt_load_store_ops.
563 (compute_dependence_clique): Set restrict info on all stmt kinds.
565 2018-10-24 Martin Liska <mliska@suse.cz>
567 * cgraph.c (cgraph_node::dump):
568 Remove reduntant dumps and make tp_first_run dump more compact.
570 2018-10-24 Richard Biener <rguenther@suse.de>
572 PR tree-optimization/87665
573 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
576 2018-10-12 Jeff Law <law@redhat.com>
578 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
581 2018-10-23 Richard Biener <rguenther@suse.de>
583 * tree-vrp.c (add_assert_info): Guard dump_printf with
585 * gimple-ssa-evrp-analyze.c
586 (evrp_range_analyzer::record_ranges_from_incoming_edge):
587 Use value_range::ignore_equivs_equal_p.
589 2018-10-23 Richard Biener <rguenther@suse.de>
591 PR tree-optimization/87105
592 PR tree-optimization/87608
593 * passes.def (pass_all_early_optimizations): Add early phi-opt
595 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
596 addition to debug stmts.
597 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
598 and abs replacement early.
599 * tree-cfg.c (gimple_empty_block_p): Likewise.
601 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
604 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
605 specified to configure.
606 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
608 2018-10-23 Richard Biener <rguenther@suse.de>
610 PR tree-optimization/87700
611 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
613 2018-10-23 Jakub Jelinek <jakub@redhat.com>
616 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
617 second argument from __mmask16 to __mmask8.
618 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
619 _mm_mask_packs_epi32): Likewise.
620 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
622 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
624 2018-10-23 Richard Biener <rguenther@suse.de>
626 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
628 2018-10-23 Richard Biener <rguenther@suse.de>
630 PR tree-optimization/86144
631 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
634 2018-10-23 Richard Biener <rguenther@suse.de>
636 PR tree-optimization/87693
637 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
638 the case we do not find the taken edge.
640 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
641 Jinsong Ji <jji@us.ibm.com>
643 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
644 (_mm_store_pd): Use unaligned vector type for pointer cast.
645 (_mm_maskmoveu_si128): Likewise.
646 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
647 (_mm_store_ps): Use unaligned vector type for pointer cast.
649 2018-10-22 Paul Koning <ni1d@arrl.net>
651 * symtab.c (symtab_node::increase_alignment): Correct max
654 2018-10-22 Yury Gribov <tetra2005@gmail.com>
656 PR tree-optimization/87633
657 * match.pd: Do not generate unordered integer comparisons.
659 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
661 PR rtl-optimization/87600
662 * combine.c: Add include of expr.h.
663 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
664 register to a pseudo.
665 (make_more_copies): New function, add a copy to a new pseudo after
666 the moves from hard registers into pseudos.
667 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
668 later. Call make_more_copies.
670 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
672 * lra-constraints.c (process_alt_operands): New local array,
673 matching_early_clobber. Check matching_early_clobber before
674 decrementing reject, and set matching_early_clobber after.
676 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
679 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
680 call output_addr_const and hope for the best.
682 2018-10-22 Richard Biener <rguenther@suse.de>
684 * gimple-ssa-evrp-analyze.c
685 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
686 smarter about what ranges to use.
687 * tree-vrp.c (add_assert_info): Dump here.
688 (register_edge_assert_for_2): Instead of here at multiple but
691 * gcc.dg/tree-ssa/evrp12.c: New testcase.
692 * gcc.dg/predict-6.c: Adjust.
693 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
694 * gcc.dg/tree-ssa/vrp02.c: Likewise.
695 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
697 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
698 Richard Biener <rguenther@suse.de>
700 * bitmap.h: Update data structure documentation, including a
701 description of bitmap views as either linked-lists or splay trees.
702 (struct bitmap_element_def): Update comments for splay tree bitmaps.
703 (struct bitmap_head_def): Likewise.
704 (bitmap_list_view, bitmap_tree_view): New prototypes.
705 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
707 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
708 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
709 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
710 released bitmap element here.
711 (bitmap_element_free): Remove.
712 (bitmap_elt_clear_from): Work on splay tree bitmaps.
713 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
714 this function similar ones such that linked-list bitmap implementation
715 functions are grouped.
716 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
717 and moved for grouping.
718 (bitmap_list_insert_element_after): Renamed from
719 bitmap_elt_insert_after, and moved for grouping.
720 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
721 (bitmap_tree_link_left, bitmap_tree_link_right,
722 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
723 bitmap_tree_link_element, bitmap_tree_unlink_element,
724 bitmap_tree_find_element): New functions for splay-tree bitmap
726 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
727 Renamed and moved, see above entries.
728 (bitmap_tree_listify_from): New function to convert part of a splay
729 tree bitmap to a linked-list bitmap.
730 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
731 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
732 (bitmap_find_bit): Remove.
733 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
734 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
735 Handle splay tree bitmaps.
736 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
737 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
738 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
739 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
740 bitmap_intersect_compl_p, bitmap_ior_and_compl,
741 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
742 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
743 corresponding changes to use linked-list specific bitmap_element
744 manipulation functions as applicable for efficiency.
745 (bitmap_tree_to_vec): New function.
746 (debug_bitmap_elt_file): New function split out from ...
747 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
748 (bitmap_print): Likewise.
750 PR tree-optimization/63155
751 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
753 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
756 2018-10-22 Martin Liska <mliska@suse.cz>
758 PR tree-optimization/87686
760 2018-08-29 Martin Liska <mliska@suse.cz>
762 * tree-switch-conversion.c (switch_conversion::expand):
763 Strenghten assumption about gswitch statements.
765 2018-10-22 Martin Liska <mliska@suse.cz>
767 * ipa-icf.c (sem_item::compare_attributes): Remove.
768 (sem_item::compare_referenced_symbol_properties): Use
769 attribute_list_equal instead.
770 (sem_function::equals_wpa): Likewise.
771 * ipa-icf.h: Remove compare_attributes.
773 2018-10-22 Richard Biener <rguenther@suse.de>
776 * mem-stats.h (mem_usage::operator==): Fix pasto.
778 2018-10-22 Richard Biener <rguenther@suse.de>
780 PR tree-optimization/87640
781 * tree-vrp.c (set_value_range_with_overflow): Decompose
783 (extract_range_from_binary_expr_1): Adjust.
785 2018-10-22 Martin Jambor <mjambor@suse.cz>
787 * tree-eh.h (stmt_could_throw_p): Add function parameter.
788 (stmt_can_throw_external): Likewise.
789 (stmt_can_throw_internal): Likewise.
790 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
791 (lower_eh_constructs_2): Likewise.
792 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
793 (stmt_can_throw_external): Likewise.
794 (stmt_can_throw_internal): Likewise.
795 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
796 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
797 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
798 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
799 (pass_lower_eh_dispatch::execute): Pass cfun to
800 stmt_can_throw_external.
801 (cleanup_empty_eh): Likewise.
802 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
803 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
804 stmt_can_throw_external instead of pushing it to cfun.
805 (symbol_table::create_edge): Likewise.
806 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
807 stmt_can_throw_internal.
808 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
809 to stmt_could_throw_p.
810 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
811 stmt_can_throw_internal.
812 (pass_store_merging::execute): Likewise.
813 * gimple-ssa-strength-reduction.c
814 (find_candidates_dom_walker::before_dom_children): Pass cfun to
816 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
817 stmt_can_throw_internal.
818 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
819 to stmt_can_throw_external.
820 (check_stmt): Pass cfun to stmt_could_throw_p.
821 (check_stmt): Pass cfun to stmt_can_throw_external.
822 (pass_nothrow::execute): Likewise.
823 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
824 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
825 stmt_can_throw_internal.
826 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
827 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
828 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
829 * tree-complex.c (expand_complex_libcall): Pass cfun to
830 stmt_could_throw_p and to stmt_can_throw_internal.
831 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
832 * tree-inline.c (copy_edges_for_bb): Likewise.
833 (maybe_move_debug_stmts_to_successors): Likewise.
834 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
836 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
837 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
838 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
839 stmt_can_throw_internal.
840 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
841 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
843 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
844 stmt_can_throw_internal.
845 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
846 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
848 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
849 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
850 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
851 (convert_mult_to_fma_1): Likewise.
852 (convert_to_divmod): Likewise.
853 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
854 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
855 * tree-ssa-propagate.c
856 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
857 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
858 (maybe_optimize_range_tests): Likewise.
859 (linearize_expr_tree): Likewise.
860 (reassociate_bb): Likewise.
861 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
862 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
863 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
864 (handle_char_store): Likewise.
865 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
866 stmt_can_throw_internal.
867 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
869 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
870 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
871 (vectorizable_simd_clone_call): Likewise.
872 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
873 (gimple_stringop_fixed_value): Likewise.
875 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
877 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
878 literal pool references.
879 (s390_check_qrst_address): Adapt to the new behavior of
880 s390_loadrelative_operand_p ().
882 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
885 * config/i386/sse.md (*andnot<mode>3_bcst): New.
887 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
890 * config/i386/sse.md (*<code><mode>3_bcst): New.
892 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
895 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
896 V4DI, V16SI and V8DI.
897 (*sub<mode>3<mask_name>_bcst): New.
898 (*add<mode>3<mask_name>_bcst): Likewise.
900 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
901 Jinsong Ji <jji@us.ibm.com>
903 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
904 __m64 with __vector unsigned long long for compatibility.
905 (_mm_movemask_epi8): Likewise.
906 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
907 (_mm_cvttps_pi32): Likewise.
908 (_mm_cvtpi32_ps): Likewise.
909 (_mm_cvtps_pi16): Likewise.
910 (_mm_loadh_pi): Likewise.
911 (_mm_storeh_pi): Likewise.
912 (_mm_movehl_ps): Likewise.
913 (_mm_movelh_ps): Likewise.
914 (_mm_loadl_pi): Likewise.
915 (_mm_storel_pi): Likewise.
916 (_mm_movemask_ps): Likewise.
917 (_mm_shuffle_pi16): Likewise.
919 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
922 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
923 __builtin_ia32_vfnmsubpd512_mask.
924 (_mm512_mask_fnmsub_round_pd): Likewise.
925 (_mm512_fnmsub_pd): Likewise.
926 (_mm512_mask_fnmsub_pd): Likewise.
927 (_mm512_maskz_fnmsub_round_pd): Use
928 __builtin_ia32_vfnmsubpd512_maskz.
929 (_mm512_maskz_fnmsub_pd): Likewise.
930 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
931 (_mm512_mask_fnmsub_round_ps): Likewise.
932 (_mm512_fnmsub_ps): Likewise.
933 (_mm512_mask_fnmsub_ps): Likewise.
934 (_mm512_maskz_fnmsub_round_ps): Use
935 __builtin_ia32_vfnmsubps512_maskz.
936 (_mm512_maskz_fnmsub_ps): Likewise.
937 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
938 __builtin_ia32_vfnmsubpd256_mask.
939 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
940 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
941 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
942 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
943 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
944 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
945 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
946 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
947 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
948 __builtin_ia32_vfnmsubpd.
949 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
950 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
951 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
952 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
953 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
954 * config/i386/i386-builtin.def: Add
955 __builtin_ia32_vfnmsubpd256_mask,
956 __builtin_ia32_vfnmsubpd256_maskz,
957 __builtin_ia32_vfnmsubpd128_mask,
958 __builtin_ia32_vfnmsubpd128_maskz,
959 __builtin_ia32_vfnmsubps256_mask,
960 __builtin_ia32_vfnmsubps256_maskz,
961 __builtin_ia32_vfnmsubps128_mask,
962 __builtin_ia32_vfnmsubps128_maskz,
963 __builtin_ia32_vfnmsubpd512_mask,
964 __builtin_ia32_vfnmsubpd512_maskz,
965 __builtin_ia32_vfnmsubps512_mask,
966 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
967 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
968 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
969 __builtin_ia32_vfnmsubpd256.
970 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
971 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
972 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
974 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
976 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
978 (fmai_vmfnmsub_<mode><round_name>): Likewise.
980 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
983 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
984 __builtin_ia32_vfnmaddpd512_mask.
985 (_mm512_mask_fnmadd_round_pd): Likewise.
986 (_mm512_fnmadd_pd): Likewise.
987 (_mm512_mask_fnmadd_pd): Likewise.
988 (_mm512_maskz_fnmadd_round_pd): Use
989 __builtin_ia32_vfnmaddpd512_maskz.
990 (_mm512_maskz_fnmadd_pd): Likewise.
991 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
992 (_mm512_mask_fnmadd_round_ps): Likewise.
993 (_mm512_fnmadd_ps): Likewise.
994 (_mm512_mask_fnmadd_ps): Likewise.
995 (_mm512_maskz_fnmadd_round_ps): Use
996 __builtin_ia32_vfnmaddps512_maskz.
997 (_mm512_maskz_fnmadd_ps): Likewise.
998 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
999 __builtin_ia32_vfnmaddpd256_mask.
1000 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1001 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1002 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1003 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1004 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1005 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1006 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1007 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1008 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1009 __builtin_ia32_vfnmaddpd.
1010 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1011 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1012 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1013 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1014 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1015 * config/i386/i386-builtin.def: Add
1016 __builtin_ia32_vfnmaddpd256_mask,
1017 __builtin_ia32_vfnmaddpd256_maskz,
1018 __builtin_ia32_vfnmaddpd128_mask,
1019 __builtin_ia32_vfnmaddpd128_maskz,
1020 __builtin_ia32_vfnmaddps256_mask,
1021 __builtin_ia32_vfnmaddps256_maskz,
1022 __builtin_ia32_vfnmaddps128_mask,
1023 __builtin_ia32_vfnmaddps128_maskz,
1024 __builtin_ia32_vfnmaddpd512_mask,
1025 __builtin_ia32_vfnmaddpd512_maskz,
1026 __builtin_ia32_vfnmaddps512_mask,
1027 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1028 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1029 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1030 __builtin_ia32_vfnmaddpd256.
1031 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1032 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1033 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1035 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1037 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1039 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1041 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1044 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1045 __builtin_ia32_vfmsubpd512_mask.
1046 (_mm512_mask_fmsub_round_pd): Likewise.
1047 (_mm512_fmsub_pd): Likewise.
1048 (_mm512_mask_fmsub_pd): Likewise.
1049 (_mm512_maskz_fmsub_round_pd): Use
1050 __builtin_ia32_vfmsubpd512_maskz.
1051 (_mm512_maskz_fmsub_pd): Likewise.
1052 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1053 (_mm512_mask_fmsub_round_ps): Likewise.
1054 (_mm512_fmsub_ps): Likewise.
1055 (_mm512_mask_fmsub_ps): Likewise.
1056 (_mm512_maskz_fmsub_round_ps): Use
1057 __builtin_ia32_vfmsubps512_maskz.
1058 (_mm512_maskz_fmsub_ps): Likewise.
1059 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1060 __builtin_ia32_vfmsubpd256_mask.
1061 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1062 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1063 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1064 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1065 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1066 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1067 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1068 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1069 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1070 __builtin_ia32_vfmsubpd.
1071 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1072 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1073 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1074 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1075 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1076 * config/i386/i386-builtin.def: Add
1077 __builtin_ia32_vfmsubpd256_mask,
1078 __builtin_ia32_vfmsubpd256_maskz,
1079 __builtin_ia32_vfmsubpd128_mask,
1080 __builtin_ia32_vfmsubpd128_maskz,
1081 __builtin_ia32_vfmsubps256_mask,
1082 __builtin_ia32_vfmsubps256_maskz,
1083 __builtin_ia32_vfmsubps128_mask,
1084 __builtin_ia32_vfmsubps128_maskz,
1085 __builtin_ia32_vfmsubpd512_mask,
1086 __builtin_ia32_vfmsubpd512_maskz,
1087 __builtin_ia32_vfmsubps512_mask,
1088 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1089 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1090 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1091 __builtin_ia32_vfmsubpd256.
1092 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1093 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1094 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1096 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1098 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1100 (fmai_vmfmsub_<mode><round_name>): Likewise.
1102 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1104 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1105 Remove plus. Renamed to ...
1106 (*sub<mode>3<mask_name>_bcst): This.
1107 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1108 (*add<mode>3<mask_name>_bcst): This.
1110 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1113 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1115 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1118 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1119 (_mm_or_epi32): Likewise.
1120 (_mm256_xor_epi32): Likewise.
1121 (_mm_xor_epi32): Likewise.
1122 (_mm256_or_epi64): Likewise.
1123 (_mm_or_epi64): Likewise.
1124 (_mm256_xor_epi64): Likewise.
1125 (_mm_xor_epi64): Likewise.
1127 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1130 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1132 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1135 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1137 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1139 * doc/ux.texi: Move @section directly after @node.
1141 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1145 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1146 depend closely nested inside of loop with ordered clause with
1149 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1151 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1152 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1153 * doc/ux.texi: New file.
1155 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1157 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1158 be the first CR field allocated.
1160 2018-10-19 Richard Biener <rguenther@suse.de>
1163 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1164 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1166 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1169 * config/i386/sse.md
1170 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1171 (*add<mode>3<mask_name>_bcst_2): Likewise.
1173 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1175 * config/i386/sse.md
1176 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1177 Replace nonimmediate_operand with register_operand.
1178 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1180 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1183 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1185 PR rtl-optimization/87596
1186 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1187 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1188 for instructions in FROM..TO range.
1190 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1192 * cfgexpand.c (expand_one_var): Use specific wording in error message
1193 for non-local frame variables.
1194 * stor-layout.c (layout_decl): Do not issue a warning for them.
1196 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1198 * haifa-sched.c (priority): Add force_recompute parameter.
1199 (apply_replacement): Call priority () with force_recompute = true.
1200 (restore_pattern): Likewise.
1202 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1204 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1205 HOST_BITS_PER_WIDE_INT.
1206 (test_vector_ops_duplicate): Likewise.
1208 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1211 * config/i386/sse.md (VF_AVX512): New.
1212 (avx512bcst): Likewise.
1213 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1215 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1217 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1220 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1222 * doc/invoke.texi (-dumpversion): Improve grammar.
1223 (-dumpfullversion): Make more consistent with -dumpversion.
1225 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1227 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1228 Set JUMP_LABEL to the jump insn.
1229 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1230 Predict emitted jump and add label to jump insn.
1232 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1234 PR tree-optimization/87562
1235 * input.c (get_substring_ranges_for_loc): Use
1236 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1237 getting the linemap for the endpoint. Verify that it's either
1238 in the same linemap as the start point's spelling location, or
1239 at least in the same file.
1241 2018-10-18 Richard Biener <rguenther@suse.de>
1243 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1244 feed width-specific load/store costs through ix86_vec_cost.
1245 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1246 (k8_cost): Likewise.
1247 (bdver_cost): Likewise.
1248 (znver1_cost): Likewise.
1249 (btver1_cost): Likewise.
1250 (btver2_cost): Likewise.
1252 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1254 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1255 to simplify subreg of vec_merge.
1257 2018-10-18 Richard Biener <rguenther@suse.de>
1259 * config/i386/i386.c: Fix costing of vector FMA.
1261 2018-10-18 Richard Biener <rguenther@suse.de>
1263 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1265 (ix86_builtin_vectorization_cost): For vec_construct properly
1266 cost insertion into SSE regs.
1267 (...): Adjust calls to ix86_vec_cost.
1269 2018-10-18 Richard Biener <rguenther@suse.de>
1273 2018-02-07 Richard Biener <rguenther@suse.de>
1275 PR tree-optimization/84204
1276 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1279 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1282 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1284 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1285 VEC_MERGE of a VEC_DUPLICATE.
1287 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1289 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1290 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1291 * doc/standards.texi (C Language): Document C2X.
1292 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1293 (rl78_option_override): Handle "GNU C2X" language name.
1295 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1297 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1298 Document C17 as published in 2018.
1300 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1303 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1304 bail out if both sides do not have the same storage order.
1306 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1308 * bitmap.c (bitmap_head::dump): New.
1309 * bitmap.h (bitmap_head): Add dump().
1310 * gimple-ssa-evrp-analyze.c
1311 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1312 (evrp_range_analyzer::set_ssa_range_info): Same.
1313 (evrp_range_analyzer::record_ranges_from_phis): Same.
1314 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1315 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1316 * gimple-ssa-sprintf.c (get_int_range): Same.
1317 (format_integer): Same.
1318 (sprintf_dom_walker::handle_gimple_call): Same.
1319 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1320 (ipcp_vr_lattice::top_p): Same.
1321 (ipcp_vr_lattice::bottom_p): Same.
1322 (ipcp_vr_lattice::set_to_bottom): Same.
1323 (ipa_vr_operation_and_type_effects): Same.
1324 (propagate_vr_across_jump_function): Same.
1325 (ipcp_store_vr_results): Same.
1326 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1327 (ipa_print_node_jump_functions_for_edge): Same.
1328 (ipa_get_value_range): Same.
1329 (ipa_compute_jump_functions_for_edge): Same.
1330 (ipa_write_jump_function): Same.
1331 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1332 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1334 * vr-values.c (set_value_range_to_nonnegative): Same.
1335 (set_value_range_to_truthvalue): Same.
1336 (vr_values::get_value_range): Same.
1337 (vr_values::set_defs_to_varying): Same.
1338 (vr_values::update_value_range): Same.
1339 (symbolic_range_based_on_p): Same.
1340 (vr_values::op_with_boolean_value_range_p): Same.
1341 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1342 (vr_values::extract_range_from_ssa_name): Same.
1343 (vr_values::extract_range_from_binary_expr): Same.
1344 (vr_values::extract_range_from_unary_expr): Same.
1345 (vr_values::extract_range_from_cond_expr): Same.
1346 (vr_values::extract_range_from_comparison): Same.
1347 (vr_values::check_for_binary_op_overflow): Same.
1348 (vr_values::extract_range_basic): Same.
1349 (vr_values::extract_range_from_assignment): Same.
1350 (compare_ranges): Same.
1351 (compare_range_with_value): Same.
1352 (vr_values::adjust_range_with_scev): Same.
1353 (vrp_valueize): Same.
1354 (vrp_valueize_1): Same.
1355 (vr_values::get_vr_for_comparison): Same.
1356 (vr_values::compare_name_with_value): Same.
1357 (vr_values::compare_names): Same.
1358 (vr_values::vrp_evaluate_conditional): Same.
1359 (find_case_label_ranges): Same.
1360 (vr_values::vrp_visit_switch_stmt): Same.
1361 (vr_values::extract_range_from_phi_node): Same.
1362 (vr_values::simplify_div_or_mod_using_ranges): Same.
1363 (vr_values::simplify_bit_ops_using_ranges): Same.
1364 (test_for_singularity): Same.
1365 (range_fits_type_p): Same.
1366 (vr_values::simplify_cond_using_ranges_1): Same.
1367 (vr_values::simplify_switch_using_ranges): Same.
1368 (vr_values::simplify_float_conversion_using_ranges): Same.
1369 (vr_values::two_valued_val_range_p): Same.
1370 (vr_values::add_equivalence): Move to value_range::equiv_add.
1371 * vr-values.h (vr_values::add_equivalence): Remove.
1372 (VR_INITIALIZER): Remove.
1373 * tree-vrp.c (value_range::set): New.
1374 (value_range::equiv_add): New.
1375 (value_range::value_range): New.
1376 (value_range::deep_copy): New.
1377 (value_range::check): New.
1378 (value_range::equal_p): New.
1379 (value_range::ignore_equivs_equal_p): New.
1380 (value_range::operator==): New.
1381 (value_range::operator!=): New.
1382 (value_range::symbolic_p): New.
1383 (value_range::numeric_p): New.
1384 (value_range::set_undefined): New.
1385 (value_range::set_varying): New.
1386 (value_range::may_contain_p): New.
1387 (value_range::equiv_clear): New.
1388 (value_range::singleton_p): New.
1389 (value_range::intersect): New.
1390 (value_range::dump): New.
1391 (value_range::set_and_canonicalize): New.
1392 (set_value_range): Adjust for value_range API.
1393 (set_value_range_to_undefined): Same.
1394 (set_value_range_to_varying): Same.
1395 (set_and_canonicalize_value_range): Same.
1396 (set_value_range_to_nonnull): Same.
1397 (set_value_range_to_null): Same.
1398 (range_is_null): Same.
1399 (range_is_nonnull): Same.
1400 (range_int_cst_p): Same.
1401 (range_int_cst_singleton_p): Same.
1402 (symbolic_range_p): Same.
1403 (range_includes_zero_p): Same.
1404 (value_range_constant_singleton): Same.
1405 (vrp_set_zero_nonzero_bits): Same.
1406 (ranges_from_anti_range): Same.
1407 (extract_range_into_wide_ints): Same.
1408 (extract_range_from_multiplicative_op): Same.
1409 (set_value_range_with_overflow): Same.
1410 (extract_range_from_binary_expr_1): Same.
1411 (extract_range_from_unary_expr): Same.
1412 (dump_value_range): Same.
1413 (debug_value_range): Same.
1414 (vrp_prop::check_array_ref): Same.
1415 (vrp_prop::check_mem_ref): Same.
1416 (vrp_prop::vrp_initialize): Same.
1417 (vrp_prop::visit_stmt): Same.
1418 (intersect_ranges): Same.
1419 (vrp_prop::visit_phi): Same.
1420 (vrp_prop::vrp_finalize): Same.
1421 (determine_value_range_1): Same.
1422 (determine_value_range): Same.
1423 (vrp_intersect_ranges_1): Rename to...
1424 (vrp_intersect_1): this.
1425 (vrp_intersect_ranges): Rename to...
1426 (value_range::intersect_helper): ...this.
1427 (vrp_meet_1): Rename to...
1428 (value_range::union_helper): ...this.
1429 (vrp_meet): Rename to...
1430 (value_range::union_): ...this.
1431 (copy_value_range): Remove.
1432 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1433 (value_range::vrtype): New.
1434 (value_range::type): New.
1435 (value_range::equiv): New.
1436 (value_range::min): New.
1437 (value_range::max): New.
1438 (value_range::varying_p): New.
1439 (value_range::undefined_p): New.
1440 (value_range::null_p): New.
1441 (value_range::equiv_add): New.
1442 (copy_value_range): Remove.
1444 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1446 * Makefile.in (SELFTEST_TARGETS): New.
1447 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1448 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1449 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1451 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1452 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1454 * configure: Regenerate.
1455 * configure.ac (selftest_languages): New.
1457 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1459 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1460 overflow wraps argument.
1461 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1462 wide_int_range_multiplicative_op.
1463 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1464 overflow wraps argument.
1465 (wide_int_range_multiplicative_op): Same.
1466 (wide_int_range_lshift): Same.
1467 (wide_int_range_div): Same.
1468 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1469 (wide_int_range_lshift): Same.
1470 (wide_int_range_div): Same.
1472 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1474 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1475 use sign as argument.
1476 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1477 wide_int_range_shift_undefined_p.
1479 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1481 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1483 (@despeculate_copy<ALLI_TI:mode>): ... This.
1484 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1487 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1489 * config.gcc: Obsolete *-*-solaris2.10*.
1490 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1492 2018-10-12 Jeff Law <law@redhat.com>
1494 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1495 reg + sym +- const_int addressing modes.
1497 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1499 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1500 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1502 (layout::start_annotation_line): Only print up to 3 of the
1503 margin character, to avoid touching the left-hand side.
1504 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1505 minimum margin width, as set by test_diagnostic_context's ctor.
1506 (selftest::test_fixit_insert_containing_newline): Likewise.
1507 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1508 (selftest::test_line_numbers_multiline_range): Clear
1509 dc.min_margin_width.
1510 * diagnostic.c (diagnostic_initialize): Initialize
1512 * diagnostic.h (struct diagnostic_context): Add field
1514 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1515 * opts.c (common_handle_option): Handle
1516 OPT_fdiagnostics_minimum_margin_width_.
1517 * selftest-diagnostic.c
1518 (selftest::test_diagnostic_context::test_diagnostic_context):
1519 Initialize min_margin_width to 6.
1520 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1522 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1524 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1525 Fix usage of "error_at_rich_loc" in the comment.
1527 2018-10-15 Renlin Li <renlin.li@arm.com>
1530 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1531 if-conversioned loop when it contains ifn with types not
1532 supported by backend.
1533 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1534 (direct_internal_fn_supported_p): New helper function.
1535 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1537 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1540 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1541 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1542 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1544 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1546 PR tree-optimization/87022
1547 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1548 bits in dist vector rather than the first one.
1550 2018-10-15 Richard Biener <rguenther@suse.de>
1553 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1554 (visit_loadstore): When a used restrict tag escaped verify that
1555 the points-to solution of "other" pointers do not include
1557 (compute_dependence_clique): If a used restrict tag escaped
1558 communicated that down to visit_loadstore.
1560 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1562 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1563 into reg if it isn't a general operand.
1565 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1568 * config/i386/sse.md (*vec_dupv2di): Add register source to
1571 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1574 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1575 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1576 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1577 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1579 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1581 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1582 (notice_args_size): Set it in the current trace if no insn that can
1583 throw internally has been seen yet.
1584 (connect_traces): When connecting args_size between traces, allow the
1585 incoming values not to match if there is an insn setting it before the
1586 first insn that can throw internally; in that case, force the creation
1587 of a CFI note on this latter insn.
1589 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1591 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1592 the base class, because using the injected-class-name was not clearly
1593 specified until DR 176.
1595 2018-10-12 Paul Koning <ni1d@arrl.net>
1597 * config/pdp11/pdp11.md (doloop_end): New expander.
1598 (doloop_end_insn): renamed from "doloop_end".
1599 (addqi3): New pattern.
1600 (subqi3): New pattern.
1601 * config/pdp11/predicates.md (incdec_operand): New predicate.
1603 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1606 * real.c (format_helper::can_represent_integral_type_p): New function
1607 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1608 * match.pd: New pattern.
1610 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1612 * configure.ac: Introduce --enable-large-address-aware
1613 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1614 * doc/install.texi: Document it.
1615 * configure, config.in: Rebuilt.
1616 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1617 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1618 (LINK_SPEC): Insert it.
1619 * config/i386/mingw-264.h: Likewise.
1621 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1623 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1625 PR rtl-optimization/87600
1626 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1628 2018-10-12 Paul Koning <ni1d@arrl.net>
1630 * doc/md.texi (doloop_end): Document that the pattern code may
1631 need to check operand mode.
1633 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1635 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1636 to zero-extend between int and floating-point registers.
1637 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1638 ldp into floating-point registers. Add type and arch attributes.
1639 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1640 Use f_loads for type attribute.
1642 2018-10-11 Martin Sebor <msebor@redhat.com>
1644 * doc/extend.texi (attribute packed): Correct typos.
1646 2018-10-11 Martin Sebor <msebor@redhat.com>
1648 * doc/extend.texi (attribute flatten): Mention interaction with
1651 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1654 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1655 Set new_decl virtual flag to zero.
1657 2018-10-11 Martin Sebor <msebor@redhat.com>
1660 * doc/extend.texi (attribute format_arg): Discuss using multiple
1661 attributes on a single function.
1663 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1665 PR tree-optimization/86829
1666 * match.pd (sin (atan (x))): New simplification rules.
1667 (cos (atan (x))): Likewise.
1668 * real.c (build_sinatan_real): New function.
1669 * real.h (build_sinatan_real): Prototype.
1671 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1673 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1675 (fold_mergeeo_helper): New helper function.
1676 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1677 intrinsics. Correct some whitespace indentation issues.
1679 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1682 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1683 Use HOST_WIDE_INT_1U for shift.
1685 2018-10-11 Doug Rupp <rupp@adacore.com>
1686 Olivier Hainque <hainque@adacore.com>
1688 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1689 Pass --relax to the linker for RTPs.
1690 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1692 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1693 Jan Hubicka <jh@suse.cz>
1694 Martin Jambor <mjambor@suse.cz>
1696 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1697 the same elements are repeated rather than printing all of them.
1698 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1699 "repeated" elements.
1700 * read-rtl-function.c (test_loading_repeat): New function.
1701 (read_rtl_function_c_tests): Call test_loading_repeat.
1702 * rtl-tests.c (test_dumping_repeat): New function.
1703 (rtl_tests_c_tests): Call test_dumping_repeat.
1705 2018-10-11 Richard Biener <rguenther@suse.de>
1707 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1708 bdver?_cost): Unify to ...
1709 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1710 * config/i386/i386.c (processor_cost_table): Adjust.
1712 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
1715 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1716 the thunk when expanding to GIMPLE.
1718 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
1720 * varasm.c (mergeable_string_section): Don't try to move zero-length
1721 strings to the merge section.
1723 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
1726 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1728 2018-10-10 Jakub Jelinek <jakub@redhat.com>
1731 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1732 to special_args set.
1734 2018-10-10 Richard Biener <rguenther@suse.de>
1736 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1737 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1738 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1739 and recursing and pattern terminating the recursion on SSE
1740 vector width using ix86_expand_reduc.
1741 (reduc_sminmax_scal_<mode>): Split into part reducing to half
1742 width and recursing and SSE2 vector variant doing the final
1743 reduction with ix86_expand_reduc.
1744 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1745 with terminating the recursion at AVX level, splitting that
1748 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1750 * genmatch.c (error_cb): Rename to...
1751 (diagnostic_cb): ...this, converting int params to enums.
1752 (fatal_at): Update for renaming.
1753 (warning_at): Likewise.
1755 * input.c (selftest::ebcdic_execution_charset::apply):
1756 Update for renaming of...
1757 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1759 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1760 converting level and reason to enums.
1761 (class selftest::lexer_error_sink): Rename to...
1762 (class selftest::lexer_test_options): ...this, renaming field
1763 "m_errors" to "m_diagnostics".
1764 (selftest::lexer_test_options::apply): Update for renaming of...
1765 (selftest::lexer_test_options::on_error): ...this, renaming to...
1766 (selftest::lexer_test_options::on_diagnostic): ...this
1767 converting level and reason to enums.
1768 (selftest::test_lexer_string_locations_raw_string_unterminated):
1769 Update for renamings.
1770 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1773 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
1775 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1776 * config/rs6000/pmmintrin.h: New file.
1778 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
1780 PR tree-optimization/86659
1781 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1783 2018-10-09 Richard Biener <rguenther@suse.de>
1785 PR tree-optimization/63155
1786 * tree-ssa-structalias.c: Include tree-ssa.h.
1787 (get_constraint_for_ssa_var): For undefs return nothing_id.
1788 (find_func_aliases): Cleanup PHI handling.
1790 2018-10-09 Richard Biener <rguenther@suse.de>
1792 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1795 2018-10-09 Martin Liska <mliska@suse.cz>
1797 * asan.c (asan_emit_stack_protection): If a stack variable
1798 is located in a same file as current function, then emit
1799 line info into variable definition string.
1801 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1803 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1806 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1808 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1811 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
1813 PR tree-optimization/86659
1814 * gimple-match.h (struct gimple_match_op): Add reverse field.
1815 (gimple_match_op::set_op): New overloaded method.
1816 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1817 the REF_REVERSE_STORAGE_ORDER flag on the value.
1818 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1819 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1821 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1824 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1825 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1827 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
1830 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1831 Defined with __builtin_ia32_vfmaddsubpd512_mask.
1833 2018-10-08 Richard Biener <rguenther@suse.de>
1835 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1836 cost the same as AVX128 ones.
1838 2018-10-08 Paul Koning <ni1d@arrl.net>
1840 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1841 (expand_block_move): New function.
1842 * config/pdp11/pdp11.c (output_block_move): Remove.
1843 (expand_block_move): New function.
1844 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1845 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1846 (*movmemhi1): Remove.
1848 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
1850 * config/s390/2827.md: Increase latencies for some FP instructions.
1852 2018-10-08 Richard Biener <rguenther@suse.de>
1854 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1856 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1857 * tree-vectorizer.h (dump_stmt_cost): Adjust.
1858 (add_stmt_cost): Dump return value of the hook.
1860 2018-10-08 Richard Biener <rguenther@suse.de>
1862 PR tree-optimization/63155
1863 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1864 (ssa_propagation_engine::ssa_propagate): Remove redundant
1865 bitmap bit clearing.
1867 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
1869 PR rtl-optimization/86939
1870 PR rtl-optimization/87479
1871 * ira.h (non_conflicting_reg_copy_p): New prototype.
1872 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1873 (make_hard_regno_dead): Don't add conflicts for register
1874 ignore_reg_for_conflicts.
1875 (make_object_dead): Likewise.
1876 (non_conflicting_reg_copy_p): New function.
1877 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1878 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1879 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1880 (make_hard_regno_dead): Don't add conflicts for register
1881 ignore_reg_for_conflicts. Remove special conflict handling of
1882 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
1883 check_pic_pseudo_p and update callers.
1884 (mark_pseudo_dead): Don't add conflicts for register
1885 ignore_reg_for_conflicts.
1886 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1888 2018-10-05 Andrew Waterman <andrew@sifive.com>
1889 Jim Wilson <jimw@sifive.com>
1891 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1892 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
1893 new pattern using HONOR_SNANS that emits one extra instruction.
1895 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
1897 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1898 patterns): Merge SI and DI patterns to a GPR pattern.
1899 (unnamed define_insn and define_split for record form of that): Merge
1900 to a single define_insn_and_split pattern.
1902 2018-10-05 David Malcolm <dmalcolm@redhat.com>
1905 * input.c (expand_location_to_spelling_point): Add param "aspect"
1906 and use rather than hardcoding LOCATION_ASPECT_CARET.
1907 (get_substring_ranges_for_loc): Handle the case of a single token
1908 within a macro expansion.
1909 * input.h (expand_location_to_spelling_point): Add "aspect" param,
1910 defaulting to LOCATION_ASPECT_CARET.
1912 2018-10-05 Paul Koning <ni1d@arrl.net>
1914 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1915 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1916 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1917 (pdp11_guard_type): New function.
1919 2018-10-05 Paul Koning <ni1d@arrl.net>
1921 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1922 * config/pdp11/pdp11.opt (mfloat32): Remove.
1924 * doc/invoke.texi (pdp11 -mfloat32): Remove:
1925 (pdp11 -mfloat64): Remove.
1927 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1929 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1930 (*cmp<mode>_cc_i387): Ditto.
1931 (*cmpu<mode>_cc_i387): Ditto.
1932 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1933 * config/i386/i386.c (ix86_expand_fp_compare): Remove
1935 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1936 Emit x86_sahf_1 pattern.
1937 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1938 (ix86_expand_carry_flag_compare): Ditto.
1940 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1942 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1943 to reg_or_0_operand. Add "C" constraint.
1944 (*cmpxf_cc_i387): Ditto.
1945 (*cmp<mode>_i387): Change operand 2 predicate
1946 to nonimm_or_0_operand. Add "C" constraint.
1947 (*cmp<mode>_cc_i387): Ditto.
1948 (*cmp<mode>_0_i387): Remove insn pattern.
1949 (*cmp<mode>_0_cc_i387): Ditto.
1951 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
1953 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1954 * config/i386/predicates.md (nonimm_or_0_operand): Rename
1955 from vector_move_operand. Update all uses.
1957 2018-10-05 Martin Sebor <msebor@redhat.com>
1959 PR tree-optimization/87490
1960 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1963 2018-10-05 Richard Biener <rguenther@suse.de>
1965 PR tree-optimization/63155
1966 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1967 vertical space in dumpfiles.
1968 * tree-ssa-propagate.h
1969 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1970 * tree-ssa-propagate.c (cfg_blocks_back): New global.
1971 (ssa_edge_worklist_back): Likewise.
1972 (curr_order): Likewise.
1973 (cfg_blocks_get): Remove abstraction.
1974 (cfg_blocks_add): Likewise.
1975 (cfg_blocks_empty_p): Likewise.
1976 (add_ssa_edge): Add to current or next worklist based on
1978 (add_control_edge): Likewise.
1979 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1981 (ssa_propagation_engine::ssa_propagate): ... here. Unify
1982 iteration from CFG and SSA edge worklist so we process
1983 everything in RPO order, prioritizing forward progress
1985 (ssa_prop_init): Allocate new worklists, do not dump
1987 (ssa_prop_fini): Free new worklists.
1989 2018-10-05 Richard Biener <rguenther@suse.de>
1991 * tree-core.h (tree_block::abstract_flag): Remove.
1992 (tree_block::block_num): Make full 32bits.
1993 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1994 * tree.h (BLOCK_ABSTRACT): Remove.
1995 * dwarf2out.c (gen_lexical_block_die): Remove dead code
1996 resulting from BLOCK_ABSTRACT being always false.
1997 (gen_inlined_subroutine_die): Likewise.
1998 (gen_block_die): Likewise.
1999 * tree.c (block_ultimate_origin): Likewise.
2000 * tree-pretty-print.c (dump_block_node): Remove code dealing
2001 with BLOCK_ABSTRACT.
2002 * tree-ssa-live.c (dump_scope_block): Likewise.
2003 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2004 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2006 2018-10-05 Richard Biener <rguenther@suse.de>
2008 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2009 is asked for initialize mode to the component mode of the
2012 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2015 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2016 assembler for -mavx.
2017 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2019 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2022 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2024 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2025 to be DImode. When using mffscrn, force the operand to a register.
2027 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2029 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2030 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2031 X87MODEF mode iterator.
2032 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2033 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2034 X87MODEF mode iterator.
2036 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2038 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2039 -Wno-prio-ctor-dtor.
2041 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2043 * Makefile.in (OBJS): Add opt-problem.o.
2044 * dump-context.h: Include "selftest.h.
2045 (selftest::temp_dump_context): New forward decl.
2046 (class dump_context): Make friend of class
2047 selftest::temp_dump_context.
2048 (dump_context::dump_loc_immediate): New decl.
2049 (class dump_pretty_printer): Move here from dumpfile.c.
2050 (class temp_dump_context): Move to namespace selftest.
2051 (temp_dump_context::temp_dump_context): Add param
2052 "forcibly_enable_dumping".
2053 (selftest::verify_dumped_text):
2054 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2055 (selftest::verify_item):
2056 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2057 (ASSERT_IS_TREE): Likewise.
2058 (ASSERT_IS_GIMPLE): Likewise.
2059 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2061 (dump_context::dump_loc_immediate): ...this new function.
2062 (class dump_pretty_printer): Move to dump-context.h.
2063 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2064 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2065 (temp_dump_context::temp_dump_context): Move to "selftest"
2066 namespace. Add param "forcibly_enable_dumping", and use it to
2067 conditionalize the use of m_pp;
2068 (selftest::verify_dumped_text): Make non-static.
2069 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2070 (selftest::verify_item): Make non-static.
2071 (ASSERT_IS_TEXT): Move to dump-context.h.
2072 (ASSERT_IS_TREE): Likewise.
2073 (ASSERT_IS_GIMPLE): Likewise.
2074 (selftest::test_capture_of_dump_calls): Pass "true" for new
2075 param of temp_dump_context.
2076 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2077 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2079 * opt-problem.cc: New file.
2080 * opt-problem.h: New file.
2081 * optinfo-emit-json.cc
2082 (selftest::test_building_json_from_dump_calls): Pass "true" for
2083 new param of temp_dump_context.
2084 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2085 (optinfo::emit_for_opt_problem): New function.
2086 (optinfo::emit): Clarity which emit_item is used.
2087 * optinfo.h (optinfo::get_dump_location): New accessor.
2088 (optinfo::emit_for_opt_problem): New decl.
2089 (optinfo::emit): Make const.
2090 * selftest-run-tests.c (selftest::run_tests): Call
2091 selftest::opt_problem_cc_tests.
2092 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2093 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2094 bool to opt_result, converting fprintf messages to
2095 opt_result::failure_at calls. Add "stmt" param for use by the
2097 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2098 (runtime_alias_check_p): Convert return type from bool to
2099 opt_result, converting dump_printf calls to
2100 opt_result::failure_at, using the statement DDR_A for their
2102 (find_data_references_in_stmt): Convert return type from bool to
2103 opt_result, converting "return false" to opt_result::failure_at
2105 * tree-data-ref.h: Include "opt-problem.h".
2106 (dr_analyze_innermost): Convert return type from bool to opt_result,
2107 and add a const gimple * param.
2108 (find_data_references_in_stmt): Convert return type from bool to
2110 (runtime_alias_check_p): Likewise.
2111 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2112 dr_analyze_innermost.
2113 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2114 Convert return type from bool to opt_result, adding a message for
2115 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2116 (vect_analyze_data_ref_dependence): Convert return type from bool
2117 to opt_result. Change sense of return type from "false"
2118 effectively meaning "no problems" to "false" meaning a problem,
2119 so that "return false" becomes "return opt_result::success".
2120 Convert "return true" calls to opt_result::failure_at, using
2121 the location of statement A rather than vect_location.
2122 (vect_analyze_data_ref_dependences): Convert return type from bool
2124 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2125 calls to opt_result::failure_at, using the stmt location rather
2127 (vect_verify_datarefs_alignment): Convert return type from bool
2129 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2130 into multiple more-tightly-scoped copies.
2131 (vect_analyze_data_refs_alignment): Convert return type from bool
2133 (vect_analyze_data_ref_accesses): Likewise, converting a
2134 "return false" to a "return opt_result::failure_at", adding a
2136 (vect_prune_runtime_alias_test_list): Convert return type from
2137 bool to opt_result, converting dump_printf_loc to
2138 opt_result::failure_at. Add a %G to show the pertinent statement,
2139 and use the stmt's location rather than vect_location.
2140 (vect_find_stmt_data_reference): Convert return type from
2141 bool to opt_result, converting dump_printf_loc to
2142 opt_result::failure_at, using stmt's location.
2143 (vect_analyze_data_refs): Convert return type from bool to
2144 opt_result. Convert "return false" to "return
2145 opt_result::failure_at", adding messages as needed.
2146 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2147 type from bool to opt_result.
2148 (vect_determine_vf_for_stmt): Likewise.
2149 (vect_determine_vectorization_factor): Likewise, converting
2150 dump_printf_loc to opt_result::failure_at, using location of phi
2151 rather than vect_location.
2152 (vect_analyze_loop_form_1): Convert return type from bool to
2153 opt_result, converting dump_printf_loc calls, retaining the use of
2155 (vect_analyze_loop_form): Convert return type from loop_vec_info
2156 to opt_loop_vec_info.
2157 (vect_analyze_loop_operations): Convert return type from bool to
2158 opt_result, converting dump_printf_loc calls, using the location
2159 of phi/stmt rather than vect_location where available. Convert
2160 various "return false" to "return opt_result::failure_at" with
2161 "unsupported phi" messages.
2162 (vect_get_datarefs_in_loop): Convert return type from bool to
2163 opt_result. Add a message for the
2164 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2165 (vect_analyze_loop_2): Convert return type from bool to
2166 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2167 each "goto again;", adding new messages where needed.
2168 Add "unsupported grouped {store|load}" messages.
2169 (vect_analyze_loop): Convert return type from loop_vec_info to
2171 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2173 * tree-vect-stmts.c (process_use): Likewise, converting
2174 dump_printf_loc call and using stmt location, rather than
2176 (vect_mark_stmts_to_be_vectorized): Likeise.
2177 (vect_analyze_stmt): Likewise, adding a %G.
2178 (vect_get_vector_types_for_stmt): Convert return type from bool to
2179 opt_result, converting dump_printf_loc calls and using stmt
2180 location, rather than vect_location.
2181 (vect_get_mask_type_for_stmt): Convert return type from tree to
2182 opt_tree, converting dump_printf_loc calls and using stmt location.
2183 * tree-vectorizer.c: Include "opt-problem.h.
2184 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2185 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2186 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2187 enabled, use it to report at the top level "couldn't vectorize
2188 loop" followed by the problem.
2189 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2190 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2192 (vect_analyze_stmt): Likewise.
2193 (vect_get_vector_types_for_stmt): Likewise.
2194 (tree vect_get_mask_type_for_stmt): Likewise.
2195 (vect_analyze_data_ref_dependences): Likewise.
2196 (vect_enhance_data_refs_alignment): Likewise.
2197 (vect_analyze_data_refs_alignment): Likewise.
2198 (vect_verify_datarefs_alignment): Likewise.
2199 (vect_analyze_data_ref_accesses): Likewise.
2200 (vect_prune_runtime_alias_test_list): Likewise.
2201 (vect_find_stmt_data_reference): Likewise.
2202 (vect_analyze_data_refs): Likewise.
2203 (vect_analyze_loop): Convert return type from loop_vec_info to
2205 (vect_analyze_loop_form): Likewise.
2206 (vect_analyze_slp): Convert return type from bool to opt_result.
2208 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2210 * doc/invoke.texi (-fopt-info): Document new "internals"
2212 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2213 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2215 (optinfo_verbosity_options): Add "internals".
2216 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2217 (dump_context::apply_dump_filter_p): New member function.
2218 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2219 explicitly masking the dump_kind.
2220 (dump_context::begin_scope): Increment the scope depth first. Use
2221 apply_dump_filter_p rather than explicitly masking the dump_kind.
2222 (dump_context::emit_item): Use apply_dump_filter_p rather than
2223 explicitly masking the dump_kind.
2224 (dump_dec): Likewise.
2225 (dump_hex): Likewise.
2226 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2227 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2228 (opt_info_switch_p): Update handling of default
2229 MSG_OPTIMIZED_LOCATIONS to cope with default of
2230 MSG_PRIORITY_USER_FACING.
2231 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2232 masking the dump_kind.
2233 (selftest::test_capture_of_dump_calls): Update test_dump_context
2234 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2235 than MSG_ALL. Generalize scope test to be run at all four
2236 combinations of with/without MSG_PRIORITY_USER_FACING and
2237 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2238 for each of the two values.
2239 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2240 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2241 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2242 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2243 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2244 with MSG_PRIORITY_*.
2245 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2246 dump messages as MSG_PRIORITY_USER_FACING.
2247 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2248 about the interaction with MSG_PRIORITY_*.
2250 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2252 * varasm.c (output_constant): Add new parameter merge_strings.
2253 Make strings properly zero terminated in merge string sections.
2254 (mergeable_string_section): Don't fail if the last char is non-zero.
2255 (assemble_variable_contents): Handle merge string sections.
2256 (assemble_variable): Likewise.
2257 (assemble_constant_contents): Likewise.
2258 (output_constant_def_contents): Likewise.
2259 (output_constructor_array_range,
2260 output_constructor_regular_field): Adjust call to output_constant.
2261 (output_object_block): Adjust call to assemble_constant_contents
2262 and assemble_variable_contents.
2264 2018-10-04 Martin Liska <mliska@suse.cz>
2267 * cgraphunit.c (process_function_and_variable_attributes):
2268 Warn about a function with alias attribute and a body.
2270 2018-10-04 Martin Liska <mliska@suse.cz>
2273 * multiple_target.c (redirect_to_specific_clone): New function.
2274 (ipa_target_clone): Use it.
2275 * tree-inline.c: Fix comment.
2277 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2279 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2281 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2282 (gcc::dump_manager::register_pass): New member function, adapted
2283 from loop body in gcc::pass_manager::register_pass, adding a
2284 call to update_dfi_for_opt_info.
2285 (gcc::dump_manager::opt_info_enable_passes): Store the
2286 -fopt-info options into the new fields. Move the loop
2288 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2290 * dumpfile.h (struct opt_pass): New forward decl.
2291 (gcc::dump_manager::register_pass): New decl.
2292 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2293 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2294 "m_optinfo_flags", and "m_optinfo_filename".
2295 * passes.c (gcc::pass_manager::register_pass): Move all of the
2296 dump-handling code to gcc::dump_manager::register_pass.
2298 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2300 PR rtl-optimization/87466
2301 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2302 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2303 * doc/tm.texi: Regenerate.
2304 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2305 * lra-lives.c (process_bb_lives): Likewise.
2306 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2309 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2311 * params.c (add_params): Fix initialization.
2313 2018-10-04 Martin Liska <mliska@suse.cz>
2315 PR gcov-profile/84107
2316 * tree-profile.c (init_ic_make_global_vars):
2317 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2318 Come up with new ic_tuple* variables. Emit
2319 __gcov_indirect_call{,_topn} variables.
2320 (gimple_gen_ic_profiler): Access the variable
2322 (gimple_gen_ic_func_profiler): Access
2323 __gcov_indirect_call.callee field.
2324 (gimple_init_gcov_profiler): Use ptr_type_node.
2325 * value-prof.c (gimple_ic): Use ptr_type_node.
2327 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2329 PR tree-optimization/85787
2330 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2331 into this function and add support for detecting multiple phis.
2332 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2334 2018-10-04 Martin Liska <mliska@suse.cz>
2337 * ipa-inline.c (inline_to_all_callers_1):
2338 Call ultimate_alias_target for node being inlined.
2340 2018-10-03 Jeff Law <law@redhat.com>
2342 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2344 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2345 * tree.h (get_typenode_from_name): Prototype.
2347 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2349 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2350 Change operand 2 predicate to nonimmediate_operand.
2351 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2353 2018-10-03 Martin Sebor <msebor@redhat.com>
2354 Jeff Law <law@redhat.com>
2356 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2358 (get_string_length): Detect unterminated arrays.
2359 (format_string): Same.
2360 (format_directive): Warn about unterminated arrays.
2361 (handle_gimple_call): Mark statements with no_warning as needed.
2363 2018-10-03 Jim Wilson <jimw@sifive.com>
2365 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2366 also define __riscv_abi_rve. Delete trailing white space.
2368 2018-10-03 Paul Koning <ni1d@arrl.net>
2370 Enable LRA register allocator for PDP11.
2371 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2374 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2375 * config/pdp11/pdp11.opt (-mlra): New option.
2376 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2378 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2380 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2381 (*<absneg:code>extend<mode>xf2): Ditto.
2383 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2385 PR tree-optimization/87415
2386 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2389 2018-10-02 Jeff Law <law@redhat.com>
2391 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2392 an unterminated string is discovered. Bubble up range
2393 even for unterminated strings.
2394 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2395 indicates the string was not terminated via NONSTR.
2397 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2399 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2400 pointer conversions.
2401 Do not do anything special for anti-ranges.
2403 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2405 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2406 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2408 2018-10-03 Martin Liska <mliska@suse.cz>
2410 PR gcov-profile/86109
2411 * coverage.c (coverage_begin_function): Do not
2412 mark lambdas as artificial.
2413 * tree-core.h (struct GTY): Remove tm_clone_flag
2414 and introduce new lambda_function.
2415 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2417 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2420 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2421 P8_VECTOR and VSX are enabled.
2423 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2425 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2426 0x3907 as CPU model number.
2428 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2430 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2431 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2432 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2433 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2434 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2435 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2436 value from arch12 to z14.
2438 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2440 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2442 (isinf<mode>2): Ditto.
2444 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2446 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2447 before emitting fxam. Perform calculations in XFmode.
2449 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2451 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2453 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2456 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2457 * tree.c (signed_or_unsigned_type_for): Handle complex.
2459 2018-10-02 Jeff Law <law@redhat.com>
2461 * gimple-fold.c (get_range_strlen): Remove dead code.
2463 2018-10-02 Martin Sebor <msebor@redhat.com>
2464 Jeff Law <law@redhat.com>
2466 * builtins.c (unterminated_array): Add new arguments.
2467 If argument is not terminated, bubble up size and exact
2469 (expand_builtin_strnlen): Detect, avoid expanding
2470 and diagnose unterminated arrays.
2471 (c_strlen): Fill in offset of start of unterminated strings.
2472 * builtins.h (unterminated_array): Update prototype.
2474 2018-10-02 Richard Biener <rguenther@suse.de>
2476 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2477 of haddv4df, first reduce to SSE width and exploit the fact
2478 that we only need element zero with the reduction result.
2479 (reduc_plus_scal_v2df): Likewise.
2481 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2483 * dojump.h (do_jump): Delete.
2484 (do_jump_1): Likewise.
2485 (split_comparison): Move around.
2486 * dojump.c (do_jump): Make static.
2487 (do_jump_1): Likewise.
2488 (jumpifnot): Move around.
2489 (jumpifnot_1): Likewise.
2491 (jumpif_1): Likewise.
2492 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2494 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2496 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2497 insns in the delay slot and add_insn_after for the jump insn.
2499 2018-10-02 Richard Biener <rguenther@suse.de>
2501 * tree-inline.c (expand_call_inline): Use the location of
2502 the callee declaration for the inline-entry marker.
2503 * final.c (notice_source_line): Remove special-casing of
2504 NOTE_INSN_INLINE_ENTRY.
2506 2018-10-01 Carl Love <cel@us.ibm.com>
2509 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2510 (__builtin_mtfsb0): New.
2511 (__builtin_mtfsb1): New.
2512 ( __builtin_set_fpscr_rn): New.
2513 (__builtin_set_fpscr_drn): New.
2514 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2515 (rs6000_expand_set_fpscr_rn_builtin): Add.
2516 (rs6000_expand_set_fpscr_drn_builtin): Add.
2517 (rs6000_expand_builtin): Add case statement entries for
2518 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2519 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2520 RS6000_BUILTIN_MFFSL.
2521 (rs6000_init_builtins): Add ftype initialization and def_builtin
2522 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2523 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2524 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2525 rs6000_mffscdrn): Add define_insn.
2526 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2527 * doc/extend.texi: Add documentation for the builtins.
2529 2018-10-01 Richard Biener <rguenther@suse.de>
2531 PR tree-optimization/87465
2532 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2533 causing branch miscounts.
2535 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2537 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2538 aarch64_option_default_param): New.
2539 (params.h): Include.
2540 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2541 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2542 stack-clash protection validation code.
2544 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2546 * params.c (validate_param): New.
2547 (add_params): Use it.
2548 (set_param_value): Refactor param validation into validate_param.
2549 (diagnostic.h): Include.
2550 * diagnostic.h (diagnostic_ready_p): New.
2552 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2554 * params.c (set_param_value):
2555 Add index of parameter being validated.
2556 * common/common-target.def (option_validate_param): New.
2557 * common/common-targhooks.h (default_option_validate_param): New.
2558 * common/common-targhooks.c (default_option_validate_param): New.
2559 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2560 * doc/tm.texi: Regenerate.
2562 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2565 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2566 Add validation for stack-clash parameters and set defaults.
2568 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2571 * configure.ac: Add stack-clash-protection-guard-size.
2572 * doc/install.texi: Document it.
2573 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2574 * params.def: Update comment for guard-size.
2575 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2576 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2577 * configure: Regenerate.
2579 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2582 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2583 STACK_DYNAMIC_OFFSET): New.
2584 * config/aarch64/aarch64.c (aarch64_layout_frame):
2585 Update outgoing args size.
2586 (aarch64_stack_clash_protection_alloca_probe_range,
2587 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2589 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2592 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2594 * target.def (stack_clash_protection_alloca_probe_range): New.
2595 (stack_clash_protection_final_dynamic_probe): Remove.
2596 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2597 (default_stack_clash_protection_final_dynamic_probe): Remove.
2598 * targhooks.c: Likewise.
2599 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2600 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2601 * doc/tm.texi: Regenerate.
2603 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2606 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2607 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2608 aarch64_clamp_to_uimm12_shift): New.
2609 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2610 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2612 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2615 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2617 2018-10-01 Jeff Law <law@redhat.com>
2618 Richard Sandiford <richard.sandiford@linaro.org>
2619 Tamar Christina <tamar.christina@arm.com>
2622 * config/aarch64/aarch64.md
2623 (probe_stack_range): Add k (SP) constraint.
2624 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2625 STACK_CLASH_MAX_UNROLL_PAGES): New.
2626 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2627 stack probes for stack clash.
2628 (aarch64_allocate_and_probe_stack_space): New.
2629 (aarch64_expand_prologue): Use it.
2630 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2631 (aarch64_sub_sp): Add emit_move_imm optional param.
2633 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2635 PR tree-optimization/87261
2636 * match.pd: Remove trailing whitespace.
2637 Add (x & y) | ~(x | y) -> ~(x ^ y),
2638 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2640 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2642 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2644 (ashlsi3_insn): Update instruction constraints.
2645 (ashrsi3_insn): Likewise.
2646 (rotrsi3): Likewise.
2647 (add_shift): Likewise.
2648 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2649 avoids placing in the limm field small constants which, otherwise,
2650 could end into a small instruction.
2652 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2654 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2655 destination register is not odd-even.
2656 (umaddsidi4_split): Likewise.
2658 2018-10-01 Richard Biener <rguenther@suse.de>
2660 * tree-inline.c (expand_call_inline): Store origin of fn
2661 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2662 * tree.c (block_ultimate_origin): Simplify and do some
2665 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2667 * config/i386/mmx.md (EMMS): New int iterator.
2668 (emms): New int attribute.
2669 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2670 EMMS int iterator. Explicitly declare clobbers.
2671 (mmx_emms): Remove expander.
2673 * config/i386/predicates.md (emms_operation): Remove predicate.
2674 (vzeroall_pattern): New predicate.
2675 (vzeroupper_pattern): Rename from vzeroupper_operation.
2676 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2677 vzeroupper_pattern and vzeroall_pattern predicates.
2679 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2681 PR rtl-optimization/86939
2682 * ira-lives.c (make_hard_regno_born): Rename from this...
2683 (make_hard_regno_live): ... to this. Remove update to conflict
2684 information. Update function comment.
2685 (make_hard_regno_dead): Add conflict information update. Update
2687 (make_object_born): Rename from this...
2688 (make_object_live): ... to this. Remove update to conflict information.
2689 Update function comment.
2690 (make_object_dead): Add conflict information update. Update function
2692 (mark_pseudo_regno_live): Call make_object_live.
2693 (mark_pseudo_regno_subword_live): Likewise.
2694 (mark_hard_reg_dead): Update function comment.
2695 (mark_hard_reg_live): Call make_hard_regno_live.
2696 (process_bb_node_lives): Likewise.
2697 * lra-lives.c (make_hard_regno_born): Rename from this...
2698 (make_hard_regno_live): ... to this. Remove update to conflict
2699 information. Remove now uneeded check_pic_pseudo_p argument.
2700 Update function comment.
2701 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2702 to conflict information. Update function comment.
2703 (mark_pseudo_live): Remove update to conflict information. Update
2705 (mark_pseudo_dead): Add conflict information update.
2706 (mark_regno_live): Call make_hard_regno_live.
2707 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2708 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2710 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2713 * config/i386/i386.c (construct_container): Use TImode for
2714 BLKmode values in 2 integer registers.
2716 2018-09-29 Jeff Law <law@redhat.com>
2718 * builtins.c (unterminated_array): Pass in c_strlen_data * to
2719 c_strlen rather than just a tree *.
2720 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2721 Update recursive calls appropriately. If caller did not provide a
2722 suitable data pointer, create a local one. When a non-terminated
2723 string is discovered, bubble up information about the string via the
2724 c_strlen_data object.
2725 * builtins.h (c_strlen): Update prototype.
2726 (c_strlen_data): New structure.
2727 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2728 For a type 2 call, if c_strlen indicates a non-terminated string
2729 use the length of the non-terminated string.
2730 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2732 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2735 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2736 __m512d type for __A argument rather than __m512.
2738 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
2740 * match.pd (simple_comparison): Don't optimize if either operand is
2741 a function pointer when target needs function pointer canonicalization.
2743 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2745 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2746 power5 .. power9 to remove indirection.
2747 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2748 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2749 ASM_CPU_476_SPEC): Delete.
2750 (ASM_CPU_SPEC): Adjust.
2751 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2752 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2754 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2756 * config.in: Delete HAVE_AS_DCI.
2757 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2758 * config/rs6000/rs6000.h: Ditto.
2759 * configure.ac: Delete HAVE_AS_DCI.
2760 * configure: Regenerate.
2762 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
2764 * config.in (HAVE_AS_LWSYNC): Delete.
2765 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2766 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2768 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2769 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2771 * configure.ac: Delete HAVE_AS_LWSYNC.
2772 * configure: Regenerate.
2774 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2775 Pierre-Marie de Rodat <derodat@adacore.com>
2777 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2778 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2779 (cgraph_node::create_thunk): Add indirect_offset parameter.
2780 (thunk_adjust): Likewise.
2781 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2782 and initialize the corresponding field with it.
2783 (cgraph_node::dump): Dump indirect_offset field.
2784 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2785 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2786 (thunk_adjust): Add indirect_offset parameter and deal with it.
2787 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2788 pass it to thunk_adjust. Do not call the target hook if it's non-zero
2789 or if the thunk is external or local. Fix formatting. Do not chain
2790 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
2791 if any, in the GIMPLE representation.
2792 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2793 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2794 (input_node): Read indirect_offset field.
2795 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2796 call to thunk_adjust.
2797 * tree-nested.c (struct nesting_info): Add thunk_p field.
2798 (create_nesting_tree): Set it.
2799 (convert_all_function_calls): Copy static chain from targets to thunks.
2800 (finalize_nesting_tree_1): Return early for thunks.
2801 (unnest_nesting_tree_1): Do not finalize thunks.
2802 (gimplify_all_functions): Do not gimplify thunks.
2804 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2806 * opt-suggestions.c (option_proposer::build_option_suggestions):
2807 Release "option_values".
2809 2018-09-28 David Malcolm <dmalcolm@redhat.com>
2811 * coverage.c (get_coverage_counts): Convert problem-reporting dump
2812 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2813 * dumpfile.c (kind_as_string): New function.
2814 (dump_loc): Rather than a hardcoded prefix of "note: ", use
2815 kind_as_string to vary the prefix based on dump_kind.
2816 (selftest::test_capture_of_dump_calls): Update for above.
2818 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2820 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2821 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2823 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2825 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2826 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2827 INVALID_REGNUM instead of FPSR_REG.
2828 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2829 * config/i386/i386.md: Update comment of FP compares.
2830 (fldenv): Do not clobber FPSR_REG.
2832 2018-09-28 Richard Biener <rguenther@suse.de>
2834 * tree.h (BLOCK_ORIGIN): New.
2835 * omp-expand.c (grid_expand_target_grid_body): Assign
2836 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2837 * tree-inline.c (remap_block): Likewise.
2838 * auto-profile.c (get_function_decl_from_block): Simplify
2839 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2840 * langhooks.c (lhd_print_error_function): Likewise.
2841 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2843 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2844 * tree.c (block_nonartificial_location): Likewise.
2845 (block_ultimate_origin): Likewise.
2846 * tree-pretty-print.c (percent_K_format): Likewise. Remove
2847 no longer needed LTO case.
2849 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
2850 Jan Hubicka <jh@suse.cz>
2851 Martin Jambor <mjambor@suse.cz>
2853 * simplify-rtx.c (simplify_merge_mask): New function.
2854 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2855 same masks are used in op1 or op2.
2856 (test_vec_merge): New function.
2857 (test_vector_ops): Call test_vec_merge.
2859 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
2861 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2862 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2863 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2864 (cypress_costs): Set it.
2865 (supersparc_costs): Likewise.
2866 (hypersparc_costs): Likewise.
2867 (leon_cost): Likewise.
2868 (leon3_costs): Likewise.
2869 (sparclet_costs): Likewise.
2870 (ultrasparc_costs): Likewise.
2871 (ultrasparc_costs): Likewise.
2872 (niagara_costs): Likewise.
2873 (niagara2_costs): Likewise.
2874 (niagara3_costs): Likewise.
2875 (niagara4_costs): Likewise.
2876 (niagara7_costs): Likewise.
2877 (m8_costs): Likewise.
2878 (TARGET_CAN_FOLLOW_JUMP): Define.
2879 (pass_work_around_errata::gate): Minor tweak.
2880 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2881 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2882 Automaitcally clear MASK_FSMULD mask for V7 processors.
2883 (sparc_can_follow_jump): New static function.
2884 (output_ubranch): Deal with CROSSING_JUMP_P.
2885 (sparc_use_sched_lookahead): Rewrite using switch statement.
2886 (sparc_issue_rate): Reorder.
2887 (sparc_branch_cost): New function.
2889 2018-09-27 Martin Sebor <msebor@redhat.com>
2891 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2892 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2893 (int_fits_type_p): Same.
2895 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
2897 * config/i386/i386.md (FPCR_REG): Remove.
2898 (UNSPEC_FLDCW): Remove.
2899 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2900 (x86_fldcw_1): Remove insn pattern.
2901 (fnstenv): Do not clobber FPCR_REG.
2903 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2904 (CALL_USED_REGISTERS): Ditto.
2905 (REG_ALLOC_ORDER): Ditto.
2906 (REG_CLASS_CONTENTS): Ditto.
2907 (HI_REGISTER_NAMES): Ditto.
2908 (ADDITIONAL_REGISTER_NAMES): Use defines instead
2909 of numerical constants.
2910 * config/i386/i386.c (regclass_map): Remove fpsr register.
2911 (dbx_register_map): Ditto.
2912 (dbx64_register_map): Ditto.
2913 (svr4_dbx_register_map): Ditto.
2914 (print_reg): Do not handle FPCR_REG.
2916 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
2919 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2920 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2921 Delete, always treat as true.
2922 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2923 Ditto. Simplify remaining code.
2924 * config/powerpcspe/powerpcspe.h: Ditto.
2925 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2926 Simplify remaining code.
2927 (rs6000_expand_builtin): Ditto.
2928 * config/rs6000/rs6000.h: Ditto.
2929 * configure.ac: Ditto.
2930 * configure: Regenerate.
2932 2018-09-27 Martin Liska <mliska@suse.cz>
2934 * coverage.c (get_coverage_counts): Revert the formatting
2935 of missing profile opt info.
2937 2018-09-27 Richard Biener <rguenther@suse.de>
2941 * dwarf2out.c (set_block_origin_self): Do not mark outermost
2942 block as we do not output that.
2943 (gen_inlined_subroutine_die): Elide the originally outermost
2944 block, matching what we do for concrete instances.
2945 (decls_for_scope): Add parameter specifying whether to recurse
2948 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
2949 Tom de Vries <tom@codesourcery.com>
2953 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2954 STORE_FLAG_VALUE == 1.
2956 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
2958 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2959 constant definitions.
2960 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2961 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2962 ("speculation_barrier"): New expander definition.
2964 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
2966 PR gcov-profile/86957
2967 * common.opt: New warning option -Wmissing-profile.
2968 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2969 * doc/invoke.texi: Document -Wmissing-profile.
2971 2018-09-26 Jim Wilson <jimw@sifive.com>
2973 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2974 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2976 2018-09-26 Martin Sebor <msebor@redhat.com>
2978 * tree.c (zerop): Change return type to bool.
2979 (integer_zerop, integer_onep, integer_each_onep): Same.
2980 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2981 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2982 (real_onep, real_minus_onep, chain_index): Same.
2983 (print_type_hash_statistics, type_list_equal): Same.
2984 * tree.h (zerop): Same.
2985 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2986 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2987 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2988 (real_onep, real_minus_onep, chain_index): Same.
2989 (print_type_hash_statistics, type_list_equal): Same.
2991 2018-09-26 Jim Wilson <jimw@sifive.com>
2993 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2995 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2998 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2999 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3002 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3004 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3006 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3008 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3009 and FP_SECOND_SSE_REGS.
3010 (REG_CLASS_NAMES): Ditto.
3011 (REG_CLASS_CONTENTS): Ditto.
3012 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3013 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3014 (ix86_preferred_output_reload_class): Ditto.
3015 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3016 clobber constraint to "=&f".
3017 (fix_truncdi_i387): Ditto.
3018 (lrintxfdi2): Ditto.
3019 (fistdi2_<rounding>): Ditto.
3020 (fpremxf4_i387): Change "=u" constraint to "=f".
3021 (fprem1xf4_i387): Ditto.
3023 (fptanxf4_i387): Ditto.
3024 (fxtractxf3_i387): Ditto.
3025 (fscalexf4_i387): Ditto.
3026 (atan2xf3): Change "u" constraint to "f".
3027 (fyl2xxf3_i387): Ditto.
3028 (fyl2xp1xf3_i387): Ditto.
3030 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3033 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3034 for removed I387_MASK_PM entity.
3037 2018-09-26 Jeff Law <law@redhat.com>
3039 2018-09-26 Alexey Neyman <stilor@att.net>
3041 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3042 headers are no longer pulled in by <isl/val.h>.
3044 2018-09-26 Richard Biener <rguenther@suse.de>
3047 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3048 or concrete instance DIE to the tree. Create abstract origin
3049 attributes also for concrete instances.
3051 2018-09-26 Alexey Neyman <stilor@att.net>
3053 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3054 headers are no longer pulled in by <isl/val.h>.
3056 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3058 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3059 Use new helper functions.
3060 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3061 Use new helper functions.
3062 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3063 aarch_mm_needs_release): New declarations.
3064 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3065 aarch_mm_needs_release): New.
3067 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3069 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3070 (arm32_output_mi_thunk): Deal with long calls.
3072 2018-09-26 Richard Biener <rguenther@suse.de>
3076 * tree-inline.c (expand_call_inline): When the location
3077 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3078 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3079 the inserted BLOCK to make inlined_function_outer_scope_p
3081 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3082 coords for reserved locations.
3084 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3086 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3087 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3088 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3089 (*sibcall_nonlocal_sysv<mode>): Ditto.
3090 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3091 (<bd>_<mode>): Ditto.
3092 (<bd>tf_<mode>): Ditto.
3094 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3096 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3097 control string as a list of templates instead of as C code.
3098 (*altivec_movti): Ditto.
3099 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3101 2018-09-25 Jim Wilson <jimw@sifive.com>
3103 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3104 when target symbol is weak.
3106 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3109 * builtins.c (unterminated_array): Simplify.
3110 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3111 where pointer arithmetic is safe.
3113 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3116 * config/rs6000/altivec.md (altivec_vspltb): Use
3117 const_0_to_15_operand instead of u5bit_cint_operand.
3118 (*altivec_vspltb_internal): Ditto.
3119 (altivec_vspltb_direct): Ditto.
3120 (altivec_vsplth): Use const_0_to_7_operand instead of
3122 (*altivec_vsplth_internal): Ditto.
3123 (altivec_vsplth_direct): Ditto.
3124 (altivec_vspltw): Use const_0_to_3_operand instead of
3126 (*altivec_vspltw_internal): Ditto.
3127 (altivec_vspltw_direct): Ditto.
3128 (altivec_vspltsf): Ditto.
3129 (*altivec_vspltsf_internal): Ditto.
3130 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3131 various splats with the proper size immediate. Reorder the various
3132 cases by ascending size of immediate, and put all such together.
3134 2018-09-25 Richard Biener <rguenther@suse.de>
3137 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3139 (maybe_create_die_with_external_ref): Do not create
3140 DW_TAG_imported_unit here.
3141 (add_abstract_origin_attribute): Handle external BLOCK refs.
3142 (dwarf2out_abstract_function): Simplify LTO case.
3143 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3144 rather than using maybe_create_die_with_external_ref.
3146 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3149 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3150 (frndintxf2_mask_pm_i387): Ditto.
3151 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3152 Enable for !flag_trapping_math.
3153 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3154 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3155 Change operand 1 predicate to nonimmediate_operand.
3156 (attr "i387_cw"): Remove mask_pm.
3157 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3158 (enum ix86_entity): Remove I387_MASK_PM.
3159 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3160 handle I387_MASK_PM.
3161 (ix86_mode_needed): Ditto.
3162 (ix86_mode_after): Ditto.
3163 (ix86_mode_entry): Ditto.
3164 (ix86_mode_exit): Ditto.
3165 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3167 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3169 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3170 to_update_switch_stmts to vNULL instead of calling create on them
3173 2018-09-25 Richard Biener <rguenther@suse.de>
3175 PR tree-optimization/87402
3176 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3177 (visit_phi): Re-instantiate handling of supposed to be VARYING
3178 but non-VARYING backedge value.
3180 2018-09-25 Richard Biener <rguenther@suse.de>
3183 * dwarf2out.c (struct sym_off_pair): New.
3184 (external_die_map): New global.
3185 (lookup_decl_die): When in LTO create DIEs lazily from the
3187 (lookup_block_die): New function, create DIEs lazily in LTO.
3188 (equate_block_to_die): New function.
3189 (dwarf2out_die_ref_for_decl): During WPA get the association
3190 from the external DIE map.
3191 (dwarf2out_register_external_die): Record mapping into the
3193 (maybe_create_die_with_external_ref): New function split out from
3194 DIE generation part of old dwarf2out_register_external_die.
3195 (add_abstract_origin_attribute): Do not return the DIE. When
3196 in LTO reference externals directly.
3197 (dwarf2out_abstract_function): When in LTO ignore calls for
3198 decls with external DIEs (already present abstract instances).
3199 (gen_call_site_die): Adjust.
3200 (add_high_low_attributes): Likewise.
3201 (gen_lexical_block_die): Likewise.
3202 (gen_inlined_subroutine_die): Likewie.
3203 (gen_block_die): Likewise.
3204 (dwarf2out_inline_entry): Likewise.
3205 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3208 2018-09-25 Martin Liska <mliska@suse.cz>
3210 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3211 integers and not by a float value.
3213 2018-09-25 Martin Liska <mliska@suse.cz>
3216 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3218 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3219 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3220 * godump.c (go_format_type): Remove extra parenthesis.
3222 2018-09-25 Martin Liska <mliska@suse.cz>
3224 * alias.c (set_dest_equal_p): Remove unused function.
3225 * config/i386/i386.c (def_builtin_pure2): Likewise.
3226 * diagnostic-show-locus.c (class layout): Remove
3228 (layout::layout): Likewise here.
3229 * dump-context.h (class temp_dump_context): Likewise.
3230 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3231 (add_AT_loclistsptr): Likewise.
3232 (add_AT_offset): Likewise.
3233 (get_AT_hi_pc): Likewise.
3234 (is_comdat_die): Likewise.
3235 (type_is_enum): Likewise.
3236 (ceiling): Likewise.
3237 (add_AT_vms_delta): Likewise.
3238 (is_class_die): Likewise.
3239 * edit-context.c (class line_event): Remove unused field.
3240 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3242 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3243 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3244 (ok_for_base_p_nonstrict): Likewise.
3245 * tree-chrec.c (is_not_constant_evolution): Likewise.
3246 (chrec_fold_poly_cst): Likewise.
3247 * tree-if-conv.c (has_pred_critical_p): Likewise.
3248 * tree-ssa-coalesce.c (print_exprs): Likewise.
3249 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3250 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3251 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3252 (value_range_nonnegative_p): Likewise.
3254 2018-09-25 Martin Liska <mliska@suse.cz>
3256 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3257 Do not handle "GNU Pascal".
3258 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3260 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3261 from documentation. Likewise.
3262 * dbxout.c (dbxout_range_type): Likewise.
3263 * doc/cpp.texi: Likewise.
3264 * doc/extend.texi: Likewise.
3265 * doc/frontends.texi: Likewise.
3266 * doc/invoke.texi: Remove Pascal entry.
3267 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3268 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3270 2018-09-25 Martin Liska <mliska@suse.cz>
3273 * doc/invoke.texi: Document all parameters and remove default
3276 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3279 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3280 contains HOST_WIDE_INTs when computing its size.
3282 2018-09-24 Jim Wilson <jimw@sifive.com>
3285 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3287 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3289 2018-09-24 Andrew Pinski <apinski@marvell.com>
3291 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3292 access prev before checking it for NULLness in the
3293 AARCH64_FUSE_CMP_BRANCH case.
3295 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3298 * config/i386/i386.c (rest_of_insert_endbranch): Set
3299 endbr_queued_at_entrance to true and don't insert ENDBR if
3300 x86_function_profiler will be called.
3301 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3303 * config/i386/i386.h (machine_function): Add
3304 endbr_queued_at_entrance.
3306 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3308 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3309 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3311 (check_attr_test): Use alternative_mask.
3312 (get_attr_value): Likewise.
3313 (compute_alternative_mask): Use alternative_mask and XWINT.
3314 (make_alternative_compare): Use alternative_mask.
3315 (attr_alt_subset_p): Use XWINT.
3316 (attr_alt_subset_of_compl_p): Likewise.
3317 (attr_alt_intersection): Use alternative_mask and XWINT.
3318 (attr_alt_union): Likewise.
3319 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3320 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3321 (simplify_test_exp): Use alternative_mask and XWINT.
3322 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3323 number calculation to support 64 bits. Generate code that
3324 checks 64-bit masks.
3325 (main): Use alternative_mask.
3326 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3328 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3331 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3332 RETURN+USE when returning via %r14.
3334 2018-09-24 Martin Liska <mliska@suse.cz>
3336 * gcov.c (output_lines): Print colorization legend
3337 for both flag_use_colors and flag_use_hotness_colors.
3340 2018-09-24 Martin Liska <mliska@suse.cz>
3342 * coverage.c (get_coverage_counts): Use warning_at
3343 with current_function_decl location. Use %qD in warning
3346 2018-09-24 Martin Liska <mliska@suse.cz>
3348 * memory-block.h (memory_block_pool::release): Annotate with
3349 valgrind that the memory is not accessible.
3351 2018-09-24 Martin Liska <mliska@suse.cz>
3354 * asan.c: Make asan_handled_variables extern.
3356 * cfgexpand.c (expand_stack_vars): Make sure
3357 a representative is unpoison if another
3358 variable in the partition is handled by
3359 use-after-scope sanitization.
3361 2018-09-24 Richard Biener <rguenther@suse.de>
3363 PR tree-optimization/63155
3364 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3365 the worklist when the edge of the respective argument isn't
3368 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3370 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3371 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3372 (MASK_CLASS_P): Update for rename.
3373 (MAYBE_MASK_CLASS_P): Ditto.
3374 (REG_CLASS_NAMES): Update.
3375 (REG_CLASS_CONTENT): Update.
3376 * config/i386/i386.c (regclass_map): Update for MASK_REG
3377 and ALL_MASK_REGS rename.
3378 * config/i386/constraints.md (Yk): Update for rename.
3381 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3383 * config/i386/i386.h (enum reg_class): Remove
3384 EVEX_SSE_REGS and MOD4_SSE_REGS.
3385 (REG_CLASS_NAMES): Update.
3386 (REG_CLASS_CONTENT): Update.
3387 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3388 registers as ALL_SSE_REGS.
3389 (ix86_additional_allocno_class_p): Remove.
3390 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3391 (ix86_register_priority): Lower priority of EVEX SSE registers.
3392 Use IN_RANGE macro where appropriate.
3393 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3394 AVX-5124VNNIW checks.
3395 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3396 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3397 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3398 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3399 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3400 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3401 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3402 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3403 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3404 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3405 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3406 * config/i386/constraints.md (Yh): Remove.
3408 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3410 * config/i386/i386.c (regclass_map): Declare integer REX registers
3413 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3415 * doc/service.texi (Service): Switch the fsf.org link to https.
3417 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3420 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3421 Define to speculation_safe_value_not_needed.
3423 2018-09-21 Florian Weimer <fweimer@redhat.com>
3426 * doc/extend.texi (Common Function Attributes): Mention that
3427 noreturn suppresses tail call optimization.
3429 2018-09-21 Jeff Law <law@redhat.com>
3431 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3432 vr_values::cleanup_edges_and_switches.
3433 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3435 (identify_jump_threads): Remove EDGE_IGNORE handling.
3436 (execute_vrp): Move handling of to_remove_edges and
3437 to_update_switch_stmts into vr_values class member functions.
3438 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3439 (to_update_switch_stmts): Likewise.
3440 * vr-values.c: Include cfghooks.h.
3441 (vr_values::vr_values): Initialize to_remove_edges and
3442 to_update_switch_stmts.
3443 (vr_values::~vr_values): Verify to_remove_edges and
3444 to_update_switch_stmts are empty.
3445 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3446 (vr_values::cleanup_edges_and_switches): New member function.
3447 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3448 function. Add new data members.
3450 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3452 PR tree-optimization/87309
3453 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3454 calls with pflags and alt_flags.
3455 (selftest::test_capture_of_dump_calls): Add test of interaction of
3456 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3458 2018-09-21 Olivier Hainque <hainque@adacore.com>
3460 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3462 2018-09-21 Olivier Hainque <hainque@adacore.com>
3464 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3466 2018-09-21 Olivier Hainque <hainque@adacore.com>
3468 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3469 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3470 (VXWORKS_LIBS_RTP): Minor reordering.
3472 2018-09-21 Olivier Hainque <hainque@adacore.com>
3474 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3475 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3477 2018-09-21 Olivier Hainque <hainque@adacore.com>
3479 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3480 (PTRDIFF_TYPE): Likewise.
3482 2018-09-21 Olivier Hainque <hainque@adacore.com>
3484 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3485 triplet, similar to support for VxWorks7.
3486 * config/vxworks-dummy.h: Provide a default definition
3487 of TARGET_VXWORKS64 to 0.
3489 2018-09-21 Olivier Hainque <hainque@adacore.com>
3491 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3492 * config/vxworks-dummy.h: here.
3494 2018-09-21 Olivier Hainque <hainque@adacore.com>
3496 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3498 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3499 Bo Zhou <zbo.zhou@hisilicon.com>
3501 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3502 * config/aarch64/aarch64-tune.md: Regenerated.
3503 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3504 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3505 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3507 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3508 Julian Brown <julian@codesourcery.com>
3510 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3512 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3514 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3515 if the call takes a static chain.
3517 2018-09-21 Martin Liska <mliska@suse.cz>
3519 * auto-profile.c (autofdo_source_profile::read): Do not
3521 (read_profile): Do not add working sets.
3522 (read_autofdo_file): Remove sum_all.
3523 (afdo_callsite_hot_enough_for_early_inline): Remove const
3525 * coverage.c (struct counts_entry): Remove gcov_summary.
3526 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3527 do not support GCOV_TAG_PROGRAM_SUMMARY.
3528 (get_coverage_counts): Remove summary and expected
3530 * coverage.h (get_coverage_counts): Likewise.
3531 * doc/gcov-dump.texi: Remove -w option.
3532 * gcov-dump.c (dump_working_sets): Remove.
3533 (main): Do not support '-w' option.
3534 (print_usage): Likewise.
3535 (tag_summary): Likewise.
3536 * gcov-io.c (gcov_write_summary): Do not dump
3538 (gcov_read_summary): Likewise.
3539 (gcov_histo_index): Remove.
3540 (gcov_histogram_merge): Likewise.
3541 (compute_working_sets): Likewise.
3542 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3544 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3545 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3546 (GCOV_HISTOGRAM_SIZE): Remove.
3547 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3548 (struct gcov_summary): Simplify rapidly just
3549 to runs and sum_max fields.
3550 (gcov_histo_index): Remove.
3551 (NUM_GCOV_WORKING_SETS): Likewise.
3552 (compute_working_sets): Likewise.
3553 * gcov-tool.c (print_overlap_usage_message): Remove
3554 trailing empty line.
3555 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3556 (output_lines): Remove program related line.
3557 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3558 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3560 (input_profile_summary): Do not read it.
3561 (merge_profile_summaries): And do not merge it.
3562 (input_symtab): Do not call removed function.
3563 * modulo-sched.c (sms_schedule): Do not print sum_max.
3564 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3565 removed when histogram method was invented.
3566 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3568 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3570 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3571 and dump selected value.
3572 * profile.c (add_working_set): Remove.
3573 (get_working_sets): Likewise.
3574 (find_working_set): Likewise.
3575 (get_exec_counts): Do not work with working sets.
3576 (read_profile_edge_counts): Do not inform as sum_max is removed.
3577 (compute_branch_probabilities): Likewise.
3578 (compute_value_histograms): Remove argument for call of
3579 get_coverage_counts.
3580 * profile.h: Do not make gcov_summary const.
3582 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3584 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3586 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3588 PR tree-optimization/86990
3589 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3590 Check that the entire merged store group is made of constants only for
3593 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3595 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3596 (VTABLE_VERIFICATION_SPEC): Likewise.
3597 (SANITIZER_EARLY_SPEC): Likewise.
3598 (SANITIZER_SPEC): Likewise.
3599 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3600 * doc/invoke.texi (Link Options): Document -r.
3602 2018-09-20 Richard Biener <rguenther@suse.de>
3605 * gimplify.c (gimplify_expr): Retain alignment of
3606 addressable lvalue in dereference.
3608 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3611 * configure.ac: Check for .loc is_stmt support.
3612 * configure, config.in: Rebuilt.
3613 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3616 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3618 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3619 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3622 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3624 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3626 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3629 2018-09-20 Marek Polacek <polacek@redhat.com>
3631 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3633 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3635 PR tree-optimization/87288
3636 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3637 into account when determining PEELING_FOR_NITERS.
3639 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3641 PR tree-optimization/86877
3642 * tree-vect-loop.c (vect_analyze_loop_2): Call
3643 vect_verify_datarefs_alignment.
3645 2018-09-19 Marek Polacek <polacek@redhat.com>
3647 * doc/invoke.texi: Document -Wclass-conversion.
3649 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3651 * config/pa/pa.c (pa_adjust_priority): Delete.
3652 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3654 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3655 (atomic_storehi): Likewise.
3656 (atomic_storesi): Likewise.
3657 (atomic_loaddi): Restore compare and swap exchange loop code.
3659 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3661 PR rtl-optimization/86902
3662 * combine.c (try_combine): When changing the CC mode used, don't change
3663 an unrelated mode in other_insn to that new CC mode.
3665 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3667 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3668 with %T in place of calls to dump_generic_expr.
3669 (prune_runtime_alias_test_list): Likewise.
3670 (create_runtime_alias_checks): Likewise.
3671 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3672 (vect_analyze_data_ref_dependence): Likewise.
3673 (vect_slp_analyze_data_ref_dependence): Likewise.
3674 (vect_record_base_alignment): Likewise. Use %G in place of call
3675 to dump_gimple_stmt.
3676 (vect_compute_data_ref_alignment): Likewise.
3677 (verify_data_ref_alignment): Likewise.
3678 (vect_find_same_alignment_drs): Likewise.
3679 (vect_analyze_group_access_1): Likewise.
3680 (vect_analyze_data_ref_accesses): Likewise.
3681 (dependence_distance_ge_vf): Likewise.
3682 (dump_lower_bound): Likewise.
3683 (vect_prune_runtime_alias_test_list): Likewise.
3684 (vect_find_stmt_data_reference): Likewise.
3685 (vect_analyze_data_refs): Likewise.
3686 (vect_create_addr_base_for_vector_ref): Likewise.
3687 (vect_create_data_ref_ptr): Likewise.
3688 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3689 (vect_can_advance_ivs_p): Likewise.
3690 (vect_update_ivs_after_vectorizer): Likewise.
3691 (vect_gen_prolog_loop_niters): Likewise.
3692 (vect_prepare_for_masked_peels): Likewise.
3693 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3694 (vect_determine_vectorization_factor): Likewise.
3695 (vect_is_simple_iv_evolution): Likewise.
3696 (vect_analyze_scalar_cycles_1): Likewise.
3697 (vect_analyze_loop_operations): Likewise.
3698 (report_vect_op): Likewise.
3699 (vect_is_slp_reduction): Likewise.
3700 (check_reduction_path): Likewise.
3701 (vect_is_simple_reduction): Likewise.
3702 (vect_create_epilog_for_reduction): Likewise.
3703 (vect_finalize_reduction:): Likewise.
3704 (vectorizable_induction): Likewise.
3705 (vect_transform_loop_stmt): Likewise.
3706 (vect_transform_loop): Likewise.
3707 (optimize_mask_stores): Likewise.
3708 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3709 (vect_split_statement): Likewise.
3710 (vect_recog_over_widening_pattern): Likewise.
3711 (vect_recog_average_pattern): Likewise.
3712 (vect_determine_min_output_precision_1): Likewise.
3713 (vect_determine_precisions_from_range): Likewise.
3714 (vect_determine_precisions_from_users): Likewise.
3715 (vect_mark_pattern_stmts): Likewise.
3716 (vect_pattern_recog_1): Likewise.
3717 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3718 (vect_record_max_nunits): Likewise.
3719 (vect_build_slp_tree_1): Likewise.
3720 (vect_build_slp_tree_2): Likewise.
3721 (vect_print_slp_tree): Likewise.
3722 (vect_analyze_slp_instance): Likewise.
3723 (vect_detect_hybrid_slp_stmts): Likewise.
3724 (vect_detect_hybrid_slp_1): Likewise.
3725 (vect_slp_analyze_operations): Likewise.
3726 (vect_slp_analyze_bb_1): Likewise.
3727 (vect_transform_slp_perm_load): Likewise.
3728 (vect_schedule_slp_instance): Likewise.
3729 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3730 (vect_mark_stmts_to_be_vectorized): Likewise.
3731 (vect_init_vector_1): Likewise.
3732 (vect_get_vec_def_for_operand): Likewise.
3733 (vect_finish_stmt_generation_1): Likewise.
3734 (vect_check_load_store_mask): Likewise.
3735 (vectorizable_call): Likewise.
3736 (vectorizable_conversion): Likewise.
3737 (vectorizable_operation): Likewise.
3738 (vectorizable_load): Likewise.
3739 (vect_analyze_stmt): Likewise.
3740 (vect_is_simple_use): Likewise.
3741 (vect_get_vector_types_for_stmt): Likewise.
3742 (vect_get_mask_type_for_stmt): Likewise.
3743 * tree-vectorizer.c (increase_alignment): Likewise.
3745 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
3747 * doc/rtl.texi: Adjust vec_select description.
3748 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3749 non-constant selectors.
3751 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
3753 * config/aarch64/aarch64-protos.h
3754 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3755 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3756 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3757 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3758 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3759 (AARCH64_FL_PROFILE): Move index so flags are ordered.
3760 (AARCH64_ISA_RCPC8_4): New flag.
3761 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3762 to aarch64_offset_9bit_signed_unscaled_p.
3763 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3765 * config/aarch64/constraints.md (Ust): New constraint.
3766 * config/aarch64/predicates.md.
3767 (aarch64_9bit_offset_memory_operand): New predicate.
3768 (aarch64_rcpc_memory_operand): New predicate.
3770 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
3772 PR rtl-optimization/87361
3773 * rtlanal.c (nonzero_bits1): Revert accidental change.
3775 2018-09-19 Richard Biener <rguenther@suse.de>
3777 PR tree-optimization/87349
3778 PR tree-optimization/87342
3779 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3781 2018-09-18 Marek Polacek <polacek@redhat.com>
3783 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3784 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3786 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3788 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3790 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
3792 PR rtl-optimization/86882
3793 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3795 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
3797 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3798 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3800 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
3803 * doc/invoke.texi (Link Options): Fix formatting and grammar.
3805 2018-09-18 Richard Biener <rguenther@suse.de>
3808 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3809 (compute_samebase_partition_bases): Likewise.
3810 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3811 (gimple_can_coalesce_p): Simplify.
3813 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
3815 Handle a library implementation of ffs calling __builtin_ffs.
3816 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3817 (mmix_init_libfuncs): New function: make __builtin_ffs expand
3820 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3822 * diagnostic-show-locus.c (class layout_range): Add field
3824 (layout_range::layout_range): Add "original_idx" param and use it
3825 to initialize new field.
3826 (make_range): Use 0 for original_idx.
3827 (layout::layout): Pass in index to calls to
3828 maybe_add_location_range.
3829 (layout::maybe_add_location_range): Add param "original_idx" and
3830 pass it on to layout_range.
3831 (layout::print_any_labels): Pass on range->m_original_idx to
3833 (gcc_rich_location::add_location_if_nearby): Use 0 for
3835 * gcc-rich-location.h (text_range_label::get_text): Update for new
3837 (range_label_for_type_mismatch::get_text): Likewise.
3839 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3841 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3843 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3845 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3846 format_string_diagnostic_t.
3847 (fmtwarn_n): Likewise.
3848 * substring-locations.c
3849 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3850 (format_warning_n_va): Convert to...
3851 (format_string_diagnostic_t::emit_warning_n_va): ...this.
3852 (format_warning_va): Convert to...
3853 (format_string_diagnostic_t::emit_warning_va): ...this.
3854 (format_warning_at_substring): Convert to...
3855 (format_string_diagnostic_t::emit_warning): ...this.
3856 (format_warning_at_substring_n): Convert to...
3857 (format_string_diagnostic_t::emit_warning_n): ...this.
3858 * substring-locations.h (class format_string_diagnostic_t): New
3860 (format_warning_va): Convert to
3861 format_string_diagnostic_t::emit_warning_va.
3862 (format_warning_n_va): Convert to
3863 format_string_diagnostic_t::emit_warning_n_va.
3864 (format_warning_at_substring): Convert to
3865 format_string_diagnostic_t::emit_warning.
3866 (format_warning_at_substring_n): Convert to
3867 format_string_diagnostic_t::emit_warning_n.
3869 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
3870 Bernd Schmidt <bernds_cb1@t-online.de>
3872 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3875 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
3877 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3878 operand 0 predicate to nonimmediate operand.
3879 (rint<mode>2_frndint): Remove insn pattern.
3880 (rint<mode>2): Change operand 1 predicate to general_operand.
3881 Extend operand 1 to XFmode and generate rintxf2 insn.
3882 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3883 Do not use X87MODEF mode macro.
3884 (frndintxf2_<rounding>_i387): Rename from
3885 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
3886 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3887 to XFmode and generate significandxf3 insn.
3889 2018-09-17 Richard Biener <rguenther@suse.de>
3891 PR tree-optimization/87328
3892 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3893 visiting unexecutable backedges when not iterating.
3894 (do_rpo_vn): Mark all edges not executable even when not
3897 2018-09-17 Martin Jambor <mjambor@suse.cz>
3900 * doc/invoke.texi (Warning Options): Likewise.
3902 2018-09-17 Richard Biener <rguenther@suse.de>
3904 PR tree-optimization/87301
3905 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3906 clean EH info from leftover copy assignments.
3908 2018-09-17 Martin Liska <mliska@suse.cz>
3910 PR gcov-profile/85871
3911 * gcov.c (output_intermediate_file): Fix out of bounds
3914 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
3916 * config/arc/arc.c: Object attributes for core4 not reflected
3918 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3921 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
3923 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3925 2018-09-17 Martin Liska <mliska@suse.cz>
3927 * doc/gcov.texi: Document new option --use-hotness-colors.
3928 * gcov.c (struct source_info): Declare new field.
3929 (source_info::source_info): Set default for maximum_count.
3930 (print_usage): Add new -q option.
3931 (process_args): Process it.
3932 (accumulate_line_info): Save src->maximum_count.
3933 (output_line_beginning): Make color line number if
3934 flag_use_hotness_colors is set.
3935 (output_line_details): Pass default argument value.
3936 (output_lines): Pass src->maximum_count.
3938 2018-09-17 Martin Liska <mliska@suse.cz>
3940 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3941 Use processor_names table.
3942 * config/i386/i386.c (ix86_default_align): Use
3943 processor_cost_table for alignment values.
3944 (ix86_option_override_internal): Use processor_names.
3945 (ix86_function_specific_print): Likewise.
3946 * config/i386/i386.h (struct processor_costs):
3947 Add alignment values.
3948 (struct ptt): Remove and replace with const char *.
3949 * config/i386/x86-tune-costs.h (struct processor_costs):
3950 Declare default alignments for all costs.
3952 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
3954 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3955 symbolics or VR_VARYING ranges for ABS_EXPR.
3956 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3957 when range will wrap.
3959 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
3962 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3963 before and after a JUMP_TABLE_DATA.
3965 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
3968 * dojump.c (do_compare_and_jump): Canonicalize function pointers
3969 when one operand is a function pointer. Use POINTER_TYPE_P and
3970 FUNC_OR_METHOD_TYPE_P.
3971 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3972 * fold-const.c (build_range_check): Likewise.
3973 * match.pd (simple_comparison): Likewise.
3975 2018-09-14 David Malcolm <dmalcolm@redhat.com>
3978 * spellcheck.c (get_edit_distance_cutoff): New function.
3979 (selftest::test_edit_distance_unit_test_oneway): Rename to...
3980 (selftest::test_get_edit_distance_one_way): ...this.
3981 (selftest::test_get_edit_distance_unit): Rename to...
3982 (selftest::test_get_edit_distance_both_ways): ...this.
3983 (selftest::test_edit_distances): Move tests to this new function,
3984 and test some more pairs of strings. Update for above renaming.
3985 (selftest::get_old_cutoff): New function.
3986 (selftest::test_get_edit_distance_cutoff): New function.
3987 (selftest::assert_suggested_for): New function.
3988 (ASSERT_SUGGESTED_FOR): New macro.
3989 (selftest::assert_not_suggested_for): New function.
3990 (ASSERT_NOT_SUGGESTED_FOR): New macro.
3991 (selftest::test_suggestions): New function.
3992 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3993 tests to selftest::test_edit_distances and call it. Add calls to
3994 selftest::test_get_edit_distance_cutoff and
3995 selftest::test_suggestions.
3996 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3997 (best_match::consider): Replace hard-coded cutoff calculation with
3999 (best_match::get_cutoff): New declaration.
4000 (best_match::get_best_meaningful_candidate): Likewise.
4002 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4004 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4006 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4009 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4011 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4012 terminated string literal.
4014 2018-09-14 Martin Sebor <msebor@redhat.com>
4016 * builtins.c (unterminated_array): Handle ARRAY_REF.
4017 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4018 * builtins.h (unterminated_array): Declare extern.
4019 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4021 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4024 2018-09-14 Martin Sebor <msebor@redhat.com>
4025 Jeff Law <law@redhat.com>
4027 * builtins.c (unterminated_array): New.
4028 (expand_builtin_strcpy): Adjust.
4029 (expand_builtin_strcpy_args): Detect unterminated arrays.
4030 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4031 unterminated arrays.
4032 * gimple-fold.h (get_maxval_strlen): Add argument.
4033 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4035 * gimple-fold.c (get_range_strlen): Add argument.
4036 (get_maxval_strlen): Adjust.
4037 * gimple-fold.h (get_range_strlen): Add argument.
4039 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4041 * config/i386/movdirintrin.h: Fix copyright year.
4043 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4045 * reg-stack.c: Include regs.h.
4046 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4047 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4048 FIRST_STACK_REG, not DFmode.
4049 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4050 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4051 (change stack): Default register mode to the reg_raw_mode of
4052 FIRST_STACK_REG, not DFmode.
4053 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4054 (*swapxf): Rename from swapxf.
4056 2018-09-14 Carl Love <cel@us.ibm.com>
4058 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4059 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4061 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4064 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4067 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4070 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4072 2018-09-14 Jason Merrill <jason@redhat.com>
4074 Fix --enable-gather-detailed-mem-stats.
4075 * hash-table.c (hash_table_usage): Change from variable to function.
4076 * hash-table.h: Adjust.
4077 * Makefile.in: Add missing dependencies on hash-table.h.
4079 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4081 PR tree-optimization/87259
4083 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4084 execute_cse_reciprocals_1 has tried transforming.
4086 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4088 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4089 VR_VARYING for PLUS/MINUS_EXPR.
4091 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4093 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4096 2018-09-14 Richard Biener <rguenther@suse.de>
4099 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4100 bits for the merged partition.
4102 2018-09-13 Martin Sebor <msebor@redhat.com>
4103 Bernd Edlinger <bernd.edlinger@hotmail.de>
4105 * builtins.h (c_srlen): Add argument.
4106 * builtins.c (warn_string_no_nul): New function.
4107 (c_strlen): Add argument and use it. Update recursive calls.
4108 Pass DECL argument to string_constant to get info on non
4109 terminated strings. Update *NONSTR as needed.
4110 (fold_builtin_strlen): Add argument to calls to c_strlen.
4111 Warn for unterminated arrays.
4112 (warn_string_no_null): Add prototype.
4113 * expr.c (string_constant): Update arguments. Update recursive
4114 calls appropriately. Detect missing NUL terminator and outermost
4115 declaration its missing in.
4116 Improve checks for arrays with nonzero lower bound or elements
4117 that are not a single byte. Simplify offset computation.
4118 Simplify checks for non-NUL terminated strings.
4119 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4120 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4122 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4124 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4126 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4127 argument. Fix range checks.
4128 * fold-const.h (c_getstr): Adjust protoype.
4129 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4130 string is constant but contains no NUL byte.
4132 * expr.c (string_constant): Adjust function comment.
4133 Remove bogus check for zero termination.
4135 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4137 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4138 (get_constant_size): Don't make STRING_CSTs larger than they are.
4139 (check_string_literal): New check function for STRING_CSTs.
4140 (output_constant): Use it.
4142 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4145 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4147 2018-09-13 Richard Biener <rguenther@suse.de>
4149 PR tree-optimization/87263
4150 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4151 (struct unwind_state): Add max_rpo field.
4152 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4153 Compute max_rpo, the max RPO number a block can be backwards reached
4154 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4155 separating it from the iterating mode.
4157 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4159 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4160 (rfs_decision): New scheduling decision.
4162 2018-09-13 Richard Biener <rguenther@suse.de>
4165 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4166 (vn_nary_op_insert_pieces_predicated): Do not write useless
4167 valid_dominated_by_p entry outside of the allocated storage.
4169 2018-09-13 Omar Sandoval <osandov@osandov.com>
4170 Tom de Vries <tdevries@suse.de>
4173 * dwarf2out.c (is_c): New function.
4174 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4176 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4179 * config/aarch64/aarch64.md (*aarch64_bfxil):
4181 * config/aarch64/constraints.md (Ulc): Define.
4182 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4184 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4187 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4189 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4190 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4191 aarch64_layout_frame call.
4192 (aarch64_expand_epilogue): Likewise.
4193 (aarch64_initial_elimination_offset): Likewise.
4194 (aarch64_get_separate_components): Likewise.
4195 (aarch64_use_return_insn_p): Likewise.
4196 (aarch64_layout_frame): Remove unneeded check.
4198 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4200 * configure.ac: Only append
4201 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4202 gcc_config_arguments if it was never reconfigured or last reconfigure
4203 was with different arguments.
4204 * configure: Regenerated.
4206 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4207 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4210 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4211 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4213 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4215 PR tree-optimization/87287
4216 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4217 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4218 * match.pd (X % C == 0): ... here. New optimization.
4220 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4223 * expr.h (maybe_optimize_mod_cmp): Declare.
4224 * expr.c (mod_inv): New function.
4225 (maybe_optimize_mod_cmp): New function.
4226 (do_store_flag): Use it.
4227 * cfgexpand.c (expand_gimple_cond): Likewise.
4229 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4230 Julian Brown <julian@codesourcery.com>
4233 * gimplify.c (gimplify_scan_omp_clauses): Set
4234 target_firstprivatize_array_bases in OpenACC parallel and kernels
4235 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4236 OpenACC data regions.
4238 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4240 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4241 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4243 2018-09-12 Richard Biener <rguenther@suse.de>
4245 PR tree-optimization/87280
4246 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4247 edge but unreachable target.
4248 (do_rpo_vn): For conservatively handling a PHI only mark
4249 the backedge executable but not the block reachable.
4251 2018-09-12 Richard Biener <rguenther@suse.de>
4253 PR tree-optimization/87266
4254 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4257 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4259 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4261 ("trunc<BFP:mode><DFP_ALL:mode>2")
4262 ("trunc<DFP_ALL:mode><BFP:mode>2")
4263 ("extend<BFP:mode><DFP_ALL:mode>2")
4264 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4265 according to the target operand type.
4267 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4268 Andreas Krebbel <krebbel@linux.ibm.com>
4270 PR tree-optimization/86844
4271 * gimple-ssa-store-merging.c
4272 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4273 there are any overlapping stores in between them, make sure they are
4274 also coalesced or we give up completely.
4276 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4279 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4280 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4282 2018-09-12 Tom de Vries <tdevries@suse.de>
4284 * common.opt (gdescribe-dies): Add option.
4285 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4286 attribute for artifical and nameless decls.
4287 (dwarf2out_register_external_die): Add description attribute to
4288 external reference die.
4289 (add_desc_attribute): New functions.
4290 (gen_subprogram_die): Add description attribute to
4291 DW_TAG_call_site_parameter.
4292 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4293 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4294 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4296 (@item -gdescribe-dies): Add.
4298 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4300 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4301 (extract_range_from_binary_expr_1: Call
4302 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4303 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4306 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4308 * gimple-ssa-warn-alloca.c
4309 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4310 field for ALLOCA_BOUND_*_LARGE.
4312 2018-09-11 Nathan Sidwell <nathan@acm.org>
4314 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4316 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4318 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4319 for clobbers. Remove obsolete comment.
4321 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4323 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4324 mpxchk, mpxld and mpxst types.
4325 (define_attr length_immediate): Remove all processing of mpx types.
4326 (define_attr prefix_0f): Ditto.
4327 (define_attr memory): Ditto.
4329 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4331 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4332 (log<mode>2): Change operand 1 predicate to general_operand.
4333 Extend operand 1 to XFmode and generate logxf3 insn.
4334 (log10<mode>2): Change operand 1 predicate to general_operand.
4335 Extend operand 1 to XFmode and generate log10xf3 insn.
4336 (log2<mode>2): Change operand 1 predicate to general_operand.
4337 Extend operand 1 to XFmode and generate log2xf3 insn.
4338 (fyl2xp1_extend<mode>xf3_i387): Remove.
4339 (log1p<mode>2): Change operand 1 predicate to general_operand.
4340 Extend operand 1 to XFmode and generate log1pxf3 insn.
4341 (fxtract_extend<mode>xf3_i387): Remove.
4342 (logb<mode>2): Change operand 1 predicate to general_operand.
4343 Extend operand 1 to XFmode and generate logbxf3 insn.
4344 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4345 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4346 (significand<mode>2): Change operand 1 predicate to general_operand.
4347 Extend operand 1 to XFmode and generate significandxf3 insn.
4349 2018-09-11 Nathan Sidwell <nathan@acm.org>
4351 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4352 (load_specs): Use fatal_error.
4353 (DELETE_IF_ORDINARY, process_command): Use error.
4354 (execute, run_attempt): Use fatal_error.
4356 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4358 * diagnostic-core.h (sorry_at): New prototype.
4359 * diagnostic.c (sorry_at): New function.
4361 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4363 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4364 by zero as VR_UNDEFINED.
4366 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4368 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4369 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4370 (<sincos>mode2): New expander.
4371 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4372 (sincos -> sin, cos splitters): Remove splitter patterns.
4373 (sincos<mode>3): Change operand 2 predicate to general_operand.
4374 Extend operand 2 to XFmode and generate sincosxf3 insn.
4375 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4376 Change operand 3 predicate to const1_operand.
4377 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4378 (tanxf2): Update operands in the call to fptanxf4_i387.
4379 (tan<mode>2): Change operand 1 predicate to general_operand.
4380 Extend operand 1 to XFmode and generate tanxf3 insn.
4381 (atan2xf3): Rename from *fpatanxf3_i387.
4382 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4383 (atan2xf3): Remove expander.
4384 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4385 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4386 (atan<mode>2): Change operand 1 predicate to general_operand.
4387 Extend operand 1 to XFmode and generate atanxf3 insn.
4389 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4391 * config/i386/i386.md (x87/SSE constant load splitter): Use
4392 memory_operand instead of nonimmediate_operand for input operand
4395 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4397 * config/i386/i386.md (float partial SSE register stall splitter): Move
4398 splitter near its instruction pattern.
4399 (float_extend partial SSE register stall splitter): Ditto.
4400 (float_truncate partial SSE register stall splitter): Ditto.
4402 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4405 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4406 to speculation_safe_value_not_needed.
4409 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4410 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4411 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4412 leaf_function_p, instead use has_hard_reg_initial_val.
4414 2018-09-09 Nathan Sidwell <nathan@acm.org>
4416 * gcc.h (pfatal_with_name): Don't declare here.
4417 * gcc.c (pfatal_with_name): Make static.
4419 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4421 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4424 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4426 PR rtl-optimization/85458
4427 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4428 priority hook to reduce the priority of EXPR.
4430 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4432 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4433 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4434 with X87_ENABLE_FLOAT. Remove preparation code.
4435 (*float<SWI48:mode><MODEF:mode>2): Rename from
4436 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4437 math using "enabled" attribute.
4438 (*floatdi<MODEF:mode>2_i387): Rename from
4439 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4440 enable for 32bit targets only.
4441 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4443 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4444 as operand 1 predicate. Rewrite as define_insn_and_split.
4445 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4447 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4449 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4450 to fallthru to FLOAT case.
4452 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4455 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4456 around folding of vec_sl to handle out of range shift values.
4458 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4460 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4461 Update callers to gen_fix_trunc<mode>_i387_fisttp
4462 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4463 nonimmediate_operand.
4464 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4465 and corresponding splitters.
4466 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4467 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4468 (fix_truncdi_i387_with_temp): Remove insn pattern
4469 and corresponding splitters.
4470 (fix_trunc<mode>_i387): Change operand 0 predicate to
4471 nonimmediate_operand.
4472 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4473 and corresponding splitters.
4474 (*fistdi2_1): Remove.
4476 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4477 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4478 (*fist<mode>2_1): Remove.
4479 (fist<mode>2): Ditto.
4480 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4482 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4483 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4484 (fistdi2_<rounding>): Change operand 0 predicate to
4485 nonimmediate_operand.
4486 (fistdi2_<rounding>_with_temp): Remove insn pattern
4487 and corresponding splitters.
4488 (fist<mode>2_<rounding>): Change operand 0 predicate to
4489 nonimmediate_operand.
4490 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4491 and corresponding splitters.
4493 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4495 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4497 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4500 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4502 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4503 early gimple folding of vec_splat().
4504 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4505 * gimple-fold.h: Add an extern define for tree_vec_extract().
4507 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4509 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4510 wrappers around TREE_TYPE comparisons.
4512 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4515 * config/s390/predicates.md: Add nonsym_memory_operand.
4516 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4517 contains a SYMBOL_REF, load it into an intermediate pseudo.
4518 (s390_emit_compare_and_swap): Legitimize operand.
4519 * config/s390/s390.md: Use the new nonsym_memory_operand
4520 with UNSPECV_CAS patterns.
4522 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4525 * config/s390/s390-passes.def: New file.
4526 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4528 (make_pass_s390_early_mach): Add declaration.
4529 * config/s390/s390.c (make_pass_s390_early_mach):
4530 (s390_option_override): Remove dynamic registration.
4531 * config/s390/t-s390: Add s390-passes.def.
4533 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4535 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4536 Remove UNSPEC_LTREL_BASE check.
4537 (annotate_constant_pool_refs): Likewise.
4538 (find_constant_pool_ref): Likewise.
4539 (find_ltrel_base): Removed.
4540 (replace_ltrel_base): Removed.
4541 (s390_mainpool_finish): Remove replace_ltrel_base call.
4542 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4543 (s390_chunkify_finish): Remove replace_ltrel_base call.
4544 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4546 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4549 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4550 to speculation_safe_value_not_needed.
4552 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4553 Bernd Schmidt <bernds_cb1@t-online.de>
4555 * config/nvptx/nvptx-opts.h: New file.
4556 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4557 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4559 (TARGET_SM35): New macro.
4560 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4562 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4564 (misa=): New option.
4565 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4567 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4569 * config/i386/i386.md (truncdfsf2): Remove expander.
4570 (truncdfsf2_with_temp): Ditto.
4571 (truncxf<mode>2): Ditto.
4572 (*truncdfsf_fast_mixed): Remove insn pattern.
4573 (*truncdfsf_fast_i387): Ditto.
4574 (*truncdfsf_mixed): Ditto.
4575 (*truncdfsf_i387): Ditto.
4576 (*truncdfsf2_i387_1): Ditto.
4577 (*truncxfsf2_mixed): Ditto.
4578 (*truncxfdf2_mixed): Ditto.
4579 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4580 to call gen_truncxf<mode>2 instead.
4581 (*truncxf<mode>2_i387): Remove.
4582 (reg->reg splitters): Remove splitter pattern.
4583 (reg->mem splitters): Ditto.
4585 (truncdfsf2): New insn pattern.
4586 (truncxf<mode>2): Ditto.
4588 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4590 * tree-ssa-math-opts.c (is_mult_by): New function.
4591 (is_square_of): Use the above.
4592 (optimize_recip_sqrt): New function.
4593 (pass_cse_reciprocals::execute): Use the above.
4595 2018-09-05 Richard Biener <rguenther@suse.de>
4598 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4599 to zero-init the emplaced vec.
4601 2018-09-05 Martin Liska <mliska@suse.cz>
4603 PR tree-optimization/87205
4604 * tree-switch-conversion.c (pass_lower_switch::execute):
4605 Group cases for switch statements.
4607 2018-09-05 Richard Biener <rguenther@suse.de>
4609 PR tree-optimization/87217
4610 * tree-ssa-sccvn.c (vuse_valueize): New.
4611 (vn_reference_lookup_pieces): Use it.
4612 (vn_reference_lookup): Likewise.
4614 2018-09-05 Nathan Sidwell <nathan@acm.org>
4617 * stor-layout.c (place_field): Scan forwards to check last
4618 bitfield when ms_bitfield_placement is in effect.
4620 2018-09-05 Richard Biener <rguenther@suse.de>
4623 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4626 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4627 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4629 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4630 * config.gcc (extra_objs): Build it.
4631 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4633 * config/aarch64/aarch64-passes.def
4634 (pass_tag_collision_avoidance): New pass.
4635 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4636 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4637 (aarch64_classify_address): Remove static qualifier.
4638 (aarch64_address_info, aarch64_address_type): Move to...
4639 * config/aarch64/aarch64-protos.h: ... here.
4640 (make_pass_tag_collision_avoidance): New function.
4641 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4644 2018-09-05 Martin Liska <mliska@suse.cz>
4646 * doc/gcov.texi: Update documentation of humar
4648 * gcov.c (format_count): Print one decimal place, it provides
4649 more fine number of situations like '1G' vs. '1.4G'.
4651 2018-09-05 Martin Liska <mliska@suse.cz>
4654 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4655 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4656 to generate a MASK value.
4658 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4661 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4662 if frame pointer isn't used.
4663 (compute_frame_pointer_to_fb_displacement): Likewise.
4665 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4668 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4669 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4670 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4671 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4672 and OPTION_MASK_ISA_XSAVEC_UNSET.
4674 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4676 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4677 XOR operations in NAND case.
4679 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4681 * wide-int-range.cc (wide_int_range_convert): New.
4682 * wide-int-range.h (wide_int_range_convert): New.
4683 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4684 code into wide_int_range_convert.
4685 (extract_range_into_wide_ints): Do not munge anti range constants
4686 into the entire domain. Just return the range back.
4688 2018-09-04 Martin Liska <mliska@suse.cz>
4690 * genmatch.c (output_line_directive): Add new argument
4692 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4694 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4696 * doc/invoke.texi (Option Summary): Add whitespace.
4698 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4700 2018-09-04 Richard Biener <rguenther@suse.de>
4702 PR tree-optimization/87211
4703 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4704 backedge value we're supposed to treat as VARYING also number
4705 the PHI to VARYING in case it got a different value-number already.
4707 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4709 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4710 (extract_range_from_binary_expr_1): Do not call
4711 vrp_can_optimize_bit_op.
4712 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4714 (wide_int_range_get_mask_and_bounds): New.
4715 (wide_int_range_optimize_bit_op): New.
4716 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4717 (wide_int_range_bit_and): Same.
4718 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4719 (wide_int_range_optimize_bit_op): New.
4720 (wide_int_range_get_mask_and_bounds): New.
4722 2018-09-04 Richard Biener <rguenther@suse.de>
4724 PR tree-optimization/87176
4725 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4726 variable. When value-numbering a virtual PHI node make sure
4727 to not value-number to the backedge value.
4729 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4731 * doc/extend.texi (Long Long, Hex Floats): Document support for
4732 long long and hex floats in more recent versions of ISO C++.
4734 2018-09-03 Richard Biener <rguenther@suse.de>
4736 PR tree-optimization/87177
4737 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4740 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4742 * bb-reorder.c (edge_order): Convert to C-qsort-style
4743 tri-state comparator.
4744 (reorder_basic_blocks_simple): Change std::stable_sort to
4747 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4749 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4750 tri-state comparator.
4751 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4753 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4755 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
4756 (mergesort): ... here as maximum count for using netsort.
4757 (gcc_qsort): Set nlim to 3 if stable sort is requested.
4758 (gcc_stablesort): New.
4759 * system.h (gcc_stablesort): Declare.
4761 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
4763 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4764 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
4765 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
4767 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
4769 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4770 lxsdx and stxsdx alternatives.
4771 (*mov<mode>_hardfloat64): Ditto.
4772 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4774 2018-09-03 Richard Biener <rguenther@suse.de>
4776 PR tree-optimization/87200
4777 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4780 2018-09-03 Martin Liska <mliska@suse.cz>
4782 PR tree-optimization/87201
4783 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4784 Fix parenthesis in an expression.
4786 2018-09-03 Richard Biener <rguenther@suse.de>
4788 PR tree-optimization/87197
4789 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4790 visited. CSE the VN_INFO hashtable lookup.
4792 PR tree-optimization/87169
4793 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4794 iterating make sure there's no extra backedges from irreducible
4795 regions feeding the header. Mark the destination block
4798 2018-09-03 Martin Liska <mliska@suse.cz>
4801 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4802 * common/common-targhooks.c (default_get_valid_option_values):
4804 * common/common-targhooks.h (default_get_valid_option_values):
4806 * common/config/i386/i386-common.c: Move processor_target_table
4808 (ix86_get_valid_option_values): New function.
4809 (TARGET_GET_VALID_OPTION_VALUES): New macro.
4810 * config/i386/i386.c (struct ptt): Move to i386-common.c.
4811 (PTA_*): Move all defined masks into i386-common.c.
4812 (ix86_function_specific_restore): Use new processor_cost_table.
4813 * config/i386/i386.h (struct ptt): Moved from i386.c.
4814 (struct pta): Likewise.
4815 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4816 * doc/tm.texi.in: Likewise.
4817 * opt-suggestions.c (option_proposer::suggest_option):
4818 Pass prefix to build_option_suggestions.
4819 (option_proposer::get_completions): Likewise.
4820 (option_proposer::build_option_suggestions): Use the new target
4822 * opts.c (struct option_help_tuple): New struct.
4823 (print_filtered_help): Use the new target hook.
4825 2018-09-03 Martin Liska <mliska@suse.cz>
4828 * predict.c (set_even_probabilities): Add likely_edges
4829 argument and handle cases where we have precisely one
4831 (combine_predictions_for_bb): Catch also likely_edges.
4832 (tree_predict_by_opcode): Handle gswitch statements.
4833 * tree-cfg.h (find_case_label_for_value): New declaration.
4834 (find_taken_edge_switch_expr): Likewise.
4835 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4836 Find pivot in decision tree based on probabily, not by number of
4839 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
4841 * doc/standards.texi (Standards): Update Objective-C reference.
4843 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4845 * doc/install.texi (Prerequisites): Update link for MPC.
4847 2018-09-01 Michael Matz <matz@suse.de>
4849 PR tree-optimization/87074
4850 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4851 PHIs for outer-loop uses.
4853 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4855 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4856 * doc/invoke.texi (C Dialect Options): Ditto.
4858 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
4860 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4862 2018-08-31 Richard Biener <rguenther@suse.de>
4864 PR tree-optimization/87168
4865 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4866 (rpo_elim::eliminate_avail): When OP was not visited it must
4869 2018-08-31 David Malcolm <dmalcolm@redhat.com>
4871 * tree-vrp.c (copy_value_range): Convert param "from" from
4872 "value_range *" to "const value_range *".
4873 (range_is_null): Likewise for param "vr".
4874 (range_int_cst_p): Likewise.
4875 (range_int_cst_singleton_p): Likewise.
4876 (symbolic_range_p): Likewise.
4877 (value_ranges_intersect_p): Likewise for both params.
4878 (value_range_nonnegative_p): Likewise for param "vr".
4879 (value_range_constant_singleton): Likewise.
4880 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4881 (extract_range_into_wide_ints): Likewise for param "vr".
4882 (extract_range_from_multiplicative_op): Likewise for params "vr0"
4884 (vrp_can_optimize_bit_op): Likewise.
4885 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4887 (extract_range_from_unary_expr): Likewise.
4888 (debug_value_range): Likewise for param "vr".
4889 (value_range::dump): Add "const" qualifier.
4890 (vrp_prop::check_array_ref): Convert local "vr" from
4891 "value_range *" to "const value_range *".
4892 (vrp_prop::check_mem_ref): Likewise.
4893 (vrp_prop::visit_stmt): Likewise for local "old_vr".
4894 (vrp_intersect_ranges_1): Likewise for param "vr_1".
4895 (vrp_intersect_ranges): Likewise.
4896 (simplify_stmt_for_jump_threading): Likewise for local "vr".
4897 (vrp_prop::vrp_finalize): Likewise.
4898 * tree-vrp.h (value_range::dump): Add "const" qualifier.
4899 (vrp_intersect_ranges): Add "const" qualifier to params as above.
4900 (extract_range_from_unary_expr): Likewise.
4901 (value_range_constant_singleton): Likewise.
4902 (symbolic_range_p): Likewise.
4903 (copy_value_range): Likewise.
4904 (extract_range_from_binary_expr_1): Likewise.
4905 (range_int_cst_p): Likewise.
4906 (vrp_set_zero_nonzero_bits): Likewise.
4907 (range_int_cst_singleton_p): Likewise.
4909 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
4911 * config/aarch64/arm_neon.h (vabsd_s64): New.
4912 (vnegd_s64): Likewise.
4914 2018-08-31 Martin Jambor <mjambor@suse.cz>
4916 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4918 2018-08-31 Martin Liska <mliska@suse.cz>
4920 * ipa-icf.c (sem_item::add_type): Use
4921 sem_item::m_type_hash_cache.
4922 * ipa-icf.h: Move the cache from sem_item_optimizer
4925 2018-08-31 Nathan Sidwell <nathan@acm.org>
4927 * doc/extend.texi (Backwards Compatibility): Remove implicit
4928 extern C leeway of () being (...).
4930 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4932 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4934 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
4938 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4940 2018-08-31 Jakub Jelinek <jakub@redhat.com>
4943 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4944 gen_int_mode. Formatting fixes.
4946 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
4948 * target.def (custom_function_descriptors): Improve documentation.
4949 * doc/tm.texi.in (Trampolines): Expand discussion of function
4950 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4951 beginning of the section.
4952 * doc/tm.texi: Regenerated.
4954 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
4956 * cfg.h (class auto_edge_flag): Spell out the template-id of the
4957 base class in the initializer list. This is a workaround for
4958 building with older GCC.
4959 (class auto_bb_flag): Likewise.
4961 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4963 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4964 (altivec_vcmpequ<VI_char>_p): Remove star.
4965 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4967 (expand_strncmp_vec_sequence): New function.
4968 (emit_final_str_compare_vec): New function.
4969 (expand_strn_compare): Add support for vector strncmp.
4970 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4971 length specification to bytes.
4972 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4973 (vcmpnezb_p): New pattern.
4974 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4975 for option -mstring-compare-inline-limit.
4977 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
4979 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4980 (PTA_SKYLAKE): Add PTA_AES.
4981 (PTA_GOLDMONT): Likewise.
4983 2018-08-29 Jan Hubicka <jh@suse.cz>
4986 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4987 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4989 2018-08-29 Jan Hubicka <jh@suse.cz>
4991 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4993 (hash_tree): Do not visit TYPE_STUB_DECL.
4994 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4995 stream TYPE_STUB_DECL.
4996 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4997 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4998 after free_lang_data.
4999 (type_in_anonymous_namespace_p): Likewise.
5001 2018-08-29 Jan Hubicka <jh@suse.cz>
5003 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5004 comment that it has to be even number.
5005 (class sreal): Change m_sig type to int32_t.
5006 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5007 int64_t for temporary calculations.
5008 (sreal_verify_basics): Drop one bit from minimum and maximum.
5010 2018-08-30 Richard Biener <rguenther@suse.de>
5012 PR tree-optimization/87147
5013 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5014 (visit_phi): When the degenerate result is from the backedge and
5015 we didn't visit its definition yet drop to VARYING.
5016 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5018 2018-08-29 Jan Hubicka <jh@suse.cz>
5020 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5022 (hash_tree): Likewise.
5024 2018-08-29 Jan Hubicka <jh@suse.cz>
5026 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5027 and TYPE_NEXT_REF_TO.
5029 2018-08-29 Jan Hubicka <jh@suse.cz>
5031 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5032 comment that it has to be even number.
5033 (class sreal): Change m_sig type to int32_t.
5034 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5035 int64_t for temporary calculations.
5036 (sreal_verify_basics): Drop one bit from minimum and maximum.
5038 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5040 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5042 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5045 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5046 if to_add is negative.
5048 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5051 * builtins.c (c_strlen): Improve range checks.
5053 2018-08-29 Martin Sebor <msebor@redhat.com>
5054 Jeff Law <law@redhat.com>
5056 PR tree-optimization/86714
5057 PR tree-optimization/86711
5058 * builtins.c (c_strlen): Add arguments to call to string_constant.
5059 * expr.c (string_constant): Add argument. Detect missing nul
5060 terminator and outermost declaration it's missing in.
5061 * expr.h (string_constant): Add argument.
5062 * fold-const.c (read_from_constant_string): Add arguments to call to
5064 (c_getstr): Likewise.
5065 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5067 * tree-ssa-strlen.c (get_stridx): Likewise.
5069 2018-08-29 Jan Hubicka <jh@suse.cz>
5071 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5072 Do not stream DECL_VINDEX.
5073 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5074 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5075 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5077 2018-08-29 Richard Biener <rguenther@suse.de>
5079 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5080 virtual operands that are not default defs to honor region
5082 (rpo_vn_valueize): Remove ineffective code here.
5084 2018-08-29 Richard Biener <rguenther@suse.de>
5086 PR tree-optimization/87132
5087 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5088 when skipping defs reachable over backedges.
5090 2018-08-29 Richard Biener <rguenther@suse.de>
5092 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5093 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5094 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5095 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5096 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5097 (vn_reference_lookup_3): Remove use of const_parms.
5098 (free_rpo_vn): Do not free const_parms.
5099 (do_rpo_vn): Do not call init_const_parms.
5100 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5101 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5102 (call_may_clobber_ref_p_1): Likewise.
5104 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5107 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5109 (-ftree-scev-cprop): Document.
5111 2018-08-29 Jan Hubicka <jh@suse.cz>
5113 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5115 (sreal constructor): Update.
5116 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5117 sreal:operator/): Update.
5119 2018-08-29 Martin Liska <mliska@suse.cz>
5121 * tree-switch-conversion.c (switch_conversion::expand):
5122 Strenghten assumption about gswitch statements.
5124 2018-08-29 Richard Biener <rguenther@suse.de>
5126 PR tree-optimization/87117
5127 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5128 re-value-number released SSA VDEFs.
5130 2018-08-29 Richard Biener <rguenther@suse.de>
5132 PR tree-optimization/87126
5133 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5135 2018-08-28 Jim Wilson <jimw@sifive.com>
5137 * config/riscv/pic.md: Rewrite.
5138 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5140 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5141 (SOFTF, default_load, softload, softstore): New.
5143 2018-08-28 Jeff Law <law@redhat.com>
5145 * fold-const.c (fold_binary_loc): Remove recently added assert.
5147 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5149 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5150 to OP parmeter of generated function.
5152 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5154 PR tree-optimization/87009
5155 * match.pd: Add boolean optimizations.
5157 2018-08-28 Martin Sebor <msebor@redhat.com>
5160 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5161 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5162 (pass_walloca::gate): Use it.
5163 (alloca_call_type): Same.
5164 (pass_walloca::execute): Same.
5165 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5167 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5169 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5170 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5173 2018-08-28 Richard Biener <rguenther@suse.de>
5175 PR tree-optimization/87124
5176 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5177 constants before looking up avail.
5179 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5182 * calls.c (maybe_warn_nonstring_arg): Punt early if
5183 warn_stringop_overflow is zero. Don't call get_range_strlen
5184 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5185 Swap comparison operands to have constants on rhs. Only use
5186 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5187 increment lenrng[0].
5189 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5191 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5192 use of tree_to_shwi. Remove duplicated test for the size being
5193 a whole number of bytes.
5195 2018-08-28 Richard Biener <rguenther@suse.de>
5197 PR tree-optimization/87117
5198 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5199 Handle removed stmt without LHS (GIMPLE_NOP).
5201 2018-08-28 Richard Biener <rguenther@suse.de>
5203 PR tree-optimization/87117
5204 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5205 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5207 2018-08-28 Richard Biener <rguenther@suse.de>
5209 PR tree-optimization/87117
5210 * tree-ssa-pre.c (compute_avail): Do not make expressions
5211 with predicated values available.
5212 (get_expr_value_id): Assert we do not run into predicated value
5215 2018-08-28 Richard Biener <rguenther@suse.de>
5217 PR tree-optimization/87117
5218 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5219 get virtual operands.
5220 (get_expr_operands): Handle STRING_CST like other decls.
5222 2018-08-28 Martin Liska <mliska@suse.cz>
5224 * tree.h: Update documentation of fndecl_built_in_p
5228 2018-08-27 Jeff Law <law@redhat.com>
5229 PR tree-optimization/87110
5230 * tree-ssa-dse.c (compute_trims): Handle non-constant
5233 2018-08-27 Martin Sebor <msebor@redhat.com>
5235 PR tree-optimization/86914
5236 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5238 2018-08-27 Martin Sebor <msebor@redhat.com>
5240 PR tree-optimization/87112
5241 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5242 the type of the bound argument.
5244 2018-08-27 Jeff Law <law@redhat.com>
5246 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5247 type does not have a TYPE_SIZE_UNIT.
5249 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5251 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5252 with include of backend.h.
5254 2018-08-27 Richard Biener <rguenther@suse.de>
5256 PR tree-optimization/86927
5257 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5258 use const cond reduction code.
5260 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5262 PR tree-optimization/85758
5263 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5265 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5268 * diagnostic-show-locus.c (class layout_range): Update for
5269 conversion of show_caret_p to a tri-state.
5270 (layout_range::layout_range): Likewise.
5271 (make_range): Likewise.
5272 (layout::maybe_add_location_range): Likewise.
5273 (layout::should_print_annotation_line_p): Don't show annotation
5274 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5275 (layout::get_state_at_point): Update for conversion of
5276 show_caret_p to a tri-state. Bail out early for
5277 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5278 underlining or source colorization.
5279 (gcc_rich_location::add_location_if_nearby): Update for conversion
5280 of show_caret_p to a tri-state.
5281 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5282 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5284 (selftest::test_one_liner_labels): Likewise.
5285 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5286 conversion of show_caret_p to a tri-state.
5287 * pretty-print.c (text_info::set_location): Likewise.
5288 * pretty-print.h (text_info::set_location): Likewise.
5289 * substring-locations.c (format_warning_n_va): Likewise.
5290 * tree-diagnostic.c (default_tree_printer): Likewise.
5291 * tree-pretty-print.c (newline_and_indent): Likewise.
5293 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5296 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5297 line above for line-insertion fix-it hints.
5298 (selftest::test_fixit_insert_containing_newline): Update the
5299 expected results, and add a test with line-numbering enabled.
5301 2018-08-27 Martin Liska <mliska@suse.cz>
5304 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5305 params with DECL_HAS_VALUE_EXPR_P.
5307 2018-08-27 Martin Liska <mliska@suse.cz>
5309 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5310 selected expansion strategy.
5312 2018-08-27 Martin Liska <mliska@suse.cz>
5314 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5315 * builtins.c (is_builtin_fn): Likewise.
5316 * attribs.c (diag_attr_exclusions): Use new function
5317 fndecl_built_in_p and remove check for FUNCTION_DECL if
5319 (builtin_mathfn_code): Likewise.
5320 (fold_builtin_expect): Likewise.
5321 (fold_call_expr): Likewise.
5322 (fold_builtin_call_array): Likewise.
5323 (fold_call_stmt): Likewise.
5324 (set_builtin_user_assembler_name): Likewise.
5325 (is_simple_builtin): Likewise.
5326 * calls.c (gimple_alloca_call_p): Likewise.
5327 (maybe_warn_nonstring_arg): Likewise.
5328 * cfgexpand.c (expand_call_stmt): Likewise.
5329 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5330 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5331 (cgraph_node::verify_node): Likewise.
5332 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5333 (cgraph_node::create_clone): Likewise.
5334 * config/arm/arm.c (arm_insert_attributes): Likewise.
5335 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5336 * dse.c (scan_insn): Likewise.
5337 * expr.c (expand_expr_real_1): Likewise.
5338 * fold-const.c (operand_equal_p): Likewise.
5339 (fold_binary_loc): Likewise.
5340 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5341 * gimple-low.c (lower_stmt): Likewise.
5342 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5343 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5345 * gimple.c (gimple_build_call_from_tree): Likewise.
5346 (gimple_call_builtin_p): Likewise.
5347 (gimple_call_combined_fn): Likewise.
5348 * gimplify.c (gimplify_call_expr): Likewise.
5349 (gimple_boolify): Likewise.
5350 (gimplify_modify_expr): Likewise.
5351 (gimplify_addr_expr): Likewise.
5352 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5353 * ipa-cp.c (determine_versionability): Likewise.
5354 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5355 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5356 * ipa-split.c (visit_bb): Likewise.
5357 (split_function): Likewise.
5358 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5359 * lto-cgraph.c (input_node): Likewise.
5360 * lto-streamer-out.c (write_symbol): Likewise.
5361 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5362 (lower_omp_1): Likewise.
5363 * predict.c (strip_predict_hints): Likewise.
5364 * print-tree.c (print_node): Likewise.
5365 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5366 * trans-mem.c (is_tm_irrevocable): Likewise.
5367 (is_tm_load): Likewise.
5368 (is_tm_simple_load): Likewise.
5369 (is_tm_store): Likewise.
5370 (is_tm_simple_store): Likewise.
5371 (is_tm_abort): Likewise.
5372 (tm_region_init_1): Likewise.
5373 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5374 * tree-cfg.c (verify_gimple_call): Likewise.
5375 (move_stmt_r): Likewise.
5376 (stmt_can_terminate_bb_p): Likewise.
5377 * tree-eh.c (lower_eh_constructs_2): Likewise.
5378 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5379 * tree-inline.c (remap_gimple_stmt): Likewise.
5380 (copy_bb): Likewise.
5381 (estimate_num_insns): Likewise.
5382 (fold_marked_statements): Likewise.
5383 * tree-sra.c (scan_function): Likewise.
5384 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5385 (optimize_stack_restore): Likewise.
5386 (pass_fold_builtins::execute): Likewise.
5387 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5388 (mark_all_reaching_defs_necessary_1): Likewise.
5389 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5390 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5391 (pass_forwprop::execute): Likewise.
5392 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5393 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5394 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5395 * tree-ssa-strlen.c (get_string_length): Likewise.
5396 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5397 (find_func_aliases_for_call): Likewise.
5398 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5399 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5400 * tree-tailcall.c (find_tail_calls): Likewise.
5401 * tree.c (need_assembler_name_p): Likewise.
5402 (free_lang_data_in_decl): Likewise.
5403 (get_call_combined_fn): Likewise.
5404 * ubsan.c (is_ubsan_builtin_p): Likewise.
5405 * varasm.c (incorporeal_function_p): Likewise.
5406 * tree.h (DECL_BUILT_IN): Remove and replace with
5408 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5409 (fndecl_built_in_p): New.
5411 2018-08-27 Martin Liska <mliska@suse.cz>
5413 PR tree-optimization/86847
5414 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5415 Dump also subtree probability.
5416 (switch_decision_tree::do_jump_if_equal): New function.
5417 (switch_decision_tree::emit_case_nodes): Handle special
5418 situations in balanced tree that can be emitted much simpler.
5419 Fix calculation of probabilities that happen in tree expansion.
5420 * tree-switch-conversion.h (struct cluster): Add
5422 (struct simple_cluster): Likewise.
5423 (struct case_tree_node): Add new function has_child.
5424 (do_jump_if_equal): New.
5426 2018-08-27 Martin Liska <mliska@suse.cz>
5428 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5429 Add new argument to bit_test_cluster constructor.
5430 (bit_test_cluster::emit): Set bits really number of values
5432 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5433 probability argument.
5434 * tree-switch-conversion.h (struct bit_test_cluster):
5435 Add m_handles_entire_switch.
5437 2018-08-27 Martin Liska <mliska@suse.cz>
5439 PR tree-optimization/86702
5440 * tree-switch-conversion.c (jump_table_cluster::emit):
5441 Make probabilities even for values in jump table
5442 according to number of cases handled.
5443 (switch_decision_tree::compute_cases_per_edge): Pass
5444 argument to reset_out_edges_aux function.
5445 (switch_decision_tree::analyze_switch_statement): Likewise.
5446 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5449 2018-08-27 Martin Liska <mliska@suse.cz>
5451 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5452 cfun argument explicitly.
5453 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5454 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5455 function gimple_switch_default_bb.
5456 (convert_switch_statements):
5458 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5459 * stmt.c (label_to_block_fn): Use label_to_block and pass
5460 cfun argument explicitly and use gimple_switch_label_bb.
5461 (expand_case): Likewise.
5462 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5463 cfun argument explicitly. Likewise.
5464 (make_edges_bb): Likewise.
5465 (make_cond_expr_edges): Likewise.
5466 (get_cases_for_edge): Likewise.
5467 (make_gimple_switch_edges): Likewise.
5468 (label_to_block_fn): Likewise.
5469 (label_to_block): Likewise.
5470 (make_goto_expr_edges): Likewise.
5471 (make_gimple_asm_edges): Likewise.
5472 (main_block_label): Likewise.
5473 (group_case_labels_stmt): Likewise.
5474 (find_taken_edge_computed_goto): Likewise.
5475 (find_taken_edge_switch_expr): Likewise.
5476 (gimple_verify_flow_info): Likewise.
5477 (gimple_redirect_edge_and_branch): Likewise.
5478 (gimple_switch_label_bb): New function.
5479 (gimple_switch_default_bb): Likewise.
5480 (gimple_switch_edge): Likewise.
5481 (gimple_switch_default_edge): Likewise.
5482 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5483 (label_to_block): ... with this.
5484 (gimple_switch_label_bb): New.
5485 (gimple_switch_default_bb): Likewise.
5486 (gimple_switch_edge): Likewise.
5487 (gimple_switch_default_edge): Likewise.
5488 * tree-cfgcleanup.c (convert_single_case_switch): Use
5489 new gimple functions and pass new argument to label_to_block.
5490 (cleanup_control_flow_bb):
5491 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5492 cfun argument explicitly.
5493 (make_eh_edges): Likewise.
5494 (redirect_eh_dispatch_edge): Likewise.
5495 (lower_resx): Likewise.
5496 (lower_eh_dispatch): Likewise.
5497 (maybe_remove_unreachable_handlers): Likewise.
5498 (unsplit_eh): Likewise.
5499 (cleanup_empty_eh): Likewise.
5500 (verify_eh_edges): Likewise.
5501 (verify_eh_dispatch_edge): Likewise.
5502 * tree-ssa-dom.c (record_edge_info): Likewise.
5503 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5504 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5505 (thread_through_normal_block): Likewise.
5506 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5507 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5508 * tree-switch-conversion.c (switch_conversion::collect): Use new
5510 (switch_conversion::check_final_bb): Likewise.
5511 (switch_conversion::gather_default_values): Pass new argument
5513 (switch_conversion::build_constructors): Likewise.
5514 (switch_decision_tree::compute_cases_per_edge): Use new
5515 gimple_switch_edge function.
5516 (switch_decision_tree::analyze_switch_statement): Pass new argument
5518 (switch_decision_tree::try_switch_expansion): Use
5519 gimple_switch_default_edge.
5520 * tree-vrp.c (find_switch_asserts): Pass new argument
5522 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5523 (vr_values::simplify_switch_using_ranges): Likewise.
5525 2018-08-27 Richard Biener <rguenther@suse.de>
5527 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5528 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5530 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5531 (struct vn_nary_op_s): Add unwind_to member. Add
5532 predicated_values flag and put result into a union together
5533 with a linked list of vn_pval.
5534 (struct vn_ssa_aux): Add name member to make maintaining
5535 a map of SSA name to vn_ssa_aux possible. Remove no longer
5536 needed info, dfsnum, low, visited, on_sccstack, use_processed
5537 and range_info_anti_range_p members.
5538 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5539 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5541 (vn_valueize): New global.
5542 (vn_context_bb): Likewise.
5543 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5544 VN_INFO_PTR_INFO): Remove.
5545 * tree-ssa-sccvn.c: ... (rewrite)
5546 (pass_fre::execute): For -O2+ initialize loops and run
5547 RPO VN in optimistic mode (iterating). For -O1 and -Og
5548 run RPO VN in non-optimistic mode.
5549 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5550 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5551 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5552 (rpo-vn-max-loop-depth): Document.
5553 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5554 when valuezing the VUSE signals we walked out of the region.
5555 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5556 (phi_translate): Set VN context block to use for availability
5558 (compute_avail): Likewise.
5559 (pre_valueize): New function.
5560 (pass_pre::execute): Adjust to the RPO VN API.
5562 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5563 (propagate_constants_for_unrolling): Remove.
5564 (tree_unroll_loops_completely): Perform value-numbering
5565 on the unrolled bodies loop parent.
5567 2018-08-27 Richard Biener <rguenther@suse.de>
5569 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5570 for partial antic compute.
5572 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5574 PR rtl-optimization/87065
5575 * combine.c (simplify_if_then_else): Formatting fix.
5576 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5578 (known_cond): Don't return const_true_rtx for vector modes. Use
5579 CONST0_RTX instead of const0_rtx. Formatting fixes.
5581 2018-08-27 Martin Liska <mliska@suse.cz>
5583 PR gcov-profile/87069
5584 * gcov.c (process_file): Record files already processed
5585 and warn about a file being processed multiple times.
5587 2018-08-27 Martin Liska <mliska@suse.cz>
5590 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5591 Set default values for x_aarch64_*_string strings.
5592 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5593 prefix. For -mabi do not print '=ABI' in help and use
5594 <option_value> format for -msve-vector-bits and -moverride
5597 2018-08-26 Jeff Law <law@redhat.com>
5599 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5602 2018-08-26 Marek Polacek <polacek@redhat.com>
5604 PR c++/87029, Implement -Wredundant-move.
5605 * doc/invoke.texi: Document -Wredundant-move.
5607 2018-08-25 Martin Sebor <msebor@redhat.com>
5609 PR tree-optimization/87059
5610 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5611 to the same type as the other.
5612 * fold-const.c (fold_binary_loc): Assert expectation.
5614 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5616 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5617 extraneous parentheses, dead code section and formatting.
5619 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5622 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5623 wide enough for jumps in the line-numbering to be visible.
5624 (layout::print_gap_in_line_numbering): New member function.
5625 (layout::calculate_line_spans): When using line numbering, merge
5626 line spans that are only 1 line apart.
5627 (diagnostic_show_locus): When printing line numbers, show gaps in
5628 line numbering directly, rather than printing headers.
5629 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5630 line-numbering with multiple line spans.
5631 (selftest::test_fixit_insert_containing_newline_2): Add test of
5632 line-numbering, in which the spans are close enough to be merged.
5634 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5636 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5637 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5638 * tree-vrp.c (range_is_nonnull): Remove.
5639 (range_includes_zero_p): Accept value_range instead of min/max.
5640 (extract_range_from_binary_expr_1): Do not early bail on
5642 Use range_includes_zero_p instead of range_is_nonnull.
5643 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5644 of range_is_nonnull.
5645 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5646 special case VR_ANTI_RANGE.
5647 (vrp_finalize): Same.
5648 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5650 (range_is_nonnull): Remove.
5651 * vr-values.c (vrp_stmt_computes_nonzero): Use
5652 range_includes_zero_p instead of range_is_nonnull.
5653 (extract_range_basic): Pass value_range to range_includes_zero_p
5654 instead of range_is_nonnull.
5656 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5658 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5659 * emit-rtl.h (rtl_data): Remove return_bnd.
5660 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5661 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5662 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5663 (POINTER_BOUNDS_MODE): Remove definition.
5664 (make_pointer_bounds_mode): Remove.
5665 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5666 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5667 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5668 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5669 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5670 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5671 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5673 * config/i386/i386-modes.def (BND32, BND64): Remove.
5674 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5675 (dbx64_register_map): Ditto.
5676 (svr4_dbx_register_map): Ditto.
5677 (indirect_thunk_bnd_needed): Remove.
5678 (indirect_thunks_bnd_used): Ditto.
5679 (indirect_return_bnd_needed): Ditto.
5680 (indirect_return_via_cx_bnd): Ditto.
5681 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5682 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5683 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5684 (output_indirect_thunk_function): Remove handling of
5685 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5686 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5687 (ix86_save_reg): Remove handling of crtl->return_bnd.
5688 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5689 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5690 and UNSPEC_BNDLX_ADDR.
5691 (ix86_output_indirect_branch_via_reg): Remove handling of
5692 indirect_thunk_prefix_bnd.
5693 (ix86_output_indirect_branch_via_push): Ditto.
5694 (ix86_output_function_return): Ditto.
5695 (ix86_output_indirect_function_return): Ditto.
5696 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5697 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5698 (CALL_USED_REGISTERS): Ditto.
5699 (REG_ALLOC_ORDER): Update for removal of bound registers.
5700 (HI_REGISTER_NAMES): Ditto.
5701 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5702 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5703 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5704 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5705 (FIRST_PSEUDO_REG): Update.
5706 (BND): Remove mode iterator.
5707 * config/i386/predicates.md (bnd_mem_operator): Remove.
5709 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5711 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5714 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
5716 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5717 the case in which the permute needs only a single element and
5718 repeats for every vector of the result. Extend that case to
5719 handle variable-length vectors.
5720 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5722 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
5725 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5726 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5728 2018-08-24 Richard Biener <rguenther@suse.de>
5730 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5731 bb_flags_allocated members.
5732 (auto_flag): New RAII class for allocating flags.
5733 (auto_edge_flag): New RAII class for allocating edge flags.
5734 (auto_bb_flag): New RAII class for allocating bb flags.
5735 * cfgloop.c (verify_loop_structure): Allocate temporary edge
5737 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5738 in favor of temporarily allocated BB flag.
5739 * hsa-brig.c: Re-order includes.
5740 * hsa-dump.c: Likewise.
5741 * hsa-regalloc.c: Likewise.
5742 * print-rtl.c: Likewise.
5743 * profile-count.c: Likewise.
5745 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
5748 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5751 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5754 * wide-int-range.cc (wide_int_range_div): Do not ignore result
5755 from wide_int_range_multiplicative_op.
5757 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5759 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5762 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
5764 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5767 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
5769 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5770 full GENERIC expression used for replacement.
5772 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
5774 * tree-vrp.c (abs_extent_range): Remove.
5775 (extract_range_into_wide_ints): Pass wide ints by reference.
5776 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5777 Pass wide ints by reference in all calls to
5778 extract_range_into_wide_ints.
5779 * wide-int-range.cc (wide_int_range_div): New.
5780 * wide-int-range.h (wide_int_range_div): New.
5781 (wide_int_range_includes_zero_p): New.
5782 (wide_int_range_zero_p): New.
5784 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
5786 * config/aarch64/aarch64.md (arches): New enum.
5787 (arch): New enum attr.
5788 (arch_enabled): New attr.
5789 (enabled): Now uses arch_enabled only.
5790 (simd, sve, fp16): Removed attribute.
5791 (fp): Attr now defined in terms of 'arch'.
5792 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5793 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5794 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5795 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5796 attributes into 'arch'.
5797 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5798 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5799 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5800 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5801 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5802 'simd' attribute into 'arch'.
5803 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5804 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5805 Convert use of 'fp' attribute to 'arch'.
5806 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5807 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5809 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5810 (different modes) Merge 'fp' and 'simd' into 'arch'.
5811 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5814 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
5816 PR rtl-optimization/87026
5817 * expmed.c (canonicalize_comparison): If we can no longer create
5818 pseudoregisters, don't.
5820 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
5823 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5825 * config/arm/arm.c (speculation_barrier_libfunc): New static
5827 (arm_init_libfuncs): Initialize it.
5828 (arm_emit_speculation_barrier): New function.
5829 * config/arm/arm.md (speculation_barrier): Call
5830 arm_emit_speculation_barrier for architectures that do not have
5832 (speculation_barrier_insn): Only match on Armv7 or later.
5834 2018-08-23 Richard Biener <rguenther@suse.de>
5837 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5840 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5842 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5843 of single-vector TBLs.
5844 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5847 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
5850 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5851 aarch64_evpc_tbl guard.
5853 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
5855 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5858 2018-08-22 Martin Sebor <msebor@redhat.com>
5861 * tree-pretty-print.c (pretty_print_string): Add argument.
5862 (dump_generic_node): Call to pretty_print_string with string size.
5864 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
5866 PR rtl-optimization/86771
5867 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5868 of two SETs into those two SETs, one to be placed at i2, if that SETs
5869 destination is modified between i2 and i3.
5871 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5873 PR tree-optimization/86725
5874 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5876 (vect_analyze_scalar_cycles_1): Check it.
5878 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5880 PR tree-optimization/86725
5881 * tree-vect-loop.c (vect_is_simple_reduction): When treating
5882 an outer loop phi as a double reduction, make sure that the
5883 single user of the phi result is an inner loop phi.
5885 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5887 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5888 grouped stores with gaps to a strided group.
5890 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
5892 * tree-vect-stmts.c (get_group_load_store_type)
5893 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5894 first statement in a group.
5896 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5898 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5899 the sequence used in gcc/gcc.c.
5901 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5904 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5907 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5909 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5910 Darwin10-specific unwinder-shim.
5911 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5912 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5913 New to cater for Darwin10 Rosetta.
5915 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5917 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5918 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5920 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
5925 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5926 (dwarf2out_switch_text_section): Generate a local label for the
5927 second function sub-section and apply it as the second FDE start
5929 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5930 second sub-section start.
5932 2018-08-22 Richard Biener <rguenther@suse.de>
5934 PR tree-optimization/86988
5935 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5937 2018-08-22 Richard Biener <rguenther@suse.de>
5939 PR tree-optimization/86945
5940 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5942 2018-08-22 Alexandre Oliva <oliva@adacore.com>
5944 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5945 a comment about how uses of r2 for .sdata2 come about.
5947 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
5949 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5951 2018-08-21 Marek Polacek <polacek@redhat.com>
5953 PR c++/86981, Implement -Wpessimizing-move.
5954 * doc/invoke.texi: Document -Wpessimizing-move.
5956 2018-08-21 Jan Hubicka <jh@suse.cz>
5958 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5959 * tree.h (is_redundant_typedef): Remove.
5960 * dwarf2out.c (is_redundant_typedef): Turn into static function.
5962 2018-08-21 Jan Hubicka <jh@suse.cz>
5964 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5967 2018-08-21 Tamar Christina <tamar.christina@arm.com>
5969 * expmed.c (extract_low_bits): Reject invalid subregs early.
5971 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5974 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5977 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5979 * config/vxworks.h: Guard vxworks_asm_out_constructor and
5980 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5981 * config/vxworks.c: Likewise.
5983 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5985 * config/vxworks.c: Set targetm.have_ctors_dtors
5986 if HAVE_INITFINI_ARRAY_SUPPORT.
5987 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5988 if HAVE_INITFINI_ARRAY_SUPPORT.
5990 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5992 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5993 default search path for VxWorks < 7.
5995 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5997 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5998 (get_format_string): Refer to c_getstr.
6000 2018-08-21 Tom de Vries <tdevries@suse.de>
6002 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6003 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6004 (debuginfo_early_stop): Declare.
6005 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6006 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6007 (debuginfo_early_stop): New function.
6008 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6009 and debuginfo_early_stop.
6010 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6011 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6012 (general_init): Call debuginfo_early_init.
6013 (finalize): Call debuginfo_fini.
6014 (do_compile): Call debuginfo_init.
6015 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6017 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6019 2018-08-21 Tom de Vries <tdevries@suse.de>
6021 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6022 flag_dump_noaddr and flag_dump_unnumbered.
6024 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6026 * wide-int-range.cc (wide_int_range_abs): New.
6027 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6028 * wide-int-range.h (wide_int_range_abs): New.
6029 (wide_int_range_min_max): New.
6030 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6031 case to call wide_int_range_abs.
6032 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6033 (extract_range_from_abs_expr): Delete.
6035 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6038 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6039 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6042 2018-08-20 Nathan Sidwell <nathan@acm.org>
6043 Jeff Law <law@redhat.com>
6045 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6046 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6048 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6051 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6052 (decl_attributes): Likewise.
6053 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6055 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6056 * diagnostic-core.h (class auto_diagnostic_group): New class.
6057 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6058 (diagnostic_report_diagnostic): Handle the first diagnostics within
6060 (emit_diagnostic): Add auto_diagnostic_group instance.
6062 (inform_n): Likewise.
6063 (warning): Likewise.
6064 (warning_at): Likewise.
6065 (warning_n): Likewise.
6066 (pedwarn): Likewise.
6067 (permerror): Likewise.
6069 (error_n): Likewise.
6070 (error_at): Likewise.
6072 (fatal_error): Likewise.
6073 (internal_error): Likewise.
6074 (internal_error_no_backtrace): Likewise.
6075 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6076 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6077 * diagnostic.h (struct diagnostic_context): Add fields
6078 "diagnostic_group_nesting_depth",
6079 "diagnostic_group_emission_count", "begin_group_cb",
6081 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6082 Add auto_diagnostic_group instance(s).
6083 (find_explicit_erroneous_behavior): Likewise.
6084 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6085 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6086 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6087 (gimplify_va_arg_expr): Likewise.
6088 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6089 (HSA_SORRY_AT): Likewise.
6090 * ipa-devirt.c (compare_virtual_tables): Likewise.
6091 (warn_odr): Likewise.
6092 * multiple_target.c (expand_target_clones): Likewise.
6093 * opts-common.c (cmdline_handle_error): Likewise.
6094 * reginfo.c (globalize_reg): Likewise.
6095 * substring-locations.c (format_warning_n_va): Likewise.
6096 * tree-inline.c (expand_call_inline): Likewise.
6097 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6098 * tree-ssa-loop-niter.c
6099 (do_warn_aggressive_loop_optimizations): Likewise.
6100 * tree-ssa-uninit.c (warn_uninit): Likewise.
6101 * tree.c (warn_deprecated_use): Likewise.
6103 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6106 * config/i386/i386.md (eh_return): Always update EH return
6107 address in word_mode.
6109 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6111 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6112 TARGET_SPLIT_COMPLEX_ARG is defined.
6114 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6116 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6118 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6121 * expr.c (expand_assignment): Assert that bitpos is positive.
6122 (store_field): Likewise
6123 (expand_expr_real_1): Make sure that bitpos is positive.
6124 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6127 2018-08-20 Nathan Sidwell <nathan@acm.org>
6129 * Makefile.in (CPP_ID_DATA_H): Delete.
6130 (CPP_INTERNAL_H): Don't add it.
6131 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6132 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6134 2018-08-20 Richard Biener <rguenther@suse.de>
6136 PR tree-optimization/78655
6137 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6138 pointer + offset nonnull if either operand is nonnull work.
6140 2018-08-20 Tom de Vries <tdevries@suse.de>
6142 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6143 unless the referenced die describes the added property using
6144 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6145 Otherwise, add a DW_AT_location to the referenced die.
6147 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6150 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6151 register_operand when calling ix86_set_reg_reg_cost.
6152 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6153 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6154 predicate and to 1 otherwise.
6156 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6158 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6159 emit a diagnostic that it is not supported and reset the option.
6160 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6161 supported and consume the option. (ASM_FINAL_SPEC): New.
6163 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6165 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6168 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6170 C-SKY port: Documentation
6172 * doc/extend.texi (C-SKY Function Attributes): New section.
6173 * doc/invoke.texi (Option Summary): Add C-SKY options.
6174 (C-SKY Options): New section.
6175 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6177 2018-08-17 Jojo <jijie_rong@c-sky.com>
6178 Huibin Wang <huibin_wang@c-sky.com>
6179 Sandra Loosemore <sandra@codesourcery.com>
6180 Chung-Lin Tang <cltang@codesourcery.com>
6182 C-SKY port: Backend implementation
6184 * config/csky/*: New.
6185 * common/config/csky/*: New.
6187 2018-08-17 Jojo <jijie_rong@c-sky.com>
6188 Huibin Wang <huibin_wang@c-sky.com>
6189 Sandra Loosemore <sandra@codesourcery.com>
6190 Chung-Lin Tang <cltang@codesourcery.com>
6191 Andrew Jenner <andrew@codesourcery.com>
6193 C-SKY port: Configury
6195 * config.gcc (csky-*-*): New.
6196 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6197 * configure: Regenerated.
6199 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6201 * dump-context.h: Include "dumpfile.h".
6202 (dump_context::dump_printf_va): Convert final param from va_list
6203 to va_list *. Convert from ATTRIBUTE_PRINTF to
6204 ATTRIBUTE_GCC_DUMP_PRINTF.
6205 (dump_context::dump_printf_loc_va): Likewise.
6206 * dumpfile.c: Include "stringpool.h".
6207 (make_item_for_dump_printf_va): Delete.
6208 (make_item_for_dump_printf): Delete.
6209 (class dump_pretty_printer): New class.
6210 (dump_pretty_printer::dump_pretty_printer): New ctor.
6211 (dump_pretty_printer::emit_items): New member function.
6212 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6214 (dump_pretty_printer::emit_item): New member function.
6215 (dump_pretty_printer::stash_item): New member function.
6216 (dump_pretty_printer::format_decoder_cb): New member function.
6217 (dump_pretty_printer::decode_format): New member function.
6218 (dump_context::dump_printf_va): Reimplement in terms of
6219 dump_pretty_printer.
6220 (dump_context::dump_printf_loc_va): Convert final param from va_list
6222 (dump_context::begin_scope): Reimplement call to
6223 make_item_for_dump_printf.
6224 (dump_printf): Update for change to dump_printf_va.
6225 (dump_printf_loc): Likewise.
6226 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6227 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6228 with %T, %E, and %G.
6229 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6230 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6231 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6232 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6233 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6234 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6235 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6236 within a dump_printf_loc call to "%wu".
6237 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6238 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6239 missing space after "=".
6240 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6241 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6242 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6243 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6244 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6245 duplicate "vectorized" from message.
6247 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6249 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6250 polyNxK_t element's TYPE_STRING_FLAG.
6252 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6254 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6255 (they were unnamed before). Fix comments.
6257 2018-08-17 Nathan Sidwell <nathan@acm.org>
6259 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6261 2018-08-17 Richard Biener <rguenther@suse.de>
6263 PR tree-optimization/86841
6264 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6266 2018-08-17 Martin Liska <mliska@suse.cz>
6268 * common.opt: Remove Warn, Init and Report for options with
6269 Ignore/Deprecated flag. Warning is done automatically for
6271 * config/i386/i386.opt: Likewise.
6272 * config/ia64/ia64.opt: Likewise.
6273 * config/rs6000/rs6000.opt: Likewise.
6274 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6275 Remove usage of flag_check_pointer_bounds.
6276 * lto-wrapper.c (merge_and_complain): Do not handle
6277 OPT_fcheck_pointer_bounds.
6278 (append_compiler_options): Likewise.
6279 * opt-functions.awk: Do not handle Deprecated.
6280 * optc-gen.awk: Check that Var, Report and Init are not
6281 used for an option with Ignore/Deprecated flag.
6282 * opts-common.c (decode_cmdline_option): Do not report
6284 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6286 * opts.h (struct cl_option): Remove cl_deprecated flag.
6287 (CL_ERR_DEPRECATED): Remove error enum value.
6289 2018-08-17 Richard Biener <rguenther@suse.de>
6292 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6293 across a va-arg-pack using call adjust its return value accordingly.
6295 2018-08-16 Martin Sebor <msebor@redhat.com>
6297 PR tree-optimization/86853
6298 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6299 (struct fmtresult): Add member and initialize it in ctors.
6300 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6301 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6302 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6303 (parse_directive): Handle %C same as %c.
6304 (sprintf_dom_walker::compute_format_length): Adjust.
6305 (is_call_safe): Adjust.
6307 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6309 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6310 for determining how to count the elements.
6311 * builtins.h (c_strlen): Adjust prototype.
6312 * expr.c (string_constant): Add new parameter mem_size.
6313 Set *mem_size appropriately.
6314 * expr.h (string_constant): Adjust protoype.
6315 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6316 * gimple-fold.h (get_range_strlen): Adjust prototype.
6317 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6318 (format_string): Call get_string_length with eltsize.
6320 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6322 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6323 to emit the span, rather than setting it as the prefix.
6325 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6327 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6328 "margin_char" parameter, defaulting to space. Use it in place
6329 of pp_space for the initial part of the margin.
6330 (layout::print_leading_fixits): Use '+' when filling the margin
6331 of line-insertion fix-it hints.
6333 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6335 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6338 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6340 * config/rs6000/altivec.md: Don't set length attribute to the default
6342 * config/rs6000/darwin.md: Ditto.
6343 * config/rs6000/dfp.md: Ditto.
6344 * config/rs6000/htm.md: Ditto.
6345 * config/rs6000/rs6000.md: Ditto.
6346 * config/rs6000/sync.md: Ditto.
6347 * config/rs6000/vsx.md: Ditto.
6349 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6351 * config/rs6000/altivec.md: Don't set length attribute to the default
6352 value, for branch instructions.
6353 * config/rs6000/darwin.md: Ditto.
6354 * config/rs6000/rs6000.md: Ditto.
6356 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6358 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6359 (unnamed conditional branch define_insn): Set length to 4 or 8
6360 depending on offset.
6361 (<bd>_<mode>): Similar, for alternative 0.
6362 (<bd>tf_<mode>): Ditto.
6364 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6366 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6368 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6370 * doc/rtl.texi: Replace old RTX class names with new names.
6373 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6375 * expmed.h (canonicalize_comparison): New declaration.
6376 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6377 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6378 * optabs.c (prepare_cmp_insn): Likewise.
6379 * rtl.h (unsigned_condition_p): New function which checks if a
6380 comparison operator is unsigned.
6382 2018-08-16 Nathan Sidwell <nathan@acm.org>
6384 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6385 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6387 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6390 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6391 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6392 (mov<mov>): ..this and enable unconditionally.
6394 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6396 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6398 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6400 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6401 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6402 "Common" with "Target".
6404 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6406 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6407 * doc/invoke.texi (mmitigate-rop): Remove.
6408 * config/i386/i386.c: Do not include "regrename.h".
6409 (ix86_rop_should_change_byte_p, reg_encoded_number)
6410 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6412 (ix86_reorg): Remove call to ix86_mitigate_rop.
6413 * config/i386/i386.md (attr "modrm_class"): Remove.
6414 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6415 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6416 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6418 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6420 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6421 allow folding of mergeh() and mergel() for the float and double types.
6422 (fold_mergehl_helper): Rework to handle building a permute tree
6425 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6427 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6430 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6432 * common.opt (fdiagnostics-show-labels): New option.
6433 * diagnostic-show-locus.c (class layout_range): Add field
6435 (class layout): Add field "m_show_labels_p".
6436 (layout_range::layout_range): Add param "label" and use it to
6438 (make_range): Pass in NULL for new "label" param of layout_range's
6440 (layout::layout): Initialize m_show_labels_p.
6441 (layout::maybe_add_location_range): Pass in loc_range->m_label
6442 when constructing layout_range instances.
6443 (struct line_label): New struct.
6444 (layout::print_any_labels): New member function.
6445 (layout::print_line): Call it if label-printing is enabled.
6446 (selftest::test_one_liner_labels): New test.
6447 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6448 * diagnostic.c (diagnostic_initialize): Initialize
6449 context->show_labels_p.
6450 * diagnostic.h (struct diagnostic_context): Add field
6452 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6453 -fno-diagnostics-show-labels.
6454 * dwarf2out.c (gen_producer_string): Add
6455 OPT_fdiagnostics_show_labels to the ignored options.
6456 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6458 (gcc_rich_location::maybe_add_expr): Likewise.
6459 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6460 label" param, defaulting to NULL.
6461 (gcc_rich_location::add_expr): Add "label" param.
6462 (gcc_rich_location::maybe_add_expr): Likewise.
6463 (class text_range_label): New class.
6464 (class range_label_for_type_mismatch): New class.
6465 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6466 of format_warning_va.
6467 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6468 * lto-wrapper.c (merge_and_complain): Add
6469 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6470 (append_compiler_options): Likewise to the dropped options.
6471 (append_diag_options): Likewise to the passed-on options.
6472 * opts.c (common_handle_option): Handle the new option.
6473 * selftest-diagnostic.c
6474 (test_diagnostic_context::test_diagnostic_context): Enable
6476 * substring-locations.c: Include "gcc-rich-location.h".
6477 (format_warning_n_va): Add "fmt_label" and "param_label" params
6478 and use them as appropriate.
6479 (format_warning_va): Add "fmt_label" and "param_label" params,
6480 passing them on to format_warning_n_va.
6481 (format_warning_at_substring): Likewise.
6482 (format_warning_at_substring_n): Likewise.
6483 * substring-locations.h (format_warning_va): Add "fmt_label" and
6484 "param_label" params.
6485 (format_warning_n_va): Likewise.
6486 (format_warning_at_substring): Likewise.
6487 (format_warning_at_substring_n): Likewise.
6488 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6490 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6493 * builtins.c (expand_builtin_memcmp): Do not expand the call
6494 when overflow is detected.
6496 2018-08-15 Martin Sebor <msebor@redhat.com>
6498 PR tree-optimization/71625
6499 * config/aarch64/aarch64-builtins.c
6500 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6502 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6504 * config/s390/s390.c (s390_reorg): Remove loop.
6506 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6509 (darwin_function_switched_text_sections): Delete.
6510 * gcc/config/darwin.h
6511 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6513 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6516 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6517 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6518 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6520 2018-08-15 Martin Liska <mliska@suse.cz>
6522 PR tree-optimization/86925
6523 * predict.c (expr_expected_value_1): When taking
6524 later predictor, assign also probability.
6525 Use fold_build2_initializer_loc in order to fold
6526 the expression in -frounding-math.
6528 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6530 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6532 (expand_vec_perm_1): Try the new method.
6534 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6537 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6538 Check whether lra_live_max_point is 0 before dividing.
6540 2018-08-14 Martin Sebor <msebor@redhat.com>
6542 PR tree-optimization/86650
6543 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6544 (vrp_prop::check_mem_ref): Same.
6546 2018-08-13 Liu Hao <lh_mouse@126.com>
6548 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6549 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6550 and clear it thereafter, as it only works for DBCS.
6552 2018-08-13 Liu Hao <lh_mouse@126.com>
6554 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6555 handle returned by _get_osf_handle().
6557 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6559 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6560 for folding vec_perm.
6562 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6564 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6565 Add support for gimple-folding of vec_pack() and vec_unpack()
6568 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6570 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6571 vec_xst variants to the list.
6572 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6573 vector loads and stores.
6575 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6577 * config.gcc (rs6000-ibm-aix4.x): Delete.
6578 (rs6000-ibm-aix5.1): Delete.
6579 (rs6000-ibm-aix5.2): Delete.
6580 (rs6000-ibm-aix5.3): Delete.
6581 * config/rs6000/aix43.h: Delete.
6582 * config/rs6000/aix51.h: Delete.
6583 * config/rs6000/aix52.h: Delete.
6584 * config/rs6000/t-aix43: Delete.
6586 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6588 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6590 (s390_decompose_address): Factor out constant pool ref
6593 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6595 * config/nds32/nds32-predicates.c
6596 (nds32_can_use_bclr_p): Change return type as bool.
6597 (nds32_can_use_bset_p): Ditto.
6598 (nds32_can_use_btgl_p): Ditto.
6599 (nds32_can_use_bitci_p): Ditto.
6600 * config/nds32/nds32-protos.h
6601 (nds32_can_use_bclr_p): Change declaration.
6602 (nds32_can_use_bset_p): Ditto.
6603 (nds32_can_use_btgl_p): Ditto.
6604 (nds32_can_use_bitci_p): Ditto.
6606 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6608 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6609 Support -msched-prolog-epilog option.
6610 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6612 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6614 * common/config/nds32/nds32-common.c
6615 (nds32_option_optimization_table): Enalbe -malways-align.
6617 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6619 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6621 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6622 OPT_misr_secure_ case.
6623 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6624 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6625 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6627 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6628 (nds32_isr_info): New field security_level.
6629 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6630 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6631 * config/nds32/nds32.opt (misr-secure): New option.
6632 * config/nds32/nds32_init.inc: New file.
6633 * config/nds32/nds32_isr.h: New file.
6635 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6637 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6638 Update comment for atomic instructions.
6639 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6640 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6642 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6643 load for __ATOMIC_SEQ_CST model.
6644 (atomic_loaddi_1): Remove float register target.
6645 (atomic_storedi): Handle CONST_INT values.
6646 (atomic_storedi_1): Remove float register source. Add special case
6648 (memory_barrier): New expander and insn.
6650 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6652 PR tree-optimization/86835
6653 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6654 new_stmt after def_gsi, make sure to insert new_square_stmt after
6655 that stmt, not 2 stmts before it.
6657 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6660 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6663 2018-08-10 Martin Liska <mliska@suse.cz>
6666 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6668 * builtins.c (expand_builtin_expect_with_probability):
6670 (expand_builtin_expect_with_probability): New function.
6671 (build_builtin_expect_predicate): Add new argumnet probability
6672 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6673 (fold_builtin_expect):
6676 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6677 * builtins.h (fold_builtin_expect): Set new argument.
6678 * doc/extend.texi: Document __builtin_expect_with_probability.
6679 * doc/invoke.texi: Likewise.
6680 * gimple-fold.c (gimple_fold_call): Pass new argument.
6681 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6682 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6683 * predict.c (get_predictor_value): New function.
6684 (expr_expected_value): Add new argument probability. Assume
6685 that predictor and probability are always non-null.
6686 (expr_expected_value_1): Likewise. For __builtin_expect and
6687 __builtin_expect_with_probability set probability. Handle
6688 combination in binary expressions.
6689 (tree_predict_by_opcode): Simplify code by simply calling
6690 get_predictor_value.
6691 (pass_strip_predict_hints::execute): Add handling of
6692 BUILT_IN_EXPECT_WITH_PROBABILITY.
6693 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6695 * tree.h (DECL_BUILT_IN_P): New function.
6697 2018-08-10 Martin Liska <mliska@suse.cz>
6699 PR tree-optimization/85799
6700 * passes.def: Add argument for pass_strip_predict_hints.
6701 * predict.c (class pass_strip_predict_hints): Add new argument
6703 (strip_predictor_early): New function.
6704 (pass_strip_predict_hints::execute): Call the function to
6706 (strip_predict_hints): New function.
6707 * predict.def: Fix comment.
6709 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
6711 * Makefile.in: Clarify which tm.texi to copy over to assert the
6712 right to grant a GFDL license for all.
6714 2018-08-09 Jeff Law <law@redhat.com>
6716 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6719 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
6721 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6724 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6726 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6727 reductions for variable-length vectors.
6729 2018-08-09 David Malcolm <dmalcolm@redhat.com>
6732 * common.opt (fdiagnostics-show-line-numbers): New option.
6733 * diagnostic-show-locus.c (class layout): Add fields
6734 "m_show_line_numbers_p" and "m_linenum_width";
6735 (num_digits): New function.
6736 (test_num_digits): New function.
6737 (layout::layout): Initialize new fields. Update m_x_offset
6738 logic to handle any left margin.
6739 (layout::print_source_line): Print line number when requested.
6740 (layout::start_annotation_line): New member function.
6741 (layout::print_annotation_line): Call it.
6742 (layout::print_leading_fixits): Likewise.
6743 (layout::print_trailing_fixits): Likewise. Update calls to
6744 move_to_column for new parameter.
6745 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6746 it to potentially call start_annotation_line.
6747 (layout::show_ruler): Call start_annotation_line.
6748 (selftest::test_line_numbers_multiline_range): New selftest.
6749 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6750 and selftest::test_line_numbers_multiline_range.
6751 * diagnostic.c (diagnostic_initialize): Initialize
6752 show_line_numbers_p.
6753 * diagnostic.h (struct diagnostic_context): Add field
6754 "show_line_numbers_p".
6755 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6756 -fno-diagnostics-show-line-numbers.
6757 * dwarf2out.c (gen_producer_string): Add
6758 OPT_fdiagnostics_show_line_numbers to the ignored options.
6759 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6760 one setting" options.
6761 (append_compiler_options): Likewise to the dropped options.
6762 (append_diag_options): Likewise to the passed-on options.
6763 * opts.c (common_handle_option): Handle the new option.
6764 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6766 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
6768 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6769 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
6770 third argument of type "const signed char" to descriptions of
6771 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6772 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6773 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6774 __builtin_bcdsub_ov functions.
6776 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6778 PR tree-optimization/86858
6779 * tree-vect-loop.c (vect_is_simple_reduction): Restore
6780 flow_bb_inside_loop_p calls.
6782 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
6784 PR tree-optimization/86871
6785 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6786 instead of gimple_assign_lhs.
6788 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
6791 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6792 register constraint to operand 0.
6793 (add<mode>3_carryinC): Likewise.
6794 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6796 2018-08-09 Martin Liska <mliska@suse.cz>
6799 * common.opt: Remove extra line.
6801 2018-08-09 Martin Liska <mliska@suse.cz>
6803 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6804 at the end of a line, make first letter capital and end up
6805 a sentence with a dot.
6806 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6807 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6808 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6809 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6810 (PARAM_MAX_ISL_OPERATIONS): Likewise.
6811 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6812 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6813 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6814 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6815 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6816 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6817 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6818 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6819 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6820 (PARAM_TREE_REASSOC_WIDTH): Likewise.
6821 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6822 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6823 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6825 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
6828 * config/s390/s390.c (s390_option_override_internal): Reduce the
6829 stack-clash-protection-probe-interval param if it would be too big
6832 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
6835 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6836 * config/m68k/m68k.c (handle_move_double): Don't call
6837 m68k_final_prescan_insn.
6838 (m68k_adjust_decorated_operand): Renamed from
6839 m68k_final_prescan_insn, remove first and third operand and
6841 (print_operand): Call it.
6842 (print_operand_address): Call it.
6844 2018-08-08 Nathan Sidwell <nathan@acm.org>
6846 * diagnostic.c (diagnostic_report_current_module): Use
6847 linemap_included_from & linemap_included_from_linemap.
6849 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
6851 * config/aarch64/aarch64-cores.def: Add phecda core.
6852 * config/aarch64/aarch64-tune.md: Regenerate.
6853 * doc/invoke.texi: Add phecda core.
6855 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6858 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6860 * config/s390/s390.md ("movti"): Add more alternatives for
6861 constant to GPR copies.
6863 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
6865 * config/s390/s390.c: Fix whitespace damage throughout the file.
6866 * config/s390/s390.h: Likewise.
6867 * config/s390/tpf.h: Likewise.
6869 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6871 * config/s390/s390.c (s390_loadrelative_operand_p):
6872 Remove TARGET_CPU_ZARCH usages.
6873 (s390_rtx_costs): Likewise.
6874 (s390_legitimate_constant_p): Likewise.
6875 (s390_cannot_force_const_mem): Likewise.
6876 (legitimate_reload_constant_p): Likewise.
6877 (s390_preferred_reload_class): Likewise.
6878 (legitimize_pic_address): Likewise.
6879 (legitimize_tls_address): Likewise.
6880 (s390_split_branches): Removed.
6881 (s390_add_execute): Removed.
6882 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6883 (s390_mainpool_start): Likewise.
6884 (s390_mainpool_finish): Likewise.
6885 (s390_mainpool_cancel): Removed.
6886 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6887 (s390_chunkify_cancel): Likewise.
6888 (s390_return_addr_rtx): Likewise.
6889 (s390_register_info): Remove split_branches_pending_p uages.
6890 (s390_optimize_register_info): Likewise.
6891 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6892 split_branches_pending_p usages.
6893 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6894 (s390_load_got): Likewise.
6895 (s390_expand_split_stack_prologue): Likewise.
6896 (output_asm_nops): Likewise.
6897 (s390_function_profiler): Likewise.
6898 (s390_emit_call): Likewise.
6899 (s390_conditional_register_usage): Likewise.
6900 (s390_optimize_prologue): Likewise.
6901 (s390_reorg): Remove TARGET_CPU_ZARCH and
6902 split_branches_pending_p usages.
6903 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6905 (s390_output_indirect_thunk_function): Likewise.
6906 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6907 (TARGET_CPU_ZARCH_P): Removed.
6908 (struct machine_function): Remove split_branches_pending_p.
6909 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6911 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
6913 * common/config/s390/s390-common.c (processor_flags_table):
6915 * config.gcc: Remove with_arch/with_tune support.
6916 * config/s390/2064.md: Remove cpu attribute comparisons.
6917 * config/s390/driver-native.c (s390_host_detect_local_cpu):
6919 * config/s390/linux.h (ASM_SPEC):
6920 Remove -march support.
6921 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6922 Use a table to get an arch level.
6923 * config/s390/s390-opts.h (enum processor_type):
6925 * config/s390/s390.c
6926 (processor_table): Remove entries, add arch_level values.
6927 (s390_issue_rate): Remove cases.
6928 (s390_option_override): Adjust
6929 s390_option_override_internal() call.
6930 (s390_option_override_internal): Remove deprecation warning.
6931 (s390_valid_target_attribute_tree): Adjust
6932 s390_option_override_internal() call.
6933 * config/s390/s390.h (struct s390_processor):
6934 Share with s390-c.c, add arch_level field.
6935 * config/s390/s390.md:
6936 Remove occurrences in cpu attribute.
6937 * config/s390/s390.opt: Remove -march/-mtune support.
6938 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6939 * doc/invoke.texi: Remove deprecation warning.
6941 2018-08-08 Luis Machado <luis.machado@linaro.org>
6943 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6945 (qdf24xx_tunings): Set vector cost structure to
6946 qdf24xx_vector_cost.
6948 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6949 <register_sextend>: Set to 3.
6951 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
6954 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6955 * config/aarch64/aarch64-simd.md
6956 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6957 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6958 (aarch64_frecpx<mode>): ...this new pattern.
6959 * config/aarch64/aarch64-simd-builtins.def: Remove comment
6960 about aarch64_frecp<FRECP:frecp_suffix><mode>.
6962 2018-08-07 Martin Liska <mliska@suse.cz>
6965 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6966 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6967 * predict.def (PRED_MALLOC_NONNULL): New predictor.
6968 * doc/extend.texi: Document that malloc attribute adds
6971 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
6974 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6975 Define to speculation_safe_value_not_needed.
6977 2018-08-06 Jeff Law <law@redhat.com>
6979 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6980 the vr_values instance to cprop_into_stmt.
6981 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6982 (cprop_operand): Also query EVRP to determine if OP is a constant.
6984 2018-08-06 Nathan Sidwell <nathan@acm.org>
6986 * diagnostic.c (diagnostic_report_current_module): Reroll
6987 included-at loop. Translate text.
6989 2018-08-06 David Malcolm <dmalcolm@redhat.com>
6991 * function-tests.c (selftest::test_expansion_to_rtl): Call
6992 free_after_compilation.
6994 2018-08-06 Alan Hayward <alan.hayward@arm.com>
6996 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6998 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7000 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7001 loops with memory block operations from getting unrolled.
7003 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7006 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7007 Define to speculation_safe_value_not_needed.
7009 2018-08-06 Jeff Law <law@redhat.com>
7011 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7014 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7017 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7018 with all enabled __intN types.
7020 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7022 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7024 * alias.c (record_set): Check for clobber high.
7025 * cfgexpand.c (expand_gimple_stmt): Likewise.
7026 * combine-stack-adj.c (single_set_for_csa): Likewise.
7027 * combine.c (find_single_use_1): Likewise.
7028 (set_nonzero_bits_and_sign_copies): Likewise.
7029 (get_combine_src_dest): Likewise.
7030 (is_parallel_of_n_reg_sets): Likewise.
7031 (try_combine): Likewise.
7032 (record_dead_and_set_regs_1): Likewise.
7033 (reg_dead_at_p_1): Likewise.
7034 (reg_dead_at_p): Likewise.
7035 * dce.c (deletable_insn_p): Likewise.
7036 (mark_nonreg_stores_1): Likewise.
7037 (mark_nonreg_stores_2): Likewise.
7038 * df-scan.c (df_find_hard_reg_defs): Likewise.
7039 (df_uses_record): Likewise.
7040 (df_get_call_refs): Likewise.
7041 * dwarf2out.c (mem_loc_descriptor): Likewise.
7042 * haifa-sched.c (haifa_classify_rtx): Likewise.
7043 * ira-build.c (create_insn_allocnos): Likewise.
7044 * ira-costs.c (scan_one_insn): Likewise.
7045 * ira.c (equiv_init_movable_p): Likewise.
7046 (rtx_moveable_p): Likewise.
7047 (interesting_dest_for_shprep): Likewise.
7048 * jump.c (mark_jump_label_1): Likewise.
7049 * postreload-gcse.c (record_opr_changes): Likewise.
7050 * postreload.c (reload_cse_simplify): Likewise.
7051 (struct reg_use): Add source expr.
7052 (reload_combine): Check for clobber high.
7053 (reload_combine_note_use): Likewise.
7054 (reload_cse_move2add): Likewise.
7055 (move2add_note_store): Likewise.
7056 * print-rtl.c (print_pattern): Likewise.
7057 * recog.c (decode_asm_operands): Likewise.
7058 (store_data_bypass_p): Likewise.
7059 (if_test_bypass_p): Likewise.
7060 * regcprop.c (kill_clobbered_value): Likewise.
7061 (kill_set_value): Likewise.
7062 * reginfo.c (reg_scan_mark_refs): Likewise.
7063 * reload1.c (maybe_fix_stack_asms): Likewise.
7064 (eliminate_regs_1): Likewise.
7065 (elimination_effects): Likewise.
7066 (mark_not_eliminable): Likewise.
7067 (scan_paradoxical_subregs): Likewise.
7068 (forget_old_reloads_1): Likewise.
7069 * reorg.c (find_end_label): Likewise.
7070 (try_merge_delay_insns): Likewise.
7071 (redundant_insn): Likewise.
7072 (own_thread_p): Likewise.
7073 (fill_simple_delay_slots): Likewise.
7074 (fill_slots_from_thread): Likewise.
7075 (dbr_schedule): Likewise.
7076 * resource.c (update_live_status): Likewise.
7077 (mark_referenced_resources): Likewise.
7078 (mark_set_resources): Likewise.
7079 * rtl.c (copy_rtx): Likewise.
7080 * rtlanal.c (reg_referenced_p): Likewise.
7081 (single_set_2): Likewise.
7082 (noop_move_p): Likewise.
7083 (note_stores): Likewise.
7084 * sched-deps.c (sched_analyze_reg): Likewise.
7085 (sched_analyze_insn): Likewise.
7087 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7089 * cse.c (invalidate_reg): New function extracted from...
7090 (invalidate): ...here.
7091 (canonicalize_insn): Check for clobber high.
7092 (invalidate_from_clobbers): invalidate clobber highs.
7093 (invalidate_from_sets_and_clobbers): Likewise.
7094 (count_reg_usage): Check for clobber high.
7095 (insn_live_p): Likewise.
7096 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7097 (cselib_invalidate_regno): Check for clobber in setter.
7098 (cselib_invalidate_rtx): Pass through setter.
7099 (cselib_invalidate_rtx_note_stores):
7100 (cselib_process_insn): Check for clobber high.
7101 * cselib.h (cselib_invalidate_rtx): Add operand.
7103 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7105 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7106 (mark_not_eliminable): Likewise.
7107 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7108 * lra-lives.c (process_bb_lives): Check for clobber high.
7109 * lra.c (new_insn_reg): Remember clobber highs.
7110 (collect_non_operand_hard_regs): Check for clobber high.
7111 (lra_set_insn_recog_data): Likewise.
7112 (add_regs_to_insn_regno_info): Likewise.
7113 (lra_update_insn_regno_info): Likewise.
7115 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7117 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7118 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7120 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7122 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7123 (copy_insn_1): Likewise.
7124 (gen_hard_reg_clobber_high): New gen function.
7125 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7126 * genemit.c (gen_exp): Likewise.
7127 (gen_emit_seq): Pass through info.
7128 (gen_insn): Check for CLOBBER_HIGH.
7129 (gen_expand): Pass through info.
7130 (gen_split): Likewise.
7131 (output_add_clobbers): Likewise.
7132 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7133 (remove_clobbers): Likewise.
7134 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7136 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7138 * doc/rtl.texi (clobber_high): Add.
7139 (parallel): Add in clobber high
7140 * rtl.c (rtl_check_failed_code3): Add function.
7141 * rtl.def (CLOBBER_HIGH): Add expression.
7142 * rtl.h (RTL_CHECKC3): Add macro.
7143 (rtl_check_failed_code3): Add declaration.
7144 (XC3EXP): Add macro.
7146 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7149 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7150 cfun->machine->max_used_stack_alignment if needed.
7152 2018-08-04 Martin Sebor <msebor@redhat.com>
7154 PR tree-optimization/86571
7155 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7158 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7161 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7164 2018-08-03 Jeff Law <law@redhat.com>
7167 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7168 Define to speculation_safe_value_not_needed.
7170 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7172 * doc/gcov.texi (-x): Remove duplicate "to".
7173 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7174 (-Wif-not-aligned): Remove duplicate "is".
7175 (-flto): Remove duplicate "the".
7176 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7177 duplicate "v5.00.b".
7178 (MSP430 Options): Remove duplicate "and" from the description
7179 of "-mgprel-sec=regexp".
7180 (x86 Options): Remove duplicate copies of "vmldLog102" and
7181 vmlsLog104 from description of "-mveclibabi=type".
7183 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7185 * internal-fn.h (first_commutative_argument): Declare.
7186 * internal-fn.c (first_commutative_argument): New function.
7187 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7188 restrictions for pattern statements. Use first_commutative_argument
7189 to look for commutative operands in calls to internal functions.
7191 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7193 * Makefile.in (wide-int-range.o): New.
7194 * tree-vrp.c: Move all the wide_int_* functions to...
7195 * wide-int-range.cc: ...here.
7196 * tree-vrp.h: Move all the wide_int_* prototypes to...
7197 * wide-int-range.h: ...here.
7199 2018-08-03 Tom de Vries <tdevries@suse.de>
7201 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7203 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7204 * except.c (output_function_exception_table): Do early exit if
7205 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7207 2018-08-03 Martin Liska <mliska@suse.cz>
7209 * predict.c (dump_prediction): Change to 2 digits
7212 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7214 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7216 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7218 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7220 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7221 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7222 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7223 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7224 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7226 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7228 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7229 pp_take_prefix when saving the existing prefix.
7230 * diagnostic.c (diagnostic_append_note): Likewise.
7231 * langhooks.c (lhd_print_error_function): Likewise.
7232 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7233 param's type. Free the existing prefix.
7234 (pp_take_prefix): New function.
7235 (pretty_printer::pretty_printer): Drop the prefix parameter.
7236 Rename the length parameter to match the comment.
7237 (pretty_printer::~pretty_printer): Free the prefix.
7238 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7240 (struct pretty_printer): Drop the "const" from "prefix" field's
7241 type and clarify memory management.
7242 (pp_set_prefix): Drop the "const" from the 2nd param.
7243 (pp_take_prefix): New decl.
7245 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7247 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7248 for word_mode_ok here instead of passing as argument.
7249 (expand_block_compare): Change select_block_compare_mode() call.
7250 (expand_strncmp_gpr_sequence): New function.
7251 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7253 2018-08-02 Jeff Law <law@redhat.com>
7256 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7257 Define to speculation_safe_value_not_needed.
7260 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7261 Define to speculation_safe_value_not_needed.
7263 2018-08-02 Tom de Vries <tdevries@suse.de>
7266 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7267 function. Return UI_TARGET unconditionally.
7268 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7269 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7271 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7273 * genemit.c (print_overload_test): Fix typo.
7275 2018-08-02 Richard Biener <rguenther@suse.de>
7277 PR tree-optimization/86816
7278 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7279 which checks for value availability before querying it.
7280 (gvn_uses_equal): Use it.
7281 (same_succ_hash): Likewise.
7282 (gimple_equal_p): Likewise.
7284 2018-08-02 Nick Clifton <nickc@redhat.com>
7287 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7288 Define to speculation_safe_value_not_needed.
7291 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7292 Define to speculation_safe_value_not_needed.
7295 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7296 Define to speculation_safe_value_not_needed.
7299 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7300 Define to speculation_safe_value_not_needed.
7303 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7304 Define to speculation_safe_value_not_needed.
7307 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7308 Define to speculation_safe_value_not_needed.
7311 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7312 Define to speculation_safe_value_not_needed.
7315 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7316 Define to speculation_safe_value_not_needed.
7319 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7320 speculation_safe_value_not_needed.
7323 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7324 to speculation_safe_value_not_needed.
7326 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7328 * doc/md.texi: Expand the documentation of instruction names
7329 to mention port-local uses. Document '@' in pattern names.
7330 * read-md.h (overloaded_instance, overloaded_name): New structs.
7332 (md_reader::handle_overloaded_name): New member function.
7333 (md_reader::get_overloads): Likewise.
7334 (md_reader::m_first_overload): New member variable.
7335 (md_reader::m_next_overload_ptr): Likewise.
7336 (md_reader::m_overloads_htab): Likewise.
7337 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7338 m_next_overload_ptr and m_overloads_htab.
7339 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7340 (get_mode_token, get_code_token, get_int_token): New functions.
7341 (map_attr_string): Add an optional argument that passes back
7342 the associated iterator.
7343 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7344 (md_reader::handle_overloaded_name, add_overload_instance): New
7346 (apply_iterators): Handle '@' names. Report an error if '@'
7347 is used without iterators.
7348 (initialize_iterators): Initialize the new iterator_group fields.
7349 * genopinit.c (handle_overloaded_code_for)
7350 (handle_overloaded_gen): New functions.
7351 (main): Use them to print declarations of maybe_code_for_* and
7352 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7353 * genemit.c (print_overload_arguments, print_overload_test)
7354 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7355 (main): Use it to print definitions of maybe_code_for_* and
7356 maybe_gen_* functions.
7357 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7358 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7359 instead of explicit mode checks.
7360 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7361 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7362 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7363 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7364 (aarch64_expand_compare_and_swap): Likewise
7365 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7366 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7367 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7368 (aarch64_constant_pool_reload_icode): Delete.
7369 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7370 instead of aarch64_constant_pool_reload_icode. Use
7371 code_for_aarch64_reload_mov instead of explicit mode checks.
7372 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7373 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7374 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7375 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7376 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7377 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7378 (aarch64_atomic_load_op_code): Delete.
7379 (aarch64_emit_atomic_load_op): Likewise.
7380 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7381 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7382 instead of aarch64_emit_atomic_load_op.
7383 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7384 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7385 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7386 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7387 character before the pattern name.
7388 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7389 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7390 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7391 (aarch64_frecps<mode>): Likewise.
7392 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7393 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7394 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7395 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7396 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7398 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7400 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7401 Allow HFmode constants if TARGET_FP_F16INST.
7403 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7406 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7407 No longer check last store for clobber of address register.
7409 2018-08-02 Martin Liska <mliska@suse.cz>
7411 PR gcov-profile/86817
7412 * gcov.c (process_all_functions): New function.
7414 (process_file): Move functions processing to
7415 process_all_functions.
7417 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7419 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7420 "const" to the "gimple *" and "rtx_insn *" parameters.
7421 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7423 (dump_location_t::dump_location_t): Likewise.
7425 2018-08-01 Martin Sebor <msebor@redhat.com>
7427 PR tree-optimization/86650
7428 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7429 rather than a "gcall *". Directly pass the data of interest
7430 to percent_K_format, rather than building a temporary CALL_EXPR
7432 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7433 (gimple_fold_builtin_strncat): Adjust.
7434 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7435 gcall* argument with gimple*.
7436 * gimple-ssa-warn-restrict.c (check_call): Same.
7437 (wrestrict_dom_walker::before_dom_children): Same.
7438 (builtin_access::builtin_access): Same.
7439 (check_bounds_or_overlap): Same
7440 (maybe_diag_overlap): Same.
7441 (maybe_diag_offset_bounds): Same.
7442 * tree-diagnostic.c (default_tree_printer): Move usage of
7443 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7445 * tree-pretty-print.c (percent_K_format): Add argument.
7446 * tree-pretty-print.h: Add argument.
7447 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7448 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7449 (maybe_diag_stxncpy_trunc): Same.
7450 (handle_builtin_stxncpy): Same.
7451 (handle_builtin_strcat): Same.
7453 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7455 * match.pd: Optimise pointer range checks.
7457 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7459 PR tree-optimization/86758
7460 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7461 to remove pattern statements.
7463 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7465 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7466 result of dfs_enumerate_from when constructing stmt_vec_infos,
7467 instead of additionally calling get_loop_body.
7469 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7471 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7473 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7474 When creating an iv, assert that the step is not known to be zero.
7475 (vect_setup_realignment): Update call accordingly.
7476 * tree-vect-stmts.c (vectorizable_store): Likewise.
7477 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7479 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7481 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7482 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7483 (vectorizable_reduction): Likewise.
7484 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7485 (vect_detect_hybrid_slp_stmts): Likewise.
7486 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7488 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7490 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7491 (wide_int_set_zero_nonzero_bits): ...this.
7492 (zero_nonzero_bits_from_vr): Rename to...
7493 (vrp_set_zero_nonzero_bits): ...this.
7494 (extract_range_from_multiplicative_op_1): Abstract wide int
7496 (wide_int_range_multiplicative_op): ...here.
7497 (extract_range_from_binary_expr_1): Extract wide int binary
7498 operations into their own functions.
7499 (wide_int_range_lshift): New.
7500 (wide_int_range_can_optimize_bit_op): New.
7501 (wide_int_range_shift_undefined_p): New.
7502 (wide_int_range_bit_xor): New.
7503 (wide_int_range_bit_ior): New.
7504 (wide_int_range_bit_and): New.
7505 (wide_int_range_trunc_mod): New.
7506 (extract_range_into_wide_ints): New.
7507 (vrp_shift_undefined_p): New.
7508 (extract_range_from_multiplicative_op): New.
7509 (vrp_can_optimize_bit_op): New.
7510 * tree-vrp.h (value_range::dump): New.
7511 (wide_int_range_multiplicative_op): New.
7512 (wide_int_range_lshift):New.
7513 (wide_int_range_shift_undefined_p): New.
7514 (wide_int_range_bit_xor): New.
7515 (wide_int_range_bit_ior): New.
7516 (wide_int_range_bit_and): New.
7517 (wide_int_range_trunc_mod): New.
7518 (zero_nonzero_bits_from_bounds): Rename to...
7519 (wide_int_set_zero_nonzero_bits): ...this.
7520 (zero_nonzero_bits_from_vr): Rename to...
7521 (vrp_set_zero_nonzero_bits): ...this.
7522 (range_easy_mask_min_max): Rename to...
7523 (wide_int_range_can_optimize_bit_op): this.
7524 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7525 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7527 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7529 * tree-vectorizer.h (vect_orig_stmt): New function.
7530 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7531 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7532 (vect_create_epilog_for_reduction): Likewise.
7533 (vectorizable_live_operation): Likewise.
7534 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7535 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7536 * tree-vect-stmts.c (vectorizable_call): Likewise.
7537 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7539 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7541 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7543 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7544 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7545 (vect_transform_loop): Likewise.
7546 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7548 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7550 * tree-vectorizer.h (vect_schedule_slp): Return void.
7551 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7552 (vect_schedule_slp): Likewise.
7554 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7556 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7558 (vect_transform_loop): Update calls accordingly. Schedule SLP
7559 instances before the main loop, if any exist.
7561 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7563 PR tree-optimization/86749
7564 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7565 If the lhs is used in a COND_EXPR, check that it is being used
7566 as the "then" or "else" value.
7568 2018-08-01 Tom de Vries <tdevries@suse.de>
7571 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7572 speculation_safe_value_not_needed.
7574 2018-08-01 Richard Biener <rguenther@suse.de>
7576 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7579 2018-08-01 Martin Liska <mliska@suse.cz>
7581 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7582 format how successful transformation is dumped.
7583 (gimple_mod_pow2_value_transform): Likewise.
7584 (gimple_mod_subtract_transform): Likewise.
7585 (gimple_stringops_transform): Likewise.
7587 2018-08-01 Martin Liska <mliska@suse.cz>
7590 * value-prof.c (interesting_stringop_to_profile_p):
7591 Simplify the code and add BUILT_IN_MEMMOVE.
7592 (gimple_stringops_transform): Likewise.
7594 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7596 * config/aarch64/aarch64-simd.md
7597 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7598 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7599 use GPI iterator instead of SI mode.
7601 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7603 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7604 rs6000_speculation_barrier.
7605 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7606 new barrier pattern name.
7608 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7610 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7611 (speculation_barrier): New insn.
7613 2018-08-01 Richard Biener <rguenther@suse.de>
7616 * graphite.h: Include isl/id.h and isl/space.h to allow build
7619 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7622 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7623 mode for COFF targets.
7624 * defaults.h (TARGET_COFF): Define.
7625 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7626 TARGET_COFF): Define.
7627 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7628 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7629 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7631 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7633 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7634 * gimple-streamer-out.c (output_bb): Save it.
7635 * lto-streamer-in.c (input_struct_function_base): Restore
7636 instance discriminator if available. Create map on demand.
7637 * lto-streamer-out.c (output_struct_function_base): Save it if
7639 * final.c (decl_to_instance_map): Document LTO strategy.
7641 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7642 Olivier Hainque <hainque@adacore.com>
7644 * debug.h (decl_to_instance_map_t): New type.
7645 (decl_to_instance_map): Declare.
7646 (maybe_create_decl_to_instance_map): New inline function.
7647 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7648 to track basic block discriminators.
7649 (final_start_function_1): Initialize them.
7650 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7652 (decl_to_instance_map): New variable.
7653 (map_decl_to_instance, maybe_set_discriminator): New functions.
7654 (notice_source_line): Set discriminator.
7656 2018-07-31 Ian Lance Taylor <iant@golang.org>
7658 * targhooks.c (default_have_speculation_safe_value): Add
7661 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7663 * dump-context.h: Include "pretty-print.h".
7664 (dump_context::refresh_dumps_are_enabled): New decl.
7665 (dump_context::emit_item): New decl.
7666 (class dump_context): Add fields "m_test_pp" and
7668 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7669 (temp_dump_context::get_dumped_text): New decl.
7670 (class temp_dump_context): Add field "m_pp".
7671 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7672 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7674 (set_dump_file): Update for above change.
7675 (set_alt_dump_file): Likewise.
7676 (dump_loc): New overload, taking a pretty_printer *.
7677 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7678 to any test pretty-printer.
7679 (make_item_for_dump_gimple_stmt): New function, adapted from
7680 optinfo::add_gimple_stmt.
7681 (dump_context::dump_gimple_stmt): Call it, and use the result,
7682 eliminating the direct usage of dump_file and alt_dump_file in
7683 favor of indirectly using them via emit_item.
7684 (make_item_for_dump_gimple_expr): New function, adapted from
7685 optinfo::add_gimple_expr.
7686 (dump_context::dump_gimple_expr): Call it, and use the result,
7687 eliminating the direct usage of dump_file and alt_dump_file in
7688 favor of indirectly using them via emit_item.
7689 (make_item_for_dump_generic_expr): New function, adapted from
7691 (dump_context::dump_generic_expr): Call it, and use the result,
7692 eliminating the direct usage of dump_file and alt_dump_file in
7693 favor of indirectly using them via emit_item.
7694 (make_item_for_dump_printf_va): New function, adapted from
7695 optinfo::add_printf_va.
7696 (make_item_for_dump_printf): New function.
7697 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7698 and use the result, eliminating the direct usage of dump_file and
7699 alt_dump_file in favor of indirectly using them via emit_item.
7700 (make_item_for_dump_dec): New function.
7701 (dump_context::dump_dec): Call it, and use the result,
7702 eliminating the direct usage of dump_file and alt_dump_file in
7703 favor of indirectly using them via emit_item.
7704 (make_item_for_dump_symtab_node): New function, adapted from
7705 optinfo::add_symtab_node.
7706 (dump_context::dump_symtab_node): Call it, and use the result,
7707 eliminating the direct usage of dump_file and alt_dump_file in
7708 favor of indirectly using them via emit_item.
7709 (dump_context::begin_scope): Reimplement, avoiding direct usage
7710 of dump_file and alt_dump_file in favor of indirectly using them
7712 (dump_context::emit_item): New member function.
7713 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7714 Set up test pretty-printer on the underlying context. Call
7715 refresh_dumps_are_enabled.
7716 (temp_dump_context::~temp_dump_context): Call
7717 refresh_dumps_are_enabled.
7718 (temp_dump_context::get_dumped_text): New member function.
7719 (selftest::verify_dumped_text): New function.
7720 (ASSERT_DUMPED_TEXT_EQ): New macro.
7721 (selftest::test_capture_of_dump_calls): Run all tests twice, with
7722 and then without optinfo enabled. Add uses of
7723 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
7724 * dumpfile.h: Update comment for the dump_* API.
7725 * optinfo-emit-json.cc
7726 (selftest::test_building_json_from_dump_calls): Update for new
7727 param for temp_dump_context ctor.
7728 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7729 and "m_owned" field.
7730 (optinfo_item::~optinfo_item): Likewise.
7731 (optinfo::add_item): New member function.
7732 (optinfo::emit): Update comment.
7733 (optinfo::add_string): Delete.
7734 (optinfo::add_printf): Delete.
7735 (optinfo::add_printf_va): Delete.
7736 (optinfo::add_gimple_stmt): Delete.
7737 (optinfo::add_gimple_expr): Delete.
7738 (optinfo::add_tree): Delete.
7739 (optinfo::add_symtab_node): Delete.
7740 (optinfo::add_dec): Delete.
7741 * optinfo.h (class dump_context): New forward decl.
7742 (optinfo::add_item): New decl.
7743 (optinfo::add_string): Delete.
7744 (optinfo::add_printf): Delete.
7745 (optinfo::add_printf_va): Delete.
7746 (optinfo::add_gimple_stmt): Delete.
7747 (optinfo::add_gimple_expr): Delete.
7748 (optinfo::add_tree): Delete.
7749 (optinfo::add_symtab_node): Delete.
7750 (optinfo::add_dec): Delete.
7751 (optinfo::add_poly_int): Delete.
7752 (optinfo_item::optinfo_item): Remove "owned" param.
7753 (class optinfo_item): Remove field "m_owned".
7755 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7758 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7759 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7760 requested variable alignment.
7761 (expand_one_ssa_partition): Likewise.
7762 (expand_one_var): Likewise.
7764 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7766 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7767 to speculation_safe_value_not_needed.
7769 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7771 * targhooks.h (speculation_safe_value_not_needed): New prototype.
7772 * targhooks.c (speculation_safe_value_not_needed): New function.
7773 * target.def (have_speculation_safe_value): Update documentation.
7774 * doc/tm.texi: Regenerated.
7776 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7778 * config/aarch64/iterators.md (ALLI_TI): New iterator.
7779 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7781 (despeculate_copy<ALLI:mode>_insn): New insn.
7782 (despeculate_copyti_insn): New insn.
7783 (despeculate_simple<ALLI:mode>): New insn
7784 (despeculate_simpleti): New insn.
7785 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7787 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7788 aarch64_speculation_safe_value.
7789 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7791 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7793 * config/aarch64/aarch64-speculation.cc: New file.
7794 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7795 before pass_reorder_blocks.
7796 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7798 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7799 X14 and X15 when tracking speculation.
7800 * config/aarch64/aarch64.md (register name constants): Add
7801 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7802 (unspec): Add UNSPEC_SPECULATION_TRACKER.
7803 (speculation_barrier): New insn attribute.
7804 (cmp<mode>): Allow SP in comparisons.
7805 (speculation_tracker): New insn.
7806 (speculation_barrier): Add speculation_barrier attribute.
7807 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7808 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7809 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7811 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7813 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7814 aarch64_track_speculation is true.
7815 (tb<optab><mode>1): Likewise.
7816 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7817 generate CB[N]Z when tracking speculation.
7818 (aarch64_split_compare_and_swap): Likewise.
7819 (aarch64_split_atomic_op): Likewise.
7821 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7823 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7825 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7827 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7828 (speculation_barrier): New insn.
7830 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7832 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7833 * config/arm/arm.md (speculation_barrier): New expand.
7834 (speculation_barrier_insn): New pattern.
7836 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
7838 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7839 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7840 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7841 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7843 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7844 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7845 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7846 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7847 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7848 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7849 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7850 * builtins.c (expand_speculation_safe_value): New function.
7851 (expand_builtin): Call it.
7852 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7853 * doc/extend.texi: Document __builtin_speculation_safe_value.
7854 * doc/md.texi: Document "speculation_barrier" pattern.
7855 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7856 TARGET_HAVE_SPECULATION_SAFE_VALUE.
7857 * doc/tm.texi: Regenerated.
7858 * target.def (have_speculation_safe_value, speculation_safe_value): New
7860 * targhooks.c (default_have_speculation_safe_value): New function.
7861 (default_speculation_safe_value): New function.
7862 * targhooks.h (default_have_speculation_safe_value): Add prototype.
7863 (default_speculation_safe_value): Add prototype.
7865 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7867 * dump-context.h (dump_context::dump_loc): New decl.
7868 * dumpfile.c (dump_context::dump_loc): New member function.
7869 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7870 and dump_gimple_stmt.
7871 (dump_context::dump_gimple_expr_loc): Likewise, using
7873 (dump_context::dump_generic_expr_loc): Likewise, using
7875 (dump_context::dump_printf_loc_va): Likewise, using
7877 (dump_context::begin_scope): Explicitly using the global function
7878 "dump_loc", rather than the member function.
7880 2018-07-31 Martin Sebor <msebor@redhat.com>
7882 PR tree-optimization/86741
7883 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7885 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
7887 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7888 depend on whether prefetch instructions will be emitted or not.
7889 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7890 will be emitted or not.
7891 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7892 (TARGET_SETMEM_PFD): New macros.
7894 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7896 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7897 (NULL_STMT_VEC_INFO): Delete.
7898 (stmt_vec_info::operator*): Likewise.
7899 (stmt_vec_info::operator gimple *): Likewise.
7900 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7901 of NULL_STMT_VEC_INFO.
7902 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7903 (vect_reassociating_reduction_p): Likewise.
7904 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7905 (vectorizable_store): Likewise.
7906 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7907 (vec_info::free_stmt_vec_infos): Likewise.
7909 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7911 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7912 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7914 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7916 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7917 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7918 (vec_info::free_stmt_vec_info): New private member functions.
7919 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7920 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7921 * tree-parloops.c (gather_scalar_reductions): Remove calls to
7922 set_stmt_vec_info_vec and free_stmt_vec_infos.
7923 * tree-vect-loop.c (_loop_vec_info): Remove call to
7924 set_stmt_vec_info_vec.
7925 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7926 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7927 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7928 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7929 (vec_info::free_stmt_vec_info): ...these new functions. Remove
7930 assignments in {vec_info::,}new_stmt_vec_info that are redundant
7931 with the clearing in the xcalloc.
7932 (stmt_vec_info_vec): Delete.
7933 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7934 (vectorize_loops): Likewise.
7935 (vec_info::~vec_info): Remove argument from call to
7936 free_stmt_vec_infos.
7937 (vec_info::add_stmt): Remove vinfo argument from call to
7940 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7942 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7943 rather than a gimple stmt.
7944 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
7945 information for pattern statements when passed the original
7946 statement; instead wait to be passed the pattern statement itself.
7947 Don't call set_vinfo_for_stmt here.
7948 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7949 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7950 stmt_vec_infos here.
7951 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7952 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7953 stmt_vec_infos entry.
7955 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7957 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7958 * tree-vectorizer.c (vec_info::replace_stmt): New function.
7959 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7960 * tree-vect-stmts.c (vectorizable_call): Likewise.
7961 (vectorizable_simd_clone_call): Likewise.
7963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7965 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7966 * tree-vectorizer.c (vec_info::remove_stmt): New function.
7967 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7968 * tree-vect-loop.c (vect_transform_loop): Likewise.
7969 * tree-vect-slp.c (vect_schedule_slp): Likewise.
7970 * tree-vect-stmts.c (vect_remove_stores): Likewise.
7972 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7974 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7975 (vect_dr_stmt): Delete.
7976 * tree-vectorizer.c (vec_info::lookup_dr): New function.
7977 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7979 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7980 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7981 (vect_verify_datarefs_alignment, vect_peeling_supportable)
7982 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7983 (vect_analyze_data_refs): Likewise.
7984 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
7986 (vect_find_same_alignment_drs): Likewise.
7987 (vect_slp_analyze_node_dependences): Update calls accordingly.
7988 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7989 instead of DR_VECT_AUX.
7990 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7991 of a vector data references. Use vec_info::lookup_dr instead of
7993 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7994 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
7995 instead of DR_VECT_AUX.
7997 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7999 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8001 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8003 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8004 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8005 (vect_gen_prolog_loop_niters): Likewise.
8007 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8009 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8010 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8011 (vect_known_alignment_in_bytes, vect_dr_behavior)
8012 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8013 instead of data_references. Update calls to other routines for
8014 which the same change has been made.
8015 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8016 dr_vec_infos instead of stmt_vec_infos.
8017 (vect_analyze_data_ref_dependence): Update call accordingly.
8018 (vect_slp_analyze_data_ref_dependence)
8019 (vect_record_base_alignments): Use DR_VECT_AUX.
8020 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8021 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8022 (vector_alignment_reachable_p, vect_get_data_access_cost)
8023 (vect_peeling_supportable, vect_analyze_group_access_1)
8024 (vect_analyze_group_access, vect_analyze_data_ref_access)
8025 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8026 (vect_compile_time_alias, vect_small_gap_p)
8027 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8028 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8029 instead of data_references. Update calls to other routines for
8030 which the same change has been made.
8031 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8032 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8033 (vect_slp_analyze_and_verify_node_alignment)
8034 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8035 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8036 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8038 (_vect_peel_info::dr): Replace with...
8039 (_vect_peel_info::dr_info): ...this new field.
8040 (vect_peeling_hash_get_most_frequent)
8041 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8042 (vect_peeling_hash_get_lowest_cost):
8043 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8044 routines for which the same change has been made.
8045 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8047 * tree-vect-loop-manip.c (get_misalign_in_elems)
8048 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8050 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8051 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8052 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8053 (get_group_load_store_type, get_negative_load_store_type)
8054 (vect_get_data_ptr_increment, vectorizable_store)
8055 (vectorizable_load): Likewise.
8056 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8057 Update calls to other routines for which the same change has been made.
8059 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8061 * tree-vectorizer.h (vec_info::move_dr): New member function.
8062 (dataref_aux): Rename to...
8063 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8064 (_stmt_vec_info::dr_aux): Update accordingly.
8065 (_stmt_vec_info::data_ref_info): Delete.
8066 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8067 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8068 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8069 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8071 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8072 (STMT_VINFO_DR_INFO): New macro.
8073 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8074 (set_dr_misalignment): Update after rename of dataref_aux.
8075 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8076 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8077 initialization of STMT_VINFO_DATA_REF.
8078 * tree-vectorizer.c (vec_info::move_dr): New function.
8079 * tree-vect-patterns.c (vect_recog_bool_pattern)
8080 (vect_recog_mask_conversion_pattern)
8081 (vect_recog_gather_scatter_pattern): Use it.
8082 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8083 the "dr" and "stmt" fields of dr_vec_info instead of
8084 STMT_VINFO_DATA_REF.
8086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8088 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8089 (is_pattern_stmt_p): Use it.
8090 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8091 on pattern statements.
8093 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8095 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8096 original stmt as a stmt_vec_info rather than a gimple stmt.
8097 (vect_pattern_recog_1): Take the statement directly as a
8098 stmt_vec_info, rather than via a gimple_stmt_iterator.
8099 Update call to vect_mark_pattern_stmts.
8100 (vect_pattern_recog): Update calls accordingly.
8102 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8104 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8105 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8106 a vect_def_type for the first argument.
8107 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8108 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8109 operand if it isn't defined by a vectorized statement.
8110 (vect_build_gather_load_calls): Remove the mask_dt argument and
8111 update calls to vect_get_vec_def_for_stmt_copy.
8112 (vectorizable_bswap): Likewise the dt argument.
8113 (vectorizable_call): Update calls to vectorizable_bswap and
8114 vect_get_vec_def_for_stmt_copy.
8115 (vectorizable_simd_clone_call, vectorizable_assignment)
8116 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8117 (vectorizable_comparison): Update calls to
8118 vect_get_vec_def_for_stmt_copy.
8119 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8121 (vect_get_loop_based_defs): Remove dt argument and update call
8122 to vect_get_vec_def_for_stmt_copy.
8123 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8124 and vect_get_vec_def_for_stmt_copy.
8125 (vectorizable_load): Update calls to vect_build_gather_load_calls
8126 and vect_get_vec_def_for_stmt_copy.
8127 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8128 (vectorizable_reduction, vectorizable_live_operation): Update calls
8129 to vect_get_vec_def_for_stmt_copy.
8131 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8133 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8134 and gimple stmt arguments with a stmt_vec_info.
8135 (vect_record_base_alignments): Update calls accordingly.
8136 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8137 and gimple stmt arguments with a stmt_vec_info.
8138 (vect_build_slp_tree_1): Remove vinfo argument and update call
8139 to vect_record_max_nunits.
8140 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8141 and vect_record_max_nunits.
8143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8145 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8146 file and take a stmt_vec_info instead of a gimple stmt.
8147 (supportable_widening_operation, vect_finish_replace_stmt)
8148 (vect_finish_stmt_generation, vect_get_store_rhs)
8149 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8150 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8151 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8152 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8153 (vect_create_data_ref_ptr, bump_vector_ptr)
8154 (vect_permute_store_chain, vect_setup_realignment)
8155 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8156 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8157 (vectorizable_reduction, vectorizable_induction)
8158 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8159 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8160 than gimple stmts as arguments.
8161 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8162 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8163 (can_group_stmts_p, vect_check_gather_scatter)
8164 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8165 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8166 (vect_permute_load_chain, vect_shift_permute_load_chain)
8167 (vect_transform_grouped_load)
8168 (vect_record_grouped_load_vectors): Likewise.
8169 * tree-vect-loop.c (vect_fixup_reduc_chain)
8170 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8171 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8172 (vectorizable_reduction, vectorizable_induction)
8173 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8174 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8175 (vect_get_load_store_mask): Likewise.
8176 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8177 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8178 * tree-vect-stmts.c (vect_mark_relevant)
8179 (is_simple_and_all_uses_invariant)
8180 (exist_non_indexing_operands_for_use_p, process_use)
8181 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8182 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8183 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8184 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8185 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8186 (get_negative_load_store_type, get_load_store_type)
8187 (vect_check_load_store_mask, vect_check_store_rhs)
8188 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8189 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8190 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8191 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8192 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8193 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8194 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8195 (supportable_widening_operation): Likewise.
8197 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8199 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8200 a stmt_vec_info instead of a gcall.
8201 (vect_check_gather_scatter): Update call accordingly.
8202 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8204 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8205 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8206 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8207 instead of a gimple stmt.
8208 (vect_transform_loop): Update calls accordingly.
8209 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8210 stmt_vec_infos instead of gimple stmts.
8211 (vect_analyze_slp_instance): Update use accordingly.
8212 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8213 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8214 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8215 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8216 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8217 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8218 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8219 down to subroutines.
8221 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8223 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8224 of the worklist from a vector of gimple stmts to a vector of
8226 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8227 (vect_mark_stmts_to_be_vectorized): Likewise
8229 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8231 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8232 statement before passing it to vect_analyze_stmt.
8233 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8234 the chain of phi vector definitions. Track the exit phi via its
8236 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8237 STMT_VINFO_REDUC_DEF.
8238 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8239 stmt_vec_infos to handle the statement chains.
8240 (vect_get_slp_defs): Record the first statement in the node
8241 using a stmt_vec_info.
8242 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8243 statements here and pass their stmt_vec_info down to subroutines.
8244 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8245 down to vect_finish_stmt_generation.
8246 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8247 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8248 stmt_vec_infos to subroutines.
8249 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8254 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8255 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8256 (vect_permute_store_chain, vect_setup_realignment)
8257 (vect_permute_load_chain, vect_shift_permute_load_chain)
8258 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8259 stmts internally, and when passing values to other vectorizer routines.
8260 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8261 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8262 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8263 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8264 (vectorizable_reduction, vectorizable_induction)
8265 (vectorizable_live_operation, vect_transform_loop_stmt)
8266 (vect_transform_loop): Likewise.
8267 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8268 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8269 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8270 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8271 (vect_slp_analyze_node_operations_1): Likewise.
8272 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8273 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8274 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8275 (vect_finish_stmt_generation_1, get_group_load_store_type)
8276 (get_load_store_type, vect_build_gather_load_calls)
8277 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8278 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8279 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8280 (vectorizable_store, vectorizable_load, vectorizable_condition)
8281 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8282 (supportable_widening_operation): Likewise.
8283 (vect_get_vector_types_for_stmt): Likewise.
8284 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8286 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8288 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8289 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8290 (vect_permute_store_chain, vect_permute_load_chain)
8291 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8292 repeated stmt_vec_info lookups.
8293 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8294 (vect_update_ivs_after_vectorizer): Likewise.
8295 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8296 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8297 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8298 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8299 (vect_bb_slp_scalar_cost): Likewise.
8300 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8302 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8304 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8305 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8306 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8307 to get gassigns and gcalls, rather than operating on generc gimple
8309 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8310 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8311 (vectorizable_load, vect_analyze_stmt): Likewise.
8312 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8314 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8316 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8317 return stmt_vec_infos rather than gimple stmts. Do not accept
8319 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8321 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8322 Update use of get_later_stmt.
8323 (vect_get_constant_vectors): Update call accordingly.
8324 (vect_schedule_slp_instance): Likewise
8325 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8326 (vect_slp_analyze_instance_dependence): Likewise.
8327 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8329 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8331 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8332 (stmt_info_for_cost::stmt_info): ...this new field.
8333 (add_stmt_costs): Update accordingly.
8334 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8335 (vect_get_known_peeling_cost): Likewise.
8336 (vect_estimate_min_profitable_iters): Likewise.
8337 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8339 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8341 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8342 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8343 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8345 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8347 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8349 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8350 a gimple stmt to a stmt_vec_info.
8351 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8353 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8355 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8356 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8357 (_loop_vec_info::reduction_chains): Likewise.
8358 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8360 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8364 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8365 a gimple stmt to a stmt_vec_info.
8366 (_stmt_vec_info::next_element): Likewise.
8367 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8368 (vect_slp_analyze_and_verify_node_alignment)
8369 (vect_analyze_group_access_1, vect_analyze_group_access)
8370 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8371 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8372 (vect_supportable_dr_alignment): Update accordingly.
8373 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8374 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8375 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8376 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8377 * tree-vect-slp.c (vect_build_slp_tree_1)
8378 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8379 (vect_split_slp_store_group, vect_analyze_slp_instance)
8380 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8381 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8382 (get_group_load_store_type, get_load_store_type)
8383 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8384 (vect_transform_stmt, vect_remove_stores): Likewise.
8386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8388 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8390 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8391 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8392 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8393 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8394 (vector_alignment_reachable_p, vect_get_data_access_cost)
8395 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8396 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8397 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8398 (vect_analyze_group_access_1, vect_analyze_group_access)
8399 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8400 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8401 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8402 result of vect_dr_stmt and use the stmt_vec_info instead of
8403 the associated gimple stmt.
8404 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8405 (vect_gen_prolog_loop_niters): Likewise.
8406 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8410 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8411 to a vec<stmt_vec_info>.
8412 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8413 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8415 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8416 to a vec<stmt_vec_info>.
8417 (bst_traits::value_type, bst_traits::value_type): Likewise.
8418 (bst_traits::hash): Update accordingly.
8419 (vect_get_and_check_slp_defs): Change the stmts parameter from
8420 a vec<gimple *> to a vec<stmt_vec_info>.
8421 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8422 (vect_build_slp_tree): Likewise.
8423 (vect_build_slp_tree_2): Likewise. Update uses of
8424 SLP_TREE_SCALAR_STMTS.
8425 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8426 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8427 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8428 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8429 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8430 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8431 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8432 (vect_get_constant_vectors, vect_get_slp_defs)
8433 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8434 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8435 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8436 instead of gimple stmts.
8437 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8438 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8439 (vect_slp_analyze_instance_dependence): Update uses of
8440 SLP_TREE_SCALAR_STMTS.
8441 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8442 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8443 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8444 (get_initial_defs_for_reduction): Likewise.
8445 (vect_create_epilog_for_reduction): Likewise.
8446 (vectorize_fold_left_reduction): Likewise.
8447 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8448 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8449 (can_vectorize_live_stmts): Likewise.
8451 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8453 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8454 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8455 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8457 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8459 (gather_scalar_reductions): Update after above interface changes.
8460 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8461 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8463 (vect_force_simple_reduction): Likewise.
8464 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8465 LOOP_VINFO_REDUCTIONS.
8466 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8468 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8470 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8471 a gimple stmt to a stmt_vec_info.
8472 * tree-vect-loop.c (vect_active_double_reduction_p)
8473 (vect_force_simple_reduction, vectorizable_reduction): Update
8476 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8478 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8479 vec<gimple *> to a vec<stmt_vec_info>.
8480 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8481 the reduction_phis argument from a vec<gimple *> to a
8483 (vectorizable_reduction): Likewise the phis local variable that
8484 is passed to vect_create_epilog_for_reduction. Update for new type
8485 of SLP_TREE_VEC_STMTS.
8486 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8487 (vectorizable_live_operation): Likewise.
8488 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8489 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8491 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8493 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8494 a gimple stmt to a stmt_vec_info.
8495 (vectorizable_condition, vectorizable_live_operation)
8496 (vectorizable_reduction, vectorizable_induction): Pass back the
8497 vectorized statement as a stmt_vec_info.
8498 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8499 use of STMT_VINFO_VEC_STMT.
8500 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8501 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8502 as stmt_vec_infos rather than gimple stmts.
8503 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8505 (vectorizable_live_operation): Likewise.
8506 (vectorizable_reduction, vectorizable_induction): Likewise,
8507 updating use of STMT_VINFO_VEC_STMT.
8508 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8509 of STMT_VINFO_VEC_STMT.
8510 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8511 (vectorizable_simd_clone_call, vectorizable_conversion)
8512 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8513 (vectorizable_store, vectorizable_load, vectorizable_condition)
8514 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8515 from a gimple stmt to a stmt_vec_info.
8516 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8517 pointer to a stmt_vec_info to the vectorizable_* routines.
8519 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8521 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8522 a gimple stmt to a stmt_vec_info.
8523 (is_pattern_stmt_p): Update accordingly.
8524 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8525 (vect_record_grouped_load_vectors): Likewise.
8526 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8527 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8528 (vect_model_reduction_cost): Likewise.
8529 (vect_create_epilog_for_reduction): Likewise.
8530 (vectorizable_reduction, vectorizable_induction): Likewise.
8531 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8532 Return the stmt_vec_info for the pattern statement.
8533 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8534 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8535 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8536 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8537 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8538 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8539 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8540 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8542 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8544 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8545 (vect_finish_stmt_generation): Likewise.
8546 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8547 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8548 (vect_build_gather_load_calls): Use the return value of the above
8549 functions instead of a separate call to vinfo_for_stmt. Use narrow
8550 scopes for the input gimple stmt and wider scopes for the associated
8551 stmt_vec_info. Use vec_info::lookup_def when setting these
8552 stmt_vec_infos from an SSA_NAME definition.
8553 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8554 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8555 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8556 (vectorizable_store, vectorizable_load, vectorizable_condition)
8557 (vectorizable_comparison): Likewise.
8558 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8559 (vectorizable_reduction): Likewise.
8561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8563 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8564 stmt_vec_info * parameter before the optional gimple **.
8565 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8566 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8567 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8568 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8569 (vectorizable_live_operation): Likewise.
8570 * tree-vect-patterns.c (type_conversion_p): Likewise.
8571 (vect_look_through_possible_promotion): Likewise.
8572 (vect_recog_rotate_pattern): Likewise.
8573 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8577 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8578 a typedef to a wrapper class.
8579 (NULL_STMT_VEC_INFO): New macro.
8580 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8581 (stmt_vec_info::operator*): New function.
8582 (stmt_vec_info::operator gimple *): Likewise.
8583 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8584 (add_stmt_costs): Likewise.
8585 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8586 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8587 (vect_get_known_peeling_cost): Likewise.
8588 (vect_estimate_min_profitable_iters): Likewise.
8589 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8590 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8591 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8592 (vectorizable_store, free_stmt_vec_infos): Likewise.
8593 (new_stmt_vec_info): Change return type of xcalloc to
8596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8598 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8599 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8600 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8601 a single_imm_use-based sequence.
8602 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8606 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8607 * tree-vectorizer.c (vec_info::lookup_def): New function.
8608 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8609 (vect_widened_op_tree): Likewise.
8610 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8611 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8612 (vectorizable_reduction): Likewise.
8613 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8615 (vect_is_slp_reduction): Update calls accordingly. Use
8616 vec_info::lookup_def.
8617 (vect_is_simple_reduction): Likewise
8618 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8620 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8622 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8623 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8624 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8626 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8627 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8628 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8629 (vect_is_slp_reduction, vectorizable_induction)
8630 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8631 * tree-vect-patterns.c (vect_init_pattern_stmt):
8632 (vect_determine_min_output_precision_1, vect_determine_precisions)
8633 (vect_pattern_recog): Likewise.
8634 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8635 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8636 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8637 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8638 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8639 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8640 info field from a loop to a loop_vec_info.
8642 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8644 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8645 (vec_info::add_stmt): Declare.
8646 * tree-vectorizer.c (vec_info::add_stmt): New function.
8647 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8648 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8649 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8650 (vectorizable_induction): Likewise.
8651 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8652 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8653 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8654 (vectorizable_load): Likewise.
8655 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8656 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8657 (vect_recog_gather_scatter_pattern): Likewise.
8658 (append_pattern_def_seq): Likewise. Remove a check that is
8659 performed by add_stmt itself.
8661 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8663 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8664 which make_ssa_name was called with new_stmt before new_stmt
8667 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8669 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8671 (vect_is_slp_reduction): ...here...
8672 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8673 that are already known to be false.
8675 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8677 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8678 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8679 STMT_VINFO_NUM_SLP_USES when it's true.
8680 (vect_free_slp_instance): Add a final_p parameter and pass it to
8682 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8683 (vect_analyze_slp_instance): Likewise.
8684 (vect_slp_analyze_operations): Likewise.
8685 (vect_slp_analyze_bb_1): Likewise.
8686 * tree-vectorizer.c (vec_info): Likewise.
8687 * tree-vect-loop.c (vect_transform_loop): Likewise.
8689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8691 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8692 function is not called for second and subsequent members of
8695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8697 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8698 cases for nested loops from here to ...
8699 (vect_create_epilog_for_reduction): ...here. Only call
8700 vect_is_simple_use for inner-loop reductions.
8702 2018-07-31 Martin Liska <mliska@suse.cz>
8704 PR gcov-profile/85338
8705 PR gcov-profile/85350
8706 PR gcov-profile/85372
8707 * profile.c (struct location_triplet): New.
8708 (struct location_triplet_hash): Likewise.
8709 (output_location): Do not output a BB that
8710 is already recorded for a line.
8711 (branch_prob): Use streamed_locations.
8713 2018-07-31 Martin Liska <mliska@suse.cz>
8715 PR gcov-profile/85370
8716 * coverage.c (coverage_begin_function): Do not mark target
8717 clones as artificial functions.
8719 2018-07-31 Martin Liska <mliska@suse.cz>
8721 PR gcov-profile/83813
8722 PR gcov-profile/84758
8723 PR gcov-profile/85217
8724 PR gcov-profile/85332
8725 * profile.c (branch_prob): Do not record GOTO expressions
8726 for GIMPLE statements which locations are already streamed.
8728 2018-07-31 Olivier Hainque <hainque@adacore.com>
8730 * gcc.c (handle_spec_function): Accept a soft_matched_part
8731 argument, as do_spec_1. Pass it down to ...
8732 (eval_spec_function): Accept a soft_matched_part argument,
8733 and pass it down to ...
8734 (do_spec_2): Accept a soft_matched_part argument, and pass
8735 it down to do_spec_1.
8736 (do_spec_1): Pass soft_matched_part to handle_spec_function.
8737 (handle_braces): Update call to handle_spec_function.
8738 (driver::set_up_specs): Update calls to do_spec_2.
8739 (compare_debug_dump_opt_spec_function): Likewise.
8740 (compare_debug_self_opt_spec_function): Likewise.
8742 2018-07-31 Olivier Hainque <hainque@adacore.com>
8744 * common.opt (nolibc): New option.
8745 * doc/invoke.texi (Link Options): Document it.
8746 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8747 * config/alpha/linux.h: Likewise.
8748 * config/arc/elf.h: Likewise.
8749 * config/arm/uclinux-elf.h: Likewise.
8750 * config/arm/unknown-elf.h: Likewise.
8751 * config/avr/avrlibc.h: Likewise.
8752 * config/bfin/bfin.h: Likewise.
8753 * config/bfin/linux.h: Likewise.
8754 * config/bfin/uclinux.h: Likewise.
8755 * config/darwin.h: Likewise.
8756 * config/darwin10.h: Likewise.
8757 * config/darwin12.h: Likewise.
8758 * config/gnu-user.h: Likewise.
8759 * config/lm32/uclinux-elf.h: Likewise.
8760 * config/pa/pa-hpux11.h: Likewise.
8761 * config/pa/pa64-hpux.h: Likewise.
8762 * config/sparc/sparc.h: Likewise.
8764 2018-07-31 Olivier Hainque <hainque@adacore.com>
8766 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8767 undefined variables.
8769 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8772 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8775 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8777 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8778 terminated string literal.
8780 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
8782 PR rtl-optimization/85160
8783 * combine.c (is_just_move): New function.
8784 (try_combine): Allow combining two instructions into two if neither of
8785 the original instructions was a move.
8787 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
8790 * doc/extend.texi (Global Register Variables): Discourage use of type
8792 (Local Register Variables): Likewise.
8794 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
8796 PR tree-optimization/86506
8797 * hwint.h (ceil_log2): Resync with hwint.c implementation.
8799 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
8802 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8803 hard_regno, make sure no insn between `from` and `to` clobbers it.
8805 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
8806 Tom de Vries <tdevries@suse.de>
8808 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8809 (PTX_DEFAULT_RUNTIME_DIM): ... this.
8810 (nvptx_goacc_validate_dims): Set default worker and gang dims to
8811 PTX_DEFAULT_RUNTIME_DIM.
8812 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8814 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
8816 * config/pa/pa.c (pa_output_addr_vec): Align address table.
8817 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8818 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8820 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
8822 * config/rs6000/constraints.md (wG constraint): Delete, no longer
8824 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8825 predicate to reflect toc fusion has been deleted.
8826 (toc_fusion_mem_raw): Delete, no longer used.
8827 (toc_fusion_mem_wrapped): Likewise.
8828 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8830 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8831 Delete, no longer used.
8832 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8833 meant to be used for toc fusion.
8834 (rs6000_debug_print_mode): Delete toc fusion debugging.
8835 (rs6000_debug_reg_global): Likewise.
8836 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8837 fusion and secondary reload support that were never used.
8838 (rs6000_option_override_internal): Delete TOC fusion, that was only
8839 partially defined, and it did not work unless you also used the
8841 (rs6000_legitimate_address_p): Delete TOC fusion support.
8842 (rs6000_opt_masks): Likewise.
8843 (fusion_wrap_memory_address): Delete function, no longer used.
8844 (fusion_split_address); Delete TOC fusion support.
8845 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8846 longer used with toc fusion being deleted.
8847 (TARGET_TOC_FUSION_FP): Likewise.
8848 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8850 (toc fusion spliter): Delete TOC fusion support.
8851 (toc_fusionload_<mode>): Likewise.
8852 (toc_fusionload_di): Likewise.
8853 (fusion_gpr_load_<mode>): Delete generator function, this insn no
8854 longer needs to be named. Rename predicate to delete TOC fusion.
8855 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8856 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8857 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8858 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8859 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8861 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
8863 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8864 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
8865 __int128 in built-in function prototypes.
8866 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8867 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8869 2018-07-27 Martin Sebor <msebor@redhat.com>
8871 PR tree-optimization/86696
8872 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8873 types, including enums.
8874 (handle_char_store): Be prepared for the above function to fail.
8876 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
8878 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8879 when optimization level is lower than 2 or optimize for size.
8881 2018-07-26 Martin Sebor <msebor@redhat.com>
8883 PR tree-optimization/86043
8884 PR tree-optimization/86042
8885 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8886 (get_string_cst_length): Rename...
8887 (get_min_string_length): ...to this. Add argument.
8888 (handle_char_store): Extend to handle multi-character stores by
8890 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
8891 * tree.h (initializer_zerop): Add argument.
8893 2018-07-26 Jakub Jelinek <jakub@redhat.com>
8896 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8897 declare target to variables if they have always,{to,from,tofrom} map
8900 2018-07-26 Martin Liska <mliska@suse.cz>
8903 * lto-wrapper.c: Add linker_output as prefix
8904 for ltrans_output_file.
8906 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
8908 PR rtl-optimization/85805
8909 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8910 value for hard registers if that was written in the same mode.
8912 2018-07-26 Martin Liska <mliska@suse.cz>
8914 PR gcov-profile/86536
8915 * gcov.c (format_gcov): Use printf format %.*f directly
8916 and do not handle special values.
8918 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8920 * common/config/arc/arc-common.c (arc_option_optimization_table):
8921 Update default optimizations for size.
8923 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8925 * config/arc/arc.md (movsf_insn): Add short instruction selection.
8926 * config/arc/constraints.md (CfZ): New constraint.
8927 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8928 (subsf3_fpu): Likewise.
8929 (cmpsf_fpu): Likewise.
8930 (cmpsf_fpu_uneq): Likewise.
8932 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8934 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8936 (arc_is_uncached_mem_p): uncached applies to both the variable and
8939 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
8941 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8944 2018-07-25 David Malcolm <dmalcolm@redhat.com>
8946 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8947 field "m_scopes" from vec to auto_vec.
8949 2018-07-25 Martin Liska <mliska@suse.cz>
8951 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8954 2018-07-25 Richard Biener <rguenther@suse.de>
8957 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8958 special wrt context_die late.
8959 (gen_subprogram_die): Re-use DIEs in local scope.
8961 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
8963 PR tree-optimization/86644
8964 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
8966 2018-07-25 Martin Liska <mliska@suse.cz>
8969 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8970 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8972 2018-07-25 Martin Liska <mliska@suse.cz>
8975 * params.def: Explain ASan abbreviation and provide
8976 a documentation link.
8978 2018-07-24 Martin Sebor <msebor@redhat.com>
8980 PR tree-optimization/86622
8981 PR tree-optimization/86532
8982 * builtins.h (string_length): Declare.
8983 * builtins.c (c_strlen): Correct handling of non-constant offsets.
8984 (check_access): Be prepared for non-constant length ranges.
8985 (string_length): Make extern.
8986 * expr.c (string_constant): Only handle the minor non-constant
8987 array index. Use string_constant to compute the length of
8988 a generic string constant.
8990 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
8992 PR tree-optimization/86618
8993 * tree-vect-stmts.c (vectorizable_call): Don't take the address
8994 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8996 2018-07-24 David Malcolm <dmalcolm@redhat.com>
8998 PR tree-optimization/86636
8999 * json.cc (json::object::set): Fix comment. Add assertions.
9000 (json::array::append): Move here from json.h. Add comment and an
9002 (json::string::string): Likewise.
9003 * json.h (json::array::append): Move to json.cc.
9004 (json::string::string): Likewise.
9005 * optinfo-emit-json.cc
9006 (optrecord_json_writer::impl_location_to_json): Assert that we
9007 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9008 wrapper around it. Expand the location once, rather than three
9010 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9011 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9013 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9014 places. Fix some overlong lines.
9016 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9018 * config/aarch64/aarch64-simd.md
9019 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9020 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9021 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9022 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9023 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9024 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9025 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9026 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9027 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9029 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9032 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9033 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9034 and abs_d == d, do the power of two handling if profitable.
9036 2018-07-24 Richard Biener <rguenther@suse.de>
9038 * match.pd: Add BIT_FIELD_REF canonicalizations.
9040 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9043 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9045 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9047 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9048 terminated STRING_CST object.
9050 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9052 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9054 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9056 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9057 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9058 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9059 the elements into a register.
9060 (rs6000_split_v4si_init_di_reg): Delete.
9061 (rs6000_split_v4si_init): Delete.
9062 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9063 (vsx_init_v4si): Rewrite as a define_expand.
9065 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9067 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9068 zero_extend argument from memory): New.
9070 2018-07-22 Martin Sebor <msebor@redhat.com>
9073 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9074 diagnosing calls with unknown arguments unless -Walloca-larger-than
9075 is restricted to less than PTRDIFF_MAX bytes.
9077 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9079 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9081 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9083 * pretty-print.c (text_info::set_location): Remove redundant
9084 "line_table" parameter from call to rich_location::set_range.
9086 2018-07-20 Martin Sebor <msebor@redhat.com>
9089 * builtins.c (expand_builtin_alloca): Adjust.
9090 * calls.c (alloc_max_size): Simplify.
9091 * cgraphunit.c (cgraph_node::expand): Adjust.
9092 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9094 (frame_larger_than_size): Same.
9095 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9096 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9098 * doc/invoke.texi (GCC Command Options): Document option arguments.
9099 Explain byte-size arguments and suffixes.
9100 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9101 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9102 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9103 * doc/options.texi (UInteger): Expand.
9104 (Host_Wide_Int, ByteSize): Document new properties.
9105 * final.c (final_start_function_1): Include sizes in an error message.
9106 * function.c (frame_offset_overflow): Same.
9107 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9108 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9109 Diagnose unbounded alloca calls only for limits of less than
9111 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9112 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9114 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9115 only for limits of less than PTRDIFF_MAX.
9116 * langhooks-def.h (lhd_handle_option): Change function argument
9118 * langhooks.c (lhd_handle_option): Same.
9119 * langhooks.h (handle_option): Same.
9120 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9122 (var_type, var_type_struct): Same.
9123 (var_set): Handle ByteSize flag.
9124 * optc-gen.awk: Add comments to output to ease debugging. Make
9125 use of HOST_WIDE_INT where appropriate.
9126 * opts-gen-save.awk: Use %lx to format unsigned long.
9127 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9128 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9129 arguments. Parse bytes-size suffixes.
9130 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9131 (enum_value_to_arg): Same.
9132 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9133 (handle_option): Adjust.
9134 (generate_option): Change function argument to HOST_WIDE_INT.
9135 (cmdline_handle_error): Adjust.
9136 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9137 (set_option): Change function argument to HOST_WIDE_INT.
9138 (option_enabled): Handle cl_host_wide_int.
9139 (get_option_state): Handle CLVC_SIZE.
9140 (control_warning_option): Same.
9141 * opts.c (common_handle_option): Change function argument to
9142 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9143 OPT_Wvla_larger_than_.
9144 * opts.h (enum cl_var_type): Add an enumerator.
9145 * stor-layout.c (layout_decl): Print a more meaningful warning.
9146 * toplev.c (output_stack_usage): Adjust.
9148 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9150 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9151 call to inline_expand_builtin_string_cmp.
9152 (expand_builtin_strcmp): Likewise.
9153 (expand_builtin_strncmp): Likewise.
9154 (inline_string_cmp): Delete the last parameter, change char_type_node
9155 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9157 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9158 the inlining expansion on target where the type of the call has same or
9159 narrower precision than unsigned char.
9161 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9163 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9164 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9165 * common.opt (fsave-optimization-record): New option.
9166 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9167 * doc/invoke.texi (-fsave-optimization-record): New option.
9168 * dumpfile.c: Include "optinfo-emit-json.h".
9169 (struct kv_pair): Move to coretypes.h.
9170 (optgroup_options): Make non-static.
9171 (dump_context::end_scope): Call
9172 optimization_records_maybe_pop_dump_scope.
9173 * dumpfile.h (optgroup_options): New decl.
9174 * json.cc: New file.
9176 * optinfo-emit-json.cc: New file.
9177 * optinfo-emit-json.h: New file.
9178 * optinfo.cc: Include "optinfo-emit-json.h".
9179 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9180 (optinfo_enabled_p): Check optimization_records_enabled_p.
9181 (optinfo_wants_inlining_info_p): Likewise.
9182 * optinfo.h: Update comment.
9183 * profile-count.c (profile_quality_as_string): New function.
9184 * profile-count.h (profile_quality_as_string): New decl.
9185 (profile_count::quality): New accessor.
9186 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9187 and optinfo_emit_json_cc_tests.
9188 * selftest.h (selftest::json_cc_tests): New decl.
9189 (selftest::optinfo_emit_json_cc_tests): New decl.
9190 * toplev.c: Include "optinfo-emit-json.h".
9191 (compile_file): Call optimization_records_finish.
9192 (do_compile): Call optimization_records_start.
9193 * tree-ssa-live.c: Include optinfo.h.
9194 (remove_unused_scope_block_p): Retain inlining information if
9195 optinfo_wants_inlining_info_p returns true.
9197 2018-07-20 Richard Biener <rguenther@suse.de>
9200 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9201 to cover -flto-partition=none.
9203 2018-07-20 Martin Liska <mliska@suse.cz>
9205 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9206 (get_decl_source_range): Remove unused function.
9208 2018-07-20 Richard Biener <rguenther@suse.de>
9210 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9211 (struct vn_phi_s): Likewise.
9212 (struct vn_reference_s): Likewise.
9213 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9214 for searching the slot of an entry known to be in the hash itself.
9215 (vn_phi_hasher::equal): Likewise.
9216 (vn_reference_hasher::equal): Likewise.
9217 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9219 (optimistic_info, current_info): Remove, keeping only valid_info.
9220 (vn_reference_lookup_1): Remove fallback lookup.
9221 (vn_reference_lookup_2): Likewise.
9222 (vn_nary_op_lookup_1): Likewise.
9223 (vn_phi_lookup): Likewise.
9224 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9226 (vn_reference_insert): Adjust, chain the inserted hash element
9227 at last_inserted_ref.
9228 (vn_reference_insert_pieces): Likewise.
9229 (visit_reference_op_call): Likewise.
9230 (vn_nary_op_insert_into): Chain the inserted hash element at
9232 (vn_nary_op_insert_pieces): Adjust.
9233 (vn_nary_op_insert): Likewise.
9234 (vn_nary_op_insert_stmt): Likewise.
9235 (vn_phi_insert): Adjust, chain the inserted hash element at
9237 (process_scc): Remove clearing and copying the optimistic
9238 table. Instead remove elements inserted during an optimistic
9239 iteration from the single table we maintain.
9240 (init_scc_vn): Adjust.
9241 (free_scc_vn): Likewise.
9242 (sccvn_dom_walker::record_cond): Likewise.
9243 (sccvn_dom_walker::after_dom_children): Likewise.
9245 2018-07-19 Martin Sebor <msebor@redhat.com>
9247 PR tree-optimization/84047
9248 PR tree-optimization/83776
9249 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9250 (check_array_bounds): Call it.
9252 2018-07-19 Martin Sebor <msebor@redhat.com>
9254 * align.h (align_flags): Use member initialization.
9256 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9258 * Makefile.in (OBJS): Add optinfo.o.
9259 * coretypes.h (class symtab_node): New forward decl.
9260 (struct cgraph_node): New forward decl.
9261 (class varpool_node): New forward decl.
9262 * dump-context.h: New file.
9263 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9265 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9266 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9267 (set_alt_dump_file): Likewise.
9268 (dump_context::~dump_context): New dtor.
9269 (dump_gimple_stmt): Move implementation to...
9270 (dump_context::dump_gimple_stmt): ...this new member function.
9271 Add the stmt to any pending optinfo, creating one if need be.
9272 (dump_gimple_stmt_loc): Move implementation to...
9273 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9274 Start a new optinfo and add the stmt to it.
9275 (dump_gimple_expr): Move implementation to...
9276 (dump_context::dump_gimple_expr): ...this new member function.
9277 Add the stmt to any pending optinfo, creating one if need be.
9278 (dump_gimple_expr_loc): Move implementation to...
9279 (dump_context::dump_gimple_expr_loc): ...this new member function.
9280 Start a new optinfo and add the stmt to it.
9281 (dump_generic_expr): Move implementation to...
9282 (dump_context::dump_generic_expr): ...this new member function.
9283 Add the tree to any pending optinfo, creating one if need be.
9284 (dump_generic_expr_loc): Move implementation to...
9285 (dump_context::dump_generic_expr_loc): ...this new member
9286 function. Add the tree to any pending optinfo, creating one if
9288 (dump_printf): Move implementation to...
9289 (dump_context::dump_printf_va): ...this new member function. Add
9290 the text to any pending optinfo, creating one if need be.
9291 (dump_printf_loc): Move implementation to...
9292 (dump_context::dump_printf_loc_va): ...this new member function.
9293 Start a new optinfo and add the stmt to it.
9294 (dump_dec): Move implementation to...
9295 (dump_context::dump_dec): ...this new member function. Add the
9296 value to any pending optinfo, creating one if need be.
9297 (dump_context::dump_symtab_node): New member function.
9298 (dump_context::get_scope_depth): New member function.
9299 (dump_context::begin_scope): New member function.
9300 (dump_context::end_scope): New member function.
9301 (dump_context::ensure_pending_optinfo): New member function.
9302 (dump_context::begin_next_optinfo): New member function.
9303 (dump_context::end_any_optinfo): New member function.
9304 (dump_context::s_current): New global.
9305 (dump_context::s_default): New global.
9306 (dump_scope_depth): Delete global.
9307 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9308 (dump_symtab_node): New function.
9309 (get_dump_scope_depth): Reimplement in terms of dump_context.
9310 (dump_begin_scope): Likewise.
9311 (dump_end_scope): Likewise.
9312 (selftest::temp_dump_context::temp_dump_context): New ctor.
9313 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9314 (selftest::verify_item): New function.
9315 (ASSERT_IS_TEXT): New macro.
9316 (ASSERT_IS_TREE): New macro.
9317 (ASSERT_IS_GIMPLE): New macro.
9318 (selftest::test_capture_of_dump_calls): New test.
9319 (selftest::dumpfile_c_tests): Call it.
9320 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9321 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9322 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9323 descriptive comment.
9324 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9325 (dump_node, dump_bb): Move these unrelated decls.
9326 (class dump_manager): Add leading comment.
9327 * optinfo.cc: New file.
9328 * optinfo.h: New file.
9330 2018-07-19 Michael Collison <michael.collison@arm.com>
9331 Richard Henderson <rth@redhat.com>
9333 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9334 (subti): Handle op1 zero.
9335 (subvti4, usub4ti4): New.
9336 (*sub<GPI>3_compare1_imm): New.
9337 (sub<GPI>3_carryinCV): New.
9338 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9339 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9341 2018-07-19 Michael Collison <michael.collison@arm.com>
9342 Richard Henderson <rth@redhat.com>
9344 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9345 (addti3): Create simpler code if low part is already known to be 0.
9346 (addvti4, uaddvti4): New.
9347 (*add<GPI>3_compareC_cconly_imm): New.
9348 (*add<GPI>3_compareC_cconly): New.
9349 (*add<GPI>3_compareC_imm): New.
9350 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9351 handle constants within this pattern..
9352 (*add<GPI>3_compareV_cconly_imm): New.
9353 (*add<GPI>3_compareV_cconly): New.
9354 (*add<GPI>3_compareV_imm): New.
9355 (add<GPI>3_compareV): New.
9356 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9357 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9358 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9359 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9360 with 'comparison' operator.
9361 (*add<GPI>3_compareV_cconly_imm): Ditto.
9362 (*add<GPI>3_compareV_cconly): Ditto.
9363 (*add<GPI>3_compareV_imm): Ditto.
9364 (add<GPI>3_compareV): Ditto.
9365 (add<mode>3_carryinC): Ditto.
9366 (*add<mode>3_carryinC_zero): Ditto.
9367 (*add<mode>3_carryinC): Ditto.
9368 (add<mode>3_carryinV): Ditto.
9369 (*add<mode>3_carryinV_zero): Ditto.
9370 (*add<mode>3_carryinV): Ditto.
9372 2018-07-19 Michael Collison <michael.collison@arm.com>
9373 Richard Henderson <rth@redhat.com>
9375 * config/aarch64/aarch64-modes.def (CC_V): New.
9376 * config/aarch64/aarch64-protos.h
9377 (aarch64_addti_scratch_regs): Declare
9378 (aarch64_subvti_scratch_regs): Declare.
9379 (aarch64_expand_subvti): Declare.
9380 (aarch64_gen_unlikely_cbranch): Declare
9381 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9382 for signed overflow using CC_Vmode.
9383 (aarch64_get_condition_code_1): Handle CC_Vmode.
9384 (aarch64_gen_unlikely_cbranch): New function.
9385 (aarch64_addti_scratch_regs): New function.
9386 (aarch64_subvti_scratch_regs): New function.
9387 (aarch64_expand_subvti): New function.
9389 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9391 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9393 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9394 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9397 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9400 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9401 address check not strict.
9403 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9405 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9407 (store_pair_lanes<mode>): Likewise.
9408 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9409 enum value 'ADDR_QUERY_LDP_STP_N'.
9410 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9411 (aarch64_print_address_internal): Add declaration.
9412 (aarch64_print_ldpstp_address): Remove.
9413 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9414 (aarch64_print_operand): Change printing of 'y'.
9415 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9416 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9417 'true' rather than '1'.
9418 * config/aarch64/constraints.md (Uml): Likewise.
9419 (Uml): Rename to Umn.
9422 2018-07-19 Richard Biener <rguenther@suse.de>
9424 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9426 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9427 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9428 (vn_reference_hasher): Likewise.
9429 (struct vn_tables_s): Remove obstack and alloc-pool members.
9430 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9431 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9432 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9433 (vn_reference_insert_pieces): Likewise.
9434 (alloc_vn_nary_op_noinit): Adjust.
9435 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9436 (vn_phi_eq): Adjust.
9437 (shared_lookup_phiargs): Remove.
9438 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9439 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9440 (visit_reference_op_call): Likewise.
9441 (copy_nary, copy_phi, copy_reference): Remove.
9442 (process_scc): Rewind the obstack when iterating. Do not
9443 copy the elements to valid_info but just move them from one
9444 hashtable to the other.
9445 (allocate_vn_table): Adjust.
9446 (free_vn_table): Likewise.
9447 (init_scc_vn): Likewise.
9448 (free_scc_vn): Likewise.
9450 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9453 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9454 indirect_return as function type attribute.
9455 (ix86_attribute_table): Change indirect_return to function
9457 * doc/extend.texi: Update indirect_return attribute.
9459 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9461 * wide-int.h (widest2_int): New.
9462 * gimple-fold.c (arith_overflowed_p): Use it.
9463 * tree.h (widest2_int_cst): New.
9464 * tree-vrp.c (wide_int_binop_overflow): Rename from
9465 vrp_int_const_binop.
9466 Rewrite to work on trees.
9467 (extract_range_from_multiplicative_op_1): Abstract code to...
9468 (wide_int_range_min_max): ...here.
9469 (wide_int_range_cross_product): ...and here.
9470 (extract_range_from_binary_expr_1): Abstract overflow code to...
9471 (wide_int_range_mult_wrapping): ...here.
9472 * tree-vrp.h (wide_int_range_cross_product): New.
9473 (wide_int_range_mult_wrapping): New.
9475 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9476 Julia Koval <julia.koval@intel.com>
9478 * config/i386/x86-tune-costs.h (skylake_memcpy,
9479 skylake_memset): Replace rep_prefix with unrolling for size 512.
9481 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9484 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9485 comparision with EQ_EXPR in last stmt.
9487 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9489 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9490 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9491 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9492 previously known as "PowerPC AltiVec Built-in Functions". Move
9493 some material to new subsubsections "PowerPC AltiVec Built-in
9494 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9496 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9497 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9498 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9499 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9501 2018-07-18 Richard Biener <rguenther@suse.de>
9503 PR tree-optimization/86557
9504 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9507 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9509 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9511 2018-07-17 Jeff Law <law@redhat.com>
9513 * config/arm/arm.c (get_label_padding): Update for recent
9514 changes to label_to_alignment.
9516 PR tree-optimization/86010
9517 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9519 * config/mips/mips.c (vr4130_align_insns): Update for recent
9520 changes to label_to_alignment.
9522 * config/frv/frv.c (frv_label_align): Update for recent changes
9523 to label_to_alignment.
9525 * config/nios2/nios2.c (nios2_label_align): Update for recent
9526 changes which dropped ALIGN_LABELS_LOG.
9528 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9530 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9531 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9533 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9535 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9536 deprecated align_labels_log.
9538 2018-07-17 Richard Biener <rguenther@suse.de>
9541 * dwarf2out.c (init_sections_and_labels): Always generate
9542 a debug_line_str_section for early LTO debug.
9543 (dwarf2out_finish): Reset debug_line_str_hash output early.
9544 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9546 (dwarf2out_early_finish): Output debug_line_str.
9548 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9550 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9551 index register on z196 or later.
9553 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9555 * config/s390/s390.c (s390_default_align): Set default function
9557 (s390_override_options_after_change): Call s390_default align.
9558 (s390_option_override_internal): Call s390_default_align.
9559 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9561 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9564 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9565 to _looptemp_ clauses, other than the first two.
9567 2018-07-17 Martin Liska <mliska@suse.cz>
9569 * opts.c: Do not enable OPT_falign_* for -Os.
9571 2018-07-17 Martin Liska <mliska@suse.cz>
9573 * align.h (MAX_CODE_ALIGN): New.
9574 (MAX_CODE_ALIGN_VALUE): New.
9575 * common/config/i386/i386-common.c (ix86_handle_option):
9576 (MAX_CODE_ALIGN): Moved to align.h.
9577 * final.c (MAX_CODE_ALIGN): Likewise.
9578 * opts.c (parse_and_check_align_values):
9579 (MAX_CODE_ALIGN): Likewise.
9580 (MAX_CODE_ALIGN_VALUE): Likewise.
9582 2018-07-17 Martin Liska <mliska@suse.cz>
9584 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9585 in order to fulfil coding style.
9586 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9587 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9588 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9589 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9590 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9591 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9592 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9593 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9594 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9596 2018-07-17 Martin Liska <mliska@suse.cz>
9598 * align.h: New file.
9599 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9601 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9602 align_flags of label_to_alignment.
9603 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9605 * config/m68k/m68k.c: Do not use removed align_labels_value and
9607 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9608 (LOOP_ALIGN): Likewise.
9609 (LABEL_ALIGN): Likewise.
9610 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9611 Remove not used macro.
9612 (rs6000_loop_align): Change return type to align_flags.
9613 (rs6000_loop_align_max_skip): Remove.
9614 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9615 Change return type to align_flags.
9616 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9617 Remove not used macro.
9618 (rs6000_loop_align): Change return type to align_flags.
9619 (rs6000_loop_align_max_skip): Remove.
9620 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9621 * config/rx/rx-protos.h (rx_align_for_label): Make it
9623 * config/rx/rx.c (rx_align_for_label): Change return type
9625 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9627 into align_flags class.
9628 (LABEL_ALIGN): Likewise.
9629 (LOOP_ALIGN): Likewise.
9630 * config/s390/s390.c (s390_label_align): Use align_flags
9632 (s390_asm_output_function_label): Likewise.
9633 * config/sh/sh.c (sh_override_options_after_change):
9634 Use align_flags class directly without macros.
9635 (find_barrier): Likewise.
9636 (barrier_align): Likewise.
9637 (sh_loop_align): Likewise.
9638 * config/spu/spu.c (spu_option_override):
9639 Use align_flags_tuple::get_value instead of removed macros.
9640 (spu_sched_init): Likewise.
9641 * config/spu/spu.h (GTY): Likewise.
9642 * config/visium/visium.c (visium_option_override):
9643 Set "8" as default secondary alignment.
9644 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9645 in order to guarantee secondary alignment of 8.
9646 * coretypes.h: Include align.h header file.
9647 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9648 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9649 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9650 * doc/tm.texi.in: Likewise.
9651 * final.c (struct label_alignment): Remove not used structure.
9652 (LABEL_ALIGN): Change type to align_flags.
9653 (LOOP_ALIGN): Likewise.
9654 (JUMP_ALIGN): Likewise.
9655 (default_loop_align_max_skip): Remove.
9656 (default_label_align_max_skip): Likewise.
9657 (default_jump_align_max_skip): Likewise.
9658 (default_label_align_after_barrier_max_skip):
9659 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9660 (LABEL_TO_MAX_SKIP): Remove.
9661 (label_to_alignment): Return align_flags type instead of integer.
9662 (label_to_max_skip): Remove.
9663 (align_fuzz): Use align_flags type.
9664 (compute_alignments): Use align_flags type and use align_flags::max
9665 to combine multiple alignments.
9666 (grow_label_align): Grow vec instead of C array.
9667 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9668 (shorten_branches): Use align_flags type and use align_flags::max
9669 to combine multiple alignments.
9670 (final_scan_insn_1): Remove usage of secondary alignment that comes
9671 from label alignment, but instead use proper secondary alignment
9672 which is computed in grow_label_align.
9673 * flags.h (struct align_flags_tuple): Move to align.h.
9674 (struct align_flags): Likewise.
9675 (state_align_loops): Rename to align_loops.
9676 (state_align_jumps): Rename to align_jumps.
9677 (state_align_labels): Rename to align_labels.
9678 (state_align_functions): Rename to align_functions.
9679 (align_loops_log): Remove.
9680 (align_jumps_log): Remove.
9681 (align_labels_log): Remove.
9682 (align_functions_log): Remove.
9683 (align_loops_max_skip): Remove.
9684 (align_jumps_max_skip): Remove.
9685 (align_labels_max_skip): Remove.
9686 (align_functions_max_skip): Remove.
9687 (align_loops_value): Remove.
9688 (align_jumps_value): Remove.
9689 (align_labels_value): Remove.
9690 (align_functions_value): Remove.
9691 * output.h (label_to_alignment): Change return type to align_flags.
9692 (label_to_max_skip): Remove.
9693 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9694 jump_align_max_skip macros.
9695 * targhooks.h (default_loop_align_max_skip): Remove.
9696 (default_label_align_max_skip): Likewise.
9697 (default_jump_align_max_skip): Likewise.
9698 (default_label_align_after_barrier_max_skip): Remove.
9699 * toplev.c (read_log_maxskip): Use ::normalize function.
9700 (parse_N_M): Remove not used argument and also call ::normalize.
9701 (parse_alignment_opts): Do not pass unused arguments.
9702 * varasm.c (assemble_start_function): Use directly align_functions
9703 instead of removed macros.
9704 * system.h: Do not poison removed macros.
9706 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9709 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9710 and cond temporaries don't have reference type if iterator has
9711 pointer type. For init use &for_pre_body instead of pre_p if
9712 for_pre_body is non-empty.
9714 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9716 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9717 double-double modes to SFmode directly directly.
9718 (trunc<mode>sf2_fprs): Delete.
9720 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9722 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9723 for conversions between IFmode and the decimal floating point modes.
9724 (init_float128_ieee): Use the correct names for conversions between
9725 KFmode and the decimal floating point modes.
9727 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
9729 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9730 for the conversions between TDmode and IFmode.
9731 (init_float128_ieee): Use more correct names for the conversions
9732 between TDmode and KFmode.
9734 2018-07-16 Jakub Jelinek <jakub@redhat.com>
9736 PR tree-optimization/86526
9737 * builtins.c (expand_builtin_memcmp): Formatting fixes.
9738 (inline_expand_builtin_string_cmp): Likewise.
9739 (inline_string_cmp): Likewise. Use c_readstr instead of
9740 builtin_memcpy_read_str. Add unit_mode temporary.
9742 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
9745 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9746 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9748 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
9750 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9751 Alphabetize prototypes of built-in functions, separating out
9752 built-in functions that are listed in this section but should be
9753 described elsewhere.
9755 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
9758 * expmed.c (emit_store_flag): Do not emit setcc followed by a
9759 conditional move when trapping comparison was split to a
9760 non-trapping one (and vice versa).
9762 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9764 * config/s390/s390.c (s390_function_profiler): Generate nops
9765 instead of profiler call sequences.
9766 * config/s390/s390.opt: Add the new option.
9768 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9770 * config/s390/s390.c (s390_function_profiler): Generate
9771 __mcount_loc section.
9772 * config/s390/s390.opt: Add the new option.
9774 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
9776 * common.opt: Add the new warning.
9777 * config/s390/s390.c (s390_function_profiler): Emit "brasl
9778 %r0,__fentry__" when -mfentry is specified.
9779 (s390_option_override_internal): Disallow -mfentry for 31-bit
9781 * config/s390/s390.opt: Add the new option.
9783 2018-07-16 Richard Biener <rguenther@suse.de>
9786 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9787 for function-local FUNCTION_DECL and RESULT_DECL immediately.
9789 2018-07-16 Martin Liska <mliska@suse.cz>
9792 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9795 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9797 * config/arc/arcHS.md: Update ARCHS scheduling rules.
9799 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
9801 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9803 * config/arc/arc-cpus.def (hs4x): New cpu.
9805 * config/arc/arc-tables.opt: Regenerate.
9806 * config/arc/arc.c (arc_sched_issue_rate): New function.
9807 (TARGET_SCHED_ISSUE_RATE): Define.
9808 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9809 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9811 (attr tune): Add ARCHS4x tune values.
9812 (attr tune_dspmpy): Define.
9813 (*tst): Correct instruction type.
9814 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9815 * config/arc/arcHS4x.md: New file.
9816 * config/arc/fpu.md: Update instruction type attributes.
9817 * config/arc/t-multilib: Regenerate.
9819 2018-07-16 Tom de Vries <tdevries@suse.de>
9822 * var-tracking.c (vt_initialize): Fix pre_dec handling.
9824 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9826 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9829 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
9831 PR tree-optimization/86514
9832 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9833 conversion to a boolean type from a type with greater precision.
9835 2018-07-16 Tom de Vries <tdevries@suse.de>
9837 * var-tracking.c (vt_initialize): Print adjusted insn slim if
9838 dump_flags request TDF_SLIM.
9840 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
9842 * fold-const.c (int_const_binop_1): Abstract...
9843 (wide_int_binop): ...wide int code here.
9844 (poly_int_binop): ...poly int code here.
9845 Abstract the rest of int_const_binop_1 into int_const_binop.
9846 * fold-const.h (wide_int_binop): New.
9847 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9848 Remove useless PLUS/MINUS_EXPR case.
9849 (zero_nonzero_bits_from_vr): Move wide int code...
9850 (zero_nonzero_bits_from_bounds): ...here.
9851 (extract_range_from_binary_expr_1): Move mask optimization code...
9852 (range_easy_mask_min_max): ...here.
9853 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9854 (range_easy_mask_min_max): New.
9856 2018-07-15 Jeff Law <law@redhat.com>
9859 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9862 2018-07-14 Jim Wilson <jimw@sifive.com>
9864 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9866 2018-07-14 Paul Koning <ni1d@arrl.net>
9868 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9870 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
9872 * lto-streamer-out.c (copy_function_or_variable): Dump info about
9875 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
9876 Steve Munroe <munroesj52@gmail.com>
9878 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9879 (_mm_andnot_si128): Likewise.
9880 (_mm_or_si128): Likewise.
9881 (_mm_xor_si128): Likewise.
9883 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
9886 * builtins.c (expand_builtin_memcmp): Inline the calls first
9887 when result_eq is false.
9888 (expand_builtin_strcmp): Inline the calls first.
9889 (expand_builtin_strncmp): Likewise.
9890 (inline_string_cmp): New routine. Expand a string compare
9891 call by using a sequence of char comparison.
9892 (inline_expand_builtin_string_cmp): New routine. Inline expansion
9893 a call to str(n)cmp/memcmp.
9894 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9896 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9898 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
9900 * config/arm/driver-arm.c: Include arm-native.h.
9901 (host_detect_local_cpu): Use auto-generated data tables.
9902 (vendors, arm_cpu_table): Delete. Move part information to ...
9903 * config/arm/arm-cpus.in: ... here.
9904 * config/arm/parsecpu.awk (gen_native): New function.
9905 (vendor, part): New CPU fields.
9906 (END): Add support for building the native CPU detection tables.
9907 * config/arm/t-arm (arm-native.h): Add build rule.
9908 (driver-arm.o): Add dependency on arm-native.h.
9910 2018-07-13 Richard Biener <rguenther@suse.de>
9913 * match.pd (addr1 - addr2): Allow either of the operand to
9916 2018-07-13 Tom de Vries <tdevries@suse.de>
9918 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9921 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
9923 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9924 arrays instead of numbered variables.
9926 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
9928 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9929 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9931 2018-07-13 Richard Biener <rguenther@suse.de>
9934 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9935 instead of get_context_die.
9937 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
9938 Richard Biener <rguenther@suse.de>
9941 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9942 that the loop latch destination where phi is defined.
9944 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
9946 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9947 (riscv_expand_epilogue): Add assertion to check interrupt mode.
9948 (riscv_set_current_function): Extract getting interrupt type to new
9950 (riscv_get_interrupt_type): New function.
9951 (riscv_merge_decl_attributes): New function, checking interrupt type is
9953 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9955 2018-07-12 Paul Koning <ni1d@arrl.net>
9957 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9960 2018-07-12 Paul Koning <ni1d@arrl.net>
9962 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9963 zero reference, add doloop_end instead.
9964 * doc/md.texi (decrement_and_branch_until_zero): Remove.
9965 (Looping patterns): Remove decrement_and_branch_until_zero. Add
9966 detail for doloop_end.
9968 2018-07-12 Martin Sebor <msebor@redhat.com>
9971 * attribs.c (decl_attributes): Reject conflicting attributes before
9972 calling attribute handlers.
9974 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
9976 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9978 (gcc::dump_manager::get_dump_file_name): likewise.
9979 (dump_begin): Likewise.
9980 * dumpfile.h (dump_begin): Update prototype.
9981 (gcc::dump_manager::get_dump_file_name,
9982 gcc::dump_manager::get_dump_file_name): Update prototype.
9984 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9986 * internal-fn.h (vectorizable_internal_fn_p): New function.
9987 * tree-vect-slp.c (compatible_calls_p): Likewise.
9988 (vect_build_slp_tree_1): Remove nops argument. Handle calls
9989 to internal functions.
9990 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9992 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
9994 * fold-const.h (inverse_conditions_p): Declare.
9995 * fold-const.c (inverse_conditions_p): New function.
9996 * match.pd: Use inverse_conditions_p. Add folds of view_converts
9997 that test the inverse condition of a conditional internal function.
9998 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9999 * internal-fn.c (internal_fn_mask_index): Handle conditional
10000 internal functions.
10001 (vectorized_internal_fn_supported_p): New function.
10002 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10003 (any_pred_load_store): Replace with...
10004 (need_to_predicate): ...this new variable.
10005 (redundant_ssa_names): New variable.
10006 (ifcvt_can_use_mask_load_store): Move initial checks to...
10007 (ifcvt_can_predicate): ...this new function. Handle tree codes
10008 for which a conditional internal function exists.
10009 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10010 instead of ifcvt_can_use_mask_load_store. Update after variable
10012 (predicate_load_or_store): New function, split out from
10013 predicate_mem_writes.
10014 (check_redundant_cond_expr): New function.
10015 (value_available_p): Likewise.
10016 (predicate_rhs_code): Likewise.
10017 (predicate_mem_writes): Rename to...
10018 (predicate_statements): ...this. Use predicate_load_or_store
10019 and predicate_rhs_code.
10020 (combine_blocks, tree_if_conversion): Update after above name changes.
10021 (ifcvt_local_dce): Handle redundant_ssa_names.
10022 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10023 general conditional functions.
10024 * tree-vect-stmts.c (vectorizable_call): Likewise.
10026 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10027 Alan Hayward <alan.hayward@arm.com>
10028 David Sherwood <david.sherwood@arm.com>
10030 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10031 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10032 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10033 plus and minus and convert them into IFN_COND_FMA-based sequences.
10034 (convert_mult_to_fma): Handle conditional plus and minus.
10036 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10038 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10039 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10040 (cond_fnms_optab): New optabs.
10041 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10042 internal functions.
10043 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10044 * internal-fn.h (get_conditional_internal_fn): Declare.
10045 (get_unconditional_internal_fn): Likewise.
10046 * internal-fn.c (cond_ternary_direct): New macro.
10047 (expand_cond_ternary_optab_fn): Likewise.
10048 (direct_cond_ternary_optab_supported_p): Likewise.
10049 (FOR_EACH_COND_FN_PAIR): Likewise.
10050 (get_conditional_internal_fn): New function.
10051 (get_unconditional_internal_fn): Likewise.
10052 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10053 (gimple_match_op::gimple_match_op): Add a new overload for 5
10055 (gimple_match_op::set_op): Likewise.
10056 (gimple_resimplify5): Declare.
10057 * genmatch.c (decision_tree::gen): Generate simplifications for
10059 * gimple-match-head.c (gimple_simplify): Define an overload for
10060 5 operands. Handle calls with 5 arguments in the top-level overload.
10061 (convert_conditional_op): Handle conversions from unconditional
10062 internal functions to conditional ones.
10063 (gimple_resimplify5): New function.
10064 (build_call_internal): Pass a fifth operand.
10065 (maybe_push_res_to_seq): Likewise.
10066 (try_conditional_simplification): Try converting conditional
10067 internal functions to unconditional internal functions.
10068 Handle 3-operand unconditional forms.
10069 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10070 Define ternary equivalents of the current rules for binary conditional
10071 internal functions.
10072 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10073 ternary operations.
10074 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10075 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10076 (optab): Handle them.
10077 (SVE_COND_FP_TERNARY): New int iterator.
10078 (sve_fmla_op, sve_fmad_op): New int attributes.
10079 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10080 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10081 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10083 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10085 * target.def (preferred_else_value): New target hook.
10086 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10087 * doc/tm.texi: Regenerate.
10088 * targhooks.h (default_preferred_else_value): Declare.
10089 * targhooks.c (default_preferred_else_value): New function.
10090 * internal-fn.h (conditional_internal_fn_code): Declare.
10091 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10092 (get_conditional_internal_fn): Use it.
10093 (conditional_internal_fn_code): New function.
10094 * gimple-match.h (gimple_match_cond): New struct.
10095 (gimple_match_op): Add a cond member function.
10096 (gimple_match_op::gimple_match_op): Update all forms to take a
10098 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10099 for the suboperation, but don't specify a particular else_value.
10100 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10101 (visit_nary_op, visit_reference_op_load): Pass
10102 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10103 * gimple-match-head.c: Include tree-eh.h
10104 (convert_conditional_op): New function.
10105 (maybe_resimplify_conditional_op): Likewise.
10106 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10107 (gimple_resimplify2): Likewise.
10108 (gimple_resimplify3): Likewise.
10109 (gimple_resimplify4): Likewise.
10110 (maybe_push_res_to_seq): Return null for conditional operations.
10111 (try_conditional_simplification): New function.
10112 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10114 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10116 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10118 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10120 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10122 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10124 (hash_tree): Do not hash DECL_FCONTEXT
10125 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10126 Do not stream DECL_FCONTEXT.
10127 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10128 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10130 2018-07-12 Richard Biener <rguenther@suse.de>
10133 * dwarf2out.c (gen_block_die): Only output blocks when they have
10134 at least one !DECL_IGNORED_P variable.
10136 2018-07-12 Richard Biener <rguenther@suse.de>
10139 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10140 Remove -mieee-fp handling.
10142 2018-07-12 Richard Biener <rguenther@suse.de>
10144 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10145 left-over from last patch.
10147 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10149 PR tree-optimization/86492
10150 * gimple-ssa-store-merging.c
10151 (imm_store_chain_info::coalesce_immediate_stores): Call
10152 check_no_overlap even for the merge_overlapping case. Formatting fix.
10154 2018-07-12 Richard Biener <rguenther@suse.de>
10156 PR middle-end/86479
10157 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10158 move possibly trapping operations into the conditional.
10160 2018-07-12 Richard Biener <rguenther@suse.de>
10162 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10163 (vn_lookup_simplify_result): Remove recursion limit applied
10165 (vn_nary_build_or_lookup_1): Adjust.
10166 (try_to_simplify): Likewise.
10167 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10169 (gimple_resimplify2): Likewise.
10170 (gimple_resimplify3): Likewise.
10171 (gimple_resimplify4): Likewise.
10173 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10175 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10176 Use __mmask64 type instead of __mmask8 for __M argument.
10177 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10178 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10180 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10181 __mmask16 for __M argument.
10182 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10183 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10184 to __mmask16 instead of __mmask8.
10185 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10186 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10187 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10188 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10189 instead of __mmask16 for __U argument.
10190 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10191 __mmask16 instead of __mmask8 for __U argument.
10192 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10194 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10196 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10198 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10200 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10202 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10204 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10206 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10208 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10210 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10212 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10213 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10214 return type as well as __M argument type and all casts from __mmask8
10216 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10217 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10218 return type as well as __M argument type and all casts from __mmask8
10220 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10221 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10222 return type as well as __M argument type and all casts from __mmask8
10224 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10225 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10226 return type as well as __M argument type and all casts from __mmask8
10228 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10229 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10232 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10234 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10235 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10238 2018-07-11 Paul Koning <ni1d@arrl.net>
10240 * doc/md.texi (define_subst): Document how multiple occurrences of
10241 the same argument in the replacement pattern are handled.
10243 2018-07-11 Paul Koning <ni1d@arrl.net>
10245 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10246 alphabetical order.
10247 (Common Type Attributes): Add "mode" attribute.
10249 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10251 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10252 stream DECL_ORIGINAL_TYPE.
10253 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10254 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10255 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10256 Do not walk original type.
10257 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10259 (write_ts_decl_non_common_tree_pointers): Do not stream
10261 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10262 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10264 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10266 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10267 thread twice from the same starting edge.
10269 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10271 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10272 * gimple.c (gimple_call_nonnull_result_p): ...here...
10273 (gimple_call_nonnull_arg): ...and here.
10274 * gimple.h (gimple_call_nonnull_result_p): New.
10275 (gimple_call_nonnull_arg): New.
10277 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10279 * config/arm/arm-cpus.in: Move information from fpu field of each
10280 cpu definition to the isa field.
10281 * config/arm/parsecpu.awk (fpu): Delete match rule.
10282 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10284 2018-07-11 Richard Biener <rguenther@suse.de>
10287 * dwarf2out.c (init_sections_and_labels): Use
10288 output_asm_line_debug_info consistently.
10289 (dwarf2out_early_finish): Likewise.
10290 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10293 2018-07-11 Richard Biener <rguenther@suse.de>
10295 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10296 Rework father_bb setting in a way to avoid propagating constants
10297 multiple times on a loop body.
10299 2018-07-10 Mark Wielaard <mark@klomp.org>
10302 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10304 2018-07-10 Richard Biener <rguenther@suse.de>
10306 * hash-map.h (hash_map::iterator::operator*): Return
10307 references to key and value.
10309 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10312 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10313 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10314 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10315 (gimplify_omp_for): For composite loops, move outer
10316 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10317 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10318 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10319 TREE_LIST for both the original class iterator and the "last" helper
10320 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10321 loop, remember has_decl_expr from outer composite loops for the
10322 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10324 2018-07-09 Martin Sebor <msebor@redhat.com>
10326 PR middle-end/77357
10327 PR middle-end/86428
10328 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10329 accessing implicitly initialized array elements.
10330 * expr.c (string_constant): Handle string initializers of
10331 character arrays within aggregates.
10332 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10333 Store element offset. As a special case, handle zero size.
10334 (fold_nonarray_ctor_reference): Same.
10335 (fold_ctor_reference): Add argument. Store subobject offset.
10336 * gimple-fold.h (fold_ctor_reference): Add argument.
10338 2018-07-09 Paul Koning <ni1d@arrl.net>
10340 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10341 (pdp11_insn_cost): New function.
10342 (pdp11_md_asm_adjust): New function.
10343 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10344 (pdp11_rtx_costs): Update to match machine better.
10345 (output_addr_const_pdp11): Correct format mismatch warnings.
10346 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10347 * config/pdp11/pdp11.md: General change to add base_cost and/or
10348 length attributes for use by new pdp11_insn_cost function.
10349 (MIN_BRANCH): Correct definition.
10351 (doloop_end): Use standard pattern name for looping pattern.
10352 (doloop_end_nocc): New.
10353 (movsf): Add another constraint alternative.
10354 (zero_extendqihi2): Add constraint alternatives for not in place
10356 (zero_extendhisi2): Remove.
10357 (shift patterns): Add CC handling variants.
10361 (define_peephole2): New peephole to recognize mov that sets CC for
10364 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10366 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10367 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10370 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10373 * real.c (real_nextafter): Return true if result is denormal.
10375 2018-07-09 Martin Liska <mliska@suse.cz>
10377 * common.opt: Add back wrongly removed attribute.
10379 2018-07-09 Richard Biener <rguenther@suse.de>
10382 * dwarf2out.c (gen_block_die): For an early generated DIE
10383 always output high/low PC attributes.
10385 2018-07-09 Tom de Vries <tdevries@suse.de>
10387 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10388 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10389 onto VAR_DECL with abstract origin.
10391 2018-07-07 Jim Wilson <jimw@sifive.com>
10393 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10395 2018-07-07 Tom de Vries <tdevries@suse.de>
10397 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10399 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10401 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10403 (combine_bound): Use wide-int overflow calculation instead of
10405 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10407 * fold-const.c (int_const_binop_2): Same.
10408 (extract_muldiv_1): Same.
10409 (fold_div_compare): Same.
10410 (fold_abs_const): Same.
10412 * poly-int.h (add): Same.
10416 * predict.c (predict_iv_comparison): Same.
10417 * profile-count.c (slow_safe_scale_64bit): Same.
10418 * simplify-rtx.c (simplify_const_binary_operation): Same.
10419 * tree-chrec.c (tree_fold_binomial): Same.
10420 * tree-data-ref.c (split_constant_offset_1): Same.
10421 * tree-if-conv.c (idx_within_array_bound): Same.
10422 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10423 * tree-ssa-phiopt.c (minmax_replacement): Same.
10424 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10425 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10426 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10427 * wide-int.cc (wi::add_large): Same.
10428 (wi::mul_internal): Same.
10429 (wi::sub_large): Same.
10430 (wi::divmod_internal): Same.
10431 * wide-int.h: Change overflow type to overflow_type for neg, add,
10432 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10433 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10434 mul_internal, divmod_internal.
10435 (overflow_type): New enum.
10436 (accumulate_overflow): New.
10438 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10440 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10441 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10443 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10445 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10446 argument is checked for zero before entering loop, avoid checking again.
10448 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10450 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10451 * gimplify.h (generic_expr_could_trap_p): Likwise.
10452 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10454 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10456 PR tree-optimization/86401
10457 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10458 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10459 (fold_bit_and_mask): ... here. New helper function for match.pd.
10460 * fold-const.h (fold_bit_and_mask): Declare.
10461 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10463 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10466 * target.def (translate_mode_attribute): New hook.
10467 * targhooks.h (default_translate_mode_attribute): Declare.
10468 * targhooks.c (default_translate_mode_attribute): New function.
10469 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10470 * doc/tm.texi: Regenerate.
10471 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10472 (rs6000_translate_mode_attribute): New function.
10474 2018-07-06 Paul Koning <ni1d@arrl.net>
10476 * doc/md.texi (define_split): Document DONE and FAIL.
10477 (define_peephole2): Ditto.
10479 2018-07-05 Jeff Law <law@redhat.com>
10481 PR tree-optimization/86010
10482 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10483 both the head and tail of mem* and str* calls.
10485 2018-07-05 Jim Wilson <jimw@sifive.com>
10487 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10489 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10491 * config/aarch64/aarch64-simd.md: correct flags text for
10492 MIN_EXPR replacement.
10494 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10496 * configure: Regenerated.
10498 2018-07-05 Carl Love <cel@us.ibm.com>
10500 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10501 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10502 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10503 VSX_BUILTIN_DOUBLEL_V4SF.
10505 2018-07-05 Martin Sebor <msebor@redhat.com>
10508 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10509 than its domain to compute its the upper bound of a char array.
10511 2018-07-05 Nathan Sidwell <nathan@acm.org>
10513 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10514 * doc/cpp.texi: Update comment.
10515 * doc/tm.texi: Rebuilt.
10516 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10517 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10518 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10519 headers affected by extern "C".
10520 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10521 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10522 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10523 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10524 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10525 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10526 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10527 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10528 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10529 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10530 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10531 config/sparc/sp64-elf.h, config/spu/spu.h,
10532 config/stormy16/stormy16.h, config/v850/v850.h,
10533 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10534 define NO_IMPLICIT_EXTERN_C.
10535 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10537 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10540 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10541 instead of GET_MODE_SIZE when comparing Units.
10543 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10546 * rtlanal.c (set_noop_p): Constrain on mode change,
10547 include hard-reg-set.h
10549 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10551 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10553 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10556 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10559 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10561 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10563 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10566 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10568 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10570 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10572 PR middle-end/86380
10573 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10575 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10577 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10578 neg_*_op* variables.
10580 2018-07-04 Martin Liska <mliska@suse.cz>
10582 * tree-switch-conversion.c: Define
10583 max_ratio_for_speed and max_ratio_for_size constants.
10585 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10586 Martin Liska <mliska@suse.cz>
10588 PR middle-end/66240
10591 * common.opt: Rename align options with 'str_' prefix.
10592 * common/config/i386/i386-common.c (set_malign_value): New
10594 (ix86_handle_option): Use it to set -falign-* options/
10595 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10596 type from int to string.
10597 * config/aarch64/aarch64.c: Update default values from int
10599 * config/alpha/alpha.c (alpha_override_options_after_change):
10601 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10602 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10603 max skip conditionally.
10604 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10605 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10606 max skip conditionally.
10607 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10608 max skip conditionally.
10609 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10610 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10611 max skip conditionally.
10612 * config/i386/i386.c (struct ptt): Change type from int to
10614 (ix86_default_align): Set default values.
10615 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10616 max skip conditionally.
10617 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10618 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10619 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10620 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10621 max skip conditionally.
10622 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10623 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10624 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10625 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10626 max skip conditionally.
10627 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10628 * config/ia64/ia64.c (ia64_option_override): Set default values
10629 for alignment options.
10630 * config/m68k/m68k.c: Handle new str_align_* options.
10631 * config/mips/mips.c (mips_set_compression_mode): Change
10633 (mips_option_override): Set default values for options.
10634 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10636 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10638 * config/rx/rx.c (rx_option_override): Likewise.
10639 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10640 (LABEL_ALIGN): Use align_labels_log.
10641 (LOOP_ALIGN): Use align_loops_align.
10642 * config/s390/s390.c (s390_asm_output_function_label): Use new
10644 * config/sh/sh.c (sh_override_options_after_change):
10645 Change type of constants.
10646 * config/spu/spu.c (spu_sched_init): Likewise.
10647 * config/sparc/sparc.c (sparc_option_override): Set default
10648 values for options.
10649 * config/visium/visium.c (visium_option_override): Likewise.
10650 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10651 emit p2align format with last argument if it's not needed.
10652 * doc/invoke.texi: Document extended format of -falign-*.
10653 * final.c: Use align_labels alignment.
10654 * flags.h (struct target_flag_state): Change type to use
10656 (struct align_flags_tuple): New.
10657 (struct align_flags): Likewise.
10658 (align_loops_log): Redefine macro to use new types.
10659 (align_loops_max_skip): Redefine macro to use new types.
10660 (align_jumps_log): Redefine macro to use new types.
10661 (align_jumps_max_skip): Redefine macro to use new types.
10662 (align_labels_log): Redefine macro to use new types.
10663 (align_labels_max_skip): Redefine macro to use new types.
10664 (align_functions_log): Redefine macro to use new types.
10665 (align_loops): Redefine macro to use new types.
10666 (align_jumps): Redefine macro to use new types.
10667 (align_labels): Redefine macro to use new types.
10668 (align_functions): Redefine macro to use new types.
10669 (align_functions_max_skip): Redefine macro to use new types.
10670 (align_loops_value): New macro.
10671 (align_jumps_value): New macro.
10672 (align_labels_value): New macro.
10673 (align_functions_value): New macro.
10674 * function.c (invoke_set_current_function_hook): Propagate
10675 alignment values from flags to global variables default in
10677 * ipa-icf.c (sem_function::equals_wpa): Use
10678 cl_optimization_option_eq instead of memcmp.
10679 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10681 (cl_optimization_stream_in): Likewise.
10682 * optc-save-gen.awk: Support strings in cl_optimization.
10683 * opth-gen.awk: Likewise.
10684 * opts.c (finish_options): Remove error checking of invalid
10686 (MAX_CODE_ALIGN): Remove.
10687 (MAX_CODE_ALIGN_VALUE): Likewise.
10688 (parse_and_check_align_values): New function.
10689 (check_alignment_argument): Likewise.
10690 (common_handle_option): Use check_alignment_argument.
10691 * opts.h (parse_and_check_align_values): Declare.
10692 * toplev.c (init_alignments): Remove.
10693 (read_log_maxskip): New.
10694 (parse_N_M): Likewise.
10695 (parse_alignment_opts): Likewise.
10696 (backend_init_target): Remove usage of init_alignments.
10697 * toplev.h (parse_alignment_opts): Declare.
10698 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10700 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10701 * tree.c (cl_option_hasher::equal): New.
10702 * varasm.c: Use new global macros.
10704 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10706 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10707 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10708 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10709 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10710 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10711 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10712 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10713 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10714 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10715 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10716 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10717 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10718 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10720 2018-07-04 Martin Liska <mliska@suse.cz>
10721 Jonathan Wakely <jwakely@redhat.com>
10723 * coverage.c: Use correct type.
10724 * doc/invoke.texi: Language correction.
10726 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
10729 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10730 ENDBRANCH for non-tail call which may return via indirect branch.
10731 * doc/extend.texi: Document indirect_return attribute.
10733 2018-07-03 Martin Sebor <msebor@redhat.com>
10735 PR tree-optimization/86274
10736 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10738 (format_floating): Correct handling of infinities and NaNs.
10740 2018-07-03 Martin Sebor <msebor@redhat.com>
10742 * print-tree.c (print_real_cst): New function.
10743 (print_node_brief): Call it.
10744 (print_node): Ditto.
10746 2018-07-03 Jeff Law <law@redhat.com>
10748 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10749 into a single pattern.
10751 * config/h8300/h8300.md (ors code_iterator): New.
10752 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10753 a single pattern and single splitter.
10754 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10755 (iorqi3_1, xorqi3_1): Likewise.
10756 (iorqi3, xorqi3 expanders): Similarly.
10758 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10759 (movmd_internal) into a single pattern using the P mode iterator.
10760 (movmd splitters): Similarly.
10761 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10762 (movsd splitters): Similarly.
10764 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10765 ADDB, ADDW and ADDL into a single ADD attribute which selects the
10766 right table based on the size of the operand.
10767 * config/h8300/h8300.md (length_table): Corresponding changes. All
10768 references to "addb", "addw" and "addl" changed to "add".
10769 (btst patterns): Merge two variants into a single pattern.
10770 (tstqi, tsthi): Likewise.
10771 (addhi3_incdec, addsi3_incdec): Likewise.
10772 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10773 (mulhi3, mulsi3): Likewise.
10774 (udivhi3, udivsi3): Likewise.
10775 (divhi3, divsi3): Likewise.
10776 (andorqi3, andorhi3, andorsi3): Likewise.
10778 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
10781 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10782 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10784 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10786 PR tree-optimization/85694
10787 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10788 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10790 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10791 (<u>avg<mode>3_ceil): New patterns.
10793 2018-07-03 David Malcolm <dmalcolm@redhat.com>
10795 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10796 scan-tree-dump directive.
10797 * gcc.dg/vect/slp-perm-2.c: Likewise.
10798 * gcc.dg/vect/slp-perm-3.c: Likewise.
10799 * gcc.dg/vect/slp-perm-5.c: Likewise.
10800 * gcc.dg/vect/slp-perm-6.c: Likewise.
10801 * gcc.dg/vect/slp-perm-7.c: Likewise.
10802 * gcc.dg/vect/slp-perm-8.c: Likewise.
10804 2018-07-03 Marek Polacek <polacek@redhat.com>
10806 PR middle-end/86202
10807 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10809 2018-07-03 Richard Biener <rguenther@suse.de>
10812 * tree-ssa-structalias.c (find_func_clobbers): Properly
10813 handle indirect calls.
10815 2018-07-03 Jeff Law <law@redhat.com>
10817 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10818 (shifts): New code iterator.
10819 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10820 expander. Fix HImode handling on H8/SX.
10821 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10822 (subqi3, subhi3, subsi3 expanders): Likewise.
10823 (andqi3, andhi3, andsi3 expanders): Likewise.
10824 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10825 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10826 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10827 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10828 (zero_extendqihi2, zero_extendqisi2): Likewise.
10829 (extendqihi2, extendqisi2): Likewise.
10830 (rotlqi3, rotlhi3, rotlsi3): Likewise.
10831 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10832 (rotlqi3_1, rotlhi3_1): Likewise.
10833 (logicalhi3_sn, logicalsi3_sn): Likewise.
10834 (logicalhi3, logicalsi3): Likewise.
10836 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10838 * tree-vect-patterns.c (vect_recog_rotate_pattern)
10839 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10840 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10841 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10842 type to append_pattern_def_seq instead of creating a stmt_vec_info
10844 (build_mask_conversion): Likewise. Remove vinfo argument.
10845 (vect_add_conversion_to_patterm): Likewise, renaming to...
10846 (vect_add_conversion_to_pattern): ...this.
10847 (vect_recog_mask_conversion_pattern): Update call to
10848 build_mask_conversion. Pass the vector type to
10849 append_pattern_def_seq here too.
10850 (vect_recog_gather_scatter_pattern): Update call to
10851 vect_add_conversion_to_pattern.
10853 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10855 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10856 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10857 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10858 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10859 STMT_VINFO_PATTERN_DEF_SEQ to null here.
10860 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10861 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10862 append_pattern_def_seq instead of new_pattern_def_seq.
10863 (vect_recog_divmod_pattern): Do both of the above.
10864 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10867 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10869 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10870 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10871 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10872 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10873 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10874 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10875 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10876 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10877 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10878 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10879 parameter with a single stmt_vec_info.
10880 (vect_recog_func_ptr): Likewise.
10881 (vect_recog_gather_scatter_pattern): Likewise, folding in...
10882 (vect_try_gather_scatter_pattern): ...this.
10883 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10884 the stmt_vec_info of the statement to be matched. Don't clear
10885 STMT_VINFO_RELATED_STMT.
10886 (vect_pattern_recog): Update call accordingly.
10888 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10890 PR tree-optimization/85694
10891 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10892 (uavgM3_ceil): Document new optabs.
10893 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10894 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10896 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10897 (savg_ceil_optab): New optabs.
10898 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10899 (vect_vect_recog_func_ptrs): Add it.
10900 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10901 constant directly from the associated lhs.
10903 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10905 * tree-vect-patterns.c (vect_split_statement): New function.
10906 (vect_convert_input): Use it to try to split an existing cast.
10908 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10910 * poly-int.h (print_hex): New function.
10911 * dumpfile.h (dump_dec, dump_hex): Declare.
10912 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10913 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10914 min_input_precision, operation_precision and operation_sign.
10915 * tree-vect-patterns.c (vect_get_range_info): New function.
10916 (vect_same_loop_or_bb_p, vect_single_imm_use)
10917 (vect_operation_fits_smaller_type): Delete.
10918 (vect_look_through_possible_promotion): Add an optional
10919 single_use_p parameter.
10920 (vect_recog_over_widening_pattern): Rewrite to use new
10921 stmt_vec_info infomration. Handle one operation at a time.
10922 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10923 (vect_truncatable_operation_p, vect_set_operation_type)
10924 (vect_set_min_input_precision): New functions.
10925 (vect_determine_min_output_precision_1): Likewise.
10926 (vect_determine_min_output_precision): Likewise.
10927 (vect_determine_precisions_from_range): Likewise.
10928 (vect_determine_precisions_from_users): Likewise.
10929 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10930 (vect_vect_recog_func_ptrs): Put over_widening first.
10932 (vect_pattern_recog): Call vect_determine_precisions.
10934 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
10936 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10937 statements that have been replaced by further pattern statements.
10938 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10940 2018-07-03 Richard Biener <rguenther@suse.de>
10942 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10943 always set *dt. Dump vectype in vectype overload.
10944 * dumpfile.h (dump_gimple_expr): New function.
10945 (dump_gimple_expr_loc): Likewise.
10946 * dumpfile.c (dump_gimple_expr): New function.
10947 (dump_gimple_expr_loc): Likewise.
10949 2018-07-02 Jeff Law <law@redhat.com>
10951 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10952 the H8/300, H8/300H and H8/S variants into a single pattern.
10953 (movhi_h8300, movqi_h8300hs): Similarly.
10954 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10955 (QHI mode iterator): New.
10957 * config/h8300/h8300.md: Remove trailing whitespace.
10959 2018-07-02 Jim Wilson <jimw@sifive.com>
10961 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10962 instead of emit_insn for interrupt returns.
10963 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10964 (riscv_sret, riscv_uret): Likewise.
10966 2018-07-02 David Malcolm <dmalcolm@redhat.com>
10968 * pretty-print.c (selftest::test_pp_format): Move save and restore
10969 of quotes to class auto_fix_quotes, and add an instance.
10970 * selftest.c: Include "intl.h".
10971 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10972 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10973 * selftest.h (selftest::auto_fix_quotes): New class.
10975 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
10977 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10978 (aarch64_sve_prepare_conditional_op): Remove.
10979 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10980 Allow aarch64_simd_reg_or_zero as select operand; remove
10981 the aarch64_sve_prepare_conditional_op call.
10982 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10983 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10984 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10985 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10986 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10987 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10988 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10989 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10990 and a splitters to match all of the *_any patterns.
10991 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10993 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10994 (SVE_COND_FP_BINARY_REV): Remove.
10995 (sve_int_op_rev, sve_fp_op_rev): New.
10996 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10997 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10998 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10999 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11000 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11001 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11002 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11003 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11004 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11006 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11007 Remove match_dup 1 from the inner unspec.
11008 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11010 * config/aarch64/aarch64.md (movprfx): New attr.
11011 (length): Default movprfx to 8.
11012 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11013 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11014 (*<su>mul<SVE_I>3_highpart): Likewise.
11015 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11016 (*v<ASHIFT><SVE_I>3): Likewise.
11017 (*<su><MAXMIN><SVE_I>3): Likewise.
11018 (*<su><MAXMIN><SVE_F>3): Likewise.
11019 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11020 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11021 (*div<SVE_F>4): Likewise.
11023 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11025 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11028 2018-07-02 Richard Biener <rguenther@suse.de>
11030 PR tree-optimization/86363
11031 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11032 memset argument refers to a non-variable address.
11034 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11036 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11037 {PLUS,MINUS}_EXPR code to...
11038 (adjust_symbolic_bound): ...here,
11039 (combine_bound): ...here,
11040 (set_value_range_with_overflow): ...and here.
11042 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11044 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11046 (extract_range_from_abs_expr): ...here.
11048 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11050 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11051 -fno-omit-frame-pointer when not optimizing.
11053 2018-07-02 Martin Liska <mliska@suse.cz>
11056 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11057 (propagate_nothrow): Likewise.
11059 2018-07-02 Martin Liska <mliska@suse.cz>
11062 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11064 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11066 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11067 function in r262149, changing "loc" param from source_location to
11068 const dump_location_t &.
11069 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11070 declaration, as above.
11072 2018-07-01 Paul Koning <ni1d@arrl.net>
11074 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11075 -munit-asm, -mgnu-asm, -mdec-asm.
11076 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11077 (pdp11_output_labelref): New.
11078 (pdp11_output_def): New.
11079 (pdp11_output_addr_vec_elt): New.
11080 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11081 %# and %@ format codes.
11082 (pdp11_option_override): New.
11083 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11084 (pdp11_output_ident): New.
11085 (pdp11_asm_named_section): New.
11086 (pdp11_asm_init_sections): New.
11087 (pdp11_file_start): New.
11088 (pdp11_file_end): New.
11089 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11090 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11091 %o, like %c but octal.
11092 (pdp11_option_override): New.
11093 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11095 (DATA_SECTION_ASM_OP): Ditto.
11096 (READONLY_DATA_SECTION_ASM_OP): New.
11097 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11098 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11099 (ASM_OUTPUT_LABELREF): Ditto.
11100 (ASM_OUTPUT_DEF): Ditto.
11101 (ASM_OUTPUT_EXTERNAL): New.
11102 (ASM_OUTPUT_SOURCE_FILENAME): New.
11103 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11104 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11105 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11106 %# and %@ format codes.
11107 * config/pdp11/pdp11.opt (mgnu-asm): New.
11108 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11109 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11110 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11112 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11114 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11115 dereferencing path[] beyond its length.
11117 (debug_all_paths): New.
11118 (rewire_first_differing_edge): New.
11119 (adjust_paths_after_duplication): New.
11120 (duplicate_thread_path): Call adjust_paths_after_duplication.
11122 (thread_through_all_blocks): Add new argument to
11123 duplicate_thread_path.
11125 2018-06-30 Jim Wilson <jimw@sifive.com>
11127 * config/riscv/predicates.md (p2m1_shift_operand): New.
11128 (high_mask_shift_operand): New.
11129 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11130 pattern using p2m1_shift_operand.
11131 (lshsi3_zero_extend_3+2): New combiner pattern using
11132 high_mask_shift_operand.
11134 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11136 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11138 (vect_recog_rotate_pattern): ...here.
11139 (vect_convert_input): Try to insert casts of invariants in the
11141 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11142 preheader to be empty.
11144 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11146 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11147 vector type. If given, install it in the new statement's
11148 STMT_VINFO_VECTYPE.
11149 (vect_element_precision): New function.
11150 (vect_unpromoted_value): New struct.
11151 (vect_unpromoted_value::vect_unpromoted_value): New function.
11152 (vect_unpromoted_value::set_op): Likewise.
11153 (vect_look_through_possible_promotion): Likewise.
11154 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11155 (vect_widened_op_tree, vect_convert_input): Likewise.
11156 (vect_convert_inputs, vect_convert_output): Likewise.
11157 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11158 to handle the optional cast of the multiplication result and
11159 vect_widened_op_tree to detect the widened multiplication itself.
11160 Do not require the input and output of promotion casts to have
11161 the same sign, but base the signedness of the operation on the
11162 input rather than the result. If the pattern includes two
11163 promotions, check that those promotions have the same sign.
11164 Do not restrict the MULT_EXPR handling to a double-width result;
11165 handle quadruple-width results and wider. Use vect_convert_inputs
11166 to convert the inputs to the common type.
11167 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11168 to handle the optional cast of the ABS result. Also allow a sign
11169 change or a sign extension between the ABS and MINUS.
11170 Use vect_widened_op_tree to detect the widened subtraction and use
11171 vect_convert_inputs to convert the inputs to the common type.
11172 (vect_handle_widen_op_by_const): Delete.
11173 (vect_recog_widen_op_pattern): New function.
11174 (vect_recog_widen_mult_pattern): Use it.
11175 (vect_recog_widen_shift_pattern): Likewise.
11176 (vect_recog_widen_sum_pattern): Use
11177 vect_look_through_possible_promotion to handle the promoted
11180 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11182 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11183 the containing gimple_seq *.
11184 * gimple-iterator.h (gsi_for_stmt): Declare it.
11185 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11186 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11187 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11188 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11189 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11191 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11193 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11194 statement being replaced is part of an existing pattern
11195 definition sequence, inserting the new pattern statements before
11197 (vect_pattern_recog_1): Don't return a bool. If the statement
11198 is already part of a pattern, instead apply pattern matching
11199 to the pattern definition statements. Don't clear the
11200 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11201 (vect_pattern_recog): Don't break after the first match;
11202 continue processing the pattern definition statements instead.
11203 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11205 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11207 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11208 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11209 (vect_recog_widen_sum_pattern): Use it.
11211 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11213 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11214 phi is not a pattern statement and has not been replaced by
11215 a pattern statement.
11216 * tree-vect-patterns.c (type_conversion_p): Don't check
11217 STMT_VINFO_IN_PATTERN_P.
11218 (vect_recog_vector_vector_shift_pattern): Likewise.
11219 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11220 the pattern statement rather than the original statement; check
11221 directly for a WIDEN_MULT_EXPR here.
11222 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11223 vect_is_simple_use to return the pattern statement rather
11224 than the original statement; use is_pattern_stmt_p to check
11225 for such a pattern statement.
11226 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11227 to return the pattern statement rather than the original statement;
11228 don't do the same transformation here.
11229 (vect_is_simple_use): If the defining statement has been replaced
11230 by a pattern statement, return the pattern statement instead.
11231 Remove the corresponding (local) transformation from the vectype
11234 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11236 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11237 end and default to null.
11238 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11239 (vectorizable_reduction): Update calls accordingly, dropping the
11240 gimple ** argument if the passed-back statement isn't needed.
11241 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11242 (vect_recog_rotate_pattern): Likewise.
11243 (vect_recog_mask_conversion_pattern): Likewise.
11244 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11245 (vect_mask_constant_operand_p): Likewise.
11246 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11247 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11248 (get_group_load_store_type, get_load_store_type): Likewise.
11249 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11250 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11251 (vectorizable_conversion, vectorizable_assignment): Likewise.
11252 (vectorizable_shift, vectorizable_operation): Likewise.
11253 (vectorizable_store, vect_is_simple_cond): Likewise.
11254 (vectorizable_condition, vectorizable_comparison): Likewise.
11255 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11256 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11257 and move it to the end. Cope with null def_stmt_outs.
11259 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11261 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11263 2018-06-29 Jeff Law <law@redhat.com>
11265 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11266 displacements for TARGET_V850E2V3 and newer.
11267 (TARGET_LRA_P): Remove. Defaults to LRA now.
11268 * config/v850/v850.md (sign23byte_load): Remove.
11269 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11270 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11272 2018-06-29 Martin Liska <mliska@suse.cz>
11275 * coverage.c (coverage_init): Mangle full path name.
11276 * doc/invoke.texi: Document the change.
11277 * gcov-io.c (mangle_path): New.
11278 * gcov-io.h (mangle_path): Likewise.
11279 * gcov.c (mangle_name): Use mangle_path for path mangling.
11281 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11283 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11284 if starting source register is not even.
11286 2018-06-29 Martin Liska <mliska@suse.cz>
11288 PR tree-optimization/86263
11289 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11290 Make edge redirection.
11292 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11294 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11295 (dump_scope_depth): New variable.
11296 (get_dump_scope_depth): New function.
11297 (dump_begin_scope): New function.
11298 (dump_end_scope): New function.
11299 * dumpfile.h (get_dump_scope_depth): New declaration.
11300 (dump_begin_scope): New declaration.
11301 (dump_end_scope): New declaration.
11302 (class auto_dump_scope): New class.
11303 (AUTO_DUMP_SCOPE): New macro.
11304 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11307 2018-06-29 Richard Biener <rguenther@suse.de>
11309 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11310 compute_all_dependences succeeds.
11311 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11312 exceed --param loop-max-datarefs-for-datadeps.
11314 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11316 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11318 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11321 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11322 alternative 0 in preferred_for_speed attribute.
11324 2018-06-28 Paul Koning <ni1d@arrl.net>
11326 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11327 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11328 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11329 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11330 for shift insn patterns.
11332 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11334 * cgraph.c (cgraph_node::get_body): Replace assignments to
11335 "dump_file" with calls to set_dump_file.
11336 * dumpfile.c (alt_dump_file): Make static, and group with...
11337 (alt_flags): ...this definition.
11338 (dumps_are_enabled): New variable.
11339 (refresh_dumps_are_enabled): New function.
11340 (set_dump_file): New function.
11341 (set_alt_dump_file): New function.
11342 (gcc::dump_manager::dump_start): Replace assignments to
11343 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11345 (gcc::dump_manager::dump_finish): Likewise.
11346 * dumpfile.h (alt_dump_file): Delete decl.
11347 (dumps_are_enabled): New variable decl.
11348 (set_dump_file): New function decl.
11349 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11351 * tree-nested.c (lower_nested_functions): Replace assignments to
11352 "dump_file" with calls to set_dump_file.
11354 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11356 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11357 goto_locus of each outgoing edge of each basic block.
11359 2018-06-28 Richard Biener <rguenther@suse.de>
11361 * dwarf2out.c (decl_scope_table): Remove.
11362 (push_decl_scope): Likewise.
11363 (pop_decl_scope): Likewise.
11364 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11365 (gen_struct_or_union_type_die): Likewise.
11366 (gen_tagged_type_die): Likewise.
11367 (dwarf2out_init): Do not initialize decl_scope_table.
11368 (dwarf2out_c_finalize): Do not free it.
11370 2018-06-28 Richard Biener <rguenther@suse.de>
11372 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11373 deciding whether to not re-use a DIE.
11375 2018-06-28 Richard Biener <rguenther@suse.de>
11377 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11378 DW_AT_abstract_origin attribute.
11380 2018-06-28 Martin Liska <mliska@suse.cz>
11382 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11383 Use newly introduced constants.
11384 * tree-switch-conversion.h (struct jump_table_cluster):
11385 Define max_ratio_for_size and max_ratio_for_speed.
11387 2018-06-28 Martin Liska <mliska@suse.cz>
11389 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11390 Add new checking assert to catch invalid state.
11391 (jump_table_cluster::can_be_handled): Handle single case
11393 (jump_table_cluster::is_beneficial): Bail out for such case.
11394 (bit_test_cluster::find_bit_tests):
11395 Add new checking assert to catch invalid state.
11396 (bit_test_cluster::can_be_handled): Handle single case
11398 (bit_test_cluster::is_beneficial): Bail out for such case.
11399 (switch_decision_tree::analyze_switch_statement):
11402 2018-06-28 Martin Liska <mliska@suse.cz>
11404 * common.opt: Introduce -completion option.
11405 * gcc.c (driver_handle_option): Handle it.
11406 (driver::main): Print completions if completion
11408 * opt-suggestions.c (option_proposer::get_completions):
11410 (option_proposer::suggest_completion): Likewise.
11411 (option_proposer::find_param_completions): Likewise.
11412 (verify_autocompletions): Likewise.
11413 (test_completion_valid_options): Likewise.
11414 (test_completion_valid_params): Likewise.
11415 (in_completion_p): Likewise.
11416 (empty_completion_p): Likewise.
11417 (test_completion_partial_match): Likewise.
11418 (test_completion_garbage): Likewise.
11419 (opt_proposer_c_tests): Likewise.
11420 * opt-suggestions.h: Declare new functions.
11421 * opts.c (common_handle_option): Handle OPT__completion_.
11422 * selftest-run-tests.c (selftest::run_tests): Add
11423 opt_proposer_c_tests.
11424 * selftest.c (assert_str_startswith): New.
11425 * selftest.h (assert_str_startswith): Likewise.
11426 (opt_proposer_c_tests): New.
11427 (ASSERT_STR_STARTSWITH): Likewise.
11429 2018-06-28 Martin Liska <mliska@suse.cz>
11431 * Makefile.in: Add opt-suggestions.o.
11432 * gcc-main.c: Include opt-suggestions.h.
11433 * gcc.c (driver::driver): Likewise.
11434 (driver::~driver): Remove m_option_suggestions.
11435 (driver::build_option_suggestions): Moved to option_proposer.
11436 (driver::suggest_option): Likewise.
11437 (driver::handle_unrecognized_options): Use option_proposer.
11438 * gcc.h (class driver): Add new memver m_option_proposer.
11439 * opt-suggestions.c: New file.
11440 * opt-suggestions.h: New file.
11442 2018-06-28 Martin Liska <mliska@suse.cz>
11444 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11445 (auto_string_vec::~auto_string_vec): Likewise.
11447 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11449 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11450 prevent_decl_creation_for_types fields up and add reset_location field.
11451 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11452 statement if id->reset_location is true.
11453 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11454 id->reset_location is true.
11455 (copy_phis_for_bb): Force input_location on the arguments if
11456 id->reset_location is true.
11457 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11458 is set on the function to be inlined.
11460 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11462 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11464 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11466 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11467 registers for Pmode.
11468 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11469 hard registers for the clobbered pseudo.
11471 2018-06-27 Paul Koning <ni1d@arrl.net>
11473 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11474 mutually exclusive options.
11475 * config/pdp11/constraints.md (h): New constraint.
11476 (O): Update definition to match shift code generation.
11477 (D): New constraint.
11478 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11480 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11482 (output_jump): Change arguments.
11483 (pdp11_fixed_cc_regs): New function.
11484 (pdp11_cc_mode): Ditto.
11485 (pdp11_expand_shift): Ditto.
11486 (pdp11_assemble_shift): Ditto.
11487 (pdp11_small_shift): Ditto.
11488 (pdp11_branch_cost): Remove.
11489 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11491 (pdp11_register_move_cost): Update for CC registers.
11492 (pdp11_rtx_costs): Add case for LSHIFTRT.
11493 (pdp11_output_jump): Add CCNZ mode conditional branches.
11494 (notice_update_cc_on_set): Remove.
11495 (pdp11_cc_mode): New function.
11496 (simple_memory_operand): Correct pre/post decrement case.
11497 (no_side_effect_operand): New function.
11498 (pdp11_regno_reg_class): Add CC_REGS class.
11499 (pdp11_fixed_cc_regs): New function.
11500 (pdp11_small_shift): New function.
11501 (pdp11_expand_shift): New function to expand shift insns.
11502 (pdp11_assemble_shift): New function to output shifts.
11503 (pdp11_branch_cost): Remove.
11504 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11505 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11506 (WCHAR_TYPE): Ditto.
11507 (PTRDIFF_TYPE): Ditto.
11508 (ADJUST_INSN_LENGTH): New macro.
11509 (FIXED_REGISTERS): Add CC registers.
11510 (CALL_USED_REGISTERS): Ditto.
11511 (reg_class): Ditto.
11512 (REG_CLASS_NAMES): Ditto.
11513 (REG_CLASS_CONTENTS): Ditto.
11514 (SELECT_CC_MODE): Use new function.
11515 (TARGET_FLAGS_REGNUM): New macro.
11516 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11517 (cc0_reg_rtx): Remove.
11518 (CC_STATUS_MDEP): Remove.
11519 (CC_STATUS_MDEFP_INIT): Remove.
11520 (CC_IN_FPU): Remove.
11521 (NOTICE_UPDATE_CC): Remove.
11522 (REGISTER_NAMES): Add CC registers.
11523 (BRANCH_COST): Change to constant 1.
11524 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11526 * config/pdp11/pdp11.opt (mbcopy): Remove.
11527 (mbcopy-builtin): Remove.
11528 (mbranch-cheap): Remove.
11529 (mbranch-expensive): Remove.
11530 * config/pdp11/predicates.md (expand_shift_operand): Update to
11531 match shift code generation.
11532 (ccnz_operator): New predicate.
11533 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11534 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11535 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11537 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11538 description of O constraint.
11540 2018-06-27 Jeff Law <law@redhat.com>
11541 Austin Law <austinklaw@gmail.com>
11543 * config/v850/v850.md (addsi3_set_flags): New pattern.
11544 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11545 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11546 (zero_extendhisi2_v850_set_flags): Likewise.
11547 (zero_extendqisi2_v850_set_flags): Likewise.
11548 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11549 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11550 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11552 * config/v850/v850-protos.h (notice_update_cc): Remove.
11553 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11554 (v850_print_operand): Handle 'D' and "d".
11555 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11556 Add handling of arithmetic/logical operations compared against zero.
11557 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11558 Do not look at v850_compare_op, instead get mode from last argument.
11559 (v850_gen_compare): Remove
11560 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11561 after reload for prologue insns.
11562 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11564 (construct_save_jarl): Likewise.
11565 (TARGET_FLAGS_REGNUM): Define.
11566 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11567 (NOTICE_UPDATE_CC): Remove.
11568 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11569 than cc0. Conditionalize on reload_completed.
11570 (cmpsi_insn, setfcc_insn): Likewise.
11571 (tst1 splitter): Turn into define_and_split which sets the flags
11573 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11574 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11575 (cstoresf4, cstoredf4): Clobber the flags.
11576 (cmpsi, cmpsf, cmpdf): Remove expanders.
11577 (setf_insn): Remove pattern.
11578 (addsi3): Turn into define_and_split which clobbers the flags after
11579 reload and a suitable pattern (addsi3_clobber_flags) for use after
11581 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11582 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11583 (ashrsi3, ashrsi3_v850e2): Likewise.
11584 (bins): Clobber the flags.
11585 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11586 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11587 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11588 (call_value_internal_short, call_value_internal_long): Likewise.
11589 (callt_save_interrupt, callt_return_interrupt): Likewise.
11590 (save_interrupt, return_interrupt): Likewise.
11591 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11592 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11593 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11594 (All FP comparisons): Only allow after reload has completed.
11596 (divh, divhu): Tweak output template.
11597 (branch_z_normal, branch_z_invert): Remove
11598 (branch_nz_normal, branch_nz_invert): Likewise.
11599 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11601 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11602 * config/v850/v850.c (notice_update_cc): Remove.
11603 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11604 (CC_NO_CARRY): Likewise.
11605 (NOTICE_UPDATE_CC): Define to nothing.
11606 * config/v850/v850.md: Remove block comment on cc0 handling
11607 Remove "cc" attribute from all patterns. Remove cc_status handling
11608 from all patterns. Minor formatting fixes.
11610 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11612 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11613 (cortex-a76.cortex-a55): Likewise.
11614 * config/aarch64/aarch64-tune.md: Regenerate.
11615 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11616 cortex-a76.cortex-a55.
11618 2018-06-27 Jeff Law <law@redhat.com>
11620 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11621 (MULTILIB_DIRNAMES): Similarly.
11623 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11625 * gimple.h (gimple_return_retbnd): Delete.
11626 (gimple_return_set_retbnd): Likewise.
11627 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11628 gimple_return_set_retbnd.
11629 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11630 gimple_return_retbnd and adjust.
11631 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11632 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11633 Explicitly return NULL in a couple more cases. Move assertion
11634 on debug statements and remove unreachable code.
11635 (reset_debug_binding): Do not test id->retbnd.
11636 (expand_call_inline): Do not set it.
11638 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11640 * configure.ac: Add --disable-gcov option.
11641 * configure: Regenerate.
11642 * Makefile.in: Honour @enable_gcov@.
11643 * doc/install.texi: Document --disable-gcov.
11645 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11647 * config/arm/arm-cpus.in (cortex-a76): New entry.
11648 (cortex-a76.cortex-a55): Likewise.
11649 * config/arm/arm-tables.opt: Regenerate.
11650 * config/arm/arm-tune.md: Likewise.
11651 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11652 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11653 cortex-a76.cortex-a55.
11655 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11658 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11660 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11662 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11664 (EPILOGUE_USES): Likewise.
11666 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11668 * tree-inline.c (remap_location): New function extracted from...
11669 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11670 (copy_phis_for_bb): ...here. Call remap_location.
11671 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11673 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11675 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11676 unaligned vsx for 16B memset.
11678 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11681 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11682 ieee128_float_type_node to long_double_type_node unless
11683 TARGET_LONG_DOUBLE_128 is set.
11685 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11687 * cfgloop.c (get_loop_location): Convert return type from
11688 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11689 by implicit construction from rtx_insn *, and using
11690 dump_user_location_t::from_function_decl for the fallback case.
11691 * cfgloop.h (get_loop_location): Convert return type from
11692 location_t to dump_user_location_t.
11693 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11694 dump_printf_loc to pass in a dump_location_t rather than a
11695 location_t, via the gimple stmt.
11696 * coverage.c (get_coverage_counts): Update calls to
11697 dump_printf_loc to pass in dump_location_t rather than a
11699 * doc/optinfo.texi (Dump types): Convert example of
11700 dump_printf_loc from taking "locus" to taking "insn". Update
11701 description of the "_loc" calls to cover dump_location_t.
11702 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11704 (dump_user_location_t::dump_user_location_t): New constructors,
11705 from gimple *stmt and rtx_insn *.
11706 (dump_user_location_t::from_function_decl): New function.
11707 (dump_loc): Make static.
11708 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11709 const dump_location_t &.
11710 (dump_generic_expr_loc): Delete.
11711 (dump_printf_loc): Convert param "loc" from location_t to
11712 const dump_location_t &.
11713 (selftest::test_impl_location): New function.
11714 (selftest::dumpfile_c_tests): New function.
11715 * dumpfile.h: Include "profile-count.h".
11716 (class dump_user_location_t): New class.
11717 (struct dump_impl_location_t): New struct.
11718 (class dump_location_t): New class.
11719 (dump_printf_loc): Convert 2nd param from source_location to
11720 const dump_location_t &.
11721 (dump_generic_expr_loc): Delete.
11722 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11723 const dump_location_t &.
11724 * gimple-fold.c (fold_gimple_assign): Update call to
11725 dump_printf_loc to pass in a dump_location_t rather than a
11726 location_t, via the gimple stmt.
11727 (gimple_fold_call): Likewise.
11728 * gimple-loop-interchange.cc
11729 (loop_cand::analyze_iloop_reduction_var): Update for change to
11730 check_reduction_path.
11731 (tree_loop_interchange::interchange): Update for change to
11732 find_loop_location.
11733 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11734 change in return-type of find_loop_location.
11735 (graphite_regenerate_ast_isl): Likewise.
11736 * graphite-optimize-isl.c (optimize_isl): Likewise.
11737 * graphite.c (graphite_transform_loops): Likewise.
11738 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11739 pass in a dump_location_t rather than a location_t, via the
11741 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11742 * ipa.c (walk_polymorphic_call_targets): Likewise.
11743 * loop-unroll.c (report_unroll): Convert "locus" param from
11744 location_t to dump_location_t.
11745 (decide_unrolling): Update for change to get_loop_location's
11747 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11748 location_t to dump_user_location_t.
11749 (grid_find_single_omp_among_assignments_1): Updates calls to
11750 dump_printf_loc to pass in a dump_location_t rather than a
11751 location_t, via the gimple stmt.
11752 (grid_parallel_clauses_gridifiable): Convert "tloc" from
11753 location_t to dump_location_t. Updates calls to dump_printf_loc
11754 to pass in a dump_location_t rather than a location_t, via the
11756 (grid_inner_loop_gridifiable_p): Likewise.
11757 (grid_dist_follows_simple_pattern): Likewise.
11758 (grid_gfor_follows_tiling_pattern): Likewise.
11759 (grid_target_follows_gridifiable_pattern): Likewise.
11760 (grid_attempt_target_gridification): Convert initialization
11761 of local "grid" from memset to zero-initialization; FIXME: does
11762 this require C++11? Update call to dump_printf_loc to pass in a
11763 optinfo_location rather than a location_t, via the gimple stmt.
11764 * profile.c (read_profile_edge_counts): Updates call to
11765 dump_printf_loc to pass in a dump_location_t rather than a
11767 (compute_branch_probabilities): Likewise.
11768 * selftest-run-tests.c (selftest::run_tests): Call
11770 * selftest.h (dumpfile_c_tests): New decl.
11771 * tree-loop-distribution.c (pass_loop_distribution::execute):
11772 Update for change in return type of find_loop_location.
11773 * tree-parloops.c (parallelize_loops): Likewise.
11774 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11775 "locus" from location_t to dump_user_location_t.
11776 (canonicalize_loop_induction_variables): Likewise.
11777 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11778 for change in return type of find_loop_location.
11779 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11780 to dump_printf_loc to pass in a dump_location_t rather than a
11781 location_t, via the stmt.
11782 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11784 * tree-vect-loop-manip.c (find_loop_location): Convert return
11785 type from source_location to dump_user_location_t.
11786 (vect_do_peeling): Update for above change.
11787 (vect_loop_versioning): Update for change in type of
11789 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11790 from location_t to dump_user_location_t.
11791 (vect_estimate_min_profitable_iters): Update for change in type
11793 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11794 location_t to dump_location_t.
11795 (vect_slp_bb): Update for change in type of vect_location.
11796 * tree-vectorizer.c (vect_location): Convert from source_location
11797 to dump_user_location_t.
11798 (try_vectorize_loop_1): Update for change in vect_location's type.
11799 (vectorize_loops): Likewise.
11800 (increase_alignment): Likewise.
11801 * tree-vectorizer.h (vect_location): Convert from source_location
11802 to dump_user_location_t.
11803 (find_loop_location): Convert return type from source_location to
11804 dump_user_location_t.
11805 (check_reduction_path): Convert 1st param from location_t to
11806 dump_user_location_t.
11807 * value-prof.c (check_counter): Update call to dump_printf_loc to
11808 pass in a dump_user_location_t rather than a location_t; update
11809 call to error_at for change in type of "locus".
11810 (check_ic_target): Update call to dump_printf_loc to
11811 pass in a dump_user_location_t rather than a location_t, via the
11814 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
11816 * config/s390/s390.h (enum processor_flags): Do not use
11817 default tune parameter when -march was specified.
11819 2018-06-26 Jakub Jelinek <jakub@redhat.com>
11822 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11823 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11826 2018-06-26 Richard Biener <rguenther@suse.de>
11828 PR tree-optimization/86287
11830 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11831 (vect_analyze_loop): Initialize n_stmts.
11833 2018-06-26 Richard Biener <rguenther@suse.de>
11835 PR middle-end/86271
11836 * fold-const.c (fold_convertible_p): Pointer extension
11839 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
11842 * dwarf2out.c (loc_list_has_views): Adjust comments.
11843 (dw_loc_list): Split single cross-partition range with
11846 2018-06-25 Jeff Law <law@redhat.com>
11848 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11849 on -mbig-switch by default.
11851 * config/v850/predicates.md (const_float_1_operand): Fix match_code
11853 (const_float_0_operand): Remove unused predicate.
11854 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11855 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11856 (recipsf2): New expander. Original pattern now called
11858 (recipdf2, recipdf2_insn): Similarly.
11859 (rsqrtsf2, rsqrtsf2_insn): Similarly
11860 (rsqrtdf2, rsqrtdf2_insn): Similarly
11862 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
11864 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11865 Simplify logic for FreeBSD (twice).
11867 2018-06-25 Martin Sebor <msebor@redhat.com>
11869 PR tree-optimization/86204
11870 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11871 a strnlen result if it's less than the length of the string.
11873 2018-06-25 Martin Sebor <msebor@redhat.com>
11875 PR tree-optimization/85700
11876 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11877 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11878 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11880 2018-06-25 Martin Sebor <msebor@redhat.com>
11882 * doc/extend.texi (Zero-length arrays): Update and clarify.
11884 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
11886 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11887 added IEEE/IBM long double multilib support on PowerPC little
11888 endian Linux systems.
11889 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11890 (MULTILIB_DEFAULTS): Likewise.
11891 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11893 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11894 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11895 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11897 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
11899 PR middle-end/86311
11900 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11901 (REORDER_45): Likewise.
11903 2018-06-25 Jeff Law <law@redhat.com>
11905 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11906 dividend to 32 bits. Adjust length.
11907 (udivmodhi4): Cleanup output template. Fix length.
11909 2018-06-25 Carl Love <cel@us.ibm.com>
11911 * config/rs6000/vsx.md: Change word selector to prefered location.
11913 2018-06-25 Richard Biener <rguenther@suse.de>
11915 PR tree-optimization/86304
11916 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11917 epilogue-if-converted loops as well.
11919 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
11921 * lto-section-out.c (lto_begin_section): Do not print section
11922 name for noaddr and unnumbered dumps.
11924 2018-06-25 Richard Biener <rguenther@suse.de>
11926 * tree-vectorizer.h (struct vec_info_shared): New structure
11927 with parts split out from struct vec_info and loop_nest from
11928 struct _loop_vec_info.
11929 (struct vec_info): Adjust accordingly.
11930 (struct _loop_vec_info): Likewise.
11931 (LOOP_VINFO_LOOP_NEST): Adjust.
11932 (LOOP_VINFO_DATAREFS): Likewise.
11933 (LOOP_VINFO_DDRS): Likewise.
11934 (struct _bb_vec_info): Likewise.
11935 (BB_VINFO_DATAREFS): Likewise.
11936 (BB_VINFO_DDRS): Likewise.
11937 (struct _stmt_vec_info): Add dr_aux member.
11938 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11939 (DR_MISALIGNMENT_UNINITIALIZED): New.
11940 (set_dr_misalignment): Adjust.
11941 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11942 (vect_analyze_loop): Adjust prototype.
11943 (vect_analyze_loop_form): Likewise.
11944 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11945 Compute dependences lazily.
11946 (vect_record_base_alignments): Use shared datarefs/ddrs.
11947 (vect_verify_datarefs_alignment): Likewise.
11948 (vect_analyze_data_refs_alignment): Likewise.
11949 (vect_analyze_data_ref_accesses): Likewise.
11950 (vect_analyze_data_refs): Likewise.
11951 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11952 constructor parameter for shared part.
11953 (vect_analyze_loop_form): Pass in shared part and adjust.
11954 (vect_analyze_loop_2): Pass in storage for the number of
11955 stmts. Move loop nest finding to the caller. Compute
11957 (vect_analyze_loop): Pass in shared part.
11958 (vect_transform_loop): Verify shared datarefs are unchanged.
11959 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11960 constructor parameter for shared part.
11961 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11962 (vect_slp_bb): Verify shared datarefs are unchanged before
11964 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11966 (new_stmt_vec_info): Initialize DR_AUX misalignment to
11967 DR_MISALIGNMENT_UNINITIALIZED.
11968 * tree-vectorizer.c (vec_info::vec_info): Add constructor
11969 parameter for shared part.
11970 (vec_info::~vec_info): Adjust.
11971 (vec_info_shared::vec_info_shared): New.
11972 (vec_info_shared::~vec_info_shared): Likewise.
11973 (vec_info_shared::save_datarefs): Likewise.
11974 (vec_info_shared::check_datarefs): Likewise.
11975 (try_vectorize_loop_1): Construct shared part live for analyses
11976 of a single loop for multiple vector sizes.
11977 * tree-parloops.c (gather_scalar_reductions): Adjust.
11979 2018-06-25 Richard Biener <rguenther@suse.de>
11981 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11982 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11983 (vect_analyze_data_refs): Remove similar code from here and
11984 simplify accordingly.
11986 2018-06-25 Richard Biener <rguenther@suse.de>
11988 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11989 for reverse storage order accesses rather than asserting
11990 they cannot happen here.
11992 2018-06-25 Tom de Vries <tdevries@suse.de>
11995 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11996 Use data16 instead of .byte for insn prefix.
11998 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12001 * parser.c (make_char_string_pack): Pass this literal chars
12002 through cpp_interpret_string.
12003 (cp_parser_userdef_numeric_literal): Check the result of
12004 make_char_string_pack.
12006 2018-06-24 Maya Rashish <coypu@sdf.org>
12008 * ginclude/stddef.h: Simplify conditions around avoiding
12009 re-definition of __size_t.
12011 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12013 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12014 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12016 2018-06-22 Maya Rashish <coypu@sdf.org>
12018 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12019 made to OpenBSD and NetBSD through the years.
12021 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12023 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12024 behavior of vec_pack (vector double, vector double) to match
12025 behavior of vec_float2 (vector double, vector double).
12027 2018-06-22 Olivier Hainque <hainque@adacore.com>
12029 * gimplify.c (gimplify_function_tree): Prevent creation
12030 of a trampoline for the address of the current function
12031 passed to entry/exit instrumentation hooks.
12033 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12036 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12039 2018-06-22 Martin Liska <mliska@suse.cz>
12041 PR tree-optimization/86263
12042 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12043 Bail out if is_enabled is false.
12044 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12046 (jump_table_cluster::is_enabled): New function.
12048 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12050 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12051 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12052 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12053 (lto_input_ts_binfo_tree_pointers): Likewise.
12054 * tree-streamer-out.c (streamer_write_tree_bitfields,
12055 write_ts_binfo_tree_pointers): Likewise.
12056 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12058 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12060 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12062 2018-06-22 Martin Liska <mliska@suse.cz>
12064 * symbol-summary.h (get): Make it pure and inline move
12065 functionality from ::get function.
12066 (get): Remove and inline into ::get and ::get_create.
12067 (get_create): Move code from ::get function.
12069 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12072 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12073 -x assembler-with-cpp.
12075 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12077 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12078 _FILE_OFFSET_BITS=64 for C++.
12080 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12082 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12083 conversion insn that shows up when pr85657-3.c is compiled using
12084 IEEE 128-bit long double.
12085 (neg<mode>2_internal): Use the correct mode to check whether the
12086 mode is IBM extended.
12087 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12088 multiply and divide external functions from being created more
12091 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12093 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12095 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12096 the edge can be forwarded.
12097 (cfg_layout_merge_blocks): Likewise.
12099 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12101 * except.c (finish_eh_generation): Commit edge insertions only after
12102 the EH edges have been redirected from post-landing to landing pads.
12104 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12106 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12107 create_tmp_var_for to create the FRAME decl.
12108 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12110 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12112 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12113 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12114 debug statement when resetting its value.
12115 (expand_call_inline): Copy the locus of the call onto the assignment
12116 of the return value, if any. Use local variable in more cases.
12118 2018-06-21 Martin Liska <mliska@suse.cz>
12120 * ipa-pure-const.c (propagate_nothrow): Use
12121 funct_state_summaries->get.
12122 (dump_malloc_lattice): Likewise.
12123 (propagate_malloc): Likewise.
12125 2018-06-21 Richard Biener <rguenther@suse.de>
12127 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12128 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12129 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12131 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12132 BLOCK_ABSTRACT_ORIGIN unconditionally.
12134 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12136 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12138 * ipa-reference.c (ipa_reference_c_finalize): Delete
12139 ipa_ref_opt_sum_summaries and set it to NULL.
12141 2018-06-21 Tom de Vries <tdevries@suse.de>
12143 PR tree-optimization/85859
12144 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12145 test with comment from bb_no_side_effects_p.
12147 2018-06-21 Richard Biener <rguenther@suse.de>
12149 PR tree-optimization/86232
12150 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12151 max for constant niter.
12153 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12155 * config/aarch64/aarch64-simd.md
12156 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12158 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12160 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12161 Make opernads of the unspec commutative.
12163 2018-06-21 Richard Biener <rguenther@suse.de>
12165 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12166 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12167 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12168 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12170 (vect_record_base_alignments): Do not record base alignment
12171 for gathers or scatters.
12172 (vect_compute_data_ref_alignment): Drop return value that is always
12173 true. Bail out early for gathers or scatters.
12174 (vect_enhance_data_refs_alignment): Bail out early for gathers
12176 (vect_find_same_alignment_drs): Likewise.
12177 (vect_analyze_data_refs_alignment): Remove dead code.
12178 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12179 (vect_analyze_data_refs): For possible gathers or scatters do
12180 not create an alternate DR, just check their possible validity
12181 and mark them. Adjust DECL_NONALIASED handling to not rely
12182 on DR_BASE_ADDRESS.
12183 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12184 update inits of gathers or scatters.
12185 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12186 Also copy gather/scatter flag to pattern vinfo.
12188 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12190 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12191 behavior of vec_packsu (vector unsigned long long, vector unsigned
12192 long long) to match behavior of vec_packs with same signature.
12194 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12195 Thomas Schwinge <thomas@codesourcery.com>
12196 Cesar Philippidis <cesar@codesourcery.com>
12198 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12199 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12200 (gimplify_adjust_omp_clauses): Likewise.
12201 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12202 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12203 (gimplify_omp_target_update): Update handling of acc update and
12205 * omp-low.c (install_var_field): Remove unused parameter
12206 base_pointers_restrict.
12207 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12208 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12210 (omp_target_base_pointers_restrict_p): Delete.
12211 (scan_omp_target): Update call to scan_sharing_clauses.
12212 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12214 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12215 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12216 (convert_local_omp_clauses): Likewise.
12217 * tree-pretty-print.c (dump_omp_clause): Likewise.
12218 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12220 (omp_clause_code_name): Likewise.
12222 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12225 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12228 PR tree-optimization/86231
12229 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12230 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12232 2018-06-20 Tom de Vries <tdevries@suse.de>
12234 PR tree-optimization/86097
12235 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12236 iv type if signedness of iv type is not the same as that of *nit.
12238 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12240 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12241 EDGE_EH edges, verify they are all EDGE_EH.
12243 2018-06-20 Maya Rashish <coypu@sdf.org>
12245 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12247 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12249 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12250 * config/aarch64/aarch64.c (xgene1_tunings): Add
12251 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12252 (aarch64_mode_valid_for_sched_fusion_p):
12253 Allow 16-byte modes.
12254 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12255 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12257 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12259 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12260 * config/aarch64/iterators.md (VQ2): New mode iterator.
12262 2018-06-20 Martin Liska <mliska@suse.cz>
12264 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12265 Change default ratio from 10 to 8.
12267 2018-06-20 Martin Liska <mliska@suse.cz>
12269 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12271 (bit_test_cluster::find_bit_tests): Likewise.
12272 (switch_decision_tree::analyze_switch_statement): Find clusters.
12273 * tree-switch-conversion.h (struct jump_table_cluster): Document
12276 2018-06-20 Martin Liska <mliska@suse.cz>
12278 * tree-switch-conversion.c (switch_conversion::collect):
12279 Record m_uniq property.
12280 (switch_conversion::expand): Bail out for special conditions.
12281 (group_cluster::~group_cluster): New.
12282 (group_cluster::group_cluster): Likewise.
12283 (group_cluster::dump): Likewise.
12284 (jump_table_cluster::emit): New.
12285 (switch_decision_tree::fix_phi_operands_for_edges): New.
12286 (struct case_node): Remove struct.
12287 (jump_table_cluster::can_be_handled): New.
12288 (case_values_threshold): Moved to header.
12289 (reset_out_edges_aux): Likewise.
12290 (jump_table_cluster::is_beneficial): New.
12291 (bit_test_cluster::can_be_handled): Likewise.
12292 (add_case_node): Remove.
12293 (bit_test_cluster::is_beneficial): New.
12294 (case_bit_test::cmp): New.
12295 (bit_test_cluster::emit): New.
12296 (expand_switch_as_decision_tree_p): Remove.
12297 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12298 (fix_phi_operands_for_edge): Likewise.
12299 (switch_decision_tree::analyze_switch_statement): New.
12300 (compute_cases_per_edge): Move ...
12301 (switch_decision_tree::compute_cases_per_edge): ... here.
12302 (try_switch_expansion): Likewise.
12303 (switch_decision_tree::try_switch_expansion): Likewise.
12304 (record_phi_operand_mapping): Likewise.
12305 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12306 (emit_case_decision_tree): Likewise.
12307 (switch_decision_tree::emit): Likewise.
12308 (balance_case_nodes): Likewise.
12309 (switch_decision_tree::balance_case_nodes): Likewise.
12310 (dump_case_nodes): Likewise.
12311 (switch_decision_tree::dump_case_nodes): Likewise.
12312 (emit_jump): Likewise.
12313 (switch_decision_tree::emit_jump): Likewise.
12314 (emit_cmp_and_jump_insns): Likewise.
12315 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12316 (emit_case_nodes): Likewise.
12317 (switch_decision_tree::emit_case_nodes): Likewise.
12318 (conditional_probability): Remove.
12319 * tree-switch-conversion.h (enum cluster_type): New.
12321 (struct cluster): Likewise.
12322 (cluster::cluster): Likewise.
12323 (struct simple_cluster): Likewise.
12324 (simple_cluster::simple_cluster): Likewise.
12325 (struct group_cluster): Likewise.
12326 (struct jump_table_cluster): Likewise.
12327 (struct bit_test_cluster): Likewise.
12328 (struct min_cluster_item): Likewise.
12329 (struct case_tree_node): Likewise.
12330 (case_tree_node::case_tree_node): Likewise.
12331 (jump_table_cluster::case_values_threshold): Likewise.
12332 (struct case_bit_test): Likewise.
12333 (struct switch_decision_tree): Likewise.
12334 (struct switch_conversion): Likewise.
12335 (switch_decision_tree::reset_out_edges_aux): Likewise.
12337 2018-06-20 Martin Liska <mliska@suse.cz>
12339 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12340 (hoist_edge_and_branch_if_true): Likewise.
12341 (expand_switch_using_bit_tests_p): Likewise.
12342 (struct case_bit_test): Likewise.
12343 (case_bit_test_cmp): Likewise.
12344 (emit_case_bit_tests): Likewise.
12345 (switch_conversion::switch_conversion): New class.
12346 (struct switch_conv_info): Remove old struct.
12347 (collect_switch_conv_info): More to ...
12348 (switch_conversion::collect): ... this.
12349 (check_range): Likewise.
12350 (switch_conversion::check_range): Likewise.
12351 (check_all_empty_except_final): Likewise.
12352 (switch_conversion::check_all_empty_except_final): Likewise.
12353 (check_final_bb): Likewise.
12354 (switch_conversion::check_final_bb): Likewise.
12355 (create_temp_arrays): Likewise.
12356 (switch_conversion::create_temp_arrays): Likewise.
12357 (free_temp_arrays): Likewise.
12358 (gather_default_values): Likewise.
12359 (switch_conversion::gather_default_values): Likewise.
12360 (build_constructors): Likewise.
12361 (switch_conversion::build_constructors): Likewise.
12362 (constructor_contains_same_values_p): Likewise.
12363 (switch_conversion::contains_same_values_p): Likewise.
12364 (array_value_type): Likewise.
12365 (switch_conversion::array_value_type): Likewise.
12366 (build_one_array): Likewise.
12367 (switch_conversion::build_one_array): Likewise.
12368 (build_arrays): Likewise.
12369 (switch_conversion::build_arrays): Likewise.
12370 (gen_def_assigns): Likewise.
12371 (switch_conversion::gen_def_assigns): Likewise.
12372 (prune_bbs): Likewise.
12373 (switch_conversion::prune_bbs): Likewise.
12374 (fix_phi_nodes): Likewise.
12375 (switch_conversion::fix_phi_nodes): Likewise.
12376 (gen_inbound_check): Likewise.
12377 (switch_conversion::gen_inbound_check): Likewise.
12378 (process_switch): Use the newly created class.
12379 (switch_conversion::expand): New.
12380 (switch_conversion::~switch_conversion): New.
12381 * tree-switch-conversion.h: New file.
12383 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12385 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12386 tree-vect-patterns.c.
12387 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12388 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12389 (vect_recog_sad_pattern): Likewise.
12390 (vect_recog_widen_sum_pattern): Likewise.
12391 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12392 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12393 (vect_recog_rotate_pattern): Likewise.
12394 (vect_recog_mult_pattern): Likewise.
12395 (vect_recog_vector_vector_shift_pattern): Likewise.
12396 (vect_recog_divmod_pattern): Likewise.
12397 (vect_recog_mixed_size_cond_pattern): Likewise.
12398 (vect_recog_bool_pattern): Likewise.
12399 (vect_recog_mask_conversion_pattern): Likewise.
12400 (vect_try_gather_scatter_pattern): Likewise.
12401 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12402 (vect_recog_over_widening_pattern): Likewise.
12403 (vect_recog_gather_scatter_pattern): Likewise.
12404 (vect_recog_func_ptr): Move from tree-vectorizer.h
12405 (vect_vect_recog_func_ptrs): Move further down the file.
12406 (vect_recog_func): Likewise. Remove the third argument.
12407 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12408 (vect_pattern_recog_1): Expect the pattern function to do any
12409 necessary target tests. Also expect it to provide a vector type.
12410 Remove the type_in handling.
12412 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12414 * tree-vect-patterns.c (vect_pattern_detected): New function.
12415 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12416 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12417 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12418 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12419 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12420 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12421 (vect_recog_mask_conversion_pattern)
12422 (vect_try_gather_scatter_pattern): Likewise.
12424 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12426 * tree-vect-patterns.c (vect_get_internal_def): New function.
12427 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12428 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12429 (search_type_for_mask_1): Use it.
12431 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12433 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12434 redundant WIDEN_SUM_EXPR handling.
12435 (vect_recog_sad_pattern): Likewise.
12437 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12439 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12440 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12441 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12442 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12443 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12445 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12447 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12448 use the stmt_vec_info of the original bb statement for the
12449 new zero assignment, even if the call is part of a pattern.
12451 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12453 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12454 that the sequence is attached to the original statement rather
12455 than the pattern statement.
12456 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12457 PATTERN_DEF_SEQ from the original statement rather than
12458 the main pattern statement.
12459 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12460 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12461 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12463 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12465 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12466 definition statements before the early exit for statements that aren't
12468 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12470 (vect_transform_loop): ...here. Process pattern definition
12471 statements without first checking whether the main pattern
12472 statement is live or relevant.
12474 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12476 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12477 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12479 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12481 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12482 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12483 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12484 (expand_block_compare): Change select_block_compare_mode call.
12485 (expand_strncmp_align_check): Use new functions, fix comment.
12486 (emit_final_str_compare_gpr): New function.
12487 (expand_strn_compare): Refactor and clean up code.
12488 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12490 2018-06-19 Tony Reix <tony.reix@atos.com>
12491 Damien Bergamini <damien.bergamini@atos.com>
12492 David Edelsohn <dje.gcc@gmail.com>
12494 * collect2.c (static_obj): New variable.
12495 (static_libs): New variable.
12496 (is_in_list): Uncomment declaration.
12497 (main): Track AIX libraries linked statically.
12498 (is_in_list): Uncomment definition.
12499 (scan_prog_file): Don't add AIX shared libraries initializer
12500 to constructor list if linking statically.
12502 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12504 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12506 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12508 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12510 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12513 2018-06-19 Martin Liska <mliska@suse.cz>
12515 * config/i386/i386.c (ix86_can_inline_p): Do not use
12516 ipa_fn_summaries::get_create.
12517 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12519 (devirtualization_time_bonus): Likewise.
12520 (ipcp_propagate_stage): Likewise.
12521 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12522 (edge_set_predicate): Likewise.
12523 (evaluate_conditions_for_known_args): Likewise.
12524 (evaluate_properties_for_edge): Likewise.
12525 (ipa_call_summary::reset): Tranform to ...
12526 (ipa_call_summary::~ipa_call_summary): ... this.
12527 (ipa_fn_summary::reset): Transform to ...
12528 (ipa_fn_summary::~ipa_fn_summary): ... this.
12529 (ipa_fn_summary_t::remove): Rename to ...
12530 (ipa_fn_summary_t::remove_callees): ... this.
12531 (ipa_fn_summary_t::duplicate): Use placement new
12532 instead of memory copy.
12533 (ipa_call_summary_t::duplicate): Likewise.
12534 (ipa_call_summary_t::remove): Remove.
12535 (dump_ipa_call_summary): Change get_create to get.
12536 (ipa_dump_fn_summary): Dump only when summary exists.
12537 (analyze_function_body): Use symbol_summary::get instead
12539 (compute_fn_summary): Likewise.
12540 (estimate_edge_devirt_benefit): Likewise.
12541 (estimate_edge_size_and_time): Likewise.
12542 (inline_update_callee_summaries): Likewise.
12543 (remap_edge_change_prob): Likewise.
12544 (remap_edge_summaries): Likewise.
12545 (ipa_merge_fn_summary_after_inlining): Likewise.
12546 (write_ipa_call_summary): Likewise.
12547 (ipa_fn_summary_write): Likewise.
12548 (ipa_free_fn_summary): Likewise.
12549 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12550 (struct ipa_call_summary): Likewise.
12551 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12553 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12554 (estimate_size_after_inlining): Likewise.
12555 (estimate_growth): Likewise.
12556 (growth_likely_positive): Likewise.
12557 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12558 (inline_call): Likewise.
12559 * ipa-inline.c (caller_growth_limits): Likewise.
12560 (can_inline_edge_p): Likewise.
12561 (can_inline_edge_by_limits_p): Likewise.
12562 (compute_uninlined_call_time): Likewise.
12563 (compute_inlined_call_time): Likewise.
12564 (want_inline_small_function_p): Likewise.
12565 (edge_badness): Likewise.
12566 (update_caller_keys): Likewise.
12567 (update_callee_keys): Likewise.
12568 (inline_small_functions): Likewise.
12569 (inline_to_all_callers_1): Likewise.
12570 (dump_overall_stats): Likewise.
12571 (early_inline_small_functions): Likewise.
12572 (early_inliner): Likewise.
12573 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12574 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12575 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12576 * ipa-split.c (execute_split_functions): Likewise.
12577 * symbol-summary.h: Likewise.
12578 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12580 2018-06-19 Richard Biener <rguenther@suse.de>
12582 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12583 (vectorize_loops): ... here. Fix dbgcnt handling.
12584 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12586 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12589 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12590 ieee128 argument takes up only one (vector) register, not two (floating
12593 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12595 * gimplify.c (gimplify_init_constructor): Really never clear for an
12596 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12598 2018-06-19 Richard Biener <rguenther@suse.de>
12600 PR tree-optimization/86179
12601 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12602 after failed recognition.
12604 2018-06-18 Martin Sebor <msebor@redhat.com>
12606 PR middle-end/85602
12607 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12608 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12609 Handle integer subtraction.
12610 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12611 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12613 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12615 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12616 param from rtx to rtx_insn *.
12617 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12619 (frv_ifcvt_modify_insn): Likwise.
12620 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12621 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12622 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12623 as_a <rtx_insn *> cast to local "unprotected_region" once
12624 it's been established that it's not NULL or pc_rtx.
12625 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12626 param "sethi" from rtx to rtx_insn *.
12627 (nds32_group_float_insns): Likewise for param "insn".
12628 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12630 (vax_output_int_subtract): Likewise.
12631 * config/vax/vax.c (vax_output_int_add): Likewise for param
12633 (vax_output_int_subtract): Likewise.
12634 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12635 (emit_pattern_after): Likewise for param "after".
12636 (emit_insn_after): Likewise.
12637 (emit_jump_insn_after): Likewise.
12638 (emit_call_insn_after): Likewise.
12639 (emit_debug_insn_after): Likewise.
12640 (emit_pattern_before): Likewise for param "before".
12641 (emit_insn_before): Likewise.
12642 (emit_jump_insn_before): Likewise.
12643 * final.c (get_insn_template): Likewise for param "insn", removing
12645 * output.h (get_insn_template): Likewise for 2nd param.
12646 * rtl.h (emit_insn_before): Likewise.
12647 (emit_jump_insn_before): Likewise.
12648 (emit_debug_insn_before_noloc): Likewise.
12649 (emit_insn_after): Likewise.
12650 (emit_jump_insn_after): Likewise.
12651 (emit_call_insn_after): Likewise.
12652 (emit_debug_insn_after): Likewise.
12653 (set_insn_deleted): Likewise for param.
12655 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12658 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12659 floating point modes, so that IFmode is numerically greater than
12660 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12661 to declare the ordering. This prevents IFmode from being
12662 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12663 machine. Include rs6000-modes.h to share the fractional values
12664 between genmodes* and the rest of the compiler.
12665 (IFmode): Likewise.
12666 (KFmode): Likewise.
12667 (TFmode): Likewise.
12668 * config/rs6000/rs6000-modes.h: New file.
12669 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12670 meaning of rs6000_long_double_size so that 126..128 selects an
12671 appropriate 128-bit floating point type.
12672 (rs6000_option_override_internal): Likewise.
12673 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12674 (TARGET_LONG_DOUBLE_128): Change the meaning of
12675 rs6000_long_double_size so that 126..128 selects an appropriate
12676 128-bit floating point type.
12677 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12678 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12679 source and destination to match the standard usage.
12680 (truncifkf2): Likewise.
12681 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12682 ISA 2.07 to use an explicit clobber, instead of passing in a
12684 (copysign<mode>3_soft): Likewise.
12686 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12688 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12689 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12690 (vect_slp_analyze_instance_dependence): Likewise.
12691 (vect_enhance_data_refs_alignment): Likewise.
12692 (vect_analyze_data_refs_alignment): Likewise.
12693 (vect_slp_analyze_and_verify_instance_alignment
12694 (vect_analyze_data_ref_accesses): Likewise.
12695 (vect_prune_runtime_alias_test_list): Likewise.
12696 (vect_analyze_data_refs): Likewise.
12697 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12698 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12699 (vect_analyze_scalar_cycles_1): Likewise.
12700 (vect_get_loop_niters): Likewise.
12701 (vect_analyze_loop_form_1): Likewise.
12702 (vect_update_vf_for_slp): Likewise.
12703 (vect_analyze_loop_operations): Likewise.
12704 (vect_analyze_loop): Likewise.
12705 (vectorizable_induction): Likewise.
12706 (vect_transform_loop): Likewise.
12707 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12708 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12709 (vect_make_slp_decision): Likewise.
12710 (vect_detect_hybrid_slp): Likewise.
12711 (vect_slp_analyze_operations): Likewise.
12712 (vect_slp_bb): Likewise.
12713 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12714 (vectorizable_bswap): Likewise.
12715 (vectorizable_call): Likewise.
12716 (vectorizable_simd_clone_call): Likewise.
12717 (vectorizable_conversion): Likewise.
12718 (vectorizable_assignment): Likewise.
12719 (vectorizable_shift): Likewise.
12720 (vectorizable_operation): Likewise.
12721 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12723 2018-06-18 Martin Sebor <msebor@redhat.com>
12725 PR tree-optimization/81384
12726 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12727 * builtins.c (expand_builtin_strnlen): New function.
12728 (expand_builtin): Call it.
12729 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12730 * builtins.def (BUILT_IN_STRNLEN): New.
12731 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12732 Warn for bounds in excess of maximum object size.
12733 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12734 single-value ranges. Handle strnlen.
12735 (handle_builtin_strlen): Handle strnlen.
12736 (strlen_check_and_optimize_stmt): Same.
12737 * doc/extend.texi (Other Builtins): Document strnlen.
12739 2018-06-18 Maya Rashish <coypu@sdf.org>
12741 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12742 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12743 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12745 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12747 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12749 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12751 * tree.c (escaped_string::escape): Replace cast to char * by
12752 const_cast<char *> (unescaped).
12754 2018-06-18 Nick Clifton <nickc@redhat.com>
12757 * tree.c (escaped_string): New class. Converts an unescaped
12758 string into its escaped equivalent.
12759 (warn_deprecated_use): Use the new class to convert the
12760 deprecation message, if present.
12761 (test_escaped_strings): New self test.
12762 (test_c_tests): Add test_escaped_strings.
12763 * doc/extend.texi (deprecated): Add a note that the
12764 deprecation message is affected by the -fmessage-length
12765 option, and that control characters will be escaped.
12766 (#pragma GCC error): Document this pragma.
12767 (#pragma GCC warning): Likewise.
12768 * doc/invoke.texi (-fmessage-length): Document this option's
12769 effect on the #warning and #error preprocessor directives and
12770 the deprecated attribute.
12772 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
12774 * tree.c (decl_value_expr_lookup): Revert latest change.
12775 (decl_value_expr_insert): Likewise.
12777 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
12779 * gimplify.c (nonlocal_vlas): Delete.
12780 (nonlocal_vla_vars): Likewise.
12781 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12783 (gimplify_body): Do not create and destroy nonlocal_vlas.
12784 * tree-nested.c: Include diagnostic.h.
12785 (use_pointer_in_frame): Tweak.
12786 (lookup_field_for_decl): Add assertion and declare the transformation.
12787 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12788 internal error when the reference is in a wrong context. Do not
12789 create a debug decl by default.
12790 (note_nonlocal_block_vlas): Delete.
12791 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12792 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
12793 create a debug decl by default.
12794 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12795 call is in a wrong context.
12796 (fixup_vla_decls): New function.
12797 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
12798 debug variables were created.
12799 * tree.c (decl_value_expr_lookup): Add checking assertion.
12800 (decl_value_expr_insert): Likewise.
12802 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12804 PR middle-end/82479
12805 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12806 * tree-scalar-evolution.c (interpret_expr): Likewise.
12807 (expression_expensive_p): Likewise.
12808 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12809 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12810 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12811 (ssa_defined_by_minus_one_stmt_p): New.
12813 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
12815 PR middle-end/64946
12816 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12817 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12818 * dojump.c (do_jump): Likewise.
12819 * expr.c (expand_expr_real_2): Check operand type's sign.
12820 * fold-const.c (const_unop): Handle ABSU_EXPR.
12821 (fold_abs_const): Likewise.
12822 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12823 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12824 (strip_sign_op_1): Likesise.
12825 * match.pd: Add new pattern to generate ABSU_EXPR.
12826 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12827 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12828 * tree-eh.c (operation_could_trap_helper_p): Likewise.
12829 * tree-inline.c (estimate_operator_cost): Likewise.
12830 * tree-pretty-print.c (dump_generic_node): Likewise.
12831 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12832 * tree.def (ABSU_EXPR): New.
12834 2018-06-16 Jakub Jelinek <jakub@redhat.com>
12836 PR middle-end/86095
12837 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12838 documented as preserved for backward compatibility only.
12839 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12841 PR rtl-optimization/86108
12842 * bb-reorder.c (create_forwarder_block): Renamed to ...
12843 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
12844 jump from new landing pad to the second part.
12845 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12848 2018-06-15 Jakub Jelinek <jakub@redhat.com>
12850 PR middle-end/85878
12851 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12852 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12853 Only call store_expr for halves if the mode is the same.
12855 PR middle-end/86123
12856 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12857 Fix up comment formatting.
12859 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
12861 * typed-splay-tree.h (typed_splay_tree::remove): New function.
12862 (typed_splay_tree::closure,
12863 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12864 (typed_splay_tree::typed_splay_tree,
12865 typed_splay_tree::operator =): Declared private.
12866 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12867 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12868 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12869 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12870 typed_splay_tree::splay_tree_splay,
12871 typed_splay_tree::splay_tree_foreach_helper,
12872 typed_splay_tree::splay_tree_insert,
12873 typed_splay_tree::splay_tree_remove,
12874 typed_splay_tree::splay_tree_lookup,
12875 typed_splay_tree::splay_tree_predecessor,
12876 typed_splay_tree::splay_tree_successor,
12877 typed_splay_tree::splay_tree_min,
12878 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12879 (typed_splay_tree::root, typed_splay_tree::comp,
12880 typed_splay_tree::delete_key,
12881 typed_splay_tree::delete_value): New data members.
12882 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12883 typed_splay_tree::remove.
12885 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
12887 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12888 -mginv and -mno-ginv to the assembler.
12889 * config/mips/mips.opt (-mcrc): New option.
12890 (-mginv): Likewise.
12891 * doc/invoke.text (-mcrc): Document.
12892 (-mginv): Likewise.
12894 2018-06-15 Nick Clifton <nickc@redhat.com>
12897 * tree.c (escaped_string): New class. Converts an unescaped
12898 string into its escaped equivalent.
12899 (warn_deprecated_use): Use the new class to convert the
12900 deprecation message, if present.
12901 (test_escaped_strings): New self test.
12902 (test_c_tests): Add test_escaped_strings.
12903 * doc/extend.texi (deprecated): Add a note that the
12904 deprecation message is affected by the -fmessage-length
12905 option, and that control characters will be escaped.
12906 (#pragma GCC error): Document this pragma.
12907 (#pragma GCC warning): Likewise.
12908 * doc/invoke.texi (-fmessage-length): Document this option's
12909 effect on the #warning and #error preprocessor directives and
12910 the deprecated attribute.
12912 2018-06-15 Richard Biener <rguenther@suse.de>
12914 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12915 here, also noting vector size used.
12916 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
12917 size used in MSG_OPTIMIZED_LOCATIONS dump.
12918 (pass_slp_vectorize::execute): Adjust.
12920 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
12923 * config/arc/arc.c (arc_return_address_register): Fix
12926 2018-06-15 Richard Biener <rguenther@suse.de>
12928 PR middle-end/86159
12929 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12930 leave useless conversion stripping to force_gimple_operand_gsi.
12931 (gimplify_build2): Likewise.
12932 (gimplify_build1): Likewise.
12934 2018-06-15 Richard Biener <rguenther@suse.de>
12936 PR middle-end/86076
12937 * tree-cfg.c (move_stmt_op): unshare invariant addresses
12938 before adjusting their block.
12940 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
12942 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12943 multilibs for *-*-rtems*.
12944 * config/riscv/t-rtems: New file.
12946 2018-06-14 Jakub Jelinek <jakub@redhat.com>
12948 PR middle-end/86122
12949 * match.pd ((A +- CST1) +- CST2): Punt if last resort
12950 unsigned_type_for returns NULL.
12953 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12954 subregs of multi-word pseudos unless the float mode has word size.
12956 2018-06-14 Richard Biener <rguenther@suse.de>
12958 PR middle-end/86139
12959 * tree-vect-generic.c (build_word_mode_vector_type): Remove
12960 duplicate and harmful type_hash_canon.
12961 * tree.c (type_hash_canon): Assert we didn't find ourselves.
12963 2018-06-14 Richard Biener <rguenther@suse.de>
12966 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12969 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
12971 * config/rtems.h (STDINT_LONG32): Define.
12973 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
12974 Prachi Godbole <prachi.godbole@imgtec.com>
12976 * config/mips/mips-cpus.def: Define P6600.
12977 * config/mips/mips-tables.opt: Regenerate.
12978 * config/mips/mips.c (mips_ucbranch_type): New enum.
12979 (mips_rtx_cost_data): Add support for P6600.
12980 (mips_issue_rate): Likewise.
12981 (mips_multipass_dfa_lookahead): Likewise.
12982 (mips_avoid_hazard): Likewise.
12983 (mips_reorg_process_insns): Likewise.
12984 (mips_classify_branch_p6600): New function.
12985 * config/mips/mips.h (TUNE_P6600): New define.
12986 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12987 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12988 * config/mips/mips.md: Include p6600.md.
12989 (processor): Add p6600.
12990 * config/mips/p6600.md: New file.
12991 * doc/invoke.texi: Add p6600 to supported architectures.
12993 2018-06-13 Martin Sebor <msebor@redhat.com>
12995 PR tree-optimization/86114
12996 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12998 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13000 2018-06-13 Richard Biener <rguenther@suse.de>
13002 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13003 Properly set vector type of the intermediate stmt.
13004 * tree-vect-stmts.c (vectorizable_operation): The destination
13005 var always has vectype_out type.
13007 2018-06-13 Jeff Law <law@redhat.com>
13009 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13010 integer 0 for argument to print_rtl_with_bb.
13011 (rl78_reorg): Likewise.
13013 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13015 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13016 from rtx to rtx_insn *.
13017 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13019 (add_sched_insns_for_speculation): Likewise for local "target",
13020 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13021 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13022 from rtx_insn ** to rtx_code_label **.
13023 (reorg_emit_nops): Likewise.
13024 (c6x_reorg): Likewise for local "call_labels".
13025 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13027 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13028 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13029 the loops over LABEL_REFS.
13030 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13032 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13033 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13034 (split_branches): Strengthen local "olabel" from rtx to
13035 rtx_insn *, adding a safe_as_a cast.
13036 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13038 (add_insn_after): Likewise for first two params.
13039 (add_insn_before): Likewise.
13040 (remove_insn): Likewise for param.
13041 (emit_pattern_before_noloc): Likewise for second and third params.
13042 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13043 (emit_call_insn_before_noloc): Likewise.
13044 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13046 (emit_barrier_before): Likewise.
13047 (emit_label_before): Strengthen "label" param from "rtx" to
13048 "rtx_code_label *". Strengthen "before" param from "rtx" to
13050 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13052 (emit_pattern_after_noloc): Likewise.
13053 (emit_insn_after_noloc): Likewise.
13054 (emit_jump_insn_after_noloc): Likewise.
13055 (emit_call_insn_after_noloc): Likewise.
13056 (emit_debug_insn_after_noloc): Likewise.
13057 (emit_barrier_after): Likewise.
13058 (emit_label_after): Likewise for both params.
13059 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13060 "loc" param from "int" to "location_t".
13061 (emit_insn_after_setloc): Likewise.
13062 (emit_jump_insn_after_setloc): Likewise.
13063 (emit_call_insn_after_setloc): Likewise.
13064 (emit_debug_insn_after_setloc): Likewise.
13065 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13066 "loc" param from "int" to "location_t".
13067 (emit_pattern_before): Convert NULL_RTX to NULL.
13068 (emit_insn_before_setloc): Convert "loc" param from "int" to
13070 (emit_jump_insn_before_setloc): Likewise.
13071 (emit_call_insn_before_setloc): Likewise.
13072 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13073 rtx_insn *. Convert "loc" param from "int" to "location_t".
13074 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13075 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13076 Convert 3rd param from "int" to "location_t".
13077 (emit_barrier_before, emit_barrier_after, next_real_insn):
13078 Strengthen param from rtx to rtx_insn *.
13079 (emit_label_before): Strengthen 1st param from "rtx" to
13080 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13082 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13083 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13084 Strengthen 2nd param from "rtx" to "rtx_insn *".
13085 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13086 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13087 Likewise. Convert 3rd param from "int" to "location_t".
13088 (emit_label_after): Strengthen 1st param from "rtx" to
13089 "rtx_code_label *".
13090 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13092 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13093 from "rtx" to "rtx_insn *".
13095 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13097 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13098 bodies streamed in with -Q.
13099 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13100 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13101 * gimple-streamer-out.c: Include gimple-pretty-print.h
13102 (output_bb): Dump stmts streamed.
13103 * lto-section-out.c: Include print-tree.h
13104 (lto_begin_section): Dump sections created.
13105 (lto_output_decl_index): Dump decl encoded.
13106 * lto-streamer-out.c: Include print-tree.h
13107 (create_output_block): Dump output block created.
13108 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13109 (output_function): Dump function output.
13110 (output_constructor): Dump constructor streamed.
13111 (write_global_stream): Output indexes encoded.
13112 (produce_asm_for_decls): Dump streams encoded.
13113 * lto-streamer.c (streamer_dump_file): New global var.
13114 * lto-streamer.h (streamer_dump_file): Declare.
13115 * passes.c (ipa_write_summaries): Initialize streamer dump.
13116 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13119 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13122 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13123 offsets for register save directives. Emit a second batch of save
13124 directives, if need be, when the function accesses prior frames.
13126 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13128 * config/arc/fpu.md (fmasf4): Force operand to register.
13129 (fnmasf4): Likewise.
13131 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13133 * config/arc/arc-protos.h (arc_pad_return): Remove.
13134 * config/arc/arc.c (machine_function): Remove force_short_suffix
13136 (arc_print_operand): Adjust printing of '&'.
13137 (arc_verify_short): Remove conditional printing of short suffix.
13138 (arc_final_prescan_insn): Remove reference to size_reason.
13139 (pad_return): New function.
13140 (arc_reorg): Call pad_return.
13141 (arc_pad_return): Remove.
13142 (arc_init_machine_status): Remove reference to force_short_suffix.
13143 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13144 (attr length): When attribute iscompact is true force to 2
13145 regardless; in the case of maybe check if we want to force the
13146 instruction to have 4 bytes length.
13147 (nopv): Change it to generate 4 byte long nop as well.
13148 (blockage): New pattern.
13149 (simple_return): Remove call to arc_pad_return.
13150 (p_return_i): Likewise.
13152 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13154 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13156 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13158 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13161 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13163 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13164 for ARC700 and ARCv2.
13166 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13169 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13170 operands[2] instead of operands[1].
13173 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13175 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13176 case, check whether the outer register overlaps an unallocatable
13177 register, not just whether it fits the required class.
13179 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13181 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13183 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13184 (memrefs_conflict_p): Likewise.
13185 (init_alias_analysis): Likewise.
13186 * cfgexpand.c (expand_debug_expr): Likewise.
13187 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13188 * cse.c (fold_rtx): Likewise.
13189 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13190 * expr.c (emit_block_move_hints): Likewise.
13191 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13192 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13193 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13194 (emit_group_store): Likewise.
13195 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13196 to read the PRE/POST_MODIFY increment.
13197 * calls.c (store_one_arg): Use strip_offset.
13198 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13200 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13202 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13203 (simplify_binary_operation_1): Extend CONST_INT handling to
13205 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13206 than a HOST_WIDE_INT.
13207 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13209 (adjust_mems, add_stores): Update accodingly.
13210 (vt_canonicalize_addr): Track polynomial offsets.
13211 (emit_note_insn_var_location): Likewise.
13212 (vt_add_function_parameter): Likewise.
13213 (vt_initialize): Likewise.
13215 2018-06-12 Jeff Law <law@redhat.com>
13217 * config.gcc (alpha*-*-freebsd*): Remove.
13218 * config/alpha/freebsd.h: Remove.
13220 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13223 * spellcheck-tree.c (levenshtein_distance): Rename to...
13224 (get_edit_distance): ...this, and update for underlying renaming.
13225 * spellcheck-tree.h (levenshtein_distance): Rename to...
13226 (get_edit_distance): ...this.
13227 * spellcheck.c (levenshtein_distance): Rename to...
13228 (get_edit_distance): ...this. Convert from Levenshtein distance
13229 to Damerau-Levenshtein distance by supporting transpositions of
13230 adjacent characters. Rename "v1" to "v_next" and "v0" to
13232 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13233 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13234 update for underlying renaming.
13235 (selftest::levenshtein_distance_unit_test): Rename to...
13236 (selftest::test_get_edit_distance_unit): ...this, and update for
13237 underlying renaming.
13238 (selftest::test_find_closest_string): Add example from PR 69968
13239 where transposition helps
13240 (selftest::test_metric_conditions): Update for renaming.
13241 (selftest::test_metric_conditions): Likewise.
13242 (selftest::spellcheck_c_tests): Likewise.
13243 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13244 (get_edit_distance): ...this.
13245 (best_match::consider): Update for renaming.
13247 2018-06-12 Martin Sebor <msebor@redhat.com>
13249 PR tree-optimization/85259
13250 * builtins.c (compute_objsize): Handle constant offsets.
13251 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13252 true iff a warning has been issued.
13253 * gimple.h (gimple_nonartificial_location): New function.
13254 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13255 gimple_nonartificial_location and handle -Wno-system-headers.
13256 (handle_builtin_stxncpy): Same.
13258 2018-06-12 Martin Sebor <msebor@redhat.com>
13261 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13263 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13265 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13266 BUILTIN_VEC_XST entries for pointer to double and long long.
13268 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13271 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13273 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13276 2018-06-12 Martin Liska <mliska@suse.cz>
13278 * doc/options.texi: Document IntegerRange.
13280 2018-06-12 Martin Liska <mliska@suse.cz>
13282 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13283 * opt-functions.awk: Handle Deprecated flag.
13284 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13286 (read_cmdline_option): Report warning for a deprecated option.
13287 * opts.h (struct cl_option): Add new field cl_deprecated.
13288 (CL_ERR_DEPRECATED): New.
13290 2018-06-12 Martin Liska <mliska@suse.cz>
13292 * doc/options.texi: Document Deprecated option flag.
13294 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13296 * config/arc/arc-arch.h (arc_extras): New enum.
13297 (arc_cpu_t):Add field extra.
13298 (arc_cpu_types): Consider the extras.
13299 * config/arc/arc-cpus.def: Add extras info.
13300 * config/arc/arc-opts.h (processor_type): Consider extra field.
13301 * config/arc/arc.c (arc_override_options): Handle extra field.
13303 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13305 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13306 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13308 * config/arc/arc.c (arc_init): Update pic warning.
13309 (irq_range): Update irq range parsing warnings.
13310 (arc_override_options): Update various warning messages.
13311 (arc_handle_aux_attribute): Likewise.
13313 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13315 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13317 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13319 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13320 compiler messages directives.
13322 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13324 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13325 * config/mips/mips-tables.opt: Regenerate.
13326 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13328 * doc/invoke.texi: Document -march=i6500.
13330 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13332 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13333 (i6400_gpmul): Add cpu_unit.
13334 (i6400_gpdiv): Likewise.
13335 (i6400_msa_add_d): Update reservations.
13336 (i6400_msa_int_add) Likewise.
13337 (i6400_msa_short_logic3) Likewise.
13338 (i6400_msa_short_logic2) Likewise.
13339 (i6400_msa_short_logic) Likewise.
13340 (i6400_msa_move) Likewise.
13341 (i6400_msa_cmp) Likewise.
13342 (i6400_msa_short_float2) Likewise.
13343 (i6400_msa_div_d) Likewise.
13344 (i6400_msa_long_logic1) Likewise.
13345 (i6400_msa_long_logic2) Likewise.
13346 (i6400_msa_mult) Likewise.
13347 (i6400_msa_long_float2) Likewise.
13348 (i6400_msa_long_float4) Likewise.
13349 (i6400_msa_long_float5) Likewise.
13350 (i6400_msa_long_float8) Likewise.
13351 (i6400_fpu_fadd): Include frint type.
13352 (i6400_fpu_store): New define_insn_reservation.
13353 (i6400_fpu_load): Likewise.
13354 (i6400_fpu_move): Likewise.
13355 (i6400_fpu_fcmp): Likewise.
13356 (i6400_fpu_fmadd): Likewise.
13357 (i6400_int_mult): Include imul3nc type and update reservation.
13358 (i6400_int_div): Include idiv3 type and update reservation.
13359 (i6400_int_load): Update to check type not move_type.
13360 (i6400_int_store): Likewise.
13361 (i6400_int_prefetch): Set zero latency.
13363 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13365 * gcc.c: Document new %@{...} sequence.
13366 (LINK_COMMAND_SPEC): Use it for the -L switches.
13367 (cpp_unique_options): Use it for the -I switches.
13368 (at_file_argbuf): New global variable.
13369 (in_at_file): Likewise.
13370 (alloc_args): Create at_file_argbuf.
13371 (clear_args): Truncate at_file_argbuf.
13372 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13373 (open_at_file): New function.
13374 (close_at_file): Likewise.
13375 (create_at_file): Delete.
13376 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13379 (validate_switches_from_spec): Deal with %@{...} sequence.
13380 (validate_switches): Likewise.
13381 (driver::finalize): Call clear_args.
13383 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13385 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13387 2018-06-11 Martin Sebor <msebor@redhat.com>
13389 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13390 (Wno-class-memaccess): Add @opindex.
13391 (Wno-templates, Wno-multiple-inheritance): Same.
13392 (Wno-virtual-inheritance, Wno-namespaces): Same.
13393 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13394 (Wno-format-overflow, Wno-format-truncation): Same.
13395 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13396 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13397 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13398 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13399 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13400 (Wno-misspelled-isr): Same.
13402 2018-06-11 Martin Sebor <msebor@redhat.com>
13404 * PR tree-optimization/86083
13405 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13407 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13409 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13411 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13414 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13415 on the correct operand.
13416 (*movdi_internal64): Ditto.
13418 2018-06-11 Martin Liska <mliska@suse.cz>
13420 PR tree-optimization/86089
13421 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13423 2018-06-11 Julia Koval <julia.koval@intel.com>
13425 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13426 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13427 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13429 2018-06-11 Olivier Hainque <hainque@adacore.com>
13431 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13432 for Ada with strict dwarf2.
13434 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13437 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13440 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13442 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13444 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13446 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13449 2018-06-08 Martin Liska <mliska@suse.cz>
13451 * tree-cfg.h (debug_function): Fix argument type to match
13454 2018-06-08 Martin Liska <mliska@suse.cz>
13456 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13457 Remove usage of MPX-related (and removed) fields.
13458 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13460 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13462 * cfg.c (debug): Use TDF_NONE rather than 0.
13463 * cfghooks.c (debug): Likewise.
13464 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13465 (struct dump_option_value_info): Convert to...
13466 (struct kv_pair): ...this template type.
13467 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13469 (optinfo_verbosity_options): Likewise.
13470 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13472 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13473 than int for "optgroup_flags" param.
13474 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13476 (dump_dec): Likewise.
13477 (dump_finish): Use TDF_NONE rather than 0.
13478 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13479 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13480 than 0. Update for change to option_ptr.
13481 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13482 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13483 0. Update for changes to optinfo_verbosity_options and
13485 (opt_info_switch_p): Convert optgroup_flags from int to
13487 (dump_basic_block): Use dump_flags_t rather than int
13488 for "dump_kind" param.
13489 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13490 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13491 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13492 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13493 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13494 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13495 TDF_NONE): Convert from macros to...
13496 (enum dump_flag): ...this new enum.
13497 (dump_flags_t): Update to use enum.
13498 (operator|, operator&, operator~, operator|=, operator&=):
13499 Implement for dump_flags_t.
13500 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13501 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13502 Convert from macros to...
13503 (enum optgroup_flag): ...this new enum.
13504 (optgroup_flags_t): New typedef.
13505 (operator|, operator|=): Implement for optgroup_flags_t.
13506 (struct dump_file_info): Convert field "alt_flags" to
13507 dump_flags_t. Convert field "optgroup_flags" to
13509 (dump_basic_block): Use dump_flags_t rather than int for param.
13510 (dump_generic_expr_loc): Likewise.
13511 (dump_dec): Likewise.
13512 (dump_register): Convert param "optgroup_flags" to
13514 (opt_info_enable_passes): Likewise.
13515 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13517 * gimple-pretty-print.c (debug): Likewise.
13518 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13519 (merged_store_group::apply_stores): Likewise.
13520 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13521 * gimple.c (verify_gimple_pp): Likewise.
13522 * graphite-poly.c (print_pbb_body): Likewise.
13523 * passes.c (pass_manager::register_one_dump_file): Convert
13524 local "optgroup_flags" to optgroup_flags_t.
13525 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13527 (debug_body): Likewise.
13528 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13529 to optgroup_flags_t.
13530 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13532 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13533 (convert_mult_to_fma): Likewise.
13534 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13535 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13536 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13537 "dump_kind" to dump_flags_t.
13539 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13541 * config/rs6000/rs6000.c (min, max): Delete.
13543 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13545 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13546 -mabi=spe and -mabi=no-spe.
13548 2018-06-08 Martin Liska <mliska@suse.cz>
13550 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13551 where we expect an existing summary.
13553 2018-06-08 Martin Liska <mliska@suse.cz>
13555 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13556 * ipa-inline.h (estimate_edge_growth): Likewise.
13558 2018-06-08 Martin Liska <mliska@suse.cz>
13560 * cgraph.c (function_version_hasher::hash): Use
13561 cgraph_node::get_uid ().
13562 (function_version_hasher::equal):
13563 * cgraph.h (cgraph_node::get_uid): New method.
13564 * ipa-inline.c (update_caller_keys): Use
13565 cgraph_node::get_uid ().
13566 (update_callee_keys): Likewise.
13567 * ipa-utils.c (searchc): Likewise.
13568 (ipa_reduced_postorder): Likewise.
13569 * lto-cgraph.c (input_node): Likewise.
13570 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13571 * symbol-summary.h (symtab_insertion): Likewise.
13572 (symtab_removal): Likewise.
13573 (symtab_duplication): Likewise.
13574 * tree-pretty-print.c (dump_function_header): Likewise.
13575 * tree-sra.c (convert_callers_for_node): Likewise.
13577 2018-06-08 Martin Liska <mliska@suse.cz>
13579 * cgraph.c (symbol_table::create_edge): Always assign a new
13581 (symbol_table::free_edge): Do not recycle numbers.
13582 * cgraph.h (cgraph_edge::get): New method.
13583 * symbol-summary.h (symtab_removal): Use it.
13584 (symtab_duplication): Likewise.
13585 (call_summary::hashable_uid): Remove.
13587 2018-06-08 Martin Liska <mliska@suse.cz>
13589 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13590 (initialize_growth_caches): Remove.
13591 (free_growth_caches): Likewise.
13592 (do_estimate_edge_time): Use edge_growth_cache.
13593 (do_estimate_edge_size): Likewise.
13594 (do_estimate_edge_hints): Likewise.
13595 * ipa-inline.c (reset_edge_caches): Likewise.
13596 (recursive_inlining): Likewise.
13597 (inline_small_functions): Likewise.
13598 * ipa-inline.h (initialize_growth_caches): Remove.
13599 (estimate_edge_size): Likewise.
13600 (estimate_edge_time): Likewise.
13601 (estimate_edge_hints): Likewise.
13602 (reset_edge_growth_cache): Likewise.
13603 * symbol-summary.h (call_summary::remove): New method.
13605 2018-06-08 Martin Liska <mliska@suse.cz>
13607 * ipa-cp.c (class edge_clone_summary): New summary.
13608 (grow_edge_clone_vectors): Remove.
13609 (ipcp_edge_duplication_hook): Remove.
13610 (class edge_clone_summary_t): New call_summary class.
13611 (ipcp_edge_removal_hook): Remove.
13612 (edge_clone_summary_t::duplicate): New function.
13613 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13614 (create_specialized_node): Likewise.
13615 (ipcp_driver): Initialize edge_clone_summaries and do not
13618 2018-06-08 Martin Liska <mliska@suse.cz>
13620 * symbol-summary.h (get): New function.
13621 (call_summary::m_initialize_when_cloning): New class member.
13623 2018-06-08 Martin Liska <mliska@suse.cz>
13625 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13626 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13627 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13628 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13629 (remove_cgraph_node_from_order): Use the removed_nodes set.
13630 (do_per_function_toporder): Likwise.
13631 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13632 instead of summary_uid.
13633 (symtab_removal): Likewise.
13634 (symtab_duplication): Likewise.
13636 2018-06-08 Martin Liska <mliska@suse.cz>
13638 * ipa-cp.c (ipcp_store_bits_results): Use
13639 ipcp_transformation_sum.
13640 (ipcp_store_vr_results): Likewise.
13641 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13643 (ipcp_transformation_initialize): ... this.
13644 (ipa_set_node_agg_value_chain):
13645 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13646 (write_ipcp_transformation_info): Likewise.
13647 (read_ipcp_transformation_info): Likewise.
13648 (ipcp_update_bits): Likewise.
13649 (ipcp_update_vr): Likewise.
13650 (ipcp_transform_function): Likewise.
13651 * ipa-prop.h: Rename ipcp_transformation_summary to
13652 ipcp_transformation.
13653 (class ipcp_transformation_t): New function summary.
13654 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13655 (ipa_get_agg_replacements_for_node): Likewise.
13657 2018-06-08 Martin Liska <mliska@suse.cz>
13659 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13661 (class funct_state_summary_t): New function_summary class.
13662 (has_function_state): Remove.
13663 (get_function_state): Likewise.
13664 (set_function_state): Likewise.
13665 (add_new_function): Likewise.
13666 (funct_state_summary_t::insert): New function.
13667 (duplicate_node_data): Remove.
13668 (remove_node_data): Remove.
13669 (funct_state_summary_t::duplicate): New function.
13670 (register_hooks): Create new funct_state_summaries.
13671 (pure_const_generate_summary): Use it.
13672 (pure_const_write_summary): Likewise.
13673 (pure_const_read_summary): Likewise.
13674 (propagate_pure_const): Likewise.
13675 (propagate_nothrow): Likewise.
13676 (dump_malloc_lattice): Likewise.
13677 (propagate_malloc): Likewise.
13678 (execute): Do not register hooks, just remove summary
13680 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13683 2018-06-08 Martin Liska <mliska@suse.cz>
13685 * ipa-reference.c (remove_node_data): Remove.
13686 (duplicate_node_data): Likewise.
13687 (class ipa_ref_var_info_summary_t): New class.
13688 (class ipa_ref_opt_summary_t): Likewise.
13689 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13690 (get_reference_optimization_summary): Use
13691 ipa_ref_opt_sum_summaries.
13692 (set_reference_vars_info): Remove.
13693 (set_reference_optimization_summary): Likewise.
13694 (ipa_init): Create summaries.
13695 (init_function_info): Use function summary.
13696 (ipa_ref_opt_summary_t::duplicate): New function.
13697 (ipa_ref_opt_summary_t::remove): New function.
13698 (get_read_write_all_from_node): Fix GNU coding style.
13699 (propagate): Use function summary.
13700 (write_node_summary_p): Fix GNU coding style.
13701 (stream_out_bitmap): Likewise.
13702 (ipa_reference_read_optimization_summary): Use function summary.
13703 (ipa_reference_c_finalize): Do not release hooks.
13705 2018-06-08 Martin Liska <mliska@suse.cz>
13707 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13708 (analyze_function_body): Extract multiple calls of get_create.
13709 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13710 * ipa-inline.c (recursive_inlining): Use ::get method.
13711 * ipa-inline.h (estimate_edge_growth): Likewise.
13713 2018-06-08 Martin Liska <mliska@suse.cz>
13715 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13717 (hsa_function_summary::hsa_function_summary): Use the new enum
13719 (hsa_gpu_implementation_p): Use hsa_summaries::get.
13720 * hsa-gen.c (hsa_get_host_function): Likewise.
13721 (get_brig_function_name): Likewise.
13722 * ipa-hsa.c (process_hsa_functions): Likewise.
13723 (ipa_hsa_write_summary): Likewise.
13724 * symbol-summary.h (symtab_duplication): Use ::get function/
13725 (get): New function.
13727 2018-06-08 Martin Liska <mliska@suse.cz>
13729 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13731 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13732 (hsa_register_kernel): Likewise.
13733 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13734 * hsa-gen.c (hsa_get_host_function): Likewise.
13735 (get_brig_function_name): Likewise.
13736 (generate_hsa): Likewise.
13737 (pass_gen_hsail::execute): Likewise.
13738 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13739 (devirtualization_time_bonus): Likewise.
13740 (ipcp_propagate_stage): Likewise.
13741 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13742 (edge_set_predicate): Likewise.
13743 (evaluate_conditions_for_known_args): Likewise.
13744 (evaluate_properties_for_edge): Likewise.
13745 (ipa_fn_summary::reset): Likewise.
13746 (ipa_fn_summary_t::duplicate): Likewise.
13747 (dump_ipa_call_summary): Likewise.
13748 (ipa_dump_fn_summary): Likewise.
13749 (analyze_function_body): Likewise.
13750 (compute_fn_summary): Likewise.
13751 (estimate_edge_devirt_benefit): Likewise.
13752 (estimate_edge_size_and_time): Likewise.
13753 (estimate_calls_size_and_time): Likewise.
13754 (estimate_node_size_and_time): Likewise.
13755 (inline_update_callee_summaries): Likewise.
13756 (remap_edge_change_prob): Likewise.
13757 (remap_edge_summaries): Likewise.
13758 (ipa_merge_fn_summary_after_inlining): Likewise.
13759 (ipa_update_overall_fn_summary): Likewise.
13760 (read_ipa_call_summary): Likewise.
13761 (inline_read_section): Likewise.
13762 (write_ipa_call_summary): Likewise.
13763 (ipa_fn_summary_write): Likewise.
13764 (ipa_free_fn_summary): Likewise.
13765 * ipa-hsa.c (process_hsa_functions): Likewise.
13766 (ipa_hsa_write_summary): Likewise.
13767 (ipa_hsa_read_section): Likewise.
13768 * ipa-icf.c (sem_function::merge): Likewise.
13769 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13770 (do_estimate_edge_time): Likewise.
13771 (estimate_size_after_inlining): Likewise.
13772 (estimate_growth): Likewise.
13773 (growth_likely_positive): Likewise.
13774 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13775 (inline_call): Likewise.
13776 * ipa-inline.c (caller_growth_limits): Likewise.
13777 (can_inline_edge_p): Likewise.
13778 (can_inline_edge_by_limits_p): Likewise.
13779 (compute_uninlined_call_time): Likewise.
13780 (compute_inlined_call_time): Likewise.
13781 (want_inline_small_function_p): Likewise.
13782 (edge_badness): Likewise.
13783 (update_caller_keys): Likewise.
13784 (update_callee_keys): Likewise.
13785 (recursive_inlining): Likewise.
13786 (inline_small_functions): Likewise.
13787 (inline_to_all_callers_1): Likewise.
13788 (dump_overall_stats): Likewise.
13789 (early_inline_small_functions): Likewise.
13790 (early_inliner): Likewise.
13791 * ipa-inline.h (estimate_edge_growth): Likewise.
13792 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13793 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13794 * ipa-prop.h (IPA_NODE_REF): Likewise.
13795 (IPA_EDGE_REF): Likewise.
13796 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13797 (propagate_malloc): Likewise.
13798 * ipa-split.c (execute_split_functions): Likewise.
13799 * symbol-summary.h: Rename get to get_create.
13801 (get_create): Likewise.
13802 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13804 2018-06-08 Martin Liska <mliska@suse.cz>
13806 * symbol-summary.h (release): Move definition out of class
13808 (symtab_removal): Likewise.
13809 (symtab_duplication): Likewise.
13811 2018-06-08 Martin Liska <mliska@suse.cz>
13813 * symbol-summary.h (function_summary): Move constructor
13814 implementation out of class declaration.
13815 (release): Likewise.
13816 (symtab_insertion): Likewise.
13817 (symtab_removal): Likewise.
13818 (symtab_duplication): Likewise.
13821 2018-06-08 Martin Liska <mliska@suse.cz>
13823 * Makefile.in: Remove support for MPX (macros, related functions,
13824 fields in cgraph_node, ...).
13825 * builtin-types.def (BT_BND): Likewise.
13826 (BT_FN_BND_CONST_PTR): Likewise.
13827 (BT_FN_CONST_PTR_BND): Likewise.
13828 (BT_FN_VOID_PTR_BND): Likewise.
13829 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13830 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13831 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13832 (expand_builtin_mempcpy_with_bounds): Likewise.
13833 (expand_builtin_memset_with_bounds): Likewise.
13834 (expand_builtin_memset_args): Likewise.
13835 (std_expand_builtin_va_start): Likewise.
13836 (expand_builtin): Likewise.
13837 (expand_builtin_with_bounds): Likewise.
13838 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13839 (DEF_LIB_BUILTIN_CHKP): Likewise.
13840 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13841 (DEF_CHKP_BUILTIN): Likewise.
13842 (BUILT_IN_MEMCPY): Likewise.
13843 (BUILT_IN_MEMMOVE): Likewise.
13844 (BUILT_IN_MEMPCPY): Likewise.
13845 (BUILT_IN_MEMSET): Likewise.
13846 (BUILT_IN_STPCPY): Likewise.
13847 (BUILT_IN_STRCAT): Likewise.
13848 (BUILT_IN_STRCHR): Likewise.
13849 (BUILT_IN_STRCPY): Likewise.
13850 (BUILT_IN_STRLEN): Likewise.
13851 (BUILT_IN_MEMCPY_CHK): Likewise.
13852 (BUILT_IN_MEMMOVE_CHK): Likewise.
13853 (BUILT_IN_MEMPCPY_CHK): Likewise.
13854 (BUILT_IN_MEMSET_CHK): Likewise.
13855 (BUILT_IN_STPCPY_CHK): Likewise.
13856 (BUILT_IN_STRCAT_CHK): Likewise.
13857 (BUILT_IN_STRCPY_CHK): Likewise.
13858 * calls.c (store_bounds): Likewise.
13859 (emit_call_1): Likewise.
13860 (special_function_p): Likewise.
13861 (maybe_warn_nonstring_arg): Likewise.
13862 (initialize_argument_information): Likewise.
13863 (finalize_must_preallocate): Likewise.
13864 (compute_argument_addresses): Likewise.
13865 (expand_call): Likewise.
13866 * cfgexpand.c (expand_call_stmt): Likewise.
13867 (expand_return): Likewise.
13868 (expand_gimple_stmt_1): Likewise.
13869 (pass_expand::execute): Likewise.
13870 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13871 (cgraph_node::remove): Likewise.
13872 (cgraph_node::dump): Likewise.
13873 (cgraph_node::verify_node): Likewise.
13874 * cgraph.h (chkp_function_instrumented_p): Likewise.
13875 (symtab_node::get_alias_target): Likewise.
13876 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13877 (cgraph_local_p): Likewise.
13878 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13879 (cgraph_edge::rebuild_references): Likewise.
13880 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13881 (walk_polymorphic_call_targets): Likewise.
13882 (cgraph_node::expand_thunk): Likewise.
13883 (symbol_table::output_weakrefs): Likewise.
13884 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13885 (ix86_handle_option): Likewise.
13886 * config/i386/constraints.md: Likewise.
13887 * config/i386/i386-builtin-types.def (BND): Likewise.
13891 * config/i386/i386-builtin.def (BDESC_END): Likewise.
13892 (BDESC_FIRST): Likewise.
13894 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13895 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13896 * config/i386/i386.c (enum reg_class): Likewise.
13897 (ix86_target_string): Likewise.
13898 (ix86_option_override_internal): Likewise.
13899 (ix86_conditional_register_usage): Likewise.
13900 (ix86_valid_target_attribute_inner_p): Likewise.
13901 (ix86_set_indirect_branch_type): Likewise.
13902 (ix86_set_current_function): Likewise.
13903 (ix86_function_arg_regno_p): Likewise.
13904 (init_cumulative_args): Likewise.
13905 (ix86_function_arg_advance): Likewise.
13906 (ix86_function_arg): Likewise.
13907 (ix86_pass_by_reference): Likewise.
13908 (ix86_function_value_regno_p): Likewise.
13909 (ix86_function_value_1): Likewise.
13910 (ix86_function_value_bounds): Likewise.
13911 (ix86_return_in_memory): Likewise.
13912 (ix86_setup_incoming_vararg_bounds): Likewise.
13913 (ix86_va_start): Likewise.
13914 (indirect_thunk_need_prefix): Likewise.
13915 (print_reg): Likewise.
13916 (ix86_print_operand): Likewise.
13917 (ix86_expand_call): Likewise.
13918 (ix86_output_function_return): Likewise.
13919 (reg_encoded_number): Likewise.
13920 (BDESC_VERIFYS): Likewise.
13921 (ix86_init_mpx_builtins): Likewise.
13922 (ix86_init_builtins): Likewise.
13923 (ix86_emit_cmove): Likewise.
13924 (ix86_emit_move_max): Likewise.
13925 (ix86_expand_builtin): Likewise.
13926 (ix86_builtin_mpx_function): Likewise.
13927 (ix86_get_arg_address_for_bt): Likewise.
13928 (ix86_load_bounds): Likewise.
13929 (ix86_store_bounds): Likewise.
13930 (ix86_load_returned_bounds): Likewise.
13931 (ix86_store_returned_bounds): Likewise.
13932 (ix86_class_likely_spilled_p): Likewise.
13933 (ix86_hard_regno_mode_ok): Likewise.
13934 (x86_order_regs_for_local_alloc): Likewise.
13935 (ix86_mitigate_rop): Likewise.
13936 (ix86_bnd_prefixed_insn_p): Likewise.
13937 (ix86_mpx_bound_mode): Likewise.
13938 (ix86_make_bounds_constant): Likewise.
13939 (ix86_initialize_bounds): Likewise.
13940 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13941 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13942 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13943 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13944 (TARGET_CHKP_BOUND_MODE): Likewise.
13945 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13946 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13947 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13948 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13949 * config/i386/i386.h (TARGET_MPX): Likewise.
13950 (TARGET_MPX_P): Likewise.
13951 (VALID_BND_REG_MODE): Likewise.
13952 (FIRST_BND_REG): Likewise.
13953 (LAST_BND_REG): Likewise.
13954 (enum reg_class): Likewise.
13955 (BND_REG_P): Likewise.
13956 (BND_REGNO_P): Likewise.
13957 (BNDmode): Likewise.
13958 (ADJUST_INSN_LENGTH): Likewise.
13959 * config/i386/i386.md: Likewise.
13960 * config/i386/i386.opt: Likewise.
13961 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13962 (defined): Likewise.
13963 (LINK_MPX): Likewise.
13964 (MPX_SPEC): Likewise.
13965 (LIBMPX_SPEC): Likewise.
13966 (LIBMPXWRAPPERS_SPEC): Likewise.
13967 (CHKP_SPEC): Likewise.
13968 * config/i386/predicates.md: Likewise.
13969 * dbxout.c (dbxout_type): Likewise.
13970 * doc/extend.texi: Likewise.
13971 * doc/invoke.texi: Likewise.
13972 * doc/md.texi: Likewise.
13973 * doc/tm.texi: Likewise.
13974 * doc/tm.texi.in: Likewise.
13975 * dwarf2out.c (is_base_type): Likewise.
13976 (gen_formal_types_die): Likewise.
13977 (gen_subprogram_die): Likewise.
13978 (gen_type_die_with_usage): Likewise.
13979 (gen_decl_die): Likewise.
13980 (dwarf2out_late_global_decl): Likewise.
13981 * expr.c (expand_assignment): Likewise.
13982 (emit_storent_insn): Likewise.
13983 (store_expr_with_bounds): Likewise.
13984 (store_expr): Likewise.
13985 (expand_expr_real_1): Likewise.
13986 * expr.h (store_expr_with_bounds): Likewise.
13987 * function.c (use_register_for_decl): Likewise.
13988 (struct bounds_parm_data): Likewise.
13989 (assign_parms_augmented_arg_list): Likewise.
13990 (assign_parm_find_entry_rtl): Likewise.
13991 (assign_parm_is_stack_parm): Likewise.
13992 (assign_parm_load_bounds): Likewise.
13993 (assign_bounds): Likewise.
13994 (assign_parms): Likewise.
13995 (expand_function_start): Likewise.
13996 * gcc.c (CHKP_SPEC): Likewise.
13997 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13998 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13999 (wrestrict_dom_walker::check_call): Likewise.
14000 * gimple.c (gimple_build_call_from_tree): Likewise.
14001 * gimple.h (enum gf_mask): Likewise.
14002 (gimple_call_with_bounds_p): Likewise.
14003 (gimple_call_set_with_bounds): Likewise.
14004 * gimplify.c (gimplify_init_constructor): Likewise.
14005 * ipa-cp.c (initialize_node_lattices): Likewise.
14006 (propagate_constants_across_call): Likewise.
14007 (find_more_scalar_values_for_callers_subset): Likewise.
14008 * ipa-hsa.c (process_hsa_functions): Likewise.
14009 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14010 * ipa-icf.c (sem_function::merge): Likewise.
14011 * ipa-inline.c (early_inliner): Likewise.
14012 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14013 (warn_function_cold): Likewise.
14014 (propagate_pure_const): Likewise.
14015 * ipa-ref.h (enum GTY): Likewise.
14016 * ipa-split.c (find_retbnd): Likewise.
14017 (consider_split): Likewise.
14018 (split_function): Likewise.
14019 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14020 * ipa.c (walk_polymorphic_call_targets): Likewise.
14021 (symbol_table::remove_unreachable_nodes): Likewise.
14022 (process_references): Likewise.
14023 (cgraph_build_static_cdtor_1): Likewise.
14024 * lto-cgraph.c (lto_output_node): Likewise.
14025 (output_refs): Likewise.
14026 (compute_ltrans_boundary): Likewise.
14027 (input_overwrite_node): Likewise.
14028 (input_node): Likewise.
14029 (input_cgraph_1): Likewise.
14030 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14031 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14032 (class pass_chkp_instrumentation_passes): Likewise.
14033 (make_pass_chkp_instrumentation_passes): Likewise.
14034 * passes.def: Likewise.
14035 * rtl.h (struct GTY): Likewise.
14036 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14037 * stor-layout.c (layout_type): Likewise.
14038 * symtab.c: Likewise.
14039 * target.def: Likewise.
14040 * targhooks.c (default_chkp_bound_type): Likewise.
14041 (default_chkp_bound_mode): Likewise.
14042 (default_builtin_chkp_function): Likewise.
14043 (default_chkp_function_value_bounds): Likewise.
14044 (default_chkp_make_bounds_constant): Likewise.
14045 (default_chkp_initialize_bounds): Likewise.
14046 * targhooks.h (default_chkp_bound_type): Likewise.
14047 (default_chkp_bound_mode): Likewise.
14048 (default_builtin_chkp_function): Likewise.
14049 (default_chkp_function_value_bounds): Likewise.
14050 (default_chkp_make_bounds_constant): Likewise.
14051 (default_chkp_initialize_bounds): Likewise.
14052 * toplev.c (compile_file): Likewise.
14053 (process_options): Likewise.
14054 * tree-core.h (DEF_BUILTIN): Likewise.
14055 (DEF_BUILTIN_CHKP): Likewise.
14056 * tree-inline.c (declare_return_variable): Likewise.
14057 (remap_gimple_stmt): Likewise.
14058 (copy_bb): Likewise.
14059 (initialize_inlined_parameters): Likewise.
14060 (expand_call_inline): Likewise.
14061 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14062 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14063 (make_pass_ipa_chkp_produce_thunks): Likewise.
14064 (make_pass_chkp): Likewise.
14065 (make_pass_chkp_opt): Likewise.
14066 (make_pass_chkp_instrumentation_passes): Likewise.
14067 * tree-pretty-print.c (dump_generic_node): Likewise.
14068 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14069 * tree-ssa-dce.c (propagate_necessity): Likewise.
14070 (eliminate_unnecessary_stmts): Likewise.
14071 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14072 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14073 * tree-ssa-sccvn.h: Likewise.
14074 * tree-ssa-strlen.c (get_string_length): Likewise.
14075 (valid_builtin_call): Likewise.
14076 (adjust_last_stmt): Likewise.
14077 (handle_builtin_strchr): Likewise.
14078 (handle_builtin_strcpy): Likewise.
14079 (handle_builtin_stxncpy): Likewise.
14080 (handle_builtin_memcpy): Likewise.
14081 (handle_builtin_strcat): Likewise.
14082 (strlen_check_and_optimize_stmt): Likewise.
14083 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14084 * tree-streamer-in.c: Likewise.
14085 * tree-streamer.c (record_common_node): Likewise.
14086 * tree.c (tree_code_size): Likewise.
14087 (wide_int_to_tree_1): Likewise.
14088 (type_contains_placeholder_1): Likewise.
14089 (build_common_tree_nodes): Likewise.
14090 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14091 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14092 (POINTER_BOUNDS_P): Likewise.
14093 (BOUNDED_TYPE_P): Likewise.
14094 (BOUNDED_P): Likewise.
14095 (CALL_WITH_BOUNDS_P): Likewise.
14096 (pointer_bounds_type_node): Likewise.
14097 * value-prof.c (gimple_ic): Likewise.
14098 * var-tracking.c (vt_add_function_parameters): Likewise.
14099 * varasm.c (make_decl_rtl): Likewise.
14100 (assemble_start_function): Likewise.
14101 (output_constant): Likewise.
14102 (maybe_assemble_visibility): Likewise.
14103 * varpool.c (ctor_for_folding): Likewise.
14104 * chkp-builtins.def: Remove.
14105 * ipa-chkp.c: Remove.
14106 * ipa-chkp.h: Remove.
14107 * rtl-chkp.c: Remove.
14108 * rtl-chkp.h: Remove.
14109 * tree-chkp-opt.c: Remove.
14110 * tree-chkp.c: Remove.
14111 * tree-chkp.h: Remove.
14113 2018-06-07 Carl Love <cel@us.ibm.com>
14115 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14116 vextract_fp_from_shortl): Add BE support.
14118 2018-06-07 Paul Koning <ni1d@arrl.net>
14120 * compare-elim.c (try_merge_compare): Don't merge compare if
14121 address contains a side effect.
14122 (try_eliminate_compare): Likewise.
14124 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14126 * config.gcc: Support "tremont".
14127 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14128 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14130 * config/i386/i386.c (m_TREMONT): Define.
14131 (processor_target_table): Add "tremont".
14132 (PTA_TREMONT): Define.
14133 (ix86_lea_outperforms): Add TARGET_TREMONT.
14134 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14135 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14136 and M_INTEL_GOLDMONT_PLUS.
14137 (fold_builtin_cpu): Add "tremont".
14138 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14139 (ix86_option_override_internal): Add "tremont".
14140 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14141 (processor_type): Add PROCESSOR_TREMONT.
14142 * config/i386/x86-tune.def: Add m_TREMONT.
14143 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14145 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14147 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14148 symbol defined for msp430i* devices to be lower case.
14150 2018-06-07 Richard Biener <rguenther@suse.de>
14152 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14153 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14154 Properly wrap signed arithmetic if overflow wraps.
14156 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14158 PR tree-optimization/69615
14159 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14160 of a cast from a same precision integral SSA_NAME in a bb dominated
14161 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14162 cast to utype if rhs2 has already a compatible type.
14164 2018-06-07 Richard Biener <rguenther@suse.de>
14166 PR tree-optimization/85935
14167 * graphite-scop-detection.c (find_params_in_bb): Analyze
14168 condition operands with respect to the correct loop. Assert
14169 the analysis doesn't fail.
14171 2018-06-04 Carl Love <cel@us.ibm.com>
14173 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14174 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14175 as it is slightly cheaper.
14176 (first_match_or_eos_index_<mode>):
14177 Calculate index using natural element order.
14178 (first_match_index_<mode>):
14179 Calculate index using natural element order.
14180 (first_match_or_eos_index_<mode>):
14181 Calculate index using natural order.
14182 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14183 for BE and LE modes.
14184 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14185 P9V_BUILTIN_VCLZLSBB_V16QI.
14186 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14189 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14191 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14192 indentation and line wrap for many prototypes. Add missing
14193 @smallexample directives around block of prototypes for vec_xl and
14196 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14198 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14199 track if we pass or return IEEE 128-bit floating point.
14200 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14201 C++ mangling that is compatible with GCC 8.1.
14202 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14203 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14204 floating point types.
14205 (rs6000_function_arg_advance_1): Likewise.
14206 (rs6000_mangle_type): Optionally generate mangled names that match
14207 what GCC 8.1 generated for IEEE 128-bit floating point types.
14208 (rs6000_globalize_decl_name): If we have an external function that
14209 passes or returns IEEE 128-bit types, generate a weak reference
14210 from the mangled name used in GCC 8.1 to the current mangled
14212 (rs6000_init_builtins): Make __ibm128 use the long double type if
14213 long double is IBM extended double. Make __float128 use the long
14214 double type if long double is IEEE 128-bit.
14217 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14218 macro for __ibm128 built-in functions.
14219 (PACK_IF): Add __ibm128 pack/unpack functions.
14220 (UNPACK_IF): Likewise.
14221 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14222 enable long double built-in functions if long double is IEEE
14223 128-bit floating point.
14224 (rs6000_invalid_builtin): Update long double built-in function
14226 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14227 functions, adjust the built-in function to use the long double
14228 built-in function if __ibm128 and long double are the same type.
14229 * doc/extend.texi (PowerPC builtins): Update documention for
14230 __builtin_{,un}pack_longdouble. Add documentation for
14231 __builtin_{,un}pack_ibm128.
14233 2018-06-06 Jim Wilson <jimw@sifive.com>
14235 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14236 (struct machine_function): New field interrupt_mode.
14237 (riscv_handle_type_attribute): New function. Add forward declaration.
14238 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14239 (riscv_expand_epilogue): Check interrupt_mode field.
14240 (riscv_set_current_function): Check interrupt attribute args and
14241 set interrupt_mode field.
14242 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14243 (riscv_sret, riscv_uret): New.
14244 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14245 new arguments to interrupt attribute.
14247 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14250 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14251 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14253 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14255 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14256 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14257 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14258 several redundant entries.
14260 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14262 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14263 type from "rtx" to "rtx_insn *".
14264 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14265 for local "call_insn", removing cast.
14266 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14268 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14270 PR tree-optimization/86066
14271 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14272 for BIT_INSERT_EXPR stores.
14274 2018-06-06 Richard Biener <rguenther@suse.de>
14276 PR tree-optimization/86062
14277 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14278 component refs ontop
14279 of to be offsetted base.
14281 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14283 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14284 to be static and remove check on interrupt attribute name.
14286 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14288 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14289 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14291 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14294 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14296 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14297 Remove second argument, change how error is called.
14298 (aarch64_layout_arg): Remove second argument from
14299 aarch64_err_no_fpadvsimd call.
14300 (aarch64_init_cumulative_args): Ditto.
14301 (aarch64_gimplify_va_arg_expr): Ditto.
14302 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14304 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14306 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14307 (*simple_return_indirect_internal<mode>): Rename from
14308 simple_return_indirect_internal. Use W mode iterator.
14309 (rstorssp): New expander.
14310 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14311 (clrssbsy): New expander.
14312 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14314 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14316 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14318 (cmse_check_pointed_object): Likewise.
14320 2018-06-05 Martin Liska <mliska@suse.cz>
14322 PR gcov-profile/47618
14323 * doc/invoke.texi: Document how -fprofile-dir format
14326 2018-06-05 Richard Biener <rguenther@suse.de>
14328 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14329 removal pretend DOM info isn't available so we do not update
14330 it and only remove edges, not dominated blocks. Actually free
14331 DOM info in case we removed something. Remove unreachable blocks.
14332 (mfb_keep_latches): Work with either DOM info or marked backedges.
14333 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14334 first. Mark backedges if DOM info isn't available.
14335 (Re-)compute DOM info after cleanup_control_flow_pre.
14337 2018-06-05 Richard Biener <rguenther@suse.de>
14339 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14340 (locus_discrim_hasher::hash): Adjust.
14341 (locus_discrim_hasher::equal): Likewise.
14342 (next_discriminator_for_locus): Work on line directly.
14343 (same_line_p): Pass in expanded locus1 as well.
14344 (assign_discriminators): Avoid redundant location expansions.
14346 2018-06-05 Richard Biener <rguenther@suse.de>
14348 PR tree-optimization/86046
14349 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14350 if required after clearing TREE_ADDRESSABLE.
14352 2018-06-05 Richard Biener <rguenther@suse.de>
14354 PR tree-optimization/86047
14355 * tree-ssa-loop.c (for_each_index): Glob handling of all
14356 decls and constants and really handle all of them.
14358 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14361 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14362 qualifier_void_pointer and qualifier_const_void_pointer.
14363 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14364 (arm_init_builtins): Handle the above.
14365 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14366 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14367 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14370 2018-06-05 Martin Liska <mliska@suse.cz>
14372 * auto-profile.c (read_autofdo_file): Do not use
14373 gcov_ctr_summary struct.
14374 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14375 * coverage.c (struct counts_entry): Likewise.
14376 (read_counts_file): Read just single summary entry.
14377 (get_coverage_counts): Use gcov_summary struct.
14378 * coverage.h (get_coverage_counts): Likewise.
14379 * gcov-dump.c (dump_working_sets): Likewise.
14380 (tag_summary): Dump just single summary.
14381 * gcov-io.c (gcov_write_summary): Write just histogram
14383 (gcov_read_summary): Read just single summary.
14384 (compute_working_sets): Use gcov_summary struct.
14385 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14386 of GCOV_COUNTERS_SUMMABLE.
14387 (GCOV_COUNTERS_SUMMABLE): Remove.
14388 (GCOV_FIRST_VALUE_COUNTER): Replace with
14389 GCOV_COUNTER_V_INTERVAL.
14390 (struct gcov_ctr_summary): Remove.
14391 (struct gcov_summary): Directly use fields of former
14393 (compute_working_sets): Use gcov_summary struct.
14394 * gcov.c (read_count_file): Do not use ctrs fields.
14395 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14397 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14399 * profile.c: Likewise.
14400 * profile.h: Likewise.
14402 2018-06-05 Martin Liska <mliska@suse.cz>
14404 PR gcov-profile/84846
14405 * gcov.c (output_lines): Print working directory only
14406 in intermediate format.
14408 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14410 * config/s390/s390-builtin-types.def: Add void function type.
14411 * config/s390/s390-builtins.def: Use the function type for the
14414 2018-06-04 Jim Wilson <jimw@sifive.com>
14416 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14418 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14419 and maybe_eh_return. Change regno to unsigned int. Use new args to
14420 handle EH_RETURN_DATA_REGNO registers properly.
14421 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14422 (riscv_expand_epilogue): Update comment. Change argument name and
14423 type. Update code to use new name and type. Pass new args to
14424 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14426 * config/riscv/riscv.md (NORMAL_RETURN): New.
14427 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14428 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14429 (eh_return): Call gen_eh_return_internal and emit barrier.
14430 (eh_return_internal): Call riscv_expand_epilogue.
14432 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14434 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14435 bit_insertion field and declare can_be_merged_into method.
14436 (merged_store_group::can_be_merged_into): New method.
14437 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14438 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14439 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14441 2018-06-04 Richard Biener <rguenther@suse.de>
14443 PR tree-optimization/85955
14444 * builtins.c (fold_builtin_sincos): Convert pointers to
14445 destination to appropriate type before dereferencing.
14447 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14449 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14451 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14453 * expr.c (expand_expr_real_1): Force the operand into memory if
14454 its TYPE_MODE is BLKmode and if there is no integer mode for
14455 the number of bits being extracted.
14457 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14461 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14462 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14464 2018-06-04 Richard Biener <rguenther@suse.de>
14466 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14467 (cleanup_tree_cfg_noloop): ... single caller. Do
14468 start_recording_case_labels later.
14470 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14472 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14473 to _IMMINTRIN_H_INCLUDED.
14474 * config/i386/pconfigintrin.h: Ditto.
14475 * config/i386/waitpkgintrin.h: Ditto.
14476 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14477 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14478 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14479 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14480 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14481 waitpkgintrin.h and cldemoteintrin.h.
14483 2018-06-04 Richard Biener <rguenther@suse.de>
14485 PR tree-optimization/86038
14486 * tracer.c (find_best_successor): Check probability for
14487 being initialized, bail out if not.
14489 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14492 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14493 of bits to ignore when comparing architectures.
14495 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14497 PR tree-optimization/69615
14498 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14499 maximum or minimum of the type, try to merge it also as if
14500 range1 is + [-, x - 1] or + [x + 1, -].
14503 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14505 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14507 PR tree-optimization/86034
14508 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14509 the unsigned bitfield type in a bit insertion sequence if it does not
14510 have a larger precision than the bitfield size.
14511 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14513 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14515 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14517 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14519 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14520 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14521 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14522 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14524 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14526 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14527 Disable -fdelete-null-pointer-checks for ELF toolchain.
14529 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14530 Kito Cheng <kito.cheng@gmail.com>
14532 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14533 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14534 (nds32*-*-*): Add glibc and uclibc conditions.
14535 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14536 (TARGET_EXCEPT_UNWIND_INFO): Define.
14537 * config/nds32/elf.h: New file.
14538 * config/nds32/linux.h: New file.
14539 * config/nds32/nds32-elf.opt: New file.
14540 * config/nds32/nds32-linux.opt: New file.
14541 * config/nds32/nds32-fp-as-gp.c
14542 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14543 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14545 (nds32_asm_file_end): Ditto.
14546 (nds32_print_operand): Ditto.
14547 (nds32_insert_attributes): Ditto.
14548 (nds32_init_libfuncs): New function.
14549 (TARGET_HAVE_TLS): Define.
14550 (TARGET_INIT_LIBFUNCS): Define.
14551 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14553 (TARGET_ELF): Apply different mcmodel setting.
14554 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14555 been migrated into elf.h and linux.h files.
14556 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14557 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14558 (mcmodel): The content has been migrated into nds32-elf.opt and
14559 nds32-linux.opt files.
14560 * config/nds32/t-elf: New file.
14561 * config/nds32/t-linux: New file.
14563 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14564 Shiva Chen <shiva0217@gmail.com>
14566 * config/nds32/constants.md (unspec_volatile_element): Add
14567 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14568 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14570 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14571 (make_pass_nds32_fp_as_gp): Declare.
14572 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14574 (nds32_asm_function_end_prologue): Remove unused asm output.
14575 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14576 (nds32_asm_file_start): Output necessary fp_as_gp information.
14577 (nds32_option_override): Adjust register usage.
14578 (nds32_expand_prologue): Consider fp_as_gp situation.
14579 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14580 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14583 (simple_return): Ditto.
14584 (omit_fp_begin): Output special directive for fp_as_gp.
14585 (omit_fp_end): Output special directive for fp_as_gp.
14586 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14587 mforbid-fp-as-gp): New options.
14589 2018-06-01 Mark Wielaard <mark@klomp.org>
14591 * dwarf2out.c (dwarf2out_finish): Remove generation of
14592 DW_AT_loclists_base.
14594 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14596 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14597 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14598 (struct merged_store_group): Add bit_insertion field.
14599 (dump_char_array): Use standard hexadecimal format.
14600 (merged_store_group::merged_store_group): Set bit_insertion to false.
14601 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14602 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14603 also print the mask in the dump file.
14604 (pass_store_merging::gate): Minor tweak.
14605 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14606 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14607 stores with INTEGER_CST stores.
14608 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14609 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14610 and use it throughout. Generate bit insertion sequences if need be.
14611 (pass_store_merging::process_store): Remove redundant condition.
14612 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14614 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14616 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14617 the 128-bit floating point types. Fix function comment.
14619 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14621 * config/aarch64/aarch64-simd.md
14622 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14624 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14627 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14629 PR tree-optimization/85989
14630 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14632 (backprop::intersect_uses): Check it when deciding whether this
14633 is a backedge reference.
14634 (backprop::process_block): Add each phi to m_visited_phis
14635 after visiting it, then clear it at the end.
14637 2018-06-01 Richard Biener <rguenther@suse.de>
14639 * tree-vectorizer.h (vect_dr_stmt): New function.
14640 (vect_get_load_cost): Adjust.
14641 (vect_get_store_cost): Likewise.
14642 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14643 Use vect_dr_stmt instead of DR_SMTT.
14644 (vect_record_base_alignments): Likewise.
14645 (vect_calculate_target_alignment): Likewise.
14646 (vect_compute_data_ref_alignment): Likewise and make static.
14647 (vect_update_misalignment_for_peel): Likewise.
14648 (vect_verify_datarefs_alignment): Likewise.
14649 (vector_alignment_reachable_p): Likewise.
14650 (vect_get_data_access_cost): Likewise. Pass down
14651 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14652 (vect_get_peeling_costs_all_drs): Likewise.
14653 (vect_peeling_hash_get_lowest_cost): Likewise.
14654 (vect_enhance_data_refs_alignment): Likewise.
14655 (vect_find_same_alignment_drs): Likewise.
14656 (vect_analyze_data_refs_alignment): Likewise.
14657 (vect_analyze_group_access_1): Likewise.
14658 (vect_analyze_group_access): Likewise.
14659 (vect_analyze_data_ref_access): Likewise.
14660 (vect_analyze_data_ref_accesses): Likewise.
14661 (vect_vfa_segment_size): Likewise.
14662 (vect_small_gap_p): Likewise.
14663 (vectorizable_with_step_bound_p): Likewise.
14664 (vect_prune_runtime_alias_test_list): Likewise.
14665 (vect_analyze_data_refs): Likewise.
14666 (vect_supportable_dr_alignment): Likewise.
14667 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14668 (vect_gen_prolog_loop_niters): Likewise.
14669 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14670 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14672 (vect_recog_mask_conversion_pattern): Likewise.
14673 (vect_try_gather_scatter_pattern): Likewise.
14674 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14675 to vect_get_store_cost.
14676 (vect_get_store_cost): Get stmt_info instead of DR.
14677 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14678 (vect_get_load_cost): Get stmt_info instead of DR.
14680 2018-06-01 Richard Biener <rguenther@suse.de>
14682 PR middle-end/86017
14683 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14684 vars wrapped in MEM_REFs.
14686 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14688 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14689 Fix subreg tests so that we only return a choice between
14690 GENERAL_REGS and FP_REGS if the original classes included both.
14692 2018-06-01 Richard Biener <rguenther@suse.de>
14695 * tree-ssa-structalias.c (get_function_part_constraint):
14696 Handle NULL fi->decl.
14697 (find_func_aliases_for_call): Properly handle indirect
14698 fi from direct call.
14699 (find_func_clobbers): Likewise.
14700 (ipa_pta_execute): Likewise.
14701 (create_variable_info_for): For functions that are ifunc_resolver
14702 resolve to a varinfo that contains the result of the resolver call.
14703 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14706 2018-05-31 Michael Collison <michael.collison@arm.com>
14708 * config/aarch64/aarch64.md:
14709 (*fix_to_zero_extenddfdi2): New pattern.
14710 * gcc.target/aarch64/fix_extend1.c: New testcase.
14712 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
14714 PR middle-end/78809
14715 PR middle-end/83026
14716 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14717 and BUILT_IN_STRNCMP_EQ.
14718 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14719 BUILT_IN_STRNCMP_EQ.
14720 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14721 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14722 (gimple_fold_builtin): Likewise.
14723 * tree-ssa-strlen.c (compute_string_length): New function.
14724 (determine_min_obsize): New function.
14725 (handle_builtin_string_cmp): New function to handle calls to
14726 string compare functions.
14727 (strlen_optimize_stmt): Add handling to builtin string compare
14729 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14730 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14731 * tree.c (build_common_builtin_nodes): Add new defines of
14732 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14734 2018-05-31 Jakub Jelinek <jakub@redhat.com>
14737 * bb-reorder.c (pass_partition_blocks::gate): Return false for
14738 functions with naked attribute.
14740 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
14742 * config/i386/sse.md (avx_vec_concat<mode>):
14743 Substitute concat_tg_mode mode attribute with xtg_mode.
14744 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14745 (concat_tg_mode): Remove mode attribute.
14747 2018-05-31 Martin Sebor <msebor@redhat.com>
14750 * calls.c (alloc_max_size): Correct a logic error/typo.
14751 Treat excessive arguments as infinite. Warn for invalid arguments.
14752 * doc/invoke.texi (-Walloc-size-larger-than): Update.
14754 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
14757 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14758 and movx for Haswell.
14760 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
14761 Cesar Philippidis <cesar@codesourcery.com>
14763 PR middle-end/85879
14764 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14765 when emitting error on private/firstprivate reductions.
14766 * omp-low.c (lower_omp_target): Avoid reference-type processing
14767 on pointers for firstprivate clause.
14769 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14771 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14774 * config/aarch64/aarch64-simd.md
14775 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14776 (aarch64_ld1_x3_<mode>): Likewise
14777 (aarch64_st1x2<VALLDIF:mode>): Likewise
14778 (aarch64_st1_x2_<mode>): Likewise
14779 (aarch64_st1x3<VALLDIF:mode>): Likewise
14780 (aarch64_st1_x3_<mode>): Likewise
14781 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14782 (vld1_s8_x3): Likewise.
14783 (vld1_u16_x3): Likewise.
14784 (vld1_s16_x3): Likewise.
14785 (vld1_u32_x3): Likewise.
14786 (vld1_s32_x3): Likewise.
14787 (vld1_u64_x3): Likewise.
14788 (vld1_s64_x3): Likewise.
14789 (vld1_f16_x3): Likewise.
14790 (vld1_f32_x3): Likewise.
14791 (vld1_f64_x3): Likewise.
14792 (vld1_p8_x3): Likewise.
14793 (vld1_p16_x3): Likewise.
14794 (vld1_p64_x3): Likewise.
14795 (vld1q_u8_x3): Likewise.
14796 (vld1q_s8_x3): Likewise.
14797 (vld1q_u16_x3): Likewise.
14798 (vld1q_s16_x3): Likewise.
14799 (vld1q_u32_x3): Likewise.
14800 (vld1q_s32_x3): Likewise.
14801 (vld1q_u64_x3): Likewise.
14802 (vld1q_s64_x3): Likewise.
14803 (vld1q_f16_x3): Likewise.
14804 (vld1q_f32_x3): Likewise.
14805 (vld1q_f64_x3): Likewise.
14806 (vld1q_p8_x3): Likewise.
14807 (vld1q_p16_x3): Likewise.
14808 (vld1q_p64_x3): Likewise.
14809 (vst1_s64_x2): Likewise.
14810 (vst1_u64_x2): Likewise.
14811 (vst1_f64_x2): Likewise.
14812 (vst1_s8_x2): Likewise.
14813 (vst1_p8_x2): Likewise.
14814 (vst1_s16_x2): Likewise.
14815 (vst1_p16_x2): Likewise.
14816 (vst1_s32_x2): Likewise.
14817 (vst1_u8_x2): Likewise.
14818 (vst1_u16_x2): Likewise.
14819 (vst1_u32_x2): Likewise.
14820 (vst1_f16_x2): Likewise.
14821 (vst1_f32_x2): Likewise.
14822 (vst1_p64_x2): Likewise.
14823 (vst1q_s8_x2): Likewise.
14824 (vst1q_p8_x2): Likewise.
14825 (vst1q_s16_x2): Likewise.
14826 (vst1q_p16_x2): Likewise.
14827 (vst1q_s32_x2): Likewise.
14828 (vst1q_s64_x2): Likewise.
14829 (vst1q_u8_x2): Likewise.
14830 (vst1q_u16_x2): Likewise.
14831 (vst1q_u32_x2): Likewise.
14832 (vst1q_u64_x2): Likewise.
14833 (vst1q_f16_x2): Likewise.
14834 (vst1q_f32_x2): Likewise.
14835 (vst1q_f64_x2): Likewise.
14836 (vst1q_p64_x2): Likewise.
14837 (vst1_s64_x3): Likewise.
14838 (vst1_u64_x3): Likewise.
14839 (vst1_f64_x3): Likewise.
14840 (vst1_s8_x3): Likewise.
14841 (vst1_p8_x3): Likewise.
14842 (vst1_s16_x3): Likewise.
14843 (vst1_p16_x3): Likewise.
14844 (vst1_s32_x3): Likewise.
14845 (vst1_u8_x3): Likewise.
14846 (vst1_u16_x3): Likewise.
14847 (vst1_u32_x3): Likewise.
14848 (vst1_f16_x3): Likewise.
14849 (vst1_f32_x3): Likewise.
14850 (vst1_p64_x3): Likewise.
14851 (vst1q_s8_x3): Likewise.
14852 (vst1q_p8_x3): Likewise.
14853 (vst1q_s16_x3): Likewise.
14854 (vst1q_p16_x3): Likewise.
14855 (vst1q_s32_x3): Likewise.
14856 (vst1q_s64_x3): Likewise.
14857 (vst1q_u8_x3): Likewise.
14858 (vst1q_u16_x3): Likewise.
14859 (vst1q_u32_x3): Likewise.
14860 (vst1q_u64_x3): Likewise.
14861 (vst1q_f16_x3): Likewise.
14862 (vst1q_f32_x3): Likewise.
14863 (vst1q_f64_x3): Likewise.
14864 (vst1q_p64_x3): Likewise.
14866 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14868 * config/msp430/msp430.c (msp430_output_labelref): Prepend
14869 user_label_prefix to name.
14871 * tree-core.h: Update comment about the format of NAME string
14872 passed to handler in attribute_spec.
14874 * config/msp430/msp430.md: Remove erroneous subreg expression from
14875 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14876 zero_extend{q,h}isi2.
14878 2018-05-30 Borislav Petkov <bp@suse.de>
14880 * doc/extend.texi: Document some architecture specific
14881 constraints and sort entries.
14883 2018-05-30 Martin Sebor <msebor@redhat.com>
14885 PR middle-end/85369
14886 * builtins.c (expand_builtin_stpcpy_1): New function.
14887 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14888 only if the former succeeds.
14890 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
14892 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14895 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14897 * doc/invoke.texi (-flinker-output): Document
14899 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14901 * passes.c (ipa_write_summaries): Only modify statements if body
14903 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14904 incrementally linking.
14905 (ipa_passes): Likewise.
14906 * lto-cgraph.c (lto_output_node): When incrementally linking do not
14907 pass down resolution info.
14908 * common.opt (flag_incremental_link): Update info.
14909 * gcc.c (plugin specs): Turn flinker-output=* to
14910 -plugin-opt=-linker-output-known
14911 * toplev.c (compile_file): Also cut compilation when doing incremental
14913 * flag-types. (enum lto_partition_model): Add
14914 LTO_LINKER_OUTPUT_NOLTOREL.
14915 (invoke.texi): Add -flinker-output docs.
14916 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14917 link same way as WPA; do not stream in dead initializers.
14919 * dwarf2out.c (dwarf2out_die_ref_for_decl,
14920 darf2out_register_external_decl): Support incremental link.
14922 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14924 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14926 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
14928 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14929 it down to simple_object_copy_lto_debug_sections.
14930 (run_gcc): Determine incremental LTO link time and configure
14931 lto1 into non-wpa mode, disable renaming of debug sections.
14933 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
14935 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14936 descriptions of various incorrectly documented functions.
14938 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
14941 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14942 address check not strict.
14944 2018-05-30 Richard Biener <rguenther@suse.de>
14946 PR tree-optimization/85964
14947 * tracer.c (better_p): Drop initialized count check, we only
14948 call the function with initialized counts now.
14949 (find_best_successor): Do find a best edge if one
14950 has uninitialized count.
14951 (find_best_predecessor): Likewise. Do BB frequency check only
14952 if count is initialized.
14954 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
14956 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14957 (aarch64_ldrstr_offset_compare): New.
14958 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14959 load/store orderings.
14960 (aarch64_gen_adjusted_ldpstp): Likewise.
14962 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
14964 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14965 Check for subset of GENERAL_REGS and FP_REGS.
14966 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14969 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
14971 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14972 and wi::to_poly_offset. Add the current offset and then check
14973 whether the sum fits, rather than using an unchecked addition of
14974 a checked term. Check for a shwi rather than a uhwi.
14975 * expr.c (get_bit_range): Use tree_to_poly_uint64.
14976 (store_constructor): Use poly_int_tree_p.
14977 (expand_expr_real_1): Likewise.
14978 * function.c (assign_temp): Likewise.
14979 * fold-const.c (const_binop): Use poly_int_tree_p and
14980 wi::to_poly_offset.
14981 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
14983 * ipa-icf-gimple.c (func_checker::compare_operand): Use
14984 to_poly_offset for MEM offsets.
14985 * ipa-icf.c (sem_variable::equals): Likewise.
14986 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14987 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14988 wi::to_poly_offset for BIT_FIELD_REF offsets.
14989 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14990 wi::to_poly_offset.
14991 * var-tracking.c (emit_note_insn_var_location): Use
14992 tree_to_poly_uint64.
14994 2018-05-29 Jim Wilson <jimw@sifive.com>
14996 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14998 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15001 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15002 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15004 (sse4_1_round<mode>2): Use nonimmediate_operand
15005 for operand 1 predicate.
15007 2018-05-29 Martin Sebor <msebor@redhat.com>
15008 Richard Biener <rguenther@suse.de>
15011 * calls.c (get_size_range): Call determine_value_range instead
15012 of get_value_range..
15013 * tree-vrp.h (determine_value_range): Declared new function.
15014 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15016 2018-05-29 Richard Biener <rguenther@suse.de>
15018 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15019 sure to use non-pattern stmts for get_earlier_stmt arguments.
15020 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15021 called on pattern stmts.
15022 (get_later_stmt): Likewise.
15024 2018-05-29 Martin Liska <mliska@suse.cz>
15026 PR gcov-profile/85759
15027 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15030 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15032 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15034 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15038 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15039 VEC_PACK_FLOAT_EXPR): New tree codes.
15040 * tree-pretty-print.c (op_code_prio): Handle
15041 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15042 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15043 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15044 * tree-inline.c (estimate_operator_cost): Likewise.
15045 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15046 * fold-const.c (const_binop): Likewise.
15047 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15048 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15049 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15050 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15051 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15052 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15053 * expr.c (expand_expr_real_2): Likewise.
15054 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15055 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15056 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15058 * optabs.c (expand_widen_pattern_expr): For
15059 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15060 sign from result type rather than operand's type.
15061 (expand_binop_directly): For vec_packu_float_optab and
15062 vec_packs_float_optab allow result type to be different from operand's
15064 * optabs-tree.c (optab_for_tree_code): Handle
15065 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15066 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15067 * tree-vect-generic.c (expand_vector_operations_1): Handle
15068 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15069 VEC_PACK_FLOAT_EXPR.
15070 * tree-vect-stmts.c (supportable_widening_operation): Handle
15072 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15073 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15074 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15075 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15076 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15078 (vec_pack<floatprefix>_float_<mode>): New expander.
15079 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15081 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15082 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15083 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15084 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15085 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15087 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15088 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15089 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15090 VEC_PACK_FLOAT_EXPR): Document.
15092 2018-05-29 Richard Biener <rguenther@suse.de>
15094 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15096 (stmt_vec_info_vec): Make pointer.
15097 (init_stmt_vec_info_vec): Remove.
15098 (free_stmt_vec_info_vec): Likewise.
15099 (set_stmt_vec_info_vec): New function.
15100 (free_stmt_vec_infos): Likewise.
15101 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15102 (set_vinfo_for_stmt): Likewise.
15103 (get_earlier_stmt): Likewise.
15104 (get_later_stmt): Likewise.
15105 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15106 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15107 (vec_info::~vec_info): Free stmt_vec_infos.
15108 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15109 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15110 (pass_slp_vectorize::execute): Likewise.
15111 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15112 (free_stmt_vec_info_vec): Likewise.
15113 (set_stmt_vec_info_vec): New function.
15114 (free_stmt_vec_infos): Likewise.
15115 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15116 the global stmt_vec_info_vec.
15117 * tree-parloops.c (gather_scalar_reductions): Use
15118 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15121 2018-05-29 Richard Biener <rguenther@suse.de>
15123 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15125 2018-05-29 Martin Liska <mliska@suse.cz>
15126 David Malcolm <dmalcolm@redhat.com>
15128 * vec.c (test_reverse): New.
15129 (vec_c_tests): Add new test.
15130 * vec.h (vl_ptr>::reverse): New function.
15132 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15134 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15136 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15139 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15141 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15143 2018-05-28 Richard Biener <rguenther@suse.de>
15145 PR tree-optimization/85933
15146 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15147 look at stmts marked as vectorizable.
15149 2018-05-28 Richard Biener <rguenther@suse.de>
15151 PR tree-optimization/85934
15152 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15153 vector boolean check before scalar optimization.
15155 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15157 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15160 2018-05-28 Mark Wielaard <mark@klomp.org>
15162 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15163 if it is an expression containing a minus sign.
15165 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15167 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15169 2018-05-27 Paul Koning <ni1d@arrl.net>
15171 * config/pdp11/pdp11.md (truncsihi2): Remove.
15173 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15174 Chung-Ju Wu <jasonwucj@gmail.com>
15176 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15178 (unaligned_store_dw): Ditto.
15179 * config/nds32/nds32-memory-manipulation.c
15180 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15181 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15182 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15183 (emit_setmem_word_loop): Rename to ...
15184 (emit_setmem_doubleword_loop): ... this.
15185 (nds32_gen_dup_4_byte_to_word_value): New function.
15186 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15187 (nds32_expand_setmem_loop): Refine implementation.
15188 (nds32_expand_setmem_loop_v3m): Ditto.
15189 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15192 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15194 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15196 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15198 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15199 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15200 machine->attr_no_prologue_p.
15201 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15202 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15203 (nds32_expand_epilogue): Consider attr_naked_p.
15204 (nds32_expand_epilogue_v3pop): Likewise.
15205 (nds32_can_use_return_insn): Likewise.
15206 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15207 attr_no_prologue_p fields.
15208 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15210 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15213 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15215 * config/i386/sse.md
15216 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15218 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15220 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15222 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15224 (*<floatsuffix>floatv2div2sf2): Rename to ...
15225 (*float<floatunssuffix>v2div2sf2): ... this.
15226 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15227 (float<floatunssuffix>v2div2sf2_mask): ... this.
15228 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15229 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15230 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15232 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15234 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15236 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15238 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15240 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15242 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15243 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15244 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15245 gen_ufix_truncv8dfv8si2.
15246 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15247 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15248 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15249 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15250 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15251 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15252 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15253 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15255 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15259 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15261 2018-05-25 Jim Wilson <jimw@sifive.com>
15263 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15264 * config/riscv/riscv.c (struct machine_function): Add
15265 interrupt_handler_p and attribute_checked_p fields.
15266 (riscv_attribute_table): Add interrupt.
15267 (riscv_interrupt_type_p): New.
15268 (riscv_save_reg_p): Save extra regs for interrupt handler.
15269 (riscv_use_save_libcall): Return false for interrupt handler.
15270 (riscv_first_stack_step): Add forward declaration.
15271 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15272 for interrupt handler with large frame. Use it for saved reg list.
15273 (riscv_expand_prologue): Move flag_stack_usage_info support to
15274 eliminate duplication.
15275 (riscv_expand_epilogue): Generate mret for interrupt handler.
15276 (riscv_epilogue_uses): New.
15277 (riscv_can_use_return_insn): Return false for interrupt handler.
15278 (riscv_function_ok_for_sibcall): Likewise.
15279 (riscv_set_current_function): Add interrupt handler support.
15280 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15281 * config/riscv/riscv.md (UNSPECV_MRET): New.
15283 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15285 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15287 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15289 PR tree-optimization/85712
15290 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15291 this candidate has already been replaced in-situ by a copy.
15293 2018-05-25 Jason Merrill <jason@redhat.com>
15295 PR c++/80485 - inline function non-zero address.
15296 * symtab.c (nonzero_address): Check DECL_COMDAT.
15298 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15301 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15302 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15303 extension of SImode operation. Use const123_operand predicate.
15304 (*saddsi_1): Remove.
15305 (*saddl_se_1): Ditto.
15306 (*ssubsi_1): Ditto.
15307 (*ssubl_se_1): Ditto.
15308 * config/alpha/predicates.md (const123_operand): New predicate.
15309 * config/alpha/constraints.md (P): Use IN_RANGE.
15311 2018-05-25 Richard Biener <rguenther@suse.de>
15313 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15315 (ref_maybe_used_by_stmt_p): Likewise.
15316 (stmt_may_clobber_ref_p): Likewise.
15317 (stmt_may_clobber_ref_p_1): Likewise.
15318 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15320 (ref_maybe_used_by_stmt_p): Likewise.
15321 (stmt_may_clobber_ref_p): Likewise.
15322 (stmt_may_clobber_ref_p_1): Likewise.
15323 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15324 the alias oracle to disambiguate DRs with stmts DR analysis
15326 (vect_analyze_data_refs): Do not give up on not analyzable
15327 DRs for BB vectorization. Remove code truncating the dataref
15330 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15333 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15334 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15335 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15337 2018-05-25 Richard Biener <rguenther@suse.de>
15339 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15340 function, combining stmt data ref gathering and fatal analysis
15342 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15343 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15344 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15345 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15346 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15348 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15350 PR tree-optimization/85720
15351 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15352 SCC if all partitions are builtins.
15353 (version_loop_by_alias_check): New parameter. Generate cancelable
15354 runtime alias check if all partitions are builtins.
15355 (distribute_loop): Update call to above function.
15357 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15359 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15360 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15361 (parm_default_def_partition_arg): Ditto.
15362 (set_parm_default_def_partition): Ditto.
15363 (get_parm_default_def_partitions): Ditto and make it static.
15364 (get_undefined_value_partitions): Ditto and make it static.
15365 (remove_ssa_form): Refactor call to init_var_map here.
15366 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15367 computation for loop region.
15368 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15369 (register_default_def): Delete.
15370 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15371 (parm_default_def_partition_arg): Ditto.
15372 (set_parm_default_def_partition): Ditto.
15373 (get_parm_default_def_partitions): Ditto and make it static.
15374 (get_undefined_value_partitions): Ditto and make it static.
15375 (coalesce_with_default, coalesce_with_default): Update comment.
15376 (create_coalesce_list_for_region): New func factored out from
15377 create_outofssa_var_map.
15378 (populate_coalesce_list_for_outofssa): New func factored out from
15379 create_outofssa_var_map and coalesce_ssa_name.
15380 (create_outofssa_var_map): Delete.
15381 (coalesce_ssa_name): Refactor to support live range computation.
15382 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15383 (get_parm_default_def_partitions): Delete.
15384 (get_undefined_value_partitions): Ditto.
15385 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15386 computation for loop region.
15387 (new_tree_live_info, loe_visit_block): Ditto.
15388 (live_worklist, set_var_live_on_entry): Ditto.
15389 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15390 * tree-ssa-live.h (struct _var_map): New fields.
15391 (init_var_map): Change decl.
15392 (region_contains_p): New.
15394 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15396 * tree-ssa-live.h (live_merge_and_clear): Delete.
15398 2018-05-25 Richard Biener <rguenther@suse.de>
15401 * tree-dump.c (dequeue_and_dump): Remove access to removed
15402 operand 2 of a SWITCH_EXPR.
15404 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15406 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15407 multiplication and division.
15408 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15409 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15410 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15411 (cond_udiv_optab, cond_umod_optab): New optabs.
15412 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15413 (IFN_COND_RDIV): New internal functions.
15414 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15415 TRUNC_MOD_EXPR and RDIV_EXPR.
15416 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15417 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15419 (SVE_INT_BINARY): Include mult.
15420 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15421 (optab, sve_int_op): Handle mult.
15422 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15424 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15425 for SVE_INT_BINARY_SD.
15427 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15429 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15430 (optab, sve_int_op): Handle div and udiv.
15431 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15432 for SVE_INT_BINARY_SD.
15433 (*<optab><mode>3): New insn for the same.
15435 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15437 * tree-vect-patterns.c: Include predict.h.
15438 (vect_recog_divmod_pattern): Restrict check for division support
15439 to when optimizing for size.
15441 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15443 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15444 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15445 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15446 (gimple_match_op::set_op): Likewise.
15447 (gimple_resimplify4): Declare.
15448 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15449 (expr::gen_transform): Likewise.
15450 (decision_tree::gen): Generate a simplification routine for 4 operands.
15451 * gimple-match-head.c (gimple_simplify): Add an overload for
15452 4 operands. In the top-level function, handle up to 4 call
15453 arguments and call gimple_resimplify4.
15454 (gimple_resimplify4): New function.
15455 (build_call_internal): Pass a fourth operand.
15456 (maybe_push_to_seq): Likewise.
15457 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15458 Fold VEC_COND_EXPRs of an operation and a default value into
15459 an IFN_COND_* function if possible.
15460 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15462 (SVE_COND_FP_BINARY): Include them.
15463 (optab, sve_fp_op): Handle them.
15464 (SVE_INT_BINARY_REV): New code iterator.
15465 (SVE_COND_FP_BINARY_REV): New int iterator.
15466 (commutative): New int attribute.
15467 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15469 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15471 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15472 (*cond_<optab><mode>): New patterns for reversed operands.
15474 2018-05-25 Richard Biener <rguenther@suse.de>
15476 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15477 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15478 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15479 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15480 * tree-vect-data-refs.c (everywhere): Adjust users.
15481 * tree-vect-loop.c (everywhere): Likewise.
15482 * tree-vect-slp.c (everywhere): Likewise.
15483 * tree-vect-stmts.c (everywhere): Likewise.
15484 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15486 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15488 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15490 (gcc_cv_as_section_exclude): ... this.
15491 Try Solaris as #exclude syntax.
15492 * configure: Regenerate.
15493 * config.in: Regenerate.
15494 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15496 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15497 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15499 * varasm.c (default_elf_asm_named_section): Don't check if
15500 HAVE_GAS_SECTION_EXCLUDE is defined.
15502 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15504 * doc/md.texi: Update the documentation of the cond_* optabs
15505 to mention the new final operand. Fix GET_MODE_NUNITS call.
15506 Describe the scalar case too.
15507 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15508 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15510 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15511 (get_conditional_internal_fn): Update comment.
15512 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15513 accumulator value as a final argument to conditional functions.
15514 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15515 a define_expand and add an "else" operand. Assert for now that
15516 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15517 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15518 (*cond_<optab><mode>): New patterns.
15519 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15520 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15521 (UNSPEC_COND_EOR): Delete.
15522 (optab): Remove associated mappings.
15523 (SVE_INT_BINARY): New code iterator.
15524 (sve_int_op): Remove int attribute and add "minus" to the code
15526 (SVE_COND_INT_OP): Delete.
15527 (SVE_COND_FP_OP): Rename to...
15528 (SVE_COND_FP_BINARY): ...this.
15530 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15532 * optabs.c (can_reuse_operands_p): New function.
15533 (maybe_legitimize_operands): Try to reuse the results for
15536 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15538 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15539 Add {q} suffix to insn mnemonic.
15541 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15543 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15544 (msp430_warn_func_return): New.
15546 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15548 * fold-const.c (tree_nonzero_bits): New function.
15549 * fold-const.h (tree_nonzero_bits): Likewise.
15550 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15551 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15553 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15557 * varasm.c (assemble_alias): Check ifunc_resolver only on
15560 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15563 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15564 when memory input operand is handled.
15566 2018-05-24 Luis Machado <luis.machado@linaro.org>
15568 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15570 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15572 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15574 * match.pd: Delay FMA folds until after vectorization.
15576 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15579 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15580 address check not strict.
15582 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15584 * gimple-match.h (gimple_match_op): New class.
15585 (mprts_hook): Replace parameters with a gimple_match_op *.
15586 (maybe_build_generic_op): Likewise.
15587 (gimple_simplified_result_is_gimple_val): Replace parameters with
15588 a const gimple_match_op *.
15589 (gimple_simplify): Replace code_helper * and tree * parameters with
15590 a gimple_match_op * parameter.
15591 (gimple_resimplify1): Replace code_helper *, tree and tree *
15592 parameters with a gimple_match_op * parameter.
15593 (gimple_resimplify2): Likewise.
15594 (gimple_resimplify3): Likewise.
15595 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15596 parameters with a gimple_match_op * parameter.
15597 * gimple-match-head.c (gimple_simplify): Change prototypes of
15598 auto-generated functions to take a gimple_match_op * instead of
15599 separate code_helper * and tree * parameters. Make the same
15600 change in the top-level overload and update calls to the
15601 gimple_resimplify routines. Update calls to the auto-generated
15602 functions and to maybe_push_res_to_seq in the publicly-facing
15603 operation-specific gimple_simplify overloads.
15604 (gimple_match_op::MAX_NUM_OPS): Define.
15605 (gimple_resimplify1): Replace rcode and ops with a single res_op
15606 parameter. Update call to gimple_simplify.
15607 (gimple_resimplify2): Likewise.
15608 (gimple_resimplify3): Likewise.
15609 (mprts_hook): Replace parameters with a gimple_match_op *.
15610 (maybe_build_generic_op): Likewise.
15611 (build_call_internal): Replace type, nargs and ops with
15612 a gimple_match_op *.
15613 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15614 with a single gimple_match_op *. Update calls to mprts_hook,
15615 build_call_internal and gimple_simplified_result_is_gimple_val.
15616 Factor out code that is common to the tree_code and combined_fn cases.
15617 * genmatch.c (expr::gen_transform): Replace tem_code and
15618 tem_ops with a gimple_match_op called tem_op. Update calls
15619 to the gimple_resimplify functions and maybe_push_res_to_seq.
15620 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15621 res_ops. Update call to the gimple_resimplify functions.
15622 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15623 (decision_tree::gen): Make the functions take a gimple_match_op *
15624 called res_op instead of separate res_code and res_ops parameters.
15625 Update call accordingly.
15626 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15627 and ops with a single res_op parameter. Update calls to
15628 maybe_build_generic_op and maybe_push_res_to_seq.
15629 (fold_stmt_1): Update calls to gimple_simplify and
15630 replace_stmt_with_simplification.
15631 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15632 and gimple_simplified_result_is_gimple_val.
15633 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15635 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15636 with a gimple_match_op *.
15637 (vn_nary_build_or_lookup): Likewise. Update call to
15638 vn_nary_build_or_lookup_1.
15639 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15640 gimple_match_op *. Update calls to the gimple_resimplify routines
15641 and to gimple_simplified_result_is_gimple_val.
15642 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15643 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15644 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15645 (visit_nary_op): Likewise.
15646 (visit_reference_op_load): Likewise.
15648 2018-05-23 Luis Machado <luis.machado@linaro.org>
15650 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15651 modifier for printing the step amount.
15653 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15656 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15659 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15661 * doc/sourcebuild.texi (Endianness): New subsubsection.
15663 2018-05-23 Luis Machado <luis.machado@linaro.org>
15665 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15666 <prefetch_dynamic_strides>: New const bool field.
15667 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15668 prefetch_dynamic_strides.
15669 (exynosm1_prefetch_tune): Likewise.
15670 (thunderxt88_prefetch_tune): Likewise.
15671 (thunderx_prefetch_tune): Likewise.
15672 (thunderx2t99_prefetch_tune): Likewise.
15673 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15675 (aarch64_override_options_internal): Update to set
15676 PARAM_PREFETCH_DYNAMIC_STRIDES.
15677 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15678 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15679 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15680 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15681 prefetch-dynamic-strides setting.
15683 2018-05-23 Luis Machado <luis.machado@linaro.org>
15685 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15686 <minimum_stride>: New const int field.
15687 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15688 minimum_stride field defaulting to -1.
15689 (exynosm1_prefetch_tune): Likewise.
15690 (thunderxt88_prefetch_tune): Likewise.
15691 (thunderx_prefetch_tune): Likewise.
15692 (thunderx2t99_prefetch_tune): Likewise.
15693 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15694 <default_opt_level>: Set to 3.
15695 (aarch64_override_options_internal): Update to set
15696 PARAM_PREFETCH_MINIMUM_STRIDE.
15697 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15698 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15699 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15700 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15701 stride is constant and is below the minimum stride threshold.
15703 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15705 * config/arm/arm-cpus.in (mode26): Delete.
15706 (armv4): Delete mode26 reference.
15707 * config/arm/arm.c (arm_configure_build_target): Delete use of
15710 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15712 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15714 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15715 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
15717 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
15718 (floatunsdidf2): Ditto.
15720 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
15722 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15723 (fixuns_trunc<mode>si2_avx512f): Ditto.
15724 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15725 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15726 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15728 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15730 PR rtl-optimization/79985
15731 * df-scan.c (df_insn_refs_collect): Remove special case for
15732 global registers and asm statements.
15734 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
15736 * extend.texi (Global Register Variables): Rewrite the bullet list.
15737 Note that the register is available for allocation. Note that access
15738 via inline asm must use constraints. Add note about async-signal
15739 handlers. Remove paragraph about automagic register selection.
15741 2018-05-23 Richard Biener <rguenther@suse.de>
15743 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15744 of fixed offset from memset VN.
15746 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
15748 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15749 first_interp field.
15750 (alloc_cand_and_find_basis): Initialize first_interp field.
15751 (slsr_process_mul): Modify first_interp field.
15752 (slsr_process_add): Likewise.
15753 (slsr_process_cast): Modify first_interp field for each new
15755 (slsr_process_copy): Likewise.
15756 (dump_candidate): Dump first_interp field.
15757 (replace_mult_candidate): Process all interpretations, not just
15759 (replace_rhs_if_not_dup): Likewise.
15760 (replace_one_candidate): Likewise.
15762 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
15764 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15766 (aarch64_needs_frame_chain): New function.
15767 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15769 2018-05-23 Sudakshina Das <sudi.das@arm.com>
15772 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15773 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15774 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15775 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15776 as true for strict-align.
15777 (aarch64_can_inline_p): Perform checks even when callee has no
15778 attributes to check for strict alignment.
15779 * doc/extend.texi (AArch64 Function Attributes): Document
15781 * doc/invoke.texi: (AArch64 Options): Likewise.
15783 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
15785 PR tree-optimization/85853
15786 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15787 the handling of the root of the node to...
15788 (vect_slp_analyze_node_operations_1): ...this new function,
15789 and run the whole thing with the child nodes' def types
15790 set according to their SLP node's def type.
15792 2018-05-23 Richard Biener <rguenther@suse.de>
15794 PR middle-end/85874
15795 * tree-data-ref.c (create_runtime_alias_checks): Defer
15796 and ignore overflow warnings.
15798 2018-05-23 Yury Gribov <tetra2005@gmail.com>
15800 PR tree-optimization/85822
15801 * tree-vrp.c (is_masked_range_test): Fix handling of negative
15804 2018-05-23 Richard Biener <rguenther@suse.de>
15806 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15807 memset constants via native_interpret_expr.
15809 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
15812 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15814 (cgraph_node::create_alias): Likewise.
15815 (cgraph_node::get_availability): Check ifunc_resolver instead
15816 of looking up ifunc attribute.
15817 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15818 * varasm.c (do_assemble_alias): Likewise.
15819 (assemble_alias): Likewise.
15820 (default_binds_local_p_3): Likewise.
15821 * cgraph.h (cgraph_node): Add ifunc_resolver.
15822 (cgraph_node::only_called_directly_or_aliased_p): Return false
15823 for IFUNC resolver.
15824 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15826 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15827 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15828 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15829 instead of looking up ifunc attribute.
15831 2018-05-22 Luis Machado <luis.machado@linaro.org>
15833 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15835 2018-05-22 Martin Sebor <msebor@redhat.com>
15837 PR middle-end/85359
15838 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15839 only when expasion succeeds.
15840 (expand_builtin_strcmp): Same.
15841 (expand_builtin_strncmp): Same.
15843 2018-05-22 Martin Sebor <msebor@redhat.com>
15845 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15847 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15848 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15850 * config/aarch64/aarch64-ldpstp.md: Replace uses of
15851 aarch64_mem_pair_operand with memory_operand and delete operand swapping
15853 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15854 Add check for legitimate_address.
15855 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15856 (aarch64_swap_ldrstr_operands): New.
15857 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15860 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
15861 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15863 * config/aarch64/aarch64.md: New patterns to generate stp
15865 (store_pair_sw, store_pair_dw): New patterns to generate stp for
15866 single words and double words.
15867 (load_pair_sw, load_pair_dw): Likewise.
15868 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15870 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15872 * config/aarch64/aarch64-ldpstp.md: Modify peephole
15873 for different mode ldpstp and add peephole for merged zero stores.
15874 Likewise for loads.
15875 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15877 (aarch64_gen_store_pair): Rename calls to match new patterns.
15878 (aarch64_gen_load_pair): Rename calls to match new patterns.
15879 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15880 (load_pair<DREG:mode><DREG2:mode>): ... This.
15881 (store_pair<mode>): Rename to...
15882 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15883 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15884 New mode iterators.
15885 (V_INT_EQUIV): Handle SImode.
15886 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15889 2018-05-22 Martin Sebor <msebor@redhat.com>
15892 * calls.c (maybe_warn_nonstring_arg): Use string length to set
15893 or ajust the presumed bound on an operation to avoid unnecessary
15896 2018-05-22 Martin Sebor <msebor@redhat.com>
15898 PR tree-optimization/85826
15899 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15900 assuming that a DECL necesarily has a constant size.
15902 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
15904 PR middle-end/85862
15905 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15907 2018-05-22 Richard Biener <rguenther@suse.de>
15909 PR tree-optimization/85834
15910 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15911 non-constant and non-zero memset arguments.
15913 2018-05-22 Martin Liska <mliska@suse.cz>
15916 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15918 2018-05-22 Richard Biener <rguenther@suse.de>
15920 PR tree-optimization/85863
15921 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15922 comparisons when vectype is specified.
15923 (vectorizable_condition): Do not specify vectype for
15924 vect_is_simple_cond when SLP vectorizing.
15926 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
15929 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15930 define __ibm128 as long double.
15931 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15932 as a distinct type when IEEE 128-bit support is enabled.
15933 (init_float128_ieee): Fix up conversions between IFmode and IEEE
15934 128-bit types to use the correct functions.
15935 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15936 convert between 128-bit floating point types that have different
15937 modes but the same representation, instead of using gen_lowpart to
15939 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15941 (IFKF_reg): New attributes to give the register constraints for
15943 (extend<mode>tf2_internal): New insns to mark an explicit
15944 conversion between 128-bit floating point types that have a
15945 different mode but share the same representation.
15947 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
15949 PR tree-optimization/85814
15950 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15951 a null return from get_strinfo when unsharing the next
15952 strinfo in the chain.
15954 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15957 * varasm.c (weak_finish): Clean up weak_decls.
15959 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15961 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15962 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15963 UNSPEC_UADALP values.
15964 * config/aarch64/iterators.md (ABAL): New int iterator.
15967 (sur): Add mappings for the above.
15968 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15970 (aarch64_<sur>abal<mode>_4): Likewise.
15971 (aarch64_<sur>adalp<mode>_3): Likewise.
15972 (<sur>sadv16qi): New define_expand.
15974 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
15976 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15977 (*movdf_internal): Ditto.
15978 (*rcpsf2_sse): Ditto.
15979 (*rsqrtsf2_sse): Ditto.
15980 (*sqrt<mode>2_sse): Ditto.
15982 2018-05-21 Tamar Christina <tamar.christina@arm.com>
15984 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15986 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15987 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15988 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15989 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15991 * config/aarch64/arm_neon.h: Likewise.
15992 * config/aarch64/iterators.md (VQ_I): New.
15994 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
15996 * config.gcc: Add arc/t-multilib-linux to tmake_file for
15998 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16001 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16003 * config/nds32/constraints.md (S): New constraint.
16004 * config/nds32/nds32.md (call_internal): Use constraint S.
16005 (call_value_internal): Likewise.
16006 (sibcall_internal): Likewise.
16007 (sibcall_value_internal): Likewise.
16009 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16010 Chung-Ju Wu <jasonwucj@gmail.com>
16012 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16013 into consideration.
16015 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16016 Chung-Ju Wu <jasonwucj@gmail.com>
16018 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16019 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16020 (nds32_rtx_costs_impl): Simplify.
16021 (nds32_address_cost_impl): Simplify.
16022 (nds32_init_rtx_costs): New function.
16023 (nds32_rtx_costs_speed_prefer): Likewise.
16024 (nds32_rtx_costs_size_prefer): Likewise.
16025 (nds32_address_cost_speed_prefer): Likewise.
16026 (nds32_address_cost_speed_fwprop): Likewise.
16027 (nds32_address_cost_size_prefer): Likewise.
16028 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16029 * config/nds32/nds32.c (nds32_option_override): Use
16030 nds32_init_rtx_costs function.
16032 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16034 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16035 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16036 (TARGET_PIPELINE_N8): Likewise.
16037 (TARGET_PIPELINE_N10): Likewise.
16038 (TARGET_PIPELINE_N13): Likewise.
16039 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16041 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16043 * config/nds32/nds32-fpu.md: Update copyright year.
16045 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16047 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16049 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16051 * config/nds32/nds32.c
16052 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16053 * config/nds32/nds32.opt (minline-asm-r15): New option.
16055 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16057 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16059 * config/nds32/nds32.md (abssi2): New pattern.
16061 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16063 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16064 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16065 Merge insn pattern from sse_cvtsi2ss<round_name> and
16066 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16067 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16068 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16069 using SWI48 mode iterator.
16070 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16071 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16072 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16073 pattern from sse_cvttss2si<round_saeonly_name>
16074 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16075 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16076 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16077 using SWI48 mode iterator.
16078 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16079 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16080 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16081 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16082 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16083 using SWI48 mode iterator.
16084 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16085 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16086 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16087 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16088 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16089 SWI48 mode iterator.
16090 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16091 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16092 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16093 pattern from sse_cvttsd2si<round_saeonly_name>
16094 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16096 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16098 * config/nds32/nds32-md-auxiliary.c
16099 (nds32_valid_smw_lwm_base_p): Refine.
16100 (nds32_output_smw_single_word): Refine.
16101 (nds32_output_smw_double_word): New.
16102 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16104 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16106 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16107 (nds32_output_stack_pop): Refine.
16108 (nds32_expand_unaligned_load): Refine.
16109 (nds32_expand_unaligned_store): Refine.
16111 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16112 Chung-Ju Wu <jasonwucj@gmail.com>
16114 * config/nds32/constants.md: Add TP_REGNUM constant.
16115 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16116 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16118 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16119 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16120 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16121 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16122 and PIC code generation.
16123 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16125 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16127 * config/nds32/nds32.md: Support TLS and PIC.
16128 * config/nds32/nds32.c: Support TLS and PIC.
16129 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16130 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16133 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16135 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16136 mode with E_ prefix.
16138 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16139 Chung-Ju Wu <jasonwucj@gmail.com>
16141 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16142 * config/nds32/nds32-md-auxiliary.c
16143 (symbolic_reference_mentioned_p): New.
16144 (nds32_legitimize_ict_address): New.
16145 (nds32_expand_ict_move): New.
16146 (nds32_indirect_call_referenced_p): New.
16147 (nds32_symbol_binds_local_p): Delete.
16148 (nds32_long_call_p): Modify.
16149 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16150 * config/nds32/nds32-protos.h
16151 (symbolic_reference_mentioned_p): Declare.
16152 (nds32_legitimize_ict_address): Declare.
16153 (nds32_expand_ict_move): Declare.
16154 (nds32_indirect_call_referenced_p): Declare.
16155 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16156 (nds32_relax_group): Use nds32_ict_const_p as condition.
16157 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16158 (nds32_asm_file_start): Output ict_model directive in asm code.
16159 (nds32_legitimate_address_p): Consider indirect call.
16160 (nds32_print_operand): Consider indirect call.
16161 (nds32_print_operand_address): Consider indirect call.
16162 (nds32_insert_attributes): Handle "indirect_call" attribute.
16163 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16164 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16165 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16166 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16167 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16168 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16169 (TARGET_ICT_MODEL_SMALL): Define.
16170 (TARGET_ICT_MODEL_LARGE): Define.
16171 * config/nds32/nds32.md (movsi): Consider ict model.
16172 (call, call_value): Consider ict model.
16173 (sibcall, sibcall_value): Consider ict model.
16174 * config/nds32/nds32.opt (mict-model): New option.
16175 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16178 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16179 Monk Chiang <sh.chiang04@gmail.com>
16180 Jim Wilson <jimw@sifive.com>
16182 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16183 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16184 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16185 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16186 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16187 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16188 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16189 compute save_libcall_adjustment properly.
16190 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16191 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16192 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16193 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16194 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16195 (ABI_SPEC): Handle mabi=ilp32e.
16196 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16197 (RVE): Add RVE mask.
16198 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16199 <-march>: Add rv32e as an example.
16201 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16204 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16205 (intra_create_variable_infos): Handle C++ constructors.
16207 2018-05-18 Martin Liska <mliska@suse.cz>
16209 * passes.def: Remove a redundant pass.
16211 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16214 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16216 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16218 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16220 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16222 (armv2, armv2a, armv3, armv3m): Delete architectures.
16223 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16224 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16225 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16227 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16228 (*mulsidi3adddi): Likewise.
16229 (mulsidi3): Likewise.
16230 (*mulsidi3_nov6): Likewise.
16231 (umulsidi3): Likewise.
16232 (umulsidi3_nov6): Likewise.
16233 (umaddsidi4): Likewise.
16234 (*umulsidi3adddi): Likewise.
16235 (smulsi3_highpart): Likewise.
16236 (*smulsi3_highpart_nov6): Likewise.
16237 (umulsi3_highpart): Likewise.
16238 (*umulsi3_highpart_nov6): Likewise.
16239 * config/arm/arm.h (arm_arch3m): Delete.
16240 * config/arm/arm.c (arm_arch3m): Delete.
16241 (arm_option_override_internal): Update armv3-related comment.
16242 (arm_configure_build_target): Delete use of isa_bit_mode32.
16243 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16244 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16245 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16246 (mulsa3): Likewise.
16247 (mulusa3): Likewise.
16248 * config/arm/arm-protos.h (arm_arch3m): Delete.
16249 * config/arm/arm-tables.opt: Regenerate.
16250 * config/arm/arm-tune.md: Likewise.
16251 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16252 deleted architectures.
16254 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16256 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16257 (armv5t, armv5te): New features.
16258 (ARMv5, ARMv5e): Delete fgroups.
16259 (ARMv5t, ARMv5te): Adjust for above changes.
16260 (ARMv6m): Likewise.
16261 (armv5, armv5e): Delete arches.
16262 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16264 (*call_reg_arm): Likewise.
16265 (*call_value_reg_armv5): Likewise.
16266 (*call_value_reg_arm): Likewise.
16267 (*call_symbol): Likewise.
16268 (*call_value_symbol): Likewise.
16269 (*sibcall_insn): Likewise.
16270 (*sibcall_value_insn): Likewise.
16271 (clzsi2): Likewise.
16272 (prefetch): Likewise.
16273 (define_split and define_peephole2 dependent on arm_arch5):
16275 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16277 (TARGET_ARM_QBIT): Likewise.
16278 (TARGET_DSP_MULTIPLY): Likewise.
16279 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16280 (arm_arch5, arm_arch5e): Delete.
16281 (arm_arch5t, arm_arch5te): Declare.
16282 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16283 (arm_arch5t): Declare.
16284 (arm_option_reconfigure_globals): Update for the above.
16285 (arm_options_perform_arch_sanity_checks): Update comment, replace
16286 use of arm_arch5 with arm_arch5t.
16287 (use_return_insn): Likewise.
16288 (arm_emit_call_insn): Likewise.
16289 (output_return_instruction): Likewise.
16290 (arm_final_prescan_insn): Likewise.
16291 (arm_coproc_builtin_available): Likewise.
16292 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16293 arm_arch5e with arm_arch5t and arm_arch5te.
16294 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16295 (arm_arch5t, arm_arch5te): Declare.
16296 * config/arm/arm-tables.opt: Regenerate.
16297 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16298 * config/arm/t-multilib: Likewise.
16299 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16300 instead of arm_arch5.
16301 (*call_reg_thumb1): Likewise.
16302 (*call_value_reg_thumb1_v5): Likewise.
16303 (*call_value_reg_thumb1): Likewise.
16304 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16306 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16308 2018-05-18 Martin Liska <mliska@suse.cz>
16310 PR gcov-profile/84846
16311 * doc/gcov.texi: Document -t option of gcov tool.
16313 2018-05-18 Martin Liska <mliska@suse.cz>
16315 PR gcov-profile/84846
16316 * gcov.c (print_usage): Add new -t option.
16317 (process_args): Handle the option.
16318 (generate_results): Use stdout as output when requested by
16321 2018-05-18 Martin Liska <mliska@suse.cz>
16323 PR gcov-profile/84846
16324 * coverage.c (coverage_init): Write PWD to .gcno file.
16325 * doc/gcov.texi: Document how working directory is printed.
16326 * gcov-dump.c (dump_gcov_file): Print PWD.
16327 * gcov.c (output_intermediate_file): Likewise.
16328 (read_graph_file): Read PWD string.
16329 (output_lines): Print PWD.
16331 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16333 PR middle-end/85817
16334 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16335 for retval and return false if all args to phi are zero.
16337 2018-05-18 Richard Biener <rguenther@suse.de>
16339 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16341 (evrp_dom_walker::before_dom_children): Call it.
16343 2018-05-18 Richard Biener <rguenther@suse.de>
16345 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16346 results when processing array refs with variable index.
16348 2018-05-18 Toon Moene <toon@moene.org>
16350 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16351 directly after that of -floop-interchange. Indicate that both
16352 options are enabled by default when specifying -O3.
16354 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16356 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16357 iterator. Delete separate integer-mode vec_set<mode> expander.
16358 (aarch64_simd_vec_setv2di): Delete.
16359 (vec_setv2di): Delete.
16360 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16361 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16362 the "w, r" alternative.
16364 2018-05-18 Martin Liska <mliska@suse.cz>
16366 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16367 * tree-pass.h (make_pass_lower_switch_O0): New function.
16368 * tree-switch-conversion.c (node_has_low_bound): Remove.
16369 (node_has_high_bound): Likewise.
16370 (node_is_bounded): Likewise.
16371 (class pass_lower_switch): Make it a template type and create
16373 (pass_lower_switch::execute): Add template argument.
16374 (make_pass_lower_switch): New function.
16375 (make_pass_lower_switch_O0): New function.
16376 (do_jump_if_equal): Remove.
16377 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16378 all the hard work to tree optimization passes.
16380 2018-05-18 Martin Liska <mliska@suse.cz>
16382 * dbgcnt.c (limit_low): Renamed from limit.
16383 (limit_high): New variable.
16384 (dbg_cnt_is_enabled): Check for upper limit.
16385 (dbg_cnt): Adjust dumping.
16386 (dbg_cnt_set_limit_by_index): Add new argument for high
16388 (dbg_cnt_set_limit_by_name): Likewise.
16389 (dbg_cnt_process_single_pair): Parse new format.
16390 (dbg_cnt_process_opt): Use strtok.
16391 (dbg_cnt_list_all_counters): Remove 'value' and add
16393 * doc/invoke.texi: Document changes.
16395 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16397 * doc/sourcebuild.texi (scalar_all_fma): Document.
16398 * tree.def (FMA_EXPR): Delete.
16399 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16400 * internal-fn.c (ternary_direct): New macro.
16401 (expand_ternary_optab_fn): Likewise.
16402 (direct_ternary_optab_supported_p): Likewise.
16403 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16404 * builtins.c (fold_builtin_fma): Delete.
16405 (fold_builtin_3): Don't call it.
16406 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16407 * expr.c (expand_expr_real_2): Likewise.
16408 * fold-const.c (operand_equal_p): Likewise.
16409 (fold_ternary_loc): Likewise.
16410 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16411 * gimple.c (DEFTREECODE): Likewise.
16412 * gimplify.c (gimplify_expr): Likewise.
16413 * optabs-tree.c (optab_for_tree_code): Likewise.
16414 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16415 * tree-eh.c (operation_could_trap_p): Likewise.
16416 (stmt_could_throw_1_p): Likewise.
16417 * tree-inline.c (estimate_operator_cost): Likewise.
16418 * tree-pretty-print.c (dump_generic_node): Likewise.
16419 (op_code_prio): Likewise.
16420 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16421 * tree-ssa-operands.c (get_expr_operands): Likewise.
16422 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16423 * fold-const-call.h (fold_fma): Delete.
16424 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16425 CFN_FNMA and CFN_FNMS.
16426 (fold_fma): Delete.
16427 * genmatch.c (combined_fn): New enum.
16428 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16429 (commutative_op): New function.
16430 (commutate): Use it. Handle more than 2 operands.
16431 (dt_operand::gen_gimple_expr): Use commutative_op.
16432 (parser::parse_expr): Allow :c to be used with non-binary
16433 operators if the commutative operand is known.
16434 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16435 CFN_FMS, CFN_FNMA and CFN_FNMS.
16436 (backprop::process_assign_use): Remove FMA_EXPR handling.
16437 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16438 (gen_hsa_fma): New function.
16439 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16440 IFN_FNMA and IFN_FNMS.
16441 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16442 * gimple-fold.h (follow_all_ssa_edges): Declare.
16443 * gimple-fold.c (follow_all_ssa_edges): New function.
16444 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16445 gimple_build interface and use follow_all_ssa_edges to fold the result.
16446 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16447 instead of checking for optabs directly.
16448 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16449 rather than FMA_EXPRs.
16450 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16451 call to IFN_FMA instead of an FMA_EXPR.
16453 2018-05-17 Jim Wilson <jimw@sifive.com>
16455 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16456 sign extended promoted subreg, and the range does not have the sign bit
16457 set, then do a sign extend.
16459 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16460 test, check for sign extended subreg and/or constant operands, and
16461 do a sign extend in that case.
16463 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16465 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16466 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16468 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16469 Change logics_shift_reg to logics_shift_imm.
16470 (thunderx2t99_fp_loadpair_basic): Delete.
16471 (thunderx2t99_fp_storepair_basic): Delete.
16472 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16473 (thunderx2t99_asimd_polynomial): Delete.
16474 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16475 and neon_fp_mul_d_scalar_q.
16476 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16477 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16478 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16479 (thunderx2t99_asimd_lut): Add missing tbl types.
16480 (thunderx2t99_asimd_ext): Delete.
16481 (thunderx2t99_asimd_load1_1_mult): Delete.
16482 (thunderx2t99_asimd_load1_2_mult): Delete.
16483 (thunderx2t99_asimd_load1_ldp): New.
16484 (thunderx2t99_asimd_load1): New.
16485 (thunderx2t99_asimd_load2): Add missing *load2* types.
16486 (thunderx2t99_asimd_load3): New.
16487 (thunderx2t99_asimd_load4): New.
16488 (thunderx2t99_asimd_store1_1_mult): Delete.
16489 (thunderx2t99_asimd_store1_2_mult): Delete.
16490 (thunderx2t99_asimd_store2_mult): Delete.
16491 (thunderx2t99_asimd_store2_onelane): Delete.
16492 (thunderx2t99_asimd_store_stp): New.
16493 (thunderx2t99_asimd_store1): New.
16494 (thunderx2t99_asimd_store2): New.
16495 (thunderx2t99_asimd_store3): New.
16496 (thunderx2t99_asimd_store4): New.
16498 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16500 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16501 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16503 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16504 Segher Boessenkool <segher@kernel.crashing.org>
16507 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16510 2018-05-17 Richard Biener <rguenther@suse.de>
16512 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16513 for pruning loop and prune defs feeding only already visited PHIs.
16515 2018-05-17 Richard Biener <rguenther@suse.de>
16517 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16519 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16520 Richard Biener <rguenther@suse.de>
16522 PR tree-optimization/85793
16523 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16524 for VMAT_ELEMENTWISE.
16526 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16528 * internal-fn.h (lookup_internal_fn): Declare
16529 * internal-fn.c (lookup_internal_fn): New function.
16530 * gimple.c (gimple_build_call_from_tree): Handle calls to
16531 internal functions.
16532 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16533 internal function names.
16534 * tree-pretty-print.c (dump_generic_node): Likewise.
16535 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16537 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16539 * gimple-fold.h (gimple_build): Make the function forms take
16540 combined_fn rather than built_in_function.
16541 (gimple_simplify): Likewise.
16542 * gimple-match-head.c (gimple_simplify): Likewise.
16543 * gimple-fold.c (gimple_build): Likewise.
16544 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16545 rather than gimple_build_call_internal.
16546 (get_initial_defs_for_reduction): Likewise.
16547 (vect_create_epilog_for_reduction): Likewise.
16548 (vectorizable_live_operation): Likewise.
16550 2018-05-17 Martin Liska <mliska@suse.cz>
16552 * gimple-ssa-sprintf.c (format_directive): Do not use
16553 space in between 'G_' and '('.
16555 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16558 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16559 even if the mask is not all ones.
16562 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16564 (ix86_gimple_fold_builtin): Likewise.
16567 * config/i386/i386.c: Include tree-vector-builder.h.
16568 (ix86_vector_shift_count): New function.
16569 (ix86_fold_builtin): Fold shift builtins by scalar count.
16570 (ix86_gimple_fold_builtin): Likewise.
16572 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16573 _mm512_setzero): New intrinsics.
16575 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16576 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16578 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16579 code generation for cases where splatting a value is not useful.
16580 * simplify-rtx.c (simplify_ternary_operation): Simplify
16581 vec_merge across a vec_duplicate and a paradoxical subreg forming
16582 a vector mode to a vec_concat.
16584 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16586 * config.gcc: Support "goldmont-plus".
16587 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16589 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16590 PROCESSOR_GOLDMONT_PLUS.
16591 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16592 (processor_target_table): Add "goldmont-plus".
16593 (PTA_GOLDMONT_PLUS): Define.
16594 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16595 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16596 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16597 (fold_builtin_cpu): Add "goldmont-plus".
16598 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16599 (ix86_option_override_internal): Add "goldmont-plus".
16600 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16601 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16602 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16603 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16605 2018-05-17 Richard Biener <rguenther@suse.de>
16607 PR tree-optimization/85757
16608 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16609 remove defs that only feed that PHI from further processing.
16611 2018-05-16 Jim Wilson <jimw@sifive.com>
16613 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16615 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16617 2018-05-16 Mark Wielaard <mark@klomp.org>
16619 * dwarf2out.c (count_index_strings): New function.
16620 (output_indirect_strings): Call count_index_strings and generate
16621 header for dwarf_version >= 5.
16623 2018-05-16 Mark Wielaard <mark@klomp.org>
16625 * dwarf2out.c (dwarf_FORM): New function.
16626 (set_indirect_string): Use dwarf_FORM.
16627 (reset_indirect_string): Likewise.
16628 (size_of_die): Likewise.
16629 (value_format): Likewise.
16630 (output_die): Likewise.
16631 (add_skeleton_AT_string): Likewise.
16632 (output_macinfo_op): Likewise.
16633 (index_string): Likewise.
16634 (output_index_string_offset): Likewise.
16635 (output_index_string): Likewise.
16636 (count_index_strings): Likewise.
16638 2018-05-16 Carl Love <cel@us.ibm.com>
16640 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16641 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16643 2018-05-16 Martin Jambor <mjambor@suse.cz>
16645 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16646 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16648 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16650 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16651 (fnma<mode>4): Likewise.
16652 (fms<mode>4): Likewise.
16653 (fnms<mode>4): Likewise.
16654 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16655 (aarch64_fnma<mode>4): Likewise.
16656 (aarch64_fms<mode>4): Likewise.
16657 (aarch64_fnms<mode>4): Likewise.
16658 (aarch64_fnmadd<mode>4): Likewise.
16660 2018-05-16 Jason Merrill <jason@redhat.com>
16662 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16664 2018-05-16 Richard Biener <rguenther@suse.de>
16666 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16667 (dump_stmt_cost): Declare.
16668 (add_stmt_cost): Dump cost we add.
16669 (add_stmt_costs): New function.
16670 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16671 No longer exported.
16672 (vect_analyze_stmt): Adjust prototype.
16673 (vectorizable_condition): Likewise.
16674 (vectorizable_live_operation): Likewise.
16675 (vectorizable_reduction): Likewise.
16676 (vectorizable_induction): Likewise.
16677 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16678 cost vector to pass to vectorizable_ and record afterwards.
16679 (vect_model_reduction_cost): Take cost vector argument and adjust.
16680 (vect_model_induction_cost): Likewise.
16681 (vectorizable_reduction): Likewise.
16682 (vectorizable_induction): Likewise.
16683 (vectorizable_live_operation): Likewise.
16684 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16685 SLP_TREE_NUMBER_OF_VEC_STMTS.
16686 (vect_analyze_slp_cost_1): Remove.
16687 (vect_analyze_slp_cost): Likewise.
16688 (vect_slp_analyze_node_operations): Take visited args and
16689 a target cost vector. Avoid processing already visited stmt sets.
16690 (vect_slp_analyze_operations): Use a local cost vector to gather
16691 costs and register those of non-discarded instances.
16692 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16693 (vect_schedule_slp_instance): Remove copying of
16694 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16696 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16697 adding cost. Record cost entry location.
16698 (vect_prologue_cost_for_slp_op): Function to compute cost of
16699 a constant or invariant generated for SLP vect in the prologue,
16700 split out from vect_analyze_slp_cost_1.
16701 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16702 (vect_model_promotion_demotion_cost): Likewise.
16703 (vect_model_store_cost): Likewise, make static.
16704 (vect_model_load_cost): Likewise.
16705 (vectorizable_bswap): Add cost vector arg and adjust.
16706 (vectorizable_call): Likewise.
16707 (vectorizable_simd_clone_call): Likewise.
16708 (vectorizable_conversion): Likewise.
16709 (vectorizable_assignment): Likewise.
16710 (vectorizable_shift): Likewise.
16711 (vectorizable_operation): Likewise.
16712 (vectorizable_store): Likewise.
16713 (vectorizable_load): Likewise.
16714 (vectorizable_condition): Likewise.
16715 (vectorizable_comparison): Likewise.
16716 (can_vectorize_live_stmts): Likewise.
16717 (vect_analyze_stmt): Likewise.
16718 (vect_transform_stmt): Adjust calls to vectorizable_*.
16719 * tree-vectorizer.c: Include gimple-pretty-print.h.
16720 (dump_stmt_cost): New function.
16722 2018-05-16 Richard Biener <rguenther@suse.de>
16724 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16725 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16726 * tree-ssa-dse.c: Include tree-ssa-loop.h.
16727 (check_name): New callback.
16728 (dse_classify_store): Track cycles via a visited bitmap of PHI
16729 defs and simplify handling of in-loop and across loop dead stores
16730 and properly fail for loop-variant refs. Handle byte-tracking with
16731 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16734 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
16736 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16737 (vect_get_mask_type_for_stmt): Likewise.
16738 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16740 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
16741 to determine the statement's vector type and the vector type that
16742 should be used for calculating nunits. Deal with cases in which
16743 the type has to be deferred.
16744 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16745 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16746 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16747 (vect_determine_vf_for_stmt): New functions, split out from...
16748 (vect_determine_vectorization_factor): ...here.
16749 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16750 (vect_get_mask_type_for_stmt): New functions, split out from
16751 vect_determine_vectorization_factor.
16753 2018-05-16 Richard Biener <rguenther@suse.de>
16755 * tree-cfg.c (verify_gimple_assign_ternary): Properly
16756 verify the [VEC_]COND_EXPR embedded comparison.
16758 2018-05-15 Martin Sebor <msebor@redhat.com>
16760 PR tree-optimization/85753
16761 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16762 RECORD_TYPE in addition to ARRAY_TYPE.
16764 2018-05-15 Martin Sebor <msebor@redhat.com>
16766 PR middle-end/85643
16767 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16769 2018-05-15 Richard Biener <rguenther@suse.de>
16771 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16772 add by_clobber_p one. Change algorithm to collect all defs
16773 representing uses we need to walk and try reducing them to
16774 a single one before failing.
16775 (dse_dom_walker::dse_optimize_stmt): Adjust.
16777 2018-05-13 Mark Wielaard <mark@klomp.org>
16779 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16780 (size_of_loc_descr): Likewise.
16781 (output_loc_operands): Likewise.
16782 (output_loc_operands_raw): Likewise.
16783 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16784 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16785 (hash_loc_operands): Likewise.
16786 (compare_loc_operands): Likewise.
16788 2018-05-14 Mark Wielaard <mark@klomp.org>
16790 * dwarf2out.c (count_index_addrs): New function.
16791 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16793 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16795 PR tree-optimization/83648
16796 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16797 return value as malloc candidate.
16799 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16802 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16803 param as true in call to suggest_attribute.
16805 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
16807 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16808 -mreadonly-in-sdata.
16810 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16812 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16814 (aarch64_crypto_aesd_fused): Likewise.
16816 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
16818 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16819 (movsi_aarch64): Likewise.
16820 (load_pairsi): Likewise.
16821 (load_pairdi): Likewise.
16822 (store_pairsi): Likewise.
16823 (store_pairdi): Likewise.
16824 (load_pairsf): Likewise.
16825 (load_pairdf): Likewise.
16826 (store_pairsf): Likewise.
16827 (store_pairdf): Likewise.
16828 (zero_extend): Likewise.
16829 (trunc): Swap alternatives.
16830 (fcvt_target): Add '?' to prefer w over r.
16832 2018-05-14 Jakub Jelinek <jakub@redhat.com>
16835 * config/i386/i386.md: Disallow non-commutative arithmetics in
16836 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16837 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
16838 in the peephole2 before it.
16840 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
16842 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16843 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16844 (ix86_handle_option): Handle -mcldemote.
16845 * config.gcc: New header.
16846 * config/i386/cldemoteintrin.h: New file.
16847 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16848 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16850 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16851 OPTION_MASK_ISA_CLDEMOTE.
16852 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16853 (ix86_valid_target_attribute_inner_p): Ditto.
16854 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16855 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16856 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16857 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16858 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16860 * config/i386/i386.opt: Add -mcldemote.
16861 * config/i386/x86intrin.h: New header.
16862 * doc/invoke.texi: Add -mcldemote.
16864 2018-05-14 Richard Biener <rguenther@suse.de>
16866 * doc/match-and-simplify.texi: Adjust :s documentation.
16868 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
16870 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16871 intended memcpy size.
16872 (REORDER_45): Likewise.
16874 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
16876 * sort.cc: New file.
16877 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16878 * vec.c (qsort_chk): Use gcc_qsort.
16879 * Makefile.in (OBJS-libcommon): Add sort.o.
16880 (build/sort.o): New target. Use it...
16881 (BUILD_RTL): ... here, and...
16882 (build/gencfn-macros): ... here, and...
16883 (build/genmatch): ... here.
16885 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16886 Chung-Ju Wu <jasonwucj@gmail.com>
16888 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16889 * config/nds32/nds32-graywolf.md: New file.
16890 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16891 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16893 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16894 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16895 * config/nds32/nds32.md (pipeline_model): Add graywolf.
16896 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16897 * config/nds32/pipelines.md: Include n15 settings.
16899 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16900 Chung-Ju Wu <jasonwucj@gmail.com>
16902 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16903 * config/nds32/nds32-n13.md: New file.
16904 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16905 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16907 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16908 * config/nds32/nds32.md (pipeline_model): Add n13.
16909 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16910 * config/nds32/pipelines.md: Include n13 settings.
16912 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
16913 Chung-Ju Wu <jasonwucj@gmail.com>
16915 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16916 * config/nds32/nds32-n10.md: New file.
16917 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16918 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16920 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16921 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16922 * config/nds32/nds32.md (pipeline_model): Add n10.
16923 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16924 * config/nds32/pipelines.md: Include n10 settings.
16926 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
16927 Kito Cheng <kito.cheng@gmail.com>
16928 Chung-Ju Wu <jasonwucj@gmail.com>
16930 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16931 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16932 Add enum values for DSP extension instructions.
16933 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16935 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16936 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16937 New code iterators.
16938 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16939 * config/nds32/nds32-dspext.md: New file for DSP implementation.
16940 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16941 * config/nds32/nds32-intrinsic.md: Likewise.
16942 * config/nds32/nds32_intrinsic.h: Likewise.
16943 * config/nds32/nds32-md-auxiliary.c: Likewise.
16944 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16945 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16946 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16947 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16948 * config/nds32/nds32-protos.h: New declarations for DSP extension.
16949 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16950 TYPE_DMAC in switch statement.
16951 * config/nds32/nds32.c: New checking and implementation for DSP
16952 extension instructions.
16953 * config/nds32/nds32.h: Likewise.
16954 * config/nds32/nds32.md: Likewise.
16955 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16956 * config/nds32/predicates.md: Implement new predicates for DSP
16959 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16961 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16962 Reformat alternatives and attributes so it is easier to identify
16963 which constraints/attributes go with which instruction.
16964 (mov<mode>_hardfloat32, FMOVE64): Likewise.
16965 (mov<mode>_softfloat32, FMOVE64): Likewise.
16966 (mov<mode>_hardfloat64, FMOVE64): Likewise.
16967 (mov<mode>_softfloat64, FMOVE64): Likewise.
16969 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
16971 * doc/extend.texi (PowerPC Built-in Functions): Rename this
16973 (Basic PowerPC Built-in Functions): The new name of the
16974 subsection previously known as "PowerPC Built-in Functions".
16975 (Basic PowerPC Built-in Functions Available on all Configurations):
16977 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16978 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16979 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16980 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16982 2018-05-11 Martin Jambor <mjambor@suse.cz>
16985 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16988 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
16991 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16993 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
16995 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16996 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16997 (ix86_handle_option): Handle -mwaitpkg.
16998 * config.gcc: New header.
16999 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17000 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17001 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17003 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17004 OPTION_MASK_ISA_WAITPKG.
17005 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17006 (ix86_option_override_internal): Add PTA_WAITPKG.
17007 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17008 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17009 IX86_BUILTIN_TPAUSE.
17010 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17011 __builtin_ia32_umwait and __builtin_ia32_tpause.
17012 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17013 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17014 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17015 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17016 UNSPECV_TPAUSE): New.
17017 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17018 * config/i386/i386.opt: Add -mwaitpkg.
17019 * config/i386/waitpkgintrin.h: New file.
17020 * config/i386/x86intrin.h: New header.
17021 * doc/invoke.texi: Add -mwaitpkg.
17023 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17026 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17028 (cortex-m0): Use armv6s-m isa.
17029 (cortex-m0plus): Likewise.
17030 (cortex-m1): Likewise.
17031 (cortex-m0.small-multiply): Likewise.
17032 (cortex-m0plus.small-multiply): Likewise.
17033 (cortex-m1.small-multiply): Likewise.
17035 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17036 Jakub Jelinek <jakub@redhat.com>
17038 PR tree-optimization/85692
17039 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17040 source permute as well.
17042 2018-05-11 Martin Liska <mliska@suse.cz>
17045 * doc/extend.texi: Document LLVM style format for no_sanitize
17048 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17050 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17051 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17052 (mode_supports_vsx_dform_quad): Likewise.
17053 (mode_supports_vmx_dform): Move these functions to be next to the
17054 other mode_supports functions.
17055 (mode_supports_dq_form): Likewise.
17056 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17057 mode_supports_dq_form.
17058 (reg_offset_addressing_ok_p): Likewise.
17059 (offsettable_ok_by_alignment): Likewise.
17060 (rs6000_legitimate_offset_address_p): Likewise.
17061 (legitimate_lo_sum_address_p): Likewise.
17062 (rs6000_legitimize_address): Likewise.
17063 (rs6000_legitimize_reload_address): Likewise.
17064 (rs6000_secondary_reload_inner): Likewise.
17065 (rs6000_preferred_reload_class): Likewise.
17066 (rs6000_output_move_128bit): Likewise.
17068 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17070 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17071 Generate SImode target register for null target.
17072 <case IX86_BUILTIN_XGETBV>: Ditto.
17073 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17074 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17076 2018-05-10 Carl Love <cel@us.ibm.com>
17078 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17079 dcbtt and dcbtstt if operands[2] is 0.
17081 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17084 * config/i386/sse.md (usadv64qi): New expander.
17086 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17088 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17089 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17090 -maltivec=be support.
17091 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17092 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17093 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17094 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17095 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17096 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17097 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17098 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17099 altivec_vsumsws): Adjust.
17100 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17101 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17102 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17104 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17105 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17106 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17107 (altivec_lve<VI_char>x): Delete expand.
17108 (*altivec_lve<VI_char>x_internal): Rename to...
17109 (altivec_lve<VI_char>x): ... this.
17110 (altivec_lvxl_<mode>): Delete expand.
17111 (*altivec_lvxl_<mode>_internal): Rename to ...
17112 (altivec_lvxl_<mode>): ... this.
17113 (altivec_stvxl_<mode>): Delete expand.
17114 (*altivec_stvxl_<mode>_internal): Rename to ...
17115 (altivec_stvxl_<mode>): ... this.
17116 (altivec_stve<VI_char>x): Delete expand.
17117 (*altivec_stve<VI_char>x_internal): Rename to ...
17118 (altivec_stve<VI_char>x): ... this.
17119 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17120 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17121 reduc_plus_scal_<mode>): Adjust.
17122 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17124 (rs6000_cpu_cpp_builtins): Adjust.
17125 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17126 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17127 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17128 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17129 -maltivec=be support.
17130 (rs6000_split_vec_extract_var): Adjust.
17131 (rs6000_split_v4si_init): Adjust.
17132 (swap_selector_for_mode): Delete.
17133 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17134 altivec_expand_stvex_be): Delete.
17135 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17136 -maltivec=be support.
17137 (rs6000_gimple_fold_builtin): Ditto.
17138 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17140 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17141 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17142 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17143 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17144 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17145 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17146 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17147 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17148 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17149 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17150 anonymous split): Adjust.
17151 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17152 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17154 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17156 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17157 when --with-gxx-include-dir is also specified.
17158 * configure: Regenerate.
17160 2018-05-09 Jim Wilson <jimw@sifive.com>
17163 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17164 * config/riscv/t-withmultilib: New.
17165 * config/riscv/withmultilib.h: New.
17166 * doc/install.texi: Document RISC-V --with-multilib-list support.
17168 2018-05-09 Richard Biener <rguenther@suse.de>
17170 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17172 (vect_bb_vectorization_profitable_p): Adjust. Compute
17173 actual scalar cost using the cost vector and the add_stmt_cost
17176 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17178 PR rtl-optimization/85645
17179 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17180 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17182 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17184 PR rtl-optimization/85645
17185 * shrink-wrap.c (spread_components): Return a boolean saying if
17186 anything was changed.
17187 (try_shrink_wrapping_separate): Iterate spread_components until
17188 nothing changes anymore.
17190 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17192 PR rtl-optimization/85645
17193 * regrename.c (build_def_use): Also kill the chains that include the
17194 destination of a REG_CFA_REGISTER note.
17196 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17198 PR rtl-optimization/85645
17199 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17200 insn that has a REG_CFA_REGISTER note.
17202 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17204 * cfgexpand.c (expand_clobber): New function.
17205 (expand_gimple_stmt_1): Use it.
17206 * tree-vect-stmts.c (vect_clobber_variable): New function,
17208 (vectorizable_simd_clone_call): ...here.
17209 (vectorizable_store): Emit a clobber either side of an
17210 IFN_STORE_LANES sequence.
17211 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17213 2018-05-09 Tom de Vries <tom@codesourcery.com>
17216 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17217 (define_insn "trap_if_false"): Add exit after trap.
17219 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17221 PR rtl-optimization/85638
17222 * bb-reorder.c: Include common/common-target.h.
17223 (create_forwarder_block): New function extracted from...
17224 (fix_up_crossing_landing_pad): ...here. Rename into...
17225 (dw2_fix_up_crossing_landing_pad): ...this.
17226 (sjlj_fix_up_crossing_landing_pad): New function.
17227 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17228 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17229 from both partitions and exit the loop after one iteration.
17231 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17234 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17236 (Basic PowerPC Built-in Functions): The new name of the
17237 subsection previously known as "PowerPC Built-in Functions".
17238 (Basic PowerPC Built-in Functions Available on all Configurations):
17240 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17242 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17244 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17246 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17249 2018-05-08 Jim Wilson <jimw@sifive.com>
17251 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17252 (LD_EMUL_SUFFIX): New.
17253 (LINK_SPEC): Use it.
17255 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17257 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17259 (Basic PowerPC Built-in Functions): The new name of the
17260 subsection previously known as "PowerPC Built-in Functions".
17261 (Basic PowerPC Built-in Functions Available on all Configurations):
17263 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17265 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17267 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17269 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17272 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17275 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17276 after cmpelim optimization.
17278 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17280 * config.gcc: Support "goldmont".
17281 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17282 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17283 PROCESSOR_GOLDMONT.
17284 * config/i386/i386.c (m_GOLDMONT): Define.
17285 (processor_target_table): Add "goldmont".
17286 (PTA_GOLDMONT): Define.
17287 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17288 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17289 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17290 (fold_builtin_cpu): Add "goldmont".
17291 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17292 (ix86_option_override_internal): Add "goldmont".
17293 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17294 (processor_type): Add PROCESSOR_GOLDMONT.
17295 * config/i386/i386.md: Add CPU "glm".
17296 * config/i386/glm.md: New file.
17297 * config/i386/x86-tune.def: Add m_GOLDMONT.
17298 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17300 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17303 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17305 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17306 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17307 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17310 * config/i386/i386.c (ix86_fold_builtin): Handle
17311 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17314 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17315 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17317 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17320 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17321 (check_arch): Likewise.
17322 (check_fpu): Return the result rather than printing it.
17323 (end arch): Fix operator precedence.
17324 (end cpu): Likewise.
17325 (END): Print the result from check_fpu.
17327 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17328 Alan Hayward <alan.hayward@arm.com>
17329 David Sherwood <david.sherwood@arm.com>
17331 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17332 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17333 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17334 (*fcmuo<mode>_and): New patterns.
17336 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17338 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17339 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17340 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17341 (cmp_op, sve_imm_con): New code attributes.
17342 (SVE_COND_INT_CMP, imm_con): Delete.
17343 (cmp_op): Remove above unspecs from int attribute.
17344 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17346 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17347 comparison-specific unspecs.
17348 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17349 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17350 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17351 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17352 (*vec_fcm<cmp_op><mode>): Rename to...
17353 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17354 (*vec_fcmuo<mode>): Rename to...
17355 (*fcmuo<mode>): ...this and adjust likewise.
17356 (*pred_fcm<cmp_op><mode>): New pattern.
17357 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17358 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17360 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17362 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17363 (aarch64_emit_sve_predicated_cond): New function.
17364 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17365 (aarch64_emit_unspec_cond_or): Replace with...
17366 (aarch64_emit_sve_or_conds): ...this new function. Use
17367 aarch64_emit_sve_ptrue_op for the individual comparisons and
17368 aarch64_emit_binop to OR them together.
17369 (aarch64_emit_inverted_unspec_cond): Replace with...
17370 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17371 aarch64_emit_sve_ptrue_op for the comparison and
17372 aarch64_emit_unop to invert the result.
17373 (aarch64_expand_sve_vec_cmp_float): Update after the above
17374 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17376 2018-05-07 Nathan Sidwell <nathan@acm.org>
17378 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17379 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17380 (Backwards Compatibility): Likewise.
17382 2018-05-07 Luis Machado <luis.machado@linaro.org>
17386 2018-05-07 Luis Machado <luis.machado@linaro.org>
17388 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17389 <prefetch_dynamic_strides>: New const bool field.
17390 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17391 prefetch_dynamic_strides.
17392 (exynosm1_prefetch_tune): Likewise.
17393 (thunderxt88_prefetch_tune): Likewise.
17394 (thunderx_prefetch_tune): Likewise.
17395 (thunderx2t99_prefetch_tune): Likewise.
17396 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17398 (aarch64_override_options_internal): Update to set
17399 PARAM_PREFETCH_DYNAMIC_STRIDES.
17400 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17401 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17402 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17403 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17404 prefetch-dynamic-strides setting.
17406 2018-05-07 Luis Machado <luis.machado@linaro.org>
17408 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17409 <minimum_stride>: New const int field.
17410 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17411 minimum_stride field.
17412 (exynosm1_prefetch_tune): Likewise.
17413 (thunderxt88_prefetch_tune): Likewise.
17414 (thunderx_prefetch_tune): Likewise.
17415 (thunderx2t99_prefetch_tune): Likewise.
17416 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17417 (aarch64_override_options_internal): Update to set
17418 PARAM_PREFETCH_MINIMUM_STRIDE.
17419 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17420 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17421 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17422 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17423 stride is constant and is below the minimum stride threshold.
17425 2018-05-07 Luis Machado <luis.machado@linaro.org>
17427 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17430 2018-05-07 Luis Machado <luis.machado@linaro.org>
17432 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17433 <prefetch_dynamic_strides>: New const bool field.
17434 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17435 prefetch_dynamic_strides.
17436 (exynosm1_prefetch_tune): Likewise.
17437 (thunderxt88_prefetch_tune): Likewise.
17438 (thunderx_prefetch_tune): Likewise.
17439 (thunderx2t99_prefetch_tune): Likewise.
17440 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17442 (aarch64_override_options_internal): Update to set
17443 PARAM_PREFETCH_DYNAMIC_STRIDES.
17444 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17445 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17446 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17447 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17448 prefetch-dynamic-strides setting.
17450 2018-05-07 Luis Machado <luis.machado@linaro.org>
17452 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17453 <minimum_stride>: New const int field.
17454 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17455 minimum_stride field.
17456 (exynosm1_prefetch_tune): Likewise.
17457 (thunderxt88_prefetch_tune): Likewise.
17458 (thunderx_prefetch_tune): Likewise.
17459 (thunderx2t99_prefetch_tune): Likewise.
17460 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17461 (aarch64_override_options_internal): Update to set
17462 PARAM_PREFETCH_MINIMUM_STRIDE.
17463 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17464 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17465 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17466 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17467 stride is constant and is below the minimum stride threshold.
17469 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17472 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17473 the type is addressable. Don't force op into register if it has
17476 2018-05-05 Roland McGrath <mcgrathr@google.com>
17479 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17480 any section for which we don't know a specific type it should have,
17481 regardless of name. Previously this was done only for the exact
17482 names ".init_array", ".fini_array", and ".preinit_array".
17483 (default_elf_asm_named_section): Add comment about
17484 relationship with default_section_type_flags and SECTION_NOTYPE.
17485 (get_section): Don't consider it a type conflict if one side has
17486 SECTION_NOTYPE and the other doesn't, as long as neither has the
17487 SECTION_BSS et al used in the default_section_type_flags logic.
17489 2018-05-05 Tom de Vries <tom@codesourcery.com>
17492 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17493 (workaround_barsyncs): New function.
17494 (nvptx_reorg): Use workaround_barsyncs.
17495 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17496 (define_expand "nvptx_membar_cta"): New define_expand.
17497 (define_insn "*nvptx_membar_cta"): New insn.
17499 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17501 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17502 To improve optimization opportunities.
17503 * builtin-types.def: The new needed builtin types for the above.
17505 2018-05-04 Richard Biener <rguenther@suse.de>
17507 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17508 * gimple-ssa-store-merging.c
17509 (imm_store_chain_info::output_merged_store): Remove redundant create,
17510 release split_store vector contents on failure.
17511 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17512 scalar stmt vector on cache hit.
17514 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17516 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17518 * config.gcc (powerpc-xilinx-eabi*): Remove.
17519 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17521 (fusion_addis_mem_combo_load): Ditto.
17522 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17524 (rs6000_cpu_cpp_builtins): Ditto.
17525 * config/rs6000/rs6000-linux.c
17526 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17527 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17528 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17530 (rs6000_setup_reg_addr_masks): Ditto.
17531 (rs6000_init_hard_regno_mode_ok): Ditto.
17532 (rs6000_option_override_internal): Ditto.
17533 (legitimate_lo_sum_address_p): Ditto.
17534 (rs6000_legitimize_address): Ditto.
17535 (rs6000_legitimize_reload_address): Ditto.
17536 (rs6000_legitimate_address_p): Ditto.
17537 (abi_v4_pass_in_fpr): Ditto.
17538 (setup_incoming_varargs): Ditto.
17539 (rs6000_gimplify_va_arg): Ditto.
17540 (rs6000_split_multireg_move): Ditto.
17541 (rs6000_savres_strategy): Ditto.
17542 (rs6000_emit_prologue_components): Ditto.
17543 (rs6000_emit_epilogue_components): Ditto.
17544 (rs6000_emit_prologue): Ditto.
17545 (rs6000_emit_epilogue): Ditto.
17546 (rs6000_elf_file_end): Ditto.
17547 (rs6000_function_value): Ditto.
17548 (rs6000_libcall_value): Ditto.
17549 * config/rs6000/rs6000.h: Ditto.
17550 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17551 (TARGET_MINMAX): ... this. New.
17552 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17553 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17554 (*movsi_internal1_single): Delete.
17555 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17556 mfpu=, mxilinx-fpu): Delete.
17557 * config/rs6000/singlefp.h: Delete.
17558 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17559 * config/rs6000/t-rs6000: Ditto.
17560 * config/rs6000/t-xilinx: Delete.
17561 * config/rs6000/titan.md: Adjust for fp_type removal.
17562 * config/rs6000/vsx.md: Remove Xilinx FP support.
17563 (VStype_simple): Delete.
17564 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17565 * config/rs6000/xfpu.h: Delete.
17566 * config/rs6000/xfpu.md: Delete.
17567 * config/rs6000/xilinx.h: Delete.
17568 * config/rs6000/xilinx.opt: Delete.
17569 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17570 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17572 2018-05-04 Tom de Vries <tom@codesourcery.com>
17575 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17578 2018-05-04 Richard Biener <rguenther@suse.de>
17580 PR middle-end/85627
17581 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17582 (expand_complex_div_wide): Likewise.
17583 (expand_complex_operations_1): Likewise.
17584 (expand_complex_libcall): Preserve EH info of the original stmt.
17585 (tree_lower_complex): Handle removed blocks.
17586 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17587 on complex multiplication and division libcall builtins.
17589 2018-05-04 Richard Biener <rguenther@suse.de>
17591 PR middle-end/85574
17592 * fold-const.c (negate_expr_p): Restrict negation of operand
17593 zero of a division to when we know that can happen without
17595 (fold_negate_expr_1): Likewise.
17597 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17600 * real.h (real_nextafter): Declare.
17601 * real.c (real_nextafter): New function.
17602 * fold-const-call.c (fold_const_nextafter): New function.
17603 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17604 CASE_CFN_NEXTTOWARD.
17605 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17606 even when arg1_mode is different from arg0_mode.
17608 2018-05-03 Nathan Sidwell <nathan@acm.org>
17610 * doc/extend.texi (Deprecated Features): Remove
17611 -ffriend-injection.
17612 (Backwards Compatibility): Likewise.
17613 * doc/invoke.texi (C++ Language Options): Likewise.
17614 (C++ Dialect Options): Likewise.
17616 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17619 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17620 _mm512_mask_mullox_epi64): New intrinsics.
17622 2018-05-03 Tom de Vries <tom@codesourcery.com>
17625 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17626 dump files): Add offload-tree.
17628 2018-05-03 Richard Biener <rguenther@suse.de>
17630 PR tree-optimization/85615
17631 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17632 to loops not nested in BBs loop father to avoid creating multi-entry
17635 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17637 PR tree-optimization/70291
17638 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17639 arguments. Change return type to tree. Emit libcall as a new
17640 statement rather than replacing existing one when inplace_p is true.
17641 (expand_complex_multiplication_components): New function.
17642 (expand_complex_multiplication): Expand floating-point complex
17643 multiplication using the above.
17644 (expand_complex_division): Rename inner_type parameter to type.
17645 Update expand_complex_libcall call-site.
17646 (expand_complex_operations_1): Update expand_complex_multiplication
17647 and expand_complex_division call-sites.
17649 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17652 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17653 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17654 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17655 the highest significant bit of the shift count mask is clear. In
17656 check whether and[sq]i3 is needed verify that all significant bits
17657 of the shift count other than the highest are set.
17659 2018-05-02 Tom de Vries <tom@codesourcery.com>
17662 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17663 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17664 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17665 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17666 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17667 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17668 __builtin_goacc_parlevel_size.
17670 2018-05-02 Richard Biener <rguenther@suse.de>
17672 PR tree-optimization/85597
17673 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17674 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17677 2018-05-02 Tom de Vries <tom@codesourcery.com>
17680 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17681 dump files): Add ltrans-tree.
17683 2018-05-02 Tom de Vries <tom@codesourcery.com>
17686 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17687 dump files): Add wpa-ipa.
17689 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17691 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17692 powerpc*-*-linux*paired* target.
17693 * config/rs6000/750cl.h: Delete.
17694 * config/rs6000/paired.h: Delete.
17695 * config/rs6000/paired.md: Delete.
17696 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17698 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17699 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17700 comment. Remove paired float support.
17701 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17702 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17704 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17705 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17707 * config/rs6000/rs6000.c: Remove paired float support.
17708 (paired_expand_vector_init, paired_expand_vector_move,
17709 paired_emit_vector_compare, paired_emit_vector_cond_expr,
17710 (paired_expand_lv_builtin, paired_expand_stv_builtin,
17711 paired_expand_builtin, paired_expand_predicate_builtin,
17712 paired_init_builtins): Delete.
17713 * config/rs6000/rs6000.h: Remove paired float support.
17714 * config/rs6000/rs6000.md: Remove paired float support.
17715 (move_from_CR_ov_bit): Delete.
17716 * config/rs6000/rs6000.opt (mpaired): Delete.
17717 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17718 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17720 2018-05-02 Richard Biener <rguenther@suse.de>
17722 PR middle-end/85567
17723 * gimplify.c (gimplify_save_expr): When in SSA form allow
17724 SAVE_EXPRs to compute to SSA vars.
17726 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17729 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17730 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17731 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17732 clobber operands[2], instead use a new pseudo. Formatting fixes.
17734 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
17736 PR tree-optimization/85586
17737 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17738 exit early for statements in the same group if the accesses are
17741 2018-05-02 Tom de Vries <tom@codesourcery.com>
17744 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17747 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
17749 PR tree-optimization/85143
17750 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17752 2018-05-01 Tom de Vries <tom@codesourcery.com>
17755 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17756 not found" error message.
17758 2018-05-01 Tom de Vries <tom@codesourcery.com>
17761 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17762 * vec.c (test_ordered_remove_if): New function.
17763 (vec_c_tests): Call test_ordered_remove_if.
17764 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17765 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17766 * tree-vect-patterns.c (vect_pattern_recog_1): Use
17767 VEC_ORDERED_REMOVE_IF.
17769 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17771 PR tree-optimization/82665
17772 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17773 pointer subtraction where arguments come from a memchr call.
17775 2018-05-01 Jakub Jelinek <jakub@redhat.com>
17777 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17778 --push-state --as-needed and --pop-state instead of --as-needed and
17779 --no-as-needed if ld supports it.
17780 * configure: Regenerated.
17783 * doc/install.texi2html: Replace _002d with - and _002a with * in
17784 generated html files using sed.
17786 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17789 * gcc-rich-location.c (blank_line_before_p): New function.
17790 (use_new_line): New function.
17791 (gcc_rich_location::add_fixit_insert_formatted): New function.
17792 * gcc-rich-location.h
17793 (gcc_rich_location::add_fixit_insert_formatted): New function.
17795 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17797 * selftest.c (assert_streq): Rename "expected" and "actual" to
17798 "val1" and "val2". Extend NULL-handling to cover both inputs
17799 symmetrically, while still requiring both to be non-NULL for a pass.
17800 * selftest.h (assert_streq): Rename "expected" and "actual" to
17802 (ASSERT_EQ): Likewise.
17803 (ASSERT_EQ_AT): Likewise.
17804 (ASSERT_KNOWN_EQ): Likewise.
17805 (ASSERT_KNOWN_EQ_AT): Likewise.
17806 (ASSERT_NE): Likewise.
17807 (ASSERT_MAYBE_NE): Likewise.
17808 (ASSERT_MAYBE_NE_AT): Likewise.
17809 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
17810 the assertion to pass.
17811 (ASSERT_STREQ_AT): Likewise.
17813 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17815 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17816 interaction with -pie.
17818 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17820 * selftest.h: Fix alphabetization of per-source-file selftest
17823 2018-04-30 Jason Merrill <jason@redhat.com>
17825 PR c++/61982 - dead stores to destroyed objects.
17826 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17829 2018-04-30 Jason Merrill <jason@redhat.com>
17831 * tree.c (build_clobber): New.
17832 * tree.h: Declare it.
17833 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17835 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17837 * diagnostic-show-locus.c (layout::layout): Update for
17838 location_get_source_line returning a char_span.
17839 (struct char_span): Move to input.h.
17840 (struct correction): Update for fields in char_span becoming
17842 (struct source_line): Update for location_get_source_line
17843 returning a char_span.
17844 (layout::print_line): Likewise.
17845 * edit-context.c (edited_file::print_content): Likewise.
17846 (edited_file::print_diff_hunk): Likewise.
17847 (edited_file::print_run_of_changed_lines): Likewise.
17848 (edited_file::get_num_lines): Likewise.
17849 (edited_line::edited_line): Likewise.
17850 * final.c (asm_show_source): Likewise.
17851 * input.c (location_get_source_line): Convert return type
17852 from const char * to char_span, losing the final "line_len"
17854 (dump_location_info): Update for the above.
17855 (get_substring_ranges_for_loc): Likewise. Use a char_span
17856 when handling the literal within the line.
17857 (test_reading_source_line): Update for location_get_source_line
17858 returning a char_span.
17859 * input.h (class char_span): Move here from
17860 diagnostic-show-locus.c, converting from a struct to a class.
17861 Make data members private.
17862 (char_span::operator bool): New.
17863 (char_span::length): New.
17864 (char_span::get_buffer): New.
17865 (char_span::operator[]): New.
17866 (char_span::subspan): Make const.
17867 (char_span::xstrdup): New.
17868 (location_get_source_line): Convert return type from const char *
17869 to char_span, losing the final "line_size" param.
17871 2018-04-30 Jan Hubicka <jh@suse.cz>
17873 * lto-wrapper.c (ltrans_priorities): New static var.
17874 (cmp_priority): New.
17875 (run_gcc): Read priorities and if doing parallel build order
17876 the Makefile by them.
17878 2018-04-30 David Malcolm <dmalcolm@redhat.com>
17880 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17882 2018-04-30 Richard Biener <rguenther@suse.de>
17884 * tree-cfg.c (verify_address): Remove base argument, add
17885 flag whether to check TREE_ADDRESSABLE and do that.
17886 (verify_expr): Remove.
17887 (verify_types_in_gimple_reference): Add pieces from verify_expr.
17888 (verify_gimple_assign_single): Likewise.
17889 (verify_gimple_switch): Likewise.
17890 (verify_expr_location_1): Dereference tp once. Add (disabled)
17891 piece from verify_expr.
17892 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17894 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17896 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17898 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17900 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17901 (small_data_pattern): Likewise.
17902 (arc_rewrite_small_data): Likewise.
17903 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17904 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17905 (get_symbol_alignment): New function.
17906 (legitimate_small_data_address_p): Likewise.
17907 (legitimate_scaled_address): Update, call
17908 legitimate_small_data_address_p.
17909 (output_sdata): New static variable.
17910 (arc_print_operand): Update how we handle small data operands.
17911 (arc_print_operand_address): Likewise.
17912 (arc_legitimate_address_p): Update, use
17913 legitimate_small_data_address_p.
17914 (arc_rewrite_small_data_p): Remove.
17915 (arc_rewrite_small_data_1): Likewise.
17916 (arc_rewrite_small_data): Likewise.
17917 (small_data_pattern): Likewise.
17918 (compact_sda_memory_operand): Update to use
17919 legitimate_small_data_address_p and get_symbol_alignment.
17920 (prepare_move_operands): Don't rewite sdata pattern.
17921 (prepare_extend_operands): Remove.
17922 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17924 (zero_extendqisi2): Likewise.
17925 (zero_extendhisi2): Likewise.
17926 (extendqihi2): Likewise.
17927 (extendqisi2): Likewise.
17928 (extendhisi2): Likewise.
17929 (addsi3): Likewise.
17930 (subsi3): Likewise.
17931 (andsi3): Likewise.
17932 * config/arc/constraints.md (Usd): Change it to memory constraint.
17934 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
17936 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17937 as source of std instructions.
17938 * config/arc/arc.md (movsi_insn): Update pattern predicate to
17939 allow 6-bit constants as source for store instructions.
17940 (movdi_insn): Update instruction pattern to allow 6-bit constants
17941 as source for store instructions.
17943 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
17945 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17947 2018-04-30 Nathan Sidwell <nathan@acm.org>
17948 Sandra Loosemore <sandra@codesourcery.com>
17950 * dumpfile.c (dump_open): Allow '-' for stdout.
17951 * doc/invoke.texi (Developer Options): Document dump filename
17952 determination early. Document stdin/stdout selection.
17954 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
17956 Microblaze Target: PIC data text relative
17958 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17959 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17961 * config/microblaze/microblaze.h (microblaze_constant_address_p):
17962 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17963 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17964 New addressing mode for data-text relative position indepenedent code.
17965 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17966 'ADDRESS_SYMBOLIC_TXT_REL'.
17967 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17968 (microblaze_legitimate_pic_operand): Exclude function calls from
17969 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17970 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17972 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17973 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17974 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17975 for 'address + offset'.
17976 (microblaze_expand_prologue): Add new function prologue call for
17978 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17979 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17980 table in case of TARGET_PIC_DATA_TEXT_REL.
17981 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17982 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17983 Add new macros 'UNSPEC_TEXT',
17984 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17985 + exclude function calls from 'UNSPEC_PLT' in case of data text
17987 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17988 new target hook for generating address diff vector tables in case of
17990 * doc/tm.texi : Regenerate.
17991 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17992 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17993 of addr diff vector generation.
17994 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17995 target hook definition.
17996 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17997 Add default function for generate_pic_addr_diff_vec -> flag_pic.
17998 * doc/invoke.texi (Add new pic option): Add new microblaze pic
17999 option for data text relative.
18001 2018-04-30 Richard Biener <rguenther@suse.de>
18003 * tree-chrec.h (evolution_function_is_constant_p): Remove
18005 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18007 2018-04-30 Richard Biener <rguenther@suse.de>
18010 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18012 2018-04-30 Richard Biener <rguenther@suse.de>
18014 PR tree-optimization/28364
18015 PR tree-optimization/85275
18016 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18017 copying first exit test.
18019 2018-04-28 Mark Wielaard <mark@klomp.org>
18021 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18022 dwarf_version >= 5.
18023 (dwarf_AT): Handle DW_AT_addr_base.
18024 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18026 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18029 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18030 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18031 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18032 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18034 2018-04-28 Richard Biener <rguenther@suse.de>
18036 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18037 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18038 to reflect use. Only add interesting stmts.
18040 2018-04-27 Martin Jambor <mjambor@suse.cz>
18043 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18044 the jump function allows for passing through aggregate values.
18046 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18048 * input.h (in_system_header_at): Convert from macro to inline
18050 (from_macro_expansion_at): Likewise.
18051 (from_macro_definition_at): Likewise.
18053 2018-04-27 Jeff Law <law@redhat.com>
18055 * config.gcc: Mark tile* targets as deprecated/obsolete.
18057 2018-04-27 Richard Biener <rguenther@suse.de>
18059 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18062 2018-04-27 Richard Biener <rguenther@suse.de>
18064 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18066 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18068 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18069 with Yd constraint. Set "preferred_for_speed" attribute from
18070 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18071 with Yd constraint.
18072 (*movdi_internal): Ditto.
18073 (movti_interunit splitters): Remove
18074 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18075 (movdi_interunit splitters): Ditto.
18076 * config/i386/constraints.md (Ye): Remove.
18077 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18079 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18082 * config/aarch64/constraints.md (Usg): Limit to 31.
18083 (Usj): Limit to 63.
18085 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18087 PR tree-optimization/85529
18088 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18089 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18090 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18091 zero extension or masking of the MSB bit.
18092 (optimize_range_tests): Add FIRST_BB argument, pass it through
18093 to optimize_range_tests_var_bound.
18094 (maybe_optimize_range_tests, reassociate_bb): Adjust
18095 optimize_range_tests callers.
18097 2018-04-26 Richard Biener <rguenther@suse.de>
18098 Jakub Jelinek <jakub@redhat.com>
18100 * cgraph.h (symbol_table): Just declare debug method here.
18101 * symtab.c (symbol_table::debug): Define.
18103 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18105 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18107 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18109 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18110 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18111 (*movdi_internal): Substitute Yi and Yj constraint with x
18112 and Ym and Yn constraint with y constraint. Update "isa"
18113 attribute and set "preferred_for_speed" attribute from
18114 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18115 (*movsi_internal): Ditto.
18116 (*movdf_internal): Ditto.
18117 (*movsf_internal): Ditto.
18118 (*zero_extendsidi2): Ditto.
18119 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18120 (sse2_loadld): Ditto.
18121 (*vec_extract<ssevecmodelower>_0): Ditto.
18122 (*vec_extractv4si_0_zext_sse4): Ditto.
18123 (vec_concatv2di): Ditto.
18124 (*vec_dup<mode>): Ditto.
18125 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18126 * config/i386/constraints.md (Yi): Remove.
18131 2018-04-26 Nathan Sidwell <nathan@acm.org>
18133 * dumpfile.c (dump_open): New.
18134 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18135 (dump_finish): Detect stdio/stderr by value not name.
18137 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18139 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18141 2018-04-26 Tom de Vries <tom@codesourcery.com>
18144 * config/nvptx/nvptx.c (verify_neutering_jumps)
18145 (verify_neutering_labels): New function
18146 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18148 2018-04-26 Tom de Vries <tom@codesourcery.com>
18151 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18152 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18155 2018-04-26 Richard Biener <rguenther@suse.de>
18156 Tom de Vries <tom@codesourcery.com>
18159 * lto-streamer-out.c (output_function): Fixup loops if required to match
18160 discovery done in the reader.
18162 2018-04-26 Richard Biener <rguenther@suse.de>
18164 PR tree-optimization/85116
18165 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18166 have a loop exit from the single latch predecessor. Remove
18167 case of header with just condition.
18168 (ch_base::copy_headers): Exclude infinite loops from any
18170 (pass_ch::execute): Record exits.
18172 2018-04-26 Richard Biener <rguenther@suse.de>
18174 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18175 prologue cost vector and pass it to vect_get_load_cost.
18176 (vect_get_peeling_costs_all_drs): Likewise.
18177 (vect_peeling_hash_get_lowest_cost): Likewise.
18178 (vect_enhance_data_refs_alignment): Likewise.
18180 2018-04-26 Richard Biener <rguenther@suse.de>
18182 PR middle-end/85450
18183 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18184 checking of integer<->pointer conversions.
18185 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18186 sign-/zero-extending pointer types.
18187 (expand_omp_for_static_chunk): Likewise.
18189 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18190 Jean Lee <xiaoyur347@gmail.com>
18192 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18193 (TARGET_ASAN_SHADOW_OFFSET): Define.
18194 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18195 true for -fsanitize=address.
18197 2018-04-25 Mark Wielaard <mark@klomp.org>
18199 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18202 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18204 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18205 than "alu", remove explicit "memory" and "imm_disp" attributes.
18206 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18208 PR middle-end/85414
18209 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18210 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18211 gen_lowpart_no_emit.
18213 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18216 * config/i386/i386.c (ix86_expand_builtin): Change memory
18217 operand to XI, extend p0 to Pmode.
18218 * config/i386/i386.md: Change unspec volatile and operand
18219 1 mode to XI, change operand 0 mode to P.
18221 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18223 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18224 GET_MODE_MASK before any checking.
18225 (nds32_can_use_bset_p): Likewise.
18226 (nds32_can_use_btgl_p): Likewise.
18228 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18230 * config/nds32/nds32-doubleword.md: New define_split pattern for
18231 illegal register number.
18233 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18235 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18237 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18239 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18241 2018-04-25 Richard Biener <rguenther@suse.de>
18243 * lto-streamer.h (LTO_major_version): Bump to 8.
18245 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18247 * BASE-VER: Set to 9.0.0.
18249 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18251 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18252 in __abskf2 and __powikf2.
18254 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18257 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18258 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18259 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18260 Use the above on operand 2. Reindent.
18261 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18263 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18266 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18268 * config/i386/i386.opt (mcet): Removed.
18269 * doc/install.texi: Remove -mcet documentation.
18270 * doc/invoke.texi: Likewise.
18272 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18275 * doc/install.texi: Remove -mcet from bootstrap-cet.
18277 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18280 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18281 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18285 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18286 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18287 containing a CONST_VECTOR.
18289 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18291 * doc/install.texi: Update newlib dependency for nvptx.
18293 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18296 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18297 instead of INTVAL when shifting x left.
18299 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18301 PR tree-optimization/85478
18302 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18303 vect_grouped_store_supported for single element vectors.
18305 2018-04-24 Richard Biener <rguenther@suse.de>
18308 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18309 load cost increase to the case of non-constant step.
18311 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18314 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18315 destination if any_malformed_asm.
18317 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18319 PR middle-end/85496
18320 * expr.c (store_field): In the bitfield case, if the value comes from
18321 a function call and is returned in registers by means of a PARALLEL,
18322 do not change the mode of the temporary unless BLKmode and VOIDmode.
18324 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18326 PR rtl-optimization/85423
18327 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18328 dependencies to debug insns when the previous insn is non-debug.
18330 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18332 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18333 enums into a single definition.
18334 (fls): Fix predicates and printing.
18337 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18339 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18340 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18341 and short u6 immediate.
18342 (check_if_valid_sleep_operand): Remove.
18343 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18345 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18347 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18348 flag_always_save_lp condition.
18349 * config/nds32/nds32.opt (malways-save-lp): New option.
18351 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18353 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18354 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18355 * config/nds32/nds32.h
18356 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18357 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18359 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18361 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18362 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18364 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18365 Chung-Ju Wu <jasonwucj@gmail.com>
18367 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18369 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18370 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18372 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18374 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18376 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18378 * config/nds32/nds32-protos.h (nds32_data_alignment,
18379 nds32_local_alignment): Declare.
18380 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18381 nds32_local_alignment): New functions.
18382 (TARGET_CONSTANT_ALIGNMENT): Define.
18383 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18385 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18387 * config/nds32/nds32.c
18388 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18389 (TARGET_MODES_TIEABLE_P): Likewise.
18391 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18393 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18394 level Ofast and Og.
18396 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18397 Chung-Ju Wu <jasonwucj@gmail.com>
18399 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18400 for unaligned access.
18401 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18403 * config/nds32/nds32-intrinsic.md: Likewise.
18404 * config/nds32/nds32_intrinsic.h: Likewise.
18405 * config/nds32/nds32.h (nds32_builtins): Likewise.
18406 * config/nds32/nds32.opt (munaligned-access): New option.
18407 * config/nds32/nds32.c (nds32_asm_file_start): Display
18408 flag_unaligned_access status.
18410 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18412 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18413 -mno-relax is present.
18414 * config/riscv/linux.h (LINK_SPEC): Ditto.
18416 2018-04-20 Martin Sebor <msebor@redhat.com>
18419 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18421 (gimple_fold_builtin_stxcpy_chk): Same.
18422 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18424 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18427 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18428 __powikf2 when long double is IEEE 128-bit.
18430 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18432 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18433 step to make sure stack always aligned.
18435 2018-04-20 Carl Love <cel@us.ibm.com>
18438 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18439 size check for arg0.
18441 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18442 Tom de Vries <tom@codesourcery.com>
18445 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18446 Emit insns for calls too.
18447 (nvptx_find_par): Always look for worker-level predecessor insn.
18448 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18450 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18451 (nvptx_process_pars): Propagate frames for calls.
18453 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18456 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18458 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18459 (ix86_handle_option): Don't handle OPT_mibt.
18460 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18462 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18464 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18465 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18466 (ix86_target_macros): Define __CET__ with flag_cf_protection
18467 for -fcf-protection.
18468 * config/i386/i386.c (isa2_opts): Remove -mibt.
18469 * config/i386/i386.h (TARGET_IBT): Removed.
18470 (TARGET_IBT_P): Likewise.
18471 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18472 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18473 * config/i386/i386.opt (mcet): Update help message.
18474 (mshstk): Likewise.
18476 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18477 -mcet as an alias for -mshstk.
18479 2018-04-20 Richard Biener <rguenther@suse.de>
18481 PR middle-end/85475
18482 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18483 complexity by forcing a single use of the multiply operand.
18485 2018-04-20 Martin Jambor <mjambor@suse.cz>
18488 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18489 recursion dependency to only apply to non-clones.
18491 2018-04-20 Martin Jambor <mjambor@suse.cz>
18494 * ipa-cp.c (create_specialized_node): Check that clones of
18495 self-recursive edges exist during IPA-CP.
18497 2018-04-19 Toon Moene <toon@moene.org>
18499 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18502 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18504 PR tree-optimization/85467
18505 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18506 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18507 VECTOR_CST element to type.
18509 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18512 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18513 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18514 (builtin_longjmp): Likewise.
18515 (save_stack_nonlocal): New pattern.
18516 (restore_stack_nonlocal): Likewise.
18518 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18521 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18522 Replace ASM_OUTPUT_LABEL with fprintf.
18524 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18527 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18528 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18529 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18530 define __IBT__ and __SHSTK__ for -fcf-protection.
18531 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18533 (ix86_trampoline_init): Likewise.
18534 (x86_output_mi_thunk): Likewise.
18535 (ix86_notrack_prefixed_insn_p): Likewise.
18536 (ix86_option_override_internal): Don't disallow -fcf-protection.
18537 * config/i386/i386.md (rdssp<mode>): Also enable for
18539 (incssp<mode>): Likewise.
18540 (nop_endbr): Likewise.
18541 * config/i386/i386.opt (mcet): Change help message to built-in
18544 (mshstk): Likewise.
18545 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18546 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18547 enable CET built-in functions.
18549 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18551 * common/config/i386/i386-common.c
18552 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18553 OPTION_MASK_ISA_MOVDIRI_UNSET,
18554 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18555 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18556 * config.gcc (movdirintrin.h): New header.
18557 * config/i386/cpuid.h (bit_MOVDIRI,
18558 bit_MOVDIR64B): New bits.
18559 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18561 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18562 (VOID, PVOID, PCVOID)): New function types.
18563 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18564 __builtin_ia32_directstoreu_u64,
18565 __builtin_ia32_movdir64b): New builtins.
18566 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18567 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18569 (ix86_valid_target_attribute_inner_p): Ditto.
18570 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18571 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18572 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18573 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18574 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18575 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18576 (movdiri<mode>, movdir64b_<mode>): New.
18577 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18578 * config/i386/immintrin.h: Include movdirintrin.h.
18579 * config/i386/movdirintrin.h: New file.
18580 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18582 2018-04-19 Richard Biener <rguenther@suse.de>
18584 PR middle-end/85455
18585 * cfg.c (clear_bb_flags): When loop state says we have
18586 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18588 2018-04-19 Richard Biener <rguenther@suse.de>
18590 PR tree-optimization/84737
18591 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18592 copying restrict info.
18593 (vect_setup_realignment): Use it.
18594 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18595 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18596 the first DR to all generated stores.
18597 (vectorizable_load): Likewise for loads.
18599 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18601 PR tree-optimization/85446
18602 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18603 the integral and pointer types to have the same precision.
18605 * doc/install.texi: Document --disable-cet being the default and
18608 2018-04-18 Martin Liska <mliska@suse.cz>
18610 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18613 2018-04-18 Martin Liska <mliska@suse.cz>
18616 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18619 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18620 arguments if they are comparable.
18622 2018-04-18 Martin Liska <mliska@suse.cz>
18625 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18628 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18631 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18634 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18635 ENDBR after calling __morestack.
18637 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18640 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18641 by using gcc_base_ver to generate a gcc_driver_version, and use
18642 it when generating GCC_DRIVER_NAME.
18643 * configure: Regenerate.
18645 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18648 * config.gcc: Obsolete powerpc*-*-*spe*.
18650 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18653 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18654 (stabstr_D): Change type of unum from unsigned int to
18655 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18658 2018-04-17 Jim Wilson <jimw@sifive.com>
18661 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18662 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18663 Set arg_pointer_offset after using pretend_args_size.
18665 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18667 PR rtl-optimization/85431
18668 * dse.c (record_store): Ignore zero width stores.
18671 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18672 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18673 __builtin_stack_restore rather than after it.
18674 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18675 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18676 argument instead of virtual_dynamic_stack_rtx.
18678 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18680 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18682 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18683 Add note to error message to explain internal mapping of overloaded
18684 built-in function name to non-overloaded built-in function name.
18685 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18688 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18691 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18692 where the inputs overlap with the output.
18694 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18696 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18697 (=v, v) alternative and explicit "memory" attribute.
18698 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18699 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18701 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18702 "sselog1" type instead of "sselog".
18703 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18704 "sselog". Remove explicit "memory" attribute.
18705 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18706 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18708 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18709 "sselog1" type instead of "sselog". Remove explicit "memory"
18711 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18712 use "sselog1" type instead of "sselog". Remove explicit "memory"
18714 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18715 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18717 (vec_extract_hi_v64qi): Merge all alternatives into one, use
18718 "sselog1" type instead of "sselog". Remove explicit "memory"
18720 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18721 use "sselog1" type instead of "sselog". Remove explicit "memory"
18725 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18727 PR middle-end/85414
18728 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18731 2018-04-17 Martin Jambor <mjambor@suse.cz>
18734 * ipa-cp.c (create_specialized_node): Call
18735 expand_all_artificial_thunks if necessary.
18737 2018-04-17 Martin Liska <mliska@suse.cz>
18740 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18741 in message, remote space in between '_G' and '('.
18743 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18746 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18747 avx512f_vmcmp<mode>3<round_saeonly_name>,
18748 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18749 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18750 avx512f_rndscale<mode><round_saeonly_name>,
18751 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18752 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18753 Use %<iptr>2 instead of %2 for -masm=intel.
18754 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18755 avx512f_vcvttss2usi<round_saeonly_name>,
18756 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18758 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18759 avx512f_vcvttsd2usi<round_saeonly_name>,
18760 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18761 Use %q1 instead of %1 for -masm=intel.
18762 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18763 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18764 of %3 for -masm=intel.
18765 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18767 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18769 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18771 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18772 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18774 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18776 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18777 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18778 %g1 and one with %0 and %1.
18779 (avx512er_vmrcp28<mode><round_saeonly_name>,
18780 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18781 %1 for -masm=intel.
18782 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18783 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18784 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18785 of %0 and %{%4%} for -masm=intel.
18786 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18787 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18788 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18789 order of %0 and %{%5%}%{z%} for -masm=intel.
18791 2018-04-17 Jan Hubicka <jh@suse.cz>
18794 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18796 2018-04-17 Martin Liska <mliska@suse.cz>
18799 * multiple_target.c (create_dispatcher_calls): Set apostrophes
18800 for target_clone error message. Make default implementation
18801 clone to be a local declaration.
18802 (separate_attrs): Add new argument and check for an empty
18804 (expand_target_clones): Handle it.
18805 (ipa_target_clone): Make redirection just for target_clones
18808 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
18809 Tom de Vries <tom@codesourcery.com>
18811 PR middle-end/84955
18812 * omp-expand.c (expand_oacc_for): Add dummy false branch for
18813 tiled basic blocks without omp continue statements.
18815 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
18818 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18819 vec_extract expression as having side effects to make sure it gets
18822 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
18825 * config/i386/i386.c (get_builtin_code_for_version): Check
18828 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
18831 * config.gcc: Support "skylake".
18832 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18834 * config/i386/i386.c (m_SKYLAKE): Define.
18835 (processor_target_table): Add "skylake".
18836 (ix86_option_override_internal): Add "skylake".
18837 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18838 PROCESSOR_CANNONLAKE.
18839 (get_builtin_code_for_version): Fix priority for
18840 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18841 PROCESSOR_SKYLAKE-AVX512.
18842 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18843 (processor_type): Add PROCESSOR_SKYLAKE.
18845 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
18846 Jason Merrill <jason@redhat.com>
18849 * convert.c (convert_to_integer_1): Use direct recursion for
18850 enumeral types and types with a precision less than the number
18851 of bits in their mode.
18853 2018-04-16 Julia Koval <julia.koval@intel.com>
18856 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18857 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18859 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
18862 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18863 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18864 and -mno-direct-move.
18866 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
18869 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18870 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18871 Ensure negative shifts result in {0}.
18873 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
18875 PR rtl-optimization/79916
18876 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18877 regs (if any) to define how to gnerate SD moves when LRA is in
18880 2018-04-13 Jakub Jelinek <jakub@redhat.com>
18882 PR rtl-optimization/85393
18883 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18884 * except.c (expand_dw2_landing_pad_for_region): Make static.
18885 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18886 a label and unconditional jump to old_bb, rather than
18887 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18890 PR rtl-optimization/85376
18891 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18892 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18893 instead of a specific value.
18895 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18896 Bin Cheng <bin.cheng@arm.com>
18898 PR tree-optimization/82965
18899 PR tree-optimization/83991
18900 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18901 by_profile_only parameter.
18902 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18903 information if the loop was predicted to iterate too many times.
18904 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18906 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
18909 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18912 2018-04-13 Martin Liska <mliska@suse.cz>
18913 Jakub Jelinek <jakub@redhat.com>
18915 PR middle-end/81657
18916 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18917 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18918 * builtins.c (expand_builtin_memory_copy_args): Use
18919 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18920 handle dest_addr == pc_rtx.
18922 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
18925 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18926 asked to not generate direct moves.
18927 (fix_trunc<mode>si2_stfiwx): Similar.
18928 (fix_trunc<mode>si2_internal): Similar.
18930 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18933 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18934 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18935 lookup if dest in some wider mode is known to be const0_rtx and
18936 if so, record permanent equivalence for it to be ZERO_EXTEND of
18937 the narrower mode destination.
18939 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18941 * lto-streamer-out.c (output_function): Revert 259346.
18942 * omp-expand.c (expand_oacc_for): Likewise.
18944 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
18946 PR rtl-optimization/85354
18947 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18948 * sel-sched.c (sel_global_init): ... here.
18950 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
18953 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18954 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18955 mode for PE-COFF targets.
18956 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18957 (i386_pe_asm_lto_end): Likewise.
18958 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18959 (TARGET_ASM_LTO_END): Likewise.
18960 * config/i386/winnt.c (saved_debug_info_level): New static variable.
18961 (i386_pe_asm_lto_start): New function.
18962 (i386_pe_asm_lto_end): Likewise.
18964 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
18965 Richard Biener <rguenther@suse.de>
18967 PR middle-end/84955
18968 * lto-streamer-out.c (output_function): Fix CFG loop state before
18970 * omp-expand.c (expand_oacc_for): Handle calls to internal
18971 functions like regular functions.
18973 2018-04-12 Richard Biener <rguenther@suse.de>
18976 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18977 for the early LTO debug to properly generate references to it
18978 during DIE emission. Do not re-use that for the skeleton for
18980 (dwarf2out_early_finish): Likewise.
18982 2018-04-12 Jakub Jelinek <jakub@redhat.com>
18985 * config/i386/sse.md
18986 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18987 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18988 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18989 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18990 and output is a reg, avoid creating invalid lowpart subreg, but
18991 instead split into a 512-bit move. Don't split if not AVX512VL,
18992 input is xmm16+ reg and output is a mem.
18993 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18994 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18995 xmm16+ reg and output is a mem.
18997 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18999 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19000 also for flag_dwarf2_cfi_asm.
19002 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19004 PR rtl-optimization/85342
19005 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19006 a bool scalar var inside of the loop instead. Don't try to update
19007 recog_data.operand after failed apply_change_group.
19009 2018-04-12 Tom de Vries <tom@codesourcery.com>
19012 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19013 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19014 array with flexible array member as array without given dimension.
19015 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19016 argument for undefined param to true.
19018 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19021 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19022 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19023 from PowerPC section.
19024 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19025 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19026 help text that is too long.
19027 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19028 help text that is too long.
19029 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19030 help text that is too long.
19032 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19034 * config/alpha/alpha.md (stack_probe_internal): Rename
19035 from "probe_stack". Update all callers.
19037 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19039 PR rtl-optimization/84566
19040 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19041 sched_macro_fuse_insns.
19043 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19046 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19047 (compute_block_dependences): ... from here.
19049 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19051 PR tree-optimization/85331
19052 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19053 from int to HOST_WIDE_INT.
19055 2018-04-11 Martin Jambor <mjambor@suse.cz>
19058 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19059 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19060 not the same as the source val.
19061 (cgraph_edge_brings_value_p): New parameter.
19062 (gather_edges_for_value): Pass destination value to
19063 cgraph_edge_brings_value_p.
19064 (perhaps_add_new_callers): Likewise.
19065 (get_info_about_necessary_edges): Likewise and exclude values brought
19066 only by self-recursive edges.
19067 (create_specialized_node): Redirect only clones of self-calling edges.
19068 (+self_recursive_pass_through_p): New function.
19069 (find_more_scalar_values_for_callers_subset): Use it.
19070 (find_aggregate_values_for_callers_subset): Likewise.
19071 (known_aggs_to_agg_replacement_list): Removed.
19072 (decide_whether_version_node): Re-calculate known constants for all
19073 remaining context clones.
19075 2018-04-11 Richard Biener <rguenther@suse.de>
19078 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19079 from early DWARF output.
19080 (dwarf2out_early_finish): Output line info unconditionally into
19081 early DWARF and add reference to it.
19083 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19086 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19087 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19088 other than V2DFmode using iptr mode attribute.
19089 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19091 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19093 PR rtl-optimization/84659
19094 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19096 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19099 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19101 (output_loc_list): Pass address of a dummy size variable even in the
19102 locview handling loop.
19103 (index_location_lists): Add comment on why skip_loc_list_entry can't
19106 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19109 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19112 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19115 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19116 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19117 and -mstring-compare-inline-limit.
19119 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19122 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19123 for stack clash protection in a register whenever we need it to be in
19126 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19128 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19129 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19131 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19134 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19136 (mlong-double-): Ditto.
19137 * config/rs6000/sysv4.opt (msdata=): Ditto.
19138 (mtls-size=): Ditto.
19140 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19142 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19143 erroneous entries for
19144 "vector int vec_ldl (int, long int *)", and
19145 "vector unsigned int vec_ldl (int, unsigned long int *)".
19146 Add comments and entries for
19147 "vector bool char vec_ldl (int, bool char *)",
19148 "vector bool short vec_ldl (int, bool short *)",
19149 "vector bool int vec_ldl (int, bool int *)",
19150 "vector bool long long vec_ldl (int, bool long long *)",
19151 "vector pixel vec_ldl (int, pixel *)",
19152 "vector long long vec_ldl (int, long long *)",
19153 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19154 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19155 type tree bool_long_long_type_node and correct definition of
19156 bool_V2DI_type_node to make reference to this new type tree.
19157 (rs6000_mangle_type): Replace erroneous reference to
19158 bool_long_type_node with bool_long_long_type_node.
19159 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19160 comments to emphasize sign distinctions for char and int types and
19161 replace RS6000_BTI_bool_long constant with
19162 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19163 use of RS6000_BTI_pixel.
19164 (bool_long_type_node): Remove this macro definition.
19165 (bool_long_long_type_node): New macro definition
19167 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19169 PR rtl-optimization/85300
19170 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19171 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19172 simplify_unary_operation fails.
19174 2018-04-10 Martin Liska <mliska@suse.cz>
19176 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19177 cgraph_edge and ipa_ref.
19179 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19183 * config/i386/sse.md
19184 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19185 computation of the VEC_MERGE selector from mask.
19186 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19187 Fix decoding of the VEC_MERGE selector into mask.
19189 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19191 PR tree-optimization/85286
19192 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19194 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19196 * final.c (final_1): Set insn_last_address as well as
19197 insn_current_address.
19199 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19202 * explow.c (emit_stack_probe): Call validize_mem on memory location
19203 before passing it to gen_probe_stack. Create address operand and
19204 legitimize it for the probe_stack_address case.
19206 2018-04-09 Jan Hubicka <jh@suse.cz>
19209 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19210 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19211 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19213 (free_lang_data): Rebuild type inheritance graph.
19215 2018-04-09 Martin Sebor <msebor@redhat.com>
19217 * invoke.texi (-finline-small-functions): Mention other optimization
19219 (-findirect-inlining, -fpartial-inlining): Same.
19220 (-finline-functions-called-once): Same.
19221 (-freorder-blocks-and-partition): Same.
19223 2018-04-09 Jan Hubicka <jh@suse.cz>
19226 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19227 jumps; choose last target that matches the criteria (i.e.
19228 no partition changes for non-crossing jumps).
19229 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19230 support for redirecting crossing jumps to non-crossing.
19232 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19234 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19235 also for naked functions.
19237 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19239 * config/arc/arc.md (add_shift): New pattern.
19240 (add_shift2): Likewise.
19241 (sub_shift): Likewise.
19242 (sub_shift_cmp0_noout): Likewise.
19243 (compare_si_ashiftsi): Likewise.
19244 (xbfu_cmp0_noout): New combine pattern.
19245 (xbfu_cmp0"): Likewise.
19246 (movsi_set_cc_insn): Place the predicable variant first.
19247 (commutative_binary_cmp0_noout): Remove clobber.
19248 (commutative_binary_cmp0): New pattern.
19249 (noncommutative_binary_cmp0): Likewise.
19250 (noncommutative_binary_cmp0_noout): Likewise.
19251 (noncommutative_binary_comparison_result_used): Removed.
19252 (rsub_cmp0): New pattern.
19253 (rsub_cmp0_noout): Likewise.
19254 (extzvsi): Changed, keep only meaningful variants.
19255 (SQH, SEZ): New iterators.
19256 (SQH_postfix): New mode attribute.
19257 (SEZ_prefix): New code attribute.
19258 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19259 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19260 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19261 of numerical value.
19262 (noncommutative_operator): Check the availability of barrel
19265 2018-04-09 Richard Biener <rguenther@suse.de>
19267 PR tree-optimization/85284
19268 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19269 Only use the niter constraining form of simple_iv when the exit
19270 is always executed.
19272 2018-04-09 Tom de Vries <tom@codesourcery.com>
19275 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19276 (define_expand "*memory_barrier"): New define_expand.
19277 (define_insn "memory_barrier"): New insn.
19279 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19281 PR rtl-optimization/80463
19282 PR rtl-optimization/83972
19283 PR rtl-optimization/83480
19285 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19286 correct producer for the insn.
19287 (tidy_control_flow): Fixup seqnos in case of debug insns.
19289 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19291 PR rtl-optimization/83913
19293 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19294 different sched-times when merging exprs.
19296 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19298 PR rtl-optimization/83962
19300 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19301 tidy_fallthru_edge and tidy_control_flow.
19303 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19305 PR rtl-optimization/83530
19307 * sel-sched.c (force_next_insn): New global variable.
19308 (remove_insn_for_debug): When force_next_insn is true, also leave only
19309 next insn in the ready list.
19310 (sel_sched_region): When the region wasn't scheduled, make another pass
19311 over it with force_next_insn set to 1.
19313 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19315 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19317 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19318 for interrupt control.
19319 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19320 functions for interrupt control.
19321 * config/nds32/nds32-intrinsic.md: Likewise.
19322 * config/nds32/nds32_intrinsic.h: Likewise.
19323 * config/nds32/nds32.h (nds32_builtins): Likewise.
19325 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19327 * config/nds32/nds32.c (nds32_init_machine_status,
19328 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19329 strict_aligned_p field.
19330 (nds32_expand_to_rtl_hook): New function.
19331 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19332 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19334 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19335 Chung-Ju Wu <jasonwucj@gmail.com>
19337 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19338 * config/nds32/nds32-n7.md: New file.
19339 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19340 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19342 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19343 * config/nds32/nds32.md (pipeline_model): Add n7.
19344 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19345 * config/nds32/pipelines.md: Include n7 settings.
19347 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19348 Chung-Ju Wu <jasonwucj@gmail.com>
19350 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19351 * config/nds32/nds32-e8.md: New file.
19352 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19353 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19355 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19356 * config/nds32/nds32.md (pipeline_model): Add e8.
19357 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19358 * config/nds32/pipelines.md: Include e8 settings.
19360 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19361 Chung-Ju Wu <jasonwucj@gmail.com>
19363 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19364 * config/nds32/nds32-n8.md: New file.
19365 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19366 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19368 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19369 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19370 * config/nds32/nds32.md (pipeline_model): Add n8.
19371 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19372 * config/nds32/pipelines.md: Include n8 settings.
19374 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19375 Chung-Ju Wu <jasonwucj@gmail.com>
19377 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19378 * config/nds32/nds32-n9-2r1w.md: New file.
19379 * config/nds32/nds32-n9-3r2w.md: New file.
19380 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19381 nds32_register_ports): New or modify for cpu n9.
19382 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19384 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19385 * config/nds32/nds32-utils.c: New file.
19386 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19387 TARGET_MUL_SLOW): Define.
19388 * config/nds32/nds32.md (pipeline_model): New attribute.
19389 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19390 New options that support cpu n9.
19391 * config/nds32/pipelines.md: Include n9 settings.
19392 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19394 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19396 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19397 information if necessary.
19398 (output_cond_branch_compare_zero): Likewise.
19399 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19400 (nds32_target_alignment): Refine for alignment.
19401 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19402 (FUNCTION_BOUNDARY): Modify.
19403 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19405 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19407 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19409 * config/nds32/constants.md (unspec_volatile_element): Add values for
19410 TLB operation and data prefetch.
19411 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19412 functions for TLB operation and data prefetch.
19413 * config/nds32/nds32-intrinsic.md: Likewise.
19414 * config/nds32/nds32_intrinsic.h: Likewise.
19415 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19416 (nds32_print_operand): Likewise.
19417 * config/nds32/nds32.h (nds32_builtins): Likewise.
19419 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19420 Andrew Pinski <pinsika@gcc.gnu.org>
19422 PR middle-end/82976
19423 * match.pd: Use constant_boolean_node of correct type instead of
19424 boolean_true_node or boolean_false_node for simplifying
19425 pointer comparisons to zero.
19427 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19429 PR tree-optimization/80021
19430 * tree.c (verify_type_variant): Make error call in verify_variant_match
19431 translatable and remove final full stop.
19433 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19435 * config/nds32/constants.md (unspec_volatile_element): Add
19436 UNSPEC_VOLATILE_EH_RETURN.
19437 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19438 nds32_output_stack_pop): Support dwarf exception handling process.
19439 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19440 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19441 exception handling process.
19442 (nds32_compute_stack_frame): Likewise.
19443 (nds32_return_addr_rtx): Likewise.
19444 (nds32_initial_elimination_offset): Likewise.
19445 (nds32_expand_prologue): Likewise.
19446 (nds32_expand_epilogue): Likewise.
19447 (nds32_dynamic_chain_address): New function.
19448 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19449 exception handling.
19450 (DYNAMIC_CHAIN_ADDRESS): Define.
19451 (EH_RETURN_DATA_REGNO): Define.
19452 (EH_RETURN_STACKADJ_RTX): Define.
19453 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19454 patterns for dwarf exception handling.
19456 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19458 * config/nds32/nds32.h: Clean up obsolete macros.
19460 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19462 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19463 Add enum values for particular instructions.
19464 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19465 particular intrinsic functions.
19466 * config/nds32/nds32-intrinsic.md: Likewise.
19467 * config/nds32/nds32_intrinsic.h: Likewise.
19468 * config/nds32/nds32.h (nds32_builtins): Likewise.
19469 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19470 (btst, ave): New patterns for particular instructions.
19472 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19474 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19475 Add enum values for atomic load/store and memory sync.
19476 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19478 * config/nds32/nds32-intrinsic.md: Likewise.
19479 * config/nds32/nds32_intrinsic.h: Likewise.
19480 * config/nds32/nds32.h (nds32_builtins): Likewise.
19482 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19484 PR tree-optimization/85257
19485 * fold-const.c (native_encode_vector): If not all elts could fit
19486 and off is -1, return 0 rather than offset.
19487 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19488 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19489 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19490 adjust buffer in native_interpret_expr call.
19492 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19494 * config/nds32/constants.md (unspec_volatile_element): Add cache
19495 control enum values.
19496 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19497 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19498 * config/nds32/nds32.c (nds32_cctl_names): New.
19499 (nds32_print_operand): Handle cache control register names.
19500 * config/nds32/nds32.h (nds32_builtins): New enum values.
19501 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19503 * config/nds32/nds32.md (type): Add mmu.
19504 * config/nds32/pipelines.md (simple_insn): Add mmu.
19506 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19508 * config/nds32/nds32.md (type): Remove call.
19509 * config/nds32/pipelines.md (simple_insn): Likewise.
19511 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19513 * config/nds32/constants.md (unspec_volatile_element): Add
19514 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19515 UNSPEC_VOLATILE_FMFCFG.
19516 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19517 description for fmfcfg and fmfcsr.
19518 (bdesc_1arg): Add fmtcsr.
19519 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19520 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19521 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19522 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19523 unspec_fmfcfg): New patterns.
19524 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19525 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19526 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19527 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19528 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19529 __nds32__fmfcfg): Define.
19531 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19533 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19534 intrinsic register names.
19535 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19536 intrinsic register enum values and macros.
19538 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19540 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19541 for load/store addressing form.
19542 (nds32_print_operand_address): Likewise.
19544 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19547 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19548 based on LABEL_REF. Remove useless assertion.
19549 (pic_address_needs_scratch): Fix formatting.
19550 (sparc_legitimize_pic_address): Minor tweaks.
19551 (sparc_delegitimize_address): Adjust assertion accordingly.
19552 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19553 into symbolic_operand.
19554 (movsi_high_pic_label_ref): Likewise.
19555 (movsi_lo_sum_pic_label_ref): Likewise.
19556 (movdi_pic_label_ref): Likewise.
19557 (movdi_high_pic_label_ref): Likewise.
19558 (movdi_lo_sum_pic_label_ref): Likewise.
19560 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19562 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19563 custom LIB_SPEC setup.
19565 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19566 Kito Cheng <kito.cheng@gmail.com>
19568 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19569 * config/riscv/freebsd.h: New.
19571 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19573 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19574 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19577 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19578 Kito Cheng <kito.cheng@gmail.com>
19580 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19581 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19582 * config/nds32/nds32-protos.h (nds32_output_call,
19583 nds32_output_return): Declare.
19584 * config/nds32/nds32.md: Refine all the call and return patterns.
19586 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19589 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19590 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19592 PR rtl-optimization/84872
19593 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19594 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19595 EDGE_CROSSING edge.
19597 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19599 * expr.c (copy_blkmode_to_reg): Revert 254862.
19600 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19602 2018-04-06 Richard Biener <rguenther@suse.de>
19604 PR middle-end/85244
19605 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19606 after seeing a component reference with an adjacent field. Treat
19607 refs to arrays at struct end of external decls similar to
19608 refs to unconstrained commons.
19610 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19613 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19614 look through SAVE_EXPRs with non-side-effects argument. Adjust
19616 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19619 2018-04-06 Richard Biener <rguenther@suse.de>
19621 PR middle-end/85180
19622 * alias.c (find_base_term): New wrapper around find_base_term
19623 unwinding CSELIB_VAL_PTR changes.
19624 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19627 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19629 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19631 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19632 constant definitions.
19633 ("nop"): lr 0,0 -> nopr r0
19634 ("nop_lr0", "nop_lr1"): New insn definitions.
19636 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19638 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19639 NDS32_V3PUSH_AVAILABLE_P macro.
19641 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19642 Chung-Ju Wu <jasonwucj@gmail.com>
19644 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19645 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19646 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19647 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19648 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19649 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19650 * config/nds32/constraints.md: New constraints and checking for hard
19651 float configuration.
19652 * config/nds32/iterators.md: New mode iterator and attribute for hard
19653 float configuration.
19654 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19656 * config/nds32/nds32-fpu.md: New file.
19657 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19658 deal with hard float code generation.
19659 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19661 (abi_type, float_reg_number): New enum type.
19662 * config/nds32/nds32-predicates.c: New predicates for hard float.
19663 * config/nds32/nds32-protos.h: Declare functions for hard float.
19664 * config/nds32/nds32.c: Implementation for hard float configuration.
19665 * config/nds32/nds32.h: Definitions for hard float configuration.
19666 * config/nds32/nds32.md: Include hard float machine description and
19667 modify patterns for hard float configuration.
19668 * config/nds32/nds32.opt: New options for hard float configuration.
19669 * config/nds32/predicates.md: New predicates for hard float
19672 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19674 * common/config/nds32/nds32-common.c
19675 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19677 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19679 PR middle-end/85195
19680 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19681 CONSTRUCTOR_ELT (ctor, ...)->value.
19683 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19686 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19688 2018-04-05 Tom de Vries <tom@codesourcery.com>
19691 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19694 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19695 Kito Cheng <kito.cheng@gmail.com>
19697 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19698 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19699 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19700 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19702 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19703 Kito Cheng <kito.cheng@gmail.com>
19705 * config/nds32/constraints.md (Ufe): New memory constraint.
19706 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19707 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19708 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19710 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19711 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19713 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19715 * config/nds32/nds32.md: Use optimize_size in the condition for
19716 alu-shift instructions.
19718 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19720 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19722 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19724 * config/nds32/nds32.md (negsi2): Refine pattern.
19726 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19727 Chung-Ju Wu <jasonwucj@gmail.com>
19729 * config/nds32/iterators.md (shift_rotate): New code iterator.
19730 (shift): New code attribute.
19731 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19732 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19733 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19734 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19735 bit-wise operations.
19736 (andsi3, *andsi3): Ditto.
19737 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19738 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19739 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19740 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19741 nds32_ior_operand, nds32_xor_operand): New predicates.
19743 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19745 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19746 (addsi3, subsi3): ... this.
19748 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19750 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19752 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19754 * config/nds32/nds32.md: Adjust indention.
19756 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
19758 * config/nds32/nds32.md (feature): New attribute.
19760 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
19762 * config/nds32/nds32.md (subtype): New attribute.
19764 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
19767 * config/arm/arm-builtins.c (arm_expand_builtin): Change
19768 expansion to perform a bitwise AND of the argument followed by a
19769 boolean negation of the result.
19771 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
19773 PR rtl-optimization/84878
19774 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19775 the basic block. Assert the use reference is not artificial and that
19776 it has an associated insn.
19778 2018-04-04 Michael Matz <matz@suse.de>
19780 * builtins.c (compute_objsize): Pass correct operand
19781 to array_at_struct_end_p.
19783 2018-04-04 Richard Biener <rguenther@suse.de>
19786 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19787 from contexts for DINFO_LEVEL_TERSE and below.
19789 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19791 * config/nds32/nds32-doubleword.md (move_<mode>): Require
19792 resiter_operand condition.
19793 * config/nds32/nds32.md (*move<mode>): Ditto.
19795 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19796 Monk Chiang <sh.chiang04@gmail.com>
19798 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19800 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19802 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19804 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19805 Kito Cheng <kito.cheng@gmail.com>
19807 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19808 nds32_cond_code_str, output_cond_branch,
19809 output_cond_branch_compare_zero, nds32_expand_cbranch,
19810 nds32_expand_cstore, nds32_expand_movcc,
19811 nds32_output_cbranchsi4_equality_zero,
19812 nds32_output_cbranchsi4_equality_reg,
19813 nds32_output_cbranchsi4_equality_reg_or_const_int,
19814 nds32_output_cbranchsi4_greater_less_zero: New functions.
19815 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19816 nds32_expand_cstore, nds32_expand_movcc,
19817 nds32_output_cbranchsi4_equality_zero,
19818 nds32_output_cbranchsi4_equality_reg,
19819 nds32_output_cbranchsi4_equality_reg_or_const_int,
19820 nds32_output_cbranchsi4_greater_less_zero): Declare.
19821 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19822 nds32_rimm11s_operand): New predicates.
19823 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19824 * config/nds32/nds32.md: Rewrite all the branch and conditional move
19827 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
19829 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19830 * config/nds32/nds32.md: Ditto.
19831 * config/nds32/pipelines.md: Ditto.
19833 2018-04-04 Richard Biener <rguenther@suse.de>
19835 PR tree-optimization/85168
19836 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19837 propagating abnormals.
19839 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19841 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19843 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
19844 Kito Cheng <kito.cheng@gmail.com>
19846 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19847 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19848 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19849 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19850 * config/nds32/nds32.md (sibcall_internal): New.
19851 (sibcall_register): Remove.
19852 (sibcall_immediate): Remove.
19853 (sibcall_value_internal): New.
19854 (sibcall_value_register): Remove.
19855 (sibcall_value_immediate): Remove.
19856 * config/nds32/predicates.md (nds32_general_register_operand): New.
19857 (nds32_call_address_operand): New.
19859 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19861 PR rtl-optimization/85167
19862 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19863 bb_defs if *split_p, instead preinitialize it to NULL.
19865 PR tree-optimization/85156
19866 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19867 evaluating the argument multiple times.
19869 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
19871 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19873 (_mm_cvtpd_ps): Likewise.
19874 (_mm_cvttpd_epi32): Likewise.
19875 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19876 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19877 vector, pixel, and bool following altivec.h include.
19879 2018-04-03 Martin Sebor <msebor@redhat.com>
19881 * doc/extend.texi (Common Function Attributes): Clarify.
19882 (const attribute): Likewise.
19883 (pure attribute): Likewise.
19885 2018-04-03 Jakub Jelinek <jakub@redhat.com>
19888 * config/i386/i386.c (ix86_expand_vector_set): Use
19889 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
19891 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
19893 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19894 instructions when changing rounding bits to preserve precision bits
19895 in the x87 control word.
19897 2018-04-03 Martin Liska <mliska@suse.cz>
19899 PR tree-optimization/82491
19900 * rtl.h (strip_offset_and_add): Replace += suboffset with
19901 poly_uint64 () + suboffset.
19903 2018-03-29 Martin Liska <mliska@suse.cz>
19904 Martin Jambor <mjambor@suse.cz>
19907 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19908 param_type is not an integral or pointer type.
19910 2018-04-03 Richard Biener <rguenther@suse.de>
19912 * sese.h (recompute_all_dominators): Remove.
19914 2018-04-02 Martin Sebor <msebor@redhat.com>
19916 * doc/invoke.texi (-Wrestrict): Fix typos.
19918 2018-04-02 Jim Wilson <jimw@sifive.com>
19920 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19921 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19922 (<optab>di3, <optab>si3_extend): Likewise.
19923 (<optab>si3_mask, <optab>si3_mask_1): New.
19924 (<optab>di3_mask, <optab>di3_mask_1): New.
19925 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19926 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19927 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19929 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
19931 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19934 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
19936 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19937 (nds32_canonicalize_comparison): New function.
19939 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19940 Kito Cheng <kito.cheng@gmail.com>
19941 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19943 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19944 * config/nds32/constants.md (unspec_volatile_element): Add
19945 UNSPEC_VOLATILE_RELAX_GROUP.
19946 * config/nds32/nds32-relax-opt.c: New file.
19947 * config/nds32/nds32-predicates.c
19948 (nds32_symbol_load_store_p): New function.
19949 * config/nds32/nds32-protos.h
19950 (nds32_symbol_load_store_p): Declare function.
19951 (make_pass_nds32_relax_opt): Declare new rtl pass function.
19952 * config/nds32/nds32.c
19953 (nds32_register_pass): New function to register pass.
19954 (nds32_register_passes): New function to register passes.
19955 * config/nds32/nds32.md (relax_group): New pattern.
19956 * config/nds32/nds32.opt (mrelax-hint): New option.
19957 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19959 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
19961 * config/nds32/t-nds32: Modify files dependency.
19963 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19965 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19966 (PROFILE_HOOK): Define its implementation.
19968 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
19970 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19971 type and 32-bit size.
19973 2018-04-01 Jakub Jelinek <jakub@redhat.com>
19975 PR middle-end/85090
19976 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19977 (V_128_256): New mode iterator.
19978 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19979 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19980 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19982 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19983 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19985 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
19988 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19989 NaN inputs correctly.
19991 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
19994 * config/rs6000/vsx.md (??r): New mode attribute.
19995 (*vsx_mov<mode>_64bit): Use it.
19996 (*vsx_mov<mode>_32bit): Likewise.
19998 2018-03-30 Martin Sebor <msebor@redhat.com>
20000 PR tree-optimization/84818
20001 * builtins.c (check_access): Use warning_n.
20003 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20006 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20008 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20011 2018-03-30 Julia Koval <julia.koval@intel.com>
20014 * x86-tune.def (movx, partial_reg_dependency): Enable for
20017 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20019 PR inline-asm/84985
20020 * lra-constraints.c (process_alt_operands): Move setting
20021 this_alternative_matches below.
20023 2018-03-29 Martin Liska <mliska@suse.cz>
20026 * doc/invoke.texi: Document how LTO works with debug info.
20027 Describe auto-load support of binutils. Mention 'x86-64'
20028 as valid option value of -march option.
20030 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20032 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20035 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20036 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20037 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20040 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20043 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20044 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20045 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20046 for RS6000_BTM_POWERPC64.
20047 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20048 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20049 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20052 (DIVDEU): Likewise.
20054 2018-03-28 Carl Love <cel@us.ibm.com>
20057 2017-09-27 Carl Love <cel@us.ibm.com>
20059 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20060 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20061 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20064 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20066 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20067 instead of __vector bool.
20068 (_mm_max_pu8): Likewise.
20069 (_mm_min_pi16): Likewise.
20071 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20074 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20075 (DIVWEUO): Likewise.
20076 (DIVDEO): Likewise.
20077 (DIVDEUO): Likewise.
20078 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20079 DIVWEUO and DIVDEUO.
20080 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20081 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20082 (div_extend): Likewise.
20083 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20085 (__builtin_divweuo): Likewise.
20086 (__builtin_divdeo): Likewise.
20087 (__builtin_divdeuo): Likewise.
20089 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20092 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20093 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20095 PR tree-optimization/82004
20096 * gimple-match-head.c (optimize_pow_to_exp): New function.
20097 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20098 Don't fold to exp if optimize_pow_to_exp is false.
20100 2018-03-28 Martin Liska <mliska@suse.cz>
20103 * calls.c (initialize_argument_information): Fix trailing space.
20104 * common.opt: Fix typo and provide better explanation for
20105 -fsanitize-coverage option.
20106 * config/i386/i386.opt: Fix typo.
20108 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20109 Martin Liska <mliska@suse.cz>
20112 * gimplify.c (asan_poison_variable): Don't do the check for
20113 gimplify_omp_ctxp here.
20114 (gimplify_decl_expr): Do it here.
20115 (gimplify_target_expr): Likewise.
20117 2018-03-28 Martin Liska <mliska@suse.cz>
20120 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20121 chkp_type_bounds_count if MPX is not enabled.
20123 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20125 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20127 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20130 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20131 function to create the function decl for complex long double
20132 multiply and divide for -mabi=ieeelongdouble.
20133 (init_float128_ieee): Call it.
20135 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20138 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20139 -fcf-protection=branch -mibt.
20140 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20142 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20145 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20146 arm_word_relocations.
20148 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20151 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20152 extern array declarations.
20154 2018-03-27 Richard Biener <rguenther@suse.de>
20156 PR middle-end/84067
20157 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20158 explicit single_use checks.
20160 2018-03-27 Richard Biener <rguenther@suse.de>
20162 PR tree-optimization/85082
20163 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20166 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20168 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20169 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20170 Turn on fasynchronous-unwind-tables and funwind-tables.
20172 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20175 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20176 (*bmi_blsr_<mode>_ccz): Ditto.
20178 2018-03-26 Tom de Vries <tom@codesourcery.com>
20180 PR tree-optimization/85063
20181 * omp-general.c (offloading_function_p): New function. Factor out
20183 * omp-offload.c (pass_omp_target_link::gate): ... here.
20184 * omp-general.h (offloading_function_p): Declare.
20185 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20186 with attribute omp declare target for offloading functions.
20188 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20190 PR tree-optimization/84005
20191 * tree-data-ref.h (get_base_for_alignment): Declare.
20192 * tree-data-ref.c (get_base_for_alignment_1): New function.
20193 (get_base_for_alignment): Likewise.
20194 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20195 get_base_for_alignment to find a suitable base object, instead
20196 of always using drb->base_address.
20198 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20200 PR inline-asm/85022
20201 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20202 known size by default.
20204 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20206 PR inline-asm/85030
20207 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20208 and non BLKmode operands.
20210 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20213 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20214 Clean up attributes.
20216 2018-03-23 Richard Biener <rguenther@suse.de>
20219 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20220 we are going to emit early debug for LTO.
20222 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20224 PR inline-asm/85034
20225 * function.c (match_asm_constraints_1): Don't optimize if input
20226 doesn't satisfy general_operand predicate for output's mode.
20228 PR inline-asm/85022
20229 * alias.c (write_dependence_p): Don't require for x_canonicalized
20230 non-VOIDmode if x has VOIDmode.
20233 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20234 just don't try to optimize it rather than assert it never happens.
20236 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20238 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20239 macro expansions for definition of ST_INTERNAL_<mode> and
20240 LD_INTERNAL_<mode> builtins.
20241 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20243 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20245 (altivec_expand_st_builtin): Likewise.
20246 (altivec_expand_builtin): Remove calls to deleted functions.
20247 (rs6000_address_for_altivec): Delete this function.
20248 * config/rs6000/vector.md: Remove expands for
20249 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20251 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20254 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20255 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20256 re-computing once computed.
20257 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20258 (arm_init_machine_status): Initialize
20259 machine->static_chain_stack_bytes.
20261 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20264 * doc/extend.texi: Add four new prototypes for vec_ld.
20265 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20266 definitions for more logical presentation.
20267 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20268 entries for V1TI variants of __builtin_altivec_ld builtin.
20269 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20270 handling of V1TI variant of LVX icode pattern.
20271 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20272 (rs6000_gimple_fold_builtin): Likewise.
20273 (altivec_init_builtins): Add code to define
20274 __builtin_altivec_lvx_v1ti function.
20276 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20278 PR inline-asm/84941
20279 * function.c (match_asm_constraints_1): Don't do the optimization
20280 if input isn't a REG, SUBREG, MEM or constant.
20282 2018-03-22 Tom de Vries <tom@codesourcery.com>
20284 PR tree-optimization/84956
20285 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20286 bb_has_abnormal_pred.
20288 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20291 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20292 DECL_INITIAL (decl) to decl at the end.
20293 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20294 adjust the comment.
20296 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20298 * doc/extend.texi (__builtin_tgmath): Document when complex
20299 integer types are treated as _Complex _Float64.
20301 2018-03-21 Tom de Vries <tom@codesourcery.com>
20303 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20305 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20307 PR tree-optimization/84960
20308 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20309 if it is ENTRY block, move them into single succ of ENTRY in that case.
20311 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20313 PR tree-optimization/84811
20314 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20315 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20316 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20317 (known_subrange_p): Update accordingly. Cast each value involved
20318 in the size comparison, rather than casting the result of the
20321 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20323 PR tree-optimization/84982
20324 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20325 by flipping the least significant bit rather than all bits from
20326 bitpos to bitpos + bitsize - 1.
20328 2018-03-21 Nathan Sidwell <nathan@acm.org>
20330 * doc/extend.texi (Deprecated Features): Remove mention of
20331 long-deleted deprecations.
20333 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20336 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20337 * configure: Regenerate.
20339 2018-03-21 Tom de Vries <tom@codesourcery.com>
20341 PR tree-optimization/83126
20342 * tree-parloops.c (num_phis): New function.
20343 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20345 2018-03-21 Nathan Sidwell <nathan@acm.org>
20347 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20348 mention anon-struct/union members and trailing attributes.
20350 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20352 PR tree-optimization/84969
20353 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20354 builtin memset partitions if they set different rhs values.
20356 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20358 PR rtl-optimization/84989
20359 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20360 VEC_DUPLICATE with scalar result mode.
20362 2018-03-21 Martin Liska <mliska@suse.cz>
20365 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20366 not intended return statement.
20368 2018-03-21 Martin Liska <mliska@suse.cz>
20371 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20372 (chkp_find_bound_slots_1): Limit number of iterations.
20374 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20377 * Minor grammar fixes for x86 options.
20379 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20382 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20383 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20385 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20388 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20389 (altivec_lvx_<mode>_1op): Likewise.
20390 (altivec_stvx_<mode>_2op): Likewise.
20391 (altivec_stvx_<mode>_1op): Likewise.
20392 (altivec_lvx_<VM2:mode>): New define_expand.
20393 (altivec_stvx_<VM2:mode>): Likewise.
20394 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20395 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20396 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20397 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20398 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20399 (rs6000_gen_lvx): Likewise.
20400 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20401 (altivec_expand_stv_builtin): Likewise.
20402 (altivec_expand_builtin): Likewise.
20403 * config/rs6000/vector.md: Likewise.
20405 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20408 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20411 2018-03-20 Richard Biener <rguenther@suse.de>
20414 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20415 sign-conversions as zero, fall back to standard scalar_stmt
20418 2018-03-20 Martin Liska <mliska@suse.cz>
20421 * predict.c (rebuild_frequencies): Handle case when we have
20422 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20424 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20427 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20428 flag_section_anchors.
20429 * varasm.c (use_blocks_for_decl_p): Remove hack for
20430 dw2_force_const_mem.
20433 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20435 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20436 be created, use lowpart_subreg of operands[0] rather than operands[0]
20438 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20439 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20440 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20441 and n constraint instead of aarch64_shift_imm_di and Usd.
20442 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20443 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20445 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20448 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20449 to favor GPR over NEON registers.
20450 (<shift>di3_neon): Likewise.
20452 2018-03-20 Tom de Vries <tom@codesourcery.com>
20455 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20456 (nvptx_process_pars): Emit bar.sync asap and alap.
20458 2018-03-20 Tom de Vries <tom@codesourcery.com>
20461 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20462 seen_label if seen_label is already set.
20464 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20467 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20468 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20469 Use 1U instead of 1. Formatting fixes.
20472 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20473 instead of TREE_TYPE (s1) for the return value.
20475 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20477 PR tree-optimization/84946
20478 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20479 bitsize + bitsize in poly_uint64 rather than poly_int64.
20482 * dwarf2asm.c: Include fold-const.c.
20483 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20484 of decl rather than decl itself.
20486 PR rtl-optimization/84643
20487 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20489 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20492 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20493 calling assemble_variable.
20495 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20498 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20499 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20501 2018-03-19 Jim Wilson <jimw@sifive.com>
20504 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20505 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20506 (riscv_first_stack_step): Likewise.
20507 (riscv_option_override): Use STACK_BOUNDARY instead of
20508 MIN_STACK_BOUNDARY.
20509 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20510 MIN_STACK_BOUNDARY.
20511 (BIGGEST_ALIGNMENT): Set to 128.
20512 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20513 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20516 2018-03-19 Richard Biener <rguenther@suse.de>
20518 PR tree-optimization/84933
20519 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20520 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20522 2018-03-19 Richard Biener <rguenther@suse.de>
20524 PR tree-optimization/84859
20525 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20526 (cond_if_else_store_replacement): Perform sinking operation on
20527 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20528 Generalize what a BB with a single eligible store is.
20530 2018-03-19 Richard Biener <rguenther@suse.de>
20532 PR tree-optimization/84929
20533 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20534 chrec_is_positive against non-chrec arg.
20536 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20539 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20541 2018-03-18 Martin Liska <mliska@suse.cz>
20543 PR rtl-optimization/84635
20544 * regrename.c (build_def_use): Use matches_mode only when
20547 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20549 PR tree-optimization/84913
20550 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20551 vectorize chains of COND_EXPRs.
20553 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20555 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20557 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20559 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20561 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20563 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20565 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20566 Kito Cheng <kito.cheng@gmail.com>
20568 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20569 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20570 (nds32_adjust_reg_alloc_order): New function.
20571 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20573 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20575 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20576 nds32_print_operand, nds32_print_operand_address): Use
20577 HOST_WIDE_INT_PRINT_DEC instead.
20579 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20581 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20583 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20586 * config/i386/i386.c (initial_ix86_tune_features,
20587 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20588 unsigned long long.
20589 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20590 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20591 rather than 1u << ix86_tune. Formatting fix.
20592 (ix86_option_override_internal): Change ix86_arch_mask from
20593 unsigned int to unsigned HOST_WIDE_INT, initialize to
20594 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20595 (ix86_function_specific_restore): Likewise.
20597 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20600 * postreload.c (reload_combine_recognize_pattern): Perform
20601 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20602 truncate_int_for_mode the result for the destination's mode.
20605 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20606 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20608 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20611 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20614 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20615 regno_allocno_class_array and sorted_pseudos.
20616 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20617 insns where regno is used.
20619 2018-03-16 Martin Liska <mliska@suse.cz>
20622 * multiple_target.c (create_dispatcher_calls): Redirect
20623 reference in the symbol table.
20625 2018-03-16 Martin Liska <mliska@suse.cz>
20628 * multiple_target.c (create_dispatcher_calls): Redirect also
20631 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20635 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20636 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20637 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20639 2018-03-16 Julia Koval <julia.koval@intel.com>
20641 * doc/invoke.texi (Skylake Server): Add CLWB.
20642 Cannonlake): Remove CLWB.
20644 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20646 PR tree-optimization/84841
20647 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20649 (FLOAT_ONE_CONST_TYPE): Define.
20650 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20651 (sort_by_operand_rank): Put entries with higher constant_type last
20652 rather than first to match comments.
20654 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20656 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20659 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20662 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20663 check and use address of target always.
20665 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20668 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20669 (indirect_thunk_bnd_needed): Likewise.
20670 (indirect_thunks_used): Likewise.
20671 (indirect_thunks_bnd_used): Likewise.
20672 (indirect_return_needed): New.
20673 (indirect_return_bnd_needed): Likewise.
20674 (output_indirect_thunk_function): Add a bool argument for
20676 (output_indirect_thunk_function): Don't generate alias for
20677 function return thunk.
20678 (ix86_code_end): Call output_indirect_thunk_function to generate
20679 function return thunks.
20680 (ix86_output_function_return): Set indirect_return_bnd_needed
20681 and indirect_return_needed instead of indirect_thunk_bnd_needed
20682 and indirect_thunk_needed.
20684 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20686 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20687 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20688 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20690 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20691 Paul Hua <paul.hua.gm@gmail.com>
20694 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20696 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20698 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20699 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20700 resp. SFmode cases.
20702 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20705 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20706 instead of GET_MODE_SIZE when comparing Units.
20708 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20711 * varasm.c (hash_section): Return an unchangeble hash value
20712 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20713 Return !aarch64_can_use_per_function_literal_pools_p ().
20715 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20718 * optabs.c (emit_conditional_move): Pass address of cmode's copy
20719 rather than address of cmode as last argument to prepare_cmp_insn.
20721 2018-03-15 Julia Koval <julia.koval@intel.com>
20723 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20724 F_AVX512VNNI, F_AVX512BITALG): New.
20726 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
20729 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
20730 insn for floating-point loads and stores.
20732 2018-03-14 Carl Love <cel@us.ibm.com>
20734 * config/rs6000/rs6000-c.c: Add macro definitions for
20735 ALTIVEC_BUILTIN_VEC_PERMXOR.
20736 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20737 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20738 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20739 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20741 * config/doc/extend.texi: Add prototypes for vec_permxor.
20743 2018-03-14 David Malcolm <dmalcolm@redhat.com>
20746 * diagnostic-show-locus.c (class layout_point): Convert m_line
20747 from int to linenum_type.
20748 (line_span::comparator): Use linenum "compare" function when
20749 comparing line numbers.
20750 (test_line_span): New function.
20751 (layout_range::contains_point): Convert param "row" from int to
20753 (layout_range::intersects_line_p): Likewise.
20754 (layout::will_show_line_p): Likewise.
20755 (layout::print_source_line): Likewise.
20756 (layout::should_print_annotation_line_p): Likewise.
20757 (layout::print_annotation_line): Likewise.
20758 (layout::print_leading_fixits): Likewise.
20759 (layout::annotation_line_showed_range_p): Likewise.
20760 (struct line_corrections): Likewise for field m_row.
20761 (line_corrections::line_corrections): Likewise for param "row".
20762 (layout::print_trailing_fixits): Likewise.
20763 (layout::get_state_at_point): Likewise.
20764 (layout::get_x_bound_for_row): Likewise.
20765 (layout::print_line): Likewise.
20766 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20767 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20768 * input.c (selftest::test_linenum_comparisons): New function.
20769 (selftest::input_c_tests): Call it.
20770 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20771 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20772 * selftest.h (ASSERT_GT): New macro.
20773 (ASSERT_GT_AT): New macro.
20774 (ASSERT_LT): New macro.
20775 (ASSERT_LT_AT): New macro.
20777 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
20779 PR rtl-optimization/84780
20780 * combine.c (distribute_links): Don't make a link based on pc_rtx.
20782 2018-03-14 Martin Liska <mliska@suse.cz>
20784 * tree.c (record_node_allocation_statistics): Use
20785 get_stats_node_kind.
20786 (get_stats_node_kind): New function extracted from
20787 record_node_allocation_statistics.
20788 (free_node): Use get_stats_node_kind.
20790 2018-03-14 Richard Biener <rguenther@suse.de>
20792 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20793 that the value-set of ANTIC_IN doesn't grow.
20796 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20798 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20799 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20801 2018-03-14 Julia Koval <julia.koval@intel.com>
20803 * config.gcc (icelake-client, icelake-server): New.
20805 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20806 (initial_ix86_arch_features): Ditto.
20807 (PTA_SKYLAKE): Add SGX.
20808 (PTA_ICELAKE): Remove.
20809 (PTA_ICELAKE_CLIENT): New.
20810 (PTA_ICELAKE_SERVER): New.
20811 (ix86_option_override_internal): Split up icelake on icelake client and
20813 (get_builtin_code_for_version): Ditto.
20814 (fold_builtin_cpu): Ditto.
20815 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20816 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20817 * config/i386/i386.h (processor_type): Ditto.
20818 * doc/invoke.texi: Ditto.
20820 2018-03-14 Jakub Jelinek <jakub@redhat.com>
20823 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20824 INTEGER_CST offset, add it together with bitpos / 8 and
20825 sign extend based on POINTER_SIZE.
20829 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
20832 * config/i386/constraints.md (Yc): New register constraint.
20833 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20834 Use Yc constraint for alternative 2 of operand 0. Remove
20835 preferred_for_speed attribute.
20837 2018-03-14 Richard Biener <rguenther@suse.de>
20839 PR tree-optimization/84830
20840 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20841 with the old one to avoid oscillations.
20843 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
20846 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20848 (assign_by_spills): Return a flag of reload assignment failure.
20849 Do not process the reload assignment failures. Do not spill other
20850 reload pseudos if they has the same reg class. Update n if
20852 (lra_assign): Add a return arg. Set up from the result of
20853 assign_by_spills call.
20854 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20855 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
20856 usage_insns if it is not NULL.
20857 (spill_hard_reg_in_range): New function.
20858 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20859 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20860 function prototypes.
20861 (lra_assign): Change prototype.
20862 * lra.c (lra): Add code to deal with fails by splitting hard reg
20865 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
20867 * config/riscv/riscv.opt (mrelax): New option.
20868 * config/riscv/riscv.c (riscv_file_start): Emit ".option
20869 "norelax" when riscv_mrelax is disabled.
20870 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20872 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20875 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20876 reassociation for int modes.
20878 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20880 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20881 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20883 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20884 * config/aarch64/aarch64-sve.md
20885 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20886 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20887 (*extend<mode><Vwide>2): Rename to...
20888 (aarch64_sve_extend<mode><Vwide>2): ...this.
20889 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20890 renaming the old pattern to...
20891 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
20893 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20894 define_expand, renaming the old pattern to...
20895 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20896 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20897 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20898 account when deciding which SVE instruction the optab should use.
20899 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20901 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20903 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20904 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20905 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20906 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20907 (tlsdesc_small_<mode>): Turn a define_expand and use
20908 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
20909 (tlsdesc_small_advsimd_<mode>): ...this.
20910 (tlsdesc_small_sve_<mode>): New pattern.
20912 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
20914 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20915 (UNSPEC_UMUL_HIGHPART): New constants.
20916 (MUL_HIGHPART): New int iteraor.
20917 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20918 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20920 (*<su>mul<mode>3_highpart): New define_insn.
20922 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20925 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20928 2018-03-13 Martin Liska <mliska@suse.cz>
20931 * (sem_item_optimizer::sem_item_optimizer): Initialize new
20933 (sem_item_optimizer::~sem_item_optimizer): Release it.
20934 (sem_item_optimizer::merge_classes): Register variable aliases.
20935 (sem_item_optimizer::fixup_pt_set): New function.
20936 (sem_item_optimizer::fixup_points_to_sets): Likewise.
20937 * ipa-icf.h: Declare new variables and functions.
20939 2018-03-13 Jakub Jelinek <jakub@redhat.com>
20941 PR middle-end/84834
20942 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20943 integer_pow2p@2 and test integer_pow2p in condition.
20944 (A < 0 ? C : 0): Similarly for @1.
20946 PR middle-end/84831
20947 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20948 characters starting at p contain '\0' character, don't look beyond
20952 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20953 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20956 * reg-stack.c (change_stack): Change update_end var from int to
20957 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20958 also call set_block_for_insn on the newly added insns and rescan.
20961 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20962 on the last operand.
20965 * tree.c (stabilize_reference_1): Return save_expr (e) for
20966 STATEMENT_LIST even if it doesn't have side-effects.
20968 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
20970 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20972 2018-03-12 Renlin Li <renlin.li@arm.com>
20974 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20975 aarch64_output_scalar_simd_mov_immediate.
20977 2018-03-12 Martin Sebor <msebor@redhat.com>
20979 PR tree-optimization/83456
20980 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20981 for perfectly overlapping calls to memcpy.
20982 (gimple_fold_builtin_memory_chk): Same.
20983 (gimple_fold_builtin_strcpy): Handle no-warning.
20984 (gimple_fold_builtin_stxcpy_chk): Same.
20985 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20987 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20989 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20990 parameter. Use it for SFmode.
20991 (rs6000_function_arg_advance_1): Adjust.
20992 (rs6000_function_arg): Adjust.
20993 (rs6000_gimplify_va_arg): Pass false for that new parameter.
20995 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
20997 PR rtl-optimization/84169
20998 PR rtl-optimization/84780
20999 * combine.c (can_combine_p): Check for a 2-insn combination whether
21000 the destination register is used between the two insns, too.
21002 2018-03-12 Richard Biener <rguenther@suse.de>
21004 PR tree-optimization/84803
21005 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21006 for refs DR analysis didn't process.
21008 2018-03-12 Richard Biener <rguenther@suse.de>
21010 PR tree-optimization/84777
21011 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21012 force-vectorize loops ignore whether we are optimizing for size.
21014 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21016 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21017 (TARGET_MD_ASM_ADJUST): Define.
21019 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21020 Kito Cheng <kito.cheng@gmail.com>
21021 Chung-Ju Wu <jasonwucj@gmail.com>
21023 * config/nds32/nds32.c (nds32_compute_stack_frame,
21024 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21025 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21026 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21027 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21028 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21029 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21030 * config/nds32/nds32.md (prologue, epilogue): Use macro
21031 NDS32_V3PUSH_AVAILABLE_P to do checking.
21033 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21036 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21037 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21038 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21039 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21040 addition of most attributes on !orig_type_die or the attribute not
21041 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21043 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21044 Chung-Ju Wu <jasonwucj@gmail.com>
21046 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21047 __NDS32_VH__ macro.
21048 * config/nds32/nds32.opt (mvh): New option.
21050 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21051 Chung-Ju Wu <jasonwucj@gmail.com>
21053 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21055 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21056 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21059 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21060 Chung-Ju Wu <jasonwucj@gmail.com>
21062 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21064 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21065 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21067 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21068 Kito Cheng <kito.cheng@gmail.com>
21069 Chung-Ju Wu <jasonwucj@gmail.com>
21071 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21072 UNSPEC_FFMISM and UNSPEC_FLMISM.
21073 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21074 for ffb, ffmism and flmism.
21075 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21076 (unspec_ffmism): Ditto.
21077 (unspec_flmism): Ditto.
21078 (nds32_expand_builtin_impl): Check if string extension is available.
21079 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21080 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21082 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21085 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21088 * lra-assigns.c (assign_by_spills): Return a flag of reload
21089 assignment failure. Do not process the reload assignment
21090 failures. Do not spill other reload pseudos if they has the same
21092 (lra_assign): Add a return arg. Set up from the result of
21093 assign_by_spills call.
21094 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21095 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21096 usage_insns if it is not NULL.
21097 (spill_hard_reg_in_range): New function.
21098 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21099 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21100 function prototypes.
21101 (lra_assign): Change prototype.
21102 * lra.c (lra): Add code to deal with fails by splitting hard reg
21105 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21108 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21110 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21113 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21114 (dw_val_node): Add val_symbolic_view.
21115 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21116 (symview_upper_bound): New.
21117 (new_line_info_table): Initialize symviews_since_reset.
21118 (dwarf2out_source_line): Count symviews_since_reset and set
21119 symview_upper_bound.
21120 (dw_val_equal_p): Handle symview.
21121 (add_AT_symview): New.
21122 (print_dw_val): Handle symview.
21123 (attr_checksum, attr_checksum_ordered): Likewise.
21124 (same_dw_val_p, size_of_die): Likewise.
21125 (value_format, output_die): Likewise.
21126 (add_high_low_attributes): Use add_AT_symview for entry_view.
21127 (dwarf2out_finish): Reset symview_upper_bound, clear
21130 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21133 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21134 Add strict argument and use it.
21135 (rs6000_split_multireg_move): Update for new strict argument.
21136 (mem_operand_gpr): Disallow all non-offsettable addresses.
21137 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21139 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21142 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21143 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21144 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21147 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21148 decl, use remap_type if we want to use the type.
21150 2018-03-09 Martin Sebor <msebor@redhat.com>
21152 PR tree-optimization/84526
21153 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21155 (builtin_access::generic_overlap): Be prepared to handle non-array
21158 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21160 PR rtl-optimization/84682
21161 * lra-constraints.c (process_address_1): Check is_address flag
21162 for address constraints.
21163 (process_alt_operands): Likewise.
21164 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21165 preprocess_constraints.
21166 * recog.h (preprocess_constraints): Add oploc parameter.
21168 * recog.c (preprocess_constraints): Test address_operand for
21169 CT_ADDRESS constraints.
21171 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21174 * lra-assigns.c (assign_by_spills): Return a flag of reload
21175 assignment failure. Do not process the reload assignment
21176 failures. Do not spill other reload pseudos if they has the same
21178 (lra_assign): Add a return arg. Set up from the result of
21179 assign_by_spills call.
21180 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21181 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21182 usage_insns if it is not NULL.
21183 (spill_hard_reg_in_range): New function.
21184 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21185 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21186 function prototypes.
21187 (lra_assign): Change prototype.
21188 * lra.c (lra): Add code to deal with fails by splitting hard reg
21191 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21194 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21195 Accept complain bool parameter. Only emit errors if it is true.
21196 (arm_parse_cpu_option_name): Likewise.
21197 (arm_target_thumb_only): Adjust callers of the above.
21198 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21199 prototype to take a default true bool parameter.
21200 (arm_parse_arch_option_name): Likewise.
21202 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21203 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21207 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21208 * configure: Regenerate.
21209 * configure.ac ("linker --version-script option"): New.
21210 ("linker soname option"): New.
21212 2018-03-09 Richard Biener <rguenther@suse.de>
21214 PR tree-optimization/84775
21215 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21216 immediate uses of predicate stmts and mark them modified.
21219 PR tree-optimization/84178
21220 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21222 (version_loop_for_if_conversion): Delay update_ssa call.
21223 (tree_if_conversion): Delay update_ssa until after predicate
21226 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21229 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21230 when the function accesses prior frames.
21232 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21235 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21236 gen_llsym, otherwise call maybe_gen_llsym.
21238 PR inline-asm/84742
21239 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21240 has ',' character inside of it.
21242 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21245 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21246 as clobbering CC_REGNUM.
21248 2018-03-08 Richard Biener <rguenther@suse.de>
21250 PR middle-end/84552
21251 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21252 (follow_copies_to_constant): Do not follow SSA names registered
21255 2018-03-08 Richard Biener <rguenther@suse.de>
21257 PR tree-optimization/84178
21258 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21260 (version_loop_for_if_conversion): Delay update_ssa call.
21261 (tree_if_conversion): Delay update_ssa until after predicate
21264 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21266 PR tree-optimization/84178
21267 * tree-if-conv.c (release_bb_predicate): Remove the
21268 the assertion that the stmts have NULL use_ops.
21269 Discard the statements, asserting that they haven't
21270 yet been added to a BB.
21272 2018-03-08 Richard Biener <rguenther@suse.de>
21274 PR tree-optimization/84746
21275 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21276 (phi_translate): Pass in destination ANTIC_OUT set.
21277 (phi_translate_1): Likewise. For a simplified result lookup
21278 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21279 (phi_translate_set): Adjust.
21280 (do_pre_regular_insertion): Likewise.
21281 (do_pre_partial_partial_insertion): Likewise.
21283 2018-03-08 Martin Liska <mliska@suse.cz>
21285 PR gcov-profile/84735
21286 * doc/gcov.texi: Document usage of profile files.
21287 * gcov-io.h: Document changes in the format.
21289 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21293 * dwarf2out.c (struct dw_line_info_table): Update comments for
21295 (FORCE_RESET_NEXT_VIEW): New.
21296 (FORCE_RESETTING_VIEW_P): New.
21297 (RESETTING_VIEW_P): Check for -1 too.
21298 (ZERO_VIEW_P): Likewise.
21299 (new_line_info_table): Force-reset next view.
21300 (dwarf2out_begin_function): Likewise.
21301 (dwarf2out_source_line): Simplify zero_view_p initialization.
21302 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21303 view directly. Omit view when omitting .loc at line 0.
21305 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21307 PR tree-optimization/84740
21308 * tree-switch-conversion.c (process_switch): Call build_constructors
21309 only if info.phi_count is non-zero.
21311 PR tree-optimization/84739
21312 * tree-tailcall.c (find_tail_calls): Check call arguments against
21313 DECL_ARGUMENTS (current_function_decl) rather than
21314 DECL_ARGUMENTS (func) when checking for tail recursion.
21316 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21318 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21319 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21320 Volker Reichelt's entry and add entries for people that perform
21321 GCC fuzzy testing and report numerous bugs.
21323 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21326 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21327 readonly data in sdata, if that is disabled.
21328 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21329 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21330 -mreadonly-in-sdata option.
21332 2018-03-07 Martin Sebor <msebor@redhat.com>
21334 PR tree-optimization/84468
21335 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21336 basic block when looking for nul assignment.
21338 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21341 * except.h (output_function_exception_table): Adjust prototype.
21342 * except.c (output_function_exception_table): Remove FNNAME parameter
21343 and add SECTION parameter. Ouput one part of the table at a time.
21344 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21345 the first part of the exception table and emit unwind directives.
21346 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21347 (i386_pe_seh_cold_init): Likewise.
21348 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21349 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21350 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21351 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21352 * config/i386/winnt.c: Include except.h.
21353 (struct seh_frame_state): Add reg_offset, after_prologue and
21354 in_cold_section fields.
21355 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21356 (i386_pe_seh_cold_init): New function.
21357 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21358 to seh->in_cold_section.
21359 (seh_emit_push): Record the offset of the push.
21360 (seh_emit_save): Record the offet of the save.
21361 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21362 Test seh->after_prologue to disregard the epilogue.
21363 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21364 (i386_pe_end_cold_function): New function.
21366 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21369 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21370 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21373 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21375 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21376 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21378 PR middle-end/84723
21379 * multiple_target.c: Include tree-inline.h and intl.h.
21380 (expand_target_clones): Diagnose and fail if node->definition and
21381 !tree_versionable_function_p (node->decl).
21383 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21385 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21387 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21388 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21389 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21391 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21394 * combine.c (try_combine): Use reg_or_subregno instead of handling
21395 just paradoxical SUBREGs and REGs.
21397 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21399 * config/arc/arc.c (arc_finalize_pic): Remove function.
21400 (arc_must_save_register): We use single base PIC register, remove
21401 checks to save/restore the PIC register.
21402 (arc_expand_prologue): Likewise.
21403 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21405 (arc_verify_short): Likewise.
21406 (arc_attr_type): Likewise.
21407 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21408 (walk_stores): Likewise.
21409 (arc_address_cost): Make it static.
21410 (arc_verify_short): Likewise.
21411 (branch_dest): Likewise.
21412 (arc_attr_type): Likewise.
21413 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21414 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21415 (arc_final_prescan_insn): Remove inserting the nops due to
21416 hardware hazards. It is done in reorg step.
21417 (insn_length_variant_t): Remove.
21418 (insn_length_parameters_t): Likewise.
21419 (arc_insn_length_parameters): Likewise.
21420 (arc_get_insn_variants): Likewise.
21421 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21423 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21425 PR inline-asm/84683
21426 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21429 PR tree-optimization/84687
21430 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21432 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21434 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21436 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21437 Rename to ppc_speculation_barrier.
21438 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21439 __builtin_ppc_speculation_barrier.
21441 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21444 * combine.c (combine_simplify_rtx): Don't try to simplify if
21445 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21448 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21450 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21451 to 32 bytes when compiling for POWER9.
21453 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21456 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21457 regparm >= 3 with no arg reg available also for calls with
21458 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21461 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21463 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21465 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21468 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21470 2018-03-05 Richard Biener <rguenther@suse.de>
21472 PR tree-optimization/84486
21473 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21474 When inserting a __builtin_assume_aligned call set the LHS
21475 SSA name alignment info accordingly.
21477 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21479 PR tree-optimization/84114
21480 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21481 Avoid reassociation of FLOAT_MODE addition.
21483 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21485 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21486 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21487 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21488 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21489 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21490 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21491 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21493 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21494 __builtin_ia32_wbinvd): New builtins.
21495 (SPECIAL_ARGS2): New.
21496 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21497 (SPECIAL_ARGS2): New.
21498 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21499 (ix86_valid_target_attribute_inner_p): Ditto.
21500 (ix86_init_mmx_sse_builtins): Add special_args2.
21501 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21502 TARGET_WBNOINVD_P): New.
21503 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21504 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21505 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21506 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21507 * config/i386/pconfigintrin.h: New file.
21508 * config/i386/wbnoinvdintrin.h: Ditto.
21509 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21511 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21513 2018-03-05 Richard Biener <rguenther@suse.de>
21515 PR tree-optimization/84670
21516 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21518 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21519 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21520 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21521 doesn't grow if all successors (recursively) were visited at least
21524 2018-03-05 Richard Biener <rguenther@suse.de>
21526 PR tree-optimization/84650
21527 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21528 if executed in the loop pipeline.
21530 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21532 * doc/configfiles.texi (Configuration Files): Move info about
21533 conditionalizing $target-protos.h to...
21534 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21535 differs from $target-protos.h.
21537 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21538 Chung-Ju Wu <jasonwucj@gmail.com>
21540 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21541 * config/nds32/nds32-multiple.md (setmemsi): Define.
21542 * config/nds32/nds32-memory-manipulation.c
21543 (nds32_gen_dup_4_byte_to_word_value): New.
21544 (emit_setmem_word_loop): New.
21545 (emit_setmem_byte_loop): New.
21546 (nds32_expand_setmem_loop): New.
21547 (nds32_expand_setmem_loop_v3m): New.
21548 (nds32_expand_setmem_unroll): New.
21549 (nds32_expand_setmem): New.
21551 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21552 Chung-Ju Wu <jasonwucj@gmail.com>
21554 * config/nds32/nds32-memory-manipulation.c
21555 (nds32_emit_load_store): New.
21556 (nds32_emit_post_inc_load_store): New.
21557 (nds32_emit_mem_move): New.
21558 (nds32_emit_mem_move_block): New.
21559 (nds32_expand_movmemsi_loop_unknown_size): New.
21560 (nds32_expand_movmemsi_loop_known_size): New.
21561 (nds32_expand_movmemsi_loop): New.
21562 (nds32_expand_movmemsi_unroll): New.
21563 (nds32_expand_movmemqi): Rename ...
21564 (nds32_expand_movmemsi): ... to this.
21565 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21566 (movmemsi): ... to this.
21567 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21568 (nds32_expand_movmemsi): ... to this.
21570 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21571 Monk Chiang <sh.chiang04@gmail.com>
21572 Chung-Ju Wu <jasonwucj@gmail.com>
21574 * config/nds32/nds32-protos.h
21575 (nds32_expand_load_multiple): New arguments.
21576 (nds32_expand_store_multiple): Ditto.
21577 (nds32_valid_multiple_load_store): Rename ...
21578 (nds32_valid_multiple_load_store_p): ... to this.
21579 * config/nds32/nds32-memory-manipulation.c
21580 (nds32_expand_load_multiple): Refine implementation.
21581 (nds32_expand_store_multiple): Ditto.
21582 * config/nds32/nds32-multiple.md
21583 (load_multiple): Update nds32_expand_load_multiple interface.
21584 (store_multiple): Update nds32_expand_store_multiple interface.
21585 * config/nds32/nds32-predicates.c
21586 (nds32_valid_multiple_load_store): Rename ...
21587 (nds32_valid_multiple_load_store_p): ... to this and refine
21589 * config/nds32/predicates.md
21590 (nds32_load_multiple_and_update_address_operation): New predicate.
21591 (nds32_store_multiple_and_update_address_operation): New predicate.
21593 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21594 Chung-Ju Wu <jasonwucj@gmail.com>
21596 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21597 (combo): New attribute.
21598 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21600 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21602 * config/nds32/nds32.opt: Change -mcmodel= default value.
21604 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21605 Monk Chiang <sh.chiang04@gmail.com>
21606 Chung-Ju Wu <jasonwucj@gmail.com>
21608 * config/nds32/constants.md (unspec_element): New enum.
21609 * config/nds32/constraints.md (Umw): New constraint.
21610 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21611 * config/nds32/nds32-intrinsic.md: Likewise.
21612 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21613 (nds32_valid_smw_lwm_base_p): New.
21614 (nds32_output_smw_single_word): New.
21615 (nds32_output_lmw_single_word): New.
21616 (nds32_expand_unaligned_load): New.
21617 (nds32_expand_unaligned_store): New.
21618 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21619 (nds32_output_smw_single_word): Declare.
21620 (nds32_output_lmw_single_word): Declare.
21621 (nds32_expand_unaligned_load): Declare.
21622 (nds32_expand_unaligned_store): Declare.
21623 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21624 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21625 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21626 NDS32_BUILTIN_UASTORE_DW.
21627 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21630 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21631 Kito Cheng <kito.cheng@gmail.com>
21632 Chung-Ju Wu <jasonwucj@gmail.com>
21634 * config/nds32/nds32-intrinsic.c
21635 (nds32_expand_builtin_null_ftype_reg): Delete.
21636 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21637 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21638 (nds32_read_argument): New.
21639 (nds32_legitimize_target): Ditto.
21640 (nds32_legitimize_argument): Ditto.
21641 (nds32_check_constant_argument): Ditto.
21642 (nds32_expand_unop_builtin): Ditto.
21643 (nds32_expand_unopimm_builtin): Ditto.
21644 (nds32_expand_binop_builtin): Ditto.
21645 (nds32_builtin_decl_impl): Ditto.
21646 (builtin_description): Ditto.
21647 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21648 (nds32_init_builtins_impl): Ditto.
21649 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21650 (nds32_builtin_decl): New.
21651 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21652 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21654 2018-03-02 Jeff Law <law@redhat.com>
21656 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21657 (redundant_insn, fill_simple_delay_slots): Likewise.
21658 (fill_slots_from_thread): Likewise.
21659 * resource.c (mark_referenced_resources): Likewise.
21660 (mark_set_resources, find_dead_or_set_registers): Likewise.
21662 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21664 * substring-locations.h (format_warning_va): Formatting fix for
21665 ATTRIBUTE_GCC_DIAG.
21666 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21668 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21669 * substring-locations.c: Include intl.h.
21670 (format_warning_va): Turned into small wrapper around
21671 format_warning_n_va, renamed to ...
21672 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21673 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21675 (format_warning_at_substring_n): New function.
21676 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21677 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21678 format_warning_at_substring with just a shorter name instead of
21679 const function pointer.
21680 (fmtwarn_n): New function.
21681 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21682 appropriate, get rid of all the fmtstr temporaries, move conditionals
21683 with G_() wrapped string literals directly into fmtwarn arguments,
21684 cast dir.len to (int), formatting fixes.
21686 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21688 * doc/invoke.texi: Remove "Cilk Plus" references.
21690 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21691 Richard Biener <rguenther@suse.de>
21694 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21695 for error or warning attributes if CALL_FROM_THUNK_P is set.
21698 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21701 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21702 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21705 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21706 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21708 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21709 instead of -1U in last predictors element's probability member.
21711 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21714 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21715 arguments if they are comparable.
21717 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21719 PR tree-optimization/84634
21720 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21721 masks and masked_loop_p with a single loop_masks, making sure it's
21722 null for bb vectorization.
21724 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
21726 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21727 (vect_analyze_data_ref_access): Use loop->safe_len rather than
21728 loop->force_vectorize to check whether there is no alias.
21730 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21733 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21735 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21737 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21738 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21739 instead of a loop around prev_real_insn.
21740 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21743 PR inline-asm/84625
21744 * config/i386/i386.c (ix86_print_operand): Use conditional
21745 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21748 2018-03-02 Richard Biener <rguenther@suse.de>
21750 PR tree-optimization/84427
21751 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21752 (bitmap_set_subtract_values): Rewrite to handle multiple
21755 (prune_clobbered_mems): Likewise.
21756 (phi_translate): Take edge instead of pred/phiblock.
21757 (phi_translate_1): Likewise.
21758 (phi_translate_set): Likewise. Insert all translated
21759 exprs for a value into the set, keeping possibly multiple
21760 expressions per value.
21761 (compute_antic_aux): Adjust for phi_translate changes.
21762 When intersecting union the expressions and prune those
21763 not in the final value set, keeping possibly multiple
21764 expressions per value. Do not use value-insertion
21765 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21766 all expressions. Add verification that the value-sets
21767 only shrink during iteration.
21768 (compute_partial_antic_aux): Adjust for the phi_translate changes.
21769 (do_pre_regular_insertion): Likewise.
21770 (do_pre_partial_partial_insertion): Likewise.
21772 2018-03-02 Richard Biener <rguenther@suse.de>
21775 * config/darwin.c (saved_debug_info_level): New static global.
21776 (darwin_asm_lto_start): Disable debug info generation for LTO out.
21777 (darwin_asm_lto_end): Restore debug info generation settings.
21779 2018-03-01 Martin Liska <mliska@suse.cz>
21782 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21783 volatile arguments.
21785 2018-03-01 Richard Biener <rguenther@suse.de>
21788 * dwarf2out.c (gen_variable_die): Properly handle late VLA
21789 type annotation with LTO when debug was disabled at compile-time.
21791 2018-03-01 Matthew Fortune <mfortune@gmail.com>
21793 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21795 (mips_final_postscan_insn): Likewise.
21797 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
21799 PR rtl-optimization/84528
21800 * alias.c (init_alias_target): Add commentary.
21801 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21802 a unique base value if the frame pointer is not eliminated
21803 to the stack pointer.
21805 2018-03-01 Tom de Vries <tom@codesourcery.com>
21807 PR rtl-optimization/83327
21808 * lra-int.h (hard_regs_spilled_into): Declare.
21809 * lra.c (hard_regs_spilled_into): Define.
21810 (init_reg_info): Init hard_regs_spilled_into.
21811 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21812 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21813 (process_bb_lives): Handle hard_regs_spilled_into.
21814 (lra_create_live_ranges_1): Before doing liveness propagation, clear
21815 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21817 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
21819 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21820 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21821 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21822 * config/rs6000/aix72.h: New file.
21824 2018-02-28 Jakub Jelinek <jakub@redhat.com>
21826 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21827 instead of warning_at with conditional singular and plural messages
21831 * stor-layout.c (update_alignment_for_field): For
21832 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21833 && !DECL_PACKED (field), do the alignment update, just use
21834 only desired_align instead of MAX (type_align, desired_align)
21836 (place_field): Don't do known_align < desired_align handling
21837 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21838 is non-NULL, instead do it after rli->prev_field handling and
21839 only if not within a bitfield word. For DECL_PACKED (field)
21840 use type_align of BITS_PER_UNIT.
21842 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
21844 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21845 superfluous parentheses and trailing spaces.
21847 2018-02-28 Richard Biener <rguenther@suse.de>
21849 PR tree-optimization/84584
21850 * graphite-scop-detection.c (scop_detection::add_scop): Discard
21851 SCoPs with fake exit edge.
21853 2018-02-28 Martin Liska <mliska@suse.cz>
21856 * timevar.c (timer::print): Fix format to properly print 100%
21859 2018-02-28 Richard Biener <rguenther@suse.de>
21861 PR middle-end/84607
21862 * genmatch.c (capture_info::walk_match): Do not mark
21863 captured expressions without operands as expr_p given
21864 they act more like predicates and should be subject to
21865 "lost tail" side-effect preserving.
21867 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
21869 PR rtl-optimization/81611
21870 * auto-inc-dec.c (attempt_change): Move dead note from
21871 mem_insn if it's the next use of regno
21872 (find_address): Take address use of reg holding
21873 non-incremented value. Add parm to limit search to the named
21875 (merge_in_block): Attempt to use a mem insn that is the next
21876 use of the original regno.
21878 2018-02-27 Martin Sebor <msebor@redhat.com>
21881 * doc/invoke.texi (-Wmissing-attributes): New option.
21882 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21884 2018-02-27 Martin Sebor <msebor@redhat.com>
21886 PR translation/84207
21887 * diagnostic-core.h (warning_n, error_n, inform_n): Change
21888 n argument to unsigned HOST_WIDE_INT.
21889 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21890 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
21891 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21892 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21894 2018-02-27 Richard Biener <rguenther@suse.de>
21896 PR tree-optimization/84512
21897 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21898 Do not use the estimate returned from record_stmt_cost for
21899 the scalar iteration cost but sum properly using add_stmt_cost.
21901 2018-02-27 Richard Biener <rguenther@suse.de>
21903 PR tree-optimization/84466
21904 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21905 Adjust last change to less strictly validate use operands.
21907 2018-02-27 Martin Liska <mliska@suse.cz>
21909 PR gcov-profile/84548
21910 * gcov.c (process_file): Allow partial overlap and consider it
21911 also as group functions.
21912 (output_lines): Properly calculate range of lines for a group.
21914 2018-02-27 Martin Liska <mliska@suse.cz>
21916 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21917 'ggc' suffixes. Change first column width.
21918 (timer::print): Fix formatting of the column.
21920 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
21922 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21923 preserve inline entry blocks for the sake of debug inline
21924 entry point markers alone.
21925 (remove_unused_locals): Suggest in comments a better place to
21926 force the preservation of inline entry blocks that are
21927 otherwise unused, but do not preserve them.
21929 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21931 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21933 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21936 * config/i386/constraints.md (Bs): Replace
21937 ix86_indirect_branch_register with
21938 TARGET_INDIRECT_BRANCH_REGISTER.
21940 * config/i386/i386.md (indirect_jump): Likewise.
21941 (tablejump): Likewise.
21942 (*sibcall_memory): Likewise.
21943 (*sibcall_value_memory): Likewise.
21944 Peepholes of indirect call and jump via memory: Likewise.
21945 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21946 (*sibcall_value_GOT_32): Likewise.
21947 * config/i386/predicates.md (indirect_branch_operand): Likewise.
21948 (GOT_memory_operand): Likewise.
21949 (call_insn_operand): Likewise.
21950 (sibcall_insn_operand): Likewise.
21951 (GOT32_symbol_operand): Likewise.
21952 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21954 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21956 PR rtl-optimization/83496
21957 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21958 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
21959 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21960 redundant insn, if any.
21961 (relax_delay_slots): Likewise.
21962 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21964 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
21966 PR tree-optimization/83965
21967 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21968 that grouped statements are part of a reduction chain. Return
21969 true if the statement is not marked as a reduction itself but
21970 is part of a group.
21971 (vect_recog_dot_prod_pattern): Don't check whether the statement
21972 is part of a group here.
21973 (vect_recog_sad_pattern): Likewise.
21974 (vect_recog_widen_sum_pattern): Likewise.
21976 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
21979 * final.c (rest_of_clean_state): Also look for calls inside sequences.
21981 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
21984 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21986 (ix86_output_indirect_function_return): New prototype.
21987 (ix86_split_simple_return_pop_internal): Likewise.
21988 * config/i386/i386.c (indirect_return_via_cx): New.
21989 (indirect_return_via_cx_bnd): Likewise.
21990 (indirect_thunk_name): Handle return va CX_REG.
21991 (output_indirect_thunk_function): Create alias for
21992 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21993 (ix86_output_indirect_jmp): Remove the bool argument.
21994 (ix86_output_indirect_function_return): New function.
21995 (ix86_split_simple_return_pop_internal): Likewise.
21996 * config/i386/i386.md (*indirect_jump): Don't pass false
21997 to ix86_output_indirect_jmp.
21998 (*tablejump_1): Likewise.
21999 (simple_return_pop_internal): Change it to define_insn_and_split.
22000 Call ix86_split_simple_return_pop_internal to split it for
22001 -mfunction-return=.
22002 (simple_return_indirect_internal): Call
22003 ix86_output_indirect_function_return instead of
22004 ix86_output_indirect_jmp.
22006 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22009 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22010 memset and value initialization afterwards.
22012 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22014 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22016 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22019 * common/config/aarch64/aarch64-common.c
22020 (aarch_option_optimization_table[]): Switch
22021 off fomit-frame-pointer
22023 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22024 Chung-Ju Wu <jasonwucj@gmail.com>
22026 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22028 (store_multiple): Ditto.
22030 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22032 * config.gcc: Add --with-cpu support for nds32 target.
22033 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22034 * config/nds32/nds32.opt: Add -mcpu= option.
22036 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22038 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22039 isel=yes): Warn for these deprecated options.
22041 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22043 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22044 ISA_2_5_MASKS_EMBEDDED.
22046 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22048 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22049 p->max as pointers rather than using iterative_hash_expr.
22051 2018-02-23 Carl Love <cel@us.ibm.com>
22053 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22054 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22056 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22057 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22058 P8V_BUILTIN_VEC_VUNSIGNED2.
22060 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22063 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22064 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22066 * lra-constraints.c (curr_insn_transform): Set up
22067 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22069 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22070 * lra-eliminations.c (spill_pseudos): Ditto.
22071 (process_insn_for_elimination): Ditto.
22072 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22073 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22074 LRA_NON_CLOBBERED_ALT.
22076 2018-02-22 Martin Sebor <msebor@redhat.com>
22078 PR tree-optimization/84480
22079 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22080 to maybe_diag_stxncpy_trunc. Call it.
22081 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22082 from gimple_fold_builtin_strcpy. Print inlining stack.
22083 (handle_builtin_stxncpy): Print inlining stack.
22084 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22086 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22089 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22090 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22091 and -fcheck-pointer-bounds are used together.
22092 (indirect_thunk_prefix): New enum.
22093 (indirect_thunk_need_prefix): New function.
22094 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22095 "_nt" instead of "_bnd" for NOTRACK prefix.
22096 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22097 (output_indirect_thunk_function): Likewise.
22099 (ix86_code_end): Update output_indirect_thunk_function calls.
22100 (ix86_output_indirect_branch_via_reg): Replace
22101 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22102 (ix86_output_indirect_branch_via_push): Likewise.
22103 (ix86_output_function_return): Likewise.
22104 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22105 incompatible with -fcf-protection=branch and
22106 -fcheck-pointer-bounds.
22108 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22111 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22112 Change gcc_assert call to output_operand_lossage.
22114 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22116 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22118 2018-02-22 DJ Delorie <dj@redhat.com>
22119 Sebastian Perta <sebastian.perta@renesas.com>
22120 Oleg Endo <olegendo@gcc.gnu.org>
22122 * config/rx/rx.c (rx_rtx_costs): New function.
22123 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22125 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22127 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22129 2018-02-22 Martin Liska <mliska@suse.cz>
22132 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22133 Add "native" as a possible value.
22135 2018-02-22 Martin Liska <mliska@suse.cz>
22138 * config/i386/i386.c (ix86_option_override_internal):
22139 Add "native" as a possible value for -march and -mtune.
22141 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22144 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22145 to all type variants.
22147 PR tree-optimization/84503
22148 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22149 width as info->bitpos + info->bitsize - start.
22150 (merged_store_group::merge_overlapping): Simplify width computation.
22151 (check_no_overlap): New function.
22152 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22153 start + width and last_order of the group, fail if check_no_overlap
22155 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22156 to group if check_no_overlap fails.
22158 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22160 * config/rs6000/altivec.md: Delete contraint arguments to
22161 define_expand, define_split, and define_peephole2, and in
22162 define_insn_and_split if always unused.
22163 * config/rs6000/darwin.md: Ditto.
22164 * config/rs6000/dfp.md: Ditto.
22165 * config/rs6000/rs6000.md: Ditto.
22166 * config/rs6000/sync.md: Ditto.
22167 * config/rs6000/vector.md: Ditto.
22168 * config/rs6000/vsx.md: Ditto.
22170 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22172 * config/rs6000/altivec.md: Write output control strings as braced
22173 blocks instead of double-quoted strings.
22174 * config/rs6000/darwin.md: Ditto.
22175 * config/rs6000/rs6000.md: Ditto.
22176 * config/rs6000/vector.md: Ditto.
22177 * config/rs6000/vsx.md: Ditto.
22179 2018-02-21 Jason Merrill <jason@redhat.com>
22181 PR c++/84314 - ICE with templates and fastcall attribute.
22182 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22184 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22186 * ipa-cp.c (determine_versionability): Fix comment typos.
22188 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22191 * ipa-cp.c (determine_versionability): Do not version functions caling
22194 2018-02-21 Martin Liska <mliska@suse.cz>
22197 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22198 Add "native" as a possible value.
22199 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22200 the macro when native cpu detection is available.
22202 2018-02-21 Martin Liska <mliska@suse.cz>
22205 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22206 Add "native" as a possible value.
22207 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22208 when native cpu detection is available.
22210 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22211 Martin Sebor <msebor@redhat.com>
22213 PR tree-optimization/84478
22214 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22216 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22217 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22218 support which is conservatively correct, for 2 only stay conservative
22219 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22220 argument to the 2 argument get_range_strlen, adjust 6 arg
22221 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22223 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22224 (gimple_fold_builtin_strlen): Pass true as last argument to
22227 2018-02-20 Martin Sebor <msebor@redhat.com>
22229 PR middle-end/84095
22230 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22231 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22232 (builtin_memref::builtin_memref): Factor out parts into
22233 set_base_and_offset and call it.
22235 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22237 PR middle-end/84406
22238 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22239 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22240 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22241 search at the associated MODE_INT.
22243 2018-02-20 Jeff Law <law@redhat.com>
22245 PR middle-end/82123
22246 PR tree-optimization/81592
22247 PR middle-end/79257
22248 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22249 for range data rather than using global data.
22250 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22251 range data rather than using global data.
22252 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22253 pass it to children as needed.
22254 (struct directive::fmtresult): Similarly.
22255 (struct directive::set_width): Similarly.
22256 (struct directive::set_precision): Similarly.
22257 (format_integer, format_directive, parse_directive): Similarly.
22258 (format_none): Accept unnamed vr_values parameter.
22259 (format_percent, format_floating, format_character): Similarly.
22260 (format_string, format_plain): Similarly.
22261 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22262 the EVRP range analyzer for range data rather than using global data.
22263 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22264 gimple-ssa-evrp-analyze.h
22265 (class sprintf_dom_walker): Add after_dom_children member function.
22266 Add evrp_range_analyzer member.
22267 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22268 range analyzer as needed.
22269 (sprintf_dom_walker::after_dom_children): New member function.
22270 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22272 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22273 (evrp_range_analyzer::pop_to_marker): Likewise.
22275 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22277 PR tree-optimization/84419
22278 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22279 with the required type if its current type is compatible but
22282 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22284 PR middle-end/82004
22285 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22286 after vectorization.
22288 2018-02-20 Martin Liska <mliska@suse.cz>
22291 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22292 possible values if we don't have a hint.
22294 2018-02-20 Martin Liska <mliska@suse.cz>
22298 * final.c (shorten_branches): Build align_tab array with one
22300 * opts.c (finish_options): Add alignment option limit check.
22301 (MAX_CODE_ALIGN): Likewise.
22302 (MAX_CODE_ALIGN_VALUE): Likewise.
22303 * doc/invoke.texi: Document maximum allowed option value for
22304 all -falign-* options.
22306 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22309 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22310 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22311 * var-tracking.c (emit_note_insn_var_location): Remove all references
22312 to NOTE_INSN_CALL_ARG_LOCATION.
22313 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22314 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22315 Use copy_rtx_if_shared.
22316 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22317 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22318 (dwarf2out_var_location): Remove handling of
22319 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22321 * final.c (final_scan_insn): Remove all references to
22322 NOTE_INSN_CALL_ARG_LOCATION.
22323 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22324 before dumping final insns.
22325 * except.c (emit_note_eh_region_end): Remove all references to
22326 NOTE_INSN_CALL_ARG_LOCATION.
22327 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22328 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22329 * config/arc/arc.c (hwloop_optimize): Likewise.
22330 * config/arm/arm.c (create_fix_barrier): Likewise.
22331 * config/s390/s390.c (s390_chunkify_start): Likewise.
22332 * config/sh/sh.c (find_barrier): Likewise.
22333 * config/i386/i386.c (rest_of_insert_endbranch,
22334 ix86_seh_fixup_eh_fallthru): Likewise.
22335 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22336 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22337 * config/frv/frv.c (frv_function_prologue): Likewise.
22338 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22340 (note_outside_basic_block_p): Remove all references to
22341 NOTE_INSN_CALL_ARG_LOCATION.
22342 * gengtype.c (adjust_field_rtx_def): Likewise.
22343 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22345 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22346 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22349 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22352 PR tree-optimization/84452
22353 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22354 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22357 2018-02-19 Martin Liska <mliska@suse.cz>
22360 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22362 2018-02-19 Martin Liska <mliska@suse.cz>
22363 Richard Sandiford <richard.sandiford@linaro.org>
22365 PR tree-optimization/82491
22366 * gimple-fold.c (get_base_constructor): Make earlier bail out
22369 2018-02-19 Carl Love <cel@us.ibm.com>
22371 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22372 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22374 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22375 P8V_BUILTIN_VEC_NEG.
22377 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22379 * config/rl78/rl78.md (movdf): New define expand.
22381 2018-02-19 Martin Liska <mliska@suse.cz>
22384 * doc/invoke.texi: Fix typo.
22385 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22387 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22389 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22390 handle rs6000_single_float and rs6000_double_float specially for
22393 2018-02-16 Jeff Law <law@redhat.com>
22395 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22396 (pop_regs): Use it.
22398 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22401 * ipa-inline.c (inline_small_functions): Fix a typo.
22403 2018-02-16 Nathan Sidwell <nathan@acm.org>
22405 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22407 2018-02-16 Carl Love <cel@us.ibm.com>
22409 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22410 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22411 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22412 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22413 expansion to P8V_BUILTIN_VEC_FLOAT2.
22415 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22417 PR rtl-optimization/70023
22418 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22419 src_regno into account.
22421 2018-02-16 Carl Love <cel@us.ibm.com>
22423 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22424 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22425 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22426 * config/rs6000/rs6000.c: Remove case statements for
22427 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22428 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22429 and P9V_BUILTIN_VEC_VINSERT4B.
22430 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22431 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22432 * config/rs6000/vsx.md:
22433 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22436 2018-02-16 Carl Love <cel@us.ibm.com>
22438 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22440 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22442 * config/rs6000/rs6000-c.c: Add the definitions for
22443 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22444 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22445 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22446 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22447 definition for insert4b and define insn *insert3b_internal.
22448 * doc/extend.texi: Add documentation for vec_extract4b.
22450 2018-02-16 Nathan Sidwell <nathan@acm.org>
22452 * doc/extend.texi (Backwards Compatibility): Mention friend
22453 injection. Note for-scope is deprecated.
22454 * doc/invoke.texi (-ffriend-injection): Deprecate.
22456 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22458 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22459 that moved to I2, also allow destinations that are a paradoxical
22460 subreg (instead of a normal reg).
22462 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22465 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22468 2018-02-16 Richard Biener <rguenther@suse.de>
22470 PR tree-optimization/84037
22471 PR tree-optimization/84016
22473 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22474 Adjust vec_construct for the fact we need additional higher latency
22475 128bit inserts for AVX256 and AVX512 vector builds.
22476 (ix86_add_stmt_cost): Scale vector construction cost for
22479 2018-02-16 Richard Biener <rguenther@suse.de>
22481 PR tree-optimization/84417
22482 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22483 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22484 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22486 2018-02-16 Martin Liska <mliska@suse.cz>
22489 * internal-fn.def (ASAN_CHECK): Set proper flags.
22490 (ASAN_MARK): Likewise.
22492 2018-02-16 Julia Koval <julia.koval@intel.com>
22494 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22495 from PTA_CANNONLAKE.
22497 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22500 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22501 Use ++iter rather than iter++ for std::list iterators.
22502 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22503 defer deleting them until all nodes in the forest are processed. Do
22504 free even leaf nodes. Change to_process into auto_vec.
22507 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22508 * vec.h (vec_default_construct): Use memset instead of placement new
22509 if BROKEN_VALUE_INITIALIZATION is defined.
22510 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22511 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22514 PR rtl-optimization/83723
22515 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22516 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22517 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22519 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22521 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22523 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22525 PR rtl-optimization/81443
22526 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22527 from inner REGs to paradoxical SUBREGs.
22529 2018-02-16 Richard Biener <rguenther@suse.de>
22531 PR tree-optimization/84399
22532 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22533 For operands we can analyze at their definition make sure we can
22534 analyze them at each use as well.
22536 2018-02-16 Richard Biener <rguenther@suse.de>
22538 PR tree-optimization/84190
22539 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22540 volatile accesses if the decl isn't volatile.
22542 2018-02-15 Jason Merrill <jason@redhat.com>
22544 PR c++/84314 - ICE with templates and fastcall attribute.
22545 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22546 TYPE_CANONICAL on an existing type.
22548 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22550 PR tree-optimization/84383
22551 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22552 dstoff nor call operand_equal_p if dstbase is NULL.
22554 PR tree-optimization/84334
22555 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22556 also a CONSTANT_CLASS_P, punt.
22558 2018-02-14 Jim Wilson <jimw@sifive.com>
22560 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22561 first SMALL_OPERAND check. New local min_second_step. Move assert
22562 to where locals are set. Add TARGET_RVC support.
22563 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22565 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22567 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22569 2018-02-14 Martin Sebor <msebor@redhat.com>
22571 PR tree-optimization/83698
22572 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22573 arrays constrain the offset range to their bounds.
22574 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22575 (builtin_access::overlap): Avoid setting the size of overlap if it's
22577 (maybe_diag_overlap): Also consider arrays when deciding what values
22578 of offsets to include in diagnostics.
22580 2018-02-14 Martin Sebor <msebor@redhat.com>
22583 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22584 that correspond to the kind of a declaration.
22586 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22589 * config/pa/pa.md: Load address of PIC label using the linkage table
22590 if the label is nonlocal.
22592 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22594 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22595 warning message if user requests -maltivec=be.
22596 * doc/invoke.texi: Document deprecation of -maltivec=be.
22598 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22601 * config/rs6000/rs6000-c.c: Update definitions for
22602 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22603 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22605 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22608 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22609 add _get_ssp intrinsics. Remove argument from
22610 __builtin_ia32_rdssp[d|q].
22611 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22612 * config/i386/i386-builtin.def: Remove argument from
22613 __builtin_ia32_rdssp[d|q].
22614 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22615 ix86_expand_special_args_builtin for _rdssp[d|q].
22616 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22617 Clear register before usage.
22618 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22619 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22621 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22623 PR tree-optimization/84357
22624 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22625 operand 1 of an ARRAY_REF too.
22627 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22630 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22631 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22633 (set_of_reg): New struct.
22634 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22635 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22636 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22638 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22639 Split into bitclr, bitset, bitinvert patterns if appropriate.
22640 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22641 use rx_fuse_in_memory_bitop.
22642 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22643 to named insn, correct maximum insn length.
22645 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22648 * machmode.def: Define a complex mode for PARTIAL_INT.
22649 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22651 * doc/rtl.texi: Document CSPImode.
22652 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22654 (msp430_hard_regno_nregs_with_padding): Likewise.
22656 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22659 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22661 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22663 PR rtl-optimization/84169
22664 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22665 we generated a parallel as new i3 and we split that to new i2 and i3
22666 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22667 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22668 those to i2, not i1. Partially rewrite this scan code.
22670 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22673 * stor-layout.c (place_field): For variable length fields, adjust
22674 offset_align afterwards not just based on the field's alignment,
22675 but also on the size.
22677 PR middle-end/84309
22678 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22679 of exps and logs in the use_exp2 case.
22681 2018-02-13 Jeff Law <law@redhat.com>
22683 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22684 entry for "vector".
22686 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22689 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22693 * common.opt (gas-loc-support, gas-locview-support): New.
22694 (ginline-points, ginternal-reset-location-views): New.
22695 * doc/invoke.texi: Document them. Use @itemx where intended.
22696 (gvariable-location-views): Adjust.
22697 * target.def (reset_location_view): New.
22698 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22699 (TARGET_RESET_LOCATION_VIEW): New.
22700 * doc/tm.texi: Rebuilt.
22701 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22702 (dwarf2out_default_as_locview_support): New.
22703 (output_asm_line_debug_info): Use option variables.
22704 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22705 (output_loc_list): Likewise.
22706 (add_high_low_attributes): Check option variables.
22707 Don't output entry view attribute in strict mode.
22708 (gen_inlined_subroutine_die): Check option variables.
22709 (dwarf2out_inline_entry): Likewise.
22710 (init_sections_and_labels): Likewise.
22711 (dwarf2out_early_finish): Likewise.
22712 (maybe_reset_location_view): New, from...
22713 (dwarf2out_var_location): ... here. Call it.
22714 * debug.h (dwarf2out_default_as_loc_support): Declare.
22715 (dwarf2out_default_as_locview_support): Declare.
22716 * hooks.c (hook_int_rtx_insn_0): New.
22717 * hooks.h (hook_int_rtx_insn_0): Declare.
22718 * toplev.c (process_options): Take -gas-loc-support and
22719 -gas-locview-support from dwarf2out. Enable
22720 -gvariable-location-views by default only with locview
22721 assembler support. Enable -ginternal-reset-location-views by
22722 default only if the target defines the corresponding hook.
22723 Enable -ginline-points by default if location views are
22724 enabled; force it disabled if statement frontiers are
22726 * tree-inline.c (expand_call_inline): Check option variables.
22727 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22729 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
22731 PR tree-optimization/84321
22732 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22733 handling. Also check whether the anti-range contains any values
22734 that satisfy the mask; switch to a VR_RANGE if not.
22736 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
22739 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22741 2018-02-13 Martin Jambor <mjambor@suse.cz>
22744 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22745 of call statements, also set location of a load to a temporary.
22747 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
22749 * config/rl78/rl78.c (add_vector_labels): New function.
22750 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22751 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22752 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22753 which checks that no arguments are passed.
22754 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22755 * doc/extend.texi: Documentation for the new attribute.
22757 2018-02-13 Andreas Schwab <schwab@suse.de>
22759 * config/riscv/linux.h (CPP_SPEC): Define.
22761 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22764 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22765 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22766 OPTION_MASK_ISA_AES as first argument to def_builtin_const
22767 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22768 instead of OPTION_MASK_ISA_PCLMUL as first argument to
22769 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22770 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22771 temporarily for AES and PCLMUL builtins.
22773 PR tree-optimization/84339
22774 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22775 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22778 PR middle-end/84309
22779 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22780 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22781 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22783 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22785 * omp-simd-clone.h: New file.
22786 * omp-simd-clone.c: Include omp-simd-clone.h.
22787 (expand_simd_clones): No longer static.
22788 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22789 cgraph.h and omp-simd-clone.h.
22790 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22791 (vect_recog_widen_shift_pattern): Formatting fix.
22792 (vect_pattern_recog_1): Don't check optab for calls.
22795 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22796 operands[2] into a REG before using gen_lowpart on it.
22798 2018-02-12 Jeff Law <law@redhat.com>
22801 * config/sh/sh.c (find_barrier): Consider a sibling call
22804 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22805 successfully back substituting a reg.
22807 2018-02-12 Richard Biener <rguenther@suse.de>
22809 PR tree-optimization/84037
22810 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22811 parameter, move visited init to caller.
22812 (vect_slp_analyze_operations): Separate cost from validity
22813 check, initialize visited once for all instances.
22814 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22816 * tree-vect-stmts.c (vect_model_simple_cost): Make early
22818 (vect_model_promotion_demotion_cost): Likewise.
22819 (vectorizable_bswap): Guard cost modeling with !slp_node
22820 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22822 (vectorizable_call): Likewise.
22823 (vectorizable_conversion): Likewise.
22824 (vectorizable_assignment): Likewise.
22825 (vectorizable_shift): Likewise.
22826 (vectorizable_operation): Likewise.
22827 (vectorizable_store): Likewise.
22828 (vectorizable_load): Likewise.
22829 (vectorizable_condition): Likewise.
22830 (vectorizable_comparison): Likewise.
22832 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
22835 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22836 (ASAN_MARK): Fix fnspec to account for return value, change pointer
22837 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22839 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
22841 PR middle-end/83665
22842 * params.def (inline-min-speedup): Increase from 8 to 15.
22843 (max-inline-insns-auto): Decrease from 40 to 30.
22844 * ipa-split.c (consider_split): Add some buffer for function to
22845 be considered inlining candidate.
22846 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22849 2018-02-12 Richard Biener <rguenther@suse.de>
22851 PR tree-optimization/84037
22852 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22853 matched stmts if we cannot swap the non-matched ones.
22855 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22857 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22858 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22859 _mm_maskz_scalef_round_ss): New intrinsics.
22860 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22861 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22862 __builtin_ia32_scalefss_round): Remove.
22863 (__builtin_ia32_scalefsd_mask_round,
22864 __builtin_ia32_scalefss_mask_round): New intrinsics.
22865 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22866 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22867 ((match_operand:VF_128 2 "<round_nimm_predicate>"
22868 "<round_constraint>")): Changed to ...
22869 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22870 "<round_scalar_constraint>")): ... this.
22871 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22872 %0, %1, %2<round_op3>}"): Changed to ...
22873 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22874 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22875 %2<round_scalar_mask_op3>}"): ... this.
22876 * config/i386/subst.md (round_scalar_nimm_predicate): New.
22878 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
22880 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22881 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22882 (_mm_maskz_sqrt_round_ss): New intrinsics.
22883 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22884 (__builtin_ia32_sqrtsd_mask_round)
22885 (__builtin_ia32_sqrtss_mask_round): New builtins.
22886 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22887 (__builtin_ia32_sqrtss_round): Remove.
22888 (__builtin_ia32_sqrtsd_mask_round)
22889 (__builtin_ia32_sqrtss_mask_round): New builtins.
22890 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22891 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22892 ((match_operand:VF_128 1 "vector_operand"
22893 "xBm,<round_constraint>")): Changed to ...
22894 ((match_operand:VF_128 1 "vector_operand"
22895 "xBm,<round_scalar_constraint>")): ... this.
22896 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22897 %0, %2, %<iptr>1<round_op3>}): Changed to ...
22898 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22899 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22900 %<iptr>1<round_scalar_mask_op3>}): ... this.
22901 ((set_attr "prefix" "<round_prefix>")): Changed to ...
22902 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22904 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
22907 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22908 Cast vec_cmpeq result to correct type.
22909 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22910 Cast vec_cmpgt result to correct type.
22912 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
22914 * final.c (final_scan_insn_1): Renamed from...
22915 (final_scan_insn): ... this. New wrapper, to recover
22916 seen from the outermost call in recursive ones.
22917 * config/sparc/sparc.c (output_return): Drop seen from call.
22918 (output_sibcall): Likewise.
22919 * config/visium/visium.c (output_branch): Likewise.
22921 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
22923 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22926 2018-02-10 Alan Modra <amodra@gmail.com>
22929 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22930 Specify LR as an input.
22932 2018-02-10 Jakub Jelinek <jakub@redhat.com>
22935 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22936 remove_member_access_dummy_vars): New functions.
22937 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22938 lower_omp_1, execute_lower_omp): Use them.
22940 PR rtl-optimization/84308
22941 * shrink-wrap.c (spread_components): Release todo vector.
22943 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
22945 PR rtl-optimization/57193
22946 * ira-color.c (struct allocno_color_data): Add member
22947 conflict_allocno_hard_prefs.
22948 (update_conflict_allocno_hard_prefs): New.
22949 (bucket_allocno_compare_func): Add a preference based on
22950 conflict_allocno_hard_prefs.
22951 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22952 (color_allocnos): Remove a dead code. Initiate
22953 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
22955 2018-02-09 Jakub Jelinek <jakub@redhat.com>
22958 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22959 constraint from =wa to wa. Avoid a subreg on the output operand,
22960 instead use a pseudo and subreg it in a move.
22961 (p9_xxbrd_<mode>): Changed to ...
22962 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22963 (p9_xxbrd_v2df): New expander.
22964 (p9_xxbrw_<mode>): Changed to ...
22965 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22966 (p9_xxbrw_v4sf): New expander.
22968 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22970 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22972 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
22975 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22976 multiply in 32-bit mode.
22977 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22978 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22981 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
22983 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22984 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22985 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22986 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22988 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
22991 * dwarf2out.c (is_trivial_indirect_ref): New function.
22992 (dwarf2out_late_global_decl): Do not generate a location
22993 attribute for variables that have a non-trivial DECL_VALUE_EXPR
22994 and that are not defined in the current unit.
22996 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
22998 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22999 instead of a libcall for UNORDERED.
23001 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23004 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23005 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23007 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23010 * config/s390/s390.c (s390_set_current_function): Invoke
23011 s390_indirect_branch_settings also if fndecl didn't change.
23013 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23015 * config/rs6000/rs6000.md (blockage): Set length to zero.
23017 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23019 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23021 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23024 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23025 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23029 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23030 PARALLEL incoming that failed vt_get_decl_and_offset check.
23032 PR middle-end/84237
23033 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23034 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23036 (get_variable_section): For decls in named .bss* sections pass true as
23037 second argument to bss_initializer_p.
23039 2018-02-09 Marek Polacek <polacek@redhat.com>
23040 Jakub Jelinek <jakub@redhat.com>
23043 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23044 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23045 Sync some changes from cxx_fold_indirect_ref.
23047 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23049 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23051 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23052 (BLOCK_INLINE_ENTRY_LABEL): New.
23053 (dwarf2out_var_location): Disregard inline entry markers.
23054 (inline_entry_data): New struct.
23055 (inline_entry_data_hasher): New hashtable type.
23056 (inline_entry_data_hasher::hash): New.
23057 (inline_entry_data_hasher::equal): New.
23058 (inline_entry_data_table): New variable.
23059 (add_high_low_attributes): Add DW_AT_entry_pc and
23060 DW_AT_GNU_entry_view attributes if a pending entry is found
23061 in inline_entry_data_table. Add old entry_pc attribute only
23062 if debug nonbinding markers are disabled.
23063 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23064 markers are enabled.
23065 (block_within_block_p, dwarf2out_inline_entry): New.
23066 (dwarf2out_finish): Check that no entries remained in
23067 inline_entry_data_table.
23068 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23069 (final_scan_insn, notice_source_line): Likewise.
23070 (rest_of_clean_state): Skip inline entry markers.
23071 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23073 * gimple.c (gimple_build_debug_inline_entry): New.
23074 * gimple.h (enum gimple_debug_subcode): Add
23075 GIMPLE_DEBUG_INLINE_ENTRY.
23076 (gimple_build_debug_inline_entry): Declare.
23077 (gimple_debug_inline_entry_p): New.
23078 (gimple_debug_nonbind_marker_p): Adjust.
23079 * insn-notes.def (INLINE_ENTRY): New.
23080 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23081 inline entry marker notes.
23082 (print_insn): Likewise.
23083 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23084 (INSN_DEBUG_MARKER_KIND): Likewise.
23085 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23086 * tree-inline.c (expand_call_inline): Build and insert
23087 debug_inline_entry stmt.
23088 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23089 inline entry blocks early, if nonbind markers are enabled.
23090 (dump_scope_block): Dump fragment info.
23091 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23092 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23093 (gimple_build_debug_inline_entry): New.
23094 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23095 Enable/disable inline entry points too.
23096 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23097 (DEBUG_INSN): Describe inline entry markers.
23099 * common.opt (gvariable-location-views): New.
23100 (gvariable-location-views=incompat5): New.
23101 * config.in: Rebuilt.
23102 * configure: Rebuilt.
23103 * configure.ac: Test assembler for view support.
23104 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23105 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23106 * dwarf2out.c (var_loc_view): New typedef.
23107 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23108 (dwarf2out_locviews_in_attribute): New.
23109 (dwarf2out_locviews_in_loclist): New.
23110 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23111 (enum dw_line_info_opcode): Add LI_adv_address.
23112 (struct dw_line_info_table): Add view.
23113 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23114 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23115 (zero_view_p): New variable.
23116 (ZERO_VIEW_P): New macro.
23117 (output_asm_line_debug_info): New.
23118 (struct var_loc_node): Add view.
23119 (add_AT_view_list, AT_loc_list): New.
23120 (add_var_loc_to_decl): Add view param. Test it against last.
23121 (new_loc_list): Add view params. Record them.
23122 (AT_loc_list_ptr): Handle loc and view lists.
23123 (view_list_to_loc_list_val_node): New.
23124 (print_dw_val): Handle dw_val_class_view_list.
23125 (size_of_die): Likewise.
23126 (value_format): Likewise.
23127 (loc_list_has_views): New.
23128 (gen_llsym): Set vl_symbol too.
23129 (maybe_gen_llsym, skip_loc_list_entry): New.
23130 (dwarf2out_maybe_output_loclist_view_pair): New.
23131 (output_loc_list): Output view list or entries too.
23132 (output_view_list_offset): New.
23133 (output_die): Handle dw_val_class_view_list.
23134 (output_dwarf_version): New.
23135 (output_compilation_unit_header): Use it.
23136 (output_skeleton_debug_sections): Likewise.
23137 (output_rnglists, output_line_info): Likewise.
23138 (output_pubnames, output_aranges): Update version comments.
23139 (output_one_line_info_table): Output view numbers in asm comments.
23140 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23141 Call maybe_gen_llsym.
23142 (loc_list_from_tree_1): Adjust.
23143 (add_AT_location_description): Create view list attribute if
23144 needed, check it's absent otherwise.
23145 (convert_cfa_to_fb_loc_list): Adjust.
23146 (maybe_emit_file): Call output_asm_line_debug_info for test.
23147 (dwarf2out_var_location): Reset views as needed. Precompute
23148 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23149 attribute. Set view.
23150 (new_line_info_table): Reset next view.
23151 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23152 (dwarf2out_source_line): Likewise. Output view resets and labels to
23153 the assembler, or select appropriate line info opcodes.
23154 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23155 (optimize_string_length): Catch it. Adjust.
23156 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23157 dw_val_class_view_list, and remove it if no longer needed.
23158 (hash_loc_list): Hash view numbers.
23159 (loc_list_hasher::equal): Compare them.
23160 (optimize_location_lists): Check whether a view list symbol is
23161 needed, and whether the locview attribute is present, and
23162 whether they match. Remove the locview attribute if no longer
23164 (index_location_lists): Call skip_loc_list_entry for test.
23165 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23166 Use output_dwarf_version.
23167 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23168 (struct dw_val_node): Add val_view_list.
23169 * final.c (SEEN_NEXT_VIEW): New.
23170 (set_next_view_needed): New.
23171 (clear_next_view_needed): New.
23172 (maybe_output_next_view): New.
23173 (final_start_function): Rename to...
23174 (final_start_function_1): ... this. Take pointer to FIRST,
23175 add SEEN parameter. Emit param bindings in the initial view.
23176 (final_start_function): Reintroduce SEEN-less interface.
23177 (final): Rename to...
23178 (final_1): ... this. Take SEEN parameter. Output final pending
23179 next view at the end.
23180 (final): Reintroduce seen-less interface.
23181 (final_scan_insn): Output pending next view before switching
23182 sections or ending a block. Mark the next view as needed when
23183 outputting variable locations. Notify debug backend of section
23184 changes, and of location view changes.
23185 (rest_of_handle_final): Adjust.
23186 * toplev.c (process_options): Autodetect value for debug variable
23187 location views option. Warn on incompat5 without -gdwarf-5.
23188 * doc/invoke.texi (gvariable-location-views): New.
23189 (gvariable-location-views=incompat5): New.
23190 (gno-variable-location-views): New.
23192 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23194 PR tree-optimization/84136
23195 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23196 that the result of find_edge is non-NULL.
23198 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23201 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23202 storing integer register in SImode. Fix cost of 256 and 512
23203 byte aligned SSE register store.
23205 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23207 * config/i386/i386.c (ix86_multiplication_cost): Fix
23208 multiplication cost for TARGET_AVX512DQ.
23210 2018-02-08 Marek Polacek <polacek@redhat.com>
23212 PR tree-optimization/84238
23213 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23216 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23218 PR tree-optimization/84265
23219 * tree-vect-stmts.c (vectorizable_store): Don't treat
23220 VMAT_CONTIGUOUS accesses as grouped.
23221 (vectorizable_load): Likewise.
23223 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23225 PR tree-optimization/81635
23226 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23227 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23228 (test_round_for_mask): New functions.
23229 (wide_int_cc_tests): Call test_round_for_mask.
23230 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23231 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23232 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23233 range returned by get_range_info.
23235 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23238 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23239 * symtab.c: Include builtins.h
23240 (symtab_node::output_to_lto_symbol_table_p): Move here
23241 from lto-streamer-out.c:output_symbol_p.
23242 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23243 (output_symbol_p): Move all logic to symtab.c
23244 (produce_symtab): Update.
23246 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23248 * config/s390/s390-opts.h (enum indirect_branch): Define.
23249 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23250 (s390_indirect_branch_via_thunk)
23251 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23252 (enum s390_indirect_branch_type): Define.
23253 * config/s390/s390.c (struct s390_frame_layout, struct
23254 machine_function): Remove.
23255 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23256 (indirect_branch_table_label_no, indirect_branch_table_name):
23258 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23259 (enum s390_indirect_branch_option): Define.
23260 (s390_return_addr_from_memory): New function.
23261 (s390_handle_string_attribute): New function.
23262 (s390_attribute_table): Add new attribute handler.
23263 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23264 (s390_indirect_branch_via_thunk): New function.
23265 (s390_indirect_branch_via_inline_thunk): New function.
23266 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23267 sibling call optimization for non z10 compiles.
23268 (s390_emit_call): Force indirect branch target to be a single
23269 register. Add r1 clobber for non-z10 compiles.
23270 (s390_emit_epilogue): Emit return jump via return_use expander.
23271 (s390_reorg): Handle JUMP_INSNs as execute targets.
23272 (s390_option_override_internal): Perform validity checks for the
23273 new command line options.
23274 (s390_indirect_branch_attrvalue): New function.
23275 (s390_indirect_branch_settings): New function.
23276 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23277 (s390_output_indirect_thunk_function): New function.
23278 (s390_code_end): Implement target hook.
23279 (s390_case_values_threshold): Implement target hook.
23280 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23282 * config/s390/s390.h (struct s390_frame_layout)
23283 (struct machine_function): Move here from s390.c.
23284 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23285 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23286 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23287 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23288 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23289 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23290 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23291 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23292 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23293 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23294 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23295 (mnemonic attribute): Add values which aren't recognized
23297 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23298 pattern for branch conversion. Fix mnemonic attribute.
23299 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23300 indirect branch via thunk if requested.
23301 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23302 ("*indirect_jump"): Disable for branch conversion using out of
23304 ("indirect_jump_via_thunk<mode>_z10")
23305 ("indirect_jump_via_thunk<mode>")
23306 ("indirect_jump_via_inlinethunk<mode>_z10")
23307 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23308 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23309 ("casesi_jump_via_inlinethunk<mode>_z10")
23310 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23311 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23312 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23313 ("*indirect2_jump"): Disable for branch conversion.
23314 ("casesi_jump"): Turn into expander and expand patterns for branch
23316 ("return_use"): New expander.
23317 ("*return"): Emit return via thunk and rename it to ...
23318 ("*return<mode>"): ... this one.
23319 * config/s390/s390.opt: Add new options and and enum for the
23322 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23324 * lra-constraints.c (match_reload): Unconditionally use
23325 gen_lowpart_SUBREG, rather than selecting between that
23326 and equivalent gen_rtx_SUBREG code.
23328 2018-02-08 Richard Biener <rguenther@suse.de>
23330 PR tree-optimization/84233
23331 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23332 changed flag instead of boguously re-using phi_inserted.
23334 2018-02-08 Martin Jambor <mjambor@suse.cz>
23336 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23337 static local variables.
23339 2018-02-08 Richard Biener <rguenther@suse.de>
23341 PR tree-optimization/84278
23342 * tree-vect-stmts.c (vectorizable_store): When looking for
23343 smaller vector types to perform grouped strided loads/stores
23344 make sure the mode is supported by the target.
23345 (vectorizable_load): Likewise.
23347 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23349 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23350 Increase LDP/STP opportunities by adding adjacent callee-saves.
23352 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23354 PR rtl-optimization/84068
23355 PR rtl-optimization/83459
23356 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23358 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23360 PR tree-optimization/84224
23361 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23362 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23363 non-zero arguments.
23365 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23368 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23369 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23370 count, remove one USE.
23372 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23374 * doc/install.texi (Configuration): Document the
23375 --with-long-double-format={ibm,ieee} PowerPC configuration
23379 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23380 Convert from define_expand to be define_insn_and_split. Rework
23381 float/double/_Float128 conversions to QI/HI/SImode to work with
23382 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23383 conversions to QI/HImode types did a store and then a load to
23384 truncate the value. For conversions to VSX registers, don't split
23385 the insn, instead emit the code directly. Use the code iterator
23386 any_fix to combine signed and unsigned conversions.
23387 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23388 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23389 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23390 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23391 (fix_<mode>di2_hw): Likewise.
23392 (fixuns_<mode>di2_hw): Likewise.
23393 (fix_<mode>si2_hw): Likewise.
23394 (fixuns_<mode>si2_hw): Likewise.
23395 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23396 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23397 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23398 fix<uns>_trunc<SFDF:mode>si2_p8.
23399 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23400 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23401 (fix<uns>_<mode>_mem): Likewise.
23402 (fctiw<u>z_<mode>_mem): Likewise.
23403 (fix<uns>_<mode>_mem): Likewise.
23404 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23405 the register allocator from doing a direct move to the GPRs to do
23406 a store, and instead use the ISA 3.0 store byte/half-word from
23407 vector register instruction. For IEEE 128-bit floating point,
23408 also optimize stores of 32-bit ints.
23409 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23411 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23413 * genextract.c (push_pathstr_operand): New function to support
23415 (walk_rtx): Call push_pathstr_operand.
23416 (print_path): Support [a-zA-Z].
23418 2018-02-07 Richard Biener <rguenther@suse.de>
23420 PR tree-optimization/84037
23421 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23422 (cse_and_gimplify_to_preheader): Declare.
23423 (vect_get_place_in_interleaving_chain): Likewise.
23424 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23426 (_loop_vec_info::~_loop_vec_info): Delete it.
23427 (cse_and_gimplify_to_preheader): New function.
23428 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23429 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23430 (vectorizable_load): Likewise. For grouped stores always base
23431 the IV on the first element.
23432 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23433 condition before gimplifying.
23435 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23437 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23438 *DIV_EXPR and *MOD_EXPR.
23440 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23443 * config/i386/i386.c (ix86_option_override_internal): Mask out
23444 the CF_SET bit when checking -fcf-protection.
23446 2018-02-07 Tom de Vries <tom@codesourcery.com>
23449 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23452 2018-02-07 Richard Biener <rguenther@suse.de>
23454 PR tree-optimization/84204
23455 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23458 PR tree-optimization/84205
23459 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23460 special-case isl_ast_op_zdiv_r.
23462 PR tree-optimization/84223
23463 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23464 Only add conditions from within the region.
23465 (gather_bbs::after_dom_children): Adjust.
23467 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23470 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23471 * config/avr/avr.md: Only post-reload split REG-REG moves if
23472 either register is GENERAL_REG_P.
23474 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23476 PR tree-optimization/84235
23477 * tree-ssa-scopedtables.c
23478 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23479 if the subtraction is performed in floating point type where NaNs are
23480 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23481 build 1. Formatting fix.
23483 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23486 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23487 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23488 and skip it regardless of bb boundaries. Use CALL_P macro,
23489 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23490 unnecessarily, formatting fix.
23492 2018-02-06 Michael Collison <michael.collison@arm.com>
23494 * config/arm/thumb2.md:
23495 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23496 (*thumb_mov_notscc): Ditto.
23498 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23501 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23502 unsigned_fix, not "s".
23504 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23506 * configure.ac (gcc_fn_eh_frame_ro): New function.
23507 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23508 correct .eh_frame permissions.
23509 * configure: Regenerate.
23511 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23513 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23514 irrelevant options.
23516 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23518 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23519 Display warning message for -mno-speculate-indirect-jumps.
23521 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23523 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23525 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23527 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23529 PR tree-optimization/84225
23530 * tree-eh.c (find_trapping_overflow): Only call
23531 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23533 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23536 * config/i386/i386.c: Reimplement the check of possible options
23537 -mibt/-mshstk conbination. Change error messages.
23538 * doc/invoke.texi: Fix a typo: remove extra '='.
23540 2018-02-06 Marek Polacek <polacek@redhat.com>
23542 PR tree-optimization/84228
23543 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23545 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23548 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23549 emitted arch directives.
23550 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23551 __ARM_FEATURE_COPROC before changing architectures.
23553 2018-02-06 Richard Biener <rguenther@suse.de>
23555 * config/i386/i386.c (print_reg): Fix typo.
23556 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23558 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23560 * configure: Regenerate.
23562 2018-02-05 Martin Sebor <msebor@redhat.com>
23564 PR tree-optimization/83369
23565 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23568 2018-02-05 Martin Liska <mliska@suse.cz>
23570 * doc/invoke.texi: Cherry-pick upstream r323995.
23572 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23574 * ira.c (ira_init_register_move_cost): Adjust comment.
23576 2018-02-05 Martin Liska <mliska@suse.cz>
23578 PR gcov-profile/84137
23579 * doc/gcov.texi: Fix typo in documentation.
23581 2018-02-05 Martin Liska <mliska@suse.cz>
23583 PR gcov-profile/83879
23584 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23585 using dlopen functionality.
23587 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23589 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23590 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23591 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23592 _mm_maskz_range_round_ss): New intrinsics.
23593 (__builtin_ia32_rangesd128_round)
23594 (__builtin_ia32_rangess128_round): Remove.
23595 (__builtin_ia32_rangesd128_mask_round,
23596 __builtin_ia32_rangess128_mask_round): New builtins.
23597 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23598 __builtin_ia32_rangess128_round): Remove.
23599 (__builtin_ia32_rangesd128_mask_round,
23600 __builtin_ia32_rangess128_mask_round): New builtins.
23601 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23602 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23603 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23604 "<round_saeonly_constraint>")): Changed to ...
23605 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23606 "<round_saeonly_scalar_constraint>")): ... this.
23607 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23608 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23609 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23610 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23611 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23613 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23615 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23617 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23618 Remove all values except native, 8540 and 8548.
23620 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23622 * config/i386/i386.c (ix86_output_function_return): Pass
23623 INVALID_REGNUM, instead of -1, as invalid register number to
23624 indirect_thunk_name and output_indirect_thunk.
23626 2018-02-02 Julia Koval <julia.koval@intel.com>
23628 * config.gcc: Add -march=icelake.
23629 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23630 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23631 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23632 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23633 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23634 (processor_target_table): Add icelake.
23635 (ix86_option_override_internal): Handle new PTAs.
23636 (get_builtin_code_for_version): Handle icelake.
23637 (M_INTEL_COREI7_ICELAKE): New.
23638 (fold_builtin_cpu): Handle icelake.
23639 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23640 * doc/invoke.texi: Add -march=icelake.
23642 2018-02-02 Julia Koval <julia.koval@intel.com>
23644 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23645 to wide_int_bitmask.
23646 * wide-int-bitmask.h: New.
23648 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23651 * config/i386/i386.md: Replace Pmode with word_mode in
23652 builtin_setjmp_setup and builtin_longjmp to support x32.
23654 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23658 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23660 (rs6000_supported_cpu_names): New static variable.
23661 (linux_cpu_translation_table): Likewise.
23662 (elf_platform) <cpu>: Define new static variable and use it.
23663 Translate kernel AT_PLATFORM name to canonical name if needed.
23664 Error if platform name is unknown.
23666 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23669 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23671 2018-02-01 Jeff Law <law@redhat.com>
23674 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23675 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23676 the scratch if RELEASE_VIA_POP is false.
23677 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23678 If we have to save a temporary register, decrement SIZE appropriately.
23679 Pass new arguments to release_scratch_register_on_entry.
23680 (ix86_adjust_stack_and_probe): Likewise.
23681 (ix86_emit_probe_stack_range): Pass new arguments to
23682 release_scratch_register_on_entry.
23684 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23686 PR rtl-optimization/84157
23687 * combine.c (change_zero_ext): Use REG_P predicate in
23688 front of HARD_REGISTER_P predicate.
23690 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23692 * config/avr/avr.c (avr_option_override): Move disabling of
23693 -fdelete-null-pointer-checks to...
23694 * common/config/avr/avr-common.c (avr_option_optimization_table):
23697 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23699 PR tree-optimization/81635
23700 * tree-data-ref.c (split_constant_offset_1): For types that
23701 wrap on overflow, try to use range info to prove that wrapping
23704 2018-02-01 Renlin Li <renlin.li@arm.com>
23707 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23708 TAILCALL_ADDR_REGS.
23709 (aarch64_register_move_cost): Likewise.
23710 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23711 TAILCALL_ADDR_REGS.
23712 (REG_CLASS_NAMES): Likewise.
23713 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23714 TAILCALL_ADDR_REGS. Remove IP registers.
23715 * config/aarch64/aarch64.md (Ucs): Update register constraint.
23717 2018-02-01 Richard Biener <rguenther@suse.de>
23719 * domwalk.h (dom_walker::dom_walker): Add additional constructor
23720 for specifying RPO order and allow NULL for that.
23721 * domwalk.c (dom_walker::dom_walker): Likewise.
23722 (dom_walker::walk): Handle NULL RPO order.
23723 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23725 (rewrite_update_dom_walker): Likewise.
23726 (mark_def_dom_walker): Likewise.
23728 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23730 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23731 (aarch64_maybe_expand_sve_subreg_move): Declare.
23732 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23733 * config/aarch64/predicates.md (aarch64_any_register_operand): New
23735 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23736 that are semantically a reverse operation.
23737 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23738 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23739 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23741 (aarch64_can_change_mode_class): For big-endian, forbid changes
23742 between two SVE modes if they have different element sizes.
23744 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23746 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23747 the TImode handling for big-endian targets.
23749 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23751 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23752 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
23754 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23755 Remove BSWAP handing for big-endian targets and use the form of
23756 LD1RQ appropariate for the mode.
23758 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23760 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23761 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23762 duplicated element.
23764 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23767 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23768 check for operands that need to go through aarch64_sve_reload_be.
23770 2018-02-01 Jakub Jelinek <jakub@redhat.com>
23772 PR tree-optimization/81661
23773 PR tree-optimization/84117
23774 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23775 * tree-eh.c: Include gimplify.h.
23776 (find_trapping_overflow, replace_trapping_overflow,
23777 rewrite_to_non_trapping_overflow): New functions.
23778 * tree-vect-loop.c: Include tree-eh.h.
23779 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23780 * tree-data-ref.c: Include tree-eh.h.
23781 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23783 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
23785 PR rtl-optimization/84123
23786 * combine.c (change_zero_ext): Check if hard register satisfies
23787 can_change_dest_mode before calling gen_lowpart_SUBREG.
23789 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
23792 * ira.c (ira_init_register_move_cost): Remove assert.
23794 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23796 PR rtl-optimization/84071
23797 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23798 * doc/tm.texi: Regenerate.
23800 2018-01-31 Richard Biener <rguenther@suse.de>
23802 PR tree-optimization/84132
23803 * tree-data-ref.c (analyze_miv_subscript): Properly
23804 check whether evolution_function_is_affine_multivariate_p
23805 before calling gcd_of_steps_may_divide_p.
23807 2018-01-31 Julia Koval <julia.koval@intel.com>
23810 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23811 * config/i386/i386.md (rdpid_rex64) New.
23812 (rdpid): Make 32bit only.
23814 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
23817 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23818 an IDENTIFIER_NODE for FUNCTION_TYPE's.
23820 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23823 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
23825 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23827 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
23829 PR rtl-optimization/84071
23830 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23831 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23833 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23835 * config/arc/arc.c (arc_handle_aux_attribute): New function.
23836 (arc_attribute_table): Add 'aux' attribute.
23837 (arc_in_small_data_p): Consider aux like variables.
23838 (arc_is_aux_reg_p): New function.
23839 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23840 (arc_get_aux_arg): New function.
23841 (prepare_move_operands): Handle aux-register access.
23842 (arc_handle_aux_attribute): New function.
23843 * doc/extend.texi (ARC Variable attributes): Add subsection.
23845 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
23847 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23848 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23849 (arc_attribute_table): Add 'uncached' attribute.
23850 (arc_print_operand): Print '.di' flag for uncached memory
23852 (arc_in_small_data_p): Do not consider for small data the uncached
23854 (arc_is_uncached_mem_p): New function.
23855 * config/arc/predicates.md (compact_store_memory_operand): Check
23856 for uncached memory accesses.
23857 (nonvol_nonimm_operand): Likewise.
23858 * doc/extend.texi (ARC Type Attribute): New subsection.
23860 2018-01-31 Jakub Jelinek <jakub@redhat.com>
23863 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23864 falign-loops=): Add Optimization flag.
23866 2018-01-30 Jeff Law <law@redhat.com>
23869 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23870 INT_REGISTERS_SAVED. Check it prior to calling
23871 get_scratch_register_on_entry.
23872 (ix86_adjust_stack_and_probe): Similarly.
23873 (ix86_emit_probe_stack_range): Similarly.
23874 (ix86_expand_prologue): Corresponding changes.
23876 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23879 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23880 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23882 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
23885 * lra-constraints.c (curr_insn_transform): Process AND in the
23888 2018-01-30 Jakub Jelinek <jakub@redhat.com>
23890 PR rtl-optimization/83986
23891 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23892 dependence against last_pending_memory_flush in addition to
23893 pending_jump_insns.
23895 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
23897 PR tree-optimization/81611
23898 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23901 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23904 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23907 2018-01-30 Richard Biener <rguenther@suse.de>
23908 Jakub Jelinek <jakub@redhat.com>
23910 PR tree-optimization/84111
23911 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23912 inner loops added during recursion, as they don't have up-to-date
23915 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23918 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23919 (can_inline_edge_by_limits_p): ... here.
23920 (can_early_inline_edge_p, check_callers,
23921 update_caller_keys, update_callee_keys, recursive_inlining,
23922 add_new_edges_to_heap, speculation_useful_p,
23923 inline_small_functions,
23924 inline_small_functions, flatten_function,
23925 inline_to_all_callers_1): Update.
23927 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
23929 * profile-count.c (profile_count::combine_with_ipa_count): Handle
23932 2018-01-30 Richard Biener <rguenther@suse.de>
23934 PR tree-optimization/83008
23935 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23936 invariant and constant vector uses in stmts when they need
23937 more than one stmt.
23939 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23942 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23943 * configure: Regenerate.
23945 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23947 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23949 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23950 Use gen_rtx_REG rather than gen_lowpart.
23952 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23954 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23955 rather than 0 when creating partial subregs.
23957 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
23959 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23962 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
23965 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23966 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23967 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23968 flags. This restores the settings used before the 2017-07-24.
23969 Turning off pre increment/decrement/modify allows IVOPTS to
23970 optimize DF/SF loops where the index is an int.
23972 2018-01-29 Richard Biener <rguenther@suse.de>
23973 Kelvin Nilsen <kelvin@gcc.gnu.org>
23976 * tree-vect-stmts.c (vectorizable_call): Don't call
23977 targetm.vectorize_builtin_md_vectorized_function if callee is
23980 2018-01-22 Carl Love <cel@us.ibm.com>
23982 * doc/extend.tex: Fix typo in second arg in
23983 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23985 2018-01-29 Richard Biener <rguenther@suse.de>
23987 PR tree-optimization/84086
23988 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23989 (flush_ssaname_freelist): When SSA names were released reset
23990 the SCEV hash table.
23992 2018-01-29 Richard Biener <rguenther@suse.de>
23994 PR tree-optimization/84057
23995 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23996 removed paths when removing edges.
23998 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24000 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24001 -mfunction-return=@var{choice}.
24003 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24005 PR diagnostic/84034
24006 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24007 Handle CR like TAB.
24008 (layout::print_source_line): Likewise.
24009 (test_get_line_width_without_trailing_whitespace): Add test cases.
24011 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24013 PR middle-end/84040
24014 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24017 2018-01-26 Jim Wilson <jimw@sifive.com>
24019 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24021 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24024 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24026 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24027 and CMP + SUB-immediate -> SUBS.
24029 2018-01-26 Martin Sebor <msebor@redhat.com>
24031 PR tree-optimization/83896
24032 * tree-ssa-strlen.c (get_string_len): Rename...
24033 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24034 Avoid assuming length is constant.
24035 (handle_char_store): Use HOST_WIDE_INT for string length.
24037 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24040 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24041 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24043 2018-01-26 Richard Biener <rguenther@suse.de>
24045 PR rtl-optimization/84003
24046 * dse.c (record_store): Only record redundant stores when
24047 the earlier store aliases at least all accesses the later one does.
24049 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24051 PR rtl-optimization/83985
24052 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24053 REG_CFA_RESTORE insns.
24054 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24055 REG_CFA_RESTORE insns here.
24058 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24059 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24061 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24063 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24064 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24065 (arc_init): Likewise.
24066 (arc_override_options): Likewise.
24067 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24069 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24071 * config/arc/arc.h (TARGET_DBNZ): Define.
24072 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24073 properly set the tune attribute.
24074 (dbnz): Use TARGET_DBNZ guard.
24075 * config/arc/arc.opt (mtune): Add core3 option.
24077 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24079 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24080 recognize new pic like addresses.
24081 (arc_delegitimize_address): Clean up.
24083 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24085 * config/arc/arc-arches.def: Option mrf16 valid for all
24087 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24088 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24089 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24090 * config/arc/arc-tables.opt: Regenerate.
24091 * config/arc/arc.c (arc_conditional_register_usage): Handle
24092 reduced register file case.
24093 (arc_file_start): Set must have build attributes.
24094 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24095 mrf16 option value.
24096 * config/arc/arc.opt (mrf16): Add new option.
24097 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24098 * config/arc/genmultilib.awk: Handle new mrf16 option.
24099 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24100 * config/arc/t-multilib: Regenerate.
24101 * doc/invoke.texi (ARC Options): Document mrf16 option.
24103 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24105 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24106 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24107 (arc_attribute_table): Add 'secure_call' attribute.
24108 (arc_print_operand): Print secure call operand.
24109 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24111 (arc_is_secure_call_p): New function. * config/arc/arc.md
24112 (call_i): Add support for sjli instruction.
24113 (call_value_i): Likewise.
24114 * config/arc/constraints.md (Csc): New constraint.
24116 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24117 John Eric Martin <John.Martin@emmicro-us.com>
24119 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24120 * config/arc/arc.c (_arc_jli_section): New struct.
24121 (arc_jli_section): New type.
24122 (rc_jli_sections): New static variable.
24123 (arc_handle_jli_attribute): New function.
24124 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24125 (arc_file_end): New function.
24126 (TARGET_ASM_FILE_END): Define.
24127 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24128 (arc_add_jli_section): New function.
24129 (jli_call_scan): Likewise.
24130 (arc_reorg): Call jli_call_scan.
24131 (arc_output_addsi): Remove 'S' from printing asm operand.
24132 (arc_is_jli_call_p): New function.
24133 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24135 (movhi_insn): Likewise.
24136 (movsi_insn): Likewise.
24137 (movsi_set_cc_insn): Likewise.
24138 (loadqi_update): Likewise.
24139 (load_zeroextendqisi_update): Likewise.
24140 (load_signextendqisi_update): Likewise.
24141 (loadhi_update): Likewise.
24142 (load_zeroextendhisi_update): Likewise.
24143 (load_signextendhisi_update): Likewise.
24144 (loadsi_update): Likewise.
24145 (loadsf_update): Likewise.
24146 (movsicc_insn): Likewise.
24147 (bset_insn): Likewise.
24148 (bxor_insn): Likewise.
24149 (bclr_insn): Likewise.
24150 (bmsk_insn): Likewise.
24151 (bicsi3_insn): Likewise.
24152 (cmpsi_cc_c_insn): Likewise.
24153 (movsi_ne): Likewise.
24154 (movsi_cond_exec): Likewise.
24155 (clrsbsi2): Likewise.
24156 (norm_f): Likewise.
24166 (call_i): Remove 'S' asm letter, add jli instruction.
24167 (call_value_i): Likewise.
24168 * config/arc/arc.op (mjli-always): New option.
24169 * config/arc/constraints.md (Cji): New constraint.
24170 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24172 (subsf3_fpx): Likewise.
24173 (mulsf3_fpx): Likewise.
24174 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24176 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24177 function attrbutes.
24178 * doc/invoke.texi (ARC): Document mjli-always option.
24180 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24182 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24183 avoid addition with 0 and use incw and decw where possible.
24185 2018-01-26 Richard Biener <rguenther@suse.de>
24187 PR tree-optimization/81082
24188 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24189 association if it requires casting to unsigned.
24190 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24191 from fold_plusminus_mult_expr to catch important cases late when
24192 range info is available.
24194 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24196 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24197 * configure.ac (hidden_linkonce): New test.
24198 * configure: Regenerate.
24199 * config.in: Regenerate.
24201 2018-01-26 Julia Koval <julia.koval@intel.com>
24203 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24204 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24205 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24206 _mm_mask_bitshuffle_epi64_mask): Fix type.
24207 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24208 USI_FTYPE_V4DI_V4DI_USI): Remove.
24209 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24210 __builtin_ia32_vpshufbitqmb256_mask,
24211 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24212 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24213 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24215 2018-01-26 Alan Modra <amodra@gmail.com>
24218 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24219 UNSPEC_VBPERMQ. Sort other unspecs.
24221 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24223 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24225 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24227 PR middle-end/83055
24228 * predict.c (drop_profile): Do not push/pop cfun; update also
24230 (handle_missing_profiles): Fix logic looking for zero profiles.
24232 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24234 PR middle-end/83977
24235 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24236 on functions with #pragma omp declare simd or functions with simd
24238 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24239 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24240 Remove trailing \n from warning_at calls.
24242 2018-01-25 Tom de Vries <tom@codesourcery.com>
24245 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24246 for neutered workers.
24248 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24251 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24252 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24254 2018-01-24 Jeff Law <law@redhat.com>
24257 * i386.c (get_probe_interval): Move to earlier point.
24258 (ix86_compute_frame_layout): If -fstack-clash-protection and
24259 the frame is larger than the probe interval, then use pushes
24260 to save registers rather than reg->mem moves.
24261 (ix86_expand_prologue): Remove conditional for int_registers_saved
24264 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24267 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24268 min/max for never referenced object.
24270 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24272 PR middle-end/83977
24273 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24275 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24276 attributes from DECL_ATTRIBUTES (decl) without affecting
24277 DECL_ATTRIBUTES (current_function_decl).
24278 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24279 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24281 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24283 PR tree-optimization/83979
24284 * fold-const.c (fold_comparison): Use constant_boolean_node
24285 instead of boolean_{true,false}_node.
24287 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24289 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24292 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24294 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24295 Simplify the clause that sets the length attribute.
24296 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24297 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24298 clause that sets the length attribute.
24299 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24301 2018-01-24 Tom de Vries <tom@codesourcery.com>
24304 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24305 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24306 Add strict parameter.
24307 (prevent_branch_around_nothing): Insert dummy insn between branch to
24308 label and label with no ptx insn inbetween.
24309 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24311 2018-01-24 Tom de Vries <tom@codesourcery.com>
24314 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24315 for neutered threads in warp.
24316 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24318 2018-01-24 Richard Biener <rguenther@suse.de>
24320 PR tree-optimization/83176
24321 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24324 2018-01-24 Richard Biener <rguenther@suse.de>
24326 PR tree-optimization/82819
24327 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24328 code generating pluses that are no-ops in the target precision.
24330 2018-01-24 Richard Biener <rguenther@suse.de>
24332 PR middle-end/84000
24333 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24335 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24337 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24338 to merge probabilities.
24339 * predict.c (probably_never_executed): Also mark as cold functions
24340 with global 0 profile and guessed local profile.
24341 * profile-count.c (profile_probability::combine_with_count): New
24343 * profile-count.h (profile_probability::operator*,
24344 profile_probability::operator*=, profile_probability::operator/,
24345 profile_probability::operator/=): Reduce precision to adjusted
24346 and set value to guessed on contradictory divisions.
24347 (profile_probability::combine_with_freq): Remove.
24348 (profile_probability::combine_wiht_count): Declare.
24349 (profile_count::force_nonzero):: Set to adjusted.
24350 (profile_count::probability_in):: Set quality to adjusted.
24351 * tree-ssa-tail-merge.c (replace_block_by): Use
24352 combine_with_count.
24354 2018-01-23 Andrew Waterman <andrew@sifive.com>
24355 Jim Wilson <jimw@sifive.com>
24357 * config/riscv/riscv.c (riscv_stack_boundary): New.
24358 (riscv_option_override): Set riscv_stack_boundary. Handle
24359 riscv_preferred_stack_boundary_arg.
24360 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24361 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24362 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24363 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24364 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24365 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24367 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24370 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24371 of struct ix86_frame.
24372 (ix86_expand_epilogue): Likewise. Add a local variable for
24373 the reg_save_offset field in struct ix86_frame.
24375 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24377 PR tree-optimization/82604
24378 * tree-loop-distribution.c (enum partition_kind): New enum item
24379 PKIND_PARTIAL_MEMSET.
24380 (partition_builtin_p): Support above new enum item.
24381 (generate_code_for_partition): Ditto.
24382 (compute_access_range): Differentiate cases that equality can be
24383 proven at all loops, the innermost loops or no loops.
24384 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24385 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24386 (finalize_partitions, distribute_loop): Don't fuse partition of
24387 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24388 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24389 parloop is enabled.
24391 2018-01-23 Martin Liska <mliska@suse.cz>
24393 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24394 order to ignore the predictor.
24395 (PRED_POLYMORPHIC_CALL): Likewise.
24396 (PRED_RECURSIVE_CALL): Likewise.
24398 2018-01-23 Martin Liska <mliska@suse.cz>
24400 * tree-profile.c (tree_profiling): Print function header to
24401 aware reader which function we are working on.
24402 * value-prof.c (gimple_find_values_to_profile): Do not print
24403 not interesting value histograms.
24405 2018-01-23 Martin Liska <mliska@suse.cz>
24407 * profile-count.h (enum profile_quality): Add
24408 profile_uninitialized as the first value. Do not number values
24409 as they are zero based.
24410 (profile_count::verify): Update sanity check.
24411 (profile_probability::verify): Likewise.
24413 2018-01-23 Nathan Sidwell <nathan@acm.org>
24415 * doc/invoke.texi (ffor-scope): Deprecate.
24417 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24419 PR tree-optimization/83510
24420 * domwalk.c (set_all_edges_as_executable): New function.
24421 (dom_walker::dom_walker): Convert bool param
24422 "skip_unreachable_blocks" to enum reachability. Move setup of
24423 edge flags to set_all_edges_as_executable and only do it when
24424 reachability is REACHABLE_BLOCKS.
24425 * domwalk.h (enum dom_walker::reachability): New enum.
24426 (dom_walker::dom_walker): Convert bool param
24427 "skip_unreachable_blocks" to enum reachability.
24428 (set_all_edges_as_executable): New decl.
24429 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24430 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24432 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24433 but converting true to REACHABLE_BLOCKS.
24434 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24436 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24437 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24438 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24440 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24441 if check_all_array_refs will be called.
24443 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24445 * tree.c (selftest::test_location_wrappers): Add more test
24448 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24450 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24451 (selftest::test_bit_in_range): Likewise.
24453 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24456 * doc/sourcebuild.texi (vect_float): Say that the selector
24457 only describes the situation when -funsafe-math-optimizations is on.
24458 (vect_float_strict): Document.
24460 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24462 PR tree-optimization/83965
24463 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24464 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24465 instead of checking only for a reduction.
24466 (vect_recog_widen_sum_pattern): Likewise.
24468 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24470 * predict.c (probably_never_executed): Only use precise profile info.
24471 (compute_function_frequency): Skip after inlining hack since we now
24472 have quality checking.
24474 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24476 * profile-count.h (profile_probability::very_unlikely,
24477 profile_probability::unlikely, profile_probability::even): Set
24478 precision to guessed.
24480 2018-01-23 Richard Biener <rguenther@suse.de>
24482 PR tree-optimization/83963
24483 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24484 Properly terminate dominator walk when crossing the exit edge not
24485 when visiting its source block.
24487 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24490 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24491 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24493 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24495 PR tree-optimization/83957
24496 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24497 semicolon after for body surrounded by braces.
24499 PR tree-optimization/83081
24500 * profile-count.h (profile_probability::split): New method.
24501 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24502 Use profile_probability::split.
24503 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24504 when splitting a single conditional jump into 2.
24506 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24508 PR tree-optimization/69452
24509 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24512 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24514 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24515 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24516 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24518 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24520 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24522 * config/rl78/rl78.md (movdi): New define_expand.
24523 * config/rl78/rl78.c (rl78_split_movdi): New function.
24525 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24528 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24530 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24531 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24532 128-bit to produce an UNSPEC move to get the double word with the
24533 signbit and then a shift directly to do signbit.
24534 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24535 implementation with a new version that just does either a direct
24536 move or a regular move. Move memory interface to separate insns.
24537 Move insns so they are next to the expander.
24538 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24539 with signbit move. Split big and little endian case.
24540 (signbit<mode>2_dm_mem_le): Likewise.
24541 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24542 (signbit<mode>2_dm2): Likewise.
24544 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24546 * config/rl78/rl78.md (anddi3): New define_expand.
24548 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24550 * config/rl78/rl78.md (umindi3): New define_expand.
24552 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24554 * config/rl78/rl78.md (smindi3): New define_expand.
24556 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24558 * config/rl78/rl78.md (smaxdi3): New define_expand.
24560 2018-01-22 Carl Love <cel@us.ibm.com>
24562 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24563 LVX_V1TI): Add macro expansion.
24564 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24565 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24566 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24567 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24568 Change check to determine if the instruction is a byte reversing
24569 entry. Fix typo in comment.
24570 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24571 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24572 Add def_builtin calls for new builtins.
24573 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24574 Add define_insn expansion.
24576 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24578 * config/rl78/rl78.md (umaxdi3): New define_expand.
24580 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24582 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24583 for non-QImode registers.
24585 2018-01-22 Richard Biener <rguenther@suse.de>
24587 PR tree-optimization/83963
24588 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24589 including the loop exit block.
24590 (scop_detection::merge_sese): Likewise.
24591 (scop_detection::add_scop): Do it here instead.
24593 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24595 * doc/sourcebuild.texi (arm_softfloat): Document.
24597 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24600 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24601 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24602 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24604 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24605 David Edelsohn <dje.gcc@gmail.com>
24608 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24609 Change "crset eq" to "crset 2".
24610 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24611 (*call_indirect_aix<mode>_nospec): Likewise.
24612 (*call_value_indirect_aix<mode>_nospec): Likewise.
24613 (*call_indirect_elfv2<mode>_nospec): Likewise.
24614 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24615 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24616 change assembly output from . to $.
24617 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24618 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24619 (*tablejump<mode>_internal1_nospec): Likewise.
24621 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24624 * config/sh/sh_optimize_sett_clrt.cc:
24625 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24627 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24629 PR tree-optimization/83940
24630 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24631 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24632 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24633 use it to pass back the definition type.
24634 (vect_check_store_rhs): Likewise rhs_dt_out.
24635 (vect_build_gather_load_calls): Add a mask_dt argument and use
24636 it instead of a call to vect_is_simple_use.
24637 (vectorizable_store): Update calls to vect_check_load_store_mask
24638 and vect_check_store_rhs. Use the dt returned by the latter instead
24639 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24640 instead of calls to vect_is_simple_use. Pass the scalar rather
24641 than the vector operand to vect_is_simple_use when handling
24642 second and subsequent copies of an rhs value.
24643 (vectorizable_load): Update calls to vect_check_load_store_mask
24644 and vect_build_gather_load_calls. Use the cached mask_dt and
24645 gs_info.offset_dt instead of calls to vect_is_simple_use.
24647 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24649 PR middle-end/83945
24650 * tree-emutls.c: Include gimplify.h.
24651 (lower_emutls_2): New function.
24652 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24653 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24654 it before further processing.
24657 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24658 UINTVAL (trueop1) instead of INTVAL (op1).
24660 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24664 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24665 INCOMING_FRAME_SP_OFFSET if not defined.
24666 (scan_trace): Add ENTRY argument. If true and
24667 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24668 emit a note to adjust the CFA offset.
24669 (create_cfi_notes): Adjust scan_trace callers.
24670 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24671 INCOMING_FRAME_SP_OFFSET in the CIE.
24672 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24673 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24675 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24676 * doc/tm.texi: Regenerated.
24678 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24680 PR rtl-optimization/83147
24681 * lra-constraints.c (remove_inheritance_pseudos): Use
24682 lra_substitute_pseudo_within_insn.
24684 2018-01-19 Tom de Vries <tom@codesourcery.com>
24685 Cesar Philippidis <cesar@codesourcery.com>
24688 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24690 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24693 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24694 spaces for function labels.
24696 2018-01-19 Martin Liska <mliska@suse.cz>
24698 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24699 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24700 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24701 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24702 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24703 (PRED_CONST_RETURN): Change from 69 to 65.
24704 (PRED_NULL_RETURN): Change from 91 to 71.
24705 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24706 (PRED_LOOP_GUARD): Change from 66 to 73.
24708 2018-01-19 Martin Liska <mliska@suse.cz>
24710 * predict.c (predict_insn_def): Add new assert.
24711 (struct branch_predictor): Change type to signed integer.
24712 (test_prediction_value_range): Amend test to cover
24713 PROB_UNINITIALIZED.
24714 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24715 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24716 (PRED_LOOP_ITERATIONS_MAX): Likewise.
24717 (PRED_LOOP_IV_COMPARE): Likewise.
24718 * predict.h (PROB_UNINITIALIZED): Define new constant.
24720 2018-01-19 Martin Liska <mliska@suse.cz>
24722 * predict.c (dump_prediction): Add new format for
24723 analyze_brprob.py script which is enabled with -details
24725 * profile-count.h (precise_p): New function.
24727 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24729 PR tree-optimization/83922
24730 * tree-vect-loop.c (vect_verify_full_masking): Return false if
24731 there are no statements that need masking.
24732 (vect_active_double_reduction_p): New function.
24733 (vect_analyze_loop_operations): Use it when handling phis that
24734 are not in the loop header.
24736 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
24738 PR tree-optimization/83914
24739 * tree-vect-loop.c (vectorizable_induction): Don't convert
24740 init_expr or apply the peeling adjustment for inductions
24741 that are nested within the vectorized loop.
24743 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24745 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24748 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24752 * function.h (gimplify_parameters): Add gimple_seq * argument.
24753 * function.c: Include gimple.h and options.h.
24754 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24755 for the added local temporaries if needed.
24756 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24757 if there are any parameter cleanups, wrap whole body into a
24758 try/finally with the cleanups.
24760 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
24763 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24764 Use GET_MODE_CLASS for scalar floating point.
24766 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24770 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24771 Fix call of call_cgraph_insertion_hooks.
24773 2018-01-18 Martin Sebor <msebor@redhat.com>
24775 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24777 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
24780 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24783 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
24786 * common.opt: (-ffile-prefix-map): New option.
24787 * opts.c (common_handle_option): Defer it.
24788 * opts-global.c (handle_common_deferred_options): Handle it.
24789 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24790 * file-prefix-map.h: New file.
24791 (remap_debug_filename, add_debug_prefix_map): ...here.
24792 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24793 * final.c (debug_prefix_map, add_debug_prefix_map
24794 remap_debug_filename): Move to...
24795 * file-prefix-map.c: New file.
24796 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24797 generalize, get rid of alloca(), use strrchr() instead of strchr().
24798 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24799 Implement in terms of add_prefix_map().
24800 (remap_macro_filename, remap_debug_filename): Implement in term of
24802 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24803 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24804 * dbxout.c: Include file-prefix-map.h.
24805 * varasm.c: Likewise.
24806 * vmsdbgout.c: Likewise.
24807 * xcoffout.c: Likewise.
24808 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24809 * doc/cppopts.texi (-fmacro-prefix-map): Document.
24810 * doc/invoke.texi (-ffile-prefix-map): Document.
24811 (-fdebug-prefix-map): Update description.
24813 2018-01-18 Martin Liska <mliska@suse.cz>
24815 * config/i386/i386.c (indirect_thunk_name): Document that also
24817 (output_indirect_thunk): Document why both instructions
24818 (pause and lfence) are generated.
24820 2018-01-18 Richard Biener <rguenther@suse.de>
24822 PR tree-optimization/83887
24823 * graphite-scop-detection.c
24824 (scop_detection::get_nearest_dom_with_single_entry): Remove.
24825 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24826 (scop_detection::merge_sese): Re-implement with a flood-fill
24827 algorithm that properly finds a SESE region if it exists.
24829 2018-01-18 Jakub Jelinek <jakub@redhat.com>
24832 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24833 pointer_diff optimizations use view_convert instead of convert.
24835 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24837 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24838 Generate different code for -mno-speculate-indirect-jumps.
24839 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24840 (*call_indirect_aix<mode>): Disable for
24841 -mno-speculate-indirect-jumps.
24842 (*call_indirect_aix<mode>_nospec): New define_insn.
24843 (*call_value_indirect_aix<mode>): Disable for
24844 -mno-speculate-indirect-jumps.
24845 (*call_value_indirect_aix<mode>_nospec): New define_insn.
24846 (*sibcall_nonlocal_sysv<mode>): Generate different code for
24847 -mno-speculate-indirect-jumps.
24848 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24850 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
24852 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24853 long double type, set the flags for noting the default long double
24854 type, even if we don't pass or return a long double type.
24856 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
24859 * ipa-inline.c (flatten_function): Do not overwrite final inlining
24862 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
24864 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24865 support for merge[hl].
24866 (fold_mergehl_helper): New helper function.
24867 (tree-vector-builder.h): New #include for tree_vector_builder usage.
24868 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24869 (altivec_vmrglw_direct): Add xxmrglw insn.
24871 2018-01-17 Andrew Waterman <andrew@sifive.com>
24873 * config/riscv/riscv.c (riscv_conditional_register_usage): If
24874 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24876 2018-01-17 David Malcolm <dmalcolm@redhat.com>
24879 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24880 call the lto_location_cache before reading the
24881 DECL_SOURCE_LOCATION of the types.
24883 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
24884 Richard Sandiford <richard.sandiford@linaro.org>
24886 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24887 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24888 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24889 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24890 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24892 * config/aarch64/constraints.md (aarch64_movti_operand):
24894 * config/aarch64/predicates.md (Uti): Add new constraint.
24896 2018-01-17 Carl Love <cel@us.ibm.com>
24898 * config/rs6000/vsx.md (define_expand xl_len_r,
24899 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24900 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24902 (define_expand, define_insn): Move the shift left from the
24903 define_insn to the define_expand for lxvl and stxvl instructions.
24904 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24905 and XL_LEN_R definitions to PURE.
24907 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
24909 * config/i386/i386.c (indirect_thunk_name): Declare regno
24910 as unsigned int. Compare regno with INVALID_REGNUM.
24911 (output_indirect_thunk): Ditto.
24912 (output_indirect_thunk_function): Ditto.
24913 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
24914 in the call to output_indirect_thunk_function.
24916 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
24918 PR middle-end/83884
24919 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24920 rather than the size of inner_type to determine the stack slot size
24921 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24923 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
24926 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24929 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
24931 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24932 endian Linux systems to optionally enable multilibs for selecting
24933 the long double type if the user configured an explicit type.
24934 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24935 have no long double multilibs if not defined.
24936 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24937 warn if the user used -mabi={ieee,ibm}longdouble and we built
24938 multilibs for long double.
24939 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24940 appropriate multilib option.
24941 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24943 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24944 for building long double multilibs.
24945 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24947 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
24949 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24952 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24954 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24957 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24960 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24963 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24965 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24966 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24968 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
24970 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24971 different rtl trees depending on TARGET_64BIT.
24972 (rs6000_gen_lvx): Likewise.
24974 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
24976 * config/visium/visium.md (nop): Tweak comment.
24977 (hazard_nop): Likewise.
24979 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24981 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24982 -mspeculate-indirect-jumps.
24983 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24984 for -mno-speculate-indirect-jumps.
24985 (*call_indirect_elfv2<mode>_nospec): New define_insn.
24986 (*call_value_indirect_elfv2<mode>): Disable for
24987 -mno-speculate-indirect-jumps.
24988 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24989 (indirect_jump): Emit different RTL for
24990 -mno-speculate-indirect-jumps.
24991 (*indirect_jump<mode>): Disable for
24992 -mno-speculate-indirect-jumps.
24993 (*indirect_jump<mode>_nospec): New define_insn.
24994 (tablejump): Emit different RTL for
24995 -mno-speculate-indirect-jumps.
24996 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24997 (tablejumpsi_nospec): New define_expand.
24998 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24999 (tablejumpdi_nospec): New define_expand.
25000 (*tablejump<mode>_internal1): Disable for
25001 -mno-speculate-indirect-jumps.
25002 (*tablejump<mode>_internal1_nospec): New define_insn.
25003 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25006 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25008 * caller-save.c (insert_save): Drop unnecessary parameter. All
25011 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25012 Richard Biener <rguenth@suse.de>
25015 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25016 return early, inline manually is_gimple_sizepos. Make sure if we
25017 call gimplify_expr we don't end up with a gimple constant.
25018 * tree.c (variably_modified_type_p): Don't return true for
25019 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25020 * gimplify.h (is_gimple_sizepos): Remove.
25022 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25024 PR tree-optimization/83857
25025 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25026 vectorizable_live_operation for pure SLP statements.
25027 (vectorizable_live_operation): Handle PHIs.
25029 2018-01-16 Richard Biener <rguenther@suse.de>
25031 PR tree-optimization/83867
25032 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25033 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25035 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25038 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25039 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25040 If off is not INTEGER_CST, issue a may not be aligned warning
25041 rather than isn't aligned. Use isn%'t rather than isn't.
25042 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25044 <case MULT_EXPR>: Improve the case when bottom and one of the
25045 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25046 operand, in that case check if the other operand is multiple of
25047 bottom divided by the INTEGER_CST operand.
25049 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25052 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25053 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25054 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25055 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25056 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25057 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25058 (pa_function_arg_size): New function.
25060 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25062 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25063 in a separate statement.
25065 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25067 PR tree-optimization/83847
25068 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25069 group gathers and scatters.
25071 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25073 PR rtl-optimization/86620
25074 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25076 PR rtl-optimization/83213
25077 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25078 to last if both are JUMP_INSNs.
25080 PR tree-optimization/83843
25081 * gimple-ssa-store-merging.c
25082 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25083 store_immediate_info for bswap/nop orig_stores.
25085 2018-01-15 Andrew Waterman <andrew@sifive.com>
25087 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25089 <UDIV>: Increase cost if !TARGET_DIV.
25091 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25093 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25094 (define_attr "cr_logical_3op"): New.
25095 (cceq_ior_compare): Adjust.
25096 (cceq_ior_compare_complement): Adjust.
25097 (*cceq_rev_compare): Adjust.
25098 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25099 (is_cracked_insn): Adjust.
25100 (insn_must_be_first_in_group): Adjust.
25101 * config/rs6000/40x.md: Adjust.
25102 * config/rs6000/440.md: Adjust.
25103 * config/rs6000/476.md: Adjust.
25104 * config/rs6000/601.md: Adjust.
25105 * config/rs6000/603.md: Adjust.
25106 * config/rs6000/6xx.md: Adjust.
25107 * config/rs6000/7450.md: Adjust.
25108 * config/rs6000/7xx.md: Adjust.
25109 * config/rs6000/8540.md: Adjust.
25110 * config/rs6000/cell.md: Adjust.
25111 * config/rs6000/e300c2c3.md: Adjust.
25112 * config/rs6000/e500mc.md: Adjust.
25113 * config/rs6000/e500mc64.md: Adjust.
25114 * config/rs6000/e5500.md: Adjust.
25115 * config/rs6000/e6500.md: Adjust.
25116 * config/rs6000/mpc.md: Adjust.
25117 * config/rs6000/power4.md: Adjust.
25118 * config/rs6000/power5.md: Adjust.
25119 * config/rs6000/power6.md: Adjust.
25120 * config/rs6000/power7.md: Adjust.
25121 * config/rs6000/power8.md: Adjust.
25122 * config/rs6000/power9.md: Adjust.
25123 * config/rs6000/rs64.md: Adjust.
25124 * config/rs6000/titan.md: Adjust.
25126 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25128 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25129 ix86_indirect_branch_register logic.
25131 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25133 * config/i386/constraints.md (Bs): Update
25134 ix86_indirect_branch_register check. Don't check
25135 ix86_indirect_branch_register with GOT_memory_operand.
25137 * config/i386/predicates.md (GOT_memory_operand): Don't check
25138 ix86_indirect_branch_register here.
25139 (GOT32_symbol_operand): Likewise.
25141 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25143 * config/i386/predicates.md (constant_call_address_operand):
25144 Rewrite ix86_indirect_branch_register logic.
25145 (sibcall_insn_operand): Likewise.
25147 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25149 * config/i386/constraints.md (Bs): Replace
25150 ix86_indirect_branch_thunk_register with
25151 ix86_indirect_branch_register.
25153 * config/i386/i386.md (indirect_jump): Likewise.
25154 (tablejump): Likewise.
25155 (*sibcall_memory): Likewise.
25156 (*sibcall_value_memory): Likewise.
25157 Peepholes of indirect call and jump via memory: Likewise.
25158 * config/i386/i386.opt: Likewise.
25159 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25160 (GOT_memory_operand): Likewise.
25161 (call_insn_operand): Likewise.
25162 (sibcall_insn_operand): Likewise.
25163 (GOT32_symbol_operand): Likewise.
25165 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25167 PR middle-end/83837
25168 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25169 type rather than type addr's type points to.
25170 (expand_omp_atomic_mutex): Likewise.
25171 (expand_omp_atomic): Likewise.
25173 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25176 * config/i386/i386.c (output_indirect_thunk_function): Use
25177 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25178 for __x86_return_thunk.
25180 2018-01-15 Richard Biener <rguenther@suse.de>
25182 PR middle-end/83850
25183 * expmed.c (extract_bit_field_1): Fix typo.
25185 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25188 * config/arm/iterators.md (VF): New mode iterator.
25189 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25190 Remove integer-related logic from pattern.
25191 (neon_vabd<mode>_3): Likewise.
25193 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25195 PR middle-end/82694
25196 * common.opt (fstrict-overflow): No longer an alias.
25197 (fwrapv-pointer): New option.
25198 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25199 also for pointer types based on flag_wrapv_pointer.
25200 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25201 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25202 opts->x_flag_wrapv got set.
25203 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25204 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25205 POINTER_TYPE_OVERFLOW_UNDEFINED.
25206 * match.pd: Likewise in address comparison pattern.
25207 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25209 2018-01-15 Richard Biener <rguenther@suse.de>
25212 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25213 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25214 Reset type names to their identifier if their TYPE_DECL doesn't
25215 have linkage (and thus is used for ODR and devirt).
25216 (save_debug_info_for_decl): Remove.
25217 (save_debug_info_for_type): Likewise.
25218 (add_tree_to_fld_list): Adjust.
25219 * tree-pretty-print.c (dump_generic_node): Make dumping of
25220 type names more robust.
25222 2018-01-15 Richard Biener <rguenther@suse.de>
25224 * BASE-VER: Bump to 8.0.1.
25226 2018-01-14 Martin Sebor <msebor@redhat.com>
25229 * builtins.c (check_access): Avoid warning when the no-warning bit
25232 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25234 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25235 * ira-color (allocno_hard_regs_compare): Likewise.
25237 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25240 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25241 Use .pushsection/.popsection.
25243 2018-01-14 Martin Sebor <msebor@redhat.com>
25246 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25248 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25250 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25251 entry from extra_headers.
25252 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25253 extra_headers, make the list bitwise identical to the i?86-*-* one.
25255 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25257 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25258 -mcmodel=large with -mindirect-branch=thunk,
25259 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25260 -mfunction-return=thunk-extern.
25261 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25262 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25263 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25265 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25267 * config/i386/i386.c (print_reg): Print the name of the full
25268 integer register without '%'.
25269 (ix86_print_operand): Handle 'V'.
25270 * doc/extend.texi: Document 'V' modifier.
25272 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25274 * config/i386/constraints.md (Bs): Disallow memory operand for
25275 -mindirect-branch-register.
25277 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25278 (GOT_memory_operand): Likewise.
25279 (call_insn_operand): Likewise.
25280 (sibcall_insn_operand): Likewise.
25281 (GOT32_symbol_operand): Likewise.
25282 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25283 for -mindirect-branch-register.
25284 (tablejump): Likewise.
25285 (*sibcall_memory): Likewise.
25286 (*sibcall_value_memory): Likewise.
25287 Disallow peepholes of indirect call and jump via memory for
25288 -mindirect-branch-register.
25289 (*call_pop): Replace m with Bw.
25290 (*call_value_pop): Likewise.
25291 (*sibcall_pop_memory): Replace m with Bs.
25292 * config/i386/i386.opt (mindirect-branch-register): New option.
25293 * doc/invoke.texi: Document -mindirect-branch-register option.
25295 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25297 * config/i386/i386-protos.h (ix86_output_function_return): New.
25298 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25299 set function_return_type.
25300 (indirect_thunk_name): Add ret_p to indicate thunk for function
25302 (output_indirect_thunk_function): Pass false to
25303 indirect_thunk_name.
25304 (ix86_output_indirect_branch_via_reg): Likewise.
25305 (ix86_output_indirect_branch_via_push): Likewise.
25306 (output_indirect_thunk_function): Create alias for function
25307 return thunk if regno < 0.
25308 (ix86_output_function_return): New function.
25309 (ix86_handle_fndecl_attribute): Handle function_return.
25310 (ix86_attribute_table): Add function_return.
25311 * config/i386/i386.h (machine_function): Add
25312 function_return_type.
25313 * config/i386/i386.md (simple_return_internal): Use
25314 ix86_output_function_return.
25315 (simple_return_internal_long): Likewise.
25316 * config/i386/i386.opt (mfunction-return=): New option.
25317 (indirect_branch): Mention -mfunction-return=.
25318 * doc/extend.texi: Document function_return function attribute.
25319 * doc/invoke.texi: Document -mfunction-return= option.
25321 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25323 * config/i386/i386-opts.h (indirect_branch): New.
25324 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25325 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25326 with local indirect jump when converting indirect call and jump.
25327 (ix86_set_indirect_branch_type): New.
25328 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25329 (indirectlabelno): New.
25330 (indirect_thunk_needed): Likewise.
25331 (indirect_thunk_bnd_needed): Likewise.
25332 (indirect_thunks_used): Likewise.
25333 (indirect_thunks_bnd_used): Likewise.
25334 (INDIRECT_LABEL): Likewise.
25335 (indirect_thunk_name): Likewise.
25336 (output_indirect_thunk): Likewise.
25337 (output_indirect_thunk_function): Likewise.
25338 (ix86_output_indirect_branch_via_reg): Likewise.
25339 (ix86_output_indirect_branch_via_push): Likewise.
25340 (ix86_output_indirect_branch): Likewise.
25341 (ix86_output_indirect_jmp): Likewise.
25342 (ix86_code_end): Call output_indirect_thunk_function if needed.
25343 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25345 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25346 (ix86_attribute_table): Add indirect_branch.
25347 * config/i386/i386.h (machine_function): Add indirect_branch_type
25348 and has_local_indirect_jump.
25349 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25351 (tablejump): Likewise.
25352 (*indirect_jump): Use ix86_output_indirect_jmp.
25353 (*tablejump_1): Likewise.
25354 (simple_return_indirect_internal): Likewise.
25355 * config/i386/i386.opt (mindirect-branch=): New option.
25356 (indirect_branch): New.
25359 (thunk-inline): Likewise.
25360 (thunk-extern): Likewise.
25361 * doc/extend.texi: Document indirect_branch function attribute.
25362 * doc/invoke.texi: Document -mindirect-branch= option.
25364 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25367 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25369 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25371 * ipa-inline.c (want_inline_small_function_p): Return false if
25372 inlining has already failed with CIF_FINAL_ERROR.
25373 (update_caller_keys): Call want_inline_small_function_p before
25375 (update_callee_keys): Likewise.
25377 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25379 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25381 (rs6000_quadword_masked_address_p): Likewise.
25382 (quad_aligned_load_p): Likewise.
25383 (quad_aligned_store_p): Likewise.
25384 (const_load_sequence_p): Add comment to describe the outer-most loop.
25385 (mimic_memory_attributes_and_flags): New function.
25386 (rs6000_gen_stvx): Likewise.
25387 (replace_swapped_aligned_store): Likewise.
25388 (rs6000_gen_lvx): Likewise.
25389 (replace_swapped_aligned_load): Likewise.
25390 (replace_swapped_load_constant): Capitalize argument name in
25391 comment describing this function.
25392 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25393 and stores that access quad-word aligned addresses and replace
25394 with stvx or lvx instructions when appropriate.
25395 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25396 New function prototype.
25397 (rs6000_quadword_masked_address_p): Likewise.
25398 (rs6000_gen_lvx): Likewise.
25399 (rs6000_gen_stvx): Likewise.
25400 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25401 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25402 when memory address is aligned.
25403 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25404 this split to select lvx instruction when memory address is aligned.
25405 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25406 instruction when memory address is aligned.
25407 (*vsx_le_perm_load_v16qi): Likewise.
25408 (four unnamed splitters): Modify to select the stvx instruction
25409 when memory is aligned.
25411 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25413 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25414 which appears in the queue multiple times.
25416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25417 Alan Hayward <alan.hayward@arm.com>
25418 David Sherwood <david.sherwood@arm.com>
25420 * tree-vectorizer.h (vec_lower_bound): New structure.
25421 (_loop_vec_info): Add check_nonzero and lower_bounds.
25422 (LOOP_VINFO_CHECK_NONZERO): New macro.
25423 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25424 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25425 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25426 fields. Make seg_len the distance travelled, not including the
25428 (dr_direction_indicator): Declare.
25429 (dr_zero_step_indicator): Likewise.
25430 (dr_known_forward_stride_p): Likewise.
25431 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25433 (runtime_alias_check_p): Allow runtime alias checks with
25435 (operator ==): Compare access_size and align.
25436 (prune_runtime_alias_test_list): Rework for new distinction between
25437 the access_size and seg_len.
25438 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25440 (get_segment_min_max): New function.
25441 (create_intersect_range_checks): Use it.
25442 (dr_step_indicator): New function.
25443 (dr_direction_indicator): Likewise.
25444 (dr_zero_step_indicator): Likewise.
25445 (dr_known_forward_stride_p): Likewise.
25446 * tree-loop-distribution.c (data_ref_segment_size): Return
25447 DR_STEP * (niters - 1).
25448 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25450 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25451 (vect_preserves_scalar_order_p): New function, split out from...
25452 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25453 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25454 (vect_vfa_access_size): New function.
25455 (vect_vfa_align): Likewise.
25456 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25457 (dump_lower_bound): New function.
25458 (vect_check_lower_bound): Likewise.
25459 (vect_small_gap_p): Likewise.
25460 (vectorizable_with_step_bound_p): Likewise.
25461 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25462 depencies if the vectorization factor is 1. Convert the checks
25463 for nonzero steps into checks on the bounds of DR_STEP. Try using
25464 a bunds check for variable steps if the minimum required step is
25465 relatively small. Update calls to the dr_with_seg_len
25466 constructor and to vect_compile_time_alias.
25467 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25469 (vect_loop_versioning): Call it.
25470 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25472 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25474 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25475 Alan Hayward <alan.hayward@arm.com>
25476 David Sherwood <david.sherwood@arm.com>
25478 * doc/sourcebuild.texi (vect_scatter_store): Document.
25479 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25481 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25483 * genopinit.c (main): Add supports_vec_scatter_store and
25484 supports_vec_scatter_store_cached to target_optabs.
25485 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25486 IFN_MASK_SCATTER_STORE.
25487 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25489 * internal-fn.h (internal_store_fn_p): Declare.
25490 (internal_fn_stored_value_index): Likewise.
25491 * internal-fn.c (scatter_store_direct): New macro.
25492 (expand_scatter_store_optab_fn): New function.
25493 (direct_scatter_store_optab_supported_p): New macro.
25494 (internal_store_fn_p): New function.
25495 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25496 IFN_MASK_SCATTER_STORE.
25497 (internal_fn_mask_index): Likewise.
25498 (internal_fn_stored_value_index): New function.
25499 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25500 for scatter stores.
25501 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25502 * optabs-query.c (supports_vec_scatter_store_p): New function.
25503 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25504 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25505 true for scatter stores.
25506 (vect_gather_scatter_fn_p): Handle scatter stores too.
25507 (vect_check_gather_scatter): Consider using scatter stores if
25508 supports_vec_scatter_store_p.
25509 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25510 scatter stores too.
25511 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25512 internal_fn_stored_value_index.
25513 (check_load_store_masking): Handle scatter stores too.
25514 (vect_get_store_rhs): Make public.
25515 (vectorizable_call): Use internal_store_fn_p.
25516 (vectorizable_store): Handle scatter store internal functions.
25517 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25518 when deciding whether the end of the group has been reached.
25519 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25520 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25521 (mask_scatter_store<mode>): New insns.
25523 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25524 Alan Hayward <alan.hayward@arm.com>
25525 David Sherwood <david.sherwood@arm.com>
25527 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25528 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25529 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25531 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25532 Use vect_truncate_gather_scatter_offset if we can't treat the
25533 operation as a normal gather load or scatter store.
25534 (get_group_load_store_type): Take the gather_scatter_info
25535 as argument. Try using a gather load or scatter store for
25536 single-element groups.
25537 (get_load_store_type): Update calls to get_group_load_store_type
25538 and vect_use_strided_gather_scatters_p.
25540 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25541 Alan Hayward <alan.hayward@arm.com>
25542 David Sherwood <david.sherwood@arm.com>
25544 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25545 optional tree argument.
25546 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25548 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25549 but continue to use the current value as a fallback.
25550 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25551 to compare the updates.
25552 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25553 (get_load_store_type): Use it when handling a strided access.
25554 (vect_get_strided_load_store_ops): New function.
25555 (vect_get_data_ptr_increment): Likewise.
25556 (vectorizable_load): Handle strided gather loads. Always pass
25557 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25560 Alan Hayward <alan.hayward@arm.com>
25561 David Sherwood <david.sherwood@arm.com>
25563 * doc/md.texi (gather_load@var{m}): Document.
25564 (mask_gather_load@var{m}): Likewise.
25565 * genopinit.c (main): Add supports_vec_gather_load and
25566 supports_vec_gather_load_cached to target_optabs.
25567 * optabs-tree.c (init_tree_optimization_optabs): Use
25568 ggc_cleared_alloc to allocate target_optabs.
25569 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25570 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25572 * internal-fn.h (internal_load_fn_p): Declare.
25573 (internal_gather_scatter_fn_p): Likewise.
25574 (internal_fn_mask_index): Likewise.
25575 (internal_gather_scatter_fn_supported_p): Likewise.
25576 * internal-fn.c (gather_load_direct): New macro.
25577 (expand_gather_load_optab_fn): New function.
25578 (direct_gather_load_optab_supported_p): New macro.
25579 (direct_internal_fn_optab): New function.
25580 (internal_load_fn_p): Likewise.
25581 (internal_gather_scatter_fn_p): Likewise.
25582 (internal_fn_mask_index): Likewise.
25583 (internal_gather_scatter_fn_supported_p): Likewise.
25584 * optabs-query.c (supports_at_least_one_mode_p): New function.
25585 (supports_vec_gather_load_p): Likewise.
25586 * optabs-query.h (supports_vec_gather_load_p): Declare.
25587 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25588 and memory_type field.
25589 (NUM_PATTERNS): Bump to 15.
25590 * tree-vect-data-refs.c: Include internal-fn.h.
25591 (vect_gather_scatter_fn_p): New function.
25592 (vect_describe_gather_scatter_call): Likewise.
25593 (vect_check_gather_scatter): Try using internal functions for
25594 gather loads. Recognize existing calls to a gather load function.
25595 (vect_analyze_data_refs): Consider using gather loads if
25596 supports_vec_gather_load_p.
25597 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25598 (vect_get_gather_scatter_offset_type): Likewise.
25599 (vect_convert_mask_for_vectype): Likewise.
25600 (vect_add_conversion_to_patterm): Likewise.
25601 (vect_try_gather_scatter_pattern): Likewise.
25602 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25603 (vect_vect_recog_func_ptrs): Add it.
25604 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25605 internal_fn_mask_index and internal_gather_scatter_fn_p.
25606 (check_load_store_masking): Take the gather_scatter_info as an
25607 argument and handle gather loads.
25608 (vect_get_gather_scatter_ops): New function.
25609 (vectorizable_call): Check internal_load_fn_p.
25610 (vectorizable_load): Likewise. Handle gather load internal
25612 (vectorizable_store): Update call to check_load_store_masking.
25613 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25614 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25615 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25616 (aarch64_gather_scale_operand_d): New predicates.
25617 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25618 (mask_gather_load<mode>): New insns.
25620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25621 Alan Hayward <alan.hayward@arm.com>
25622 David Sherwood <david.sherwood@arm.com>
25624 * optabs.def (fold_left_plus_optab): New optab.
25625 * doc/md.texi (fold_left_plus_@var{m}): Document.
25626 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25627 * internal-fn.c (fold_left_direct): Define.
25628 (expand_fold_left_optab_fn): Likewise.
25629 (direct_fold_left_optab_supported_p): Likewise.
25630 * fold-const-call.c (fold_const_fold_left): New function.
25631 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25632 * tree-parloops.c (valid_reduction_p): New function.
25633 (gather_scalar_reductions): Use it.
25634 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25635 (vect_finish_replace_stmt): Declare.
25636 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25637 (needs_fold_left_reduction_p): New function, split out from...
25638 (vect_is_simple_reduction): ...here. Accept reductions that
25639 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25640 (vect_force_simple_reduction): Also store the reduction type in
25641 the assignment's STMT_VINFO_REDUC_TYPE.
25642 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25643 (merge_with_identity): New function.
25644 (vect_expand_fold_left): Likewise.
25645 (vectorize_fold_left_reduction): Likewise.
25646 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25647 scalar phi in place for it. Check for target support and reject
25648 cases that would reassociate the operation. Defer the transform
25649 phase to vectorize_fold_left_reduction.
25650 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25651 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25652 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25656 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25657 call to ifc_temp_var.
25659 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25660 Alan Hayward <alan.hayward@arm.com>
25661 David Sherwood <david.sherwood@arm.com>
25663 * target.def (legitimize_address_displacement): Take the original
25664 offset as a poly_int.
25665 * targhooks.h (default_legitimize_address_displacement): Update
25667 * targhooks.c (default_legitimize_address_displacement): Likewise.
25668 * doc/tm.texi: Regenerate.
25669 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25670 as an argument, moving assert of ad->disp == ad->disp_term to...
25671 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25672 Try calling targetm.legitimize_address_displacement before expanding
25673 the address rather than afterwards, and adjust for the new interface.
25674 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25675 Match the new hook interface. Handle SVE addresses.
25676 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25677 new hook interface.
25679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25681 * Makefile.in (OBJS): Add early-remat.o.
25682 * target.def (select_early_remat_modes): New hook.
25683 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25684 * doc/tm.texi: Regenerate.
25685 * targhooks.h (default_select_early_remat_modes): Declare.
25686 * targhooks.c (default_select_early_remat_modes): New function.
25687 * timevar.def (TV_EARLY_REMAT): New timevar.
25688 * passes.def (pass_early_remat): New pass.
25689 * tree-pass.h (make_pass_early_remat): Declare.
25690 * early-remat.c: New file.
25691 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25693 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25695 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25696 Alan Hayward <alan.hayward@arm.com>
25697 David Sherwood <david.sherwood@arm.com>
25699 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25700 vfm1 with a bound_epilog parameter.
25701 (vect_do_peeling): Update calls accordingly, and move the prologue
25702 call earlier in the function. Treat the base bound_epilog as 0 for
25703 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25704 this base when peeling for gaps.
25705 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25706 with fully-masked loops.
25707 (vect_estimate_min_profitable_iters): Handle the single peeled
25708 iteration in that case.
25710 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25711 Alan Hayward <alan.hayward@arm.com>
25712 David Sherwood <david.sherwood@arm.com>
25714 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25715 single-element interleaving even if the size is not a power of 2.
25716 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25717 accesses for single-element interleaving if the group size is
25720 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25721 Alan Hayward <alan.hayward@arm.com>
25722 David Sherwood <david.sherwood@arm.com>
25724 * doc/md.texi (fold_extract_last_@var{m}): Document.
25725 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25726 * optabs.def (fold_extract_last_optab): New optab.
25727 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25728 * internal-fn.c (fold_extract_direct): New macro.
25729 (expand_fold_extract_optab_fn): Likewise.
25730 (direct_fold_extract_optab_supported_p): Likewise.
25731 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25732 * tree-vect-loop.c (vect_model_reduction_cost): Handle
25733 EXTRACT_LAST_REDUCTION.
25734 (get_initial_def_for_reduction): Do not create an initial vector
25735 for EXTRACT_LAST_REDUCTION reductions.
25736 (vectorizable_reduction): Leave the scalar phi in place for
25737 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
25738 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
25739 epilogue code for EXTRACT_LAST_REDUCTION and defer the
25740 transform phase to vectorizable_condition.
25741 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25743 (vect_finish_stmt_generation): ...here.
25744 (vect_finish_replace_stmt): New function.
25745 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25746 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25748 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25751 Alan Hayward <alan.hayward@arm.com>
25752 David Sherwood <david.sherwood@arm.com>
25754 * doc/md.texi (extract_last_@var{m}): Document.
25755 * optabs.def (extract_last_optab): New optab.
25756 * internal-fn.def (EXTRACT_LAST): New internal function.
25757 * internal-fn.c (cond_unary_direct): New macro.
25758 (expand_cond_unary_optab_fn): Likewise.
25759 (direct_cond_unary_optab_supported_p): Likewise.
25760 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25761 loops using EXTRACT_LAST.
25762 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25763 (extract_last_<mode>): ...this optab.
25764 (vec_extract<mode><Vel>): Update accordingly.
25766 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25767 Alan Hayward <alan.hayward@arm.com>
25768 David Sherwood <david.sherwood@arm.com>
25770 * target.def (empty_mask_is_expensive): New hook.
25771 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25772 * doc/tm.texi: Regenerate.
25773 * targhooks.h (default_empty_mask_is_expensive): Declare.
25774 * targhooks.c (default_empty_mask_is_expensive): New function.
25775 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25776 if the target says that empty masks are expensive.
25777 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25779 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25781 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25782 Alan Hayward <alan.hayward@arm.com>
25783 David Sherwood <david.sherwood@arm.com>
25785 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25786 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25787 (vect_use_loop_mask_for_alignment_p): New function.
25788 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25789 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25790 niters_skip argument. Make sure that the first niters_skip elements
25791 of the first iteration are inactive.
25792 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25793 Update call to vect_set_loop_masks_directly.
25794 (get_misalign_in_elems): New function, split out from...
25795 (vect_gen_prolog_loop_niters): ...here.
25796 (vect_update_init_of_dr): Take a code argument that specifies whether
25797 the adjustment should be added or subtracted.
25798 (vect_update_init_of_drs): Likewise.
25799 (vect_prepare_for_masked_peels): New function.
25800 (vect_do_peeling): Skip prologue peeling if we're using a mask
25801 instead. Update call to vect_update_inits_of_drs.
25802 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25804 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25805 alignment. Do not include the number of peeled iterations in
25806 the minimum threshold in that case.
25807 (vectorizable_induction): Adjust the start value down by
25808 LOOP_VINFO_MASK_SKIP_NITERS iterations.
25809 (vect_transform_loop): Call vect_prepare_for_masked_peels.
25810 Take the number of skipped iterations into account when calculating
25812 * tree-vect-stmts.c (vect_gen_while_not): New function.
25814 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25815 Alan Hayward <alan.hayward@arm.com>
25816 David Sherwood <david.sherwood@arm.com>
25818 * doc/sourcebuild.texi (vect_fully_masked): Document.
25819 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25820 default value to 0.
25821 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25823 (vect_analyze_loop_2): ...here. Don't check the vectorization
25824 factor against the number of loop iterations if the loop is
25827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25828 Alan Hayward <alan.hayward@arm.com>
25829 David Sherwood <david.sherwood@arm.com>
25831 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25832 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25833 (dump_groups): Update accordingly.
25834 (iv_use::mem_type): New member variable.
25835 (address_p): New function.
25836 (record_use): Add a mem_type argument and initialize the new
25838 (record_group_use): Add a mem_type argument. Use address_p.
25839 Remove obsolete null checks of base_object. Update call to record_use.
25840 (find_interesting_uses_op): Update call to record_group_use.
25841 (find_interesting_uses_cond): Likewise.
25842 (find_interesting_uses_address): Likewise.
25843 (get_mem_type_for_internal_fn): New function.
25844 (find_address_like_use): Likewise.
25845 (find_interesting_uses_stmt): Try find_address_like_use before
25846 calling find_interesting_uses_op.
25847 (addr_offset_valid_p): Use the iv mem_type field as the type
25848 of the addressed memory.
25849 (add_autoinc_candidates): Likewise.
25850 (get_address_cost): Likewise.
25851 (split_small_address_groups_p): Use address_p.
25852 (split_address_groups): Likewise.
25853 (add_iv_candidate_for_use): Likewise.
25854 (autoinc_possible_for_pair): Likewise.
25855 (rewrite_groups): Likewise.
25856 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25857 (determine_group_iv_cost): Update after split of USE_ADDRESS.
25858 (get_alias_ptr_type_for_ptr_address): New function.
25859 (rewrite_use_address): Rewrite address uses in calls that were
25860 identified by find_address_like_use.
25862 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25863 Alan Hayward <alan.hayward@arm.com>
25864 David Sherwood <david.sherwood@arm.com>
25866 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25868 * gimple-expr.h (is_gimple_addressable: Likewise.
25869 * gimple-expr.c (is_gimple_address): Likewise.
25870 * internal-fn.c (expand_call_mem_ref): New function.
25871 (expand_mask_load_optab_fn): Use it.
25872 (expand_mask_store_optab_fn): Likewise.
25874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25875 Alan Hayward <alan.hayward@arm.com>
25876 David Sherwood <david.sherwood@arm.com>
25878 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25879 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25880 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25881 (cond_umax@var{mode}): Document.
25882 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25883 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25884 (cond_umin_optab, cond_umax_optab): New optabs.
25885 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25886 (COND_IOR, COND_XOR): New internal functions.
25887 * internal-fn.h (get_conditional_internal_fn): Declare.
25888 * internal-fn.c (cond_binary_direct): New macro.
25889 (expand_cond_binary_optab_fn): Likewise.
25890 (direct_cond_binary_optab_supported_p): Likewise.
25891 (get_conditional_internal_fn): New function.
25892 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25893 Cope with reduction statements that are vectorized as calls rather
25895 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25896 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25897 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25898 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25899 (UNSPEC_COND_EOR): New unspecs.
25900 (optab): Add mappings for them.
25901 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25902 (sve_int_op, sve_fp_op): New int attributes.
25904 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25905 Alan Hayward <alan.hayward@arm.com>
25906 David Sherwood <david.sherwood@arm.com>
25908 * optabs.def (while_ult_optab): New optab.
25909 * doc/md.texi (while_ult@var{m}@var{n}): Document.
25910 * internal-fn.def (WHILE_ULT): New internal function.
25911 * internal-fn.h (direct_internal_fn_supported_p): New override
25912 that takes two types as argument.
25913 * internal-fn.c (while_direct): New macro.
25914 (expand_while_optab_fn): New function.
25915 (convert_optab_supported_p): Likewise.
25916 (direct_while_optab_supported_p): New macro.
25917 * wide-int.h (wi::udiv_ceil): New function.
25918 * tree-vectorizer.h (rgroup_masks): New structure.
25919 (vec_loop_masks): New typedef.
25920 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25921 and fully_masked_p.
25922 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25923 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25924 (vect_max_vf): New function.
25925 (slpeel_make_loop_iterate_ntimes): Delete.
25926 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25927 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25928 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25929 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25930 internal-fn.h, stor-layout.h and optabs-query.h.
25931 (vect_set_loop_mask): New function.
25932 (add_preheader_seq): Likewise.
25933 (add_header_seq): Likewise.
25934 (interleave_supported_p): Likewise.
25935 (vect_maybe_permute_loop_masks): Likewise.
25936 (vect_set_loop_masks_directly): Likewise.
25937 (vect_set_loop_condition_masked): Likewise.
25938 (vect_set_loop_condition_unmasked): New function, split out from
25939 slpeel_make_loop_iterate_ntimes.
25940 (slpeel_make_loop_iterate_ntimes): Rename to..
25941 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
25942 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25943 (vect_do_peeling): Update call accordingly.
25944 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25946 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25947 mask_compare_type, can_fully_mask_p and fully_masked_p.
25948 (release_vec_loop_masks): New function.
25949 (_loop_vec_info): Use it to free the loop masks.
25950 (can_produce_all_loop_masks_p): New function.
25951 (vect_get_max_nscalars_per_iter): Likewise.
25952 (vect_verify_full_masking): Likewise.
25953 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25954 retries, and free the mask rgroups before retrying. Check loop-wide
25955 reasons for disallowing fully-masked loops. Make the final decision
25956 about whether use a fully-masked loop or not.
25957 (vect_estimate_min_profitable_iters): Do not assume that peeling
25958 for the number of iterations will be needed for fully-masked loops.
25959 (vectorizable_reduction): Disable fully-masked loops.
25960 (vectorizable_live_operation): Likewise.
25961 (vect_halve_mask_nunits): New function.
25962 (vect_double_mask_nunits): Likewise.
25963 (vect_record_loop_mask): Likewise.
25964 (vect_get_loop_mask): Likewise.
25965 (vect_transform_loop): Handle the case in which the final loop
25966 iteration might handle a partial vector. Call vect_set_loop_condition
25967 instead of slpeel_make_loop_iterate_ntimes.
25968 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25969 (check_load_store_masking): New function.
25970 (prepare_load_store_mask): Likewise.
25971 (vectorizable_store): Handle fully-masked loops.
25972 (vectorizable_load): Likewise.
25973 (supportable_widening_operation): Use vect_halve_mask_nunits for
25975 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25976 (vect_gen_while): New function.
25977 * config/aarch64/aarch64.md (umax<mode>3): New expander.
25978 (aarch64_uqdec<mode>): New insn.
25980 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25981 Alan Hayward <alan.hayward@arm.com>
25982 David Sherwood <david.sherwood@arm.com>
25984 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25985 (reduc_xor_scal_optab): New optabs.
25986 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25987 (reduc_xor_scal_@var{m}): Document.
25988 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25989 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25990 internal functions.
25991 * fold-const-call.c (fold_const_call): Handle them.
25992 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25993 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25994 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25995 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25996 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25997 (UNSPEC_XORV): New unspecs.
25998 (optab): Add entries for them.
25999 (BITWISEV): New int iterator.
26000 (bit_reduc_op): New int attributes.
26002 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26003 Alan Hayward <alan.hayward@arm.com>
26004 David Sherwood <david.sherwood@arm.com>
26006 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26007 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26008 * optabs.def (vec_shl_insert_optab): New optab.
26009 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26010 (duplicate_and_interleave): Likewise.
26011 * tree-vect-loop.c: Include internal-fn.h.
26012 (neutral_op_for_slp_reduction): New function, split out from
26013 get_initial_defs_for_reduction.
26014 (get_initial_def_for_reduction): Handle option 2 for variable-length
26015 vectors by loading the neutral value into a vector and then shifting
26016 the initial value into element 0.
26017 (get_initial_defs_for_reduction): Replace the code argument with
26018 the neutral value calculated by neutral_op_for_slp_reduction.
26019 Use gimple_build_vector for constant-length vectors.
26020 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26021 but the first group_size elements have a neutral value.
26022 Use duplicate_and_interleave otherwise.
26023 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26024 Update call to get_initial_defs_for_reduction. Handle SLP
26025 reductions for variable-length vectors by creating one vector
26026 result for each scalar result, with the elements associated
26027 with other scalar results stubbed out with the neutral value.
26028 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26029 Require IFN_VEC_SHL_INSERT for double reductions on
26030 variable-length vectors, or SLP reductions that have
26031 a neutral value. Require can_duplicate_and_interleave_p
26032 support for variable-length unchained SLP reductions if there
26033 is no neutral value, such as for MIN/MAX reductions. Also require
26034 the number of vector elements to be a multiple of the number of
26035 SLP statements when doing variable-length unchained SLP reductions.
26036 Update call to vect_create_epilog_for_reduction.
26037 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26038 and remove initial values.
26039 (duplicate_and_interleave): Make public.
26040 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26041 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26043 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26044 Alan Hayward <alan.hayward@arm.com>
26045 David Sherwood <david.sherwood@arm.com>
26047 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26048 (can_duplicate_and_interleave_p): New function.
26049 (vect_get_and_check_slp_defs): Take the vector of statements
26050 rather than just the current one. Remove excess parentheses.
26051 Restriction rejectinon of vect_constant_def and vect_external_def
26052 for variable-length vectors to boolean types, or types for which
26053 can_duplicate_and_interleave_p is false.
26054 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26055 (duplicate_and_interleave): New function.
26056 (vect_get_constant_vectors): Use gimple_build_vector for
26057 constant-length vectors and suitable variable-length constant
26058 vectors. Use duplicate_and_interleave for other variable-length
26059 vectors. Don't defer the update when inserting new statements.
26061 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26062 Alan Hayward <alan.hayward@arm.com>
26063 David Sherwood <david.sherwood@arm.com>
26065 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26066 min_profitable_iters doesn't go negative.
26068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26069 Alan Hayward <alan.hayward@arm.com>
26070 David Sherwood <david.sherwood@arm.com>
26072 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26073 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26074 * optabs.def (vec_mask_load_lanes_optab): New optab.
26075 (vec_mask_store_lanes_optab): Likewise.
26076 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26077 (MASK_STORE_LANES): Likewise.
26078 * internal-fn.c (mask_load_lanes_direct): New macro.
26079 (mask_store_lanes_direct): Likewise.
26080 (expand_mask_load_optab_fn): Handle masked operations.
26081 (expand_mask_load_lanes_optab_fn): New macro.
26082 (expand_mask_store_optab_fn): Handle masked operations.
26083 (expand_mask_store_lanes_optab_fn): New macro.
26084 (direct_mask_load_lanes_optab_supported_p): Likewise.
26085 (direct_mask_store_lanes_optab_supported_p): Likewise.
26086 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26088 (vect_load_lanes_supported): Likewise.
26089 * tree-vect-data-refs.c (strip_conversion): New function.
26090 (can_group_stmts_p): Likewise.
26091 (vect_analyze_data_ref_accesses): Use it instead of checking
26092 for a pair of assignments.
26093 (vect_store_lanes_supported): Take a masked_p parameter.
26094 (vect_load_lanes_supported): Likewise.
26095 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26096 vect_store_lanes_supported and vect_load_lanes_supported.
26097 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26098 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26099 parameter. Don't allow gaps for masked accesses.
26100 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26101 and vect_load_lanes_supported.
26102 (get_load_store_type): Take a masked_p parameter and update
26103 call to get_group_load_store_type.
26104 (vectorizable_store): Update call to get_load_store_type.
26105 Handle IFN_MASK_STORE_LANES.
26106 (vectorizable_load): Update call to get_load_store_type.
26107 Handle IFN_MASK_LOAD_LANES.
26109 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26110 Alan Hayward <alan.hayward@arm.com>
26111 David Sherwood <david.sherwood@arm.com>
26113 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26115 * config/aarch64/aarch64-protos.h
26116 (aarch64_sve_struct_memory_operand_p): Declare.
26117 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26118 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26119 (VPRED, vpred): Handle SVE structure modes.
26120 * config/aarch64/constraints.md (Utx): New constraint.
26121 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26122 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26123 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26124 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26125 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26126 structure modes. Split into pieces after RA.
26127 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26128 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26130 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26131 SVE structure modes.
26132 (aarch64_classify_address): Likewise.
26133 (sizetochar): Move earlier in file.
26134 (aarch64_print_operand): Handle SVE register lists.
26135 (aarch64_array_mode): New function.
26136 (aarch64_sve_struct_memory_operand_p): Likewise.
26137 (TARGET_ARRAY_MODE): Redefine.
26139 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26140 Alan Hayward <alan.hayward@arm.com>
26141 David Sherwood <david.sherwood@arm.com>
26143 * target.def (array_mode): New target hook.
26144 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26145 * doc/tm.texi: Regenerate.
26146 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26147 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26148 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26149 targetm.array_mode.
26150 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26154 Alan Hayward <alan.hayward@arm.com>
26155 David Sherwood <david.sherwood@arm.com>
26157 * fold-const.c (fold_binary_loc): Check the argument types
26158 rather than the result type when testing for a vector operation.
26160 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26162 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26163 * doc/tm.texi: Regenerate.
26165 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26166 Alan Hayward <alan.hayward@arm.com>
26167 David Sherwood <david.sherwood@arm.com>
26169 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26170 (sve): Document new AArch64 extension.
26171 * doc/md.texi (w): Extend the description of the AArch64
26172 constraint to include SVE vectors.
26173 (Upl, Upa): Document new AArch64 predicate constraints.
26174 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26176 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26177 (msve-vector-bits=): New option.
26178 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26179 SVE when these are disabled.
26180 (sve): New extension.
26181 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26182 modes. Adjust their number of units based on aarch64_sve_vg.
26183 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26184 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26185 aarch64_addr_query_type.
26186 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26187 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26188 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26189 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26190 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26191 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26192 (aarch64_simd_imm_zero_p): Delete.
26193 (aarch64_check_zero_based_sve_index_immediate): Declare.
26194 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26195 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26196 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26197 (aarch64_sve_float_mul_immediate_p): Likewise.
26198 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26199 rather than an rtx.
26200 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26201 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26202 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26203 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26204 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26205 (aarch64_regmode_natural_size): Likewise.
26206 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26207 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26209 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26210 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26211 for VG and the SVE predicate registers.
26212 (V_ALIASES): Add a "z"-prefixed alias.
26213 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26214 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26215 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26216 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26217 (REG_CLASS_NAMES): Add entries for them.
26218 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26219 and the predicate registers.
26220 (aarch64_sve_vg): Declare.
26221 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26222 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26223 (REGMODE_NATURAL_SIZE): Define.
26224 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26226 * config/aarch64/aarch64.c: Include cfgrtl.h.
26227 (simd_immediate_info): Add a constructor for series vectors,
26228 and an associated step field.
26229 (aarch64_sve_vg): New variable.
26230 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26231 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26232 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26233 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26234 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26235 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26236 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26237 (aarch64_get_mask_mode): New functions.
26238 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26239 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26240 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26241 predicate modes and predicate registers. Explicitly restrict
26242 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26243 to store a vector mode if it is recognized by
26244 aarch64_classify_vector_mode.
26245 (aarch64_regmode_natural_size): New function.
26246 (aarch64_hard_regno_caller_save_mode): Return the original mode
26248 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26249 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26250 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26251 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26253 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26254 does not overlap dest if the function is frame-related. Handle
26256 (aarch64_split_add_offset): New function.
26257 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26258 them aarch64_add_offset.
26259 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26260 and update call to aarch64_sub_sp.
26261 (aarch64_add_cfa_expression): New function.
26262 (aarch64_expand_prologue): Pass extra temporary registers to the
26263 functions above. Handle the case in which we need to emit new
26264 DW_CFA_expressions for registers that were originally saved
26265 relative to the stack pointer, but now have to be expressed
26266 relative to the frame pointer.
26267 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26269 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26270 IP0 and IP1 values for SVE frames.
26271 (aarch64_expand_vec_series): New function.
26272 (aarch64_expand_sve_widened_duplicate): Likewise.
26273 (aarch64_expand_sve_const_vector): Likewise.
26274 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26275 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26276 into the register, rather than emitting a SET directly.
26277 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26278 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26279 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26280 (offset_9bit_signed_scaled_p): New functions.
26281 (aarch64_replicate_bitmask_imm): New function.
26282 (aarch64_bitmask_imm): Use it.
26283 (aarch64_cannot_force_const_mem): Reject expressions involving
26284 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26285 (aarch64_classify_index): Handle SVE indices, by requiring
26286 a plain register index with a scale that matches the element size.
26287 (aarch64_classify_address): Handle SVE addresses. Assert that
26288 the mode of the address is VOIDmode or an integer mode.
26289 Update call to aarch64_classify_symbol.
26290 (aarch64_classify_symbolic_expression): Update call to
26291 aarch64_classify_symbol.
26292 (aarch64_const_vec_all_in_range_p): New function.
26293 (aarch64_print_vector_float_operand): Likewise.
26294 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26295 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26296 and the FP immediates 1.0 and 0.5.
26297 (aarch64_print_address_internal): Handle SVE addresses.
26298 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26299 (aarch64_regno_regclass): Handle predicate registers.
26300 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26302 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26303 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26304 (aarch64_convert_sve_vector_bits): New function.
26305 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26306 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26307 rather than an rtx.
26308 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26309 Handle SVE vector and predicate modes. Accept VL-based constants
26310 that need only one temporary register, and VL offsets that require
26311 no temporary registers.
26312 (aarch64_conditional_register_usage): Mark the predicate registers
26313 as fixed if SVE isn't available.
26314 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26315 Return true for SVE vector and predicate modes.
26316 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26317 rather than an unsigned int. Handle SVE modes.
26318 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26320 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26322 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26323 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26324 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26325 (aarch64_sve_float_mul_immediate_p): New functions.
26326 (aarch64_sve_valid_immediate): New function.
26327 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26328 Explicitly reject structure modes. Check for INDEX constants.
26329 Handle PTRUE and PFALSE constants.
26330 (aarch64_check_zero_based_sve_index_immediate): New function.
26331 (aarch64_simd_imm_zero_p): Delete.
26332 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26333 vector modes. Accept constants in the range of CNT[BHWD].
26334 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26335 ask for an Advanced SIMD mode.
26336 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26337 (aarch64_simd_vector_alignment): Handle SVE predicates.
26338 (aarch64_vectorize_preferred_vector_alignment): New function.
26339 (aarch64_simd_vector_alignment_reachable): Use it instead of
26341 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26342 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26344 (MAX_VECT_LEN): Delete.
26345 (expand_vec_perm_d): Add a vec_flags field.
26346 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26347 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26348 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26350 (aarch64_evpc_rev): Rename to...
26351 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26352 (aarch64_evpc_rev_global): New function.
26353 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26354 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26356 (aarch64_evpc_sve_tbl): New function.
26357 (aarch64_expand_vec_perm_const_1): Update after rename of
26358 aarch64_evpc_rev. Handle SVE permutes too, trying
26359 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26360 than aarch64_evpc_tbl.
26361 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26362 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26363 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26364 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26365 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26366 (aarch64_expand_sve_vcond): New functions.
26367 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26368 of aarch64_vector_mode_p.
26369 (aarch64_dwarf_poly_indeterminate_value): New function.
26370 (aarch64_compute_pressure_classes): Likewise.
26371 (aarch64_can_change_mode_class): Likewise.
26372 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26373 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26374 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26375 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26376 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26377 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26378 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26379 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26381 (Dn, Dl, Dr): Accept const as well as const_vector.
26382 (Dz): Likewise. Compare against CONST0_RTX.
26383 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26384 of "vector" where appropriate.
26385 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26386 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26387 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26388 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26389 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26390 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26391 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26392 (v_int_equiv): Extend to SVE modes.
26393 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26395 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26396 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26397 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26398 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26399 (SVE_COND_FP_CMP): New int iterators.
26400 (perm_hilo): Handle the new unpack unspecs.
26401 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26403 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26404 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26405 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26406 (aarch64_equality_operator, aarch64_constant_vector_operand)
26407 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26408 (aarch64_sve_nonimmediate_operand): Likewise.
26409 (aarch64_sve_general_operand): Likewise.
26410 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26411 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26412 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26413 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26414 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26415 (aarch64_sve_float_arith_immediate): Likewise.
26416 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26417 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26418 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26419 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26420 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26421 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26422 (aarch64_sve_float_arith_operand): Likewise.
26423 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26424 (aarch64_sve_float_mul_operand): Likewise.
26425 (aarch64_sve_vec_perm_operand): Likewise.
26426 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26427 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26428 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26429 as well as const_vector.
26430 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26431 in file. Use CONST0_RTX and CONSTM1_RTX.
26432 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26433 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26434 Use aarch64_simd_imm_zero.
26435 * config/aarch64/aarch64-sve.md: New file.
26436 * config/aarch64/aarch64.md: Include it.
26437 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26438 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26439 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26440 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26441 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26442 (sve): New attribute.
26443 (enabled): Disable instructions with the sve attribute unless
26445 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26446 aarch64_expand_mov_immediate.
26447 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26448 CNT[BHSD] immediates.
26449 (movti): Split CONST_POLY_INT moves into two halves.
26450 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26451 Split additions that need a temporary here if the destination
26452 is the stack pointer.
26453 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26454 (*add<mode>3_poly_1): New instruction.
26455 (set_clobber_cc): New expander.
26457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26459 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26460 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26461 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26462 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26463 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26464 Change innermode from fixed_mode_size to machine_mode.
26465 (simplify_subreg): Update call accordingly. Handle a constant-sized
26466 subreg of a variable-length CONST_VECTOR.
26468 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26469 Alan Hayward <alan.hayward@arm.com>
26470 David Sherwood <david.sherwood@arm.com>
26472 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26473 (add_offset_to_base): New function, split out from...
26474 (create_mem_ref): ...here. When handling a scale other than 1,
26475 check first whether the address is valid without the offset.
26476 Add it into the base if so, leaving the index and scale as-is.
26478 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26481 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26482 fold_for_warn before checking if arg2 is INTEGER_CST.
26484 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26486 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26487 (store_multiple_operation): Delete.
26488 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26489 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26490 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26491 guarded by TARGET_STRING.
26492 (rs6000_output_load_multiple): Delete.
26493 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26494 OPTION_MASK_STRING / TARGET_STRING handling.
26495 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26496 (const rs6000_opt_masks) <"string">: Change mask to 0.
26497 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26498 (MASK_STRING): Delete.
26499 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26501 (load_multiple): Delete.
26508 (store_multiple): Delete.
26515 (movmemsi_8reg): Delete.
26516 (corresponding unnamed define_insn): Delete.
26517 (movmemsi_6reg): Delete.
26518 (corresponding unnamed define_insn): Delete.
26519 (movmemsi_4reg): Delete.
26520 (corresponding unnamed define_insn): Delete.
26521 (movmemsi_2reg): Delete.
26522 (corresponding unnamed define_insn): Delete.
26523 (movmemsi_1reg): Delete.
26524 (corresponding unnamed define_insn): Delete.
26525 * config/rs6000/rs6000.opt (mno-string): New.
26526 (mstring): Replace by deprecation warning stub.
26527 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26529 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26531 * regrename.c (regrename_do_replace): If replacing the same
26532 reg multiple times, try to reuse last created gen_raw_REG.
26535 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26536 main to workaround a bug in GDB.
26538 2018-01-12 Tom de Vries <tom@codesourcery.com>
26541 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26543 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26545 PR rtl-optimization/80481
26546 * ira-color.c (get_cap_member): New function.
26547 (allocnos_conflict_by_live_ranges_p): Use it.
26548 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26549 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26551 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26554 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26555 (*saddl_se_1): Ditto.
26556 (*ssubsi_1): Ditto.
26557 (*ssubl_se_1): Ditto.
26559 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26561 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26562 rather than wi::to_widest for DR_INITs.
26563 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26564 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26565 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26567 (vect_analyze_group_access_1): Note that here.
26569 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26571 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26572 polynomial type sizes.
26574 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26576 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26577 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26578 (gimple_add_tmp_var): Likewise.
26580 2018-01-12 Martin Liska <mliska@suse.cz>
26582 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26583 (gimple_alloc_sizes): Likewise.
26584 (dump_gimple_statistics): Use PRIu64 in printf format.
26585 * gimple.h: Change uint64_t to int.
26587 2018-01-12 Martin Liska <mliska@suse.cz>
26589 * tree-core.h: Use uint64_t instead of int.
26590 * tree.c (tree_node_counts): Likewise.
26591 (tree_node_sizes): Likewise.
26592 (dump_tree_statistics): Use PRIu64 in printf format.
26594 2018-01-12 Martin Liska <mliska@suse.cz>
26596 * Makefile.in: As qsort_chk is implemented in vec.c, add
26597 vec.o to linkage of gencfn-macros.
26598 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26599 passing the info to record_node_allocation_statistics.
26600 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26602 * ggc-common.c (struct ggc_usage): Add operator== and use
26603 it in operator< and compare function.
26604 * mem-stats.h (struct mem_usage): Likewise.
26605 * vec.c (struct vec_usage): Remove operator< and compare
26606 function. Can be simply inherited.
26608 2018-01-12 Martin Jambor <mjambor@suse.cz>
26611 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26612 * tree-ssa-math-opts.c: Include domwalk.h.
26613 (convert_mult_to_fma_1): New function.
26614 (fma_transformation_info): New type.
26615 (fma_deferring_state): Likewise.
26616 (cancel_fma_deferring): New function.
26617 (result_of_phi): Likewise.
26618 (last_fma_candidate_feeds_initial_phi): Likewise.
26619 (convert_mult_to_fma): Added deferring logic, split actual
26620 transformation to convert_mult_to_fma_1.
26621 (math_opts_dom_walker): New type.
26622 (math_opts_dom_walker::after_dom_children): New method, body moved
26623 here from pass_optimize_widening_mul::execute, added deferring logic
26625 (pass_optimize_widening_mul::execute): Moved most of code to
26626 math_opts_dom_walker::after_dom_children.
26627 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26628 * config/i386/i386.c (ix86_option_override_internal): Added
26629 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26631 2018-01-12 Richard Biener <rguenther@suse.de>
26634 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26635 inline instance vars.
26637 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26640 * config/rx/rx.c (rx_is_restricted_memory_address):
26641 Handle SUBREG case.
26643 2018-01-12 Richard Biener <rguenther@suse.de>
26645 PR tree-optimization/80846
26646 * target.def (split_reduction): New target hook.
26647 * targhooks.c (default_split_reduction): New function.
26648 * targhooks.h (default_split_reduction): Declare.
26649 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26650 target requests first reduce vectors by combining low and high
26652 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26653 (get_vectype_for_scalar_type_and_size): Export.
26654 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26655 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26656 * doc/tm.texi: Regenerate.
26657 * config/i386/i386.c (ix86_split_reduction): Implement
26658 TARGET_VECTORIZE_SPLIT_REDUCTION.
26660 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26663 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26664 in PIC mode except for TARGET_VXWORKS_RTP.
26665 * config/sparc/sparc.c: Include cfgrtl.h.
26666 (TARGET_INIT_PIC_REG): Define.
26667 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26668 (sparc_pic_register_p): New predicate.
26669 (sparc_legitimate_address_p): Use it.
26670 (sparc_legitimize_pic_address): Likewise.
26671 (sparc_delegitimize_address): Likewise.
26672 (sparc_mode_dependent_address_p): Likewise.
26673 (gen_load_pcrel_sym): Remove 4th parameter.
26674 (load_got_register): Adjust call to above. Remove obsolete stuff.
26675 (sparc_expand_prologue): Do not call load_got_register here.
26676 (sparc_flat_expand_prologue): Likewise.
26677 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26678 (sparc_use_pseudo_pic_reg): New function.
26679 (sparc_init_pic_reg): Likewise.
26680 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26681 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26683 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26685 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26686 Add item for branch_cost.
26688 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26690 PR rtl-optimization/83565
26691 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26692 not extend the result to a larger mode for rotate operations.
26693 (num_sign_bit_copies1): Likewise.
26695 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26698 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26700 Use values-Xc.o for -pedantic.
26701 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26703 2018-01-12 Martin Liska <mliska@suse.cz>
26706 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26708 (possible_polymorphic_call_targets): Use it.
26709 (ipa_devirt): Likewise.
26711 2018-01-12 Martin Liska <mliska@suse.cz>
26713 * profile-count.h (enum profile_quality): Use 0 as invalid
26714 enum value of profile_quality.
26716 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
26718 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26719 -mext-string options.
26721 2018-01-12 Richard Biener <rguenther@suse.de>
26723 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26724 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26725 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26727 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26729 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26731 * configure.ac (--with-long-double-format): Add support for the
26732 configuration option to change the default long double format on
26734 * config.gcc (powerpc*-linux*-*): Likewise.
26735 * configure: Regenerate.
26736 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26737 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26738 used without modification.
26740 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26742 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26743 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26744 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26745 MISC_BUILTIN_SPEC_BARRIER.
26746 (rs6000_init_builtins): Likewise.
26747 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26749 (speculation_barrier): New define_insn.
26750 * doc/extend.texi: Document __builtin_speculation_barrier.
26752 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26755 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26756 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26757 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26759 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
26760 integral modes instead of "ss" and "sd".
26761 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26762 vectors with 32-bit and 64-bit elements.
26763 (vecdupssescalarmodesuffix): New mode attribute.
26764 (vec_dup<mode>): Use it.
26766 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
26769 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26770 frame if argument is passed on stack.
26772 2018-01-11 Jakub Jelinek <jakub@redhat.com>
26775 * ree.c (combine_reaching_defs): Optimize also
26776 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26777 reg2=any_extend(exp); reg1=reg2;, formatting fix.
26779 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26781 PR middle-end/83189
26782 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26784 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
26786 PR middle-end/83718
26787 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26788 after they are computed.
26790 2018-01-11 Bin Cheng <bin.cheng@arm.com>
26792 PR tree-optimization/83695
26793 * gimple-loop-linterchange.cc
26794 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26795 reset cached scev information after interchange.
26796 (pass_linterchange::execute): Remove call to scev_reset_htab.
26798 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26800 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26801 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26802 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26803 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26804 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26805 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26806 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26807 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26808 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26809 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26810 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26811 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26812 (V_lane_reg): Likewise.
26813 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26815 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26816 (vfmal_lane_low<mode>_intrinsic,
26817 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26818 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26819 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26820 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26821 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26822 vfmsl_lane_high<mode>_intrinsic): New define_insns.
26824 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26826 * config/arm/arm-cpus.in (fp16fml): New feature.
26827 (ALL_SIMD): Add fp16fml.
26828 (armv8.2-a): Add fp16fml as an option.
26829 (armv8.3-a): Likewise.
26830 (armv8.4-a): Add fp16fml as part of fp16.
26831 * config/arm/arm.h (TARGET_FP16FML): Define.
26832 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26834 * config/arm/arm-modes.def (V2HF): Define.
26835 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26836 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26837 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26838 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26839 vfmsl_low, vfmsl_high): New set of builtins.
26840 * config/arm/iterators.md (PLUSMINUS): New code iterator.
26841 (vfml_op): New code attribute.
26842 (VFMLHALVES): New int iterator.
26843 (VFML, VFMLSEL): New mode attributes.
26844 (V_reg): Define mapping for V2HF.
26845 (V_hi, V_lo): New mode attributes.
26846 (VF_constraint): Likewise.
26847 (vfml_half, vfml_half_selector): New int attributes.
26848 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26850 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26851 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26853 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26854 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26855 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26856 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
26858 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26859 Document new effective target and option set.
26861 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26863 * config/arm/arm-cpus.in (armv8_4): New feature.
26864 (ARMv8_4a): New fgroup.
26865 (armv8.4-a): New arch.
26866 * config/arm/arm-tables.opt: Regenerate.
26867 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26868 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26869 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26870 Add matching rules for -march=armv8.4-a and extensions.
26871 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26873 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
26876 * config/rx/rx.md (BW): New mode attribute.
26877 (sync_lock_test_and_setsi): Add mode suffix to insn output.
26879 2018-01-11 Richard Biener <rguenther@suse.de>
26881 PR tree-optimization/83435
26882 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26883 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26884 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26886 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26887 Alan Hayward <alan.hayward@arm.com>
26888 David Sherwood <david.sherwood@arm.com>
26890 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26892 (aarch64_classify_address): Initialize it. Track polynomial offsets.
26893 (aarch64_print_address_internal): Use it to check for a zero offset.
26895 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26896 Alan Hayward <alan.hayward@arm.com>
26897 David Sherwood <david.sherwood@arm.com>
26899 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26900 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26901 Return a poly_int64 rather than a HOST_WIDE_INT.
26902 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26903 rather than a HOST_WIDE_INT.
26904 * config/aarch64/aarch64.h (aarch64_frame): Protect with
26905 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
26906 hard_fp_offset, frame_size, initial_adjust, callee_offset and
26907 final_offset from HOST_WIDE_INT to poly_int64.
26908 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26909 to_constant when getting the number of units in an Advanced SIMD
26911 (aarch64_builtin_vectorized_function): Check for a constant number
26913 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26915 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26916 attribute instead of GET_MODE_NUNITS.
26917 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26918 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26919 GET_MODE_SIZE for fixed-size registers.
26920 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26921 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26922 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26923 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26924 (aarch64_print_operand, aarch64_print_address_internal)
26925 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26926 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26927 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26928 Handle polynomial GET_MODE_SIZE.
26929 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
26930 wider than SImode without modification.
26931 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26932 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26933 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26934 passing and returning SVE modes.
26935 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26936 rather than GEN_INT.
26937 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26938 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26939 (aarch64_allocate_and_probe_stack_space): Likewise.
26940 (aarch64_layout_frame): Cope with polynomial offsets.
26941 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26942 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
26943 polynomial offsets.
26944 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26945 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26946 poly_int64 rather than a HOST_WIDE_INT.
26947 (aarch64_get_separate_components, aarch64_process_components)
26948 (aarch64_expand_prologue, aarch64_expand_epilogue)
26949 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26950 (aarch64_anchor_offset): New function, split out from...
26951 (aarch64_legitimize_address): ...here.
26952 (aarch64_builtin_vectorization_cost): Handle polynomial
26953 TYPE_VECTOR_SUBPARTS.
26954 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26956 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26957 number of elements from the PARALLEL rather than the mode.
26958 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26959 rather than GET_MODE_BITSIZE.
26960 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26961 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26962 (aarch64_expand_vec_perm_const_1): Handle polynomial
26963 d->perm.length () and d->perm elements.
26964 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
26965 Apply to_constant to d->perm elements.
26966 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26967 polynomial CONST_VECTOR_NUNITS.
26968 (aarch64_move_pointer): Take amount as a poly_int64 rather
26970 (aarch64_progress_pointer): Avoid temporary variable.
26971 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26972 the mode attribute instead of GET_MODE.
26974 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
26975 Alan Hayward <alan.hayward@arm.com>
26976 David Sherwood <david.sherwood@arm.com>
26978 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26979 x exists before using it.
26980 (aarch64_add_constant_internal): Rename to...
26981 (aarch64_add_offset_1): ...this. Replace regnum with separate
26982 src and dest rtxes. Handle the case in which they're different,
26983 including when the offset is zero. Replace scratchreg with an rtx.
26984 Use 2 additions if there is no spare register into which we can
26985 move a 16-bit constant.
26986 (aarch64_add_constant): Delete.
26987 (aarch64_add_offset): Replace reg with separate src and dest
26988 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
26989 Use aarch64_add_offset_1.
26990 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26991 an rtx rather than an int. Take the delta as a poly_int64
26992 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
26993 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26994 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26995 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26996 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26997 and aarch64_add_sp.
26998 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26999 aarch64_add_constant.
27001 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27003 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27004 Use scalar_float_mode.
27006 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27008 * config/aarch64/aarch64-simd.md
27009 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27010 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27011 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27012 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27013 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27014 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27015 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27016 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27017 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27018 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27020 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27023 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27024 targ_options->x_arm_arch_string is non NULL.
27026 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27028 * config/aarch64/aarch64.h
27029 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27031 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27034 * expmed.c (emit_store_flag_force): Swap if const op0
27035 and change VOIDmode to mode of op0.
27037 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27039 PR rtl-optimization/83761
27040 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27041 than bytes to mode_for_size.
27043 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27045 PR middle-end/83189
27046 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27047 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27050 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27052 PR middle-end/83575
27053 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27054 when in layout mode.
27055 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27056 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27059 2018-01-10 Michael Collison <michael.collison@arm.com>
27061 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27062 * config/aarch64/aarch64-option-extension.def: Add
27063 AARCH64_OPT_EXTENSION of 'fp16fml'.
27064 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27065 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27066 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27067 * config/aarch64/constraints.md (Ui7): New constraint.
27068 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27069 (VFMLA_SEL_W): Ditto.
27072 (VFMLA16_LOW): New int iterator.
27073 (VFMLA16_HIGH): Ditto.
27074 (UNSPEC_FMLAL): New unspec.
27075 (UNSPEC_FMLSL): Ditto.
27076 (UNSPEC_FMLAL2): Ditto.
27077 (UNSPEC_FMLSL2): Ditto.
27078 (f16mac): New code attribute.
27079 * config/aarch64/aarch64-simd-builtins.def
27080 (aarch64_fmlal_lowv2sf): Ditto.
27081 (aarch64_fmlsl_lowv2sf): Ditto.
27082 (aarch64_fmlalq_lowv4sf): Ditto.
27083 (aarch64_fmlslq_lowv4sf): Ditto.
27084 (aarch64_fmlal_highv2sf): Ditto.
27085 (aarch64_fmlsl_highv2sf): Ditto.
27086 (aarch64_fmlalq_highv4sf): Ditto.
27087 (aarch64_fmlslq_highv4sf): Ditto.
27088 (aarch64_fmlal_lane_lowv2sf): Ditto.
27089 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27090 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27091 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27092 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27093 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27094 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27095 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27096 (aarch64_fmlal_lane_highv2sf): Ditto.
27097 (aarch64_fmlsl_lane_highv2sf): Ditto.
27098 (aarch64_fmlal_laneq_highv2sf): Ditto.
27099 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27100 (aarch64_fmlalq_lane_highv4sf): Ditto.
27101 (aarch64_fmlsl_lane_highv4sf): Ditto.
27102 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27103 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27104 * config/aarch64/aarch64-simd.md:
27105 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27106 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27107 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27108 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27109 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27110 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27111 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27112 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27113 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27114 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27115 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27116 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27117 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27118 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27119 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27120 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27121 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27122 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27123 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27124 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27125 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27126 (vfmlsl_low_u32): Ditto.
27127 (vfmlalq_low_u32): Ditto.
27128 (vfmlslq_low_u32): Ditto.
27129 (vfmlal_high_u32): Ditto.
27130 (vfmlsl_high_u32): Ditto.
27131 (vfmlalq_high_u32): Ditto.
27132 (vfmlslq_high_u32): Ditto.
27133 (vfmlal_lane_low_u32): Ditto.
27134 (vfmlsl_lane_low_u32): Ditto.
27135 (vfmlal_laneq_low_u32): Ditto.
27136 (vfmlsl_laneq_low_u32): Ditto.
27137 (vfmlalq_lane_low_u32): Ditto.
27138 (vfmlslq_lane_low_u32): Ditto.
27139 (vfmlalq_laneq_low_u32): Ditto.
27140 (vfmlslq_laneq_low_u32): Ditto.
27141 (vfmlal_lane_high_u32): Ditto.
27142 (vfmlsl_lane_high_u32): Ditto.
27143 (vfmlal_laneq_high_u32): Ditto.
27144 (vfmlsl_laneq_high_u32): Ditto.
27145 (vfmlalq_lane_high_u32): Ditto.
27146 (vfmlslq_lane_high_u32): Ditto.
27147 (vfmlalq_laneq_high_u32): Ditto.
27148 (vfmlslq_laneq_high_u32): Ditto.
27149 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27150 (AARCH64_FL_FOR_ARCH8_4): New.
27151 (AARCH64_ISA_F16FML): New ISA flag.
27152 (TARGET_F16FML): New feature flag for fp16fml.
27153 (doc/invoke.texi): Document new fp16fml option.
27155 2018-01-10 Michael Collison <michael.collison@arm.com>
27157 * config/aarch64/aarch64-builtins.c:
27158 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27159 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27160 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27161 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27162 (AARCH64_ISA_SHA3): New ISA flag.
27163 (TARGET_SHA3): New feature flag for sha3.
27164 * config/aarch64/iterators.md (sha512_op): New int attribute.
27165 (CRYPTO_SHA512): New int iterator.
27166 (UNSPEC_SHA512H): New unspec.
27167 (UNSPEC_SHA512H2): Ditto.
27168 (UNSPEC_SHA512SU0): Ditto.
27169 (UNSPEC_SHA512SU1): Ditto.
27170 * config/aarch64/aarch64-simd-builtins.def
27171 (aarch64_crypto_sha512hqv2di): New builtin.
27172 (aarch64_crypto_sha512h2qv2di): Ditto.
27173 (aarch64_crypto_sha512su0qv2di): Ditto.
27174 (aarch64_crypto_sha512su1qv2di): Ditto.
27175 (aarch64_eor3qv8hi): Ditto.
27176 (aarch64_rax1qv2di): Ditto.
27177 (aarch64_xarqv2di): Ditto.
27178 (aarch64_bcaxqv8hi): Ditto.
27179 * config/aarch64/aarch64-simd.md:
27180 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27181 (aarch64_crypto_sha512su0qv2di): Ditto.
27182 (aarch64_crypto_sha512su1qv2di): Ditto.
27183 (aarch64_eor3qv8hi): Ditto.
27184 (aarch64_rax1qv2di): Ditto.
27185 (aarch64_xarqv2di): Ditto.
27186 (aarch64_bcaxqv8hi): Ditto.
27187 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27188 (vsha512h2q_u64): Ditto.
27189 (vsha512su0q_u64): Ditto.
27190 (vsha512su1q_u64): Ditto.
27191 (veor3q_u16): Ditto.
27192 (vrax1q_u64): Ditto.
27193 (vxarq_u64): Ditto.
27194 (vbcaxq_u16): Ditto.
27195 * config/arm/types.md (crypto_sha512): New type attribute.
27196 (crypto_sha3): Ditto.
27197 (doc/invoke.texi): Document new sha3 option.
27199 2018-01-10 Michael Collison <michael.collison@arm.com>
27201 * config/aarch64/aarch64-builtins.c:
27202 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27203 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27204 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27205 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27206 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27207 (AARCH64_ISA_SM4): New ISA flag.
27208 (TARGET_SM4): New feature flag for sm4.
27209 * config/aarch64/aarch64-simd-builtins.def
27210 (aarch64_sm3ss1qv4si): Ditto.
27211 (aarch64_sm3tt1aq4si): Ditto.
27212 (aarch64_sm3tt1bq4si): Ditto.
27213 (aarch64_sm3tt2aq4si): Ditto.
27214 (aarch64_sm3tt2bq4si): Ditto.
27215 (aarch64_sm3partw1qv4si): Ditto.
27216 (aarch64_sm3partw2qv4si): Ditto.
27217 (aarch64_sm4eqv4si): Ditto.
27218 (aarch64_sm4ekeyqv4si): Ditto.
27219 * config/aarch64/aarch64-simd.md:
27220 (aarch64_sm3ss1qv4si): Ditto.
27221 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27222 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27223 (aarch64_sm4eqv4si): Ditto.
27224 (aarch64_sm4ekeyqv4si): Ditto.
27225 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27226 (sm3part_op): Ditto.
27227 (CRYPTO_SM3TT): Ditto.
27228 (CRYPTO_SM3PART): Ditto.
27229 (UNSPEC_SM3SS1): New unspec.
27230 (UNSPEC_SM3TT1A): Ditto.
27231 (UNSPEC_SM3TT1B): Ditto.
27232 (UNSPEC_SM3TT2A): Ditto.
27233 (UNSPEC_SM3TT2B): Ditto.
27234 (UNSPEC_SM3PARTW1): Ditto.
27235 (UNSPEC_SM3PARTW2): Ditto.
27236 (UNSPEC_SM4E): Ditto.
27237 (UNSPEC_SM4EKEY): Ditto.
27238 * config/aarch64/constraints.md (Ui2): New constraint.
27239 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27240 * config/arm/types.md (crypto_sm3): New type attribute.
27241 (crypto_sm4): Ditto.
27242 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27243 (vsm3tt1aq_u32): Ditto.
27244 (vsm3tt1bq_u32): Ditto.
27245 (vsm3tt2aq_u32): Ditto.
27246 (vsm3tt2bq_u32): Ditto.
27247 (vsm3partw1q_u32): Ditto.
27248 (vsm3partw2q_u32): Ditto.
27249 (vsm4eq_u32): Ditto.
27250 (vsm4ekeyq_u32): Ditto.
27251 (doc/invoke.texi): Document new sm4 option.
27253 2018-01-10 Michael Collison <michael.collison@arm.com>
27255 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27256 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27257 (AARCH64_FL_FOR_ARCH8_4): New.
27258 (AARCH64_FL_V8_4): New flag.
27259 (doc/invoke.texi): Document new armv8.4-a option.
27261 2018-01-10 Michael Collison <michael.collison@arm.com>
27263 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27264 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27265 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27266 * config/aarch64/aarch64-option-extension.def: Add
27267 AARCH64_OPT_EXTENSION of 'sha2'.
27268 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27269 (crypto): Disable sha2 and aes if crypto disabled.
27270 (crypto): Enable aes and sha2 if enabled.
27271 (simd): Disable sha2 and aes if simd disabled.
27272 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27274 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27275 (TARGET_SHA2): New feature flag for sha2.
27276 (TARGET_AES): New feature flag for aes.
27277 * config/aarch64/aarch64-simd.md:
27278 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27279 conditional on TARGET_AES.
27280 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27281 (aarch64_crypto_sha1hsi): Make pattern conditional
27283 (aarch64_crypto_sha1hv4si): Ditto.
27284 (aarch64_be_crypto_sha1hv4si): Ditto.
27285 (aarch64_crypto_sha1su1v4si): Ditto.
27286 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27287 (aarch64_crypto_sha1su0v4si): Ditto.
27288 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27289 (aarch64_crypto_sha256su0v4si): Ditto.
27290 (aarch64_crypto_sha256su1v4si): Ditto.
27291 (doc/invoke.texi): Document new aes and sha2 options.
27293 2018-01-10 Martin Sebor <msebor@redhat.com>
27295 PR tree-optimization/83781
27296 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27299 2018-01-11 Martin Sebor <msebor@gmail.com>
27300 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27302 PR tree-optimization/83501
27303 PR tree-optimization/81703
27305 * tree-ssa-strlen.c (get_string_cst): Rename...
27306 (get_string_len): ...to this. Handle global constants.
27307 (handle_char_store): Adjust.
27309 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27310 Jim Wilson <jimw@sifive.com>
27312 * config/riscv/riscv-protos.h (riscv_output_return): New.
27313 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27314 (riscv_attribute_table, riscv_output_return),
27315 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27316 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27317 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27319 (riscv_expand_prologue): Add early return for naked function.
27320 (riscv_expand_epilogue): Likewise.
27321 (riscv_function_ok_for_sibcall): Return false for naked function.
27322 (riscv_set_current_function): New.
27323 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27324 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27325 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27326 * doc/extend.texi (RISC-V Function Attributes): New.
27328 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27330 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27331 check for 128-bit long double before checking TCmode.
27332 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27333 128-bit long doubles before checking TFmode or TCmode.
27334 (FLOAT128_IBM_P): Likewise.
27336 2018-01-10 Martin Sebor <msebor@redhat.com>
27338 PR tree-optimization/83671
27339 * builtins.c (c_strlen): Unconditionally return zero for the empty
27341 Use -Warray-bounds for warnings.
27342 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27343 for non-constant array indices with COMPONENT_REF, arrays of
27344 arrays, and pointers to arrays.
27345 (gimple_fold_builtin_strlen): Determine and set length range for
27346 non-constant character arrays.
27348 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27350 PR middle-end/81897
27351 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27354 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27356 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27358 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27361 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27362 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27363 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27364 indexed_or_indirect_operand predicate.
27365 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27366 (*vsx_le_perm_load_v8hi): Likewise.
27367 (*vsx_le_perm_load_v16qi): Likewise.
27368 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27369 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27370 (*vsx_le_perm_store_v8hi): Likewise.
27371 (*vsx_le_perm_store_v16qi): Likewise.
27372 (eight unnamed splitters): Likewise.
27374 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27376 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27377 * config/rs6000/emmintrin.h: Likewise.
27378 * config/rs6000/mmintrin.h: Likewise.
27379 * config/rs6000/xmmintrin.h: Likewise.
27381 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27384 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27386 * tree.c (tree_nop_conversion): Return true for location wrapper
27388 (maybe_wrap_with_location): New function.
27389 (selftest::check_strip_nops): New function.
27390 (selftest::test_location_wrappers): New function.
27391 (selftest::tree_c_tests): Call it.
27392 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27393 (maybe_wrap_with_location): New decl.
27394 (EXPR_LOCATION_WRAPPER_P): New macro.
27395 (location_wrapper_p): New inline function.
27396 (tree_strip_any_location_wrapper): New inline function.
27398 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27401 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27402 stack_realign_offset for the largest alignment of stack slot
27404 (ix86_find_max_used_stack_alignment): New function.
27405 (ix86_finalize_stack_frame_flags): Use it. Set
27406 max_used_stack_alignment if we don't realign stack.
27407 * config/i386/i386.h (machine_function): Add
27408 max_used_stack_alignment.
27410 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27412 * config/arm/arm.opt (-mbranch-cost): New option.
27413 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27416 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27419 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27420 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27422 2018-01-10 Richard Biener <rguenther@suse.de>
27425 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27426 early out so it also covers the case where we have a non-NULL
27429 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27431 PR tree-optimization/83753
27432 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27433 for non-strided grouped accesses if the number of elements is 1.
27435 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27438 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27439 * i386.h (TARGET_USE_GATHER): Define.
27440 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27442 2018-01-10 Martin Liska <mliska@suse.cz>
27445 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27446 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27448 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27449 CLEANUP_NO_PARTITIONING is not set.
27451 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27453 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27454 for vectors, as a partial revert of r254296.
27455 * rtl.h (const_vec_p): Delete.
27456 (const_vec_duplicate_p): Don't test for vector CONSTs.
27457 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27458 * expmed.c (make_tree): Likewise.
27461 * common.md (E, F): Use CONSTANT_P instead of checking for
27463 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27464 checking for CONST_VECTOR.
27466 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27468 PR middle-end/83575
27469 * predict.c (force_edge_cold): Handle in more sane way edges
27470 with no prediction.
27472 2018-01-09 Carl Love <cel@us.ibm.com>
27474 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27476 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27477 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27478 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27479 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27480 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27481 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27482 * config/rs6000/rs6000-protos.h: Add extern defition for
27483 rs6000_generate_float2_double_code.
27484 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27486 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27487 (float2_v2df): Add define_expand.
27489 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27492 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27493 op_mode in the force_to_mode call.
27495 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27497 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27498 instead of checking each element individually.
27499 (aarch64_evpc_uzp): Likewise.
27500 (aarch64_evpc_zip): Likewise.
27501 (aarch64_evpc_ext): Likewise.
27502 (aarch64_evpc_rev): Likewise.
27503 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27504 instead of checking each element individually. Return true without
27506 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27507 whether all selected elements come from the same input, instead of
27508 checking each element individually. Remove calls to gen_rtx_REG,
27509 start_sequence and end_sequence and instead assert that no rtl is
27512 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27514 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27515 order of HIGH and CONST checks.
27517 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27519 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27520 if the destination isn't an SSA_NAME.
27522 2018-01-09 Richard Biener <rguenther@suse.de>
27524 PR tree-optimization/83668
27525 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27527 (canonicalize_loop_form): ... here, renamed from ...
27528 (canonicalize_loop_closed_ssa_form): ... this and amended to
27529 swap successor edges for loop exit blocks to make us use
27530 the RPO order we need for initial schedule generation.
27532 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27534 PR tree-optimization/64811
27535 * match.pd: When optimizing comparisons with Inf, avoid
27536 introducing or losing exceptions from comparisons with NaN.
27538 2018-01-09 Martin Liska <mliska@suse.cz>
27541 * asan.c (shadow_mem_size): Add gcc_assert.
27543 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27545 Don't save registers in main().
27548 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27549 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27550 * config/avr/avr.c (avr_set_current_function): Don't error if
27551 naked, OS_task or OS_main are specified at the same time.
27552 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27554 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27556 * common/config/avr/avr-common.c (avr_option_optimization_table):
27557 Switch on -mmain-is-OS_task for optimizing compilations.
27559 2018-01-09 Richard Biener <rguenther@suse.de>
27561 PR tree-optimization/83572
27562 * graphite.c: Include cfganal.h.
27563 (graphite_transform_loops): Connect infinite loops to exit
27564 and remove fake edges at the end.
27566 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27568 * ipa-inline.c (edge_badness): Revert accidental checkin.
27570 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27573 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27574 symbols; not inline clones.
27576 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27579 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27580 hard registers. Formatting fixes.
27582 PR preprocessor/83722
27583 * gcc.c (try_generate_repro): Pass
27584 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27585 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27588 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27589 Kito Cheng <kito.cheng@gmail.com>
27591 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27592 (riscv_leaf_function_p): Delete.
27593 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27595 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27597 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27599 (do_ifelse): New function.
27600 (do_isel): New function.
27601 (do_sub3): New function.
27602 (do_add3): New function.
27603 (do_load_mask_compare): New function.
27604 (do_overlap_load_compare): New function.
27605 (expand_compare_loop): New function.
27606 (expand_block_compare): Call expand_compare_loop() when appropriate.
27607 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27608 option description.
27609 (-mblock-compare-inline-loop-limit): New option.
27611 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27614 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27615 Reverse order of second and third operands in first alternative.
27616 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27617 of first and second elements in UNSPEC_VPERMR vector.
27618 (altivec_expand_vec_perm_le): Likewise.
27620 2018-01-08 Jeff Law <law@redhat.com>
27622 PR rtl-optimizatin/81308
27623 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27624 (process_switch): If group_case_labels makes a change, then set
27626 (pass_convert_switch::execute): If a switch is converted, then
27627 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27629 PR rtl-optimization/81308
27630 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27633 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27635 PR target/83663 - Revert r255946
27636 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27637 generation for cases where splatting a value is not useful.
27638 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27639 across a vec_duplicate and a paradoxical subreg forming a vector
27640 mode to a vec_concat.
27642 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27644 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27645 -march=armv8.3-a variants.
27646 * config/arm/t-multilib: Likewise.
27647 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27649 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27651 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27653 (cceq_ior_compare_complement): Give it a name so I can use it, and
27654 change boolean_or_operator predicate to boolean_operator so it can
27655 be used to generate a crand.
27656 (eqne): New code iterator.
27657 (bd/bd_neg): New code_attrs.
27658 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27659 a single define_insn.
27660 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27661 decrement (bdnzt/bdnzf/bdzt/bdzf).
27662 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27663 with the new names of the branch decrement patterns, and added the
27664 names of the branch decrement conditional patterns.
27666 2018-01-08 Richard Biener <rguenther@suse.de>
27668 PR tree-optimization/83563
27669 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27672 2018-01-08 Richard Biener <rguenther@suse.de>
27674 PR middle-end/83713
27675 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27677 2018-01-08 Richard Biener <rguenther@suse.de>
27679 PR tree-optimization/83685
27680 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27681 references to abnormals.
27683 2018-01-08 Richard Biener <rguenther@suse.de>
27686 * dwarf2out.c (output_indirect_strings): Handle empty
27687 skeleton_debug_str_hash.
27688 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27690 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27692 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27693 (emit_store_direct): Likewise.
27694 (arc_trampoline_adjust_address): Likewise.
27695 (arc_asm_trampoline_template): New function.
27696 (arc_initialize_trampoline): Use asm_trampoline_template.
27697 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27698 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27699 * config/arc/arc.md (flush_icache): Delete pattern.
27701 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27703 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27704 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27707 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27710 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27711 by not USED_FOR_TARGET.
27712 (make_pass_resolve_sw_modes): Likewise.
27714 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27716 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27719 2018-01-08 Richard Biener <rguenther@suse.de>
27721 PR middle-end/83580
27722 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27724 2018-01-08 Richard Biener <rguenther@suse.de>
27726 PR middle-end/83517
27727 * match.pd ((t * 2) / 2) -> t): Add missing :c.
27729 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
27731 PR middle-end/81897
27732 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27733 basic blocks with a small number of successors.
27734 (convert_control_dep_chain_into_preds): Improve handling of
27736 (dump_predicates): Split apart into...
27737 (dump_pred_chain): ...here...
27738 (dump_pred_info): ...and here.
27739 (can_one_predicate_be_invalidated_p): Add debugging printfs.
27740 (can_chain_union_be_invalidated_p): Improve check for invalidation
27742 (uninit_uses_cannot_happen): Avoid unnecessary if
27743 convert_control_dep_chain_into_preds yielded nothing.
27745 2018-01-06 Martin Sebor <msebor@redhat.com>
27747 PR tree-optimization/83640
27748 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27749 subtracting negative offset from size.
27750 (builtin_access::overlap): Adjust offset bounds of the access to fall
27751 within the size of the object if possible.
27753 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
27755 PR rtl-optimization/83699
27756 * expmed.c (extract_bit_field_1): Restrict the vector usage of
27757 extract_bit_field_as_subreg to cases in which the extracted
27758 value is also a vector.
27760 * lra-constraints.c (process_alt_operands): Test for the equivalence
27761 substitutions when detecting a possible reload cycle.
27763 2018-01-06 Jakub Jelinek <jakub@redhat.com>
27766 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27767 by default if flag_selective_schedling{,2}. Formatting fixes.
27769 PR rtl-optimization/83682
27770 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27771 if it has non-VECTOR_MODE element mode.
27772 (vec_duplicate_p): Likewise.
27774 PR middle-end/83694
27775 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27776 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27778 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27781 * config/i386/i386-builtin.def
27782 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27783 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27784 Require also OPTION_MASK_ISA_AVX512F in addition to
27785 OPTION_MASK_ISA_GFNI.
27786 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27787 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27788 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27789 to OPTION_MASK_ISA_GFNI.
27790 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27791 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27792 OPTION_MASK_ISA_AVX512BW.
27793 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27794 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27795 addition to OPTION_MASK_ISA_GFNI.
27796 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27797 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27798 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27799 to OPTION_MASK_ISA_GFNI.
27800 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27801 a requirement for all ISAs rather than any of them with a few
27803 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27805 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27806 bitmasks to be enabled with 3 exceptions, instead of requiring any
27807 enabled ISA with lots of exceptions.
27808 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27809 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27810 Change avx512bw in isa attribute to avx512f.
27811 * config/i386/sgxintrin.h: Add license boilerplate.
27812 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
27813 to __AVX512F__ and __AVX512VL to __AVX512VL__.
27814 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27815 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27817 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27818 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27819 temporarily sse2 rather than sse if not enabled already.
27822 * config/i386/sse.md (VI248_VLBW): Rename to ...
27823 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
27824 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27825 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27826 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27827 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27828 mode iterator instead of VI248_VLBW.
27830 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
27832 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27833 (record_modified): Skip clobbers; add debug output.
27834 (param_change_prob): Use sreal frequencies.
27836 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27838 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27839 punt for user-aligned variables.
27841 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
27843 * tree-chrec.c (chrec_contains_symbols): Return true for
27846 2018-01-05 Sudakshina Das <sudi.das@arm.com>
27849 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27850 of (x|y) == x for BICS pattern.
27852 2018-01-05 Jakub Jelinek <jakub@redhat.com>
27854 PR tree-optimization/83605
27855 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27856 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27859 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
27861 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27862 * config/epiphany/rtems.h: New file.
27864 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27865 Uros Bizjak <ubizjak@gmail.com>
27868 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27869 QIreg_operand instead of register_operand predicate.
27870 * config/i386/i386.c (ix86_rop_should_change_byte_p,
27871 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27872 comments instead of -fmitigate[-_]rop.
27874 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27877 * cgraphunit.c (symbol_table::compile): Switch to text_section
27878 before calling assembly_start debug hook.
27879 * run-rtl-passes.c (run_rtl_passes): Likewise.
27882 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27884 * tree-vrp.c (extract_range_from_binary_expr_1): Check
27885 range_int_cst_p rather than !symbolic_range_p before calling
27886 extract_range_from_multiplicative_op_1.
27888 2018-01-04 Jeff Law <law@redhat.com>
27890 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27891 redundant test in assertion.
27893 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27895 * doc/rtl.texi: Document machine_mode wrapper classes.
27897 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27899 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27900 using tree_to_uhwi.
27902 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27904 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27905 the VEC_PERM_EXPR fold to fail.
27907 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27910 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27911 to switched_sections.
27913 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27916 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27917 test for d.testing.
27919 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
27922 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27923 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27925 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27928 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27929 is BLKmode and bitpos not zero or mode change is needed.
27931 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
27934 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27937 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
27940 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27941 instead of MULT rtx. Update all corresponding splitters.
27942 (*saddl_se): Ditto.
27943 (*ssub<modesuffix>): Ditto.
27944 (*ssubl_se): Ditto.
27945 (*cmp_sadd_di): Update split patterns.
27946 (*cmp_sadd_si): Ditto.
27947 (*cmp_sadd_sidi): Ditto.
27948 (*cmp_ssub_di): Ditto.
27949 (*cmp_ssub_si): Ditto.
27950 (*cmp_ssub_sidi): Ditto.
27951 * config/alpha/predicates.md (const23_operand): New predicate.
27952 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27953 Look for ASHIFT, not MULT inner operand.
27954 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27956 2018-01-04 Martin Liska <mliska@suse.cz>
27958 PR gcov-profile/83669
27959 * gcov.c (output_intermediate_file): Add version to intermediate
27961 * doc/gcov.texi: Document new field 'version' in intermediate
27962 file format. Fix location of '-k' option of gcov command.
27964 2018-01-04 Martin Liska <mliska@suse.cz>
27967 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27969 2018-01-04 Jakub Jelinek <jakub@redhat.com>
27971 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27973 2018-01-03 Martin Sebor <msebor@redhat.com>
27975 PR tree-optimization/83655
27976 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27977 checking calls with invalid arguments.
27979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27981 * tree-vect-stmts.c (vect_get_store_rhs): New function.
27982 (vectorizable_mask_load_store): Delete.
27983 (vectorizable_call): Return false for masked loads and stores.
27984 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
27985 instead of gimple_assign_rhs1.
27986 (vectorizable_load): Handle IFN_MASK_LOAD.
27987 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27991 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27993 (vectorizable_mask_load_store): ...here.
27994 (vectorizable_load): ...and here.
27996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27998 * tree-vect-stmts.c (vect_build_all_ones_mask)
27999 (vect_build_zero_merge_argument): New functions, split out from...
28000 (vectorizable_load): ...here.
28002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28004 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28006 (vectorizable_mask_load_store): ...here.
28007 (vectorizable_store): ...and here.
28009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28011 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28013 (vectorizable_mask_load_store): ...here.
28015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28017 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28018 (vect_model_store_cost): Take a vec_load_store_type instead of a
28020 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28021 (vect_model_store_cost): Take a vec_load_store_type instead of a
28023 (vectorizable_mask_load_store): Update accordingly.
28024 (vectorizable_store): Likewise.
28025 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28029 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28030 IFN_MASK_LOAD calls here rather than...
28031 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28033 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28034 Alan Hayward <alan.hayward@arm.com>
28035 David Sherwood <david.sherwood@arm.com>
28037 * expmed.c (extract_bit_field_1): For vector extracts,
28038 fall back to extract_bit_field_as_subreg if vec_extract
28041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28042 Alan Hayward <alan.hayward@arm.com>
28043 David Sherwood <david.sherwood@arm.com>
28045 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28046 they are variable or constant sized.
28047 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28048 slots for constant-sized data.
28050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28051 Alan Hayward <alan.hayward@arm.com>
28052 David Sherwood <david.sherwood@arm.com>
28054 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28055 handling COND_EXPRs with boolean comparisons, try to find a better
28056 basis for the mask type than the boolean itself.
28058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28060 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28061 is calculated and how it can be overridden.
28062 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28063 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28065 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28069 Alan Hayward <alan.hayward@arm.com>
28070 David Sherwood <david.sherwood@arm.com>
28072 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28073 Remove the mode argument.
28074 (aarch64_simd_valid_immediate): Remove the mode and inverse
28076 * config/aarch64/iterators.md (bitsize): New iterator.
28077 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28078 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28079 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28080 aarch64_simd_valid_immediate.
28081 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28082 (aarch64_reg_or_bic_imm): Likewise.
28083 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28084 with an insn_type enum and msl with a modifier_type enum.
28085 Replace element_width with a scalar_mode. Change the shift
28086 to unsigned int. Add constructors for scalar_float_mode and
28087 scalar_int_mode elements.
28088 (aarch64_vect_float_const_representable_p): Delete.
28089 (aarch64_can_const_movi_rtx_p)
28090 (aarch64_simd_scalar_immediate_valid_for_move)
28091 (aarch64_simd_make_constant): Update call to
28092 aarch64_simd_valid_immediate.
28093 (aarch64_advsimd_valid_immediate_hs): New function.
28094 (aarch64_advsimd_valid_immediate): Likewise.
28095 (aarch64_simd_valid_immediate): Remove mode and inverse
28096 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28097 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28098 and aarch64_float_const_representable_p on the result.
28099 (aarch64_output_simd_mov_immediate): Remove mode argument.
28100 Update call to aarch64_simd_valid_immediate and use of
28101 simd_immediate_info.
28102 (aarch64_output_scalar_simd_mov_immediate): Update call
28105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28106 Alan Hayward <alan.hayward@arm.com>
28107 David Sherwood <david.sherwood@arm.com>
28109 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28110 (mode_nunits): Likewise CONST_MODE_NUNITS.
28111 * machmode.def (ADJUST_NUNITS): Document.
28112 * genmodes.c (mode_data::need_nunits_adj): New field.
28113 (blank_mode): Update accordingly.
28114 (adj_nunits): New variable.
28115 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28117 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28118 listed in adj_nunits.
28119 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28120 listed in adj_nunits. Don't emit case statements for such modes.
28121 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28122 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28123 nothing if adj_nunits is nonnull.
28124 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28125 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28126 (emit_mode_fbit): Update use of print_maybe_const_decl.
28127 (emit_move_size): Likewise. Treat the array as non-const
28129 (emit_mode_adjustments): Handle adj_nunits.
28131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28133 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28134 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28135 (VECTOR_MODES): Use it.
28136 (make_vector_modes): Take the prefix as an argument.
28138 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28139 Alan Hayward <alan.hayward@arm.com>
28140 David Sherwood <david.sherwood@arm.com>
28142 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28143 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28144 for MODE_VECTOR_BOOL.
28145 * machmode.def (VECTOR_BOOL_MODE): Document.
28146 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28147 (make_vector_bool_mode): New function.
28148 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28150 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28151 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28153 * stor-layout.c (int_mode_for_mode): Likewise.
28154 * tree.c (build_vector_type_for_mode): Likewise.
28155 * varasm.c (output_constant_pool_2): Likewise.
28156 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28157 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28158 for MODE_VECTOR_BOOL.
28159 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28160 of mode class checks.
28161 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28162 instead of a list of mode class checks.
28163 (expand_vector_scalar_condition): Likewise.
28164 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28167 Alan Hayward <alan.hayward@arm.com>
28168 David Sherwood <david.sherwood@arm.com>
28170 * machmode.h (mode_size): Change from unsigned short to
28172 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28173 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28174 or if measurement_type is not polynomial.
28175 (fixed_size_mode::includes_p): Check for constant-sized modes.
28176 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28177 return a poly_uint16 rather than an unsigned short.
28178 (emit_mode_size): Change the type of mode_size from unsigned short
28179 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28180 (emit_mode_adjustments): Cope with polynomial vector sizes.
28181 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28183 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28185 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28186 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28187 * caller-save.c (setup_save_areas): Likewise.
28188 (replace_reg_with_saved_mem): Likewise.
28189 * calls.c (emit_library_call_value_1): Likewise.
28190 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28191 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28192 (gen_lowpart_for_combine): Likewise.
28193 * convert.c (convert_to_integer_1): Likewise.
28194 * cse.c (equiv_constant, cse_insn): Likewise.
28195 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28196 (cselib_subst_to_values): Likewise.
28197 * dce.c (word_dce_process_block): Likewise.
28198 * df-problems.c (df_word_lr_mark_ref): Likewise.
28199 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28200 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28201 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28202 (rtl_for_decl_location): Likewise.
28203 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28204 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28205 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28206 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28207 (expand_expr_real_1): Likewise.
28208 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28209 (pad_below): Likewise.
28210 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28211 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28212 * ira.c (get_subreg_tracking_sizes): Likewise.
28213 * ira-build.c (ira_create_allocno_objects): Likewise.
28214 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28215 (ira_sort_regnos_for_alter_reg): Likewise.
28216 * ira-costs.c (record_operand_costs): Likewise.
28217 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28218 (resolve_simple_move): Likewise.
28219 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28220 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28221 (lra_constraints): Likewise.
28222 (CONST_POOL_OK_P): Reject variable-sized modes.
28223 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28224 (add_pseudo_to_slot, lra_spill): Likewise.
28225 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28226 * optabs-query.c (get_best_extraction_insn): Likewise.
28227 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28228 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28229 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28230 * recog.c (offsettable_address_addr_space_p): Likewise.
28231 * regcprop.c (maybe_mode_change): Likewise.
28232 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28233 * regrename.c (build_def_use): Likewise.
28234 * regstat.c (dump_reg_info): Likewise.
28235 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28236 (find_reloads, find_reloads_subreg_address): Likewise.
28237 * reload1.c (eliminate_regs_1): Likewise.
28238 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28239 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28240 (simplify_binary_operation_1, simplify_subreg): Likewise.
28241 * targhooks.c (default_function_arg_padding): Likewise.
28242 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28243 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28244 (verify_gimple_assign_ternary): Likewise.
28245 * tree-inline.c (estimate_move_cost): Likewise.
28246 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28247 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28248 (get_address_cost_ainc): Likewise.
28249 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28250 (vect_supportable_dr_alignment): Likewise.
28251 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28252 (vectorizable_reduction): Likewise.
28253 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28254 (vectorizable_operation, vectorizable_load): Likewise.
28255 * tree.c (build_same_sized_truth_vector_type): Likewise.
28256 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28257 * var-tracking.c (emit_note_insn_var_location): Likewise.
28258 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28259 (ADDR_VEC_ALIGN): Likewise.
28261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28262 Alan Hayward <alan.hayward@arm.com>
28263 David Sherwood <david.sherwood@arm.com>
28265 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28267 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28268 or if measurement_type is polynomial.
28269 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28270 * combine.c (make_extraction): Likewise.
28271 * dse.c (find_shift_sequence): Likewise.
28272 * dwarf2out.c (mem_loc_descriptor): Likewise.
28273 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28274 (extract_bit_field, extract_low_bits): Likewise.
28275 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28276 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28277 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28278 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28279 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28280 * reload.c (find_reloads): Likewise.
28281 * reload1.c (alter_reg): Likewise.
28282 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28283 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28284 * tree-if-conv.c (predicate_mem_writes): Likewise.
28285 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28286 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28287 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28288 * valtrack.c (dead_debug_insert_temp): Likewise.
28289 * varasm.c (mergeable_constant_section): Likewise.
28290 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28293 Alan Hayward <alan.hayward@arm.com>
28294 David Sherwood <david.sherwood@arm.com>
28296 * expr.c (expand_assignment): Cope with polynomial mode sizes
28297 when assigning to a CONCAT.
28299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28300 Alan Hayward <alan.hayward@arm.com>
28301 David Sherwood <david.sherwood@arm.com>
28303 * machmode.h (mode_precision): Change from unsigned short to
28305 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28307 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28308 or if measurement_type is not polynomial.
28309 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28310 in which the mode is already known to be a scalar_int_mode.
28311 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28312 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28314 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28315 for GET_MODE_PRECISION.
28316 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28317 for GET_MODE_PRECISION.
28318 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28320 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28321 (expand_field_assignment, make_extraction): Likewise.
28322 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28323 (get_last_value): Likewise.
28324 * convert.c (convert_to_integer_1): Likewise.
28325 * cse.c (cse_insn): Likewise.
28326 * expr.c (expand_expr_real_1): Likewise.
28327 * lra-constraints.c (simplify_operand_subreg): Likewise.
28328 * optabs-query.c (can_atomic_load_p): Likewise.
28329 * optabs.c (expand_atomic_load): Likewise.
28330 (expand_atomic_store): Likewise.
28331 * ree.c (combine_reaching_defs): Likewise.
28332 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28333 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28334 * tree.h (type_has_mode_precision_p): Likewise.
28335 * ubsan.c (instrument_si_overflow): Likewise.
28337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28338 Alan Hayward <alan.hayward@arm.com>
28339 David Sherwood <david.sherwood@arm.com>
28341 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28342 polynomial numbers of units.
28343 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28344 (valid_vector_subparts_p): New function.
28345 (build_vector_type): Remove temporary shim and take the number
28346 of units as a poly_uint64 rather than an int.
28347 (build_opaque_vector_type): Take the number of units as a
28348 poly_uint64 rather than an int.
28349 * tree.c (build_vector_from_ctor): Handle polynomial
28350 TYPE_VECTOR_SUBPARTS.
28351 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28352 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28353 (build_vector_from_val): If the number of units is variable,
28354 use build_vec_duplicate_cst for constant operands and
28355 VEC_DUPLICATE_EXPR otherwise.
28356 (make_vector_type): Remove temporary is_constant ().
28357 (build_vector_type, build_opaque_vector_type): Take the number of
28358 units as a poly_uint64 rather than an int.
28359 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28361 * cfgexpand.c (expand_debug_expr): Likewise.
28362 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28363 (store_constructor, expand_expr_real_1): Likewise.
28364 (const_scalar_mask_from_tree): Likewise.
28365 * fold-const-call.c (fold_const_reduction): Likewise.
28366 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28367 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28368 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28369 (fold_relational_const): Likewise.
28370 (native_interpret_vector): Likewise. Change the size from an
28371 int to an unsigned int.
28372 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28373 TYPE_VECTOR_SUBPARTS.
28374 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28375 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28376 duplicating a non-constant operand into a variable-length vector.
28377 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28378 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28379 * ipa-icf.c (sem_variable::equals): Likewise.
28380 * match.pd: Likewise.
28381 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28382 * print-tree.c (print_node): Likewise.
28383 * stor-layout.c (layout_type): Likewise.
28384 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28385 * tree-cfg.c (verify_gimple_comparison): Likewise.
28386 (verify_gimple_assign_binary): Likewise.
28387 (verify_gimple_assign_ternary): Likewise.
28388 (verify_gimple_assign_single): Likewise.
28389 * tree-pretty-print.c (dump_generic_node): Likewise.
28390 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28391 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28392 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28393 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28394 (vect_shift_permute_load_chain): Likewise.
28395 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28396 (expand_vector_condition, optimize_vector_constructor): Likewise.
28397 (lower_vec_perm, get_compute_type): Likewise.
28398 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28399 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28400 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28401 (vect_recog_mask_conversion_pattern): Likewise.
28402 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28403 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28404 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28405 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28406 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28407 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28408 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28409 (supportable_widening_operation): Likewise.
28410 (supportable_narrowing_operation): Likewise.
28411 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28413 * varasm.c (output_constant): Likewise.
28415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28416 Alan Hayward <alan.hayward@arm.com>
28417 David Sherwood <david.sherwood@arm.com>
28419 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28420 so that both the length == 3 and length != 3 cases set up their
28421 own permute vectors. Add comments explaining why we know the
28422 number of elements is constant.
28423 (vect_permute_load_chain): Likewise.
28425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28426 Alan Hayward <alan.hayward@arm.com>
28427 David Sherwood <david.sherwood@arm.com>
28429 * machmode.h (mode_nunits): Change from unsigned char to
28431 (ONLY_FIXED_SIZE_MODES): New macro.
28432 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28433 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28434 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28436 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28437 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28438 or if measurement_type is not polynomial.
28439 * genmodes.c (ZERO_COEFFS): New macro.
28440 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28442 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28443 Use ZERO_COEFFS when emitting initializers.
28444 * data-streamer.h (bp_pack_poly_value): New function.
28445 (bp_unpack_poly_value): Likewise.
28446 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28447 for GET_MODE_NUNITS.
28448 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28449 for GET_MODE_NUNITS.
28450 * tree.c (make_vector_type): Remove temporary shim and make
28451 the real function take the number of units as a poly_uint64
28452 rather than an int.
28453 (build_vector_type_for_mode): Handle polynomial nunits.
28454 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28455 * emit-rtl.c (const_vec_series_p_1): Likewise.
28456 (gen_rtx_CONST_VECTOR): Likewise.
28457 * fold-const.c (test_vec_duplicate_folding): Likewise.
28458 * genrecog.c (validate_pattern): Likewise.
28459 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28460 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28461 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28462 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28463 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28464 * rtlanal.c (subreg_get_info): Likewise.
28465 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28466 (vect_grouped_load_supported): Likewise.
28467 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28468 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28469 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28470 (simplify_const_unary_operation, simplify_binary_operation_1)
28471 (simplify_const_binary_operation, simplify_ternary_operation)
28472 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28473 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28474 instead of CONST_VECTOR_NUNITS.
28475 * varasm.c (output_constant_pool_2): Likewise.
28476 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28477 explicit-encoded elements in the XVEC for variable-length vectors.
28479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28481 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28484 Alan Hayward <alan.hayward@arm.com>
28485 David Sherwood <david.sherwood@arm.com>
28487 * coretypes.h (fixed_size_mode): Declare.
28488 (fixed_size_mode_pod): New typedef.
28489 * builtins.h (target_builtins::x_apply_args_mode)
28490 (target_builtins::x_apply_result_mode): Change type to
28491 fixed_size_mode_pod.
28492 * builtins.c (apply_args_size, apply_result_size, result_vector)
28493 (expand_builtin_apply_args_1, expand_builtin_apply)
28494 (expand_builtin_return): Update accordingly.
28496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28498 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28499 * cselib.c (cselib_hash_rtx): Likewise.
28500 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28501 CONST_VECTOR encoding.
28503 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28504 Jeff Law <law@redhat.com>
28507 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28508 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28509 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28510 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28513 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28514 explicitly probe *sp in a noreturn function if there were any callee
28515 register saves or frame pointer is needed.
28517 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28520 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28521 BLKmode for ternary, binary or unary expressions.
28524 * var-tracking.c (delete_vta_debug_insn): New inline function.
28525 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28526 insns from get_insns () to NULL instead of each bb separately.
28527 Use delete_vta_debug_insn. No longer static.
28528 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28529 delete_vta_debug_insns callers.
28530 * rtl.h (delete_vta_debug_insns): Declare.
28531 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28532 instead of variable_tracking_main.
28534 2018-01-03 Martin Sebor <msebor@redhat.com>
28536 PR tree-optimization/83603
28537 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28538 arguments past the endof the argument list in functions declared
28539 without a prototype.
28540 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28541 Avoid checking when arguments are null.
28543 2018-01-03 Martin Sebor <msebor@redhat.com>
28546 * doc/extend.texi (attribute const): Fix a typo.
28547 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28548 issuing -Wsuggest-attribute for void functions.
28550 2018-01-03 Martin Sebor <msebor@redhat.com>
28552 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28553 offset_int::from instead of wide_int::to_shwi.
28554 (maybe_diag_overlap): Remove assertion.
28555 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28556 * gimple-ssa-sprintf.c (format_directive): Same.
28557 (parse_directive): Same.
28558 (sprintf_dom_walker::compute_format_length): Same.
28559 (try_substitute_return_value): Same.
28561 2018-01-03 Jeff Law <law@redhat.com>
28563 PR middle-end/83654
28564 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28565 non-constant residual for zero at runtime and avoid probing in
28566 that case. Reorganize code for trailing problem to mirror handling
28569 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28571 PR tree-optimization/83501
28572 * tree-ssa-strlen.c (get_string_cst): New.
28573 (handle_char_store): Call get_string_cst.
28575 2018-01-03 Martin Liska <mliska@suse.cz>
28577 PR tree-optimization/83593
28578 * tree-ssa-strlen.c: Include tree-cfg.h.
28579 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28580 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28581 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28583 (strlen_dom_walker::before_dom_children): Call
28584 gimple_purge_dead_eh_edges. Dump tranformation with details
28586 (strlen_dom_walker::before_dom_children): Update call by adding
28587 new argument cleanup_eh.
28588 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28590 2018-01-03 Martin Liska <mliska@suse.cz>
28593 * cif-code.def (VARIADIC_THUNK): New enum value.
28594 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28597 2018-01-03 Jan Beulich <jbeulich@suse.com>
28599 * sse.md (mov<mode>_internal): Tighten condition for when to use
28600 vmovdqu<ssescalarsize> for TI and OI modes.
28602 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28604 Update copyright years.
28606 2018-01-03 Martin Liska <mliska@suse.cz>
28609 * ipa-visibility.c (function_and_variable_visibility): Skip
28610 functions with noipa attribure.
28612 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28614 * gcc.c (process_command): Update copyright notice dates.
28615 * gcov-dump.c (print_version): Ditto.
28616 * gcov.c (print_version): Ditto.
28617 * gcov-tool.c (print_version): Ditto.
28618 * gengtype.c (create_file): Ditto.
28619 * doc/cpp.texi: Bump @copying's copyright year.
28620 * doc/cppinternals.texi: Ditto.
28621 * doc/gcc.texi: Ditto.
28622 * doc/gccint.texi: Ditto.
28623 * doc/gcov.texi: Ditto.
28624 * doc/install.texi: Ditto.
28625 * doc/invoke.texi: Ditto.
28627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28629 * vector-builder.h (vector_builder::m_full_nelts): Change from
28630 unsigned int to poly_uint64.
28631 (vector_builder::full_nelts): Update prototype accordingly.
28632 (vector_builder::new_vector): Likewise.
28633 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28634 (vector_builder::operator ==): Likewise.
28635 (vector_builder::finalize): Likewise.
28636 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28637 Take the number of elements as a poly_uint64 rather than an
28639 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28640 from unsigned int to poly_uint64.
28641 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28642 (vec_perm_indices::new_vector): Likewise.
28643 (vec_perm_indices::length): Likewise.
28644 (vec_perm_indices::nelts_per_input): Likewise.
28645 (vec_perm_indices::input_nelts): Likewise.
28646 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28647 number of elements per input as a poly_uint64 rather than an
28648 unsigned int. Use the original encoding for variable-length
28649 vectors, rather than clamping each individual element.
28650 For the second and subsequent elements in each pattern,
28651 clamp the step and base before clamping their sum.
28652 (vec_perm_indices::series_p): Handle polynomial element counts.
28653 (vec_perm_indices::all_in_range_p): Likewise.
28654 (vec_perm_indices_to_tree): Likewise.
28655 (vec_perm_indices_to_rtx): Likewise.
28656 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28657 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28658 (tree_vector_builder::new_binary_operation): Handle polynomial
28659 element counts. Return false if we need to know the number
28660 of elements at compile time.
28661 * fold-const.c (fold_vec_perm): Punt if the number of elements
28662 isn't known at compile time.
28664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28666 * vec-perm-indices.h (vec_perm_builder): Change element type
28667 from HOST_WIDE_INT to poly_int64.
28668 (vec_perm_indices::element_type): Update accordingly.
28669 (vec_perm_indices::clamp): Handle polynomial element_types.
28670 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28671 (vec_perm_indices::all_in_range_p): Likewise.
28672 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28674 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28675 polynomial vec_perm_indices element types.
28676 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28677 * fold-const.c (fold_vec_perm): Likewise.
28678 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28679 * tree-vect-generic.c (lower_vec_perm): Likewise.
28680 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28681 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28682 element type to HOST_WIDE_INT.
28684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28685 Alan Hayward <alan.hayward@arm.com>
28686 David Sherwood <david.sherwood@arm.com>
28688 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28689 rather than an int. Use plus_constant.
28690 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28691 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28694 Alan Hayward <alan.hayward@arm.com>
28695 David Sherwood <david.sherwood@arm.com>
28697 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28698 a HOST_WIDE_INT to a poly_int64.
28700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28701 Alan Hayward <alan.hayward@arm.com>
28702 David Sherwood <david.sherwood@arm.com>
28704 * calls.c (load_register_parameters): Cope with polynomial
28705 mode sizes. Require a constant size for BLKmode parameters
28706 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28707 forces a parameter to be padded at the lsb end in order to
28708 fill a complete number of words, require the parameter size
28709 to be ordered wrt UNITS_PER_WORD.
28711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28712 Alan Hayward <alan.hayward@arm.com>
28713 David Sherwood <david.sherwood@arm.com>
28715 * reload1.c (spill_stack_slot_width): Change element type
28716 from unsigned int to poly_uint64_pod.
28717 (alter_reg): Treat mode sizes as polynomial.
28719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28720 Alan Hayward <alan.hayward@arm.com>
28721 David Sherwood <david.sherwood@arm.com>
28723 * reload.c (complex_word_subreg_p): New function.
28724 (reload_inner_reg_of_subreg, push_reload): Use it.
28726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28727 Alan Hayward <alan.hayward@arm.com>
28728 David Sherwood <david.sherwood@arm.com>
28730 * lra-constraints.c (process_alt_operands): Reject matched
28731 operands whose sizes aren't ordered.
28732 (match_reload): Refer to this check here.
28734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28735 Alan Hayward <alan.hayward@arm.com>
28736 David Sherwood <david.sherwood@arm.com>
28738 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28739 that the mode size is in the set {1, 2, 4, 8, 16}.
28741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28742 Alan Hayward <alan.hayward@arm.com>
28743 David Sherwood <david.sherwood@arm.com>
28745 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28746 Use plus_constant instead of gen_rtx_PLUS.
28748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28749 Alan Hayward <alan.hayward@arm.com>
28750 David Sherwood <david.sherwood@arm.com>
28752 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28753 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28754 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28755 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28756 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28757 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28758 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28759 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28760 * config/i386/i386.c (ix86_push_rounding): ...this new function.
28761 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28763 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28764 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28765 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28766 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28767 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28768 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28769 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28770 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28771 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28772 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28774 * expr.c (emit_move_resolve_push): Treat the input and result
28775 of PUSH_ROUNDING as a poly_int64.
28776 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28777 (emit_push_insn): Likewise.
28778 * lra-eliminations.c (mark_not_eliminable): Likewise.
28779 * recog.c (push_operand): Likewise.
28780 * reload1.c (elimination_effects): Likewise.
28781 * rtlanal.c (nonzero_bits1): Likewise.
28782 * calls.c (store_one_arg): Likewise. Require the padding to be
28783 known at compile time.
28785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28786 Alan Hayward <alan.hayward@arm.com>
28787 David Sherwood <david.sherwood@arm.com>
28789 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28790 Use plus_constant instead of gen_rtx_PLUS.
28792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28793 Alan Hayward <alan.hayward@arm.com>
28794 David Sherwood <david.sherwood@arm.com>
28796 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28797 rather than an int.
28799 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28800 Alan Hayward <alan.hayward@arm.com>
28801 David Sherwood <david.sherwood@arm.com>
28803 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28804 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28805 via stack temporaries. Treat the mode size as polynomial too.
28807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28808 Alan Hayward <alan.hayward@arm.com>
28809 David Sherwood <david.sherwood@arm.com>
28811 * expr.c (expand_expr_real_2): When handling conversions involving
28812 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28813 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
28814 as a poly_uint64 too.
28816 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28817 Alan Hayward <alan.hayward@arm.com>
28818 David Sherwood <david.sherwood@arm.com>
28820 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
28827 REGMODE_NATURAL_SIZE.
28828 * expmed.c (store_bit_field_1): Likewise.
28829 * expr.c (store_constructor): Likewise.
28830 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28831 and polynomial REGMODE_NATURAL_SIZE.
28832 (gen_lowpart_common): Likewise.
28833 * reginfo.c (record_subregs_of_mode): Likewise.
28834 * rtlanal.c (read_modify_subreg_p): Likewise.
28836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28837 Alan Hayward <alan.hayward@arm.com>
28838 David Sherwood <david.sherwood@arm.com>
28840 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28841 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
28849 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28850 Alan Hayward <alan.hayward@arm.com>
28851 David Sherwood <david.sherwood@arm.com>
28853 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28854 in a POINTER_PLUS_EXPR.
28856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28857 Alan Hayward <alan.hayward@arm.com>
28858 David Sherwood <david.sherwood@arm.com>
28860 * omp-simd-clone.c (simd_clone_subparts): New function.
28861 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28862 (ipa_simd_modify_function_body): Likewise.
28864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28865 Alan Hayward <alan.hayward@arm.com>
28866 David Sherwood <david.sherwood@arm.com>
28868 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28869 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28870 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28871 (expand_vector_condition, vector_element): Likewise.
28872 (subparts_gt): New function.
28873 (get_compute_type): Use subparts_gt.
28874 (count_type_subparts): Delete.
28875 (expand_vector_operations_1): Use subparts_gt instead of
28876 count_type_subparts.
28878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28879 Alan Hayward <alan.hayward@arm.com>
28880 David Sherwood <david.sherwood@arm.com>
28882 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28883 (vect_compile_time_alias): ...this new function. Do the calculation
28884 on poly_ints rather than trees.
28885 (vect_prune_runtime_alias_test_list): Update call accordingly.
28887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28888 Alan Hayward <alan.hayward@arm.com>
28889 David Sherwood <david.sherwood@arm.com>
28891 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28893 (vect_schedule_slp_instance): Likewise.
28895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28896 Alan Hayward <alan.hayward@arm.com>
28897 David Sherwood <david.sherwood@arm.com>
28899 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28900 constant and extern definitions for variable-length vectors.
28901 (vect_get_constant_vectors): Note that the number of units
28902 is known to be constant.
28904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28905 Alan Hayward <alan.hayward@arm.com>
28906 David Sherwood <david.sherwood@arm.com>
28908 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28909 of units as polynomial. Choose between WIDE and NARROW based
28912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28913 Alan Hayward <alan.hayward@arm.com>
28914 David Sherwood <david.sherwood@arm.com>
28916 * tree-vect-stmts.c (simd_clone_subparts): New function.
28917 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28920 Alan Hayward <alan.hayward@arm.com>
28921 David Sherwood <david.sherwood@arm.com>
28923 * tree-vect-stmts.c (vectorizable_call): Treat the number of
28924 vectors as polynomial. Use build_index_vector for
28925 IFN_GOMP_SIMD_LANE.
28927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28928 Alan Hayward <alan.hayward@arm.com>
28929 David Sherwood <david.sherwood@arm.com>
28931 * tree-vect-stmts.c (get_load_store_type): Treat the number of
28932 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28933 for variable-length vectors.
28934 (vectorizable_mask_load_store): Treat the number of units as
28935 polynomial, asserting that it is constant if the condition has
28936 already been enforced.
28937 (vectorizable_store, vectorizable_load): Likewise.
28939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28940 Alan Hayward <alan.hayward@arm.com>
28941 David Sherwood <david.sherwood@arm.com>
28943 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28944 of units as polynomial. Punt if we can't tell at compile time
28945 which vector contains the final result.
28947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28948 Alan Hayward <alan.hayward@arm.com>
28949 David Sherwood <david.sherwood@arm.com>
28951 * tree-vect-loop.c (vectorizable_induction): Treat the number
28952 of units as polynomial. Punt on SLP inductions. Use an integer
28953 VEC_SERIES_EXPR for variable-length integer reductions. Use a
28954 cast of such a series for variable-length floating-point
28957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28958 Alan Hayward <alan.hayward@arm.com>
28959 David Sherwood <david.sherwood@arm.com>
28961 * tree.h (build_index_vector): Declare.
28962 * tree.c (build_index_vector): New function.
28963 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28964 of units as polynomial, forcibly converting it to a constant if
28965 vectorizable_reduction has already enforced the condition.
28966 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
28967 to create a {1,2,3,...} vector.
28968 (vectorizable_reduction): Treat the number of units as polynomial.
28969 Choose vectype_in based on the largest scalar element size rather
28970 than the smallest number of units. Enforce the restrictions
28973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28974 Alan Hayward <alan.hayward@arm.com>
28975 David Sherwood <david.sherwood@arm.com>
28977 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28978 number of units as polynomial.
28980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28981 Alan Hayward <alan.hayward@arm.com>
28982 David Sherwood <david.sherwood@arm.com>
28984 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28985 * target.def (autovectorize_vector_sizes): Return the vector sizes
28986 by pointer, using vector_sizes rather than a bitmask.
28987 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28988 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28989 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28991 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28992 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28993 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28994 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28995 * omp-general.c (omp_max_vf): Likewise.
28996 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28997 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28998 * tree-vect-loop.c (vect_analyze_loop): Likewise.
28999 * tree-vect-slp.c (vect_slp_bb): Likewise.
29000 * doc/tm.texi: Regenerate.
29001 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29003 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29004 the vector size as a poly_uint64 rather than an unsigned int.
29005 (current_vector_size): Change from an unsigned int to a poly_uint64.
29006 (get_vectype_for_scalar_type): Update accordingly.
29007 * tree.h (build_truth_vector_type): Take the size and number of
29008 units as a poly_uint64 rather than an unsigned int.
29009 (build_vector_type): Add a temporary overload that takes
29010 the number of units as a poly_uint64 rather than an unsigned int.
29011 * tree.c (make_vector_type): Likewise.
29012 (build_truth_vector_type): Take the number of units as a poly_uint64
29013 rather than an unsigned int.
29015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29016 Alan Hayward <alan.hayward@arm.com>
29017 David Sherwood <david.sherwood@arm.com>
29019 * target.def (get_mask_mode): Take the number of units and length
29020 as poly_uint64s rather than unsigned ints.
29021 * targhooks.h (default_get_mask_mode): Update accordingly.
29022 * targhooks.c (default_get_mask_mode): Likewise.
29023 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29024 * doc/tm.texi: Regenerate.
29026 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29027 Alan Hayward <alan.hayward@arm.com>
29028 David Sherwood <david.sherwood@arm.com>
29030 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29031 * omp-general.c (omp_max_vf): Likewise.
29032 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29033 (expand_omp_simd): Handle polynomial safelen.
29034 * omp-low.c (omplow_simd_context): Add a default constructor.
29035 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29036 (lower_rec_simd_input_clauses): Update accordingly.
29037 (lower_rec_input_clauses): Likewise.
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 (vect_nunits_for_cost): New function.
29044 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29045 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29046 (vect_analyze_slp_cost): Likewise.
29047 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29048 (vect_model_load_cost): Likewise.
29050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29051 Alan Hayward <alan.hayward@arm.com>
29052 David Sherwood <david.sherwood@arm.com>
29054 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29055 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29056 from an unsigned int * to a poly_uint64_pod *.
29057 (calculate_unrolling_factor): New function.
29058 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29061 Alan Hayward <alan.hayward@arm.com>
29062 David Sherwood <david.sherwood@arm.com>
29064 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29065 from an unsigned int to a poly_uint64.
29066 (_loop_vec_info::slp_unrolling_factor): Likewise.
29067 (_loop_vec_info::vectorization_factor): Change from an int
29069 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29070 (vect_get_num_vectors): New function.
29071 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29072 (vect_get_num_copies): Use vect_get_num_vectors.
29073 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29074 to an unsigned int *.
29075 (vect_analyze_data_refs): Change min_vf from an int * to a
29077 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29078 than an unsigned HOST_WIDE_INT.
29079 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29080 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29081 to an unsigned int *.
29082 (vect_analyze_data_ref_dependences): Likewise.
29083 (vect_compute_data_ref_alignment): Handle polynomial vf.
29084 (vect_enhance_data_refs_alignment): Likewise.
29085 (vect_prune_runtime_alias_test_list): Likewise.
29086 (vect_shift_permute_load_chain): Likewise.
29087 (vect_supportable_dr_alignment): Likewise.
29088 (dependence_distance_ge_vf): Take the vectorization factor as a
29089 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29090 (vect_analyze_data_refs): Change min_vf from an int * to a
29092 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29093 vfm1 as a poly_uint64 rather than an int. Make the same change
29094 for the returned bound_scalar.
29095 (vect_gen_vector_loop_niters): Handle polynomial vf.
29096 (vect_do_peeling): Likewise. Update call to
29097 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29098 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29100 * tree-vect-loop.c (vect_determine_vectorization_factor)
29101 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29102 (vect_get_known_peeling_cost): Likewise.
29103 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29104 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29105 (vect_transform_loop): Likewise. Use the lowest possible VF when
29106 updating the upper bounds of the loop.
29107 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29108 rather than an int.
29109 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29110 polynomial unroll factors.
29111 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29112 (vect_make_slp_decision): Likewise.
29113 (vect_supported_load_permutation_p): Likewise, and polynomial
29115 (vect_analyze_slp_cost): Handle polynomial vf.
29116 (vect_slp_analyze_node_operations): Likewise.
29117 (vect_slp_analyze_bb_1): Likewise.
29118 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29119 than an unsigned HOST_WIDE_INT.
29120 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29121 (vectorizable_load): Handle polynomial vf.
29122 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29124 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29127 Alan Hayward <alan.hayward@arm.com>
29128 David Sherwood <david.sherwood@arm.com>
29130 * match.pd: Handle bit operations involving three constants
29131 and try to fold one pair.
29133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29135 * tree-vect-loop-manip.c: Include gimple-fold.h.
29136 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29137 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29138 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29139 Add a path that uses a step of VF instead of 1, but disable it
29141 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29142 and niters_no_overflow parameters. Update calls to
29143 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29144 Create a new SSA name if the latter choses to use a ste other
29145 than zero, and return it via niters_vector_mult_vf_var.
29146 * tree-vect-loop.c (vect_transform_loop): Update calls to
29147 vect_do_peeling, vect_gen_vector_loop_niters and
29148 slpeel_make_loop_iterate_ntimes.
29149 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29150 (vect_gen_vector_loop_niters): Update declarations after above changes.
29152 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29154 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29155 128-bit round to integer instructions.
29156 (ceil<mode>2): Likewise.
29157 (btrunc<mode>2): Likewise.
29158 (round<mode>2): Likewise.
29160 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29162 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29163 unaligned VSX load/store on P8/P9.
29164 (expand_block_clear): Allow the use of unaligned VSX
29165 load/store on P8/P9.
29167 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29169 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29171 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29172 swap associated with both a load and a store.
29174 2018-01-02 Andrew Waterman <andrew@sifive.com>
29176 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29177 * config/riscv/riscv.md (clear_cache): Use it.
29179 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29181 * web.c: Remove out-of-date comment.
29183 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29185 * expr.c (fixup_args_size_notes): Check that any existing
29186 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29187 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29188 (emit_single_push_insn): ...here.
29190 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29192 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29193 (const_vector_encoded_nelts): New function.
29194 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29195 (const_vector_int_elt, const_vector_elt): Declare.
29196 * emit-rtl.c (const_vector_int_elt_1): New function.
29197 (const_vector_elt): Likewise.
29198 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29199 of CONST_VECTOR_ELT.
29201 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29203 * expr.c: Include rtx-vector-builder.h.
29204 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29205 directly on the tree encoding.
29206 (const_vector_from_tree): Likewise.
29207 * optabs.c: Include rtx-vector-builder.h.
29208 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29209 sequence of "u" values.
29210 * vec-perm-indices.c: Include rtx-vector-builder.h.
29211 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29212 directly on the vec_perm_indices encoding.
29214 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29216 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29217 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29218 * rtx-vector-builder.h: New file.
29219 * rtx-vector-builder.c: Likewise.
29220 * rtl.h (rtx_def::u2): Add a const_vector field.
29221 (CONST_VECTOR_NPATTERNS): New macro.
29222 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29223 (CONST_VECTOR_DUPLICATE_P): Likewise.
29224 (CONST_VECTOR_STEPPED_P): Likewise.
29225 (CONST_VECTOR_ENCODED_ELT): Likewise.
29226 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29227 (unwrap_const_vec_duplicate): Likewise.
29228 (const_vec_series_p): Check for a non-duplicated vector encoding.
29229 Say that the function only returns true for integer vectors.
29230 * emit-rtl.c: Include rtx-vector-builder.h.
29231 (gen_const_vec_duplicate_1): Delete.
29232 (gen_const_vector): Call gen_const_vec_duplicate instead of
29233 gen_const_vec_duplicate_1.
29234 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29235 (gen_const_vec_duplicate): Use rtx_vector_builder.
29236 (gen_const_vec_series): Likewise.
29237 (gen_rtx_CONST_VECTOR): Likewise.
29238 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29239 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29240 Build a new vector rather than modifying a CONST_VECTOR in-place.
29241 (handle_special_swappables): Update call accordingly.
29242 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29243 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29244 Build a new vector rather than modifying a CONST_VECTOR in-place.
29245 (handle_special_swappables): Update call accordingly.
29247 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29249 * simplify-rtx.c (simplify_const_binary_operation): Use
29250 CONST_VECTOR_ELT instead of XVECEXP.
29252 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29254 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29255 the selector elements to be different from the data elements
29256 if the selector is a VECTOR_CST.
29257 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29258 ssizetype for the selector.
29260 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29262 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29263 before testing each element individually.
29264 * tree-vect-generic.c (lower_vec_perm): Likewise.
29266 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29268 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29269 * selftest-run-tests.c (selftest::run_tests): Call it.
29270 * vector-builder.h (vector_builder::operator ==): New function.
29271 (vector_builder::operator !=): Likewise.
29272 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29273 (vec_perm_indices::all_from_input_p): New function.
29274 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29275 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29276 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29277 instead of reading the VECTOR_CST directly. Detect whether both
29278 vector inputs are the same before constructing the vec_perm_indices,
29279 and update the number of inputs argument accordingly. Use the
29280 utility functions added above. Only construct sel2 if we need to.
29282 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29284 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29285 the broadcast of the low byte.
29286 (expand_mult_highpart): Use an explicit encoding for the permutes.
29287 * optabs-query.c (can_mult_highpart_p): Likewise.
29288 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29289 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29290 (vectorizable_bswap): Likewise.
29291 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29292 explicit encoding for the power-of-2 permutes.
29293 (vect_permute_store_chain): Likewise.
29294 (vect_grouped_load_supported): Likewise.
29295 (vect_permute_load_chain): Likewise.
29297 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29299 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29300 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29301 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29302 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29303 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29304 (vect_gen_perm_mask_any): Likewise.
29306 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29308 * int-vector-builder.h: New file.
29309 * vec-perm-indices.h: Include int-vector-builder.h.
29310 (vec_perm_indices): Redefine as an int_vector_builder.
29311 (auto_vec_perm_indices): Delete.
29312 (vec_perm_builder): Redefine as a stand-alone class.
29313 (vec_perm_indices::vec_perm_indices): New function.
29314 (vec_perm_indices::clamp): Likewise.
29315 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29316 (vec_perm_indices::new_vector): New function.
29317 (vec_perm_indices::new_expanded_vector): Update for new
29318 vec_perm_indices class.
29319 (vec_perm_indices::rotate_inputs): New function.
29320 (vec_perm_indices::all_in_range_p): Operate directly on the
29321 encoded form, without computing elided elements.
29322 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29323 encoding. Update for new vec_perm_indices class.
29324 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29325 the given vec_perm_builder.
29326 (expand_vec_perm_var): Update vec_perm_builder constructor.
29327 (expand_mult_highpart): Use vec_perm_builder instead of
29328 auto_vec_perm_indices.
29329 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29330 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29331 or double series encoding as appropriate.
29332 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29333 vec_perm_indices instead of auto_vec_perm_indices.
29334 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29335 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29336 (vect_permute_store_chain): Likewise.
29337 (vect_grouped_load_supported): Likewise.
29338 (vect_permute_load_chain): Likewise.
29339 (vect_shift_permute_load_chain): Likewise.
29340 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29341 (vect_transform_slp_perm_load): Likewise.
29342 (vect_schedule_slp_instance): Likewise.
29343 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29344 (vectorizable_mask_load_store): Likewise.
29345 (vectorizable_bswap): Likewise.
29346 (vectorizable_store): Likewise.
29347 (vectorizable_load): Likewise.
29348 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29349 vec_perm_indices instead of auto_vec_perm_indices. Use
29350 tree_to_vec_perm_builder to read the vector from a tree.
29351 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29352 vec_perm_builder instead of a vec_perm_indices.
29353 (have_whole_vector_shift): Use vec_perm_builder and
29354 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29355 truncation to calc_vec_perm_mask_for_shift.
29356 (vect_create_epilog_for_reduction): Likewise.
29357 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29358 from auto_vec_perm_indices to vec_perm_indices.
29359 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29360 instead of changing individual elements.
29361 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29362 the vector in d.perm.
29363 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29364 from auto_vec_perm_indices to vec_perm_indices.
29365 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29366 instead of changing individual elements.
29367 (arm_vectorize_vec_perm_const): Use new_vector to install
29368 the vector in d.perm.
29369 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29370 Update vec_perm_builder constructor.
29371 (rs6000_expand_interleave): Likewise.
29372 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29373 (rs6000_expand_interleave): Likewise.
29375 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29377 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29378 to qimode could truncate the indices.
29379 * optabs.c (expand_vec_perm_var): Likewise.
29381 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29383 * Makefile.in (OBJS): Add vec-perm-indices.o.
29384 * vec-perm-indices.h: New file.
29385 * vec-perm-indices.c: Likewise.
29386 * target.h (vec_perm_indices): Replace with a forward class
29388 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29389 * optabs.h: Include vec-perm-indices.h.
29390 (expand_vec_perm): Delete.
29391 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29392 (expand_vec_perm_const): Declare.
29393 * target.def (vec_perm_const_ok): Replace with...
29394 (vec_perm_const): ...this new hook.
29395 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29396 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29397 * doc/tm.texi: Regenerate.
29398 * optabs.def (vec_perm_const): Delete.
29399 * doc/md.texi (vec_perm_const): Likewise.
29400 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29401 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29402 expand_vec_perm for constant permutation vectors. Assert that
29403 the mode of variable permutation vectors is the integer equivalent
29404 of the mode that is being permuted.
29405 * optabs-query.h (selector_fits_mode_p): Declare.
29406 * optabs-query.c: Include vec-perm-indices.h.
29407 (selector_fits_mode_p): New function.
29408 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29409 is defined, instead of checking whether the vec_perm_const_optab
29410 exists. Use targetm.vectorize.vec_perm_const instead of
29411 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29412 fit in the vector mode before using a variable permute.
29413 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29414 vec_perm_indices instead of an rtx.
29415 (expand_vec_perm): Replace with...
29416 (expand_vec_perm_const): ...this new function. Take the selector
29417 as a vec_perm_indices rather than an rtx. Also take the mode of
29418 the selector. Update call to shift_amt_for_vec_perm_mask.
29419 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29420 Use vec_perm_indices::new_expanded_vector to expand the original
29421 selector into bytes. Check whether the indices fit in the vector
29422 mode before using a variable permute.
29423 (expand_vec_perm_var): Make global.
29424 (expand_mult_highpart): Use expand_vec_perm_const.
29425 * fold-const.c: Includes vec-perm-indices.h.
29426 * tree-ssa-forwprop.c: Likewise.
29427 * tree-vect-data-refs.c: Likewise.
29428 * tree-vect-generic.c: Likewise.
29429 * tree-vect-loop.c: Likewise.
29430 * tree-vect-slp.c: Likewise.
29431 * tree-vect-stmts.c: Likewise.
29432 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29434 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29435 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29436 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29437 (aarch64_vectorize_vec_perm_const): ...this new function.
29438 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29439 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29440 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29441 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29442 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29443 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29444 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29446 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29447 check for NEON modes.
29448 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29449 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29450 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29451 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29453 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29454 the old VEC_PERM_CONST conditions.
29455 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29456 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29457 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29458 (ia64_vectorize_vec_perm_const_ok): Merge into...
29459 (ia64_vectorize_vec_perm_const): ...this new function.
29460 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29461 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29462 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29463 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29464 * config/mips/mips.c (mips_expand_vec_perm_const)
29465 (mips_vectorize_vec_perm_const_ok): Merge into...
29466 (mips_vectorize_vec_perm_const): ...this new function.
29467 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29468 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29469 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29470 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29471 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29472 (rs6000_expand_vec_perm_const): Delete.
29473 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29475 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29476 (altivec_expand_vec_perm_const_le): Take each operand individually.
29477 Operate on constant selectors rather than rtxes.
29478 (altivec_expand_vec_perm_const): Likewise. Update call to
29479 altivec_expand_vec_perm_const_le.
29480 (rs6000_expand_vec_perm_const): Delete.
29481 (rs6000_vectorize_vec_perm_const_ok): Delete.
29482 (rs6000_vectorize_vec_perm_const): New function.
29483 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29484 an element count and rtx array.
29485 (rs6000_expand_extract_even): Update call accordingly.
29486 (rs6000_expand_interleave): Likewise.
29487 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29488 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29489 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29490 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29491 (rs6000_expand_vec_perm_const): Delete.
29492 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29493 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29494 (altivec_expand_vec_perm_const_le): Take each operand individually.
29495 Operate on constant selectors rather than rtxes.
29496 (altivec_expand_vec_perm_const): Likewise. Update call to
29497 altivec_expand_vec_perm_const_le.
29498 (rs6000_expand_vec_perm_const): Delete.
29499 (rs6000_vectorize_vec_perm_const_ok): Delete.
29500 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29501 reference to the SPE evmerge intructions.
29502 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29503 an element count and rtx array.
29504 (rs6000_expand_extract_even): Update call accordingly.
29505 (rs6000_expand_interleave): Likewise.
29506 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29507 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29509 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29511 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29513 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29514 vector mode and that that mode matches the mode of the data
29516 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29517 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29518 directly using expand_vec_perm_1 when forcing selectors into
29520 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29522 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29524 * optabs-query.h (can_vec_perm_p): Delete.
29525 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29526 * optabs-query.c (can_vec_perm_p): Split into...
29527 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29528 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29529 particular selector is valid.
29530 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29531 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29532 (vect_grouped_load_supported): Likewise.
29533 (vect_shift_permute_load_chain): Likewise.
29534 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29535 (vect_transform_slp_perm_load): Likewise.
29536 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29537 (vectorizable_bswap): Likewise.
29538 (vect_gen_perm_mask_checked): Likewise.
29539 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29540 implementations of variable permutation vectors into account
29541 when deciding which selector to use.
29542 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29543 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29544 with a false third argument.
29545 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29546 to test whether the constant selector is valid and can_vec_perm_var_p
29547 to test whether a variable selector is valid.
29549 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29551 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29552 * optabs-query.c (can_vec_perm_p): Likewise.
29553 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29554 instead of vec_perm_indices.
29555 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29556 (vect_gen_perm_mask_checked): Likewise,
29557 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29558 (vect_gen_perm_mask_checked): Likewise,
29560 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29562 * optabs-query.h (qimode_for_vec_perm): Declare.
29563 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29564 (qimode_for_vec_perm): ...this new function.
29565 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29567 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29569 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29570 does not have a conditional at the top.
29572 2018-01-02 Richard Biener <rguenther@suse.de>
29574 * ipa-inline.c (big_speedup_p): Fix expression.
29576 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29579 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29582 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29586 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29587 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29588 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29589 cond_taken_branch_cost 3->4.
29591 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29593 PR tree-optimization/83581
29594 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29595 TODO_cleanup_cfg if any changes have been made.
29597 PR middle-end/83608
29598 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29599 convert_modes if target mode has the right side, but different mode
29602 PR middle-end/83609
29603 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29604 last argument when extracting from CONCAT. If either from_real or
29605 from_imag is NULL, use expansion through memory. If result is not
29606 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29607 the parts directly to inner mode, if even that fails, use expansion
29610 PR middle-end/83623
29611 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29612 check for bswap in mode rather than HImode and use that in expand_unop
29615 Copyright (C) 2018 Free Software Foundation, Inc.
29617 Copying and distribution of this file, with or without modification,
29618 are permitted in any medium without royalty provided the copyright
29619 notice and this notice are preserved.