re PR tree-optimization/87826 (ubsan: gimple-ssa-store-merging.c:281)
[gcc.git] / gcc / ChangeLog
1 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/87826
4 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
5 negative or larger or equal to type's precision.
6
7 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
8
9 * opts.c (default_options_table): Do not enable
10 OPT_fdelayed_branch at -Og.
11 * doc/invoke.texi (-fdelayed-branch): Document it.
12
13 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
14
15 * optabs-libfuncs.c (build_libfunc_function_visibility):
16 New, split out from...
17 (build_libfunc_function): ... here.
18 (init_one_libfunc_visibility): New, split out from ...
19 (init_one_libfunc): ... here.
20
21 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
22 scratch register need not be early-clobber. Document the reason
23 why we cannot use ST<OP>.
24
25 2018-10-31 Joseph Myers <joseph@codesourcery.com>
26
27 PR bootstrap/82856
28 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
29 line for second argument of AC_DEFINE_UNQUOTED.
30 * doc/install.texi (Tools/packages necessary for modifying GCC):
31 Update to autoconf 2.69 and automake 1.15.1.
32 * aclocal.m4, config.in, configure: Regenerate.
33
34 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
35
36 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
37 initialization.
38
39 2018-10-31 Martin Liska <mliska@suse.cz>
40
41 PR driver/83193
42 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
43 Add new argument invalid_extension.
44 (aarch64_get_all_extension_candidates): New function.
45 (aarch64_rewrite_selected_cpu): Add NULL to function call.
46 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
47 new argument.
48 (aarch64_get_all_extension_candidates): New function.
49 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
50 argument invalid_extension.
51 (aarch64_parse_cpu): Likewise.
52 (aarch64_print_hint_for_extensions): New function.
53 (aarch64_validate_mcpu): Provide hint about invalid extension.
54 (aarch64_validate_march): Likewise.
55 (aarch64_handle_attr_arch): Pass new argument.
56 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
57 (aarch64_handle_attr_isa_flags): Likewise.
58
59 2018-10-31 Richard Biener <rguenther@suse.de>
60
61 PR middle-end/70359
62 PR middle-end/86270
63 * tree-outof-ssa.c (insert_backedge_copies): Restrict
64 copy generation to useful cases. Place the copy before
65 the definition of the backedge value when possible.
66
67 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
68
69 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
70 * config/arc/arc.c (arc_active_insn): New function.
71 (check_store_cacheline_hazard): Likewise.
72 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
73 (arc_override_options): Disable delay slot scheduler for older
74 A7.
75 (arc_store_addr_hazard_p): New implementation, old one renamed to
76 ...
77 (arc_store_addr_hazard_internal_p): Renamed.
78 (arc_reorg): Don't combine into brcc instructions which are part
79 of hardware hazard solution.
80 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
81 (tune_arc700): Likewise.
82 * config/arc/arc.opt (arc7xx): New tune value.
83 * config/arc/arc700.md: Improve A7 scheduler.
84
85 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
86
87 * config/arc/arc.c (arc_override_options): Remove
88 TARGET_COMPACT_CASESI.
89 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
90 (CASE_VECTOR_MODE): Likewise.
91 (CASE_VECTOR_PC_RELATIVE): Likewise.
92 (CASE_VECTOR_SHORTEN_MODE): Likewise.
93 (CASE_VECTOR_SHORTEN_MODE1): Delete.
94 (ADDR_VEC_ALIGN): Update.
95 (ASM_OUTPUT_CASE_LABEL): Undefine.
96 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
97 (TARGET_BI_BIH): Define.
98 (DEFAULT_BRANCH_INDEX): Likewise.
99 * config/arc/arc.md (casesi): Rework to accept BI/BIH
100 instructions, remove compact_casesi use case.
101 (casesi_compact_jump): Remove.
102 (casesi_dispatch): New pattern.
103 * config/arc/arc.opt: Add mbranch-index option. Deprecate
104 compact_casesi option.
105 * doc/invoke.texi: Document mbranch-index option.
106
107 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
108
109 * config/arc/arc.c (arc_get_tp): Remove function.
110 (arc_emit_call_tls_get_addr): Likewise.
111 (arc_call_tls_get_addr): New function.
112 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
113 * config/arc/arc.md (tls_load_tp_soft): Remove.
114 (tls_gd_get_addr): Likewise.
115
116 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
117
118 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
119 (mulsi3_600_lib): Remove pattern.
120 (umulsi3_highpart_600_lib_le): Likewise.
121 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
122 (umulsidi3): Remove call to umulsidi3_600_lib.
123 (umulsidi3_600_lib): Remove pattern.
124 (peephole2): Remove peephole using the above deprecated patterns.
125
126 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
127
128 PR target/87374
129 * config/arm/arm.c (arm_option_check_internal): Disable the combined
130 use of -mslow-flash-data and -mword-relocations.
131 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
132 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
133 flag_pic.
134 * doc/invoke.texi (-mword-relocations): Mention conflict with
135 -mslow-flash-data.
136 (-mslow-flash-data): Reciprocally.
137
138 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
139
140 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
141 16-byte modes held in GP registers to use an even regno.
142
143 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
144 (aarch64_atomic_ldop_supported_p): Remove.
145 (aarch64_gen_atomic_ldop): Remove.
146 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
147 Fully expand LSE operations here.
148 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
149 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
150 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
151 and use ATOMIC_LDOP instead; use register_operand for the input;
152 drop the split and emit insns directly.
153 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
154 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
155 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
156
157 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
158 (aarch64_gen_atomic_ldop): Don't call it.
159 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
160 Use aarch64_reg_or_zero.
161 (aarch64_atomic_exchange<ALLI>): Likewise.
162 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
163 operand 0; use aarch64_reg_or_zero for input; merge ...
164 (@aarch64_atomic_swp<ALLI>): ... this and remove.
165
166 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
167 (aarch64_split_compare_and_swap): Use it.
168 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
169 test oldval against the proper predicate.
170 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
171 Use nonmemory_operand for expected.
172 (cas_short_expected_pred): New.
173 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
174 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
175 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
176 (aarch64_plushi_operand): New.
177
178 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
179 Force oldval into the rval register for TARGET_LSE; emit the compare
180 during initial expansion so that it may be deleted if unused.
181 (aarch64_gen_atomic_cas): Remove.
182 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
183 Change =&r to +r for operand 0; use match_dup for operand 2;
184 remove is_weak and mod_f operands as unused. Drop the split
185 and merge with...
186 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
187 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
188 (@aarch64_atomic_cas<GPI>): Similarly.
189
190 2018-10-31 Richard Biener <rguenther@suse.de>
191
192 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
193 using ABSU_EXPR.
194
195 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
196
197 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
198 * config/aarch64/aarch64.md: Include saphira.md
199 * config/aarch64/saphira.md: New file for pipeline description.
200
201 2018-10-30 Martin Sebor <msebor@redhat.com>
202
203 PR middle-end/87041
204 * gimple-ssa-sprintf.c (format_directive): Use %G to include
205 inlining context.
206 (sprintf_dom_walker::compute_format_length):
207 Avoid setting POSUNDER4K here.
208 (get_destination_size): Handle null argument values.
209 (get_user_idx_format): New function.
210 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
211 functions, including user-defined with attribute format printf.
212 Use %G to include inlining context.
213 Set POSUNDER4K here.
214
215 2018-10-30 Jan Hubicka <jh@suse.cz>
216
217 * params.def (lto-partitions): Bump from 32 to 128.
218
219 2018-10-30 Jan Hubicka <jh@suse.cz>
220
221 * tree.c
222 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
223 head in file.
224 (free_lang_data_in_type): Forward declare.
225 (fld_type_variant_equal_p): New function.
226 (fld_type_variant): New function
227 (fld_incomplete_types): New hash.
228 (fld_incomplete_type_of): New function
229 (fld_simplfied-type): New function.
230 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
231 (free_lang_data): Allocate and free fld_incomplete_type; update call
232 of free_lang_data_in_decl.
233
234 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
235
236 * gcov.c (output_lines): Remove duplicate line.
237
238 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
239
240 * config/rs6000/rs6000.md (bswapdi2): Force address into register
241 if not in indexed or indirect form.
242 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
243 (bswapdi2_store): Ditto.
244 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
245 helper function.
246 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
247 Prototype for helper function.
248
249 2018-10-30 Martin Sebor <msebor@redhat.com>
250
251 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
252 (target, pragma GCC optimize, pragma GCC target): Ditto.
253
254 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
255
256 * doc/extend.texi: Fix prototype and description of
257 __builtin_expect_with_probability.
258
259 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
260
261 * cgraph.h (clone_function_name_1): Replaced by new
262 clone_function_name_numbered that takes name as string; for
263 privatize_symbol_name_1 use only.
264 (clone_function_name): Renamed to
265 clone_function_name_numbered to be explicit about numbering.
266 (clone_function_name): New two-argument function that does
267 not number its output.
268 (clone_function_name): New three-argument function that
269 takes a number to append to its output.
270 * cgraphclones.c (duplicate_thunk_for_node):
271 (clone_function_name_1): Renamed.
272 (clone_function_name_numbered): Two new functions.
273 (clone_function_name): Improved documentation.
274 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
275 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
276 * final.c (final_scan_insn_1): Use the new clone_function_name
277 without numbering.
278 * multiple_target.c (create_dispatcher_calls): Ditto.
279 (create_target_clone): Ditto.
280 * omp-expand.c (grid_expand_target_grid_body): Ditto.
281 * omp-low.c (create_omp_child_function_name): Ditto.
282 * omp-simd-clone.c (simd_clone_create): Ditto.
283 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
284 new clone_function_name without numbering.
285
286 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
287
288 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
289 Assert that the allocation size is not zero.
290
291 2018-10-30 Richard Biener <rguenther@suse.de>
292
293 PR tree-optimization/87800
294 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
295 non-induction or reduction PHIs.
296
297 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
298
299 * config/aarch64/falkor-tag-collision-avoidance.c
300 (execute_tag_collision_avoidance): Call df_note_add_problem.
301
302 2018-10-30 Martin Liska <mliska@suse.cz>
303
304 * doc/extend.texi: Fix typo in documentation
305 of __builtin_expect_with_probability.
306
307 2018-10-29 David Malcolm <dmalcolm@redhat.com>
308
309 PR c++/87721
310 * input.c (get_substring_ranges_for_loc): Detect if
311 linemap_resolve_location gives us a NULL map, and reject
312 this case.
313
314 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
315
316 * config.gcc (xstormy16-*-elf): Set tm_d_file.
317
318 2018-10-29 David Malcolm <dmalcolm@redhat.com>
319 Martin Sebor <msebor@redhat.com>
320 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
321
322 * doc/ux.texi (Quoting): New subsection, adapted from material at
323 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
324 MartinSebor and ManuelLopezIbanez.
325 (Fix-it hints): Note that fix-it hints shouldn't be marked for
326 translation.
327
328 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
329
330 PR middle-end/87469
331 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
332 max value.
333
334 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
335
336 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
337
338 2018-10-29 Paul Koning <ni1d@arrl.net>
339
340 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
341
342 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
343
344 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
345 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
346 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
347 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
348 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
349 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
350 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
351 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
352 Change 'vector' to '__vector'.
353 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
354 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
355 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
356 _mm_avg_pu16): Likewise. And, whitespace corrections.
357
358 2018-10-29 Richard Biener <rguenther@suse.de>
359
360 PR tree-optimization/87785
361 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
362 internal defs.
363
364 2018-10-29 Olivier Hainque <hainque@adacore.com>
365
366 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
367
368 2018-10-29 Olivier Hainque <hainque@adacore.com>
369
370 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
371 ports configuration macro, defaults to "gnu".
372 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
373 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
374
375 2018-10-29 Olivier Hainque <hainque@adacore.com>
376
377 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
378
379 2018-10-29 Richard Biener <rguenther@suse.de>
380
381 PR tree-optimization/87790
382 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
383 (vect_make_slp_decision): Adjust.
384 (vect_slp_analyze_bb_1): Likewise.
385 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
386 edges.
387
388 2018-10-29 Richard Biener <rguenther@suse.de>
389
390 PR tree-optimization/87785
391 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
392 and processing.
393 (vect_build_slp_tree): Likewise.
394 (vect_gather_slp_loads): New function.
395 (vect_analyze_slp_instance): Gather loads separately from the
396 SLP tree build.
397
398 2018-10-29 Martin Liska <mliska@suse.cz>
399
400 * Makefile.in: Make dependency to json.o.
401 * doc/gcov.texi: Document new JSON format, remove
402 old intermediate format documentation.
403 * gcov.c (struct function_info): Come up with m_name and
404 m_demangled_name.
405 (function_info::function_info): Initialize it.
406 (function_info::~function_info): Release it.
407 (main): Rename flag_intermediate_format to flag_json_format.
408 (print_usage): Describe --json-format.
409 (process_args): Set flag_json_format.
410 (output_intermediate_line): Remove.
411 (output_intermediate_json_line): Likewise.
412 (get_gcov_intermediate_filename): Return new extension
413 ".gcov.json.gz".
414 (output_intermediate_file): Implement JSON emission.
415 (output_json_intermediate_file): Implement JSON emission.
416 (generate_results): Use ::get_name for function name.
417 Handle JSON output file.
418 (read_graph_file): Use ::get_name instead of cplus_demangle.
419 (read_count_file): Likewise.
420 (solve_flow_graph): Likewise.
421 (add_line_counts): Likewise.
422 (accumulate_line_counts): Use new flag_json_format.
423 (output_function_details): Use ::get_name instead of cplus_demangle.
424 (output_lines): Likewise.
425 * json.cc (test_writing_literals): Add new tests.
426 * json.h (class literal): Add new boolean constructor.
427
428 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
429
430 PR rtl-optimization/87701
431 PR rtl-optimization/87780
432 * combine.c (make_more_copies): Rewrite.
433
434 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
435
436 * doc/generic.texi (ABSU_EXPR): Document.
437 * match.pd (absu(x)*absu(x) -> x*x): Handle.
438 (absu(absu(X)) -> absu(X)): Likewise.
439 (absu(-X) -> absu(X)): Likewise.
440 (absu(X) where X is nonnegative -> X): Likewise.
441
442 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
443
444 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
445 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
446 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
447 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
448 (s-tm-texi): Also check timestamp on d-target.def.
449 (generated_files): Add TM_D_H and d-target-hooks-def.h.
450 (build/genhooks.o): Also depend on D_TARGET_DEF.
451 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
452 variables.
453 * config/aarch64/aarch64-d.c: New file.
454 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
455 Define.
456 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
457 prototype.
458 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
459 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
460 * config/arm/arm-d.c: New file.
461 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
462 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
463 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
464 * config/arm/t-arm (arm-d.o): New rule.
465 * config/default-d.c: New file.
466 * config/glibc-d.c: New file.
467 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
468 * config/i386/i386-d.c: New file.
469 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
470 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
471 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
472 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
473 * config/i386/t-i386 (i386-d.o): New rule.
474 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
475 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
476 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
477 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
478 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
479 * config/mips/mips-d.c: New file.
480 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
481 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
482 * config/mips/t-mips (mips-d.o): New rule.
483 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
484 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
485 * config/powerpcspe/powerpcspe-d.c: New file.
486 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
487 New prototype.
488 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
489 Support GNU D by using 0 as the language type.
490 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
491 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
492 * config/riscv/riscv-d.c: New file.
493 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
494 prototype.
495 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
496 * config/riscv/t-riscv (riscv-d.o): New rule.
497 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
498 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
499 * config/rs6000/rs6000-d.c: New file.
500 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
501 prototype.
502 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
503 Support GNU D by using 0 as the language type.
504 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
505 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
506 * config/s390/s390-d.c: New file.
507 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
508 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
509 * config/s390/t-s390 (s390-d.o): New rule.
510 * config/sparc/sparc-d.c: New file.
511 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
512 prototype.
513 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
514 * config/sparc/t-sparc (sparc-d.o): New rule.
515 * config/t-glibc (glibc-d.o): New rule.
516 * configure: Regenerated.
517 * configure.ac (tm_d_file): New variable.
518 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
519 * doc/contrib.texi (Contributors): Add self for the D frontend.
520 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
521 * doc/install.texi (Configuration): Mention libphobos as an option for
522 --enable-shared. Mention d as an option for --enable-languages.
523 (Testing): Mention check-d as a target.
524 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
525 name suffixes. Mention d as a -x option.
526 * doc/sourcebuild.texi (Top Level): Mention libphobos.
527 * doc/standards.texi (Standards): Add section on D language.
528 * doc/tm.texi: Regenerated.
529 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
530 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
531 * dwarf2out.c (is_dlang): New function.
532 (gen_compile_unit_die): Use DW_LANG_D for D.
533 (declare_in_namespace): Return module die for D, instead of adding
534 extra declarations into the namespace.
535 (gen_namespace_die): Generate DW_TAG_module for D.
536 (gen_decl_die): Handle CONST_DECLSs for D.
537 (dwarf2out_decl): Likewise.
538 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
539 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
540 kinds of aggregates.
541 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
542 * genhooks.c: Include d/d-target.def.
543
544 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
545
546 PR target/85669
547 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
548 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
549 (STACK_DYNAMIC_OFFSET): Likewise.
550
551 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
552
553 PR target/80024
554 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
555 error message.
556
557 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
558
559 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
560 return type and other typos.
561
562 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
563
564 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
565 a shorter sequence with fewer branches.
566 (emit_final_str_compare_gpr): Ditto.
567
568 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
569
570 * config/rs6000/tmmintrin.h: New file.
571 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
572
573 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
574
575 * config/rs6000/mmintrin.h: Enable 32bit compilation.
576 * config/rs6000/xmmintrin.h: Likewise.
577
578 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
579
580 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
581
582 2018-10-26 Richard Biener <rguenther@suse.de>
583
584 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
585 and wrapper.
586 (vect_mark_slp_stmts_relevant): Likewise.
587 (vect_detect_hybrid_slp_stmts): Likewise.
588 (vect_bb_slp_scalar_cost): Likewise.
589 (vect_remove_slp_scalar_calls): Likewise.
590
591 2018-10-26 Jan Hubicka <jh@suse.cz>
592
593 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
594 (warn_types_mismatch): Fix walk of DECL_NAME.
595 (odr_types_equivalent_p): Fix overactive assert.
596
597 2018-10-26 Richard Biener <rguenther@suse.de>
598
599 PR tree-optimization/87105
600 * tree-vectorizer.h (_slp_tree::refcnt): New member.
601 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
602 refcnt.
603 (vect_create_new_slp_node): Initialize refcnt to one.
604 (bst_traits): Move.
605 (scalar_stmts_set_t, bst_fail): Remove.
606 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
607 (vect_build_slp_tree): Add bst_map argument and lookup
608 already created SLP nodes.
609 (vect_print_slp_tree): Handle a SLP graph, print SLP node
610 addresses.
611 (vect_slp_rearrange_stmts): Handle a SLP graph.
612 (vect_analyze_slp_instance): Adjust and free SLP nodes from
613 the CSE map. Fix indenting.
614 (vect_schedule_slp_instance): Add short-cut.
615
616 2018-10-26 Martin Liska <mliska@suse.cz>
617
618 PR testsuite/86158
619 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
620 addr_expr and not with pointers.
621
622 2018-10-26 Jan Hubicka <jh@suse.cz>
623
624 * tree.c (free_lang_data_in_type): Only check main variants.
625 * ipa-devirt.c (warn_odr): Make static.
626 (types_same_for_odr): Drop strict variant.
627 (types_odr_comparable): Likewise.
628 (odr_or_derived_type_p): Look for main variants.
629 (odr_name_hasher::equal): Cleanup comment.
630 (odr_subtypes_equivalent): Add warn and warned arguments; check main
631 variants.
632 (type_variants_equivalent_p): break out from ...
633 (odr_types_equivalent): ... here; go for main variants where needed.
634 (warn_odr): ... here; turn static.
635 (warn_types_mismatch): Compare mangled names of main variants.
636 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
637 (type_with_linkage_p): Sanity check that we look at main variant.
638 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
639 * tree.h (types_same_for_odr): Drop strict argument.
640
641 2018-10-26 Richard Biener <rguenther@suse.de>
642
643 PR tree-optimization/87746
644 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
645 Simplify and fix WRT strided store groups with size not
646 equal to step in element count.
647 (vect_analyze_group_access_1): Dump the whole group.
648
649 2018-10-25 Carl Love <cel@us.ibm.com>
650
651 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
652 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
653 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
654 precicion entry for each overloaded builtin.
655 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
656 VSCEDPUO): Rename overloaded name.
657 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
658 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
659 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
660 define_expand for xscmpexqp instruction.
661 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
662
663 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
664 Jinsong Ji <jji@us.ibm.com>
665
666 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
667 function with vec_sl.
668 (_mm_slli_epi32): Likewise.
669 (_mm_slli_epi64): Likewise.
670 (_mm_srai_epi16): Replace deprecated function with vec_sra.
671 (_mm_srai_epi32): Likewise.
672 (_mm_srli_epi16): Replace deprecated function with vec_sr.
673 (_mm_srli_epi32): Likewise.
674 (_mm_srli_epi64): Likewise.
675 (_mm_sll_epi16): Replace deprecated function with vec_sl.
676 (_mm_sll_epi32): Likewise.
677 (_mm_sll_epi64): Likewise.
678 (_mm_sra_epi16): Replace deprecated function with vec_sra.
679 (_mm_sra_epi32): Likewise.
680 (_mm_srl_epi16): Replace deprecated function with vec_sr.
681 (_mm_srl_epi32): Likewise.
682 (_mm_srl_epi64): Likewise.
683
684 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
685 Jinsong Ji <jji@us.ibm.com>
686
687 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
688 comparison operators with vec_cmp* for compatibility due to
689 unfortunate history; clean up formatting and use types more
690 appropriately.
691 (_mm_sll_epi32): Likewise.
692 (_mm_sll_epi64): Likewise.
693 (_mm_srl_epi16): Likewise.
694 (_mm_srl_epi32): Likewise.
695 (_mm_srl_epi64): Likewise.
696
697 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
698 Jinsong Ji <jji@us.ibm.com>
699
700 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
701 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
702 __vector __bool int. Use vec_cmpgt in preference to deprecated
703 function vec_vcmpgtfp.
704 (_mm_max_ps): Likewise.
705
706 2018-10-25 Jeff Law <law@redhat.com>
707
708 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
709 if returning false.
710
711 2018-10-25 Martin Sebor <msebor@redhat.com>
712
713 * doc/extend.texi (aligned): Expand attribute description.
714 (Alignment): Rename section. Discuss function arguments.
715
716 2018-10-25 Jan Hubicka <jh@suse.cz>
717
718 * ipa-devirt.c (main_odr_variant): Remove.
719 (hash_odr_name, types_same_for_odr, types_odr_comparable,
720 odr_name_hasher::equal, odr_subtypes_equivalent_p):
721 Drop use of main_odr_variant.
722 (add_type_duplicate): Silence confused warnings on integer types.
723 (get_odr_type): Always look for main variant.
724 (register_odr_type): Simplify.
725
726 2018-10-25 Richard Biener <rguenther@suse.de>
727
728 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
729 Initialize ng to silence error with release checking bootstrap.
730
731 2018-10-25 Richard Biener <rguenther@suse.de>
732
733 * tree-if-conv.c: Include tree-ssa-sccvn.h.
734 (tree_if_conversion): Run CSE on the if-converted loop body.
735
736 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
737
738 * config/s390/constraints.md (ZL): New constraint.
739 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
740 operands.
741 * config/s390/s390.md (movdi_larl): Remove.
742 (movdi_64): Add the LARL alternative.
743
744 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
745
746 PR bootstrap/87747
747 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
748 (RTX_CODE_HWINT_P): New macro.
749 (rtx_code_size): Use RTX_CODE_HWINT_P ().
750
751 2018-10-25 Jan Hubicka <jh@suse.cz>
752
753 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
754 is anonymous.
755
756 2018-10-25 Richard Biener <rguenther@suse.de>
757
758 PR tree-optimization/87665
759 PR tree-optimization/87745
760 * tree-vectorizer.h (get_earlier_stmt): Remove.
761 (get_later_stmt): Pick up UID from the original non-pattern stmt.
762
763 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
764
765 * options.texi (Deprecated): Move list to Var section.
766
767 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
768 Jinsong Ji <jji@us.ibm.com>
769
770 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
771 __vector long to __vector long long.
772 (_mm_cvtpd_ps): Likewise.
773 (_mm_cvttpd_epi32): Likewise.
774 (_mm_cvtpi32_pd): Likewise.
775 (_mm_unpackhi_epi64): Likewise.
776 (_mm_unpacklo_epi64): Likewise.
777
778 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
779
780 PR rtl-optimization/87720
781 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
782
783 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
784
785 * gimple-ssa-isolate-paths.c
786 (find_implicit_erroneous_behavior): Do not change code if the
787 pass is running for warnings only.
788 (find_explicit_erroneous_behavior): Likewise.
789
790 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
791
792 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
793 Define as rs6000_mangle_decl_assembler_name.
794 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
795 long double to IEEE long double, switch the names of the long
796 double built-in functions to be <func>f128 instead of <func>l.
797
798 2018-10-24 Martin Sebor <msebor@redhat.com>
799
800 * doc/extend.texi (nonnull): List no-argument form. Reference
801 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
802
803 2018-10-24 Richard Biener <rguenther@suse.de>
804
805 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
806
807 2018-10-24 Martin Liska <mliska@suse.cz>
808
809 PR tree-optimization/84436
810 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
811 Remove.
812 (switch_conversion::contains_linear_function_p): New.
813 (switch_conversion::build_one_array): Support linear
814 transformation on input.
815 * tree-switch-conversion.h (struct switch_conversion): Add
816 contains_linear_function_p declaration.
817
818 2018-10-24 Richard Biener <rguenther@suse.de>
819
820 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
821 if its argument is CONSTANT_CLASS_P.
822
823 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
824
825 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
826 it is wrong for forward declarations.
827
828 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
829
830 * config/s390/s390.c (s390_check_qrst_address): Add the missing
831 SYMBOL_REF_P () check.
832
833 2018-10-24 Richard Biener <rguenther@suse.de>
834
835 PR tree-optimization/87105
836 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
837 dump classification.
838 (vect_analyze_data_ref_accesses): Handle duplicate loads and
839 stores by splitting the affected group after the fact.
840 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
841 fail the SLP build because of size constraints.
842
843 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
844
845 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
846 * configure: Regenerate.
847 * config.in: Regenerate.
848 * varasm.c (mergeable_string_section): Use readonly_data_section
849 if linker doesn't support SHF_MERGE with alignment > 8.
850 (mergeable_constant_section): Likewise.
851
852 2018-10-24 Richard Biener <rguenther@suse.de>
853
854 PR tree-optimization/84013
855 * tree-ssa-structalias.c (struct msdi_data): New struct for
856 marshalling data to walk_stmt_load_store_ops.
857 (maybe_set_dependence_info): Refactor as callback for
858 walk_stmt_load_store_ops.
859 (compute_dependence_clique): Set restrict info on all stmt kinds.
860
861 2018-10-24 Martin Liska <mliska@suse.cz>
862
863 * cgraph.c (cgraph_node::dump):
864 Remove reduntant dumps and make tp_first_run dump more compact.
865
866 2018-10-24 Richard Biener <rguenther@suse.de>
867
868 PR tree-optimization/87665
869 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
870 to reflect reality.
871
872 2018-10-12 Jeff Law <law@redhat.com>
873
874 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
875 for H8/S.
876
877 2018-10-23 Richard Biener <rguenther@suse.de>
878
879 * tree-vrp.c (add_assert_info): Guard dump_printf with
880 dump_enabled_p.
881 * gimple-ssa-evrp-analyze.c
882 (evrp_range_analyzer::record_ranges_from_incoming_edge):
883 Use value_range::ignore_equivs_equal_p.
884
885 2018-10-23 Richard Biener <rguenther@suse.de>
886
887 PR tree-optimization/87105
888 PR tree-optimization/87608
889 * passes.def (pass_all_early_optimizations): Add early phi-opt
890 after dce.
891 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
892 addition to debug stmts.
893 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
894 and abs replacement early.
895 * tree-cfg.c (gimple_empty_block_p): Likewise.
896
897 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
898
899 PR target/86383
900 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
901 specified to configure.
902 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
903
904 2018-10-23 Richard Biener <rguenther@suse.de>
905
906 PR tree-optimization/87700
907 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
908
909 2018-10-23 Jakub Jelinek <jakub@redhat.com>
910
911 PR target/87674
912 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
913 second argument from __mmask16 to __mmask8.
914 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
915 _mm_mask_packs_epi32): Likewise.
916 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
917 Likewise.
918 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
919
920 2018-10-23 Richard Biener <rguenther@suse.de>
921
922 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
923
924 2018-10-23 Richard Biener <rguenther@suse.de>
925
926 PR tree-optimization/86144
927 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
928 over simd attribute.
929
930 2018-10-23 Richard Biener <rguenther@suse.de>
931
932 PR tree-optimization/87693
933 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
934 the case we do not find the taken edge.
935
936 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
937 Jinsong Ji <jji@us.ibm.com>
938
939 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
940 (_mm_store_pd): Use unaligned vector type for pointer cast.
941 (_mm_maskmoveu_si128): Likewise.
942 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
943 (_mm_store_ps): Use unaligned vector type for pointer cast.
944
945 2018-10-22 Paul Koning <ni1d@arrl.net>
946
947 * symtab.c (symtab_node::increase_alignment): Correct max
948 alignment check.
949
950 2018-10-22 Yury Gribov <tetra2005@gmail.com>
951
952 PR tree-optimization/87633
953 * match.pd: Do not generate unordered integer comparisons.
954
955 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
956
957 PR rtl-optimization/87600
958 * combine.c: Add include of expr.h.
959 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
960 register to a pseudo.
961 (make_more_copies): New function, add a copy to a new pseudo after
962 the moves from hard registers into pseudos.
963 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
964 later. Call make_more_copies.
965
966 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
967
968 * lra-constraints.c (process_alt_operands): New local array,
969 matching_early_clobber. Check matching_early_clobber before
970 decrementing reject, and set matching_early_clobber after.
971
972 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
973
974 PR target/87598
975 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
976 call output_addr_const and hope for the best.
977
978 2018-10-22 Richard Biener <rguenther@suse.de>
979
980 * gimple-ssa-evrp-analyze.c
981 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
982 smarter about what ranges to use.
983 * tree-vrp.c (add_assert_info): Dump here.
984 (register_edge_assert_for_2): Instead of here at multiple but
985 not all places.
986
987 * gcc.dg/tree-ssa/evrp12.c: New testcase.
988 * gcc.dg/predict-6.c: Adjust.
989 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
990 * gcc.dg/tree-ssa/vrp02.c: Likewise.
991 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
992
993 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
994 Richard Biener <rguenther@suse.de>
995
996 * bitmap.h: Update data structure documentation, including a
997 description of bitmap views as either linked-lists or splay trees.
998 (struct bitmap_element_def): Update comments for splay tree bitmaps.
999 (struct bitmap_head_def): Likewise.
1000 (bitmap_list_view, bitmap_tree_view): New prototypes.
1001 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1002 tree_form fields.
1003 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1004 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1005 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1006 released bitmap element here.
1007 (bitmap_element_free): Remove.
1008 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1009 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1010 this function similar ones such that linked-list bitmap implementation
1011 functions are grouped.
1012 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1013 and moved for grouping.
1014 (bitmap_list_insert_element_after): Renamed from
1015 bitmap_elt_insert_after, and moved for grouping.
1016 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1017 (bitmap_tree_link_left, bitmap_tree_link_right,
1018 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1019 bitmap_tree_link_element, bitmap_tree_unlink_element,
1020 bitmap_tree_find_element): New functions for splay-tree bitmap
1021 implementation.
1022 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1023 Renamed and moved, see above entries.
1024 (bitmap_tree_listify_from): New function to convert part of a splay
1025 tree bitmap to a linked-list bitmap.
1026 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1027 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1028 (bitmap_find_bit): Remove.
1029 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1030 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1031 Handle splay tree bitmaps.
1032 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1033 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1034 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1035 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1036 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1037 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1038 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1039 corresponding changes to use linked-list specific bitmap_element
1040 manipulation functions as applicable for efficiency.
1041 (bitmap_tree_to_vec): New function.
1042 (debug_bitmap_elt_file): New function split out from ...
1043 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1044 (bitmap_print): Likewise.
1045
1046 PR tree-optimization/63155
1047 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1048 SSA edge worklists.
1049 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1050 in tree-view.
1051
1052 2018-10-22 Martin Liska <mliska@suse.cz>
1053
1054 PR tree-optimization/87686
1055 Revert
1056 2018-08-29 Martin Liska <mliska@suse.cz>
1057
1058 * tree-switch-conversion.c (switch_conversion::expand):
1059 Strenghten assumption about gswitch statements.
1060
1061 2018-10-22 Martin Liska <mliska@suse.cz>
1062
1063 * ipa-icf.c (sem_item::compare_attributes): Remove.
1064 (sem_item::compare_referenced_symbol_properties): Use
1065 attribute_list_equal instead.
1066 (sem_function::equals_wpa): Likewise.
1067 * ipa-icf.h: Remove compare_attributes.
1068
1069 2018-10-22 Richard Biener <rguenther@suse.de>
1070
1071 PR middle-end/87682
1072 * mem-stats.h (mem_usage::operator==): Fix pasto.
1073
1074 2018-10-22 Richard Biener <rguenther@suse.de>
1075
1076 PR tree-optimization/87640
1077 * tree-vrp.c (set_value_range_with_overflow): Decompose
1078 incomplete result.
1079 (extract_range_from_binary_expr_1): Adjust.
1080
1081 2018-10-22 Martin Jambor <mjambor@suse.cz>
1082
1083 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1084 (stmt_can_throw_external): Likewise.
1085 (stmt_can_throw_internal): Likewise.
1086 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1087 (lower_eh_constructs_2): Likewise.
1088 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1089 (stmt_can_throw_external): Likewise.
1090 (stmt_can_throw_internal): Likewise.
1091 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1092 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1093 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1094 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1095 (pass_lower_eh_dispatch::execute): Pass cfun to
1096 stmt_can_throw_external.
1097 (cleanup_empty_eh): Likewise.
1098 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1099 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1100 stmt_can_throw_external instead of pushing it to cfun.
1101 (symbol_table::create_edge): Likewise.
1102 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1103 stmt_can_throw_internal.
1104 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1105 to stmt_could_throw_p.
1106 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1107 stmt_can_throw_internal.
1108 (pass_store_merging::execute): Likewise.
1109 * gimple-ssa-strength-reduction.c
1110 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1111 stmt_could_throw_p.
1112 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1113 stmt_can_throw_internal.
1114 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1115 to stmt_can_throw_external.
1116 (check_stmt): Pass cfun to stmt_could_throw_p.
1117 (check_stmt): Pass cfun to stmt_can_throw_external.
1118 (pass_nothrow::execute): Likewise.
1119 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1120 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1121 stmt_can_throw_internal.
1122 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1123 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1124 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1125 * tree-complex.c (expand_complex_libcall): Pass cfun to
1126 stmt_could_throw_p and to stmt_can_throw_internal.
1127 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1128 * tree-inline.c (copy_edges_for_bb): Likewise.
1129 (maybe_move_debug_stmts_to_successors): Likewise.
1130 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1131 stmt_could_throw_p.
1132 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1133 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1134 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1135 stmt_can_throw_internal.
1136 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1137 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1138 stmt_could_throw_p.
1139 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1140 stmt_can_throw_internal.
1141 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1142 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1143 stmt_could_throw_p.
1144 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1145 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1146 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1147 (convert_mult_to_fma_1): Likewise.
1148 (convert_to_divmod): Likewise.
1149 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1150 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1151 * tree-ssa-propagate.c
1152 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1153 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1154 (maybe_optimize_range_tests): Likewise.
1155 (linearize_expr_tree): Likewise.
1156 (reassociate_bb): Likewise.
1157 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1158 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1159 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1160 (handle_char_store): Likewise.
1161 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1162 stmt_can_throw_internal.
1163 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1164 stmt_could_throw_p.
1165 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1166 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1167 (vectorizable_simd_clone_call): Likewise.
1168 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1169 (gimple_stringop_fixed_value): Likewise.
1170
1171 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1172
1173 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1174 literal pool references.
1175 (s390_check_qrst_address): Adapt to the new behavior of
1176 s390_loadrelative_operand_p ().
1177
1178 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1179
1180 PR target/72782
1181 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1182
1183 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1184
1185 PR target/72782
1186 * config/i386/sse.md (*<code><mode>3_bcst): New.
1187
1188 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 PR target/72782
1191 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1192 V4DI, V16SI and V8DI.
1193 (*sub<mode>3<mask_name>_bcst): New.
1194 (*add<mode>3<mask_name>_bcst): Likewise.
1195
1196 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1197 Jinsong Ji <jji@us.ibm.com>
1198
1199 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1200 __m64 with __vector unsigned long long for compatibility.
1201 (_mm_movemask_epi8): Likewise.
1202 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1203 (_mm_cvttps_pi32): Likewise.
1204 (_mm_cvtpi32_ps): Likewise.
1205 (_mm_cvtps_pi16): Likewise.
1206 (_mm_loadh_pi): Likewise.
1207 (_mm_storeh_pi): Likewise.
1208 (_mm_movehl_ps): Likewise.
1209 (_mm_movelh_ps): Likewise.
1210 (_mm_loadl_pi): Likewise.
1211 (_mm_storel_pi): Likewise.
1212 (_mm_movemask_ps): Likewise.
1213 (_mm_shuffle_pi16): Likewise.
1214
1215 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1216
1217 PR target/72782
1218 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1219 __builtin_ia32_vfnmsubpd512_mask.
1220 (_mm512_mask_fnmsub_round_pd): Likewise.
1221 (_mm512_fnmsub_pd): Likewise.
1222 (_mm512_mask_fnmsub_pd): Likewise.
1223 (_mm512_maskz_fnmsub_round_pd): Use
1224 __builtin_ia32_vfnmsubpd512_maskz.
1225 (_mm512_maskz_fnmsub_pd): Likewise.
1226 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1227 (_mm512_mask_fnmsub_round_ps): Likewise.
1228 (_mm512_fnmsub_ps): Likewise.
1229 (_mm512_mask_fnmsub_ps): Likewise.
1230 (_mm512_maskz_fnmsub_round_ps): Use
1231 __builtin_ia32_vfnmsubps512_maskz.
1232 (_mm512_maskz_fnmsub_ps): Likewise.
1233 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1234 __builtin_ia32_vfnmsubpd256_mask.
1235 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1236 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1237 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1238 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1239 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1240 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1241 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1242 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1243 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1244 __builtin_ia32_vfnmsubpd.
1245 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1246 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1247 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1248 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1249 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1250 * config/i386/i386-builtin.def: Add
1251 __builtin_ia32_vfnmsubpd256_mask,
1252 __builtin_ia32_vfnmsubpd256_maskz,
1253 __builtin_ia32_vfnmsubpd128_mask,
1254 __builtin_ia32_vfnmsubpd128_maskz,
1255 __builtin_ia32_vfnmsubps256_mask,
1256 __builtin_ia32_vfnmsubps256_maskz,
1257 __builtin_ia32_vfnmsubps128_mask,
1258 __builtin_ia32_vfnmsubps128_maskz,
1259 __builtin_ia32_vfnmsubpd512_mask,
1260 __builtin_ia32_vfnmsubpd512_maskz,
1261 __builtin_ia32_vfnmsubps512_mask,
1262 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1263 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1264 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1265 __builtin_ia32_vfnmsubpd256.
1266 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1267 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1268 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1269 Likewise.
1270 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1271 Likewise.
1272 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1273 Likewise.
1274 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1275
1276 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1277
1278 PR target/72782
1279 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1280 __builtin_ia32_vfnmaddpd512_mask.
1281 (_mm512_mask_fnmadd_round_pd): Likewise.
1282 (_mm512_fnmadd_pd): Likewise.
1283 (_mm512_mask_fnmadd_pd): Likewise.
1284 (_mm512_maskz_fnmadd_round_pd): Use
1285 __builtin_ia32_vfnmaddpd512_maskz.
1286 (_mm512_maskz_fnmadd_pd): Likewise.
1287 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1288 (_mm512_mask_fnmadd_round_ps): Likewise.
1289 (_mm512_fnmadd_ps): Likewise.
1290 (_mm512_mask_fnmadd_ps): Likewise.
1291 (_mm512_maskz_fnmadd_round_ps): Use
1292 __builtin_ia32_vfnmaddps512_maskz.
1293 (_mm512_maskz_fnmadd_ps): Likewise.
1294 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1295 __builtin_ia32_vfnmaddpd256_mask.
1296 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1297 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1298 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1299 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1300 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1301 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1302 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1303 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1304 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1305 __builtin_ia32_vfnmaddpd.
1306 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1307 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1308 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1309 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1310 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1311 * config/i386/i386-builtin.def: Add
1312 __builtin_ia32_vfnmaddpd256_mask,
1313 __builtin_ia32_vfnmaddpd256_maskz,
1314 __builtin_ia32_vfnmaddpd128_mask,
1315 __builtin_ia32_vfnmaddpd128_maskz,
1316 __builtin_ia32_vfnmaddps256_mask,
1317 __builtin_ia32_vfnmaddps256_maskz,
1318 __builtin_ia32_vfnmaddps128_mask,
1319 __builtin_ia32_vfnmaddps128_maskz,
1320 __builtin_ia32_vfnmaddpd512_mask,
1321 __builtin_ia32_vfnmaddpd512_maskz,
1322 __builtin_ia32_vfnmaddps512_mask,
1323 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1324 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1325 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1326 __builtin_ia32_vfnmaddpd256.
1327 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1328 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1329 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1330 Likewise.
1331 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1332 Likewise.
1333 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1334 Likewise.
1335 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1336
1337 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1338
1339 PR target/72782
1340 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1341 __builtin_ia32_vfmsubpd512_mask.
1342 (_mm512_mask_fmsub_round_pd): Likewise.
1343 (_mm512_fmsub_pd): Likewise.
1344 (_mm512_mask_fmsub_pd): Likewise.
1345 (_mm512_maskz_fmsub_round_pd): Use
1346 __builtin_ia32_vfmsubpd512_maskz.
1347 (_mm512_maskz_fmsub_pd): Likewise.
1348 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1349 (_mm512_mask_fmsub_round_ps): Likewise.
1350 (_mm512_fmsub_ps): Likewise.
1351 (_mm512_mask_fmsub_ps): Likewise.
1352 (_mm512_maskz_fmsub_round_ps): Use
1353 __builtin_ia32_vfmsubps512_maskz.
1354 (_mm512_maskz_fmsub_ps): Likewise.
1355 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1356 __builtin_ia32_vfmsubpd256_mask.
1357 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1358 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1359 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1360 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1361 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1362 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1363 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1364 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1365 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1366 __builtin_ia32_vfmsubpd.
1367 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1368 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1369 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1370 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1371 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1372 * config/i386/i386-builtin.def: Add
1373 __builtin_ia32_vfmsubpd256_mask,
1374 __builtin_ia32_vfmsubpd256_maskz,
1375 __builtin_ia32_vfmsubpd128_mask,
1376 __builtin_ia32_vfmsubpd128_maskz,
1377 __builtin_ia32_vfmsubps256_mask,
1378 __builtin_ia32_vfmsubps256_maskz,
1379 __builtin_ia32_vfmsubps128_mask,
1380 __builtin_ia32_vfmsubps128_maskz,
1381 __builtin_ia32_vfmsubpd512_mask,
1382 __builtin_ia32_vfmsubpd512_maskz,
1383 __builtin_ia32_vfmsubps512_mask,
1384 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1385 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1386 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1387 __builtin_ia32_vfmsubpd256.
1388 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1389 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1390 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1391 Likewise.
1392 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1393 Likewise.
1394 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1395 Likewise.
1396 (fmai_vmfmsub_<mode><round_name>): Likewise.
1397
1398 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1399
1400 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1401 Remove plus. Renamed to ...
1402 (*sub<mode>3<mask_name>_bcst): This.
1403 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1404 (*add<mode>3<mask_name>_bcst): This.
1405
1406 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1407
1408 PR target/72782
1409 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1410
1411 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1412
1413 PR target/87662
1414 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1415 (_mm_or_epi32): Likewise.
1416 (_mm256_xor_epi32): Likewise.
1417 (_mm_xor_epi32): Likewise.
1418 (_mm256_or_epi64): Likewise.
1419 (_mm_or_epi64): Likewise.
1420 (_mm256_xor_epi64): Likewise.
1421 (_mm_xor_epi64): Likewise.
1422
1423 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1424
1425 PR target/72782
1426 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1427
1428 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1429
1430 PR middle-end/87647
1431 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1432
1433 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1434
1435 * doc/ux.texi: Move @section directly after @node.
1436
1437 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR middle-end/85488
1440 PR middle-end/87649
1441 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1442 depend closely nested inside of loop with ordered clause with
1443 a parameter.
1444
1445 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1446
1447 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1448 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1449 * doc/ux.texi: New file.
1450
1451 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1452
1453 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1454 be the first CR field allocated.
1455
1456 2018-10-19 Richard Biener <rguenther@suse.de>
1457
1458 PR target/87657
1459 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1460 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1461
1462 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1463
1464 PR target/72782
1465 * config/i386/sse.md
1466 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1467 (*add<mode>3<mask_name>_bcst_2): Likewise.
1468
1469 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1470
1471 * config/i386/sse.md
1472 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1473 Replace nonimmediate_operand with register_operand.
1474 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1475 Likewise.
1476 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1477 Likewise.
1478
1479 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1480
1481 PR rtl-optimization/87596
1482 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1483 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1484 for instructions in FROM..TO range.
1485
1486 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1487
1488 * cfgexpand.c (expand_one_var): Use specific wording in error message
1489 for non-local frame variables.
1490 * stor-layout.c (layout_decl): Do not issue a warning for them.
1491
1492 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1493
1494 * haifa-sched.c (priority): Add force_recompute parameter.
1495 (apply_replacement): Call priority () with force_recompute = true.
1496 (restore_pattern): Likewise.
1497
1498 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1501 HOST_BITS_PER_WIDE_INT.
1502 (test_vector_ops_duplicate): Likewise.
1503
1504 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1505
1506 PR target/72782
1507 * config/i386/sse.md (VF_AVX512): New.
1508 (avx512bcst): Likewise.
1509 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1510 Likewise.
1511 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1512 Likewise.
1513 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1514 Likewise.
1515
1516 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1517
1518 * doc/invoke.texi (-dumpversion): Improve grammar.
1519 (-dumpfullversion): Make more consistent with -dumpversion.
1520
1521 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1522
1523 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1524 Set JUMP_LABEL to the jump insn.
1525 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1526 Predict emitted jump and add label to jump insn.
1527
1528 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1529
1530 PR tree-optimization/87562
1531 * input.c (get_substring_ranges_for_loc): Use
1532 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1533 getting the linemap for the endpoint. Verify that it's either
1534 in the same linemap as the start point's spelling location, or
1535 at least in the same file.
1536
1537 2018-10-18 Richard Biener <rguenther@suse.de>
1538
1539 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1540 feed width-specific load/store costs through ix86_vec_cost.
1541 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1542 (k8_cost): Likewise.
1543 (bdver_cost): Likewise.
1544 (znver1_cost): Likewise.
1545 (btver1_cost): Likewise.
1546 (btver2_cost): Likewise.
1547
1548 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1549
1550 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1551 to simplify subreg of vec_merge.
1552
1553 2018-10-18 Richard Biener <rguenther@suse.de>
1554
1555 * config/i386/i386.c: Fix costing of vector FMA.
1556
1557 2018-10-18 Richard Biener <rguenther@suse.de>
1558
1559 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1560 and argument.
1561 (ix86_builtin_vectorization_cost): For vec_construct properly
1562 cost insertion into SSE regs.
1563 (...): Adjust calls to ix86_vec_cost.
1564
1565 2018-10-18 Richard Biener <rguenther@suse.de>
1566
1567 PR middle-end/87087
1568 Revert
1569 2018-02-07 Richard Biener <rguenther@suse.de>
1570
1571 PR tree-optimization/84204
1572 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1573 this place.
1574
1575 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1576
1577 PR target/87537
1578 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1579 of vec_duplicate.
1580 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1581 VEC_MERGE of a VEC_DUPLICATE.
1582
1583 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1584
1585 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1586 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1587 * doc/standards.texi (C Language): Document C2X.
1588 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1589 (rl78_option_override): Handle "GNU C2X" language name.
1590
1591 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1592
1593 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1594 Document C17 as published in 2018.
1595
1596 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1597
1598 PR middle-end/87623
1599 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1600 bail out if both sides do not have the same storage order.
1601
1602 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1603
1604 * bitmap.c (bitmap_head::dump): New.
1605 * bitmap.h (bitmap_head): Add dump().
1606 * gimple-ssa-evrp-analyze.c
1607 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1608 (evrp_range_analyzer::set_ssa_range_info): Same.
1609 (evrp_range_analyzer::record_ranges_from_phis): Same.
1610 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1611 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1612 * gimple-ssa-sprintf.c (get_int_range): Same.
1613 (format_integer): Same.
1614 (sprintf_dom_walker::handle_gimple_call): Same.
1615 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1616 (ipcp_vr_lattice::top_p): Same.
1617 (ipcp_vr_lattice::bottom_p): Same.
1618 (ipcp_vr_lattice::set_to_bottom): Same.
1619 (ipa_vr_operation_and_type_effects): Same.
1620 (propagate_vr_across_jump_function): Same.
1621 (ipcp_store_vr_results): Same.
1622 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1623 (ipa_print_node_jump_functions_for_edge): Same.
1624 (ipa_get_value_range): Same.
1625 (ipa_compute_jump_functions_for_edge): Same.
1626 (ipa_write_jump_function): Same.
1627 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1628 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1629 Same.
1630 * vr-values.c (set_value_range_to_nonnegative): Same.
1631 (set_value_range_to_truthvalue): Same.
1632 (vr_values::get_value_range): Same.
1633 (vr_values::set_defs_to_varying): Same.
1634 (vr_values::update_value_range): Same.
1635 (symbolic_range_based_on_p): Same.
1636 (vr_values::op_with_boolean_value_range_p): Same.
1637 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1638 (vr_values::extract_range_from_ssa_name): Same.
1639 (vr_values::extract_range_from_binary_expr): Same.
1640 (vr_values::extract_range_from_unary_expr): Same.
1641 (vr_values::extract_range_from_cond_expr): Same.
1642 (vr_values::extract_range_from_comparison): Same.
1643 (vr_values::check_for_binary_op_overflow): Same.
1644 (vr_values::extract_range_basic): Same.
1645 (vr_values::extract_range_from_assignment): Same.
1646 (compare_ranges): Same.
1647 (compare_range_with_value): Same.
1648 (vr_values::adjust_range_with_scev): Same.
1649 (vrp_valueize): Same.
1650 (vrp_valueize_1): Same.
1651 (vr_values::get_vr_for_comparison): Same.
1652 (vr_values::compare_name_with_value): Same.
1653 (vr_values::compare_names): Same.
1654 (vr_values::vrp_evaluate_conditional): Same.
1655 (find_case_label_ranges): Same.
1656 (vr_values::vrp_visit_switch_stmt): Same.
1657 (vr_values::extract_range_from_phi_node): Same.
1658 (vr_values::simplify_div_or_mod_using_ranges): Same.
1659 (vr_values::simplify_bit_ops_using_ranges): Same.
1660 (test_for_singularity): Same.
1661 (range_fits_type_p): Same.
1662 (vr_values::simplify_cond_using_ranges_1): Same.
1663 (vr_values::simplify_switch_using_ranges): Same.
1664 (vr_values::simplify_float_conversion_using_ranges): Same.
1665 (vr_values::two_valued_val_range_p): Same.
1666 (vr_values::add_equivalence): Move to value_range::equiv_add.
1667 * vr-values.h (vr_values::add_equivalence): Remove.
1668 (VR_INITIALIZER): Remove.
1669 * tree-vrp.c (value_range::set): New.
1670 (value_range::equiv_add): New.
1671 (value_range::value_range): New.
1672 (value_range::deep_copy): New.
1673 (value_range::check): New.
1674 (value_range::equal_p): New.
1675 (value_range::ignore_equivs_equal_p): New.
1676 (value_range::operator==): New.
1677 (value_range::operator!=): New.
1678 (value_range::symbolic_p): New.
1679 (value_range::numeric_p): New.
1680 (value_range::set_undefined): New.
1681 (value_range::set_varying): New.
1682 (value_range::may_contain_p): New.
1683 (value_range::equiv_clear): New.
1684 (value_range::singleton_p): New.
1685 (value_range::intersect): New.
1686 (value_range::dump): New.
1687 (value_range::set_and_canonicalize): New.
1688 (set_value_range): Adjust for value_range API.
1689 (set_value_range_to_undefined): Same.
1690 (set_value_range_to_varying): Same.
1691 (set_and_canonicalize_value_range): Same.
1692 (set_value_range_to_nonnull): Same.
1693 (set_value_range_to_null): Same.
1694 (range_is_null): Same.
1695 (range_is_nonnull): Same.
1696 (range_int_cst_p): Same.
1697 (range_int_cst_singleton_p): Same.
1698 (symbolic_range_p): Same.
1699 (range_includes_zero_p): Same.
1700 (value_range_constant_singleton): Same.
1701 (vrp_set_zero_nonzero_bits): Same.
1702 (ranges_from_anti_range): Same.
1703 (extract_range_into_wide_ints): Same.
1704 (extract_range_from_multiplicative_op): Same.
1705 (set_value_range_with_overflow): Same.
1706 (extract_range_from_binary_expr_1): Same.
1707 (extract_range_from_unary_expr): Same.
1708 (dump_value_range): Same.
1709 (debug_value_range): Same.
1710 (vrp_prop::check_array_ref): Same.
1711 (vrp_prop::check_mem_ref): Same.
1712 (vrp_prop::vrp_initialize): Same.
1713 (vrp_prop::visit_stmt): Same.
1714 (intersect_ranges): Same.
1715 (vrp_prop::visit_phi): Same.
1716 (vrp_prop::vrp_finalize): Same.
1717 (determine_value_range_1): Same.
1718 (determine_value_range): Same.
1719 (vrp_intersect_ranges_1): Rename to...
1720 (vrp_intersect_1): this.
1721 (vrp_intersect_ranges): Rename to...
1722 (value_range::intersect_helper): ...this.
1723 (vrp_meet_1): Rename to...
1724 (value_range::union_helper): ...this.
1725 (vrp_meet): Rename to...
1726 (value_range::union_): ...this.
1727 (copy_value_range): Remove.
1728 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1729 (value_range::vrtype): New.
1730 (value_range::type): New.
1731 (value_range::equiv): New.
1732 (value_range::min): New.
1733 (value_range::max): New.
1734 (value_range::varying_p): New.
1735 (value_range::undefined_p): New.
1736 (value_range::null_p): New.
1737 (value_range::equiv_add): New.
1738 (copy_value_range): Remove.
1739
1740 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1741
1742 * Makefile.in (SELFTEST_TARGETS): New.
1743 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1744 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1745 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1746 c/Make-lang.in.
1747 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1748 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1749 cp/Make-lang.in.
1750 * configure: Regenerate.
1751 * configure.ac (selftest_languages): New.
1752
1753 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1754
1755 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1756 overflow wraps argument.
1757 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1758 wide_int_range_multiplicative_op.
1759 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1760 overflow wraps argument.
1761 (wide_int_range_multiplicative_op): Same.
1762 (wide_int_range_lshift): Same.
1763 (wide_int_range_div): Same.
1764 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1765 (wide_int_range_lshift): Same.
1766 (wide_int_range_div): Same.
1767
1768 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1769
1770 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1771 use sign as argument.
1772 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1773 wide_int_range_shift_undefined_p.
1774
1775 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1776
1777 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1778 Rename to...
1779 (@despeculate_copy<ALLI_TI:mode>): ... This.
1780 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1781 switch statement.
1782
1783 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1784
1785 * config.gcc: Obsolete *-*-solaris2.10*.
1786 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1787
1788 2018-10-12 Jeff Law <law@redhat.com>
1789
1790 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1791 reg + sym +- const_int addressing modes.
1792
1793 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1794
1795 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1796 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1797 margin width.
1798 (layout::start_annotation_line): Only print up to 3 of the
1799 margin character, to avoid touching the left-hand side.
1800 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1801 minimum margin width, as set by test_diagnostic_context's ctor.
1802 (selftest::test_fixit_insert_containing_newline): Likewise.
1803 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1804 (selftest::test_line_numbers_multiline_range): Clear
1805 dc.min_margin_width.
1806 * diagnostic.c (diagnostic_initialize): Initialize
1807 min_margin_width.
1808 * diagnostic.h (struct diagnostic_context): Add field
1809 "min_margin_width".
1810 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1811 * opts.c (common_handle_option): Handle
1812 OPT_fdiagnostics_minimum_margin_width_.
1813 * selftest-diagnostic.c
1814 (selftest::test_diagnostic_context::test_diagnostic_context):
1815 Initialize min_margin_width to 6.
1816 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1817
1818 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1819
1820 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1821 Fix usage of "error_at_rich_loc" in the comment.
1822
1823 2018-10-15 Renlin Li <renlin.li@arm.com>
1824
1825 PR target/87563
1826 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1827 if-conversioned loop when it contains ifn with types not
1828 supported by backend.
1829 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1830 (direct_internal_fn_supported_p): New helper function.
1831 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1832
1833 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1834
1835 PR target/87572
1836 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1837 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1838 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1839
1840 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1841
1842 PR tree-optimization/87022
1843 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1844 bits in dist vector rather than the first one.
1845
1846 2018-10-15 Richard Biener <rguenther@suse.de>
1847
1848 PR middle-end/87610
1849 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1850 (visit_loadstore): When a used restrict tag escaped verify that
1851 the points-to solution of "other" pointers do not include
1852 escaped.
1853 (compute_dependence_clique): If a used restrict tag escaped
1854 communicated that down to visit_loadstore.
1855
1856 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1857
1858 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1859 into reg if it isn't a general operand.
1860
1861 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1862
1863 PR target/87599
1864 * config/i386/sse.md (*vec_dupv2di): Add register source to
1865 movddup.
1866
1867 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1868
1869 PR target/87572
1870 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1871 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1872 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1873 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1874
1875 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1876
1877 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1878 (notice_args_size): Set it in the current trace if no insn that can
1879 throw internally has been seen yet.
1880 (connect_traces): When connecting args_size between traces, allow the
1881 incoming values not to match if there is an insn setting it before the
1882 first insn that can throw internally; in that case, force the creation
1883 of a CFI note on this latter insn.
1884
1885 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1886
1887 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1888 the base class, because using the injected-class-name was not clearly
1889 specified until DR 176.
1890
1891 2018-10-12 Paul Koning <ni1d@arrl.net>
1892
1893 * config/pdp11/pdp11.md (doloop_end): New expander.
1894 (doloop_end_insn): renamed from "doloop_end".
1895 (addqi3): New pattern.
1896 (subqi3): New pattern.
1897 * config/pdp11/predicates.md (incdec_operand): New predicate.
1898
1899 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1900
1901 PR middle-end/81376
1902 * real.c (format_helper::can_represent_integral_type_p): New function
1903 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1904 * match.pd: New pattern.
1905
1906 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1907
1908 * configure.ac: Introduce --enable-large-address-aware
1909 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1910 * doc/install.texi: Document it.
1911 * configure, config.in: Rebuilt.
1912 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1913 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1914 (LINK_SPEC): Insert it.
1915 * config/i386/mingw-w64.h: Likewise.
1916
1917 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1918
1919 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1920
1921 PR rtl-optimization/87600
1922 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1923
1924 2018-10-12 Paul Koning <ni1d@arrl.net>
1925
1926 * doc/md.texi (doloop_end): Document that the pattern code may
1927 need to check operand mode.
1928
1929 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1930
1931 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1932 to zero-extend between int and floating-point registers.
1933 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1934 ldp into floating-point registers. Add type and arch attributes.
1935 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1936 Use f_loads for type attribute.
1937
1938 2018-10-11 Martin Sebor <msebor@redhat.com>
1939
1940 * doc/extend.texi (attribute packed): Correct typos.
1941
1942 2018-10-11 Martin Sebor <msebor@redhat.com>
1943
1944 * doc/extend.texi (attribute flatten): Mention interaction with
1945 noinline.
1946
1947 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1948
1949 PR target/87156
1950 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1951 Set new_decl virtual flag to zero.
1952
1953 2018-10-11 Martin Sebor <msebor@redhat.com>
1954
1955 PR middle-end/87593
1956 * doc/extend.texi (attribute format_arg): Discuss using multiple
1957 attributes on a single function.
1958
1959 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1960
1961 PR tree-optimization/86829
1962 * match.pd (sin (atan (x))): New simplification rules.
1963 (cos (atan (x))): Likewise.
1964 * real.c (build_sinatan_real): New function.
1965 * real.h (build_sinatan_real): Prototype.
1966
1967 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1968
1969 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1970 function.
1971 (fold_mergeeo_helper): New helper function.
1972 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1973 intrinsics. Correct some whitespace indentation issues.
1974
1975 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1976
1977 PR target/87511
1978 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1979 Use HOST_WIDE_INT_1U for shift.
1980
1981 2018-10-11 Doug Rupp <rupp@adacore.com>
1982 Olivier Hainque <hainque@adacore.com>
1983
1984 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1985 Pass --relax to the linker for RTPs.
1986 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1987
1988 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1989 Jan Hubicka <jh@suse.cz>
1990 Martin Jambor <mjambor@suse.cz>
1991
1992 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1993 the same elements are repeated rather than printing all of them.
1994 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1995 "repeated" elements.
1996 * read-rtl-function.c (test_loading_repeat): New function.
1997 (read_rtl_function_c_tests): Call test_loading_repeat.
1998 * rtl-tests.c (test_dumping_repeat): New function.
1999 (rtl_tests_c_tests): Call test_dumping_repeat.
2000
2001 2018-10-11 Richard Biener <rguenther@suse.de>
2002
2003 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2004 bdver?_cost): Unify to ...
2005 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2006 * config/i386/i386.c (processor_cost_table): Adjust.
2007
2008 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 PR middle-end/87574
2011 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2012 the thunk when expanding to GIMPLE.
2013
2014 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2015
2016 * varasm.c (mergeable_string_section): Don't try to move zero-length
2017 strings to the merge section.
2018
2019 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2020
2021 PR target/87573
2022 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2023
2024 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2025
2026 PR target/87550
2027 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2028 to special_args set.
2029
2030 2018-10-10 Richard Biener <rguenther@suse.de>
2031
2032 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2033 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2034 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2035 and recursing and pattern terminating the recursion on SSE
2036 vector width using ix86_expand_reduc.
2037 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2038 width and recursing and SSE2 vector variant doing the final
2039 reduction with ix86_expand_reduc.
2040 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2041 with terminating the recursion at AVX level, splitting that
2042 to SSE there.
2043
2044 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2045
2046 * genmatch.c (error_cb): Rename to...
2047 (diagnostic_cb): ...this, converting int params to enums.
2048 (fatal_at): Update for renaming.
2049 (warning_at): Likewise.
2050 (main): Likewise.
2051 * input.c (selftest::ebcdic_execution_charset::apply):
2052 Update for renaming of...
2053 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2054 to...
2055 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2056 converting level and reason to enums.
2057 (class selftest::lexer_error_sink): Rename to...
2058 (class selftest::lexer_test_options): ...this, renaming field
2059 "m_errors" to "m_diagnostics".
2060 (selftest::lexer_test_options::apply): Update for renaming of...
2061 (selftest::lexer_test_options::on_error): ...this, renaming to...
2062 (selftest::lexer_test_options::on_diagnostic): ...this
2063 converting level and reason to enums.
2064 (selftest::test_lexer_string_locations_raw_string_unterminated):
2065 Update for renamings.
2066 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2067 "reason".
2068
2069 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2070
2071 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2072 * config/rs6000/pmmintrin.h: New file.
2073
2074 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2075
2076 PR tree-optimization/86659
2077 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2078
2079 2018-10-09 Richard Biener <rguenther@suse.de>
2080
2081 PR tree-optimization/63155
2082 * tree-ssa-structalias.c: Include tree-ssa.h.
2083 (get_constraint_for_ssa_var): For undefs return nothing_id.
2084 (find_func_aliases): Cleanup PHI handling.
2085
2086 2018-10-09 Richard Biener <rguenther@suse.de>
2087
2088 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2089 replacements.
2090
2091 2018-10-09 Martin Liska <mliska@suse.cz>
2092
2093 * asan.c (asan_emit_stack_protection): If a stack variable
2094 is located in a same file as current function, then emit
2095 line info into variable definition string.
2096
2097 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2098
2099 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2100 information.
2101
2102 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2103
2104 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2105 on the thunk.
2106
2107 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2108
2109 PR tree-optimization/86659
2110 * gimple-match.h (struct gimple_match_op): Add reverse field.
2111 (gimple_match_op::set_op): New overloaded method.
2112 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2113 the REF_REVERSE_STORAGE_ORDER flag on the value.
2114 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2115 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2116
2117 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2118
2119 PR middle-end/63155
2120 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2121 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2122
2123 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2124
2125 PR target/87517
2126 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2127 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2128
2129 2018-10-08 Richard Biener <rguenther@suse.de>
2130
2131 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2132 cost the same as AVX128 ones.
2133
2134 2018-10-08 Paul Koning <ni1d@arrl.net>
2135
2136 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2137 (expand_block_move): New function.
2138 * config/pdp11/pdp11.c (output_block_move): Remove.
2139 (expand_block_move): New function.
2140 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2141 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2142 (*movmemhi1): Remove.
2143
2144 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2145
2146 * config/s390/2827.md: Increase latencies for some FP instructions.
2147
2148 2018-10-08 Richard Biener <rguenther@suse.de>
2149
2150 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2151 Open a dump scope.
2152 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2153 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2154 (add_stmt_cost): Dump return value of the hook.
2155
2156 2018-10-08 Richard Biener <rguenther@suse.de>
2157
2158 PR tree-optimization/63155
2159 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2160 (ssa_propagation_engine::ssa_propagate): Remove redundant
2161 bitmap bit clearing.
2162
2163 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2164
2165 PR rtl-optimization/86939
2166 PR rtl-optimization/87479
2167 * ira.h (non_conflicting_reg_copy_p): New prototype.
2168 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2169 (make_hard_regno_dead): Don't add conflicts for register
2170 ignore_reg_for_conflicts.
2171 (make_object_dead): Likewise.
2172 (non_conflicting_reg_copy_p): New function.
2173 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2174 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2175 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2176 (make_hard_regno_dead): Don't add conflicts for register
2177 ignore_reg_for_conflicts. Remove special conflict handling of
2178 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2179 check_pic_pseudo_p and update callers.
2180 (mark_pseudo_dead): Don't add conflicts for register
2181 ignore_reg_for_conflicts.
2182 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2183
2184 2018-10-05 Andrew Waterman <andrew@sifive.com>
2185 Jim Wilson <jimw@sifive.com>
2186
2187 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2188 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2189 new pattern using HONOR_SNANS that emits one extra instruction.
2190
2191 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2192
2193 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2194 patterns): Merge SI and DI patterns to a GPR pattern.
2195 (unnamed define_insn and define_split for record form of that): Merge
2196 to a single define_insn_and_split pattern.
2197
2198 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2199
2200 PR c++/56856
2201 * input.c (expand_location_to_spelling_point): Add param "aspect"
2202 and use rather than hardcoding LOCATION_ASPECT_CARET.
2203 (get_substring_ranges_for_loc): Handle the case of a single token
2204 within a macro expansion.
2205 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2206 defaulting to LOCATION_ASPECT_CARET.
2207
2208 2018-10-05 Paul Koning <ni1d@arrl.net>
2209
2210 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2211 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2212 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2213 (pdp11_guard_type): New function.
2214
2215 2018-10-05 Paul Koning <ni1d@arrl.net>
2216
2217 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2218 * config/pdp11/pdp11.opt (mfloat32): Remove.
2219 (mfloat64): Remove.
2220 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2221 (pdp11 -mfloat64): Remove.
2222
2223 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2224
2225 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2226 (*cmp<mode>_cc_i387): Ditto.
2227 (*cmpu<mode>_cc_i387): Ditto.
2228 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2229 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2230 "scratch" argument.
2231 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2232 Emit x86_sahf_1 pattern.
2233 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2234 (ix86_expand_carry_flag_compare): Ditto.
2235
2236 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2237
2238 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2239 to reg_or_0_operand. Add "C" constraint.
2240 (*cmpxf_cc_i387): Ditto.
2241 (*cmp<mode>_i387): Change operand 2 predicate
2242 to nonimm_or_0_operand. Add "C" constraint.
2243 (*cmp<mode>_cc_i387): Ditto.
2244 (*cmp<mode>_0_i387): Remove insn pattern.
2245 (*cmp<mode>_0_cc_i387): Ditto.
2246
2247 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2248
2249 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2250 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2251 from vector_move_operand. Update all uses.
2252
2253 2018-10-05 Martin Sebor <msebor@redhat.com>
2254
2255 PR tree-optimization/87490
2256 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2257 consistently.
2258
2259 2018-10-05 Richard Biener <rguenther@suse.de>
2260
2261 PR tree-optimization/63155
2262 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2263 vertical space in dumpfiles.
2264 * tree-ssa-propagate.h
2265 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2266 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2267 (ssa_edge_worklist_back): Likewise.
2268 (curr_order): Likewise.
2269 (cfg_blocks_get): Remove abstraction.
2270 (cfg_blocks_add): Likewise.
2271 (cfg_blocks_empty_p): Likewise.
2272 (add_ssa_edge): Add to current or next worklist based on
2273 RPO index.
2274 (add_control_edge): Likewise.
2275 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2276 into ...
2277 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2278 iteration from CFG and SSA edge worklist so we process
2279 everything in RPO order, prioritizing forward progress
2280 over iteration.
2281 (ssa_prop_init): Allocate new worklists, do not dump
2282 immediate uses.
2283 (ssa_prop_fini): Free new worklists.
2284
2285 2018-10-05 Richard Biener <rguenther@suse.de>
2286
2287 * tree-core.h (tree_block::abstract_flag): Remove.
2288 (tree_block::block_num): Make full 32bits.
2289 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2290 * tree.h (BLOCK_ABSTRACT): Remove.
2291 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2292 resulting from BLOCK_ABSTRACT being always false.
2293 (gen_inlined_subroutine_die): Likewise.
2294 (gen_block_die): Likewise.
2295 * tree.c (block_ultimate_origin): Likewise.
2296 * tree-pretty-print.c (dump_block_node): Remove code dealing
2297 with BLOCK_ABSTRACT.
2298 * tree-ssa-live.c (dump_scope_block): Likewise.
2299 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2300 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2301
2302 2018-10-05 Richard Biener <rguenther@suse.de>
2303
2304 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2305 is asked for initialize mode to the component mode of the
2306 vector type.
2307
2308 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2309
2310 PR target/87522
2311 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2312 assembler for -mavx.
2313 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2314
2315 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2316
2317 PR target/87509
2318 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2319 RS6000_BTM_DFP.
2320 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2321 to be DImode. When using mffscrn, force the operand to a register.
2322
2323 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2324
2325 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2326 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2327 X87MODEF mode iterator.
2328 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2329 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2330 X87MODEF mode iterator.
2331
2332 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2333
2334 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2335 -Wno-prio-ctor-dtor.
2336
2337 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2338
2339 * Makefile.in (OBJS): Add opt-problem.o.
2340 * dump-context.h: Include "selftest.h.
2341 (selftest::temp_dump_context): New forward decl.
2342 (class dump_context): Make friend of class
2343 selftest::temp_dump_context.
2344 (dump_context::dump_loc_immediate): New decl.
2345 (class dump_pretty_printer): Move here from dumpfile.c.
2346 (class temp_dump_context): Move to namespace selftest.
2347 (temp_dump_context::temp_dump_context): Add param
2348 "forcibly_enable_dumping".
2349 (selftest::verify_dumped_text):
2350 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2351 (selftest::verify_item):
2352 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2353 (ASSERT_IS_TREE): Likewise.
2354 (ASSERT_IS_GIMPLE): Likewise.
2355 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2356 to...
2357 (dump_context::dump_loc_immediate): ...this new function.
2358 (class dump_pretty_printer): Move to dump-context.h.
2359 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2360 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2361 (temp_dump_context::temp_dump_context): Move to "selftest"
2362 namespace. Add param "forcibly_enable_dumping", and use it to
2363 conditionalize the use of m_pp;
2364 (selftest::verify_dumped_text): Make non-static.
2365 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2366 (selftest::verify_item): Make non-static.
2367 (ASSERT_IS_TEXT): Move to dump-context.h.
2368 (ASSERT_IS_TREE): Likewise.
2369 (ASSERT_IS_GIMPLE): Likewise.
2370 (selftest::test_capture_of_dump_calls): Pass "true" for new
2371 param of temp_dump_context.
2372 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2373 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2374 TDF_COMPARE_DEBUG.
2375 * opt-problem.cc: New file.
2376 * opt-problem.h: New file.
2377 * optinfo-emit-json.cc
2378 (selftest::test_building_json_from_dump_calls): Pass "true" for
2379 new param of temp_dump_context.
2380 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2381 (optinfo::emit_for_opt_problem): New function.
2382 (optinfo::emit): Clarity which emit_item is used.
2383 * optinfo.h (optinfo::get_dump_location): New accessor.
2384 (optinfo::emit_for_opt_problem): New decl.
2385 (optinfo::emit): Make const.
2386 * selftest-run-tests.c (selftest::run_tests): Call
2387 selftest::opt_problem_cc_tests.
2388 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2389 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2390 bool to opt_result, converting fprintf messages to
2391 opt_result::failure_at calls. Add "stmt" param for use by the
2392 failure_at calls.
2393 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2394 (runtime_alias_check_p): Convert return type from bool to
2395 opt_result, converting dump_printf calls to
2396 opt_result::failure_at, using the statement DDR_A for their
2397 location.
2398 (find_data_references_in_stmt): Convert return type from bool to
2399 opt_result, converting "return false" to opt_result::failure_at
2400 with a new message.
2401 * tree-data-ref.h: Include "opt-problem.h".
2402 (dr_analyze_innermost): Convert return type from bool to opt_result,
2403 and add a const gimple * param.
2404 (find_data_references_in_stmt): Convert return type from bool to
2405 opt_result.
2406 (runtime_alias_check_p): Likewise.
2407 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2408 dr_analyze_innermost.
2409 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2410 Convert return type from bool to opt_result, adding a message for
2411 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2412 (vect_analyze_data_ref_dependence): Convert return type from bool
2413 to opt_result. Change sense of return type from "false"
2414 effectively meaning "no problems" to "false" meaning a problem,
2415 so that "return false" becomes "return opt_result::success".
2416 Convert "return true" calls to opt_result::failure_at, using
2417 the location of statement A rather than vect_location.
2418 (vect_analyze_data_ref_dependences): Convert return type from bool
2419 to opt_result.
2420 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2421 calls to opt_result::failure_at, using the stmt location rather
2422 than vect_location.
2423 (vect_verify_datarefs_alignment): Convert return type from bool
2424 to opt_result.
2425 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2426 into multiple more-tightly-scoped copies.
2427 (vect_analyze_data_refs_alignment): Convert return type from bool
2428 to opt_result.
2429 (vect_analyze_data_ref_accesses): Likewise, converting a
2430 "return false" to a "return opt_result::failure_at", adding a
2431 new message.
2432 (vect_prune_runtime_alias_test_list): Convert return type from
2433 bool to opt_result, converting dump_printf_loc to
2434 opt_result::failure_at. Add a %G to show the pertinent statement,
2435 and use the stmt's location rather than vect_location.
2436 (vect_find_stmt_data_reference): Convert return type from
2437 bool to opt_result, converting dump_printf_loc to
2438 opt_result::failure_at, using stmt's location.
2439 (vect_analyze_data_refs): Convert return type from bool to
2440 opt_result. Convert "return false" to "return
2441 opt_result::failure_at", adding messages as needed.
2442 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2443 type from bool to opt_result.
2444 (vect_determine_vf_for_stmt): Likewise.
2445 (vect_determine_vectorization_factor): Likewise, converting
2446 dump_printf_loc to opt_result::failure_at, using location of phi
2447 rather than vect_location.
2448 (vect_analyze_loop_form_1): Convert return type from bool to
2449 opt_result, converting dump_printf_loc calls, retaining the use of
2450 vect_location.
2451 (vect_analyze_loop_form): Convert return type from loop_vec_info
2452 to opt_loop_vec_info.
2453 (vect_analyze_loop_operations): Convert return type from bool to
2454 opt_result, converting dump_printf_loc calls, using the location
2455 of phi/stmt rather than vect_location where available. Convert
2456 various "return false" to "return opt_result::failure_at" with
2457 "unsupported phi" messages.
2458 (vect_get_datarefs_in_loop): Convert return type from bool to
2459 opt_result. Add a message for the
2460 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2461 (vect_analyze_loop_2): Convert return type from bool to
2462 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2463 each "goto again;", adding new messages where needed.
2464 Add "unsupported grouped {store|load}" messages.
2465 (vect_analyze_loop): Convert return type from loop_vec_info to
2466 opt_loop_vec_info.
2467 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2468 bool to opt_result.
2469 * tree-vect-stmts.c (process_use): Likewise, converting
2470 dump_printf_loc call and using stmt location, rather than
2471 vect_location.
2472 (vect_mark_stmts_to_be_vectorized): Likeise.
2473 (vect_analyze_stmt): Likewise, adding a %G.
2474 (vect_get_vector_types_for_stmt): Convert return type from bool to
2475 opt_result, converting dump_printf_loc calls and using stmt
2476 location, rather than vect_location.
2477 (vect_get_mask_type_for_stmt): Convert return type from tree to
2478 opt_tree, converting dump_printf_loc calls and using stmt location.
2479 * tree-vectorizer.c: Include "opt-problem.h.
2480 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2481 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2482 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2483 enabled, use it to report at the top level "couldn't vectorize
2484 loop" followed by the problem.
2485 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2486 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2487 to opt_result.
2488 (vect_analyze_stmt): Likewise.
2489 (vect_get_vector_types_for_stmt): Likewise.
2490 (tree vect_get_mask_type_for_stmt): Likewise.
2491 (vect_analyze_data_ref_dependences): Likewise.
2492 (vect_enhance_data_refs_alignment): Likewise.
2493 (vect_analyze_data_refs_alignment): Likewise.
2494 (vect_verify_datarefs_alignment): Likewise.
2495 (vect_analyze_data_ref_accesses): Likewise.
2496 (vect_prune_runtime_alias_test_list): Likewise.
2497 (vect_find_stmt_data_reference): Likewise.
2498 (vect_analyze_data_refs): Likewise.
2499 (vect_analyze_loop): Convert return type from loop_vec_info to
2500 opt_loop_vec_info.
2501 (vect_analyze_loop_form): Likewise.
2502 (vect_analyze_slp): Convert return type from bool to opt_result.
2503
2504 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2505
2506 * doc/invoke.texi (-fopt-info): Document new "internals"
2507 sub-option.
2508 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2509 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2510 MSG_ALL_KINDS.
2511 (optinfo_verbosity_options): Add "internals".
2512 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2513 (dump_context::apply_dump_filter_p): New member function.
2514 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2515 explicitly masking the dump_kind.
2516 (dump_context::begin_scope): Increment the scope depth first. Use
2517 apply_dump_filter_p rather than explicitly masking the dump_kind.
2518 (dump_context::emit_item): Use apply_dump_filter_p rather than
2519 explicitly masking the dump_kind.
2520 (dump_dec): Likewise.
2521 (dump_hex): Likewise.
2522 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2523 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2524 (opt_info_switch_p): Update handling of default
2525 MSG_OPTIMIZED_LOCATIONS to cope with default of
2526 MSG_PRIORITY_USER_FACING.
2527 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2528 masking the dump_kind.
2529 (selftest::test_capture_of_dump_calls): Update test_dump_context
2530 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2531 than MSG_ALL. Generalize scope test to be run at all four
2532 combinations of with/without MSG_PRIORITY_USER_FACING and
2533 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2534 for each of the two values.
2535 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2536 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2537 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2538 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2539 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2540 with MSG_PRIORITY_*.
2541 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2542 dump messages as MSG_PRIORITY_USER_FACING.
2543 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2544 about the interaction with MSG_PRIORITY_*.
2545
2546 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2547
2548 * varasm.c (output_constant): Add new parameter merge_strings.
2549 Make strings properly zero terminated in merge string sections.
2550 (mergeable_string_section): Don't fail if the last char is non-zero.
2551 (assemble_variable_contents): Handle merge string sections.
2552 (assemble_variable): Likewise.
2553 (assemble_constant_contents): Likewise.
2554 (output_constant_def_contents): Likewise.
2555 (output_constructor_array_range,
2556 output_constructor_regular_field): Adjust call to output_constant.
2557 (output_object_block): Adjust call to assemble_constant_contents
2558 and assemble_variable_contents.
2559
2560 2018-10-04 Martin Liska <mliska@suse.cz>
2561
2562 PR c/87483
2563 * cgraphunit.c (process_function_and_variable_attributes):
2564 Warn about a function with alias attribute and a body.
2565
2566 2018-10-04 Martin Liska <mliska@suse.cz>
2567
2568 PR ipa/82625
2569 * multiple_target.c (redirect_to_specific_clone): New function.
2570 (ipa_target_clone): Use it.
2571 * tree-inline.c: Fix comment.
2572
2573 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2574
2575 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2576 fields.
2577 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2578 (gcc::dump_manager::register_pass): New member function, adapted
2579 from loop body in gcc::pass_manager::register_pass, adding a
2580 call to update_dfi_for_opt_info.
2581 (gcc::dump_manager::opt_info_enable_passes): Store the
2582 -fopt-info options into the new fields. Move the loop
2583 bodies into...
2584 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2585 function.
2586 * dumpfile.h (struct opt_pass): New forward decl.
2587 (gcc::dump_manager::register_pass): New decl.
2588 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2589 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2590 "m_optinfo_flags", and "m_optinfo_filename".
2591 * passes.c (gcc::pass_manager::register_pass): Move all of the
2592 dump-handling code to gcc::dump_manager::register_pass.
2593
2594 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2595
2596 PR rtl-optimization/87466
2597 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2598 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2599 * doc/tm.texi: Regenerate.
2600 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2601 * lra-lives.c (process_bb_lives): Likewise.
2602 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2603 Define.
2604
2605 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2606
2607 * params.c (add_params): Fix initialization.
2608
2609 2018-10-04 Martin Liska <mliska@suse.cz>
2610
2611 PR gcov-profile/84107
2612 * tree-profile.c (init_ic_make_global_vars):
2613 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2614 Come up with new ic_tuple* variables. Emit
2615 __gcov_indirect_call{,_topn} variables.
2616 (gimple_gen_ic_profiler): Access the variable
2617 and emit gimple.
2618 (gimple_gen_ic_func_profiler): Access
2619 __gcov_indirect_call.callee field.
2620 (gimple_init_gcov_profiler): Use ptr_type_node.
2621 * value-prof.c (gimple_ic): Use ptr_type_node.
2622
2623 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2624
2625 PR tree-optimization/85787
2626 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2627 into this function and add support for detecting multiple phis.
2628 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2629
2630 2018-10-04 Martin Liska <mliska@suse.cz>
2631
2632 PR ipa/87491
2633 * ipa-inline.c (inline_to_all_callers_1):
2634 Call ultimate_alias_target for node being inlined.
2635
2636 2018-10-03 Jeff Law <law@redhat.com>
2637
2638 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2639 target's wchar_t.
2640 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2641 * tree.h (get_typenode_from_name): Prototype.
2642
2643 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2644
2645 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2646 Change operand 2 predicate to nonimmediate_operand.
2647 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2648
2649 2018-10-03 Martin Sebor <msebor@redhat.com>
2650 Jeff Law <law@redhat.com>
2651
2652 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2653 initialize it.
2654 (get_string_length): Detect unterminated arrays.
2655 (format_string): Same.
2656 (format_directive): Warn about unterminated arrays.
2657 (handle_gimple_call): Mark statements with no_warning as needed.
2658
2659 2018-10-03 Jim Wilson <jimw@sifive.com>
2660
2661 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2662 also define __riscv_abi_rve. Delete trailing white space.
2663
2664 2018-10-03 Paul Koning <ni1d@arrl.net>
2665
2666 Enable LRA register allocator for PDP11.
2667 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2668 (R): Likewise.
2669 (D): Likewise.
2670 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2671 * config/pdp11/pdp11.opt (-mlra): New option.
2672 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2673
2674 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2675
2676 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2677 (*<absneg:code>extend<mode>xf2): Ditto.
2678
2679 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2680
2681 PR tree-optimization/87415
2682 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2683 precision fields.
2684
2685 2018-10-02 Jeff Law <law@redhat.com>
2686
2687 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2688 an unterminated string is discovered. Bubble up range
2689 even for unterminated strings.
2690 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2691 indicates the string was not terminated via NONSTR.
2692
2693 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2694
2695 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2696 pointer conversions.
2697 Do not do anything special for anti-ranges.
2698
2699 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2700
2701 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2702 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2703
2704 2018-10-03 Martin Liska <mliska@suse.cz>
2705
2706 PR gcov-profile/86109
2707 * coverage.c (coverage_begin_function): Do not
2708 mark lambdas as artificial.
2709 * tree-core.h (struct GTY): Remove tm_clone_flag
2710 and introduce new lambda_function.
2711 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2712
2713 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2714
2715 PR target/87474
2716 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2717 P8_VECTOR and VSX are enabled.
2718
2719 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2720
2721 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2722 0x3907 as CPU model number.
2723
2724 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2725
2726 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2727 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2728 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2729 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2730 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2731 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2732 value from arch12 to z14.
2733
2734 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2735
2736 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2737 (isinfxf2): Ditto.
2738 (isinf<mode>2): Ditto.
2739
2740 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2741
2742 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2743 before emitting fxam. Perform calculations in XFmode.
2744
2745 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2746
2747 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2748
2749 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2750
2751 PR middle-end/87319
2752 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2753 * tree.c (signed_or_unsigned_type_for): Handle complex.
2754
2755 2018-10-02 Jeff Law <law@redhat.com>
2756
2757 * gimple-fold.c (get_range_strlen): Remove dead code.
2758
2759 2018-10-02 Martin Sebor <msebor@redhat.com>
2760 Jeff Law <law@redhat.com>
2761
2762 * builtins.c (unterminated_array): Add new arguments.
2763 If argument is not terminated, bubble up size and exact
2764 state to callers.
2765 (expand_builtin_strnlen): Detect, avoid expanding
2766 and diagnose unterminated arrays.
2767 (c_strlen): Fill in offset of start of unterminated strings.
2768 * builtins.h (unterminated_array): Update prototype.
2769
2770 2018-10-02 Richard Biener <rguenther@suse.de>
2771
2772 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2773 of haddv4df, first reduce to SSE width and exploit the fact
2774 that we only need element zero with the reduction result.
2775 (reduc_plus_scal_v2df): Likewise.
2776
2777 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2778
2779 * dojump.h (do_jump): Delete.
2780 (do_jump_1): Likewise.
2781 (split_comparison): Move around.
2782 * dojump.c (do_jump): Make static.
2783 (do_jump_1): Likewise.
2784 (jumpifnot): Move around.
2785 (jumpifnot_1): Likewise.
2786 (jumpif): Likewise.
2787 (jumpif_1): Likewise.
2788 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2789
2790 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2791
2792 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2793 insns in the delay slot and add_insn_after for the jump insn.
2794
2795 2018-10-02 Richard Biener <rguenther@suse.de>
2796
2797 * tree-inline.c (expand_call_inline): Use the location of
2798 the callee declaration for the inline-entry marker.
2799 * final.c (notice_source_line): Remove special-casing of
2800 NOTE_INSN_INLINE_ENTRY.
2801
2802 2018-10-01 Carl Love <cel@us.ibm.com>
2803
2804 PR 69431
2805 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2806 (__builtin_mtfsb0): New.
2807 (__builtin_mtfsb1): New.
2808 ( __builtin_set_fpscr_rn): New.
2809 (__builtin_set_fpscr_drn): New.
2810 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2811 (rs6000_expand_set_fpscr_rn_builtin): Add.
2812 (rs6000_expand_set_fpscr_drn_builtin): Add.
2813 (rs6000_expand_builtin): Add case statement entries for
2814 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2815 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2816 RS6000_BUILTIN_MFFSL.
2817 (rs6000_init_builtins): Add ftype initialization and def_builtin
2818 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2819 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2820 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2821 rs6000_mffscdrn): Add define_insn.
2822 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2823 * doc/extend.texi: Add documentation for the builtins.
2824
2825 2018-10-01 Richard Biener <rguenther@suse.de>
2826
2827 PR tree-optimization/87465
2828 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2829 causing branch miscounts.
2830
2831 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2832
2833 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2834 aarch64_option_default_param): New.
2835 (params.h): Include.
2836 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2837 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2838 stack-clash protection validation code.
2839
2840 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2841
2842 * params.c (validate_param): New.
2843 (add_params): Use it.
2844 (set_param_value): Refactor param validation into validate_param.
2845 (diagnostic.h): Include.
2846 * diagnostic.h (diagnostic_ready_p): New.
2847
2848 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2849
2850 * params.c (set_param_value):
2851 Add index of parameter being validated.
2852 * common/common-target.def (option_validate_param): New.
2853 * common/common-targhooks.h (default_option_validate_param): New.
2854 * common/common-targhooks.c (default_option_validate_param): New.
2855 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2856 * doc/tm.texi: Regenerate.
2857
2858 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2859
2860 PR target/86486
2861 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2862 Add validation for stack-clash parameters and set defaults.
2863
2864 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2865
2866 PR target/86486
2867 * configure.ac: Add stack-clash-protection-guard-size.
2868 * doc/install.texi: Document it.
2869 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2870 * params.def: Update comment for guard-size.
2871 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2872 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2873 * configure: Regenerate.
2874
2875 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2876
2877 PR target/86486
2878 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2879 STACK_DYNAMIC_OFFSET): New.
2880 * config/aarch64/aarch64.c (aarch64_layout_frame):
2881 Update outgoing args size.
2882 (aarch64_stack_clash_protection_alloca_probe_range,
2883 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2884
2885 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2886
2887 PR target/86486
2888 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2889 probe ranges.
2890 * target.def (stack_clash_protection_alloca_probe_range): New.
2891 (stack_clash_protection_final_dynamic_probe): Remove.
2892 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2893 (default_stack_clash_protection_final_dynamic_probe): Remove.
2894 * targhooks.c: Likewise.
2895 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2896 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2897 * doc/tm.texi: Regenerate.
2898
2899 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2900
2901 PR target/86486
2902 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2903 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2904 aarch64_clamp_to_uimm12_shift): New.
2905 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2906 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2907
2908 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2909
2910 PR target/86486
2911 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2912
2913 2018-10-01 Jeff Law <law@redhat.com>
2914 Richard Sandiford <richard.sandiford@linaro.org>
2915 Tamar Christina <tamar.christina@arm.com>
2916
2917 PR target/86486
2918 * config/aarch64/aarch64.md
2919 (probe_stack_range): Add k (SP) constraint.
2920 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2921 STACK_CLASH_MAX_UNROLL_PAGES): New.
2922 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2923 stack probes for stack clash.
2924 (aarch64_allocate_and_probe_stack_space): New.
2925 (aarch64_expand_prologue): Use it.
2926 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2927 (aarch64_sub_sp): Add emit_move_imm optional param.
2928
2929 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2930
2931 PR tree-optimization/87261
2932 * match.pd: Remove trailing whitespace.
2933 Add (x & y) | ~(x | y) -> ~(x ^ y),
2934 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2935
2936 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2937
2938 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2939 constraints.
2940 (ashlsi3_insn): Update instruction constraints.
2941 (ashrsi3_insn): Likewise.
2942 (rotrsi3): Likewise.
2943 (add_shift): Likewise.
2944 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2945 avoids placing in the limm field small constants which, otherwise,
2946 could end into a small instruction.
2947
2948 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2949
2950 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2951 destination register is not odd-even.
2952 (umaddsidi4_split): Likewise.
2953
2954 2018-10-01 Richard Biener <rguenther@suse.de>
2955
2956 * tree-inline.c (expand_call_inline): Store origin of fn
2957 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2958 * tree.c (block_ultimate_origin): Simplify and do some
2959 checking.
2960
2961 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2962
2963 * config/i386/mmx.md (EMMS): New int iterator.
2964 (emms): New int attribute.
2965 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2966 EMMS int iterator. Explicitly declare clobbers.
2967 (mmx_emms): Remove expander.
2968 (mmx_femms): Ditto.
2969 * config/i386/predicates.md (emms_operation): Remove predicate.
2970 (vzeroall_pattern): New predicate.
2971 (vzeroupper_pattern): Rename from vzeroupper_operation.
2972 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2973 vzeroupper_pattern and vzeroall_pattern predicates.
2974
2975 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2976
2977 PR rtl-optimization/86939
2978 * ira-lives.c (make_hard_regno_born): Rename from this...
2979 (make_hard_regno_live): ... to this. Remove update to conflict
2980 information. Update function comment.
2981 (make_hard_regno_dead): Add conflict information update. Update
2982 function comment.
2983 (make_object_born): Rename from this...
2984 (make_object_live): ... to this. Remove update to conflict information.
2985 Update function comment.
2986 (make_object_dead): Add conflict information update. Update function
2987 comment.
2988 (mark_pseudo_regno_live): Call make_object_live.
2989 (mark_pseudo_regno_subword_live): Likewise.
2990 (mark_hard_reg_dead): Update function comment.
2991 (mark_hard_reg_live): Call make_hard_regno_live.
2992 (process_bb_node_lives): Likewise.
2993 * lra-lives.c (make_hard_regno_born): Rename from this...
2994 (make_hard_regno_live): ... to this. Remove update to conflict
2995 information. Remove now uneeded check_pic_pseudo_p argument.
2996 Update function comment.
2997 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2998 to conflict information. Update function comment.
2999 (mark_pseudo_live): Remove update to conflict information. Update
3000 function comment.
3001 (mark_pseudo_dead): Add conflict information update.
3002 (mark_regno_live): Call make_hard_regno_live.
3003 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3004 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3005
3006 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3007
3008 PR target/87370
3009 * config/i386/i386.c (construct_container): Use TImode for
3010 BLKmode values in 2 integer registers.
3011
3012 2018-09-29 Jeff Law <law@redhat.com>
3013
3014 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3015 c_strlen rather than just a tree *.
3016 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3017 Update recursive calls appropriately. If caller did not provide a
3018 suitable data pointer, create a local one. When a non-terminated
3019 string is discovered, bubble up information about the string via the
3020 c_strlen_data object.
3021 * builtins.h (c_strlen): Update prototype.
3022 (c_strlen_data): New structure.
3023 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3024 For a type 2 call, if c_strlen indicates a non-terminated string
3025 use the length of the non-terminated string.
3026 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3027
3028 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR target/87467
3031 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3032 __m512d type for __A argument rather than __m512.
3033
3034 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3035
3036 * match.pd (simple_comparison): Don't optimize if either operand is
3037 a function pointer when target needs function pointer canonicalization.
3038
3039 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3040
3041 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3042 power5 .. power9 to remove indirection.
3043 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3044 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3045 ASM_CPU_476_SPEC): Delete.
3046 (ASM_CPU_SPEC): Adjust.
3047 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3048 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3049
3050 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3051
3052 * config.in: Delete HAVE_AS_DCI.
3053 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3054 * config/rs6000/rs6000.h: Ditto.
3055 * configure.ac: Delete HAVE_AS_DCI.
3056 * configure: Regenerate.
3057
3058 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3059
3060 * config.in (HAVE_AS_LWSYNC): Delete.
3061 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3062 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3063 do it as a .long .
3064 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3065 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3066 as a .long .
3067 * configure.ac: Delete HAVE_AS_LWSYNC.
3068 * configure: Regenerate.
3069
3070 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3071 Pierre-Marie de Rodat <derodat@adacore.com>
3072
3073 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3074 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3075 (cgraph_node::create_thunk): Add indirect_offset parameter.
3076 (thunk_adjust): Likewise.
3077 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3078 and initialize the corresponding field with it.
3079 (cgraph_node::dump): Dump indirect_offset field.
3080 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3081 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3082 (thunk_adjust): Add indirect_offset parameter and deal with it.
3083 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3084 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3085 or if the thunk is external or local. Fix formatting. Do not chain
3086 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3087 if any, in the GIMPLE representation.
3088 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3089 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3090 (input_node): Read indirect_offset field.
3091 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3092 call to thunk_adjust.
3093 * tree-nested.c (struct nesting_info): Add thunk_p field.
3094 (create_nesting_tree): Set it.
3095 (convert_all_function_calls): Copy static chain from targets to thunks.
3096 (finalize_nesting_tree_1): Return early for thunks.
3097 (unnest_nesting_tree_1): Do not finalize thunks.
3098 (gimplify_all_functions): Do not gimplify thunks.
3099
3100 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3101
3102 * opt-suggestions.c (option_proposer::build_option_suggestions):
3103 Release "option_values".
3104
3105 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3106
3107 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3108 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3109 * dumpfile.c (kind_as_string): New function.
3110 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3111 kind_as_string to vary the prefix based on dump_kind.
3112 (selftest::test_capture_of_dump_calls): Update for above.
3113
3114 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3115
3116 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3117 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3118
3119 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3120
3121 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3122 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3123 INVALID_REGNUM instead of FPSR_REG.
3124 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3125 * config/i386/i386.md: Update comment of FP compares.
3126 (fldenv): Do not clobber FPSR_REG.
3127
3128 2018-09-28 Richard Biener <rguenther@suse.de>
3129
3130 * tree.h (BLOCK_ORIGIN): New.
3131 * omp-expand.c (grid_expand_target_grid_body): Assign
3132 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3133 * tree-inline.c (remap_block): Likewise.
3134 * auto-profile.c (get_function_decl_from_block): Simplify
3135 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3136 * langhooks.c (lhd_print_error_function): Likewise.
3137 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3138 Likewise.
3139 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3140 * tree.c (block_nonartificial_location): Likewise.
3141 (block_ultimate_origin): Likewise.
3142 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3143 no longer needed LTO case.
3144
3145 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3146 Jan Hubicka <jh@suse.cz>
3147 Martin Jambor <mjambor@suse.cz>
3148
3149 * simplify-rtx.c (simplify_merge_mask): New function.
3150 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3151 same masks are used in op1 or op2.
3152 (test_vec_merge): New function.
3153 (test_vector_ops): Call test_vec_merge.
3154
3155 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3156
3157 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3158 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3159 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3160 (cypress_costs): Set it.
3161 (supersparc_costs): Likewise.
3162 (hypersparc_costs): Likewise.
3163 (leon_cost): Likewise.
3164 (leon3_costs): Likewise.
3165 (sparclet_costs): Likewise.
3166 (ultrasparc_costs): Likewise.
3167 (ultrasparc_costs): Likewise.
3168 (niagara_costs): Likewise.
3169 (niagara2_costs): Likewise.
3170 (niagara3_costs): Likewise.
3171 (niagara4_costs): Likewise.
3172 (niagara7_costs): Likewise.
3173 (m8_costs): Likewise.
3174 (TARGET_CAN_FOLLOW_JUMP): Define.
3175 (pass_work_around_errata::gate): Minor tweak.
3176 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3177 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3178 Automaitcally clear MASK_FSMULD mask for V7 processors.
3179 (sparc_can_follow_jump): New static function.
3180 (output_ubranch): Deal with CROSSING_JUMP_P.
3181 (sparc_use_sched_lookahead): Rewrite using switch statement.
3182 (sparc_issue_rate): Reorder.
3183 (sparc_branch_cost): New function.
3184
3185 2018-09-27 Martin Sebor <msebor@redhat.com>
3186
3187 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3188 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3189 (int_fits_type_p): Same.
3190
3191 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3192
3193 * config/i386/i386.md (FPCR_REG): Remove.
3194 (UNSPEC_FLDCW): Remove.
3195 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3196 (x86_fldcw_1): Remove insn pattern.
3197 (fnstenv): Do not clobber FPCR_REG.
3198 (fldenv): Ditto.
3199 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3200 (CALL_USED_REGISTERS): Ditto.
3201 (REG_ALLOC_ORDER): Ditto.
3202 (REG_CLASS_CONTENTS): Ditto.
3203 (HI_REGISTER_NAMES): Ditto.
3204 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3205 of numerical constants.
3206 * config/i386/i386.c (regclass_map): Remove fpsr register.
3207 (dbx_register_map): Ditto.
3208 (dbx64_register_map): Ditto.
3209 (svr4_dbx_register_map): Ditto.
3210 (print_reg): Do not handle FPCR_REG.
3211
3212 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3213
3214 PR target/87149
3215 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3216 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3217 Delete, always treat as true.
3218 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3219 Ditto. Simplify remaining code.
3220 * config/powerpcspe/powerpcspe.h: Ditto.
3221 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3222 Simplify remaining code.
3223 (rs6000_expand_builtin): Ditto.
3224 * config/rs6000/rs6000.h: Ditto.
3225 * configure.ac: Ditto.
3226 * configure: Regenerate.
3227
3228 2018-09-27 Martin Liska <mliska@suse.cz>
3229
3230 * coverage.c (get_coverage_counts): Revert the formatting
3231 of missing profile opt info.
3232
3233 2018-09-27 Richard Biener <rguenther@suse.de>
3234
3235 PR debug/37801
3236 PR debug/87440
3237 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3238 block as we do not output that.
3239 (gen_inlined_subroutine_die): Elide the originally outermost
3240 block, matching what we do for concrete instances.
3241 (decls_for_scope): Add parameter specifying whether to recurse
3242 to subblocks.
3243
3244 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3245 Tom de Vries <tom@codesourcery.com>
3246
3247 PR 82089
3248
3249 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3250 STORE_FLAG_VALUE == 1.
3251
3252 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3253
3254 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3255 constant definitions.
3256 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3257 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3258 ("speculation_barrier"): New expander definition.
3259
3260 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3261
3262 PR gcov-profile/86957
3263 * common.opt: New warning option -Wmissing-profile.
3264 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3265 * doc/invoke.texi: Document -Wmissing-profile.
3266
3267 2018-09-26 Jim Wilson <jimw@sifive.com>
3268
3269 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3270 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3271
3272 2018-09-26 Martin Sebor <msebor@redhat.com>
3273
3274 * tree.c (zerop): Change return type to bool.
3275 (integer_zerop, integer_onep, integer_each_onep): Same.
3276 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3277 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3278 (real_onep, real_minus_onep, chain_index): Same.
3279 (print_type_hash_statistics, type_list_equal): Same.
3280 * tree.h (zerop): Same.
3281 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3282 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3283 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3284 (real_onep, real_minus_onep, chain_index): Same.
3285 (print_type_hash_statistics, type_list_equal): Same.
3286
3287 2018-09-26 Jim Wilson <jimw@sifive.com>
3288
3289 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3290
3291 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR target/87414
3294 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3295 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3296 call.
3297
3298 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3299
3300 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3301
3302 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3303
3304 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3305 and FP_SECOND_SSE_REGS.
3306 (REG_CLASS_NAMES): Ditto.
3307 (REG_CLASS_CONTENTS): Ditto.
3308 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3309 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3310 (ix86_preferred_output_reload_class): Ditto.
3311 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3312 clobber constraint to "=&f".
3313 (fix_truncdi_i387): Ditto.
3314 (lrintxfdi2): Ditto.
3315 (fistdi2_<rounding>): Ditto.
3316 (fpremxf4_i387): Change "=u" constraint to "=f".
3317 (fprem1xf4_i387): Ditto.
3318 (sincosxf3): Ditto.
3319 (fptanxf4_i387): Ditto.
3320 (fxtractxf3_i387): Ditto.
3321 (fscalexf4_i387): Ditto.
3322 (atan2xf3): Change "u" constraint to "f".
3323 (fyl2xxf3_i387): Ditto.
3324 (fyl2xp1xf3_i387): Ditto.
3325
3326 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3327
3328 PR target/87439
3329 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3330 for removed I387_MASK_PM entity.
3331
3332
3333 2018-09-26 Jeff Law <law@redhat.com>
3334 Revert
3335 2018-09-26 Alexey Neyman <stilor@att.net>
3336
3337 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3338 headers are no longer pulled in by <isl/val.h>.
3339
3340 2018-09-26 Richard Biener <rguenther@suse.de>
3341
3342 PR debug/87443
3343 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3344 or concrete instance DIE to the tree. Create abstract origin
3345 attributes also for concrete instances.
3346
3347 2018-09-26 Alexey Neyman <stilor@att.net>
3348
3349 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3350 headers are no longer pulled in by <isl/val.h>.
3351
3352 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3353
3354 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3355 Use new helper functions.
3356 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3357 Use new helper functions.
3358 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3359 aarch_mm_needs_release): New declarations.
3360 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3361 aarch_mm_needs_release): New.
3362
3363 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3364
3365 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3366 (arm32_output_mi_thunk): Deal with long calls.
3367
3368 2018-09-26 Richard Biener <rguenther@suse.de>
3369
3370 PR debug/87428
3371 PR debug/87362
3372 * tree-inline.c (expand_call_inline): When the location
3373 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3374 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3375 the inserted BLOCK to make inlined_function_outer_scope_p
3376 recognize it.
3377 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3378 coords for reserved locations.
3379
3380 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3381
3382 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3383 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3384 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3385 (*sibcall_nonlocal_sysv<mode>): Ditto.
3386 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3387 (<bd>_<mode>): Ditto.
3388 (<bd>tf_<mode>): Ditto.
3389
3390 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3391
3392 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3393 control string as a list of templates instead of as C code.
3394 (*altivec_movti): Ditto.
3395 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3396
3397 2018-09-25 Jim Wilson <jimw@sifive.com>
3398
3399 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3400 when target symbol is weak.
3401
3402 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3403
3404 PR c/87387
3405 * builtins.c (unterminated_array): Simplify.
3406 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3407 where pointer arithmetic is safe.
3408
3409 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3410
3411 PR target/86987
3412 * config/rs6000/altivec.md (altivec_vspltb): Use
3413 const_0_to_15_operand instead of u5bit_cint_operand.
3414 (*altivec_vspltb_internal): Ditto.
3415 (altivec_vspltb_direct): Ditto.
3416 (altivec_vsplth): Use const_0_to_7_operand instead of
3417 u5bit_cint_operand.
3418 (*altivec_vsplth_internal): Ditto.
3419 (altivec_vsplth_direct): Ditto.
3420 (altivec_vspltw): Use const_0_to_3_operand instead of
3421 u5bit_cint_operand.
3422 (*altivec_vspltw_internal): Ditto.
3423 (altivec_vspltw_direct): Ditto.
3424 (altivec_vspltsf): Ditto.
3425 (*altivec_vspltsf_internal): Ditto.
3426 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3427 various splats with the proper size immediate. Reorder the various
3428 cases by ascending size of immediate, and put all such together.
3429
3430 2018-09-25 Richard Biener <rguenther@suse.de>
3431
3432 PR debug/83941
3433 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3434 GC-ification.
3435 (maybe_create_die_with_external_ref): Do not create
3436 DW_TAG_imported_unit here.
3437 (add_abstract_origin_attribute): Handle external BLOCK refs.
3438 (dwarf2out_abstract_function): Simplify LTO case.
3439 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3440 rather than using maybe_create_die_with_external_ref.
3441
3442 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3443
3444 PR target/71278
3445 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3446 (frndintxf2_mask_pm_i387): Ditto.
3447 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3448 Enable for !flag_trapping_math.
3449 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3450 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3451 Change operand 1 predicate to nonimmediate_operand.
3452 (attr "i387_cw"): Remove mask_pm.
3453 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3454 (enum ix86_entity): Remove I387_MASK_PM.
3455 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3456 handle I387_MASK_PM.
3457 (ix86_mode_needed): Ditto.
3458 (ix86_mode_after): Ditto.
3459 (ix86_mode_entry): Ditto.
3460 (ix86_mode_exit): Ditto.
3461 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3462
3463 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3464
3465 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3466 to_update_switch_stmts to vNULL instead of calling create on them
3467 immediately.
3468
3469 2018-09-25 Richard Biener <rguenther@suse.de>
3470
3471 PR tree-optimization/87402
3472 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3473 (visit_phi): Re-instantiate handling of supposed to be VARYING
3474 but non-VARYING backedge value.
3475
3476 2018-09-25 Richard Biener <rguenther@suse.de>
3477
3478 PR debug/83941
3479 * dwarf2out.c (struct sym_off_pair): New.
3480 (external_die_map): New global.
3481 (lookup_decl_die): When in LTO create DIEs lazily from the
3482 external_die_map.
3483 (lookup_block_die): New function, create DIEs lazily in LTO.
3484 (equate_block_to_die): New function.
3485 (dwarf2out_die_ref_for_decl): During WPA get the association
3486 from the external DIE map.
3487 (dwarf2out_register_external_die): Record mapping into the
3488 external DIE map.
3489 (maybe_create_die_with_external_ref): New function split out from
3490 DIE generation part of old dwarf2out_register_external_die.
3491 (add_abstract_origin_attribute): Do not return the DIE. When
3492 in LTO reference externals directly.
3493 (dwarf2out_abstract_function): When in LTO ignore calls for
3494 decls with external DIEs (already present abstract instances).
3495 (gen_call_site_die): Adjust.
3496 (add_high_low_attributes): Likewise.
3497 (gen_lexical_block_die): Likewise.
3498 (gen_inlined_subroutine_die): Likewie.
3499 (gen_block_die): Likewise.
3500 (dwarf2out_inline_entry): Likewise.
3501 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3502 DIEs.
3503
3504 2018-09-25 Martin Liska <mliska@suse.cz>
3505
3506 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3507 integers and not by a float value.
3508
3509 2018-09-25 Martin Liska <mliska@suse.cz>
3510
3511 PR fortran/87394
3512 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3513 instead of NULL.
3514 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3515 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3516 * godump.c (go_format_type): Remove extra parenthesis.
3517
3518 2018-09-25 Martin Liska <mliska@suse.cz>
3519
3520 * alias.c (set_dest_equal_p): Remove unused function.
3521 * config/i386/i386.c (def_builtin_pure2): Likewise.
3522 * diagnostic-show-locus.c (class layout): Remove
3523 unused field.
3524 (layout::layout): Likewise here.
3525 * dump-context.h (class temp_dump_context): Likewise.
3526 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3527 (add_AT_loclistsptr): Likewise.
3528 (add_AT_offset): Likewise.
3529 (get_AT_hi_pc): Likewise.
3530 (is_comdat_die): Likewise.
3531 (type_is_enum): Likewise.
3532 (ceiling): Likewise.
3533 (add_AT_vms_delta): Likewise.
3534 (is_class_die): Likewise.
3535 * edit-context.c (class line_event): Remove unused field.
3536 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3537 unused function.
3538 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3539 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3540 (ok_for_base_p_nonstrict): Likewise.
3541 * tree-chrec.c (is_not_constant_evolution): Likewise.
3542 (chrec_fold_poly_cst): Likewise.
3543 * tree-if-conv.c (has_pred_critical_p): Likewise.
3544 * tree-ssa-coalesce.c (print_exprs): Likewise.
3545 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3546 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3547 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3548 (value_range_nonnegative_p): Likewise.
3549
3550 2018-09-25 Martin Liska <mliska@suse.cz>
3551
3552 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3553 Do not handle "GNU Pascal".
3554 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3555 Likewise.
3556 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3557 from documentation. Likewise.
3558 * dbxout.c (dbxout_range_type): Likewise.
3559 * doc/cpp.texi: Likewise.
3560 * doc/extend.texi: Likewise.
3561 * doc/frontends.texi: Likewise.
3562 * doc/invoke.texi: Remove Pascal entry.
3563 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3564 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3565
3566 2018-09-25 Martin Liska <mliska@suse.cz>
3567
3568 PR middle-end/86078
3569 * doc/invoke.texi: Document all parameters and remove default
3570 of the parameters.
3571
3572 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3573
3574 PR bootstrap/87417
3575 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3576 contains HOST_WIDE_INTs when computing its size.
3577
3578 2018-09-24 Jim Wilson <jimw@sifive.com>
3579
3580 PR target/87391
3581 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3582 not TARGET_RVE.
3583 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3584
3585 2018-09-24 Andrew Pinski <apinski@marvell.com>
3586
3587 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3588 access prev before checking it for NULLness in the
3589 AARCH64_FUSE_CMP_BRANCH case.
3590
3591 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3592
3593 PR target/82699
3594 * config/i386/i386.c (rest_of_insert_endbranch): Set
3595 endbr_queued_at_entrance to true and don't insert ENDBR if
3596 x86_function_profiler will be called.
3597 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3598 is true.
3599 * config/i386/i386.h (machine_function): Add
3600 endbr_queued_at_entrance.
3601
3602 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3603
3604 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3605 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3606 types.
3607 (check_attr_test): Use alternative_mask.
3608 (get_attr_value): Likewise.
3609 (compute_alternative_mask): Use alternative_mask and XWINT.
3610 (make_alternative_compare): Use alternative_mask.
3611 (attr_alt_subset_p): Use XWINT.
3612 (attr_alt_subset_of_compl_p): Likewise.
3613 (attr_alt_intersection): Use alternative_mask and XWINT.
3614 (attr_alt_union): Likewise.
3615 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3616 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3617 (simplify_test_exp): Use alternative_mask and XWINT.
3618 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3619 number calculation to support 64 bits. Generate code that
3620 checks 64-bit masks.
3621 (main): Use alternative_mask.
3622 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3623
3624 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3625
3626 PR target/80080
3627 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3628 RETURN+USE when returning via %r14.
3629
3630 2018-09-24 Martin Liska <mliska@suse.cz>
3631
3632 * gcov.c (output_lines): Print colorization legend
3633 for both flag_use_colors and flag_use_hotness_colors.
3634 Reword the help.
3635
3636 2018-09-24 Martin Liska <mliska@suse.cz>
3637
3638 * coverage.c (get_coverage_counts): Use warning_at
3639 with current_function_decl location. Use %qD in warning
3640 message.
3641
3642 2018-09-24 Martin Liska <mliska@suse.cz>
3643
3644 * memory-block.h (memory_block_pool::release): Annotate with
3645 valgrind that the memory is not accessible.
3646
3647 2018-09-24 Martin Liska <mliska@suse.cz>
3648
3649 PR sanitizer/85774
3650 * asan.c: Make asan_handled_variables extern.
3651 * asan.h: Likewise.
3652 * cfgexpand.c (expand_stack_vars): Make sure
3653 a representative is unpoison if another
3654 variable in the partition is handled by
3655 use-after-scope sanitization.
3656
3657 2018-09-24 Richard Biener <rguenther@suse.de>
3658
3659 PR tree-optimization/63155
3660 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3661 the worklist when the edge of the respective argument isn't
3662 executable.
3663
3664 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3665
3666 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3667 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3668 (MASK_CLASS_P): Update for rename.
3669 (MAYBE_MASK_CLASS_P): Ditto.
3670 (REG_CLASS_NAMES): Update.
3671 (REG_CLASS_CONTENT): Update.
3672 * config/i386/i386.c (regclass_map): Update for MASK_REG
3673 and ALL_MASK_REGS rename.
3674 * config/i386/constraints.md (Yk): Update for rename.
3675 (k): Ditto.
3676
3677 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3678
3679 * config/i386/i386.h (enum reg_class): Remove
3680 EVEX_SSE_REGS and MOD4_SSE_REGS.
3681 (REG_CLASS_NAMES): Update.
3682 (REG_CLASS_CONTENT): Update.
3683 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3684 registers as ALL_SSE_REGS.
3685 (ix86_additional_allocno_class_p): Remove.
3686 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3687 (ix86_register_priority): Lower priority of EVEX SSE registers.
3688 Use IN_RANGE macro where appropriate.
3689 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3690 AVX-5124VNNIW checks.
3691 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3692 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3693 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3694 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3695 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3696 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3697 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3698 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3699 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3700 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3701 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3702 * config/i386/constraints.md (Yh): Remove.
3703
3704 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3705
3706 * config/i386/i386.c (regclass_map): Declare integer REX registers
3707 as GENERAL_REGS.
3708
3709 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3710
3711 * doc/service.texi (Service): Switch the fsf.org link to https.
3712
3713 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3714
3715 PR target/86798
3716 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3717 Define to speculation_safe_value_not_needed.
3718
3719 2018-09-21 Florian Weimer <fweimer@redhat.com>
3720
3721 PR middle-end/81035
3722 * doc/extend.texi (Common Function Attributes): Mention that
3723 noreturn suppresses tail call optimization.
3724
3725 2018-09-21 Jeff Law <law@redhat.com>
3726
3727 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3728 vr_values::cleanup_edges_and_switches.
3729 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3730 vr_values class.
3731 (identify_jump_threads): Remove EDGE_IGNORE handling.
3732 (execute_vrp): Move handling of to_remove_edges and
3733 to_update_switch_stmts into vr_values class member functions.
3734 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3735 (to_update_switch_stmts): Likewise.
3736 * vr-values.c: Include cfghooks.h.
3737 (vr_values::vr_values): Initialize to_remove_edges and
3738 to_update_switch_stmts.
3739 (vr_values::~vr_values): Verify to_remove_edges and
3740 to_update_switch_stmts are empty.
3741 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3742 (vr_values::cleanup_edges_and_switches): New member function.
3743 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3744 function. Add new data members.
3745
3746 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3747
3748 PR tree-optimization/87309
3749 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3750 calls with pflags and alt_flags.
3751 (selftest::test_capture_of_dump_calls): Add test of interaction of
3752 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3753
3754 2018-09-21 Olivier Hainque <hainque@adacore.com>
3755
3756 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3757
3758 2018-09-21 Olivier Hainque <hainque@adacore.com>
3759
3760 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3761
3762 2018-09-21 Olivier Hainque <hainque@adacore.com>
3763
3764 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3765 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3766 (VXWORKS_LIBS_RTP): Minor reordering.
3767
3768 2018-09-21 Olivier Hainque <hainque@adacore.com>
3769
3770 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3771 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3772
3773 2018-09-21 Olivier Hainque <hainque@adacore.com>
3774
3775 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3776 (PTRDIFF_TYPE): Likewise.
3777
3778 2018-09-21 Olivier Hainque <hainque@adacore.com>
3779
3780 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3781 triplet, similar to support for VxWorks7.
3782 * config/vxworks-dummy.h: Provide a default definition
3783 of TARGET_VXWORKS64 to 0.
3784
3785 2018-09-21 Olivier Hainque <hainque@adacore.com>
3786
3787 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3788 * config/vxworks-dummy.h: here.
3789
3790 2018-09-21 Olivier Hainque <hainque@adacore.com>
3791
3792 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3793
3794 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3795 Bo Zhou <zbo.zhou@hisilicon.com>
3796
3797 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3798 * config/aarch64/aarch64-tune.md: Regenerated.
3799 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3800 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3801 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3802
3803 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3804 Julian Brown <julian@codesourcery.com>
3805
3806 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3807
3808 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3809
3810 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3811 if the call takes a static chain.
3812
3813 2018-09-21 Martin Liska <mliska@suse.cz>
3814
3815 * auto-profile.c (autofdo_source_profile::read): Do not
3816 set sum_all.
3817 (read_profile): Do not add working sets.
3818 (read_autofdo_file): Remove sum_all.
3819 (afdo_callsite_hot_enough_for_early_inline): Remove const
3820 qualifier.
3821 * coverage.c (struct counts_entry): Remove gcov_summary.
3822 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3823 do not support GCOV_TAG_PROGRAM_SUMMARY.
3824 (get_coverage_counts): Remove summary and expected
3825 arguments.
3826 * coverage.h (get_coverage_counts): Likewise.
3827 * doc/gcov-dump.texi: Remove -w option.
3828 * gcov-dump.c (dump_working_sets): Remove.
3829 (main): Do not support '-w' option.
3830 (print_usage): Likewise.
3831 (tag_summary): Likewise.
3832 * gcov-io.c (gcov_write_summary): Do not dump
3833 histogram.
3834 (gcov_read_summary): Likewise.
3835 (gcov_histo_index): Remove.
3836 (gcov_histogram_merge): Likewise.
3837 (compute_working_sets): Likewise.
3838 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3839 it not obsolete.
3840 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3841 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3842 (GCOV_HISTOGRAM_SIZE): Remove.
3843 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3844 (struct gcov_summary): Simplify rapidly just
3845 to runs and sum_max fields.
3846 (gcov_histo_index): Remove.
3847 (NUM_GCOV_WORKING_SETS): Likewise.
3848 (compute_working_sets): Likewise.
3849 * gcov-tool.c (print_overlap_usage_message): Remove
3850 trailing empty line.
3851 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3852 (output_lines): Remove program related line.
3853 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3854 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3855 histogram.
3856 (input_profile_summary): Do not read it.
3857 (merge_profile_summaries): And do not merge it.
3858 (input_symtab): Do not call removed function.
3859 * modulo-sched.c (sms_schedule): Do not print sum_max.
3860 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3861 removed when histogram method was invented.
3862 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3863 mode.
3864 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3865 GCOV coding style.
3866 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3867 and dump selected value.
3868 * profile.c (add_working_set): Remove.
3869 (get_working_sets): Likewise.
3870 (find_working_set): Likewise.
3871 (get_exec_counts): Do not work with working sets.
3872 (read_profile_edge_counts): Do not inform as sum_max is removed.
3873 (compute_branch_probabilities): Likewise.
3874 (compute_value_histograms): Remove argument for call of
3875 get_coverage_counts.
3876 * profile.h: Do not make gcov_summary const.
3877
3878 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3879
3880 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3881
3882 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3883
3884 PR tree-optimization/86990
3885 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3886 Check that the entire merged store group is made of constants only for
3887 overlapping stores.
3888
3889 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3890
3891 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3892 (VTABLE_VERIFICATION_SPEC): Likewise.
3893 (SANITIZER_EARLY_SPEC): Likewise.
3894 (SANITIZER_SPEC): Likewise.
3895 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3896 * doc/invoke.texi (Link Options): Document -r.
3897
3898 2018-09-20 Richard Biener <rguenther@suse.de>
3899
3900 PR middle-end/87054
3901 * gimplify.c (gimplify_expr): Retain alignment of
3902 addressable lvalue in dereference.
3903
3904 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3905
3906 PR bootstrap/87013
3907 * configure.ac: Check for .loc is_stmt support.
3908 * configure, config.in: Rebuilt.
3909 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3910 if not supported.
3911
3912 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3913
3914 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3915 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3916 -misel=no.
3917
3918 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3919
3920 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3921 VECTOR_OTHER.
3922 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3923 case VECTOR_OTHER.
3924
3925 2018-09-20 Marek Polacek <polacek@redhat.com>
3926
3927 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3928
3929 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3930
3931 PR tree-optimization/87288
3932 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3933 into account when determining PEELING_FOR_NITERS.
3934
3935 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3936
3937 PR tree-optimization/86877
3938 * tree-vect-loop.c (vect_analyze_loop_2): Call
3939 vect_verify_datarefs_alignment.
3940
3941 2018-09-19 Marek Polacek <polacek@redhat.com>
3942
3943 * doc/invoke.texi: Document -Wclass-conversion.
3944
3945 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3946
3947 * config/pa/pa.c (pa_adjust_priority): Delete.
3948 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3949
3950 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3951 (atomic_storehi): Likewise.
3952 (atomic_storesi): Likewise.
3953 (atomic_loaddi): Restore compare and swap exchange loop code.
3954
3955 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3956
3957 PR rtl-optimization/86902
3958 * combine.c (try_combine): When changing the CC mode used, don't change
3959 an unrelated mode in other_insn to that new CC mode.
3960
3961 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3962
3963 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3964 with %T in place of calls to dump_generic_expr.
3965 (prune_runtime_alias_test_list): Likewise.
3966 (create_runtime_alias_checks): Likewise.
3967 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3968 (vect_analyze_data_ref_dependence): Likewise.
3969 (vect_slp_analyze_data_ref_dependence): Likewise.
3970 (vect_record_base_alignment): Likewise. Use %G in place of call
3971 to dump_gimple_stmt.
3972 (vect_compute_data_ref_alignment): Likewise.
3973 (verify_data_ref_alignment): Likewise.
3974 (vect_find_same_alignment_drs): Likewise.
3975 (vect_analyze_group_access_1): Likewise.
3976 (vect_analyze_data_ref_accesses): Likewise.
3977 (dependence_distance_ge_vf): Likewise.
3978 (dump_lower_bound): Likewise.
3979 (vect_prune_runtime_alias_test_list): Likewise.
3980 (vect_find_stmt_data_reference): Likewise.
3981 (vect_analyze_data_refs): Likewise.
3982 (vect_create_addr_base_for_vector_ref): Likewise.
3983 (vect_create_data_ref_ptr): Likewise.
3984 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3985 (vect_can_advance_ivs_p): Likewise.
3986 (vect_update_ivs_after_vectorizer): Likewise.
3987 (vect_gen_prolog_loop_niters): Likewise.
3988 (vect_prepare_for_masked_peels): Likewise.
3989 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3990 (vect_determine_vectorization_factor): Likewise.
3991 (vect_is_simple_iv_evolution): Likewise.
3992 (vect_analyze_scalar_cycles_1): Likewise.
3993 (vect_analyze_loop_operations): Likewise.
3994 (report_vect_op): Likewise.
3995 (vect_is_slp_reduction): Likewise.
3996 (check_reduction_path): Likewise.
3997 (vect_is_simple_reduction): Likewise.
3998 (vect_create_epilog_for_reduction): Likewise.
3999 (vect_finalize_reduction:): Likewise.
4000 (vectorizable_induction): Likewise.
4001 (vect_transform_loop_stmt): Likewise.
4002 (vect_transform_loop): Likewise.
4003 (optimize_mask_stores): Likewise.
4004 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4005 (vect_split_statement): Likewise.
4006 (vect_recog_over_widening_pattern): Likewise.
4007 (vect_recog_average_pattern): Likewise.
4008 (vect_determine_min_output_precision_1): Likewise.
4009 (vect_determine_precisions_from_range): Likewise.
4010 (vect_determine_precisions_from_users): Likewise.
4011 (vect_mark_pattern_stmts): Likewise.
4012 (vect_pattern_recog_1): Likewise.
4013 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4014 (vect_record_max_nunits): Likewise.
4015 (vect_build_slp_tree_1): Likewise.
4016 (vect_build_slp_tree_2): Likewise.
4017 (vect_print_slp_tree): Likewise.
4018 (vect_analyze_slp_instance): Likewise.
4019 (vect_detect_hybrid_slp_stmts): Likewise.
4020 (vect_detect_hybrid_slp_1): Likewise.
4021 (vect_slp_analyze_operations): Likewise.
4022 (vect_slp_analyze_bb_1): Likewise.
4023 (vect_transform_slp_perm_load): Likewise.
4024 (vect_schedule_slp_instance): Likewise.
4025 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4026 (vect_mark_stmts_to_be_vectorized): Likewise.
4027 (vect_init_vector_1): Likewise.
4028 (vect_get_vec_def_for_operand): Likewise.
4029 (vect_finish_stmt_generation_1): Likewise.
4030 (vect_check_load_store_mask): Likewise.
4031 (vectorizable_call): Likewise.
4032 (vectorizable_conversion): Likewise.
4033 (vectorizable_operation): Likewise.
4034 (vectorizable_load): Likewise.
4035 (vect_analyze_stmt): Likewise.
4036 (vect_is_simple_use): Likewise.
4037 (vect_get_vector_types_for_stmt): Likewise.
4038 (vect_get_mask_type_for_stmt): Likewise.
4039 * tree-vectorizer.c (increase_alignment): Likewise.
4040
4041 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4042
4043 * doc/rtl.texi: Adjust vec_select description.
4044 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4045 non-constant selectors.
4046
4047 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4048
4049 * config/aarch64/aarch64-protos.h
4050 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4051 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4052 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4053 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4054 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4055 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4056 (AARCH64_ISA_RCPC8_4): New flag.
4057 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4058 to aarch64_offset_9bit_signed_unscaled_p.
4059 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4060 and use stlur.
4061 * config/aarch64/constraints.md (Ust): New constraint.
4062 * config/aarch64/predicates.md.
4063 (aarch64_9bit_offset_memory_operand): New predicate.
4064 (aarch64_rcpc_memory_operand): New predicate.
4065
4066 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4067
4068 PR rtl-optimization/87361
4069 * rtlanal.c (nonzero_bits1): Revert accidental change.
4070
4071 2018-09-19 Richard Biener <rguenther@suse.de>
4072
4073 PR tree-optimization/87349
4074 PR tree-optimization/87342
4075 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4076
4077 2018-09-18 Marek Polacek <polacek@redhat.com>
4078
4079 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4080 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4081
4082 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4083
4084 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4085
4086 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4087
4088 PR rtl-optimization/86882
4089 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4090
4091 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4092
4093 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4094 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4095
4096 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4097
4098 PR other/87353
4099 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4100
4101 2018-09-18 Richard Biener <rguenther@suse.de>
4102
4103 PR middle-end/63155
4104 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4105 (compute_samebase_partition_bases): Likewise.
4106 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4107 (gimple_can_coalesce_p): Simplify.
4108
4109 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4110
4111 Handle a library implementation of ffs calling __builtin_ffs.
4112 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4113 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4114 to __ffsdi2.
4115
4116 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4117
4118 * diagnostic-show-locus.c (class layout_range): Add field
4119 "m_original_idx".
4120 (layout_range::layout_range): Add "original_idx" param and use it
4121 to initialize new field.
4122 (make_range): Use 0 for original_idx.
4123 (layout::layout): Pass in index to calls to
4124 maybe_add_location_range.
4125 (layout::maybe_add_location_range): Add param "original_idx" and
4126 pass it on to layout_range.
4127 (layout::print_any_labels): Pass on range->m_original_idx to
4128 get_text call.
4129 (gcc_rich_location::add_location_if_nearby): Use 0 for
4130 original_idx.
4131 * gcc-rich-location.h (text_range_label::get_text): Update for new
4132 param.
4133 (range_label_for_type_mismatch::get_text): Likewise.
4134
4135 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4136
4137 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4138
4139 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4140
4141 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4142 format_string_diagnostic_t.
4143 (fmtwarn_n): Likewise.
4144 * substring-locations.c
4145 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4146 (format_warning_n_va): Convert to...
4147 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4148 (format_warning_va): Convert to...
4149 (format_string_diagnostic_t::emit_warning_va): ...this.
4150 (format_warning_at_substring): Convert to...
4151 (format_string_diagnostic_t::emit_warning): ...this.
4152 (format_warning_at_substring_n): Convert to...
4153 (format_string_diagnostic_t::emit_warning_n): ...this.
4154 * substring-locations.h (class format_string_diagnostic_t): New
4155 class.
4156 (format_warning_va): Convert to
4157 format_string_diagnostic_t::emit_warning_va.
4158 (format_warning_n_va): Convert to
4159 format_string_diagnostic_t::emit_warning_n_va.
4160 (format_warning_at_substring): Convert to
4161 format_string_diagnostic_t::emit_warning.
4162 (format_warning_at_substring_n): Convert to
4163 format_string_diagnostic_t::emit_warning_n.
4164
4165 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4166 Bernd Schmidt <bernds_cb1@t-online.de>
4167
4168 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4169 SImode args.
4170
4171 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4172
4173 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4174 operand 0 predicate to nonimmediate operand.
4175 (rint<mode>2_frndint): Remove insn pattern.
4176 (rint<mode>2): Change operand 1 predicate to general_operand.
4177 Extend operand 1 to XFmode and generate rintxf2 insn.
4178 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4179 Do not use X87MODEF mode macro.
4180 (frndintxf2_<rounding>_i387): Rename from
4181 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4182 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4183 to XFmode and generate significandxf3 insn.
4184
4185 2018-09-17 Richard Biener <rguenther@suse.de>
4186
4187 PR tree-optimization/87328
4188 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4189 visiting unexecutable backedges when not iterating.
4190 (do_rpo_vn): Mark all edges not executable even when not
4191 iterating.
4192
4193 2018-09-17 Martin Jambor <mjambor@suse.cz>
4194
4195 PR c/63886
4196 * doc/invoke.texi (Warning Options): Likewise.
4197
4198 2018-09-17 Richard Biener <rguenther@suse.de>
4199
4200 PR tree-optimization/87301
4201 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4202 clean EH info from leftover copy assignments.
4203
4204 2018-09-17 Martin Liska <mliska@suse.cz>
4205
4206 PR gcov-profile/85871
4207 * gcov.c (output_intermediate_file): Fix out of bounds
4208 access.
4209
4210 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4211
4212 * config/arc/arc.c: Object attributes for core4 not reflected
4213 correctly.
4214 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4215 core3).
4216
4217 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4218
4219 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4220
4221 2018-09-17 Martin Liska <mliska@suse.cz>
4222
4223 * doc/gcov.texi: Document new option --use-hotness-colors.
4224 * gcov.c (struct source_info): Declare new field.
4225 (source_info::source_info): Set default for maximum_count.
4226 (print_usage): Add new -q option.
4227 (process_args): Process it.
4228 (accumulate_line_info): Save src->maximum_count.
4229 (output_line_beginning): Make color line number if
4230 flag_use_hotness_colors is set.
4231 (output_line_details): Pass default argument value.
4232 (output_lines): Pass src->maximum_count.
4233
4234 2018-09-17 Martin Liska <mliska@suse.cz>
4235
4236 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4237 Use processor_names table.
4238 * config/i386/i386.c (ix86_default_align): Use
4239 processor_cost_table for alignment values.
4240 (ix86_option_override_internal): Use processor_names.
4241 (ix86_function_specific_print): Likewise.
4242 * config/i386/i386.h (struct processor_costs):
4243 Add alignment values.
4244 (struct ptt): Remove and replace with const char *.
4245 * config/i386/x86-tune-costs.h (struct processor_costs):
4246 Declare default alignments for all costs.
4247
4248 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4249
4250 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4251 symbolics or VR_VARYING ranges for ABS_EXPR.
4252 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4253 when range will wrap.
4254
4255 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4256
4257 PR middle-end/86864
4258 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4259 before and after a JUMP_TABLE_DATA.
4260
4261 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4262
4263 PR middle-end/87188
4264 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4265 when one operand is a function pointer. Use POINTER_TYPE_P and
4266 FUNC_OR_METHOD_TYPE_P.
4267 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4268 * fold-const.c (build_range_check): Likewise.
4269 * match.pd (simple_comparison): Likewise.
4270
4271 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4272
4273 PR c/82967
4274 * spellcheck.c (get_edit_distance_cutoff): New function.
4275 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4276 (selftest::test_get_edit_distance_one_way): ...this.
4277 (selftest::test_get_edit_distance_unit): Rename to...
4278 (selftest::test_get_edit_distance_both_ways): ...this.
4279 (selftest::test_edit_distances): Move tests to this new function,
4280 and test some more pairs of strings. Update for above renaming.
4281 (selftest::get_old_cutoff): New function.
4282 (selftest::test_get_edit_distance_cutoff): New function.
4283 (selftest::assert_suggested_for): New function.
4284 (ASSERT_SUGGESTED_FOR): New macro.
4285 (selftest::assert_not_suggested_for): New function.
4286 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4287 (selftest::test_suggestions): New function.
4288 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4289 tests to selftest::test_edit_distances and call it. Add calls to
4290 selftest::test_get_edit_distance_cutoff and
4291 selftest::test_suggestions.
4292 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4293 (best_match::consider): Replace hard-coded cutoff calculation with
4294 a call to...
4295 (best_match::get_cutoff): New declaration.
4296 (best_match::get_best_meaningful_candidate): Likewise.
4297
4298 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4299
4300 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4301
4302 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4303
4304 revert:
4305 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4306
4307 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4308 terminated string literal.
4309
4310 2018-09-14 Martin Sebor <msebor@redhat.com>
4311
4312 * builtins.c (unterminated_array): Handle ARRAY_REF.
4313 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4314 * builtins.h (unterminated_array): Declare extern.
4315 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4316 arrays.
4317 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4318 calls.
4319
4320 2018-09-14 Martin Sebor <msebor@redhat.com>
4321 Jeff Law <law@redhat.com>
4322
4323 * builtins.c (unterminated_array): New.
4324 (expand_builtin_strcpy): Adjust.
4325 (expand_builtin_strcpy_args): Detect unterminated arrays.
4326 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4327 unterminated arrays.
4328 * gimple-fold.h (get_maxval_strlen): Add argument.
4329 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4330
4331 * gimple-fold.c (get_range_strlen): Add argument.
4332 (get_maxval_strlen): Adjust.
4333 * gimple-fold.h (get_range_strlen): Add argument.
4334
4335 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4336
4337 * config/i386/movdirintrin.h: Fix copyright year.
4338
4339 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4340
4341 * reg-stack.c: Include regs.h.
4342 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4343 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4344 FIRST_STACK_REG, not DFmode.
4345 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4346 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4347 (change stack): Default register mode to the reg_raw_mode of
4348 FIRST_STACK_REG, not DFmode.
4349 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4350 (*swapxf): Rename from swapxf.
4351
4352 2018-09-14 Carl Love <cel@us.ibm.com>
4353
4354 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4355 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4356
4357 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4358
4359 PR target/87224
4360 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4361 alternatives.
4362
4363 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4364
4365 PR target/85628
4366 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4367
4368 2018-09-14 Jason Merrill <jason@redhat.com>
4369
4370 Fix --enable-gather-detailed-mem-stats.
4371 * hash-table.c (hash_table_usage): Change from variable to function.
4372 * hash-table.h: Adjust.
4373 * Makefile.in: Add missing dependencies on hash-table.h.
4374
4375 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4376
4377 PR tree-optimization/87259
4378 PR lto/87283
4379 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4380 execute_cse_reciprocals_1 has tried transforming.
4381
4382 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4383
4384 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4385 VR_VARYING for PLUS/MINUS_EXPR.
4386
4387 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4388
4389 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4390 formatting.
4391
4392 2018-09-14 Richard Biener <rguenther@suse.de>
4393
4394 PR middle-end/63155
4395 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4396 bits for the merged partition.
4397
4398 2018-09-13 Martin Sebor <msebor@redhat.com>
4399 Bernd Edlinger <bernd.edlinger@hotmail.de>
4400
4401 * builtins.h (c_srlen): Add argument.
4402 * builtins.c (warn_string_no_nul): New function.
4403 (c_strlen): Add argument and use it. Update recursive calls.
4404 Pass DECL argument to string_constant to get info on non
4405 terminated strings. Update *NONSTR as needed.
4406 (fold_builtin_strlen): Add argument to calls to c_strlen.
4407 Warn for unterminated arrays.
4408 (warn_string_no_null): Add prototype.
4409 * expr.c (string_constant): Update arguments. Update recursive
4410 calls appropriately. Detect missing NUL terminator and outermost
4411 declaration its missing in.
4412 Improve checks for arrays with nonzero lower bound or elements
4413 that are not a single byte. Simplify offset computation.
4414 Simplify checks for non-NUL terminated strings.
4415 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4416 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4417
4418 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4419
4420 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4421 correctly.
4422 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4423 argument. Fix range checks.
4424 * fold-const.h (c_getstr): Adjust protoype.
4425 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4426 string is constant but contains no NUL byte.
4427
4428 * expr.c (string_constant): Adjust function comment.
4429 Remove bogus check for zero termination.
4430
4431 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4432
4433 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4434 (get_constant_size): Don't make STRING_CSTs larger than they are.
4435 (check_string_literal): New check function for STRING_CSTs.
4436 (output_constant): Use it.
4437
4438 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4439
4440 PR target/86812
4441 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4442
4443 2018-09-13 Richard Biener <rguenther@suse.de>
4444
4445 PR tree-optimization/87263
4446 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4447 (struct unwind_state): Add max_rpo field.
4448 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4449 Compute max_rpo, the max RPO number a block can be backwards reached
4450 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4451 separating it from the iterating mode.
4452
4453 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4454
4455 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4456 (rfs_decision): New scheduling decision.
4457
4458 2018-09-13 Richard Biener <rguenther@suse.de>
4459
4460 PR bootstrap/87134
4461 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4462 (vn_nary_op_insert_pieces_predicated): Do not write useless
4463 valid_dominated_by_p entry outside of the allocated storage.
4464
4465 2018-09-13 Omar Sandoval <osandov@osandov.com>
4466 Tom de Vries <tdevries@suse.de>
4467
4468 PR debug/86985
4469 * dwarf2out.c (is_c): New function.
4470 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4471
4472 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4473
4474 PR target/85628
4475 * config/aarch64/aarch64.md (*aarch64_bfxil):
4476 Define.
4477 * config/aarch64/constraints.md (Ulc): Define.
4478 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4479 Define.
4480 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4481 New function.
4482
4483 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4484
4485 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4486 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4487 aarch64_layout_frame call.
4488 (aarch64_expand_epilogue): Likewise.
4489 (aarch64_initial_elimination_offset): Likewise.
4490 (aarch64_get_separate_components): Likewise.
4491 (aarch64_use_return_insn_p): Likewise.
4492 (aarch64_layout_frame): Remove unneeded check.
4493
4494 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4495
4496 * configure.ac: Only append
4497 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4498 gcc_config_arguments if it was never reconfigured or last reconfigure
4499 was with different arguments.
4500 * configure: Regenerated.
4501
4502 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4503 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4504
4505 PR middle-end/87290
4506 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4507 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4508
4509 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4510
4511 PR tree-optimization/87287
4512 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4513 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4514 * match.pd (X % C == 0): ... here. New optimization.
4515
4516 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4517
4518 PR middle-end/82853
4519 * expr.h (maybe_optimize_mod_cmp): Declare.
4520 * expr.c (mod_inv): New function.
4521 (maybe_optimize_mod_cmp): New function.
4522 (do_store_flag): Use it.
4523 * cfgexpand.c (expand_gimple_cond): Likewise.
4524
4525 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4526 Julian Brown <julian@codesourcery.com>
4527
4528 PR middle-end/86336
4529 * gimplify.c (gimplify_scan_omp_clauses): Set
4530 target_firstprivatize_array_bases in OpenACC parallel and kernels
4531 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4532 OpenACC data regions.
4533
4534 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4535
4536 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4537 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4538
4539 2018-09-12 Richard Biener <rguenther@suse.de>
4540
4541 PR tree-optimization/87280
4542 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4543 edge but unreachable target.
4544 (do_rpo_vn): For conservatively handling a PHI only mark
4545 the backedge executable but not the block reachable.
4546
4547 2018-09-12 Richard Biener <rguenther@suse.de>
4548
4549 PR tree-optimization/87266
4550 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4551 visited blocks.
4552
4553 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4554
4555 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4556 constants.
4557 ("trunc<BFP:mode><DFP_ALL:mode>2")
4558 ("trunc<DFP_ALL:mode><BFP:mode>2")
4559 ("extend<BFP:mode><DFP_ALL:mode>2")
4560 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4561 according to the target operand type.
4562
4563 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4564 Andreas Krebbel <krebbel@linux.ibm.com>
4565
4566 PR tree-optimization/86844
4567 * gimple-ssa-store-merging.c
4568 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4569 there are any overlapping stores in between them, make sure they are
4570 also coalesced or we give up completely.
4571
4572 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4573
4574 PR middle-end/87248
4575 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4576 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4577
4578 2018-09-12 Tom de Vries <tdevries@suse.de>
4579
4580 * common.opt (gdescribe-dies): Add option.
4581 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4582 attribute for artifical and nameless decls.
4583 (dwarf2out_register_external_die): Add description attribute to
4584 external reference die.
4585 (add_desc_attribute): New functions.
4586 (gen_subprogram_die): Add description attribute to
4587 DW_TAG_call_site_parameter.
4588 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4589 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4590 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4591 -gno-describe-dies.
4592 (@item -gdescribe-dies): Add.
4593
4594 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4595
4596 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4597 (extract_range_from_binary_expr_1: Call
4598 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4599 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4600 depend on sign.
4601
4602 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4603
4604 * gimple-ssa-warn-alloca.c
4605 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4606 field for ALLOCA_BOUND_*_LARGE.
4607
4608 2018-09-11 Nathan Sidwell <nathan@acm.org>
4609
4610 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4611
4612 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4613
4614 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4615 for clobbers. Remove obsolete comment.
4616
4617 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4618
4619 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4620 mpxchk, mpxld and mpxst types.
4621 (define_attr length_immediate): Remove all processing of mpx types.
4622 (define_attr prefix_0f): Ditto.
4623 (define_attr memory): Ditto.
4624
4625 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4626
4627 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4628 (log<mode>2): Change operand 1 predicate to general_operand.
4629 Extend operand 1 to XFmode and generate logxf3 insn.
4630 (log10<mode>2): Change operand 1 predicate to general_operand.
4631 Extend operand 1 to XFmode and generate log10xf3 insn.
4632 (log2<mode>2): Change operand 1 predicate to general_operand.
4633 Extend operand 1 to XFmode and generate log2xf3 insn.
4634 (fyl2xp1_extend<mode>xf3_i387): Remove.
4635 (log1p<mode>2): Change operand 1 predicate to general_operand.
4636 Extend operand 1 to XFmode and generate log1pxf3 insn.
4637 (fxtract_extend<mode>xf3_i387): Remove.
4638 (logb<mode>2): Change operand 1 predicate to general_operand.
4639 Extend operand 1 to XFmode and generate logbxf3 insn.
4640 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4641 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4642 (significand<mode>2): Change operand 1 predicate to general_operand.
4643 Extend operand 1 to XFmode and generate significandxf3 insn.
4644
4645 2018-09-11 Nathan Sidwell <nathan@acm.org>
4646
4647 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4648 (load_specs): Use fatal_error.
4649 (DELETE_IF_ORDINARY, process_command): Use error.
4650 (execute, run_attempt): Use fatal_error.
4651
4652 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4653
4654 * diagnostic-core.h (sorry_at): New prototype.
4655 * diagnostic.c (sorry_at): New function.
4656
4657 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4658
4659 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4660 by zero as VR_UNDEFINED.
4661
4662 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4663
4664 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4665 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4666 (<sincos>mode2): New expander.
4667 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4668 (sincos -> sin, cos splitters): Remove splitter patterns.
4669 (sincos<mode>3): Change operand 2 predicate to general_operand.
4670 Extend operand 2 to XFmode and generate sincosxf3 insn.
4671 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4672 Change operand 3 predicate to const1_operand.
4673 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4674 (tanxf2): Update operands in the call to fptanxf4_i387.
4675 (tan<mode>2): Change operand 1 predicate to general_operand.
4676 Extend operand 1 to XFmode and generate tanxf3 insn.
4677 (atan2xf3): Rename from *fpatanxf3_i387.
4678 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4679 (atan2xf3): Remove expander.
4680 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4681 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4682 (atan<mode>2): Change operand 1 predicate to general_operand.
4683 Extend operand 1 to XFmode and generate atanxf3 insn.
4684
4685 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4686
4687 * config/i386/i386.md (x87/SSE constant load splitter): Use
4688 memory_operand instead of nonimmediate_operand for input operand
4689 predicate.
4690
4691 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4692
4693 * config/i386/i386.md (float partial SSE register stall splitter): Move
4694 splitter near its instruction pattern.
4695 (float_extend partial SSE register stall splitter): Ditto.
4696 (float_truncate partial SSE register stall splitter): Ditto.
4697
4698 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4699
4700 PR target/86794
4701 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4702 to speculation_safe_value_not_needed.
4703
4704 PR target/85666
4705 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4706 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4707 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4708 leaf_function_p, instead use has_hard_reg_initial_val.
4709
4710 2018-09-09 Nathan Sidwell <nathan@acm.org>
4711
4712 * gcc.h (pfatal_with_name): Don't declare here.
4713 * gcc.c (pfatal_with_name): Make static.
4714
4715 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4716
4717 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4718 earlyclobber.
4719
4720 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4721
4722 PR rtl-optimization/85458
4723 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4724 priority hook to reduce the priority of EXPR.
4725
4726 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4727
4728 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4729 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4730 with X87_ENABLE_FLOAT. Remove preparation code.
4731 (*float<SWI48:mode><MODEF:mode>2): Rename from
4732 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4733 math using "enabled" attribute.
4734 (*floatdi<MODEF:mode>2_i387): Rename from
4735 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4736 enable for 32bit targets only.
4737 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4738 splitter.
4739 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4740 as operand 1 predicate. Rewrite as define_insn_and_split.
4741 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4742
4743 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4744
4745 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4746 to fallthru to FLOAT case.
4747
4748 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4749
4750 PR target/86731
4751 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4752 around folding of vec_sl to handle out of range shift values.
4753
4754 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4755
4756 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4757 Update callers to gen_fix_trunc<mode>_i387_fisttp
4758 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4759 nonimmediate_operand.
4760 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4761 and corresponding splitters.
4762 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4763 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4764 (fix_truncdi_i387_with_temp): Remove insn pattern
4765 and corresponding splitters.
4766 (fix_trunc<mode>_i387): Change operand 0 predicate to
4767 nonimmediate_operand.
4768 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4769 and corresponding splitters.
4770 (*fistdi2_1): Remove.
4771 (fistdi2): Ditto.
4772 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4773 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4774 (*fist<mode>2_1): Remove.
4775 (fist<mode>2): Ditto.
4776 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4777 splitters.
4778 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4779 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4780 (fistdi2_<rounding>): Change operand 0 predicate to
4781 nonimmediate_operand.
4782 (fistdi2_<rounding>_with_temp): Remove insn pattern
4783 and corresponding splitters.
4784 (fist<mode>2_<rounding>): Change operand 0 predicate to
4785 nonimmediate_operand.
4786 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4787 and corresponding splitters.
4788
4789 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4790
4791 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4792
4793 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4794 the init value.
4795
4796 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4797
4798 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4799 early gimple folding of vec_splat().
4800 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4801 * gimple-fold.h: Add an extern define for tree_vec_extract().
4802
4803 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4804
4805 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4806 wrappers around TREE_TYPE comparisons.
4807
4808 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4809
4810 PR target/80080
4811 * config/s390/predicates.md: Add nonsym_memory_operand.
4812 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4813 contains a SYMBOL_REF, load it into an intermediate pseudo.
4814 (s390_emit_compare_and_swap): Legitimize operand.
4815 * config/s390/s390.md: Use the new nonsym_memory_operand
4816 with UNSPECV_CAS patterns.
4817
4818 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4819
4820 PR target/80080
4821 * config/s390/s390-passes.def: New file.
4822 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4823 declaration.
4824 (make_pass_s390_early_mach): Add declaration.
4825 * config/s390/s390.c (make_pass_s390_early_mach):
4826 (s390_option_override): Remove dynamic registration.
4827 * config/s390/t-s390: Add s390-passes.def.
4828
4829 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4830
4831 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4832 Remove UNSPEC_LTREL_BASE check.
4833 (annotate_constant_pool_refs): Likewise.
4834 (find_constant_pool_ref): Likewise.
4835 (find_ltrel_base): Removed.
4836 (replace_ltrel_base): Removed.
4837 (s390_mainpool_finish): Remove replace_ltrel_base call.
4838 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4839 (s390_chunkify_finish): Remove replace_ltrel_base call.
4840 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4841
4842 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4843
4844 PR target/86779
4845 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4846 to speculation_safe_value_not_needed.
4847
4848 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4849 Bernd Schmidt <bernds_cb1@t-online.de>
4850
4851 * config/nvptx/nvptx-opts.h: New file.
4852 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4853 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4854 (ASM_SPEC): Define.
4855 (TARGET_SM35): New macro.
4856 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4857 correct predicate.
4858 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4859 values.
4860 (misa=): New option.
4861 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4862
4863 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4864
4865 * config/i386/i386.md (truncdfsf2): Remove expander.
4866 (truncdfsf2_with_temp): Ditto.
4867 (truncxf<mode>2): Ditto.
4868 (*truncdfsf_fast_mixed): Remove insn pattern.
4869 (*truncdfsf_fast_i387): Ditto.
4870 (*truncdfsf_mixed): Ditto.
4871 (*truncdfsf_i387): Ditto.
4872 (*truncdfsf2_i387_1): Ditto.
4873 (*truncxfsf2_mixed): Ditto.
4874 (*truncxfdf2_mixed): Ditto.
4875 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4876 to call gen_truncxf<mode>2 instead.
4877 (*truncxf<mode>2_i387): Remove.
4878 (reg->reg splitters): Remove splitter pattern.
4879 (reg->mem splitters): Ditto.
4880
4881 (truncdfsf2): New insn pattern.
4882 (truncxf<mode>2): Ditto.
4883
4884 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4885
4886 * tree-ssa-math-opts.c (is_mult_by): New function.
4887 (is_square_of): Use the above.
4888 (optimize_recip_sqrt): New function.
4889 (pass_cse_reciprocals::execute): Use the above.
4890
4891 2018-09-05 Richard Biener <rguenther@suse.de>
4892
4893 PR bootstrap/87134
4894 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4895 to zero-init the emplaced vec.
4896
4897 2018-09-05 Martin Liska <mliska@suse.cz>
4898
4899 PR tree-optimization/87205
4900 * tree-switch-conversion.c (pass_lower_switch::execute):
4901 Group cases for switch statements.
4902
4903 2018-09-05 Richard Biener <rguenther@suse.de>
4904
4905 PR tree-optimization/87217
4906 * tree-ssa-sccvn.c (vuse_valueize): New.
4907 (vn_reference_lookup_pieces): Use it.
4908 (vn_reference_lookup): Likewise.
4909
4910 2018-09-05 Nathan Sidwell <nathan@acm.org>
4911
4912 PR c++/87137
4913 * stor-layout.c (place_field): Scan forwards to check last
4914 bitfield when ms_bitfield_placement is in effect.
4915
4916 2018-09-05 Richard Biener <rguenther@suse.de>
4917
4918 PR bootstrap/87225
4919 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4920 return.
4921
4922 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4923 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4924
4925 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4926 * config.gcc (extra_objs): Build it.
4927 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4928 Likewise.
4929 * config/aarch64/aarch64-passes.def
4930 (pass_tag_collision_avoidance): New pass.
4931 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4932 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4933 (aarch64_classify_address): Remove static qualifier.
4934 (aarch64_address_info, aarch64_address_type): Move to...
4935 * config/aarch64/aarch64-protos.h: ... here.
4936 (make_pass_tag_collision_avoidance): New function.
4937 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4938 New tuning flag.
4939
4940 2018-09-05 Martin Liska <mliska@suse.cz>
4941
4942 * doc/gcov.texi: Update documentation of humar
4943 readable mode.
4944 * gcov.c (format_count): Print one decimal place, it provides
4945 more fine number of situations like '1G' vs. '1.4G'.
4946
4947 2018-09-05 Martin Liska <mliska@suse.cz>
4948
4949 PR target/87164
4950 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4951 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4952 to generate a MASK value.
4953
4954 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4955
4956 PR debug/86593
4957 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4958 if frame pointer isn't used.
4959 (compute_frame_pointer_to_fb_displacement): Likewise.
4960
4961 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4962
4963 PR target/87198
4964 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4965 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4966 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4967 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4968 and OPTION_MASK_ISA_XSAVEC_UNSET.
4969
4970 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4971
4972 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4973 XOR operations in NAND case.
4974
4975 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4976
4977 * wide-int-range.cc (wide_int_range_convert): New.
4978 * wide-int-range.h (wide_int_range_convert): New.
4979 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4980 code into wide_int_range_convert.
4981 (extract_range_into_wide_ints): Do not munge anti range constants
4982 into the entire domain. Just return the range back.
4983
4984 2018-09-04 Martin Liska <mliska@suse.cz>
4985
4986 * genmatch.c (output_line_directive): Add new argument
4987 fnargs.
4988 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4989
4990 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4991
4992 * doc/invoke.texi (Option Summary): Add whitespace.
4993
4994 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4995
4996 2018-09-04 Richard Biener <rguenther@suse.de>
4997
4998 PR tree-optimization/87211
4999 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5000 backedge value we're supposed to treat as VARYING also number
5001 the PHI to VARYING in case it got a different value-number already.
5002
5003 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5004
5005 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5006 (extract_range_from_binary_expr_1): Do not call
5007 vrp_can_optimize_bit_op.
5008 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5009 static.
5010 (wide_int_range_get_mask_and_bounds): New.
5011 (wide_int_range_optimize_bit_op): New.
5012 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5013 (wide_int_range_bit_and): Same.
5014 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5015 (wide_int_range_optimize_bit_op): New.
5016 (wide_int_range_get_mask_and_bounds): New.
5017
5018 2018-09-04 Richard Biener <rguenther@suse.de>
5019
5020 PR tree-optimization/87176
5021 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5022 variable. When value-numbering a virtual PHI node make sure
5023 to not value-number to the backedge value.
5024
5025 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5026
5027 * doc/extend.texi (Long Long, Hex Floats): Document support for
5028 long long and hex floats in more recent versions of ISO C++.
5029
5030 2018-09-03 Richard Biener <rguenther@suse.de>
5031
5032 PR tree-optimization/87177
5033 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5034 cleanup.
5035
5036 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5037
5038 * bb-reorder.c (edge_order): Convert to C-qsort-style
5039 tri-state comparator.
5040 (reorder_basic_blocks_simple): Change std::stable_sort to
5041 gcc_stablesort.
5042
5043 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5044
5045 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5046 tri-state comparator.
5047 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5048
5049 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5050
5051 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5052 (mergesort): ... here as maximum count for using netsort.
5053 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5054 (gcc_stablesort): New.
5055 * system.h (gcc_stablesort): Declare.
5056
5057 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5058
5059 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5060 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5061 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5062
5063 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5064
5065 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5066 lxsdx and stxsdx alternatives.
5067 (*mov<mode>_hardfloat64): Ditto.
5068 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5069
5070 2018-09-03 Richard Biener <rguenther@suse.de>
5071
5072 PR tree-optimization/87200
5073 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5074 simplify result.
5075
5076 2018-09-03 Martin Liska <mliska@suse.cz>
5077
5078 PR tree-optimization/87201
5079 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5080 Fix parenthesis in an expression.
5081
5082 2018-09-03 Richard Biener <rguenther@suse.de>
5083
5084 PR tree-optimization/87197
5085 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5086 visited. CSE the VN_INFO hashtable lookup.
5087
5088 PR tree-optimization/87169
5089 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5090 iterating make sure there's no extra backedges from irreducible
5091 regions feeding the header. Mark the destination block
5092 executable.
5093
5094 2018-09-03 Martin Liska <mliska@suse.cz>
5095
5096 PR driver/83193
5097 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5098 * common/common-targhooks.c (default_get_valid_option_values):
5099 New function.
5100 * common/common-targhooks.h (default_get_valid_option_values):
5101 Likewise.
5102 * common/config/i386/i386-common.c: Move processor_target_table
5103 from i386.c.
5104 (ix86_get_valid_option_values): New function.
5105 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5106 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5107 (PTA_*): Move all defined masks into i386-common.c.
5108 (ix86_function_specific_restore): Use new processor_cost_table.
5109 * config/i386/i386.h (struct ptt): Moved from i386.c.
5110 (struct pta): Likewise.
5111 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5112 * doc/tm.texi.in: Likewise.
5113 * opt-suggestions.c (option_proposer::suggest_option):
5114 Pass prefix to build_option_suggestions.
5115 (option_proposer::get_completions): Likewise.
5116 (option_proposer::build_option_suggestions): Use the new target
5117 hook.
5118 * opts.c (struct option_help_tuple): New struct.
5119 (print_filtered_help): Use the new target hook.
5120
5121 2018-09-03 Martin Liska <mliska@suse.cz>
5122
5123 PR middle-end/59521
5124 * predict.c (set_even_probabilities): Add likely_edges
5125 argument and handle cases where we have precisely one
5126 likely edge.
5127 (combine_predictions_for_bb): Catch also likely_edges.
5128 (tree_predict_by_opcode): Handle gswitch statements.
5129 * tree-cfg.h (find_case_label_for_value): New declaration.
5130 (find_taken_edge_switch_expr): Likewise.
5131 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5132 Find pivot in decision tree based on probabily, not by number of
5133 nodes.
5134
5135 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5136
5137 * doc/standards.texi (Standards): Update Objective-C reference.
5138
5139 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5140
5141 * doc/install.texi (Prerequisites): Update link for MPC.
5142
5143 2018-09-01 Michael Matz <matz@suse.de>
5144
5145 PR tree-optimization/87074
5146 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5147 PHIs for outer-loop uses.
5148
5149 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5150
5151 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5152 * doc/invoke.texi (C Dialect Options): Ditto.
5153
5154 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5155
5156 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5157
5158 2018-08-31 Richard Biener <rguenther@suse.de>
5159
5160 PR tree-optimization/87168
5161 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5162 (rpo_elim::eliminate_avail): When OP was not visited it must
5163 be available.
5164
5165 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5166
5167 * tree-vrp.c (copy_value_range): Convert param "from" from
5168 "value_range *" to "const value_range *".
5169 (range_is_null): Likewise for param "vr".
5170 (range_int_cst_p): Likewise.
5171 (range_int_cst_singleton_p): Likewise.
5172 (symbolic_range_p): Likewise.
5173 (value_ranges_intersect_p): Likewise for both params.
5174 (value_range_nonnegative_p): Likewise for param "vr".
5175 (value_range_constant_singleton): Likewise.
5176 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5177 (extract_range_into_wide_ints): Likewise for param "vr".
5178 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5179 and "vr1".
5180 (vrp_can_optimize_bit_op): Likewise.
5181 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5182 "vr1_".
5183 (extract_range_from_unary_expr): Likewise.
5184 (debug_value_range): Likewise for param "vr".
5185 (value_range::dump): Add "const" qualifier.
5186 (vrp_prop::check_array_ref): Convert local "vr" from
5187 "value_range *" to "const value_range *".
5188 (vrp_prop::check_mem_ref): Likewise.
5189 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5190 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5191 (vrp_intersect_ranges): Likewise.
5192 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5193 (vrp_prop::vrp_finalize): Likewise.
5194 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5195 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5196 (extract_range_from_unary_expr): Likewise.
5197 (value_range_constant_singleton): Likewise.
5198 (symbolic_range_p): Likewise.
5199 (copy_value_range): Likewise.
5200 (extract_range_from_binary_expr_1): Likewise.
5201 (range_int_cst_p): Likewise.
5202 (vrp_set_zero_nonzero_bits): Likewise.
5203 (range_int_cst_singleton_p): Likewise.
5204
5205 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5206
5207 * config/aarch64/arm_neon.h (vabsd_s64): New.
5208 (vnegd_s64): Likewise.
5209
5210 2018-08-31 Martin Jambor <mjambor@suse.cz>
5211
5212 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5213
5214 2018-08-31 Martin Liska <mliska@suse.cz>
5215
5216 * ipa-icf.c (sem_item::add_type): Use
5217 sem_item::m_type_hash_cache.
5218 * ipa-icf.h: Move the cache from sem_item_optimizer
5219 to sem_item.
5220
5221 2018-08-31 Nathan Sidwell <nathan@acm.org>
5222
5223 * doc/extend.texi (Backwards Compatibility): Remove implicit
5224 extern C leeway of () being (...).
5225
5226 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5227
5228 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5229
5230 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5231
5232 PR target/86684
5233 PR target/87149
5234 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5235
5236 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5237
5238 PR middle-end/87138
5239 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5240 gen_int_mode. Formatting fixes.
5241
5242 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5243
5244 * target.def (custom_function_descriptors): Improve documentation.
5245 * doc/tm.texi.in (Trampolines): Expand discussion of function
5246 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5247 beginning of the section.
5248 * doc/tm.texi: Regenerated.
5249
5250 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5251
5252 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5253 base class in the initializer list. This is a workaround for
5254 building with older GCC.
5255 (class auto_bb_flag): Likewise.
5256
5257 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5258
5259 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5260 (altivec_vcmpequ<VI_char>_p): Remove star.
5261 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5262 vector load modes.
5263 (expand_strncmp_vec_sequence): New function.
5264 (emit_final_str_compare_vec): New function.
5265 (expand_strn_compare): Add support for vector strncmp.
5266 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5267 length specification to bytes.
5268 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5269 (vcmpnezb_p): New pattern.
5270 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5271 for option -mstring-compare-inline-limit.
5272
5273 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5274
5275 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5276 (PTA_SKYLAKE): Add PTA_AES.
5277 (PTA_GOLDMONT): Likewise.
5278
5279 2018-08-29 Jan Hubicka <jh@suse.cz>
5280
5281 PR lto/86517
5282 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5283 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5284
5285 2018-08-29 Jan Hubicka <jh@suse.cz>
5286
5287 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5288 TYPE_STUB_DECL.
5289 (hash_tree): Do not visit TYPE_STUB_DECL.
5290 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5291 stream TYPE_STUB_DECL.
5292 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5293 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5294 after free_lang_data.
5295 (type_in_anonymous_namespace_p): Likewise.
5296
5297 2018-08-29 Jan Hubicka <jh@suse.cz>
5298
5299 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5300 comment that it has to be even number.
5301 (class sreal): Change m_sig type to int32_t.
5302 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5303 int64_t for temporary calculations.
5304 (sreal_verify_basics): Drop one bit from minimum and maximum.
5305
5306 2018-08-30 Richard Biener <rguenther@suse.de>
5307
5308 PR tree-optimization/87147
5309 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5310 (visit_phi): When the degenerate result is from the backedge and
5311 we didn't visit its definition yet drop to VARYING.
5312 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5313
5314 2018-08-29 Jan Hubicka <jh@suse.cz>
5315
5316 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5317 DECL_VINDEX.
5318 (hash_tree): Likewise.
5319
5320 2018-08-29 Jan Hubicka <jh@suse.cz>
5321
5322 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5323 and TYPE_NEXT_REF_TO.
5324
5325 2018-08-29 Jan Hubicka <jh@suse.cz>
5326
5327 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5328 comment that it has to be even number.
5329 (class sreal): Change m_sig type to int32_t.
5330 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5331 int64_t for temporary calculations.
5332 (sreal_verify_basics): Drop one bit from minimum and maximum.
5333
5334 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5335
5336 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5337
5338 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5339
5340 PR middle-end/86995
5341 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5342 if to_add is negative.
5343
5344 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5345
5346 PR middle-end/87053
5347 * builtins.c (c_strlen): Improve range checks.
5348
5349 2018-08-29 Martin Sebor <msebor@redhat.com>
5350 Jeff Law <law@redhat.com>
5351
5352 PR tree-optimization/86714
5353 PR tree-optimization/86711
5354 * builtins.c (c_strlen): Add arguments to call to string_constant.
5355 * expr.c (string_constant): Add argument. Detect missing nul
5356 terminator and outermost declaration it's missing in.
5357 * expr.h (string_constant): Add argument.
5358 * fold-const.c (read_from_constant_string): Add arguments to call to
5359 string_constant.
5360 (c_getstr): Likewise.
5361 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5362 to string_constant.
5363 * tree-ssa-strlen.c (get_stridx): Likewise.
5364
5365 2018-08-29 Jan Hubicka <jh@suse.cz>
5366
5367 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5368 Do not stream DECL_VINDEX.
5369 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5370 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5371 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5372
5373 2018-08-29 Richard Biener <rguenther@suse.de>
5374
5375 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5376 virtual operands that are not default defs to honor region
5377 boundaries.
5378 (rpo_vn_valueize): Remove ineffective code here.
5379
5380 2018-08-29 Richard Biener <rguenther@suse.de>
5381
5382 PR tree-optimization/87132
5383 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5384 when skipping defs reachable over backedges.
5385
5386 2018-08-29 Richard Biener <rguenther@suse.de>
5387
5388 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5389 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5390 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5391 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5392 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5393 (vn_reference_lookup_3): Remove use of const_parms.
5394 (free_rpo_vn): Do not free const_parms.
5395 (do_rpo_vn): Do not call init_const_parms.
5396 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5397 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5398 (call_may_clobber_ref_p_1): Likewise.
5399
5400 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5401
5402 PR other/86726
5403 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5404 (-O): Ditto.
5405 (-ftree-scev-cprop): Document.
5406
5407 2018-08-29 Jan Hubicka <jh@suse.cz>
5408
5409 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5410 parameters.
5411 (sreal constructor): Update.
5412 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5413 sreal:operator/): Update.
5414
5415 2018-08-29 Martin Liska <mliska@suse.cz>
5416
5417 * tree-switch-conversion.c (switch_conversion::expand):
5418 Strenghten assumption about gswitch statements.
5419
5420 2018-08-29 Richard Biener <rguenther@suse.de>
5421
5422 PR tree-optimization/87117
5423 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5424 re-value-number released SSA VDEFs.
5425
5426 2018-08-29 Richard Biener <rguenther@suse.de>
5427
5428 PR tree-optimization/87126
5429 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5430
5431 2018-08-28 Jim Wilson <jimw@sifive.com>
5432
5433 * config/riscv/pic.md: Rewrite.
5434 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5435 invalid address.
5436 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5437 (SOFTF, default_load, softload, softstore): New.
5438
5439 2018-08-28 Jeff Law <law@redhat.com>
5440
5441 * fold-const.c (fold_binary_loc): Remove recently added assert.
5442
5443 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5444
5445 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5446 to OP parmeter of generated function.
5447
5448 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5449
5450 PR tree-optimization/87009
5451 * match.pd: Add boolean optimizations.
5452
5453 2018-08-28 Martin Sebor <msebor@redhat.com>
5454
5455 PR middle-end/86631
5456 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5457 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5458 (pass_walloca::gate): Use it.
5459 (alloca_call_type): Same.
5460 (pass_walloca::execute): Same.
5461 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5462
5463 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5464
5465 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5466 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5467 >= 3005 to >= 9000.
5468
5469 2018-08-28 Richard Biener <rguenther@suse.de>
5470
5471 PR tree-optimization/87124
5472 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5473 constants before looking up avail.
5474
5475 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5476
5477 PR middle-end/87099
5478 * calls.c (maybe_warn_nonstring_arg): Punt early if
5479 warn_stringop_overflow is zero. Don't call get_range_strlen
5480 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5481 Swap comparison operands to have constants on rhs. Only use
5482 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5483 increment lenrng[0].
5484
5485 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5486
5487 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5488 use of tree_to_shwi. Remove duplicated test for the size being
5489 a whole number of bytes.
5490
5491 2018-08-28 Richard Biener <rguenther@suse.de>
5492
5493 PR tree-optimization/87117
5494 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5495 Handle removed stmt without LHS (GIMPLE_NOP).
5496
5497 2018-08-28 Richard Biener <rguenther@suse.de>
5498
5499 PR tree-optimization/87117
5500 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5501 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5502
5503 2018-08-28 Richard Biener <rguenther@suse.de>
5504
5505 PR tree-optimization/87117
5506 * tree-ssa-pre.c (compute_avail): Do not make expressions
5507 with predicated values available.
5508 (get_expr_value_id): Assert we do not run into predicated value
5509 expressions.
5510
5511 2018-08-28 Richard Biener <rguenther@suse.de>
5512
5513 PR tree-optimization/87117
5514 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5515 get virtual operands.
5516 (get_expr_operands): Handle STRING_CST like other decls.
5517
5518 2018-08-28 Martin Liska <mliska@suse.cz>
5519
5520 * tree.h: Update documentation of fndecl_built_in_p
5521 functions.
5522
5523
5524 2018-08-27 Jeff Law <law@redhat.com>
5525 PR tree-optimization/87110
5526 * tree-ssa-dse.c (compute_trims): Handle non-constant
5527 TYPE_SIZE_UNIT.
5528
5529 2018-08-27 Martin Sebor <msebor@redhat.com>
5530
5531 PR tree-optimization/86914
5532 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5533
5534 2018-08-27 Martin Sebor <msebor@redhat.com>
5535
5536 PR tree-optimization/87112
5537 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5538 the type of the bound argument.
5539
5540 2018-08-27 Jeff Law <law@redhat.com>
5541
5542 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5543 type does not have a TYPE_SIZE_UNIT.
5544
5545 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5546
5547 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5548 with include of backend.h.
5549
5550 2018-08-27 Richard Biener <rguenther@suse.de>
5551
5552 PR tree-optimization/86927
5553 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5554 use const cond reduction code.
5555
5556 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5557
5558 PR tree-optimization/85758
5559 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5560
5561 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5562
5563 PR c++/87091
5564 * diagnostic-show-locus.c (class layout_range): Update for
5565 conversion of show_caret_p to a tri-state.
5566 (layout_range::layout_range): Likewise.
5567 (make_range): Likewise.
5568 (layout::maybe_add_location_range): Likewise.
5569 (layout::should_print_annotation_line_p): Don't show annotation
5570 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5571 (layout::get_state_at_point): Update for conversion of
5572 show_caret_p to a tri-state. Bail out early for
5573 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5574 underlining or source colorization.
5575 (gcc_rich_location::add_location_if_nearby): Update for conversion
5576 of show_caret_p to a tri-state.
5577 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5578 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5579 Likewise.
5580 (selftest::test_one_liner_labels): Likewise.
5581 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5582 conversion of show_caret_p to a tri-state.
5583 * pretty-print.c (text_info::set_location): Likewise.
5584 * pretty-print.h (text_info::set_location): Likewise.
5585 * substring-locations.c (format_warning_n_va): Likewise.
5586 * tree-diagnostic.c (default_tree_printer): Likewise.
5587 * tree-pretty-print.c (newline_and_indent): Likewise.
5588
5589 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5590
5591 PR c++/87091
5592 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5593 line above for line-insertion fix-it hints.
5594 (selftest::test_fixit_insert_containing_newline): Update the
5595 expected results, and add a test with line-numbering enabled.
5596
5597 2018-08-27 Martin Liska <mliska@suse.cz>
5598
5599 PR sanitizer/86962
5600 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5601 params with DECL_HAS_VALUE_EXPR_P.
5602
5603 2018-08-27 Martin Liska <mliska@suse.cz>
5604
5605 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5606 selected expansion strategy.
5607
5608 2018-08-27 Martin Liska <mliska@suse.cz>
5609
5610 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5611 * builtins.c (is_builtin_fn): Likewise.
5612 * attribs.c (diag_attr_exclusions): Use new function
5613 fndecl_built_in_p and remove check for FUNCTION_DECL if
5614 possible.
5615 (builtin_mathfn_code): Likewise.
5616 (fold_builtin_expect): Likewise.
5617 (fold_call_expr): Likewise.
5618 (fold_builtin_call_array): Likewise.
5619 (fold_call_stmt): Likewise.
5620 (set_builtin_user_assembler_name): Likewise.
5621 (is_simple_builtin): Likewise.
5622 * calls.c (gimple_alloca_call_p): Likewise.
5623 (maybe_warn_nonstring_arg): Likewise.
5624 * cfgexpand.c (expand_call_stmt): Likewise.
5625 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5626 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5627 (cgraph_node::verify_node): Likewise.
5628 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5629 (cgraph_node::create_clone): Likewise.
5630 * config/arm/arm.c (arm_insert_attributes): Likewise.
5631 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5632 * dse.c (scan_insn): Likewise.
5633 * expr.c (expand_expr_real_1): Likewise.
5634 * fold-const.c (operand_equal_p): Likewise.
5635 (fold_binary_loc): Likewise.
5636 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5637 * gimple-low.c (lower_stmt): Likewise.
5638 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5639 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5640 Likewise.
5641 * gimple.c (gimple_build_call_from_tree): Likewise.
5642 (gimple_call_builtin_p): Likewise.
5643 (gimple_call_combined_fn): Likewise.
5644 * gimplify.c (gimplify_call_expr): Likewise.
5645 (gimple_boolify): Likewise.
5646 (gimplify_modify_expr): Likewise.
5647 (gimplify_addr_expr): Likewise.
5648 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5649 * ipa-cp.c (determine_versionability): Likewise.
5650 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5651 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5652 * ipa-split.c (visit_bb): Likewise.
5653 (split_function): Likewise.
5654 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5655 * lto-cgraph.c (input_node): Likewise.
5656 * lto-streamer-out.c (write_symbol): Likewise.
5657 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5658 (lower_omp_1): Likewise.
5659 * predict.c (strip_predict_hints): Likewise.
5660 * print-tree.c (print_node): Likewise.
5661 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5662 * trans-mem.c (is_tm_irrevocable): Likewise.
5663 (is_tm_load): Likewise.
5664 (is_tm_simple_load): Likewise.
5665 (is_tm_store): Likewise.
5666 (is_tm_simple_store): Likewise.
5667 (is_tm_abort): Likewise.
5668 (tm_region_init_1): Likewise.
5669 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5670 * tree-cfg.c (verify_gimple_call): Likewise.
5671 (move_stmt_r): Likewise.
5672 (stmt_can_terminate_bb_p): Likewise.
5673 * tree-eh.c (lower_eh_constructs_2): Likewise.
5674 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5675 * tree-inline.c (remap_gimple_stmt): Likewise.
5676 (copy_bb): Likewise.
5677 (estimate_num_insns): Likewise.
5678 (fold_marked_statements): Likewise.
5679 * tree-sra.c (scan_function): Likewise.
5680 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5681 (optimize_stack_restore): Likewise.
5682 (pass_fold_builtins::execute): Likewise.
5683 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5684 (mark_all_reaching_defs_necessary_1): Likewise.
5685 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5686 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5687 (pass_forwprop::execute): Likewise.
5688 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5689 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5690 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5691 * tree-ssa-strlen.c (get_string_length): Likewise.
5692 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5693 (find_func_aliases_for_call): Likewise.
5694 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5695 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5696 * tree-tailcall.c (find_tail_calls): Likewise.
5697 * tree.c (need_assembler_name_p): Likewise.
5698 (free_lang_data_in_decl): Likewise.
5699 (get_call_combined_fn): Likewise.
5700 * ubsan.c (is_ubsan_builtin_p): Likewise.
5701 * varasm.c (incorporeal_function_p): Likewise.
5702 * tree.h (DECL_BUILT_IN): Remove and replace with
5703 fndecl_built_in_p.
5704 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5705 (fndecl_built_in_p): New.
5706
5707 2018-08-27 Martin Liska <mliska@suse.cz>
5708
5709 PR tree-optimization/86847
5710 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5711 Dump also subtree probability.
5712 (switch_decision_tree::do_jump_if_equal): New function.
5713 (switch_decision_tree::emit_case_nodes): Handle special
5714 situations in balanced tree that can be emitted much simpler.
5715 Fix calculation of probabilities that happen in tree expansion.
5716 * tree-switch-conversion.h (struct cluster): Add
5717 is_single_value_p.
5718 (struct simple_cluster): Likewise.
5719 (struct case_tree_node): Add new function has_child.
5720 (do_jump_if_equal): New.
5721
5722 2018-08-27 Martin Liska <mliska@suse.cz>
5723
5724 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5725 Add new argument to bit_test_cluster constructor.
5726 (bit_test_cluster::emit): Set bits really number of values
5727 handlel by a test.
5728 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5729 probability argument.
5730 * tree-switch-conversion.h (struct bit_test_cluster):
5731 Add m_handles_entire_switch.
5732
5733 2018-08-27 Martin Liska <mliska@suse.cz>
5734
5735 PR tree-optimization/86702
5736 * tree-switch-conversion.c (jump_table_cluster::emit):
5737 Make probabilities even for values in jump table
5738 according to number of cases handled.
5739 (switch_decision_tree::compute_cases_per_edge): Pass
5740 argument to reset_out_edges_aux function.
5741 (switch_decision_tree::analyze_switch_statement): Likewise.
5742 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5743 Make it static.
5744
5745 2018-08-27 Martin Liska <mliska@suse.cz>
5746
5747 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5748 cfun argument explicitly.
5749 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5750 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5751 function gimple_switch_default_bb.
5752 (convert_switch_statements):
5753 (expand_builtins):
5754 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5755 * stmt.c (label_to_block_fn): Use label_to_block and pass
5756 cfun argument explicitly and use gimple_switch_label_bb.
5757 (expand_case): Likewise.
5758 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5759 cfun argument explicitly. Likewise.
5760 (make_edges_bb): Likewise.
5761 (make_cond_expr_edges): Likewise.
5762 (get_cases_for_edge): Likewise.
5763 (make_gimple_switch_edges): Likewise.
5764 (label_to_block_fn): Likewise.
5765 (label_to_block): Likewise.
5766 (make_goto_expr_edges): Likewise.
5767 (make_gimple_asm_edges): Likewise.
5768 (main_block_label): Likewise.
5769 (group_case_labels_stmt): Likewise.
5770 (find_taken_edge_computed_goto): Likewise.
5771 (find_taken_edge_switch_expr): Likewise.
5772 (gimple_verify_flow_info): Likewise.
5773 (gimple_redirect_edge_and_branch): Likewise.
5774 (gimple_switch_label_bb): New function.
5775 (gimple_switch_default_bb): Likewise.
5776 (gimple_switch_edge): Likewise.
5777 (gimple_switch_default_edge): Likewise.
5778 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5779 (label_to_block): ... with this.
5780 (gimple_switch_label_bb): New.
5781 (gimple_switch_default_bb): Likewise.
5782 (gimple_switch_edge): Likewise.
5783 (gimple_switch_default_edge): Likewise.
5784 * tree-cfgcleanup.c (convert_single_case_switch): Use
5785 new gimple functions and pass new argument to label_to_block.
5786 (cleanup_control_flow_bb):
5787 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5788 cfun argument explicitly.
5789 (make_eh_edges): Likewise.
5790 (redirect_eh_dispatch_edge): Likewise.
5791 (lower_resx): Likewise.
5792 (lower_eh_dispatch): Likewise.
5793 (maybe_remove_unreachable_handlers): Likewise.
5794 (unsplit_eh): Likewise.
5795 (cleanup_empty_eh): Likewise.
5796 (verify_eh_edges): Likewise.
5797 (verify_eh_dispatch_edge): Likewise.
5798 * tree-ssa-dom.c (record_edge_info): Likewise.
5799 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5800 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5801 (thread_through_normal_block): Likewise.
5802 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5803 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5804 * tree-switch-conversion.c (switch_conversion::collect): Use new
5805 gimple functions.
5806 (switch_conversion::check_final_bb): Likewise.
5807 (switch_conversion::gather_default_values): Pass new argument
5808 to label_to_block.
5809 (switch_conversion::build_constructors): Likewise.
5810 (switch_decision_tree::compute_cases_per_edge): Use new
5811 gimple_switch_edge function.
5812 (switch_decision_tree::analyze_switch_statement): Pass new argument
5813 to label_to_block.
5814 (switch_decision_tree::try_switch_expansion): Use
5815 gimple_switch_default_edge.
5816 * tree-vrp.c (find_switch_asserts): Pass new argument
5817 to label_to_block.
5818 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5819 (vr_values::simplify_switch_using_ranges): Likewise.
5820
5821 2018-08-27 Richard Biener <rguenther@suse.de>
5822
5823 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5824 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5825
5826 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5827 (struct vn_nary_op_s): Add unwind_to member. Add
5828 predicated_values flag and put result into a union together
5829 with a linked list of vn_pval.
5830 (struct vn_ssa_aux): Add name member to make maintaining
5831 a map of SSA name to vn_ssa_aux possible. Remove no longer
5832 needed info, dfsnum, low, visited, on_sccstack, use_processed
5833 and range_info_anti_range_p members.
5834 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5835 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5836 New functions.
5837 (vn_valueize): New global.
5838 (vn_context_bb): Likewise.
5839 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5840 VN_INFO_PTR_INFO): Remove.
5841 * tree-ssa-sccvn.c: ... (rewrite)
5842 (pass_fre::execute): For -O2+ initialize loops and run
5843 RPO VN in optimistic mode (iterating). For -O1 and -Og
5844 run RPO VN in non-optimistic mode.
5845 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5846 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5847 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5848 (rpo-vn-max-loop-depth): Document.
5849 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5850 when valuezing the VUSE signals we walked out of the region.
5851 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5852 (phi_translate): Set VN context block to use for availability
5853 lookup.
5854 (compute_avail): Likewise.
5855 (pre_valueize): New function.
5856 (pass_pre::execute): Adjust to the RPO VN API.
5857
5858 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5859 (propagate_constants_for_unrolling): Remove.
5860 (tree_unroll_loops_completely): Perform value-numbering
5861 on the unrolled bodies loop parent.
5862
5863 2018-08-27 Richard Biener <rguenther@suse.de>
5864
5865 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5866 for partial antic compute.
5867
5868 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5869
5870 PR rtl-optimization/87065
5871 * combine.c (simplify_if_then_else): Formatting fix.
5872 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5873 check.
5874 (known_cond): Don't return const_true_rtx for vector modes. Use
5875 CONST0_RTX instead of const0_rtx. Formatting fixes.
5876
5877 2018-08-27 Martin Liska <mliska@suse.cz>
5878
5879 PR gcov-profile/87069
5880 * gcov.c (process_file): Record files already processed
5881 and warn about a file being processed multiple times.
5882
5883 2018-08-27 Martin Liska <mliska@suse.cz>
5884
5885 PR driver/83193
5886 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5887 Set default values for x_aarch64_*_string strings.
5888 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5889 prefix. For -mabi do not print '=ABI' in help and use
5890 <option_value> format for -msve-vector-bits and -moverride
5891 options.
5892
5893 2018-08-26 Jeff Law <law@redhat.com>
5894
5895 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5896 "cfg.h"
5897
5898 2018-08-26 Marek Polacek <polacek@redhat.com>
5899
5900 PR c++/87029, Implement -Wredundant-move.
5901 * doc/invoke.texi: Document -Wredundant-move.
5902
5903 2018-08-25 Martin Sebor <msebor@redhat.com>
5904
5905 PR tree-optimization/87059
5906 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5907 to the same type as the other.
5908 * fold-const.c (fold_binary_loc): Assert expectation.
5909
5910 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5911
5912 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5913 extraneous parentheses, dead code section and formatting.
5914
5915 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5916
5917 PR c++/87091
5918 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5919 wide enough for jumps in the line-numbering to be visible.
5920 (layout::print_gap_in_line_numbering): New member function.
5921 (layout::calculate_line_spans): When using line numbering, merge
5922 line spans that are only 1 line apart.
5923 (diagnostic_show_locus): When printing line numbers, show gaps in
5924 line numbering directly, rather than printing headers.
5925 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5926 line-numbering with multiple line spans.
5927 (selftest::test_fixit_insert_containing_newline_2): Add test of
5928 line-numbering, in which the spans are close enough to be merged.
5929
5930 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5931
5932 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5933 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5934 * tree-vrp.c (range_is_nonnull): Remove.
5935 (range_includes_zero_p): Accept value_range instead of min/max.
5936 (extract_range_from_binary_expr_1): Do not early bail on
5937 POINTER_PLUS_EXPR.
5938 Use range_includes_zero_p instead of range_is_nonnull.
5939 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5940 of range_is_nonnull.
5941 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5942 special case VR_ANTI_RANGE.
5943 (vrp_finalize): Same.
5944 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5945 instead of min/max.
5946 (range_is_nonnull): Remove.
5947 * vr-values.c (vrp_stmt_computes_nonzero): Use
5948 range_includes_zero_p instead of range_is_nonnull.
5949 (extract_range_basic): Pass value_range to range_includes_zero_p
5950 instead of range_is_nonnull.
5951
5952 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5953
5954 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5955 * emit-rtl.h (rtl_data): Remove return_bnd.
5956 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5957 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5958 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5959 (POINTER_BOUNDS_MODE): Remove definition.
5960 (make_pointer_bounds_mode): Remove.
5961 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5962 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5963 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5964 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5965 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5966 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5967 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5968
5969 * config/i386/i386-modes.def (BND32, BND64): Remove.
5970 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5971 (dbx64_register_map): Ditto.
5972 (svr4_dbx_register_map): Ditto.
5973 (indirect_thunk_bnd_needed): Remove.
5974 (indirect_thunks_bnd_used): Ditto.
5975 (indirect_return_bnd_needed): Ditto.
5976 (indirect_return_via_cx_bnd): Ditto.
5977 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5978 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5979 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5980 (output_indirect_thunk_function): Remove handling of
5981 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5982 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5983 (ix86_save_reg): Remove handling of crtl->return_bnd.
5984 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5985 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5986 and UNSPEC_BNDLX_ADDR.
5987 (ix86_output_indirect_branch_via_reg): Remove handling of
5988 indirect_thunk_prefix_bnd.
5989 (ix86_output_indirect_branch_via_push): Ditto.
5990 (ix86_output_function_return): Ditto.
5991 (ix86_output_indirect_function_return): Ditto.
5992 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5993 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5994 (CALL_USED_REGISTERS): Ditto.
5995 (REG_ALLOC_ORDER): Update for removal of bound registers.
5996 (HI_REGISTER_NAMES): Ditto.
5997 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5998 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5999 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6000 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6001 (FIRST_PSEUDO_REG): Update.
6002 (BND): Remove mode iterator.
6003 * config/i386/predicates.md (bnd_mem_operator): Remove.
6004
6005 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6006
6007 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6008 vectors.
6009
6010 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6011
6012 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6013 the case in which the permute needs only a single element and
6014 repeats for every vector of the result. Extend that case to
6015 handle variable-length vectors.
6016 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6017
6018 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6019
6020 PR debug/79342
6021 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6022 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6023
6024 2018-08-24 Richard Biener <rguenther@suse.de>
6025
6026 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6027 bb_flags_allocated members.
6028 (auto_flag): New RAII class for allocating flags.
6029 (auto_edge_flag): New RAII class for allocating edge flags.
6030 (auto_bb_flag): New RAII class for allocating bb flags.
6031 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6032 flag dynamically.
6033 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6034 in favor of temporarily allocated BB flag.
6035 * hsa-brig.c: Re-order includes.
6036 * hsa-dump.c: Likewise.
6037 * hsa-regalloc.c: Likewise.
6038 * print-rtl.c: Likewise.
6039 * profile-count.c: Likewise.
6040
6041 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6042
6043 PR target/86989
6044 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6045 the TOC register.
6046
6047 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6048
6049 PR 87073/bootstrap
6050 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6051 from wide_int_range_multiplicative_op.
6052
6053 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6054
6055 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6056 "permutaion".
6057
6058 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6059
6060 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6061 to 'expanded'.
6062
6063 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6064
6065 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6066 full GENERIC expression used for replacement.
6067
6068 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6069
6070 * tree-vrp.c (abs_extent_range): Remove.
6071 (extract_range_into_wide_ints): Pass wide ints by reference.
6072 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6073 Pass wide ints by reference in all calls to
6074 extract_range_into_wide_ints.
6075 * wide-int-range.cc (wide_int_range_div): New.
6076 * wide-int-range.h (wide_int_range_div): New.
6077 (wide_int_range_includes_zero_p): New.
6078 (wide_int_range_zero_p): New.
6079
6080 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6081
6082 * config/aarch64/aarch64.md (arches): New enum.
6083 (arch): New enum attr.
6084 (arch_enabled): New attr.
6085 (enabled): Now uses arch_enabled only.
6086 (simd, sve, fp16): Removed attribute.
6087 (fp): Attr now defined in terms of 'arch'.
6088 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6089 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6090 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6091 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6092 attributes into 'arch'.
6093 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6094 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6095 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6096 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6097 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6098 'simd' attribute into 'arch'.
6099 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6100 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6101 Convert use of 'fp' attribute to 'arch'.
6102 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6103 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6104 into 'arch'.
6105 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6106 (different modes) Merge 'fp' and 'simd' into 'arch'.
6107 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6108 'simd' into 'arch'.
6109
6110 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6111
6112 PR rtl-optimization/87026
6113 * expmed.c (canonicalize_comparison): If we can no longer create
6114 pseudoregisters, don't.
6115
6116 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6117
6118 PR target/86951
6119 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6120 prototype.
6121 * config/arm/arm.c (speculation_barrier_libfunc): New static
6122 variable.
6123 (arm_init_libfuncs): Initialize it.
6124 (arm_emit_speculation_barrier): New function.
6125 * config/arm/arm.md (speculation_barrier): Call
6126 arm_emit_speculation_barrier for architectures that do not have
6127 DSB or ISB.
6128 (speculation_barrier_insn): Only match on Armv7 or later.
6129
6130 2018-08-23 Richard Biener <rguenther@suse.de>
6131
6132 PR middle-end/87024
6133 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6134 calls.
6135
6136 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6137
6138 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6139 of single-vector TBLs.
6140 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6141 one input is given.
6142
6143 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6144
6145 PR target/85910
6146 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6147 aarch64_evpc_tbl guard.
6148
6149 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6150
6151 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6152 behaviour.
6153
6154 2018-08-22 Martin Sebor <msebor@redhat.com>
6155
6156 PR middle-end/87052
6157 * tree-pretty-print.c (pretty_print_string): Add argument.
6158 (dump_generic_node): Call to pretty_print_string with string size.
6159
6160 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6161
6162 PR rtl-optimization/86771
6163 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6164 of two SETs into those two SETs, one to be placed at i2, if that SETs
6165 destination is modified between i2 and i3.
6166
6167 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6168
6169 PR tree-optimization/86725
6170 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6171 function.
6172 (vect_analyze_scalar_cycles_1): Check it.
6173
6174 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6175
6176 PR tree-optimization/86725
6177 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6178 an outer loop phi as a double reduction, make sure that the
6179 single user of the phi result is an inner loop phi.
6180
6181 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6182
6183 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6184 grouped stores with gaps to a strided group.
6185
6186 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6187
6188 * tree-vect-stmts.c (get_group_load_store_type)
6189 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6190 first statement in a group.
6191
6192 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6193
6194 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6195 the sequence used in gcc/gcc.c.
6196
6197 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6198
6199 PR other/704
6200 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6201 building it.
6202
6203 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6204
6205 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6206 Darwin10-specific unwinder-shim.
6207 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6208 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6209 New to cater for Darwin10 Rosetta.
6210
6211 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6212
6213 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6214 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6215
6216 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6217
6218 PR bootstrap/81033
6219 PR target/81733
6220 PR target/52795
6221 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6222 (dwarf2out_switch_text_section): Generate a local label for the
6223 second function sub-section and apply it as the second FDE start
6224 label.
6225 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6226 second sub-section start.
6227
6228 2018-08-22 Richard Biener <rguenther@suse.de>
6229
6230 PR tree-optimization/86988
6231 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6232
6233 2018-08-22 Richard Biener <rguenther@suse.de>
6234
6235 PR tree-optimization/86945
6236 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6237
6238 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6239
6240 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6241 a comment about how uses of r2 for .sdata2 come about.
6242
6243 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6244
6245 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6246
6247 2018-08-21 Marek Polacek <polacek@redhat.com>
6248
6249 PR c++/86981, Implement -Wpessimizing-move.
6250 * doc/invoke.texi: Document -Wpessimizing-move.
6251
6252 2018-08-21 Jan Hubicka <jh@suse.cz>
6253
6254 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6255 * tree.h (is_redundant_typedef): Remove.
6256 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6257
6258 2018-08-21 Jan Hubicka <jh@suse.cz>
6259
6260 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6261 when possible.
6262
6263 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6264
6265 * expmed.c (extract_low_bits): Reject invalid subregs early.
6266
6267 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6268
6269 PR middle-end/86121
6270 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6271 behaviour.
6272
6273 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6274
6275 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6276 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6277 * config/vxworks.c: Likewise.
6278
6279 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6280
6281 * config/vxworks.c: Set targetm.have_ctors_dtors
6282 if HAVE_INITFINI_ARRAY_SUPPORT.
6283 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6284 if HAVE_INITFINI_ARRAY_SUPPORT.
6285
6286 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6287
6288 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6289 default search path for VxWorks < 7.
6290
6291 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6292
6293 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6294 (get_format_string): Refer to c_getstr.
6295
6296 2018-08-21 Tom de Vries <tdevries@suse.de>
6297
6298 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6299 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6300 (debuginfo_early_stop): Declare.
6301 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6302 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6303 (debuginfo_early_stop): New function.
6304 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6305 and debuginfo_early_stop.
6306 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6307 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6308 (general_init): Call debuginfo_early_init.
6309 (finalize): Call debuginfo_fini.
6310 (do_compile): Call debuginfo_init.
6311 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6312 -fdump-early-debug.
6313 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6314
6315 2018-08-21 Tom de Vries <tdevries@suse.de>
6316
6317 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6318 flag_dump_noaddr and flag_dump_unnumbered.
6319
6320 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6321
6322 * wide-int-range.cc (wide_int_range_abs): New.
6323 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6324 * wide-int-range.h (wide_int_range_abs): New.
6325 (wide_int_range_min_max): New.
6326 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6327 case to call wide_int_range_abs.
6328 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6329 (extract_range_from_abs_expr): Delete.
6330
6331 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6332
6333 PR target/87033
6334 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6335 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6336 for indexed loads.
6337
6338 2018-08-20 Nathan Sidwell <nathan@acm.org>
6339 Jeff Law <law@redhat.com>
6340
6341 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6342 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6343
6344 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6345
6346 PR other/84889
6347 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6348 (decl_attributes): Likewise.
6349 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6350 instance.
6351 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6352 * diagnostic-core.h (class auto_diagnostic_group): New class.
6353 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6354 (diagnostic_report_diagnostic): Handle the first diagnostics within
6355 a group.
6356 (emit_diagnostic): Add auto_diagnostic_group instance.
6357 (inform): Likewise.
6358 (inform_n): Likewise.
6359 (warning): Likewise.
6360 (warning_at): Likewise.
6361 (warning_n): Likewise.
6362 (pedwarn): Likewise.
6363 (permerror): Likewise.
6364 (error): Likewise.
6365 (error_n): Likewise.
6366 (error_at): Likewise.
6367 (sorry): Likewise.
6368 (fatal_error): Likewise.
6369 (internal_error): Likewise.
6370 (internal_error_no_backtrace): Likewise.
6371 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6372 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6373 * diagnostic.h (struct diagnostic_context): Add fields
6374 "diagnostic_group_nesting_depth",
6375 "diagnostic_group_emission_count", "begin_group_cb",
6376 "end_group_cb".
6377 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6378 Add auto_diagnostic_group instance(s).
6379 (find_explicit_erroneous_behavior): Likewise.
6380 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6381 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6382 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6383 (gimplify_va_arg_expr): Likewise.
6384 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6385 (HSA_SORRY_AT): Likewise.
6386 * ipa-devirt.c (compare_virtual_tables): Likewise.
6387 (warn_odr): Likewise.
6388 * multiple_target.c (expand_target_clones): Likewise.
6389 * opts-common.c (cmdline_handle_error): Likewise.
6390 * reginfo.c (globalize_reg): Likewise.
6391 * substring-locations.c (format_warning_n_va): Likewise.
6392 * tree-inline.c (expand_call_inline): Likewise.
6393 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6394 * tree-ssa-loop-niter.c
6395 (do_warn_aggressive_loop_optimizations): Likewise.
6396 * tree-ssa-uninit.c (warn_uninit): Likewise.
6397 * tree.c (warn_deprecated_use): Likewise.
6398
6399 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6400
6401 PR target/87014
6402 * config/i386/i386.md (eh_return): Always update EH return
6403 address in word_mode.
6404
6405 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6406
6407 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6408 TARGET_SPLIT_COMPLEX_ARG is defined.
6409
6410 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6411
6412 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6413
6414 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6415
6416 PR target/86984
6417 * expr.c (expand_assignment): Assert that bitpos is positive.
6418 (store_field): Likewise
6419 (expand_expr_real_1): Make sure that bitpos is positive.
6420 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6421 integer overflow.
6422
6423 2018-08-20 Nathan Sidwell <nathan@acm.org>
6424
6425 * Makefile.in (CPP_ID_DATA_H): Delete.
6426 (CPP_INTERNAL_H): Don't add it.
6427 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6428 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6429
6430 2018-08-20 Richard Biener <rguenther@suse.de>
6431
6432 PR tree-optimization/78655
6433 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6434 pointer + offset nonnull if either operand is nonnull work.
6435
6436 2018-08-20 Tom de Vries <tdevries@suse.de>
6437
6438 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6439 unless the referenced die describes the added property using
6440 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6441 Otherwise, add a DW_AT_location to the referenced die.
6442
6443 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6444
6445 PR target/86994
6446 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6447 register_operand when calling ix86_set_reg_reg_cost.
6448 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6449 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6450 predicate and to 1 otherwise.
6451
6452 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6453
6454 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6455 emit a diagnostic that it is not supported and reset the option.
6456 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6457 supported and consume the option. (ASM_FINAL_SPEC): New.
6458
6459 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6460
6461 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6462 a sentence.
6463
6464 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6465
6466 C-SKY port: Documentation
6467
6468 * doc/extend.texi (C-SKY Function Attributes): New section.
6469 * doc/invoke.texi (Option Summary): Add C-SKY options.
6470 (C-SKY Options): New section.
6471 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6472
6473 2018-08-17 Jojo <jijie_rong@c-sky.com>
6474 Huibin Wang <huibin_wang@c-sky.com>
6475 Sandra Loosemore <sandra@codesourcery.com>
6476 Chung-Lin Tang <cltang@codesourcery.com>
6477
6478 C-SKY port: Backend implementation
6479
6480 * config/csky/*: New.
6481 * common/config/csky/*: New.
6482
6483 2018-08-17 Jojo <jijie_rong@c-sky.com>
6484 Huibin Wang <huibin_wang@c-sky.com>
6485 Sandra Loosemore <sandra@codesourcery.com>
6486 Chung-Lin Tang <cltang@codesourcery.com>
6487 Andrew Jenner <andrew@codesourcery.com>
6488
6489 C-SKY port: Configury
6490
6491 * config.gcc (csky-*-*): New.
6492 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6493 * configure: Regenerated.
6494
6495 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6496
6497 * dump-context.h: Include "dumpfile.h".
6498 (dump_context::dump_printf_va): Convert final param from va_list
6499 to va_list *. Convert from ATTRIBUTE_PRINTF to
6500 ATTRIBUTE_GCC_DUMP_PRINTF.
6501 (dump_context::dump_printf_loc_va): Likewise.
6502 * dumpfile.c: Include "stringpool.h".
6503 (make_item_for_dump_printf_va): Delete.
6504 (make_item_for_dump_printf): Delete.
6505 (class dump_pretty_printer): New class.
6506 (dump_pretty_printer::dump_pretty_printer): New ctor.
6507 (dump_pretty_printer::emit_items): New member function.
6508 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6509 function.
6510 (dump_pretty_printer::emit_item): New member function.
6511 (dump_pretty_printer::stash_item): New member function.
6512 (dump_pretty_printer::format_decoder_cb): New member function.
6513 (dump_pretty_printer::decode_format): New member function.
6514 (dump_context::dump_printf_va): Reimplement in terms of
6515 dump_pretty_printer.
6516 (dump_context::dump_printf_loc_va): Convert final param from va_list
6517 to va_list *.
6518 (dump_context::begin_scope): Reimplement call to
6519 make_item_for_dump_printf.
6520 (dump_printf): Update for change to dump_printf_va.
6521 (dump_printf_loc): Likewise.
6522 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6523 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6524 with %T, %E, and %G.
6525 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6526 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6527 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6528 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6529 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6530 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6531 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6532 within a dump_printf_loc call to "%wu".
6533 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6534 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6535 missing space after "=".
6536 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6537 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6538 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6539 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6540 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6541 duplicate "vectorized" from message.
6542
6543 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6544
6545 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6546 polyNxK_t element's TYPE_STRING_FLAG.
6547
6548 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6549
6550 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6551 (they were unnamed before). Fix comments.
6552
6553 2018-08-17 Nathan Sidwell <nathan@acm.org>
6554
6555 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6556
6557 2018-08-17 Richard Biener <rguenther@suse.de>
6558
6559 PR tree-optimization/86841
6560 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6561
6562 2018-08-17 Martin Liska <mliska@suse.cz>
6563
6564 * common.opt: Remove Warn, Init and Report for options with
6565 Ignore/Deprecated flag. Warning is done automatically for
6566 Deprecated flags.
6567 * config/i386/i386.opt: Likewise.
6568 * config/ia64/ia64.opt: Likewise.
6569 * config/rs6000/rs6000.opt: Likewise.
6570 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6571 Remove usage of flag_check_pointer_bounds.
6572 * lto-wrapper.c (merge_and_complain): Do not handle
6573 OPT_fcheck_pointer_bounds.
6574 (append_compiler_options): Likewise.
6575 * opt-functions.awk: Do not handle Deprecated.
6576 * optc-gen.awk: Check that Var, Report and Init are not
6577 used for an option with Ignore/Deprecated flag.
6578 * opts-common.c (decode_cmdline_option): Do not report
6579 CL_ERR_DEPRECATED.
6580 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6581 options.
6582 * opts.h (struct cl_option): Remove cl_deprecated flag.
6583 (CL_ERR_DEPRECATED): Remove error enum value.
6584
6585 2018-08-17 Richard Biener <rguenther@suse.de>
6586
6587 PR middle-end/86505
6588 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6589 across a va-arg-pack using call adjust its return value accordingly.
6590
6591 2018-08-16 Martin Sebor <msebor@redhat.com>
6592
6593 PR tree-optimization/86853
6594 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6595 (struct fmtresult): Add member and initialize it in ctors.
6596 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6597 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6598 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6599 (parse_directive): Handle %C same as %c.
6600 (sprintf_dom_walker::compute_format_length): Adjust.
6601 (is_call_safe): Adjust.
6602
6603 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6604
6605 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6606 for determining how to count the elements.
6607 * builtins.h (c_strlen): Adjust prototype.
6608 * expr.c (string_constant): Add new parameter mem_size.
6609 Set *mem_size appropriately.
6610 * expr.h (string_constant): Adjust protoype.
6611 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6612 * gimple-fold.h (get_range_strlen): Adjust prototype.
6613 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6614 (format_string): Call get_string_length with eltsize.
6615
6616 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6617
6618 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6619 to emit the span, rather than setting it as the prefix.
6620
6621 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6622
6623 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6624 "margin_char" parameter, defaulting to space. Use it in place
6625 of pp_space for the initial part of the margin.
6626 (layout::print_leading_fixits): Use '+' when filling the margin
6627 of line-insertion fix-it hints.
6628
6629 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6630
6631 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6632 Delete.
6633
6634 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6635
6636 * config/rs6000/altivec.md: Don't set length attribute to the default
6637 value.
6638 * config/rs6000/darwin.md: Ditto.
6639 * config/rs6000/dfp.md: Ditto.
6640 * config/rs6000/htm.md: Ditto.
6641 * config/rs6000/rs6000.md: Ditto.
6642 * config/rs6000/sync.md: Ditto.
6643 * config/rs6000/vsx.md: Ditto.
6644
6645 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6646
6647 * config/rs6000/altivec.md: Don't set length attribute to the default
6648 value, for branch instructions.
6649 * config/rs6000/darwin.md: Ditto.
6650 * config/rs6000/rs6000.md: Ditto.
6651
6652 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6653
6654 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6655 (unnamed conditional branch define_insn): Set length to 4 or 8
6656 depending on offset.
6657 (<bd>_<mode>): Similar, for alternative 0.
6658 (<bd>tf_<mode>): Ditto.
6659
6660 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6661
6662 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6663
6664 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6665
6666 * doc/rtl.texi: Replace old RTX class names with new names.
6667
6668
6669 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6670
6671 * expmed.h (canonicalize_comparison): New declaration.
6672 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6673 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6674 * optabs.c (prepare_cmp_insn): Likewise.
6675 * rtl.h (unsigned_condition_p): New function which checks if a
6676 comparison operator is unsigned.
6677
6678 2018-08-16 Nathan Sidwell <nathan@acm.org>
6679
6680 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6681 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6682
6683 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6684
6685 PR target/84711
6686 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6687 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6688 (mov<mov>): ..this and enable unconditionally.
6689
6690 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6691
6692 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6693
6694 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6695
6696 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6697 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6698 "Common" with "Target".
6699
6700 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6701
6702 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6703 * doc/invoke.texi (mmitigate-rop): Remove.
6704 * config/i386/i386.c: Do not include "regrename.h".
6705 (ix86_rop_should_change_byte_p, reg_encoded_number)
6706 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6707 Remove.
6708 (ix86_reorg): Remove call to ix86_mitigate_rop.
6709 * config/i386/i386.md (attr "modrm_class"): Remove.
6710 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6711 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6712 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6713
6714 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6715
6716 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6717 allow folding of mergeh() and mergel() for the float and double types.
6718 (fold_mergehl_helper): Rework to handle building a permute tree
6719 for float vectors.
6720
6721 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6722
6723 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6724 for TARGET_SSE.
6725
6726 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6727
6728 * common.opt (fdiagnostics-show-labels): New option.
6729 * diagnostic-show-locus.c (class layout_range): Add field
6730 "m_label".
6731 (class layout): Add field "m_show_labels_p".
6732 (layout_range::layout_range): Add param "label" and use it to
6733 initialize m_label.
6734 (make_range): Pass in NULL for new "label" param of layout_range's
6735 ctor.
6736 (layout::layout): Initialize m_show_labels_p.
6737 (layout::maybe_add_location_range): Pass in loc_range->m_label
6738 when constructing layout_range instances.
6739 (struct line_label): New struct.
6740 (layout::print_any_labels): New member function.
6741 (layout::print_line): Call it if label-printing is enabled.
6742 (selftest::test_one_liner_labels): New test.
6743 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6744 * diagnostic.c (diagnostic_initialize): Initialize
6745 context->show_labels_p.
6746 * diagnostic.h (struct diagnostic_context): Add field
6747 "show_labels_p".
6748 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6749 -fno-diagnostics-show-labels.
6750 * dwarf2out.c (gen_producer_string): Add
6751 OPT_fdiagnostics_show_labels to the ignored options.
6752 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6753 param.
6754 (gcc_rich_location::maybe_add_expr): Likewise.
6755 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6756 label" param, defaulting to NULL.
6757 (gcc_rich_location::add_expr): Add "label" param.
6758 (gcc_rich_location::maybe_add_expr): Likewise.
6759 (class text_range_label): New class.
6760 (class range_label_for_type_mismatch): New class.
6761 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6762 of format_warning_va.
6763 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6764 * lto-wrapper.c (merge_and_complain): Add
6765 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6766 (append_compiler_options): Likewise to the dropped options.
6767 (append_diag_options): Likewise to the passed-on options.
6768 * opts.c (common_handle_option): Handle the new option.
6769 * selftest-diagnostic.c
6770 (test_diagnostic_context::test_diagnostic_context): Enable
6771 show_labels_p.
6772 * substring-locations.c: Include "gcc-rich-location.h".
6773 (format_warning_n_va): Add "fmt_label" and "param_label" params
6774 and use them as appropriate.
6775 (format_warning_va): Add "fmt_label" and "param_label" params,
6776 passing them on to format_warning_n_va.
6777 (format_warning_at_substring): Likewise.
6778 (format_warning_at_substring_n): Likewise.
6779 * substring-locations.h (format_warning_va): Add "fmt_label" and
6780 "param_label" params.
6781 (format_warning_n_va): Likewise.
6782 (format_warning_at_substring): Likewise.
6783 (format_warning_at_substring_n): Likewise.
6784 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6785
6786 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6787
6788 PR testsuite/86519
6789 * builtins.c (expand_builtin_memcmp): Do not expand the call
6790 when overflow is detected.
6791
6792 2018-08-15 Martin Sebor <msebor@redhat.com>
6793
6794 PR tree-optimization/71625
6795 * config/aarch64/aarch64-builtins.c
6796 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6797
6798 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6799
6800 * config/s390/s390.c (s390_reorg): Remove loop.
6801
6802 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6803
6804 * config/darwin.c
6805 (darwin_function_switched_text_sections): Delete.
6806 * gcc/config/darwin.h
6807 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6808
6809 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6810
6811 PR target/81685
6812 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6813 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6814 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6815
6816 2018-08-15 Martin Liska <mliska@suse.cz>
6817
6818 PR tree-optimization/86925
6819 * predict.c (expr_expected_value_1): When taking
6820 later predictor, assign also probability.
6821 Use fold_build2_initializer_loc in order to fold
6822 the expression in -frounding-math.
6823
6824 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6825
6826 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6827 patterns.
6828 (expand_vec_perm_1): Try the new method.
6829
6830 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6831
6832 PR target/86547
6833 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6834 Check whether lra_live_max_point is 0 before dividing.
6835
6836 2018-08-14 Martin Sebor <msebor@redhat.com>
6837
6838 PR tree-optimization/86650
6839 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6840 (vrp_prop::check_mem_ref): Same.
6841
6842 2018-08-13 Liu Hao <lh_mouse@126.com>
6843
6844 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6845 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6846 and clear it thereafter, as it only works for DBCS.
6847
6848 2018-08-13 Liu Hao <lh_mouse@126.com>
6849
6850 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6851 handle returned by _get_osf_handle().
6852
6853 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6854
6855 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6856 for folding vec_perm.
6857
6858 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6859
6860 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6861 Add support for gimple-folding of vec_pack() and vec_unpack()
6862 intrinsics.
6863
6864 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6865
6866 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6867 vec_xst variants to the list.
6868 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6869 vector loads and stores.
6870
6871 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6872
6873 * config.gcc (rs6000-ibm-aix4.x): Delete.
6874 (rs6000-ibm-aix5.1): Delete.
6875 (rs6000-ibm-aix5.2): Delete.
6876 (rs6000-ibm-aix5.3): Delete.
6877 * config/rs6000/aix43.h: Delete.
6878 * config/rs6000/aix51.h: Delete.
6879 * config/rs6000/aix52.h: Delete.
6880 * config/rs6000/t-aix43: Delete.
6881
6882 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6883
6884 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6885 New function.
6886 (s390_decompose_address): Factor out constant pool ref
6887 decomposition.
6888
6889 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6890
6891 * config/nds32/nds32-predicates.c
6892 (nds32_can_use_bclr_p): Change return type as bool.
6893 (nds32_can_use_bset_p): Ditto.
6894 (nds32_can_use_btgl_p): Ditto.
6895 (nds32_can_use_bitci_p): Ditto.
6896 * config/nds32/nds32-protos.h
6897 (nds32_can_use_bclr_p): Change declaration.
6898 (nds32_can_use_bset_p): Ditto.
6899 (nds32_can_use_btgl_p): Ditto.
6900 (nds32_can_use_bitci_p): Ditto.
6901
6902 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6903
6904 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6905 Support -msched-prolog-epilog option.
6906 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6907
6908 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6909
6910 * common/config/nds32/nds32-common.c
6911 (nds32_option_optimization_table): Enalbe -malways-align.
6912
6913 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6914
6915 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6916 extra_headers.
6917 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6918 OPT_misr_secure_ case.
6919 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6920 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6921 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6922 secure attribute.
6923 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6924 (nds32_isr_info): New field security_level.
6925 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6926 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6927 * config/nds32/nds32.opt (misr-secure): New option.
6928 * config/nds32/nds32_init.inc: New file.
6929 * config/nds32/nds32_isr.h: New file.
6930
6931 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6932
6933 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6934 Update comment for atomic instructions.
6935 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6936 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6937 Remove.
6938 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6939 load for __ATOMIC_SEQ_CST model.
6940 (atomic_loaddi_1): Remove float register target.
6941 (atomic_storedi): Handle CONST_INT values.
6942 (atomic_storedi_1): Remove float register source. Add special case
6943 for zero value.
6944 (memory_barrier): New expander and insn.
6945
6946 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6947
6948 PR tree-optimization/86835
6949 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6950 new_stmt after def_gsi, make sure to insert new_square_stmt after
6951 that stmt, not 2 stmts before it.
6952
6953 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6954
6955 PR target/82418
6956 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6957 instead of SWI48.
6958
6959 2018-08-10 Martin Liska <mliska@suse.cz>
6960
6961 PR target/83610
6962 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6963 function type.
6964 * builtins.c (expand_builtin_expect_with_probability):
6965 New function.
6966 (expand_builtin_expect_with_probability): New function.
6967 (build_builtin_expect_predicate): Add new argumnet probability
6968 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6969 (fold_builtin_expect):
6970 (fold_builtin_2):
6971 (fold_builtin_3):
6972 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6973 * builtins.h (fold_builtin_expect): Set new argument.
6974 * doc/extend.texi: Document __builtin_expect_with_probability.
6975 * doc/invoke.texi: Likewise.
6976 * gimple-fold.c (gimple_fold_call): Pass new argument.
6977 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6978 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6979 * predict.c (get_predictor_value): New function.
6980 (expr_expected_value): Add new argument probability. Assume
6981 that predictor and probability are always non-null.
6982 (expr_expected_value_1): Likewise. For __builtin_expect and
6983 __builtin_expect_with_probability set probability. Handle
6984 combination in binary expressions.
6985 (tree_predict_by_opcode): Simplify code by simply calling
6986 get_predictor_value.
6987 (pass_strip_predict_hints::execute): Add handling of
6988 BUILT_IN_EXPECT_WITH_PROBABILITY.
6989 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6990 new predictor.
6991 * tree.h (DECL_BUILT_IN_P): New function.
6992
6993 2018-08-10 Martin Liska <mliska@suse.cz>
6994
6995 PR tree-optimization/85799
6996 * passes.def: Add argument for pass_strip_predict_hints.
6997 * predict.c (class pass_strip_predict_hints): Add new argument
6998 early_p.
6999 (strip_predictor_early): New function.
7000 (pass_strip_predict_hints::execute): Call the function to
7001 strip predictors.
7002 (strip_predict_hints): New function.
7003 * predict.def: Fix comment.
7004
7005 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7006
7007 * Makefile.in: Clarify which tm.texi to copy over to assert the
7008 right to grant a GFDL license for all.
7009
7010 2018-08-09 Jeff Law <law@redhat.com>
7011
7012 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7013 unused variable.
7014
7015 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7016
7017 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7018 prototype.
7019
7020 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7021
7022 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7023 reductions for variable-length vectors.
7024
7025 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7026
7027 PR other/84889
7028 * common.opt (fdiagnostics-show-line-numbers): New option.
7029 * diagnostic-show-locus.c (class layout): Add fields
7030 "m_show_line_numbers_p" and "m_linenum_width";
7031 (num_digits): New function.
7032 (test_num_digits): New function.
7033 (layout::layout): Initialize new fields. Update m_x_offset
7034 logic to handle any left margin.
7035 (layout::print_source_line): Print line number when requested.
7036 (layout::start_annotation_line): New member function.
7037 (layout::print_annotation_line): Call it.
7038 (layout::print_leading_fixits): Likewise.
7039 (layout::print_trailing_fixits): Likewise. Update calls to
7040 move_to_column for new parameter.
7041 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7042 it to potentially call start_annotation_line.
7043 (layout::show_ruler): Call start_annotation_line.
7044 (selftest::test_line_numbers_multiline_range): New selftest.
7045 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7046 and selftest::test_line_numbers_multiline_range.
7047 * diagnostic.c (diagnostic_initialize): Initialize
7048 show_line_numbers_p.
7049 * diagnostic.h (struct diagnostic_context): Add field
7050 "show_line_numbers_p".
7051 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7052 -fno-diagnostics-show-line-numbers.
7053 * dwarf2out.c (gen_producer_string): Add
7054 OPT_fdiagnostics_show_line_numbers to the ignored options.
7055 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7056 one setting" options.
7057 (append_compiler_options): Likewise to the dropped options.
7058 (append_diag_options): Likewise to the passed-on options.
7059 * opts.c (common_handle_option): Handle the new option.
7060 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7061
7062 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7063
7064 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7065 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7066 third argument of type "const signed char" to descriptions of
7067 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7068 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7069 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7070 __builtin_bcdsub_ov functions.
7071
7072 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7073
7074 PR tree-optimization/86858
7075 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7076 flow_bb_inside_loop_p calls.
7077
7078 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7079
7080 PR tree-optimization/86871
7081 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7082 instead of gimple_assign_lhs.
7083
7084 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7085
7086 PR target/86887
7087 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7088 register constraint to operand 0.
7089 (add<mode>3_carryinC): Likewise.
7090 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7091
7092 2018-08-09 Martin Liska <mliska@suse.cz>
7093
7094 PR c/86895
7095 * common.opt: Remove extra line.
7096
7097 2018-08-09 Martin Liska <mliska@suse.cz>
7098
7099 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7100 at the end of a line, make first letter capital and end up
7101 a sentence with a dot.
7102 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7103 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7104 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7105 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7106 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7107 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7108 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7109 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7110 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7111 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7112 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7113 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7114 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7115 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7116 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7117 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7118 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7119 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7120
7121 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7122
7123 PR target/84332
7124 * config/s390/s390.c (s390_option_override_internal): Reduce the
7125 stack-clash-protection-probe-interval param if it would be too big
7126 for z900.
7127
7128 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7129
7130 PR target/46179
7131 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7132 * config/m68k/m68k.c (handle_move_double): Don't call
7133 m68k_final_prescan_insn.
7134 (m68k_adjust_decorated_operand): Renamed from
7135 m68k_final_prescan_insn, remove first and third operand and
7136 simplify.
7137 (print_operand): Call it.
7138 (print_operand_address): Call it.
7139
7140 2018-08-08 Nathan Sidwell <nathan@acm.org>
7141
7142 * diagnostic.c (diagnostic_report_current_module): Use
7143 linemap_included_from & linemap_included_from_linemap.
7144
7145 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7146
7147 * config/aarch64/aarch64-cores.def: Add phecda core.
7148 * config/aarch64/aarch64-tune.md: Regenerate.
7149 * doc/invoke.texi: Add phecda core.
7150
7151 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7152
7153 PR target/85295
7154 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7155 definitions.
7156 * config/s390/s390.md ("movti"): Add more alternatives for
7157 constant to GPR copies.
7158
7159 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7160
7161 * config/s390/s390.c: Fix whitespace damage throughout the file.
7162 * config/s390/s390.h: Likewise.
7163 * config/s390/tpf.h: Likewise.
7164
7165 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7166
7167 * config/s390/s390.c (s390_loadrelative_operand_p):
7168 Remove TARGET_CPU_ZARCH usages.
7169 (s390_rtx_costs): Likewise.
7170 (s390_legitimate_constant_p): Likewise.
7171 (s390_cannot_force_const_mem): Likewise.
7172 (legitimate_reload_constant_p): Likewise.
7173 (s390_preferred_reload_class): Likewise.
7174 (legitimize_pic_address): Likewise.
7175 (legitimize_tls_address): Likewise.
7176 (s390_split_branches): Removed.
7177 (s390_add_execute): Removed.
7178 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7179 (s390_mainpool_start): Likewise.
7180 (s390_mainpool_finish): Likewise.
7181 (s390_mainpool_cancel): Removed.
7182 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7183 (s390_chunkify_cancel): Likewise.
7184 (s390_return_addr_rtx): Likewise.
7185 (s390_register_info): Remove split_branches_pending_p uages.
7186 (s390_optimize_register_info): Likewise.
7187 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7188 split_branches_pending_p usages.
7189 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7190 (s390_load_got): Likewise.
7191 (s390_expand_split_stack_prologue): Likewise.
7192 (output_asm_nops): Likewise.
7193 (s390_function_profiler): Likewise.
7194 (s390_emit_call): Likewise.
7195 (s390_conditional_register_usage): Likewise.
7196 (s390_optimize_prologue): Likewise.
7197 (s390_reorg): Remove TARGET_CPU_ZARCH and
7198 split_branches_pending_p usages.
7199 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7200 usages.
7201 (s390_output_indirect_thunk_function): Likewise.
7202 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7203 (TARGET_CPU_ZARCH_P): Removed.
7204 (struct machine_function): Remove split_branches_pending_p.
7205 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7206
7207 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7208
7209 * common/config/s390/s390-common.c (processor_flags_table):
7210 Remove flags.
7211 * config.gcc: Remove with_arch/with_tune support.
7212 * config/s390/2064.md: Remove cpu attribute comparisons.
7213 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7214 Remove MTN.
7215 * config/s390/linux.h (ASM_SPEC):
7216 Remove -march support.
7217 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7218 Use a table to get an arch level.
7219 * config/s390/s390-opts.h (enum processor_type):
7220 Remove enum values.
7221 * config/s390/s390.c
7222 (processor_table): Remove entries, add arch_level values.
7223 (s390_issue_rate): Remove cases.
7224 (s390_option_override): Adjust
7225 s390_option_override_internal() call.
7226 (s390_option_override_internal): Remove deprecation warning.
7227 (s390_valid_target_attribute_tree): Adjust
7228 s390_option_override_internal() call.
7229 * config/s390/s390.h (struct s390_processor):
7230 Share with s390-c.c, add arch_level field.
7231 * config/s390/s390.md:
7232 Remove occurrences in cpu attribute.
7233 * config/s390/s390.opt: Remove -march/-mtune support.
7234 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7235 * doc/invoke.texi: Remove deprecation warning.
7236
7237 2018-08-08 Luis Machado <luis.machado@linaro.org>
7238
7239 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7240 global.
7241 (qdf24xx_tunings): Set vector cost structure to
7242 qdf24xx_vector_cost.
7243
7244 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7245 <register_sextend>: Set to 3.
7246
7247 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7248
7249 PR target/86838
7250 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7251 * config/aarch64/aarch64-simd.md
7252 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7253 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7254 (aarch64_frecpx<mode>): ...this new pattern.
7255 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7256 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7257
7258 2018-08-07 Martin Liska <mliska@suse.cz>
7259
7260 PR middle-end/83023
7261 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7262 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7263 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7264 * doc/extend.texi: Document that malloc attribute adds
7265 hit to compiler.
7266
7267 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7268
7269 PR target/86785
7270 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7271 Define to speculation_safe_value_not_needed.
7272
7273 2018-08-06 Jeff Law <law@redhat.com>
7274
7275 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7276 the vr_values instance to cprop_into_stmt.
7277 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7278 (cprop_operand): Also query EVRP to determine if OP is a constant.
7279
7280 2018-08-06 Nathan Sidwell <nathan@acm.org>
7281
7282 * diagnostic.c (diagnostic_report_current_module): Reroll
7283 included-at loop. Translate text.
7284
7285 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7286
7287 * function-tests.c (selftest::test_expansion_to_rtl): Call
7288 free_after_compilation.
7289
7290 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7291
7292 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7293
7294 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7295
7296 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7297 loops with memory block operations from getting unrolled.
7298
7299 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7300
7301 PR target/86807
7302 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7303 Define to speculation_safe_value_not_needed.
7304
7305 2018-08-06 Jeff Law <law@redhat.com>
7306
7307 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7308 assert.
7309
7310 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7311
7312 PR target/86662
7313 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7314 with all enabled __intN types.
7315
7316 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7317
7318 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7319
7320 * alias.c (record_set): Check for clobber high.
7321 * cfgexpand.c (expand_gimple_stmt): Likewise.
7322 * combine-stack-adj.c (single_set_for_csa): Likewise.
7323 * combine.c (find_single_use_1): Likewise.
7324 (set_nonzero_bits_and_sign_copies): Likewise.
7325 (get_combine_src_dest): Likewise.
7326 (is_parallel_of_n_reg_sets): Likewise.
7327 (try_combine): Likewise.
7328 (record_dead_and_set_regs_1): Likewise.
7329 (reg_dead_at_p_1): Likewise.
7330 (reg_dead_at_p): Likewise.
7331 * dce.c (deletable_insn_p): Likewise.
7332 (mark_nonreg_stores_1): Likewise.
7333 (mark_nonreg_stores_2): Likewise.
7334 * df-scan.c (df_find_hard_reg_defs): Likewise.
7335 (df_uses_record): Likewise.
7336 (df_get_call_refs): Likewise.
7337 * dwarf2out.c (mem_loc_descriptor): Likewise.
7338 * haifa-sched.c (haifa_classify_rtx): Likewise.
7339 * ira-build.c (create_insn_allocnos): Likewise.
7340 * ira-costs.c (scan_one_insn): Likewise.
7341 * ira.c (equiv_init_movable_p): Likewise.
7342 (rtx_moveable_p): Likewise.
7343 (interesting_dest_for_shprep): Likewise.
7344 * jump.c (mark_jump_label_1): Likewise.
7345 * postreload-gcse.c (record_opr_changes): Likewise.
7346 * postreload.c (reload_cse_simplify): Likewise.
7347 (struct reg_use): Add source expr.
7348 (reload_combine): Check for clobber high.
7349 (reload_combine_note_use): Likewise.
7350 (reload_cse_move2add): Likewise.
7351 (move2add_note_store): Likewise.
7352 * print-rtl.c (print_pattern): Likewise.
7353 * recog.c (decode_asm_operands): Likewise.
7354 (store_data_bypass_p): Likewise.
7355 (if_test_bypass_p): Likewise.
7356 * regcprop.c (kill_clobbered_value): Likewise.
7357 (kill_set_value): Likewise.
7358 * reginfo.c (reg_scan_mark_refs): Likewise.
7359 * reload1.c (maybe_fix_stack_asms): Likewise.
7360 (eliminate_regs_1): Likewise.
7361 (elimination_effects): Likewise.
7362 (mark_not_eliminable): Likewise.
7363 (scan_paradoxical_subregs): Likewise.
7364 (forget_old_reloads_1): Likewise.
7365 * reorg.c (find_end_label): Likewise.
7366 (try_merge_delay_insns): Likewise.
7367 (redundant_insn): Likewise.
7368 (own_thread_p): Likewise.
7369 (fill_simple_delay_slots): Likewise.
7370 (fill_slots_from_thread): Likewise.
7371 (dbr_schedule): Likewise.
7372 * resource.c (update_live_status): Likewise.
7373 (mark_referenced_resources): Likewise.
7374 (mark_set_resources): Likewise.
7375 * rtl.c (copy_rtx): Likewise.
7376 * rtlanal.c (reg_referenced_p): Likewise.
7377 (single_set_2): Likewise.
7378 (noop_move_p): Likewise.
7379 (note_stores): Likewise.
7380 * sched-deps.c (sched_analyze_reg): Likewise.
7381 (sched_analyze_insn): Likewise.
7382
7383 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7384
7385 * cse.c (invalidate_reg): New function extracted from...
7386 (invalidate): ...here.
7387 (canonicalize_insn): Check for clobber high.
7388 (invalidate_from_clobbers): invalidate clobber highs.
7389 (invalidate_from_sets_and_clobbers): Likewise.
7390 (count_reg_usage): Check for clobber high.
7391 (insn_live_p): Likewise.
7392 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7393 (cselib_invalidate_regno): Check for clobber in setter.
7394 (cselib_invalidate_rtx): Pass through setter.
7395 (cselib_invalidate_rtx_note_stores):
7396 (cselib_process_insn): Check for clobber high.
7397 * cselib.h (cselib_invalidate_rtx): Add operand.
7398
7399 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7400
7401 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7402 (mark_not_eliminable): Likewise.
7403 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7404 * lra-lives.c (process_bb_lives): Check for clobber high.
7405 * lra.c (new_insn_reg): Remember clobber highs.
7406 (collect_non_operand_hard_regs): Check for clobber high.
7407 (lra_set_insn_recog_data): Likewise.
7408 (add_regs_to_insn_regno_info): Likewise.
7409 (lra_update_insn_regno_info): Likewise.
7410
7411 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7412
7413 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7414 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7415
7416 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7417
7418 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7419 (copy_insn_1): Likewise.
7420 (gen_hard_reg_clobber_high): New gen function.
7421 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7422 * genemit.c (gen_exp): Likewise.
7423 (gen_emit_seq): Pass through info.
7424 (gen_insn): Check for CLOBBER_HIGH.
7425 (gen_expand): Pass through info.
7426 (gen_split): Likewise.
7427 (output_add_clobbers): Likewise.
7428 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7429 (remove_clobbers): Likewise.
7430 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7431
7432 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7433
7434 * doc/rtl.texi (clobber_high): Add.
7435 (parallel): Add in clobber high
7436 * rtl.c (rtl_check_failed_code3): Add function.
7437 * rtl.def (CLOBBER_HIGH): Add expression.
7438 * rtl.h (RTL_CHECKC3): Add macro.
7439 (rtl_check_failed_code3): Add declaration.
7440 (XC3EXP): Add macro.
7441
7442 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7443
7444 PR target/86386
7445 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7446 cfun->machine->max_used_stack_alignment if needed.
7447
7448 2018-08-04 Martin Sebor <msebor@redhat.com>
7449
7450 PR tree-optimization/86571
7451 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7452 NaN output to 4.
7453
7454 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7455
7456 PR target/86799
7457 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7458 Define.
7459
7460 2018-08-03 Jeff Law <law@redhat.com>
7461
7462 PR target/86795
7463 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7464 Define to speculation_safe_value_not_needed.
7465
7466 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7467
7468 * doc/gcov.texi (-x): Remove duplicate "to".
7469 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7470 (-Wif-not-aligned): Remove duplicate "is".
7471 (-flto): Remove duplicate "the".
7472 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7473 duplicate "v5.00.b".
7474 (MSP430 Options): Remove duplicate "and" from the description
7475 of "-mgprel-sec=regexp".
7476 (x86 Options): Remove duplicate copies of "vmldLog102" and
7477 vmlsLog104 from description of "-mveclibabi=type".
7478
7479 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7480
7481 * internal-fn.h (first_commutative_argument): Declare.
7482 * internal-fn.c (first_commutative_argument): New function.
7483 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7484 restrictions for pattern statements. Use first_commutative_argument
7485 to look for commutative operands in calls to internal functions.
7486
7487 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7488
7489 * Makefile.in (wide-int-range.o): New.
7490 * tree-vrp.c: Move all the wide_int_* functions to...
7491 * wide-int-range.cc: ...here.
7492 * tree-vrp.h: Move all the wide_int_* prototypes to...
7493 * wide-int-range.h: ...here.
7494
7495 2018-08-03 Tom de Vries <tdevries@suse.de>
7496
7497 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7498 UI_NONE.
7499 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7500 * except.c (output_function_exception_table): Do early exit if
7501 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7502
7503 2018-08-03 Martin Liska <mliska@suse.cz>
7504
7505 * predict.c (dump_prediction): Change to 2 digits
7506 in fraction part.
7507
7508 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7509
7510 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7511 neon_dup_q to...
7512 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7513
7514 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7515
7516 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7517 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7518 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7519 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7520 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7521
7522 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7523
7524 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7525 pp_take_prefix when saving the existing prefix.
7526 * diagnostic.c (diagnostic_append_note): Likewise.
7527 * langhooks.c (lhd_print_error_function): Likewise.
7528 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7529 param's type. Free the existing prefix.
7530 (pp_take_prefix): New function.
7531 (pretty_printer::pretty_printer): Drop the prefix parameter.
7532 Rename the length parameter to match the comment.
7533 (pretty_printer::~pretty_printer): Free the prefix.
7534 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7535 parameter.
7536 (struct pretty_printer): Drop the "const" from "prefix" field's
7537 type and clarify memory management.
7538 (pp_set_prefix): Drop the "const" from the 2nd param.
7539 (pp_take_prefix): New decl.
7540
7541 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7542
7543 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7544 for word_mode_ok here instead of passing as argument.
7545 (expand_block_compare): Change select_block_compare_mode() call.
7546 (expand_strncmp_gpr_sequence): New function.
7547 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7548
7549 2018-08-02 Jeff Law <law@redhat.com>
7550
7551 PR target/86790
7552 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7553 Define to speculation_safe_value_not_needed.
7554
7555 PR target/86784
7556 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7557 Define to speculation_safe_value_not_needed.
7558
7559 2018-08-02 Tom de Vries <tdevries@suse.de>
7560
7561 PR target/86660
7562 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7563 function. Return UI_TARGET unconditionally.
7564 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7565 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7566
7567 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7568
7569 * genemit.c (print_overload_test): Fix typo.
7570
7571 2018-08-02 Richard Biener <rguenther@suse.de>
7572
7573 PR tree-optimization/86816
7574 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7575 which checks for value availability before querying it.
7576 (gvn_uses_equal): Use it.
7577 (same_succ_hash): Likewise.
7578 (gimple_equal_p): Likewise.
7579
7580 2018-08-02 Nick Clifton <nickc@redhat.com>
7581
7582 PR target/86813
7583 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7584 Define to speculation_safe_value_not_needed.
7585
7586 PR target/86810
7587 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7588 Define to speculation_safe_value_not_needed.
7589
7590 PR target/86810
7591 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7592 Define to speculation_safe_value_not_needed.
7593
7594 PR target/86803
7595 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7596 Define to speculation_safe_value_not_needed.
7597
7598 PR target/86797
7599 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7600 Define to speculation_safe_value_not_needed.
7601
7602 PR target/86791
7603 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7604 Define to speculation_safe_value_not_needed.
7605
7606 PR target/86789
7607 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7608 Define to speculation_safe_value_not_needed.
7609
7610 PR target/86787
7611 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7612 Define to speculation_safe_value_not_needed.
7613
7614 PR target/86782
7615 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7616 speculation_safe_value_not_needed.
7617
7618 PR target/86781
7619 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7620 to speculation_safe_value_not_needed.
7621
7622 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7623
7624 * doc/md.texi: Expand the documentation of instruction names
7625 to mention port-local uses. Document '@' in pattern names.
7626 * read-md.h (overloaded_instance, overloaded_name): New structs.
7627 (mapping): Declare.
7628 (md_reader::handle_overloaded_name): New member function.
7629 (md_reader::get_overloads): Likewise.
7630 (md_reader::m_first_overload): New member variable.
7631 (md_reader::m_next_overload_ptr): Likewise.
7632 (md_reader::m_overloads_htab): Likewise.
7633 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7634 m_next_overload_ptr and m_overloads_htab.
7635 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7636 (get_mode_token, get_code_token, get_int_token): New functions.
7637 (map_attr_string): Add an optional argument that passes back
7638 the associated iterator.
7639 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7640 (md_reader::handle_overloaded_name, add_overload_instance): New
7641 functions.
7642 (apply_iterators): Handle '@' names. Report an error if '@'
7643 is used without iterators.
7644 (initialize_iterators): Initialize the new iterator_group fields.
7645 * genopinit.c (handle_overloaded_code_for)
7646 (handle_overloaded_gen): New functions.
7647 (main): Use them to print declarations of maybe_code_for_* and
7648 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7649 * genemit.c (print_overload_arguments, print_overload_test)
7650 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7651 (main): Use it to print definitions of maybe_code_for_* and
7652 maybe_gen_* functions.
7653 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7654 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7655 instead of explicit mode checks.
7656 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7657 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7658 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7659 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7660 (aarch64_expand_compare_and_swap): Likewise
7661 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7662 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7663 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7664 (aarch64_constant_pool_reload_icode): Delete.
7665 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7666 instead of aarch64_constant_pool_reload_icode. Use
7667 code_for_aarch64_reload_mov instead of explicit mode checks.
7668 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7669 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7670 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7671 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7672 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7673 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7674 (aarch64_atomic_load_op_code): Delete.
7675 (aarch64_emit_atomic_load_op): Likewise.
7676 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7677 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7678 instead of aarch64_emit_atomic_load_op.
7679 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7680 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7681 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7682 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7683 character before the pattern name.
7684 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7685 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7686 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7687 (aarch64_frecps<mode>): Likewise.
7688 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7689 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7690 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7691 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7692 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7693
7694 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7695
7696 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7697 Allow HFmode constants if TARGET_FP_F16INST.
7698
7699 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7700
7701 PR target/86014
7702 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7703 No longer check last store for clobber of address register.
7704
7705 2018-08-02 Martin Liska <mliska@suse.cz>
7706
7707 PR gcov-profile/86817
7708 * gcov.c (process_all_functions): New function.
7709 (main): Call it.
7710 (process_file): Move functions processing to
7711 process_all_functions.
7712
7713 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7714
7715 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7716 "const" to the "gimple *" and "rtx_insn *" parameters.
7717 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7718 Likewise.
7719 (dump_location_t::dump_location_t): Likewise.
7720
7721 2018-08-01 Martin Sebor <msebor@redhat.com>
7722
7723 PR tree-optimization/86650
7724 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7725 rather than a "gcall *". Directly pass the data of interest
7726 to percent_K_format, rather than building a temporary CALL_EXPR
7727 to hold it.
7728 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7729 (gimple_fold_builtin_strncat): Adjust.
7730 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7731 gcall* argument with gimple*.
7732 * gimple-ssa-warn-restrict.c (check_call): Same.
7733 (wrestrict_dom_walker::before_dom_children): Same.
7734 (builtin_access::builtin_access): Same.
7735 (check_bounds_or_overlap): Same
7736 (maybe_diag_overlap): Same.
7737 (maybe_diag_offset_bounds): Same.
7738 * tree-diagnostic.c (default_tree_printer): Move usage of
7739 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7740 to this callsite.
7741 * tree-pretty-print.c (percent_K_format): Add argument.
7742 * tree-pretty-print.h: Add argument.
7743 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7744 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7745 (maybe_diag_stxncpy_trunc): Same.
7746 (handle_builtin_stxncpy): Same.
7747 (handle_builtin_strcat): Same.
7748
7749 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7750
7751 * match.pd: Optimise pointer range checks.
7752
7753 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7754
7755 PR tree-optimization/86758
7756 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7757 to remove pattern statements.
7758
7759 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7760
7761 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7762 result of dfs_enumerate_from when constructing stmt_vec_infos,
7763 instead of additionally calling get_loop_body.
7764
7765 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7766
7767 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7768 parameter.
7769 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7770 When creating an iv, assert that the step is not known to be zero.
7771 (vect_setup_realignment): Update call accordingly.
7772 * tree-vect-stmts.c (vectorizable_store): Likewise.
7773 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7774
7775 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7776
7777 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7778 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7779 (vectorizable_reduction): Likewise.
7780 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7781 (vect_detect_hybrid_slp_stmts): Likewise.
7782 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7783
7784 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7785
7786 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7787 (wide_int_set_zero_nonzero_bits): ...this.
7788 (zero_nonzero_bits_from_vr): Rename to...
7789 (vrp_set_zero_nonzero_bits): ...this.
7790 (extract_range_from_multiplicative_op_1): Abstract wide int
7791 code...
7792 (wide_int_range_multiplicative_op): ...here.
7793 (extract_range_from_binary_expr_1): Extract wide int binary
7794 operations into their own functions.
7795 (wide_int_range_lshift): New.
7796 (wide_int_range_can_optimize_bit_op): New.
7797 (wide_int_range_shift_undefined_p): New.
7798 (wide_int_range_bit_xor): New.
7799 (wide_int_range_bit_ior): New.
7800 (wide_int_range_bit_and): New.
7801 (wide_int_range_trunc_mod): New.
7802 (extract_range_into_wide_ints): New.
7803 (vrp_shift_undefined_p): New.
7804 (extract_range_from_multiplicative_op): New.
7805 (vrp_can_optimize_bit_op): New.
7806 * tree-vrp.h (value_range::dump): New.
7807 (wide_int_range_multiplicative_op): New.
7808 (wide_int_range_lshift):New.
7809 (wide_int_range_shift_undefined_p): New.
7810 (wide_int_range_bit_xor): New.
7811 (wide_int_range_bit_ior): New.
7812 (wide_int_range_bit_and): New.
7813 (wide_int_range_trunc_mod): New.
7814 (zero_nonzero_bits_from_bounds): Rename to...
7815 (wide_int_set_zero_nonzero_bits): ...this.
7816 (zero_nonzero_bits_from_vr): Rename to...
7817 (vrp_set_zero_nonzero_bits): ...this.
7818 (range_easy_mask_min_max): Rename to...
7819 (wide_int_range_can_optimize_bit_op): this.
7820 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7821 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7822
7823 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7824
7825 * tree-vectorizer.h (vect_orig_stmt): New function.
7826 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7827 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7828 (vect_create_epilog_for_reduction): Likewise.
7829 (vectorizable_live_operation): Likewise.
7830 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7831 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7832 * tree-vect-stmts.c (vectorizable_call): Likewise.
7833 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7834
7835 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7836
7837 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7838 argument.
7839 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7840 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7841 (vect_transform_loop): Likewise.
7842 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7843
7844 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7845
7846 * tree-vectorizer.h (vect_schedule_slp): Return void.
7847 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7848 (vect_schedule_slp): Likewise.
7849
7850 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7851
7852 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7853 argument.
7854 (vect_transform_loop): Update calls accordingly. Schedule SLP
7855 instances before the main loop, if any exist.
7856
7857 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7858
7859 PR tree-optimization/86749
7860 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7861 If the lhs is used in a COND_EXPR, check that it is being used
7862 as the "then" or "else" value.
7863
7864 2018-08-01 Tom de Vries <tdevries@suse.de>
7865
7866 PR target/86800
7867 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7868 speculation_safe_value_not_needed.
7869
7870 2018-08-01 Richard Biener <rguenther@suse.de>
7871
7872 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7873 as base and offset.
7874
7875 2018-08-01 Martin Liska <mliska@suse.cz>
7876
7877 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7878 format how successful transformation is dumped.
7879 (gimple_mod_pow2_value_transform): Likewise.
7880 (gimple_mod_subtract_transform): Likewise.
7881 (gimple_stringops_transform): Likewise.
7882
7883 2018-08-01 Martin Liska <mliska@suse.cz>
7884
7885 PR value-prof/35543
7886 * value-prof.c (interesting_stringop_to_profile_p):
7887 Simplify the code and add BUILT_IN_MEMMOVE.
7888 (gimple_stringops_transform): Likewise.
7889
7890 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7891
7892 * config/aarch64/aarch64-simd.md
7893 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7894 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7895 use GPI iterator instead of SI mode.
7896
7897 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7898
7899 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7900 rs6000_speculation_barrier.
7901 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7902 new barrier pattern name.
7903
7904 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7905
7906 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7907 (speculation_barrier): New insn.
7908
7909 2018-08-01 Richard Biener <rguenther@suse.de>
7910
7911 PR bootstrap/86724
7912 * graphite.h: Include isl/id.h and isl/space.h to allow build
7913 with ISL 0.20.
7914
7915 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7916
7917 PR target/86651
7918 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7919 mode for COFF targets.
7920 * defaults.h (TARGET_COFF): Define.
7921 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7922 TARGET_COFF): Define.
7923 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7924 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7925 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7926
7927 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7928
7929 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7930 * gimple-streamer-out.c (output_bb): Save it.
7931 * lto-streamer-in.c (input_struct_function_base): Restore
7932 instance discriminator if available. Create map on demand.
7933 * lto-streamer-out.c (output_struct_function_base): Save it if
7934 available.
7935 * final.c (decl_to_instance_map): Document LTO strategy.
7936
7937 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7938 Olivier Hainque <hainque@adacore.com>
7939
7940 * debug.h (decl_to_instance_map_t): New type.
7941 (decl_to_instance_map): Declare.
7942 (maybe_create_decl_to_instance_map): New inline function.
7943 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7944 to track basic block discriminators.
7945 (final_start_function_1): Initialize them.
7946 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7947 bb_discriminator.
7948 (decl_to_instance_map): New variable.
7949 (map_decl_to_instance, maybe_set_discriminator): New functions.
7950 (notice_source_line): Set discriminator.
7951
7952 2018-07-31 Ian Lance Taylor <iant@golang.org>
7953
7954 * targhooks.c (default_have_speculation_safe_value): Add
7955 ATTRIBUTE_UNUSED.
7956
7957 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7958
7959 * dump-context.h: Include "pretty-print.h".
7960 (dump_context::refresh_dumps_are_enabled): New decl.
7961 (dump_context::emit_item): New decl.
7962 (class dump_context): Add fields "m_test_pp" and
7963 "m_test_pp_flags".
7964 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7965 (temp_dump_context::get_dumped_text): New decl.
7966 (class temp_dump_context): Add field "m_pp".
7967 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7968 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7969 m_test_pp.
7970 (set_dump_file): Update for above change.
7971 (set_alt_dump_file): Likewise.
7972 (dump_loc): New overload, taking a pretty_printer *.
7973 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7974 to any test pretty-printer.
7975 (make_item_for_dump_gimple_stmt): New function, adapted from
7976 optinfo::add_gimple_stmt.
7977 (dump_context::dump_gimple_stmt): Call it, and use the result,
7978 eliminating the direct usage of dump_file and alt_dump_file in
7979 favor of indirectly using them via emit_item.
7980 (make_item_for_dump_gimple_expr): New function, adapted from
7981 optinfo::add_gimple_expr.
7982 (dump_context::dump_gimple_expr): Call it, and use the result,
7983 eliminating the direct usage of dump_file and alt_dump_file in
7984 favor of indirectly using them via emit_item.
7985 (make_item_for_dump_generic_expr): New function, adapted from
7986 optinfo::add_tree.
7987 (dump_context::dump_generic_expr): Call it, and use the result,
7988 eliminating the direct usage of dump_file and alt_dump_file in
7989 favor of indirectly using them via emit_item.
7990 (make_item_for_dump_printf_va): New function, adapted from
7991 optinfo::add_printf_va.
7992 (make_item_for_dump_printf): New function.
7993 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7994 and use the result, eliminating the direct usage of dump_file and
7995 alt_dump_file in favor of indirectly using them via emit_item.
7996 (make_item_for_dump_dec): New function.
7997 (dump_context::dump_dec): Call it, and use the result,
7998 eliminating the direct usage of dump_file and alt_dump_file in
7999 favor of indirectly using them via emit_item.
8000 (make_item_for_dump_symtab_node): New function, adapted from
8001 optinfo::add_symtab_node.
8002 (dump_context::dump_symtab_node): Call it, and use the result,
8003 eliminating the direct usage of dump_file and alt_dump_file in
8004 favor of indirectly using them via emit_item.
8005 (dump_context::begin_scope): Reimplement, avoiding direct usage
8006 of dump_file and alt_dump_file in favor of indirectly using them
8007 via emit_item.
8008 (dump_context::emit_item): New member function.
8009 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8010 Set up test pretty-printer on the underlying context. Call
8011 refresh_dumps_are_enabled.
8012 (temp_dump_context::~temp_dump_context): Call
8013 refresh_dumps_are_enabled.
8014 (temp_dump_context::get_dumped_text): New member function.
8015 (selftest::verify_dumped_text): New function.
8016 (ASSERT_DUMPED_TEXT_EQ): New macro.
8017 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8018 and then without optinfo enabled. Add uses of
8019 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8020 * dumpfile.h: Update comment for the dump_* API.
8021 * optinfo-emit-json.cc
8022 (selftest::test_building_json_from_dump_calls): Update for new
8023 param for temp_dump_context ctor.
8024 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8025 and "m_owned" field.
8026 (optinfo_item::~optinfo_item): Likewise.
8027 (optinfo::add_item): New member function.
8028 (optinfo::emit): Update comment.
8029 (optinfo::add_string): Delete.
8030 (optinfo::add_printf): Delete.
8031 (optinfo::add_printf_va): Delete.
8032 (optinfo::add_gimple_stmt): Delete.
8033 (optinfo::add_gimple_expr): Delete.
8034 (optinfo::add_tree): Delete.
8035 (optinfo::add_symtab_node): Delete.
8036 (optinfo::add_dec): Delete.
8037 * optinfo.h (class dump_context): New forward decl.
8038 (optinfo::add_item): New decl.
8039 (optinfo::add_string): Delete.
8040 (optinfo::add_printf): Delete.
8041 (optinfo::add_printf_va): Delete.
8042 (optinfo::add_gimple_stmt): Delete.
8043 (optinfo::add_gimple_expr): Delete.
8044 (optinfo::add_tree): Delete.
8045 (optinfo::add_symtab_node): Delete.
8046 (optinfo::add_dec): Delete.
8047 (optinfo::add_poly_int): Delete.
8048 (optinfo_item::optinfo_item): Remove "owned" param.
8049 (class optinfo_item): Remove field "m_owned".
8050
8051 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8052
8053 PR middle-end/86705
8054 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8055 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8056 requested variable alignment.
8057 (expand_one_ssa_partition): Likewise.
8058 (expand_one_var): Likewise.
8059
8060 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8061
8062 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8063 to speculation_safe_value_not_needed.
8064
8065 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8066
8067 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8068 * targhooks.c (speculation_safe_value_not_needed): New function.
8069 * target.def (have_speculation_safe_value): Update documentation.
8070 * doc/tm.texi: Regenerated.
8071
8072 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8073
8074 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8075 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8076 expand.
8077 (despeculate_copy<ALLI:mode>_insn): New insn.
8078 (despeculate_copyti_insn): New insn.
8079 (despeculate_simple<ALLI:mode>): New insn
8080 (despeculate_simpleti): New insn.
8081 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8082 function.
8083 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8084 aarch64_speculation_safe_value.
8085 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8086
8087 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8088
8089 * config/aarch64/aarch64-speculation.cc: New file.
8090 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8091 before pass_reorder_blocks.
8092 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8093 prototype.
8094 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8095 X14 and X15 when tracking speculation.
8096 * config/aarch64/aarch64.md (register name constants): Add
8097 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8098 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8099 (speculation_barrier): New insn attribute.
8100 (cmp<mode>): Allow SP in comparisons.
8101 (speculation_tracker): New insn.
8102 (speculation_barrier): Add speculation_barrier attribute.
8103 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8104 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8105 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8106
8107 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8108
8109 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8110 aarch64_track_speculation is true.
8111 (tb<optab><mode>1): Likewise.
8112 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8113 generate CB[N]Z when tracking speculation.
8114 (aarch64_split_compare_and_swap): Likewise.
8115 (aarch64_split_atomic_op): Likewise.
8116
8117 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8118
8119 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8120
8121 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8122
8123 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8124 (speculation_barrier): New insn.
8125
8126 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8127
8128 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8129 * config/arm/arm.md (speculation_barrier): New expand.
8130 (speculation_barrier_insn): New pattern.
8131
8132 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8133
8134 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8135 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8136 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8137 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8138 list.
8139 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8140 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8141 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8142 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8143 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8144 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8145 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8146 * builtins.c (expand_speculation_safe_value): New function.
8147 (expand_builtin): Call it.
8148 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8149 * doc/extend.texi: Document __builtin_speculation_safe_value.
8150 * doc/md.texi: Document "speculation_barrier" pattern.
8151 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8152 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8153 * doc/tm.texi: Regenerated.
8154 * target.def (have_speculation_safe_value, speculation_safe_value): New
8155 hooks.
8156 * targhooks.c (default_have_speculation_safe_value): New function.
8157 (default_speculation_safe_value): New function.
8158 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8159 (default_speculation_safe_value): Add prototype.
8160
8161 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8162
8163 * dump-context.h (dump_context::dump_loc): New decl.
8164 * dumpfile.c (dump_context::dump_loc): New member function.
8165 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8166 and dump_gimple_stmt.
8167 (dump_context::dump_gimple_expr_loc): Likewise, using
8168 dump_gimple_expr.
8169 (dump_context::dump_generic_expr_loc): Likewise, using
8170 dump_generic_expr.
8171 (dump_context::dump_printf_loc_va): Likewise, using
8172 dump_printf_va.
8173 (dump_context::begin_scope): Explicitly using the global function
8174 "dump_loc", rather than the member function.
8175
8176 2018-07-31 Martin Sebor <msebor@redhat.com>
8177
8178 PR tree-optimization/86741
8179 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8180
8181 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8182
8183 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8184 depend on whether prefetch instructions will be emitted or not.
8185 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8186 will be emitted or not.
8187 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8188 (TARGET_SETMEM_PFD): New macros.
8189
8190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8191
8192 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8193 (NULL_STMT_VEC_INFO): Delete.
8194 (stmt_vec_info::operator*): Likewise.
8195 (stmt_vec_info::operator gimple *): Likewise.
8196 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8197 of NULL_STMT_VEC_INFO.
8198 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8199 (vect_reassociating_reduction_p): Likewise.
8200 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8201 (vectorizable_store): Likewise.
8202 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8203 (vec_info::free_stmt_vec_infos): Likewise.
8204
8205 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8206
8207 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8208 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8209
8210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8211
8212 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8213 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8214 (vec_info::free_stmt_vec_info): New private member functions.
8215 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8216 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8217 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8218 set_stmt_vec_info_vec and free_stmt_vec_infos.
8219 * tree-vect-loop.c (_loop_vec_info): Remove call to
8220 set_stmt_vec_info_vec.
8221 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8222 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8223 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8224 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8225 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8226 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8227 with the clearing in the xcalloc.
8228 (stmt_vec_info_vec): Delete.
8229 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8230 (vectorize_loops): Likewise.
8231 (vec_info::~vec_info): Remove argument from call to
8232 free_stmt_vec_infos.
8233 (vec_info::add_stmt): Remove vinfo argument from call to
8234 new_stmt_vec_info.
8235
8236 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8237
8238 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8239 rather than a gimple stmt.
8240 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8241 information for pattern statements when passed the original
8242 statement; instead wait to be passed the pattern statement itself.
8243 Don't call set_vinfo_for_stmt here.
8244 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8245 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8246 stmt_vec_infos here.
8247 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8248 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8249 stmt_vec_infos entry.
8250
8251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8252
8253 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8254 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8255 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8256 * tree-vect-stmts.c (vectorizable_call): Likewise.
8257 (vectorizable_simd_clone_call): Likewise.
8258
8259 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8260
8261 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8262 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8263 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8264 * tree-vect-loop.c (vect_transform_loop): Likewise.
8265 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8266 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8267
8268 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8269
8270 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8271 (vect_dr_stmt): Delete.
8272 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8273 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8274 of DR_VECT_AUX.
8275 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8276 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8277 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8278 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8279 (vect_analyze_data_refs): Likewise.
8280 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8281 argument.
8282 (vect_find_same_alignment_drs): Likewise.
8283 (vect_slp_analyze_node_dependences): Update calls accordingly.
8284 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8285 instead of DR_VECT_AUX.
8286 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8287 of a vector data references. Use vec_info::lookup_dr instead of
8288 DR_VECT_AUX.
8289 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8290 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8291 instead of DR_VECT_AUX.
8292
8293 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8294
8295 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8296 dr_vec_info.
8297 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8298 accordingly.
8299 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8300 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8301 (vect_gen_prolog_loop_niters): Likewise.
8302
8303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8304
8305 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8306 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8307 (vect_known_alignment_in_bytes, vect_dr_behavior)
8308 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8309 instead of data_references. Update calls to other routines for
8310 which the same change has been made.
8311 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8312 dr_vec_infos instead of stmt_vec_infos.
8313 (vect_analyze_data_ref_dependence): Update call accordingly.
8314 (vect_slp_analyze_data_ref_dependence)
8315 (vect_record_base_alignments): Use DR_VECT_AUX.
8316 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8317 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8318 (vector_alignment_reachable_p, vect_get_data_access_cost)
8319 (vect_peeling_supportable, vect_analyze_group_access_1)
8320 (vect_analyze_group_access, vect_analyze_data_ref_access)
8321 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8322 (vect_compile_time_alias, vect_small_gap_p)
8323 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8324 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8325 instead of data_references. Update calls to other routines for
8326 which the same change has been made.
8327 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8328 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8329 (vect_slp_analyze_and_verify_node_alignment)
8330 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8331 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8332 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8333 above changes.
8334 (_vect_peel_info::dr): Replace with...
8335 (_vect_peel_info::dr_info): ...this new field.
8336 (vect_peeling_hash_get_most_frequent)
8337 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8338 (vect_peeling_hash_get_lowest_cost):
8339 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8340 routines for which the same change has been made.
8341 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8342 data_reference.
8343 * tree-vect-loop-manip.c (get_misalign_in_elems)
8344 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8345 above changes.
8346 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8347 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8348 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8349 (get_group_load_store_type, get_negative_load_store_type)
8350 (vect_get_data_ptr_increment, vectorizable_store)
8351 (vectorizable_load): Likewise.
8352 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8353 Update calls to other routines for which the same change has been made.
8354
8355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8356
8357 * tree-vectorizer.h (vec_info::move_dr): New member function.
8358 (dataref_aux): Rename to...
8359 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8360 (_stmt_vec_info::dr_aux): Update accordingly.
8361 (_stmt_vec_info::data_ref_info): Delete.
8362 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8363 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8364 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8365 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8366 of data_ref.
8367 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8368 (STMT_VINFO_DR_INFO): New macro.
8369 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8370 (set_dr_misalignment): Update after rename of dataref_aux.
8371 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8372 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8373 initialization of STMT_VINFO_DATA_REF.
8374 * tree-vectorizer.c (vec_info::move_dr): New function.
8375 * tree-vect-patterns.c (vect_recog_bool_pattern)
8376 (vect_recog_mask_conversion_pattern)
8377 (vect_recog_gather_scatter_pattern): Use it.
8378 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8379 the "dr" and "stmt" fields of dr_vec_info instead of
8380 STMT_VINFO_DATA_REF.
8381
8382 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8383
8384 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8385 (is_pattern_stmt_p): Use it.
8386 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8387 on pattern statements.
8388
8389 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8390
8391 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8392 original stmt as a stmt_vec_info rather than a gimple stmt.
8393 (vect_pattern_recog_1): Take the statement directly as a
8394 stmt_vec_info, rather than via a gimple_stmt_iterator.
8395 Update call to vect_mark_pattern_stmts.
8396 (vect_pattern_recog): Update calls accordingly.
8397
8398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8399
8400 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8401 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8402 a vect_def_type for the first argument.
8403 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8404 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8405 operand if it isn't defined by a vectorized statement.
8406 (vect_build_gather_load_calls): Remove the mask_dt argument and
8407 update calls to vect_get_vec_def_for_stmt_copy.
8408 (vectorizable_bswap): Likewise the dt argument.
8409 (vectorizable_call): Update calls to vectorizable_bswap and
8410 vect_get_vec_def_for_stmt_copy.
8411 (vectorizable_simd_clone_call, vectorizable_assignment)
8412 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8413 (vectorizable_comparison): Update calls to
8414 vect_get_vec_def_for_stmt_copy.
8415 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8416 vect_is_simple_use.
8417 (vect_get_loop_based_defs): Remove dt argument and update call
8418 to vect_get_vec_def_for_stmt_copy.
8419 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8420 and vect_get_vec_def_for_stmt_copy.
8421 (vectorizable_load): Update calls to vect_build_gather_load_calls
8422 and vect_get_vec_def_for_stmt_copy.
8423 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8424 (vectorizable_reduction, vectorizable_live_operation): Update calls
8425 to vect_get_vec_def_for_stmt_copy.
8426
8427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8428
8429 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8430 and gimple stmt arguments with a stmt_vec_info.
8431 (vect_record_base_alignments): Update calls accordingly.
8432 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8433 and gimple stmt arguments with a stmt_vec_info.
8434 (vect_build_slp_tree_1): Remove vinfo argument and update call
8435 to vect_record_max_nunits.
8436 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8437 and vect_record_max_nunits.
8438
8439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8440
8441 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8442 file and take a stmt_vec_info instead of a gimple stmt.
8443 (supportable_widening_operation, vect_finish_replace_stmt)
8444 (vect_finish_stmt_generation, vect_get_store_rhs)
8445 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8446 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8447 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8448 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8449 (vect_create_data_ref_ptr, bump_vector_ptr)
8450 (vect_permute_store_chain, vect_setup_realignment)
8451 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8452 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8453 (vectorizable_reduction, vectorizable_induction)
8454 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8455 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8456 than gimple stmts as arguments.
8457 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8458 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8459 (can_group_stmts_p, vect_check_gather_scatter)
8460 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8461 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8462 (vect_permute_load_chain, vect_shift_permute_load_chain)
8463 (vect_transform_grouped_load)
8464 (vect_record_grouped_load_vectors): Likewise.
8465 * tree-vect-loop.c (vect_fixup_reduc_chain)
8466 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8467 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8468 (vectorizable_reduction, vectorizable_induction)
8469 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8470 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8471 (vect_get_load_store_mask): Likewise.
8472 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8473 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8474 * tree-vect-stmts.c (vect_mark_relevant)
8475 (is_simple_and_all_uses_invariant)
8476 (exist_non_indexing_operands_for_use_p, process_use)
8477 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8478 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8479 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8480 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8481 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8482 (get_negative_load_store_type, get_load_store_type)
8483 (vect_check_load_store_mask, vect_check_store_rhs)
8484 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8485 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8486 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8487 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8488 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8489 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8490 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8491 (supportable_widening_operation): Likewise.
8492
8493 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8494
8495 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8496 a stmt_vec_info instead of a gcall.
8497 (vect_check_gather_scatter): Update call accordingly.
8498 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8499 of a gphi.
8500 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8501 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8502 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8503 instead of a gimple stmt.
8504 (vect_transform_loop): Update calls accordingly.
8505 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8506 stmt_vec_infos instead of gimple stmts.
8507 (vect_analyze_slp_instance): Update use accordingly.
8508 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8509 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8510 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8511 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8512 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8513 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8514 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8515 down to subroutines.
8516
8517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8518
8519 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8520 of the worklist from a vector of gimple stmts to a vector of
8521 stmt_vec_infos.
8522 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8523 (vect_mark_stmts_to_be_vectorized): Likewise
8524
8525 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8526
8527 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8528 statement before passing it to vect_analyze_stmt.
8529 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8530 the chain of phi vector definitions. Track the exit phi via its
8531 stmt_vec_info.
8532 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8533 STMT_VINFO_REDUC_DEF.
8534 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8535 stmt_vec_infos to handle the statement chains.
8536 (vect_get_slp_defs): Record the first statement in the node
8537 using a stmt_vec_info.
8538 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8539 statements here and pass their stmt_vec_info down to subroutines.
8540 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8541 down to vect_finish_stmt_generation.
8542 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8543 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8544 stmt_vec_infos to subroutines.
8545 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8546 chains.
8547
8548 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8549
8550 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8551 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8552 (vect_permute_store_chain, vect_setup_realignment)
8553 (vect_permute_load_chain, vect_shift_permute_load_chain)
8554 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8555 stmts internally, and when passing values to other vectorizer routines.
8556 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8557 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8558 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8559 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8560 (vectorizable_reduction, vectorizable_induction)
8561 (vectorizable_live_operation, vect_transform_loop_stmt)
8562 (vect_transform_loop): Likewise.
8563 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8564 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8565 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8566 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8567 (vect_slp_analyze_node_operations_1): Likewise.
8568 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8569 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8570 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8571 (vect_finish_stmt_generation_1, get_group_load_store_type)
8572 (get_load_store_type, vect_build_gather_load_calls)
8573 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8574 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8575 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8576 (vectorizable_store, vectorizable_load, vectorizable_condition)
8577 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8578 (supportable_widening_operation): Likewise.
8579 (vect_get_vector_types_for_stmt): Likewise.
8580 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8581
8582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8583
8584 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8585 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8586 (vect_permute_store_chain, vect_permute_load_chain)
8587 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8588 repeated stmt_vec_info lookups.
8589 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8590 (vect_update_ivs_after_vectorizer): Likewise.
8591 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8592 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8593 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8594 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8595 (vect_bb_slp_scalar_cost): Likewise.
8596 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8597
8598 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8599
8600 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8601 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8602 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8603 to get gassigns and gcalls, rather than operating on generc gimple
8604 stmts.
8605 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8606 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8607 (vectorizable_load, vect_analyze_stmt): Likewise.
8608 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8609
8610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8611
8612 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8613 return stmt_vec_infos rather than gimple stmts. Do not accept
8614 null arguments.
8615 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8616 of a gimple stmt.
8617 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8618 Update use of get_later_stmt.
8619 (vect_get_constant_vectors): Update call accordingly.
8620 (vect_schedule_slp_instance): Likewise
8621 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8622 (vect_slp_analyze_instance_dependence): Likewise.
8623 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8624
8625 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8626
8627 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8628 (stmt_info_for_cost::stmt_info): ...this new field.
8629 (add_stmt_costs): Update accordingly.
8630 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8631 (vect_get_known_peeling_cost): Likewise.
8632 (vect_estimate_min_profitable_iters): Likewise.
8633 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8634
8635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8636
8637 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8638 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8639 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8640 accordingly.
8641 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8642
8643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8644
8645 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8646 a gimple stmt to a stmt_vec_info.
8647 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8648
8649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8650
8651 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8652 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8653 (_loop_vec_info::reduction_chains): Likewise.
8654 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8655 accordingly.
8656 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8657
8658 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8659
8660 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8661 a gimple stmt to a stmt_vec_info.
8662 (_stmt_vec_info::next_element): Likewise.
8663 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8664 (vect_slp_analyze_and_verify_node_alignment)
8665 (vect_analyze_group_access_1, vect_analyze_group_access)
8666 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8667 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8668 (vect_supportable_dr_alignment): Update accordingly.
8669 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8670 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8671 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8672 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8673 * tree-vect-slp.c (vect_build_slp_tree_1)
8674 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8675 (vect_split_slp_store_group, vect_analyze_slp_instance)
8676 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8677 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8678 (get_group_load_store_type, get_load_store_type)
8679 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8680 (vect_transform_stmt, vect_remove_stores): Likewise.
8681
8682 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8683
8684 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8685 than a gimple stmt.
8686 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8687 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8688 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8689 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8690 (vector_alignment_reachable_p, vect_get_data_access_cost)
8691 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8692 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8693 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8694 (vect_analyze_group_access_1, vect_analyze_group_access)
8695 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8696 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8697 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8698 result of vect_dr_stmt and use the stmt_vec_info instead of
8699 the associated gimple stmt.
8700 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8701 (vect_gen_prolog_loop_niters): Likewise.
8702 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8703
8704 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8705
8706 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8707 to a vec<stmt_vec_info>.
8708 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8709 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8710 vec<stmt_vec_info>.
8711 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8712 to a vec<stmt_vec_info>.
8713 (bst_traits::value_type, bst_traits::value_type): Likewise.
8714 (bst_traits::hash): Update accordingly.
8715 (vect_get_and_check_slp_defs): Change the stmts parameter from
8716 a vec<gimple *> to a vec<stmt_vec_info>.
8717 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8718 (vect_build_slp_tree): Likewise.
8719 (vect_build_slp_tree_2): Likewise. Update uses of
8720 SLP_TREE_SCALAR_STMTS.
8721 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8722 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8723 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8724 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8725 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8726 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8727 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8728 (vect_get_constant_vectors, vect_get_slp_defs)
8729 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8730 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8731 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8732 instead of gimple stmts.
8733 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8734 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8735 (vect_slp_analyze_instance_dependence): Update uses of
8736 SLP_TREE_SCALAR_STMTS.
8737 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8738 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8739 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8740 (get_initial_defs_for_reduction): Likewise.
8741 (vect_create_epilog_for_reduction): Likewise.
8742 (vectorize_fold_left_reduction): Likewise.
8743 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8744 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8745 (can_vectorize_live_stmts): Likewise.
8746
8747 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8748
8749 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8750 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8751 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8752 than gimple stmts.
8753 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8754 of a gimple stmt.
8755 (gather_scalar_reductions): Update after above interface changes.
8756 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8757 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8758 than gimple stmts.
8759 (vect_force_simple_reduction): Likewise.
8760 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8761 LOOP_VINFO_REDUCTIONS.
8762 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8763
8764 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8765
8766 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8767 a gimple stmt to a stmt_vec_info.
8768 * tree-vect-loop.c (vect_active_double_reduction_p)
8769 (vect_force_simple_reduction, vectorizable_reduction): Update
8770 accordingly.
8771
8772 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8773
8774 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8775 vec<gimple *> to a vec<stmt_vec_info>.
8776 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8777 the reduction_phis argument from a vec<gimple *> to a
8778 vec<stmt_vec_info>.
8779 (vectorizable_reduction): Likewise the phis local variable that
8780 is passed to vect_create_epilog_for_reduction. Update for new type
8781 of SLP_TREE_VEC_STMTS.
8782 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8783 (vectorizable_live_operation): Likewise.
8784 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8785 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8786
8787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8788
8789 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8790 a gimple stmt to a stmt_vec_info.
8791 (vectorizable_condition, vectorizable_live_operation)
8792 (vectorizable_reduction, vectorizable_induction): Pass back the
8793 vectorized statement as a stmt_vec_info.
8794 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8795 use of STMT_VINFO_VEC_STMT.
8796 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8797 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8798 as stmt_vec_infos rather than gimple stmts.
8799 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8800 to a stmt_vec_info.
8801 (vectorizable_live_operation): Likewise.
8802 (vectorizable_reduction, vectorizable_induction): Likewise,
8803 updating use of STMT_VINFO_VEC_STMT.
8804 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8805 of STMT_VINFO_VEC_STMT.
8806 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8807 (vectorizable_simd_clone_call, vectorizable_conversion)
8808 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8809 (vectorizable_store, vectorizable_load, vectorizable_condition)
8810 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8811 from a gimple stmt to a stmt_vec_info.
8812 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8813 pointer to a stmt_vec_info to the vectorizable_* routines.
8814
8815 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8816
8817 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8818 a gimple stmt to a stmt_vec_info.
8819 (is_pattern_stmt_p): Update accordingly.
8820 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8821 (vect_record_grouped_load_vectors): Likewise.
8822 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8823 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8824 (vect_model_reduction_cost): Likewise.
8825 (vect_create_epilog_for_reduction): Likewise.
8826 (vectorizable_reduction, vectorizable_induction): Likewise.
8827 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8828 Return the stmt_vec_info for the pattern statement.
8829 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8830 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8831 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8832 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8833 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8834 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8835 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8836 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8837
8838 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8839
8840 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8841 (vect_finish_stmt_generation): Likewise.
8842 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8843 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8844 (vect_build_gather_load_calls): Use the return value of the above
8845 functions instead of a separate call to vinfo_for_stmt. Use narrow
8846 scopes for the input gimple stmt and wider scopes for the associated
8847 stmt_vec_info. Use vec_info::lookup_def when setting these
8848 stmt_vec_infos from an SSA_NAME definition.
8849 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8850 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8851 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8852 (vectorizable_store, vectorizable_load, vectorizable_condition)
8853 (vectorizable_comparison): Likewise.
8854 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8855 (vectorizable_reduction): Likewise.
8856
8857 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8858
8859 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8860 stmt_vec_info * parameter before the optional gimple **.
8861 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8862 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8863 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8864 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8865 (vectorizable_live_operation): Likewise.
8866 * tree-vect-patterns.c (type_conversion_p): Likewise.
8867 (vect_look_through_possible_promotion): Likewise.
8868 (vect_recog_rotate_pattern): Likewise.
8869 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8870
8871 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8872
8873 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8874 a typedef to a wrapper class.
8875 (NULL_STMT_VEC_INFO): New macro.
8876 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8877 (stmt_vec_info::operator*): New function.
8878 (stmt_vec_info::operator gimple *): Likewise.
8879 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8880 (add_stmt_costs): Likewise.
8881 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8882 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8883 (vect_get_known_peeling_cost): Likewise.
8884 (vect_estimate_min_profitable_iters): Likewise.
8885 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8886 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8887 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8888 (vectorizable_store, free_stmt_vec_infos): Likewise.
8889 (new_stmt_vec_info): Change return type of xcalloc to
8890 _stmt_vec_info *.
8891
8892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8893
8894 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8895 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8896 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8897 a single_imm_use-based sequence.
8898 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8899
8900 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8901
8902 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8903 * tree-vectorizer.c (vec_info::lookup_def): New function.
8904 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8905 (vect_widened_op_tree): Likewise.
8906 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8907 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8908 (vectorizable_reduction): Likewise.
8909 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8910 of a gimple *.
8911 (vect_is_slp_reduction): Update calls accordingly. Use
8912 vec_info::lookup_def.
8913 (vect_is_simple_reduction): Likewise
8914 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8915
8916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8917
8918 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8919 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8920 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8921 of vinfo_for_stmt.
8922 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8923 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8924 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8925 (vect_is_slp_reduction, vectorizable_induction)
8926 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8927 * tree-vect-patterns.c (vect_init_pattern_stmt):
8928 (vect_determine_min_output_precision_1, vect_determine_precisions)
8929 (vect_pattern_recog): Likewise.
8930 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8931 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8932 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8933 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8934 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8935 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8936 info field from a loop to a loop_vec_info.
8937
8938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8939
8940 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8941 (vec_info::add_stmt): Declare.
8942 * tree-vectorizer.c (vec_info::add_stmt): New function.
8943 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8944 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8945 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8946 (vectorizable_induction): Likewise.
8947 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8948 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8949 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8950 (vectorizable_load): Likewise.
8951 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8952 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8953 (vect_recog_gather_scatter_pattern): Likewise.
8954 (append_pattern_def_seq): Likewise. Remove a check that is
8955 performed by add_stmt itself.
8956
8957 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8958
8959 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8960 which make_ssa_name was called with new_stmt before new_stmt
8961 had been created.
8962
8963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8964
8965 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8966 split out from...
8967 (vect_is_slp_reduction): ...here...
8968 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8969 that are already known to be false.
8970
8971 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8972
8973 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8974 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8975 STMT_VINFO_NUM_SLP_USES when it's true.
8976 (vect_free_slp_instance): Add a final_p parameter and pass it to
8977 vect_free_slp_tree.
8978 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8979 (vect_analyze_slp_instance): Likewise.
8980 (vect_slp_analyze_operations): Likewise.
8981 (vect_slp_analyze_bb_1): Likewise.
8982 * tree-vectorizer.c (vec_info): Likewise.
8983 * tree-vect-loop.c (vect_transform_loop): Likewise.
8984
8985 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8986
8987 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8988 function is not called for second and subsequent members of
8989 a reduction group.
8990
8991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8992
8993 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8994 cases for nested loops from here to ...
8995 (vect_create_epilog_for_reduction): ...here. Only call
8996 vect_is_simple_use for inner-loop reductions.
8997
8998 2018-07-31 Martin Liska <mliska@suse.cz>
8999
9000 PR gcov-profile/85338
9001 PR gcov-profile/85350
9002 PR gcov-profile/85372
9003 * profile.c (struct location_triplet): New.
9004 (struct location_triplet_hash): Likewise.
9005 (output_location): Do not output a BB that
9006 is already recorded for a line.
9007 (branch_prob): Use streamed_locations.
9008
9009 2018-07-31 Martin Liska <mliska@suse.cz>
9010
9011 PR gcov-profile/85370
9012 * coverage.c (coverage_begin_function): Do not mark target
9013 clones as artificial functions.
9014
9015 2018-07-31 Martin Liska <mliska@suse.cz>
9016
9017 PR gcov-profile/83813
9018 PR gcov-profile/84758
9019 PR gcov-profile/85217
9020 PR gcov-profile/85332
9021 * profile.c (branch_prob): Do not record GOTO expressions
9022 for GIMPLE statements which locations are already streamed.
9023
9024 2018-07-31 Olivier Hainque <hainque@adacore.com>
9025
9026 * gcc.c (handle_spec_function): Accept a soft_matched_part
9027 argument, as do_spec_1. Pass it down to ...
9028 (eval_spec_function): Accept a soft_matched_part argument,
9029 and pass it down to ...
9030 (do_spec_2): Accept a soft_matched_part argument, and pass
9031 it down to do_spec_1.
9032 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9033 (handle_braces): Update call to handle_spec_function.
9034 (driver::set_up_specs): Update calls to do_spec_2.
9035 (compare_debug_dump_opt_spec_function): Likewise.
9036 (compare_debug_self_opt_spec_function): Likewise.
9037
9038 2018-07-31 Olivier Hainque <hainque@adacore.com>
9039
9040 * common.opt (nolibc): New option.
9041 * doc/invoke.texi (Link Options): Document it.
9042 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9043 * config/alpha/linux.h: Likewise.
9044 * config/arc/elf.h: Likewise.
9045 * config/arm/uclinux-elf.h: Likewise.
9046 * config/arm/unknown-elf.h: Likewise.
9047 * config/avr/avrlibc.h: Likewise.
9048 * config/bfin/bfin.h: Likewise.
9049 * config/bfin/linux.h: Likewise.
9050 * config/bfin/uclinux.h: Likewise.
9051 * config/darwin.h: Likewise.
9052 * config/darwin10.h: Likewise.
9053 * config/darwin12.h: Likewise.
9054 * config/gnu-user.h: Likewise.
9055 * config/lm32/uclinux-elf.h: Likewise.
9056 * config/pa/pa-hpux11.h: Likewise.
9057 * config/pa/pa64-hpux.h: Likewise.
9058 * config/sparc/sparc.h: Likewise.
9059
9060 2018-07-31 Olivier Hainque <hainque@adacore.com>
9061
9062 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9063 undefined variables.
9064
9065 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9066
9067 PR target/86640
9068 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9069 instead of GEN_INT.
9070
9071 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9072
9073 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9074 terminated string literal.
9075
9076 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9077
9078 PR rtl-optimization/85160
9079 * combine.c (is_just_move): New function.
9080 (try_combine): Allow combining two instructions into two if neither of
9081 the original instructions was a move.
9082
9083 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9084
9085 PR target/86673
9086 * doc/extend.texi (Global Register Variables): Discourage use of type
9087 qualifiers.
9088 (Local Register Variables): Likewise.
9089
9090 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9091
9092 PR tree-optimization/86506
9093 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9094
9095 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9096
9097 PR target/86547
9098 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9099 hard_regno, make sure no insn between `from` and `to` clobbers it.
9100
9101 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9102 Tom de Vries <tdevries@suse.de>
9103
9104 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9105 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9106 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9107 PTX_DEFAULT_RUNTIME_DIM.
9108 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9109
9110 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9111
9112 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9113 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9114 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9115
9116 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9117
9118 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9119 used.
9120 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9121 predicate to reflect toc fusion has been deleted.
9122 (toc_fusion_mem_raw): Delete, no longer used.
9123 (toc_fusion_mem_wrapped): Likewise.
9124 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9125 fusion mask bit.
9126 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9127 Delete, no longer used.
9128 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9129 meant to be used for toc fusion.
9130 (rs6000_debug_print_mode): Delete toc fusion debugging.
9131 (rs6000_debug_reg_global): Likewise.
9132 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9133 fusion and secondary reload support that were never used.
9134 (rs6000_option_override_internal): Delete TOC fusion, that was only
9135 partially defined, and it did not work unless you also used the
9136 -mcmodel= switch.
9137 (rs6000_legitimate_address_p): Delete TOC fusion support.
9138 (rs6000_opt_masks): Likewise.
9139 (fusion_wrap_memory_address): Delete function, no longer used.
9140 (fusion_split_address); Delete TOC fusion support.
9141 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9142 longer used with toc fusion being deleted.
9143 (TARGET_TOC_FUSION_FP): Likewise.
9144 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9145 UNSPEC.
9146 (toc fusion spliter): Delete TOC fusion support.
9147 (toc_fusionload_<mode>): Likewise.
9148 (toc_fusionload_di): Likewise.
9149 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9150 longer needs to be named. Rename predicate to delete TOC fusion.
9151 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9152 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9153 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9154 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9155 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9156
9157 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9158
9159 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9160 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9161 __int128 in built-in function prototypes.
9162 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9163 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9164
9165 2018-07-27 Martin Sebor <msebor@redhat.com>
9166
9167 PR tree-optimization/86696
9168 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9169 types, including enums.
9170 (handle_char_store): Be prepared for the above function to fail.
9171
9172 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9173
9174 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9175 when optimization level is lower than 2 or optimize for size.
9176
9177 2018-07-26 Martin Sebor <msebor@redhat.com>
9178
9179 PR tree-optimization/86043
9180 PR tree-optimization/86042
9181 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9182 (get_string_cst_length): Rename...
9183 (get_min_string_length): ...to this. Add argument.
9184 (handle_char_store): Extend to handle multi-character stores by
9185 MEM_REF.
9186 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9187 * tree.h (initializer_zerop): Add argument.
9188
9189 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9190
9191 PR middle-end/86660
9192 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9193 declare target to variables if they have always,{to,from,tofrom} map
9194 kinds.
9195
9196 2018-07-26 Martin Liska <mliska@suse.cz>
9197
9198 PR lto/86548
9199 * lto-wrapper.c: Add linker_output as prefix
9200 for ltrans_output_file.
9201
9202 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9203
9204 PR rtl-optimization/85805
9205 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9206 value for hard registers if that was written in the same mode.
9207
9208 2018-07-26 Martin Liska <mliska@suse.cz>
9209
9210 PR gcov-profile/86536
9211 * gcov.c (format_gcov): Use printf format %.*f directly
9212 and do not handle special values.
9213
9214 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9215
9216 * common/config/arc/arc-common.c (arc_option_optimization_table):
9217 Update default optimizations for size.
9218
9219 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9220
9221 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9222 * config/arc/constraints.md (CfZ): New constraint.
9223 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9224 (subsf3_fpu): Likewise.
9225 (cmpsf_fpu): Likewise.
9226 (cmpsf_fpu_uneq): Likewise.
9227
9228 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9229
9230 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9231 accesses as well.
9232 (arc_is_uncached_mem_p): uncached applies to both the variable and
9233 the pointer.
9234
9235 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9236
9237 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9238 register names.
9239
9240 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9241
9242 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9243 field "m_scopes" from vec to auto_vec.
9244
9245 2018-07-25 Martin Liska <mliska@suse.cz>
9246
9247 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9248 return type.
9249
9250 2018-07-25 Richard Biener <rguenther@suse.de>
9251
9252 PR debug/86654
9253 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9254 special wrt context_die late.
9255 (gen_subprogram_die): Re-use DIEs in local scope.
9256
9257 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9258
9259 PR tree-optimization/86644
9260 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9261
9262 2018-07-25 Martin Liska <mliska@suse.cz>
9263
9264 PR middle-end/86645
9265 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9266 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9267
9268 2018-07-25 Martin Liska <mliska@suse.cz>
9269
9270 PR sanitizer/79635
9271 * params.def: Explain ASan abbreviation and provide
9272 a documentation link.
9273
9274 2018-07-24 Martin Sebor <msebor@redhat.com>
9275
9276 PR tree-optimization/86622
9277 PR tree-optimization/86532
9278 * builtins.h (string_length): Declare.
9279 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9280 (check_access): Be prepared for non-constant length ranges.
9281 (string_length): Make extern.
9282 * expr.c (string_constant): Only handle the minor non-constant
9283 array index. Use string_constant to compute the length of
9284 a generic string constant.
9285
9286 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9287
9288 PR tree-optimization/86618
9289 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9290 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9291
9292 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9293
9294 PR tree-optimization/86636
9295 * json.cc (json::object::set): Fix comment. Add assertions.
9296 (json::array::append): Move here from json.h. Add comment and an
9297 assertion.
9298 (json::string::string): Likewise.
9299 * json.h (json::array::append): Move to json.cc.
9300 (json::string::string): Likewise.
9301 * optinfo-emit-json.cc
9302 (optrecord_json_writer::impl_location_to_json): Assert that we
9303 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9304 wrapper around it. Expand the location once, rather than three
9305 times.
9306 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9307 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9308 wrappers.
9309 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9310 places. Fix some overlong lines.
9311
9312 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9313
9314 * config/aarch64/aarch64-simd.md
9315 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9316 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9317 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9318 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9319 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9320 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9321 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9322 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9323 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9324
9325 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9326
9327 PR middle-end/86627
9328 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9329 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9330 and abs_d == d, do the power of two handling if profitable.
9331
9332 2018-07-24 Richard Biener <rguenther@suse.de>
9333
9334 * match.pd: Add BIT_FIELD_REF canonicalizations.
9335
9336 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9337
9338 PR c/86617
9339 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9340
9341 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9342
9343 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9344 terminated STRING_CST object.
9345
9346 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9347
9348 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9349
9350 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9351
9352 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9353 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9354 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9355 the elements into a register.
9356 (rs6000_split_v4si_init_di_reg): Delete.
9357 (rs6000_split_v4si_init): Delete.
9358 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9359 (vsx_init_v4si): Rewrite as a define_expand.
9360
9361 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9362
9363 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9364 zero_extend argument from memory): New.
9365
9366 2018-07-22 Martin Sebor <msebor@redhat.com>
9367
9368 PR bootstrap/86621
9369 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9370 diagnosing calls with unknown arguments unless -Walloca-larger-than
9371 is restricted to less than PTRDIFF_MAX bytes.
9372
9373 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9374
9375 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9376
9377 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9378
9379 * pretty-print.c (text_info::set_location): Remove redundant
9380 "line_table" parameter from call to rich_location::set_range.
9381
9382 2018-07-20 Martin Sebor <msebor@redhat.com>
9383
9384 PR middle-end/82063
9385 * builtins.c (expand_builtin_alloca): Adjust.
9386 * calls.c (alloc_max_size): Simplify.
9387 * cgraphunit.c (cgraph_node::expand): Adjust.
9388 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9389 variables.
9390 (frame_larger_than_size): Same.
9391 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9392 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9393 Initialize.
9394 * doc/invoke.texi (GCC Command Options): Document option arguments.
9395 Explain byte-size arguments and suffixes.
9396 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9397 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9398 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9399 * doc/options.texi (UInteger): Expand.
9400 (Host_Wide_Int, ByteSize): Document new properties.
9401 * final.c (final_start_function_1): Include sizes in an error message.
9402 * function.c (frame_offset_overflow): Same.
9403 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9404 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9405 Diagnose unbounded alloca calls only for limits of less than
9406 PTRDIFF_MAX.
9407 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9408 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9409 for alloca(0).
9410 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9411 only for limits of less than PTRDIFF_MAX.
9412 * langhooks-def.h (lhd_handle_option): Change function argument
9413 to HOST_WIDE_INT.
9414 * langhooks.c (lhd_handle_option): Same.
9415 * langhooks.h (handle_option): Same.
9416 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9417 ByteSize flags.
9418 (var_type, var_type_struct): Same.
9419 (var_set): Handle ByteSize flag.
9420 * optc-gen.awk: Add comments to output to ease debugging. Make
9421 use of HOST_WIDE_INT where appropriate.
9422 * opts-gen-save.awk: Use %lx to format unsigned long.
9423 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9424 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9425 arguments. Parse bytes-size suffixes.
9426 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9427 (enum_value_to_arg): Same.
9428 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9429 (handle_option): Adjust.
9430 (generate_option): Change function argument to HOST_WIDE_INT.
9431 (cmdline_handle_error): Adjust.
9432 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9433 (set_option): Change function argument to HOST_WIDE_INT.
9434 (option_enabled): Handle cl_host_wide_int.
9435 (get_option_state): Handle CLVC_SIZE.
9436 (control_warning_option): Same.
9437 * opts.c (common_handle_option): Change function argument to
9438 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9439 OPT_Wvla_larger_than_.
9440 * opts.h (enum cl_var_type): Add an enumerator.
9441 * stor-layout.c (layout_decl): Print a more meaningful warning.
9442 * toplev.c (output_stack_usage): Adjust.
9443
9444 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9445
9446 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9447 call to inline_expand_builtin_string_cmp.
9448 (expand_builtin_strcmp): Likewise.
9449 (expand_builtin_strncmp): Likewise.
9450 (inline_string_cmp): Delete the last parameter, change char_type_node
9451 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9452 two operands.
9453 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9454 the inlining expansion on target where the type of the call has same or
9455 narrower precision than unsigned char.
9456
9457 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9458
9459 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9460 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9461 * common.opt (fsave-optimization-record): New option.
9462 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9463 * doc/invoke.texi (-fsave-optimization-record): New option.
9464 * dumpfile.c: Include "optinfo-emit-json.h".
9465 (struct kv_pair): Move to coretypes.h.
9466 (optgroup_options): Make non-static.
9467 (dump_context::end_scope): Call
9468 optimization_records_maybe_pop_dump_scope.
9469 * dumpfile.h (optgroup_options): New decl.
9470 * json.cc: New file.
9471 * json.h: New file.
9472 * optinfo-emit-json.cc: New file.
9473 * optinfo-emit-json.h: New file.
9474 * optinfo.cc: Include "optinfo-emit-json.h".
9475 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9476 (optinfo_enabled_p): Check optimization_records_enabled_p.
9477 (optinfo_wants_inlining_info_p): Likewise.
9478 * optinfo.h: Update comment.
9479 * profile-count.c (profile_quality_as_string): New function.
9480 * profile-count.h (profile_quality_as_string): New decl.
9481 (profile_count::quality): New accessor.
9482 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9483 and optinfo_emit_json_cc_tests.
9484 * selftest.h (selftest::json_cc_tests): New decl.
9485 (selftest::optinfo_emit_json_cc_tests): New decl.
9486 * toplev.c: Include "optinfo-emit-json.h".
9487 (compile_file): Call optimization_records_finish.
9488 (do_compile): Call optimization_records_start.
9489 * tree-ssa-live.c: Include optinfo.h.
9490 (remove_unused_scope_block_p): Retain inlining information if
9491 optinfo_wants_inlining_info_p returns true.
9492
9493 2018-07-20 Richard Biener <rguenther@suse.de>
9494
9495 PR debug/86585
9496 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9497 to cover -flto-partition=none.
9498
9499 2018-07-20 Martin Liska <mliska@suse.cz>
9500
9501 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9502 (get_decl_source_range): Remove unused function.
9503
9504 2018-07-20 Richard Biener <rguenther@suse.de>
9505
9506 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9507 (struct vn_phi_s): Likewise.
9508 (struct vn_reference_s): Likewise.
9509 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9510 for searching the slot of an entry known to be in the hash itself.
9511 (vn_phi_hasher::equal): Likewise.
9512 (vn_reference_hasher::equal): Likewise.
9513 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9514 globals.
9515 (optimistic_info, current_info): Remove, keeping only valid_info.
9516 (vn_reference_lookup_1): Remove fallback lookup.
9517 (vn_reference_lookup_2): Likewise.
9518 (vn_nary_op_lookup_1): Likewise.
9519 (vn_phi_lookup): Likewise.
9520 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9521 hash element.
9522 (vn_reference_insert): Adjust, chain the inserted hash element
9523 at last_inserted_ref.
9524 (vn_reference_insert_pieces): Likewise.
9525 (visit_reference_op_call): Likewise.
9526 (vn_nary_op_insert_into): Chain the inserted hash element at
9527 last_inserted_nary.
9528 (vn_nary_op_insert_pieces): Adjust.
9529 (vn_nary_op_insert): Likewise.
9530 (vn_nary_op_insert_stmt): Likewise.
9531 (vn_phi_insert): Adjust, chain the inserted hash element at
9532 last_inserted_phi.
9533 (process_scc): Remove clearing and copying the optimistic
9534 table. Instead remove elements inserted during an optimistic
9535 iteration from the single table we maintain.
9536 (init_scc_vn): Adjust.
9537 (free_scc_vn): Likewise.
9538 (sccvn_dom_walker::record_cond): Likewise.
9539 (sccvn_dom_walker::after_dom_children): Likewise.
9540
9541 2018-07-19 Martin Sebor <msebor@redhat.com>
9542
9543 PR tree-optimization/84047
9544 PR tree-optimization/83776
9545 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9546 (check_array_bounds): Call it.
9547
9548 2018-07-19 Martin Sebor <msebor@redhat.com>
9549
9550 * align.h (align_flags): Use member initialization.
9551
9552 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9553
9554 * Makefile.in (OBJS): Add optinfo.o.
9555 * coretypes.h (class symtab_node): New forward decl.
9556 (struct cgraph_node): New forward decl.
9557 (class varpool_node): New forward decl.
9558 * dump-context.h: New file.
9559 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9560 "tree-pass.h".
9561 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9562 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9563 (set_alt_dump_file): Likewise.
9564 (dump_context::~dump_context): New dtor.
9565 (dump_gimple_stmt): Move implementation to...
9566 (dump_context::dump_gimple_stmt): ...this new member function.
9567 Add the stmt to any pending optinfo, creating one if need be.
9568 (dump_gimple_stmt_loc): Move implementation to...
9569 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9570 Start a new optinfo and add the stmt to it.
9571 (dump_gimple_expr): Move implementation to...
9572 (dump_context::dump_gimple_expr): ...this new member function.
9573 Add the stmt to any pending optinfo, creating one if need be.
9574 (dump_gimple_expr_loc): Move implementation to...
9575 (dump_context::dump_gimple_expr_loc): ...this new member function.
9576 Start a new optinfo and add the stmt to it.
9577 (dump_generic_expr): Move implementation to...
9578 (dump_context::dump_generic_expr): ...this new member function.
9579 Add the tree to any pending optinfo, creating one if need be.
9580 (dump_generic_expr_loc): Move implementation to...
9581 (dump_context::dump_generic_expr_loc): ...this new member
9582 function. Add the tree to any pending optinfo, creating one if
9583 need be.
9584 (dump_printf): Move implementation to...
9585 (dump_context::dump_printf_va): ...this new member function. Add
9586 the text to any pending optinfo, creating one if need be.
9587 (dump_printf_loc): Move implementation to...
9588 (dump_context::dump_printf_loc_va): ...this new member function.
9589 Start a new optinfo and add the stmt to it.
9590 (dump_dec): Move implementation to...
9591 (dump_context::dump_dec): ...this new member function. Add the
9592 value to any pending optinfo, creating one if need be.
9593 (dump_context::dump_symtab_node): New member function.
9594 (dump_context::get_scope_depth): New member function.
9595 (dump_context::begin_scope): New member function.
9596 (dump_context::end_scope): New member function.
9597 (dump_context::ensure_pending_optinfo): New member function.
9598 (dump_context::begin_next_optinfo): New member function.
9599 (dump_context::end_any_optinfo): New member function.
9600 (dump_context::s_current): New global.
9601 (dump_context::s_default): New global.
9602 (dump_scope_depth): Delete global.
9603 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9604 (dump_symtab_node): New function.
9605 (get_dump_scope_depth): Reimplement in terms of dump_context.
9606 (dump_begin_scope): Likewise.
9607 (dump_end_scope): Likewise.
9608 (selftest::temp_dump_context::temp_dump_context): New ctor.
9609 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9610 (selftest::verify_item): New function.
9611 (ASSERT_IS_TEXT): New macro.
9612 (ASSERT_IS_TREE): New macro.
9613 (ASSERT_IS_GIMPLE): New macro.
9614 (selftest::test_capture_of_dump_calls): New test.
9615 (selftest::dumpfile_c_tests): Call it.
9616 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9617 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9618 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9619 descriptive comment.
9620 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9621 (dump_node, dump_bb): Move these unrelated decls.
9622 (class dump_manager): Add leading comment.
9623 * optinfo.cc: New file.
9624 * optinfo.h: New file.
9625
9626 2018-07-19 Michael Collison <michael.collison@arm.com>
9627 Richard Henderson <rth@redhat.com>
9628
9629 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9630 (subti): Handle op1 zero.
9631 (subvti4, usub4ti4): New.
9632 (*sub<GPI>3_compare1_imm): New.
9633 (sub<GPI>3_carryinCV): New.
9634 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9635 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9636
9637 2018-07-19 Michael Collison <michael.collison@arm.com>
9638 Richard Henderson <rth@redhat.com>
9639
9640 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9641 (addti3): Create simpler code if low part is already known to be 0.
9642 (addvti4, uaddvti4): New.
9643 (*add<GPI>3_compareC_cconly_imm): New.
9644 (*add<GPI>3_compareC_cconly): New.
9645 (*add<GPI>3_compareC_imm): New.
9646 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9647 handle constants within this pattern..
9648 (*add<GPI>3_compareV_cconly_imm): New.
9649 (*add<GPI>3_compareV_cconly): New.
9650 (*add<GPI>3_compareV_imm): New.
9651 (add<GPI>3_compareV): New.
9652 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9653 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9654 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9655 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9656 with 'comparison' operator.
9657 (*add<GPI>3_compareV_cconly_imm): Ditto.
9658 (*add<GPI>3_compareV_cconly): Ditto.
9659 (*add<GPI>3_compareV_imm): Ditto.
9660 (add<GPI>3_compareV): Ditto.
9661 (add<mode>3_carryinC): Ditto.
9662 (*add<mode>3_carryinC_zero): Ditto.
9663 (*add<mode>3_carryinC): Ditto.
9664 (add<mode>3_carryinV): Ditto.
9665 (*add<mode>3_carryinV_zero): Ditto.
9666 (*add<mode>3_carryinV): Ditto.
9667
9668 2018-07-19 Michael Collison <michael.collison@arm.com>
9669 Richard Henderson <rth@redhat.com>
9670
9671 * config/aarch64/aarch64-modes.def (CC_V): New.
9672 * config/aarch64/aarch64-protos.h
9673 (aarch64_addti_scratch_regs): Declare
9674 (aarch64_subvti_scratch_regs): Declare.
9675 (aarch64_expand_subvti): Declare.
9676 (aarch64_gen_unlikely_cbranch): Declare
9677 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9678 for signed overflow using CC_Vmode.
9679 (aarch64_get_condition_code_1): Handle CC_Vmode.
9680 (aarch64_gen_unlikely_cbranch): New function.
9681 (aarch64_addti_scratch_regs): New function.
9682 (aarch64_subvti_scratch_regs): New function.
9683 (aarch64_expand_subvti): New function.
9684
9685 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9686
9687 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9688 extension.
9689 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9690 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9691 extension.
9692
9693 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9694
9695 PR target/83009
9696 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9697 address check not strict.
9698
9699 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9700
9701 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9702 Umq with Umn.
9703 (store_pair_lanes<mode>): Likewise.
9704 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9705 enum value 'ADDR_QUERY_LDP_STP_N'.
9706 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9707 (aarch64_print_address_internal): Add declaration.
9708 (aarch64_print_ldpstp_address): Remove.
9709 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9710 (aarch64_print_operand): Change printing of 'y'.
9711 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9712 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9713 'true' rather than '1'.
9714 * config/aarch64/constraints.md (Uml): Likewise.
9715 (Uml): Rename to Umn.
9716 (Umq): Remove.
9717
9718 2018-07-19 Richard Biener <rguenther@suse.de>
9719
9720 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9721 a trailing array.
9722 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9723 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9724 (vn_reference_hasher): Likewise.
9725 (struct vn_tables_s): Remove obstack and alloc-pool members.
9726 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9727 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9728 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9729 (vn_reference_insert_pieces): Likewise.
9730 (alloc_vn_nary_op_noinit): Adjust.
9731 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9732 (vn_phi_eq): Adjust.
9733 (shared_lookup_phiargs): Remove.
9734 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9735 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9736 (visit_reference_op_call): Likewise.
9737 (copy_nary, copy_phi, copy_reference): Remove.
9738 (process_scc): Rewind the obstack when iterating. Do not
9739 copy the elements to valid_info but just move them from one
9740 hashtable to the other.
9741 (allocate_vn_table): Adjust.
9742 (free_vn_table): Likewise.
9743 (init_scc_vn): Likewise.
9744 (free_scc_vn): Likewise.
9745
9746 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9747
9748 PR target/86560
9749 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9750 indirect_return as function type attribute.
9751 (ix86_attribute_table): Change indirect_return to function
9752 type attribute.
9753 * doc/extend.texi: Update indirect_return attribute.
9754
9755 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9756
9757 * wide-int.h (widest2_int): New.
9758 * gimple-fold.c (arith_overflowed_p): Use it.
9759 * tree.h (widest2_int_cst): New.
9760 * tree-vrp.c (wide_int_binop_overflow): Rename from
9761 vrp_int_const_binop.
9762 Rewrite to work on trees.
9763 (extract_range_from_multiplicative_op_1): Abstract code to...
9764 (wide_int_range_min_max): ...here.
9765 (wide_int_range_cross_product): ...and here.
9766 (extract_range_from_binary_expr_1): Abstract overflow code to...
9767 (wide_int_range_mult_wrapping): ...here.
9768 * tree-vrp.h (wide_int_range_cross_product): New.
9769 (wide_int_range_mult_wrapping): New.
9770
9771 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9772 Julia Koval <julia.koval@intel.com>
9773
9774 * config/i386/x86-tune-costs.h (skylake_memcpy,
9775 skylake_memset): Replace rep_prefix with unrolling for size 512.
9776
9777 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9778
9779 PR middle-end/86544
9780 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9781 comparision with EQ_EXPR in last stmt.
9782
9783 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9784
9785 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9786 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9787 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9788 previously known as "PowerPC AltiVec Built-in Functions". Move
9789 some material to new subsubsections "PowerPC AltiVec Built-in
9790 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9791 ISA 2.07".
9792 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9793 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9794 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9795 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9796
9797 2018-07-18 Richard Biener <rguenther@suse.de>
9798
9799 PR tree-optimization/86557
9800 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9801 EXACT_DIV_EXPR.
9802
9803 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9804
9805 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9806
9807 2018-07-17 Jeff Law <law@redhat.com>
9808
9809 * config/arm/arm.c (get_label_padding): Update for recent
9810 changes to label_to_alignment.
9811
9812 PR tree-optimization/86010
9813 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9814
9815 * config/mips/mips.c (vr4130_align_insns): Update for recent
9816 changes to label_to_alignment.
9817
9818 * config/frv/frv.c (frv_label_align): Update for recent changes
9819 to label_to_alignment.
9820
9821 * config/nios2/nios2.c (nios2_label_align): Update for recent
9822 changes which dropped ALIGN_LABELS_LOG.
9823
9824 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9825
9826 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9827 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9828
9829 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9830
9831 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9832 deprecated align_labels_log.
9833
9834 2018-07-17 Richard Biener <rguenther@suse.de>
9835
9836 PR lto/86456
9837 * dwarf2out.c (init_sections_and_labels): Always generate
9838 a debug_line_str_section for early LTO debug.
9839 (dwarf2out_finish): Reset debug_line_str_hash output early.
9840 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9841 with fat LTO part.
9842 (dwarf2out_early_finish): Output debug_line_str.
9843
9844 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9845
9846 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9847 index register on z196 or later.
9848
9849 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9850
9851 * config/s390/s390.c (s390_default_align): Set default function
9852 alignment to 16.
9853 (s390_override_options_after_change): Call s390_default align.
9854 (s390_option_override_internal): Call s390_default_align.
9855 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9856
9857 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9858
9859 PR middle-end/86542
9860 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9861 to _looptemp_ clauses, other than the first two.
9862
9863 2018-07-17 Martin Liska <mliska@suse.cz>
9864
9865 * opts.c: Do not enable OPT_falign_* for -Os.
9866
9867 2018-07-17 Martin Liska <mliska@suse.cz>
9868
9869 * align.h (MAX_CODE_ALIGN): New.
9870 (MAX_CODE_ALIGN_VALUE): New.
9871 * common/config/i386/i386-common.c (ix86_handle_option):
9872 (MAX_CODE_ALIGN): Moved to align.h.
9873 * final.c (MAX_CODE_ALIGN): Likewise.
9874 * opts.c (parse_and_check_align_values):
9875 (MAX_CODE_ALIGN): Likewise.
9876 (MAX_CODE_ALIGN_VALUE): Likewise.
9877
9878 2018-07-17 Martin Liska <mliska@suse.cz>
9879
9880 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9881 in order to fulfil coding style.
9882 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9883 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9884 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9885 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9886 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9887 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9888 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9889 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9890 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9891
9892 2018-07-17 Martin Liska <mliska@suse.cz>
9893
9894 * align.h: New file.
9895 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9896 directly.
9897 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9898 align_flags of label_to_alignment.
9899 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9900 align_flags class.
9901 * config/m68k/m68k.c: Do not use removed align_labels_value and
9902 align_loops_value.
9903 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9904 (LOOP_ALIGN): Likewise.
9905 (LABEL_ALIGN): Likewise.
9906 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9907 Remove not used macro.
9908 (rs6000_loop_align): Change return type to align_flags.
9909 (rs6000_loop_align_max_skip): Remove.
9910 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9911 Change return type to align_flags.
9912 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9913 Remove not used macro.
9914 (rs6000_loop_align): Change return type to align_flags.
9915 (rs6000_loop_align_max_skip): Remove.
9916 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9917 * config/rx/rx-protos.h (rx_align_for_label): Make it
9918 static function.
9919 * config/rx/rx.c (rx_align_for_label): Change return type
9920 to align_flags.
9921 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9922 macro definitions.
9923 into align_flags class.
9924 (LABEL_ALIGN): Likewise.
9925 (LOOP_ALIGN): Likewise.
9926 * config/s390/s390.c (s390_label_align): Use align_flags
9927 class member.
9928 (s390_asm_output_function_label): Likewise.
9929 * config/sh/sh.c (sh_override_options_after_change):
9930 Use align_flags class directly without macros.
9931 (find_barrier): Likewise.
9932 (barrier_align): Likewise.
9933 (sh_loop_align): Likewise.
9934 * config/spu/spu.c (spu_option_override):
9935 Use align_flags_tuple::get_value instead of removed macros.
9936 (spu_sched_init): Likewise.
9937 * config/spu/spu.h (GTY): Likewise.
9938 * config/visium/visium.c (visium_option_override):
9939 Set "8" as default secondary alignment.
9940 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9941 in order to guarantee secondary alignment of 8.
9942 * coretypes.h: Include align.h header file.
9943 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9944 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9945 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9946 * doc/tm.texi.in: Likewise.
9947 * final.c (struct label_alignment): Remove not used structure.
9948 (LABEL_ALIGN): Change type to align_flags.
9949 (LOOP_ALIGN): Likewise.
9950 (JUMP_ALIGN): Likewise.
9951 (default_loop_align_max_skip): Remove.
9952 (default_label_align_max_skip): Likewise.
9953 (default_jump_align_max_skip): Likewise.
9954 (default_label_align_after_barrier_max_skip):
9955 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9956 (LABEL_TO_MAX_SKIP): Remove.
9957 (label_to_alignment): Return align_flags type instead of integer.
9958 (label_to_max_skip): Remove.
9959 (align_fuzz): Use align_flags type.
9960 (compute_alignments): Use align_flags type and use align_flags::max
9961 to combine multiple alignments.
9962 (grow_label_align): Grow vec instead of C array.
9963 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9964 (shorten_branches): Use align_flags type and use align_flags::max
9965 to combine multiple alignments.
9966 (final_scan_insn_1): Remove usage of secondary alignment that comes
9967 from label alignment, but instead use proper secondary alignment
9968 which is computed in grow_label_align.
9969 * flags.h (struct align_flags_tuple): Move to align.h.
9970 (struct align_flags): Likewise.
9971 (state_align_loops): Rename to align_loops.
9972 (state_align_jumps): Rename to align_jumps.
9973 (state_align_labels): Rename to align_labels.
9974 (state_align_functions): Rename to align_functions.
9975 (align_loops_log): Remove.
9976 (align_jumps_log): Remove.
9977 (align_labels_log): Remove.
9978 (align_functions_log): Remove.
9979 (align_loops_max_skip): Remove.
9980 (align_jumps_max_skip): Remove.
9981 (align_labels_max_skip): Remove.
9982 (align_functions_max_skip): Remove.
9983 (align_loops_value): Remove.
9984 (align_jumps_value): Remove.
9985 (align_labels_value): Remove.
9986 (align_functions_value): Remove.
9987 * output.h (label_to_alignment): Change return type to align_flags.
9988 (label_to_max_skip): Remove.
9989 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9990 jump_align_max_skip macros.
9991 * targhooks.h (default_loop_align_max_skip): Remove.
9992 (default_label_align_max_skip): Likewise.
9993 (default_jump_align_max_skip): Likewise.
9994 (default_label_align_after_barrier_max_skip): Remove.
9995 * toplev.c (read_log_maxskip): Use ::normalize function.
9996 (parse_N_M): Remove not used argument and also call ::normalize.
9997 (parse_alignment_opts): Do not pass unused arguments.
9998 * varasm.c (assemble_start_function): Use directly align_functions
9999 instead of removed macros.
10000 * system.h: Do not poison removed macros.
10001
10002 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10003
10004 PR middle-end/86539
10005 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10006 and cond temporaries don't have reference type if iterator has
10007 pointer type. For init use &for_pre_body instead of pre_p if
10008 for_pre_body is non-empty.
10009
10010 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10011
10012 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10013 double-double modes to SFmode directly directly.
10014 (trunc<mode>sf2_fprs): Delete.
10015
10016 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10017
10018 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10019 for conversions between IFmode and the decimal floating point modes.
10020 (init_float128_ieee): Use the correct names for conversions between
10021 KFmode and the decimal floating point modes.
10022
10023 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10024
10025 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10026 for the conversions between TDmode and IFmode.
10027 (init_float128_ieee): Use more correct names for the conversions
10028 between TDmode and KFmode.
10029
10030 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10031
10032 PR tree-optimization/86526
10033 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10034 (inline_expand_builtin_string_cmp): Likewise.
10035 (inline_string_cmp): Likewise. Use c_readstr instead of
10036 builtin_memcpy_read_str. Add unit_mode temporary.
10037
10038 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10039
10040 PR middle-end/86528
10041 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10042 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10043
10044 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10045
10046 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10047 Alphabetize prototypes of built-in functions, separating out
10048 built-in functions that are listed in this section but should be
10049 described elsewhere.
10050
10051 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10052
10053 PR target/86511
10054 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10055 conditional move when trapping comparison was split to a
10056 non-trapping one (and vice versa).
10057
10058 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10059
10060 * config/s390/s390.c (s390_function_profiler): Generate nops
10061 instead of profiler call sequences.
10062 * config/s390/s390.opt: Add the new option.
10063
10064 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10065
10066 * config/s390/s390.c (s390_function_profiler): Generate
10067 __mcount_loc section.
10068 * config/s390/s390.opt: Add the new option.
10069
10070 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10071
10072 * common.opt: Add the new warning.
10073 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10074 %r0,__fentry__" when -mfentry is specified.
10075 (s390_option_override_internal): Disallow -mfentry for 31-bit
10076 CPUs.
10077 * config/s390/s390.opt: Add the new option.
10078
10079 2018-07-16 Richard Biener <rguenther@suse.de>
10080
10081 PR lto/86523
10082 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10083 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10084
10085 2018-07-16 Martin Liska <mliska@suse.cz>
10086
10087 PR ipa/86529
10088 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10089 to ::get_create.
10090
10091 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10092
10093 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10094
10095 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10096
10097 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10098 for ARCHS4x.
10099 * config/arc/arc-cpus.def (hs4x): New cpu.
10100 (hs4xd): Likewise.
10101 * config/arc/arc-tables.opt: Regenerate.
10102 * config/arc/arc.c (arc_sched_issue_rate): New function.
10103 (TARGET_SCHED_ISSUE_RATE): Define.
10104 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10105 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10106 fpu_cvt.
10107 (attr tune): Add ARCHS4x tune values.
10108 (attr tune_dspmpy): Define.
10109 (*tst): Correct instruction type.
10110 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10111 * config/arc/arcHS4x.md: New file.
10112 * config/arc/fpu.md: Update instruction type attributes.
10113 * config/arc/t-multilib: Regenerate.
10114
10115 2018-07-16 Tom de Vries <tdevries@suse.de>
10116
10117 PR debug/86455
10118 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10119
10120 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10121
10122 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10123 early clobber.
10124
10125 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10126
10127 PR tree-optimization/86514
10128 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10129 conversion to a boolean type from a type with greater precision.
10130
10131 2018-07-16 Tom de Vries <tdevries@suse.de>
10132
10133 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10134 dump_flags request TDF_SLIM.
10135
10136 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10137
10138 * fold-const.c (int_const_binop_1): Abstract...
10139 (wide_int_binop): ...wide int code here.
10140 (poly_int_binop): ...poly int code here.
10141 Abstract the rest of int_const_binop_1 into int_const_binop.
10142 * fold-const.h (wide_int_binop): New.
10143 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10144 Remove useless PLUS/MINUS_EXPR case.
10145 (zero_nonzero_bits_from_vr): Move wide int code...
10146 (zero_nonzero_bits_from_bounds): ...here.
10147 (extract_range_from_binary_expr_1): Move mask optimization code...
10148 (range_easy_mask_min_max): ...here.
10149 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10150 (range_easy_mask_min_max): New.
10151
10152 2018-07-15 Jeff Law <law@redhat.com>
10153
10154 PR target/85993
10155 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10156 block.
10157
10158 2018-07-14 Jim Wilson <jimw@sifive.com>
10159
10160 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10161
10162 2018-07-14 Paul Koning <ni1d@arrl.net>
10163
10164 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10165
10166 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10167
10168 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10169 copying section.
10170
10171 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10172 Steve Munroe <munroesj52@gmail.com>
10173
10174 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10175 (_mm_andnot_si128): Likewise.
10176 (_mm_or_si128): Likewise.
10177 (_mm_xor_si128): Likewise.
10178
10179 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10180
10181 PR middle-end/78809
10182 * builtins.c (expand_builtin_memcmp): Inline the calls first
10183 when result_eq is false.
10184 (expand_builtin_strcmp): Inline the calls first.
10185 (expand_builtin_strncmp): Likewise.
10186 (inline_string_cmp): New routine. Expand a string compare
10187 call by using a sequence of char comparison.
10188 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10189 a call to str(n)cmp/memcmp.
10190 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10191 New option.
10192 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10193
10194 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10195
10196 * config/arm/driver-arm.c: Include arm-native.h.
10197 (host_detect_local_cpu): Use auto-generated data tables.
10198 (vendors, arm_cpu_table): Delete. Move part information to ...
10199 * config/arm/arm-cpus.in: ... here.
10200 * config/arm/parsecpu.awk (gen_native): New function.
10201 (vendor, part): New CPU fields.
10202 (END): Add support for building the native CPU detection tables.
10203 * config/arm/t-arm (arm-native.h): Add build rule.
10204 (driver-arm.o): Add dependency on arm-native.h.
10205
10206 2018-07-13 Richard Biener <rguenther@suse.de>
10207
10208 PR middle-end/85974
10209 * match.pd (addr1 - addr2): Allow either of the operand to
10210 have a conversion.
10211
10212 2018-07-13 Tom de Vries <tdevries@suse.de>
10213
10214 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10215 in remap_ssa_name.
10216
10217 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10218
10219 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10220 arrays instead of numbered variables.
10221
10222 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10223
10224 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10225 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10226
10227 2018-07-13 Richard Biener <rguenther@suse.de>
10228
10229 PR debug/86452
10230 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10231 instead of get_context_die.
10232
10233 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10234 Richard Biener <rguenther@suse.de>
10235
10236 PR middle-end/86489
10237 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10238 that the loop latch destination where phi is defined.
10239
10240 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10241
10242 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10243 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10244 (riscv_set_current_function): Extract getting interrupt type to new
10245 function.
10246 (riscv_get_interrupt_type): New function.
10247 (riscv_merge_decl_attributes): New function, checking interrupt type is
10248 same.
10249 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10250
10251 2018-07-12 Paul Koning <ni1d@arrl.net>
10252
10253 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10254 directive.
10255
10256 2018-07-12 Paul Koning <ni1d@arrl.net>
10257
10258 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10259 zero reference, add doloop_end instead.
10260 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10261 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10262 detail for doloop_end.
10263
10264 2018-07-12 Martin Sebor <msebor@redhat.com>
10265
10266 PR c/86453
10267 * attribs.c (decl_attributes): Reject conflicting attributes before
10268 calling attribute handlers.
10269
10270 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10271
10272 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10273 parameter.
10274 (gcc::dump_manager::get_dump_file_name): likewise.
10275 (dump_begin): Likewise.
10276 * dumpfile.h (dump_begin): Update prototype.
10277 (gcc::dump_manager::get_dump_file_name,
10278 gcc::dump_manager::get_dump_file_name): Update prototype.
10279
10280 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10281
10282 * internal-fn.h (vectorizable_internal_fn_p): New function.
10283 * tree-vect-slp.c (compatible_calls_p): Likewise.
10284 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10285 to internal functions.
10286 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10287
10288 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10289
10290 * fold-const.h (inverse_conditions_p): Declare.
10291 * fold-const.c (inverse_conditions_p): New function.
10292 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10293 that test the inverse condition of a conditional internal function.
10294 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10295 * internal-fn.c (internal_fn_mask_index): Handle conditional
10296 internal functions.
10297 (vectorized_internal_fn_supported_p): New function.
10298 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10299 (any_pred_load_store): Replace with...
10300 (need_to_predicate): ...this new variable.
10301 (redundant_ssa_names): New variable.
10302 (ifcvt_can_use_mask_load_store): Move initial checks to...
10303 (ifcvt_can_predicate): ...this new function. Handle tree codes
10304 for which a conditional internal function exists.
10305 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10306 instead of ifcvt_can_use_mask_load_store. Update after variable
10307 name change.
10308 (predicate_load_or_store): New function, split out from
10309 predicate_mem_writes.
10310 (check_redundant_cond_expr): New function.
10311 (value_available_p): Likewise.
10312 (predicate_rhs_code): Likewise.
10313 (predicate_mem_writes): Rename to...
10314 (predicate_statements): ...this. Use predicate_load_or_store
10315 and predicate_rhs_code.
10316 (combine_blocks, tree_if_conversion): Update after above name changes.
10317 (ifcvt_local_dce): Handle redundant_ssa_names.
10318 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10319 general conditional functions.
10320 * tree-vect-stmts.c (vectorizable_call): Likewise.
10321
10322 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10323 Alan Hayward <alan.hayward@arm.com>
10324 David Sherwood <david.sherwood@arm.com>
10325
10326 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10327 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10328 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10329 plus and minus and convert them into IFN_COND_FMA-based sequences.
10330 (convert_mult_to_fma): Handle conditional plus and minus.
10331
10332 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10333
10334 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10335 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10336 (cond_fnms_optab): New optabs.
10337 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10338 internal functions.
10339 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10340 * internal-fn.h (get_conditional_internal_fn): Declare.
10341 (get_unconditional_internal_fn): Likewise.
10342 * internal-fn.c (cond_ternary_direct): New macro.
10343 (expand_cond_ternary_optab_fn): Likewise.
10344 (direct_cond_ternary_optab_supported_p): Likewise.
10345 (FOR_EACH_COND_FN_PAIR): Likewise.
10346 (get_conditional_internal_fn): New function.
10347 (get_unconditional_internal_fn): Likewise.
10348 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10349 (gimple_match_op::gimple_match_op): Add a new overload for 5
10350 operands.
10351 (gimple_match_op::set_op): Likewise.
10352 (gimple_resimplify5): Declare.
10353 * genmatch.c (decision_tree::gen): Generate simplifications for
10354 5 operands.
10355 * gimple-match-head.c (gimple_simplify): Define an overload for
10356 5 operands. Handle calls with 5 arguments in the top-level overload.
10357 (convert_conditional_op): Handle conversions from unconditional
10358 internal functions to conditional ones.
10359 (gimple_resimplify5): New function.
10360 (build_call_internal): Pass a fifth operand.
10361 (maybe_push_res_to_seq): Likewise.
10362 (try_conditional_simplification): Try converting conditional
10363 internal functions to unconditional internal functions.
10364 Handle 3-operand unconditional forms.
10365 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10366 Define ternary equivalents of the current rules for binary conditional
10367 internal functions.
10368 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10369 ternary operations.
10370 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10371 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10372 (optab): Handle them.
10373 (SVE_COND_FP_TERNARY): New int iterator.
10374 (sve_fmla_op, sve_fmad_op): New int attributes.
10375 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10376 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10377 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10378
10379 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10380
10381 * target.def (preferred_else_value): New target hook.
10382 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10383 * doc/tm.texi: Regenerate.
10384 * targhooks.h (default_preferred_else_value): Declare.
10385 * targhooks.c (default_preferred_else_value): New function.
10386 * internal-fn.h (conditional_internal_fn_code): Declare.
10387 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10388 (get_conditional_internal_fn): Use it.
10389 (conditional_internal_fn_code): New function.
10390 * gimple-match.h (gimple_match_cond): New struct.
10391 (gimple_match_op): Add a cond member function.
10392 (gimple_match_op::gimple_match_op): Update all forms to take a
10393 gimple_match_cond.
10394 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10395 for the suboperation, but don't specify a particular else_value.
10396 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10397 (visit_nary_op, visit_reference_op_load): Pass
10398 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10399 * gimple-match-head.c: Include tree-eh.h
10400 (convert_conditional_op): New function.
10401 (maybe_resimplify_conditional_op): Likewise.
10402 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10403 (gimple_resimplify2): Likewise.
10404 (gimple_resimplify3): Likewise.
10405 (gimple_resimplify4): Likewise.
10406 (maybe_push_res_to_seq): Return null for conditional operations.
10407 (try_conditional_simplification): New function.
10408 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10409 constructor.
10410 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10411 IFN_COND_* call.
10412 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10413 function.
10414 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10415
10416 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10417
10418 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10419 DECL_FCONTEXT
10420 (hash_tree): Do not hash DECL_FCONTEXT
10421 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10422 Do not stream DECL_FCONTEXT.
10423 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10424 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10425
10426 2018-07-12 Richard Biener <rguenther@suse.de>
10427
10428 PR debug/86462
10429 * dwarf2out.c (gen_block_die): Only output blocks when they have
10430 at least one !DECL_IGNORED_P variable.
10431
10432 2018-07-12 Richard Biener <rguenther@suse.de>
10433
10434 PR target/84829
10435 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10436 Remove -mieee-fp handling.
10437
10438 2018-07-12 Richard Biener <rguenther@suse.de>
10439
10440 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10441 left-over from last patch.
10442
10443 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10444
10445 PR tree-optimization/86492
10446 * gimple-ssa-store-merging.c
10447 (imm_store_chain_info::coalesce_immediate_stores): Call
10448 check_no_overlap even for the merge_overlapping case. Formatting fix.
10449
10450 2018-07-12 Richard Biener <rguenther@suse.de>
10451
10452 PR middle-end/86479
10453 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10454 move possibly trapping operations into the conditional.
10455
10456 2018-07-12 Richard Biener <rguenther@suse.de>
10457
10458 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10459 (vn_lookup_simplify_result): Remove recursion limit applied
10460 here.
10461 (vn_nary_build_or_lookup_1): Adjust.
10462 (try_to_simplify): Likewise.
10463 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10464 here.
10465 (gimple_resimplify2): Likewise.
10466 (gimple_resimplify3): Likewise.
10467 (gimple_resimplify4): Likewise.
10468
10469 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10470
10471 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10472 Use __mmask64 type instead of __mmask8 for __M argument.
10473 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10474 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10475 __U argument.
10476 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10477 __mmask16 for __M argument.
10478 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10479 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10480 to __mmask16 instead of __mmask8.
10481 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10482 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10483 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10484 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10485 instead of __mmask16 for __U argument.
10486 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10487 __mmask16 instead of __mmask8 for __U argument.
10488 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10489 __U argument.
10490 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10491 __mmask16.
10492 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10493 argument.
10494 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10495 __U argument.
10496 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10497 __mmask16.
10498 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10499 of __mmask16.
10500 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10501 __U argument.
10502 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10503 __U argument.
10504 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10505 __U argument.
10506 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10507 __U argument.
10508 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10509 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10510 return type as well as __M argument type and all casts from __mmask8
10511 to __mmask32.
10512 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10513 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10514 return type as well as __M argument type and all casts from __mmask8
10515 to __mmask16.
10516 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10517 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10518 return type as well as __M argument type and all casts from __mmask8
10519 to __mmask32.
10520 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10521 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10522 return type as well as __M argument type and all casts from __mmask8
10523 to __mmask16.
10524 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10525 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10526 __mmask16.
10527
10528 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10529
10530 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10531 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10532 for __U argument.
10533
10534 2018-07-11 Paul Koning <ni1d@arrl.net>
10535
10536 * doc/md.texi (define_subst): Document how multiple occurrences of
10537 the same argument in the replacement pattern are handled.
10538
10539 2018-07-11 Paul Koning <ni1d@arrl.net>
10540
10541 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10542 alphabetical order.
10543 (Common Type Attributes): Add "mode" attribute.
10544
10545 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10546
10547 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10548 stream DECL_ORIGINAL_TYPE.
10549 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10550 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10551 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10552 Do not walk original type.
10553 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10554 external decls.
10555 (write_ts_decl_non_common_tree_pointers): Do not stream
10556 DECL_ORIGINAL_TYPE
10557 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10558 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10559
10560 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10561
10562 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10563 thread twice from the same starting edge.
10564
10565 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10566
10567 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10568 * gimple.c (gimple_call_nonnull_result_p): ...here...
10569 (gimple_call_nonnull_arg): ...and here.
10570 * gimple.h (gimple_call_nonnull_result_p): New.
10571 (gimple_call_nonnull_arg): New.
10572
10573 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10574
10575 * config/arm/arm-cpus.in: Move information from fpu field of each
10576 cpu definition to the isa field.
10577 * config/arm/parsecpu.awk (fpu): Delete match rule.
10578 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10579
10580 2018-07-11 Richard Biener <rguenther@suse.de>
10581
10582 PR debug/86457
10583 * dwarf2out.c (init_sections_and_labels): Use
10584 output_asm_line_debug_info consistently.
10585 (dwarf2out_early_finish): Likewise.
10586 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10587 type units.
10588
10589 2018-07-11 Richard Biener <rguenther@suse.de>
10590
10591 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10592 Rework father_bb setting in a way to avoid propagating constants
10593 multiple times on a loop body.
10594
10595 2018-07-10 Mark Wielaard <mark@klomp.org>
10596
10597 PR debug/86459
10598 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10599
10600 2018-07-10 Richard Biener <rguenther@suse.de>
10601
10602 * hash-map.h (hash_map::iterator::operator*): Return
10603 references to key and value.
10604
10605 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10606
10607 PR c++/86443
10608 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10609 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10610 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10611 (gimplify_omp_for): For composite loops, move outer
10612 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10613 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10614 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10615 TREE_LIST for both the original class iterator and the "last" helper
10616 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10617 loop, remember has_decl_expr from outer composite loops for the
10618 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10619
10620 2018-07-09 Martin Sebor <msebor@redhat.com>
10621
10622 PR middle-end/77357
10623 PR middle-end/86428
10624 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10625 accessing implicitly initialized array elements.
10626 * expr.c (string_constant): Handle string initializers of
10627 character arrays within aggregates.
10628 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10629 Store element offset. As a special case, handle zero size.
10630 (fold_nonarray_ctor_reference): Same.
10631 (fold_ctor_reference): Add argument. Store subobject offset.
10632 * gimple-fold.h (fold_ctor_reference): Add argument.
10633
10634 2018-07-09 Paul Koning <ni1d@arrl.net>
10635
10636 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10637 (pdp11_insn_cost): New function.
10638 (pdp11_md_asm_adjust): New function.
10639 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10640 (pdp11_rtx_costs): Update to match machine better.
10641 (output_addr_const_pdp11): Correct format mismatch warnings.
10642 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10643 * config/pdp11/pdp11.md: General change to add base_cost and/or
10644 length attributes for use by new pdp11_insn_cost function.
10645 (MIN_BRANCH): Correct definition.
10646 (MIN_SOB): Ditto.
10647 (doloop_end): Use standard pattern name for looping pattern.
10648 (doloop_end_nocc): New.
10649 (movsf): Add another constraint alternative.
10650 (zero_extendqihi2): Add constraint alternatives for not in place
10651 extend.
10652 (zero_extendhisi2): Remove.
10653 (shift patterns): Add CC handling variants.
10654 (bswaphi2): New.
10655 (bswapsi2): New.
10656 (rothi3): New.
10657 (define_peephole2): New peephole to recognize mov that sets CC for
10658 subsequent test.
10659
10660 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10661
10662 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10663 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10664 wi::add.
10665
10666 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10667
10668 PR c/86420
10669 * real.c (real_nextafter): Return true if result is denormal.
10670
10671 2018-07-09 Martin Liska <mliska@suse.cz>
10672
10673 * common.opt: Add back wrongly removed attribute.
10674
10675 2018-07-09 Richard Biener <rguenther@suse.de>
10676
10677 PR debug/86413
10678 * dwarf2out.c (gen_block_die): For an early generated DIE
10679 always output high/low PC attributes.
10680
10681 2018-07-09 Tom de Vries <tdevries@suse.de>
10682
10683 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10684 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10685 onto VAR_DECL with abstract origin.
10686
10687 2018-07-07 Jim Wilson <jimw@sifive.com>
10688
10689 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10690
10691 2018-07-07 Tom de Vries <tdevries@suse.de>
10692
10693 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10694
10695 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10696
10697 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10698 overflow_type.
10699 (combine_bound): Use wide-int overflow calculation instead of
10700 rolling our own.
10701 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10702 overflow_type.
10703 * fold-const.c (int_const_binop_2): Same.
10704 (extract_muldiv_1): Same.
10705 (fold_div_compare): Same.
10706 (fold_abs_const): Same.
10707 * match.pd: Same.
10708 * poly-int.h (add): Same.
10709 (sub): Same.
10710 (neg): Same.
10711 (mul): Same.
10712 * predict.c (predict_iv_comparison): Same.
10713 * profile-count.c (slow_safe_scale_64bit): Same.
10714 * simplify-rtx.c (simplify_const_binary_operation): Same.
10715 * tree-chrec.c (tree_fold_binomial): Same.
10716 * tree-data-ref.c (split_constant_offset_1): Same.
10717 * tree-if-conv.c (idx_within_array_bound): Same.
10718 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10719 * tree-ssa-phiopt.c (minmax_replacement): Same.
10720 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10721 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10722 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10723 * wide-int.cc (wi::add_large): Same.
10724 (wi::mul_internal): Same.
10725 (wi::sub_large): Same.
10726 (wi::divmod_internal): Same.
10727 * wide-int.h: Change overflow type to overflow_type for neg, add,
10728 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10729 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10730 mul_internal, divmod_internal.
10731 (overflow_type): New enum.
10732 (accumulate_overflow): New.
10733
10734 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10735
10736 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10737 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10738
10739 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10740
10741 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10742 argument is checked for zero before entering loop, avoid checking again.
10743
10744 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10745
10746 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10747 * gimplify.h (generic_expr_could_trap_p): Likwise.
10748 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10749
10750 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10751
10752 PR tree-optimization/86401
10753 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10754 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10755 (fold_bit_and_mask): ... here. New helper function for match.pd.
10756 * fold-const.h (fold_bit_and_mask): Declare.
10757 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10758
10759 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10760
10761 PR target/86324
10762 * target.def (translate_mode_attribute): New hook.
10763 * targhooks.h (default_translate_mode_attribute): Declare.
10764 * targhooks.c (default_translate_mode_attribute): New function.
10765 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10766 * doc/tm.texi: Regenerate.
10767 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10768 (rs6000_translate_mode_attribute): New function.
10769
10770 2018-07-06 Paul Koning <ni1d@arrl.net>
10771
10772 * doc/md.texi (define_split): Document DONE and FAIL.
10773 (define_peephole2): Ditto.
10774
10775 2018-07-05 Jeff Law <law@redhat.com>
10776
10777 PR tree-optimization/86010
10778 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10779 both the head and tail of mem* and str* calls.
10780
10781 2018-07-05 Jim Wilson <jimw@sifive.com>
10782
10783 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10784
10785 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10786
10787 * config/aarch64/aarch64-simd.md: correct flags text for
10788 MIN_EXPR replacement.
10789
10790 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10791
10792 * configure: Regenerated.
10793
10794 2018-07-05 Carl Love <cel@us.ibm.com>
10795
10796 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10797 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10798 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10799 VSX_BUILTIN_DOUBLEL_V4SF.
10800
10801 2018-07-05 Martin Sebor <msebor@redhat.com>
10802
10803 PR c++/86400
10804 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10805 than its domain to compute its the upper bound of a char array.
10806
10807 2018-07-05 Nathan Sidwell <nathan@acm.org>
10808
10809 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10810 * doc/cpp.texi: Update comment.
10811 * doc/tm.texi: Rebuilt.
10812 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10813 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10814 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10815 headers affected by extern "C".
10816 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10817 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10818 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10819 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10820 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10821 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10822 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10823 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10824 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10825 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10826 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10827 config/sparc/sp64-elf.h, config/spu/spu.h,
10828 config/stormy16/stormy16.h, config/v850/v850.h,
10829 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10830 define NO_IMPLICIT_EXTERN_C.
10831 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10832
10833 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10834
10835 PR target/84711
10836 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10837 instead of GET_MODE_SIZE when comparing Units.
10838
10839 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10840
10841 PR target/84711
10842 * rtlanal.c (set_noop_p): Constrain on mode change,
10843 include hard-reg-set.h
10844
10845 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10846
10847 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10848
10849 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10850
10851 Revert
10852 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10853
10854 PR sanitizer/84250
10855 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10856 libasan.
10857 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10858
10859 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10860
10861 PR sanitizer/84250
10862 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10863 libasan.
10864 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10865
10866 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10867
10868 PR middle-end/86380
10869 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10870
10871 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10872
10873 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10874 neg_*_op* variables.
10875
10876 2018-07-04 Martin Liska <mliska@suse.cz>
10877
10878 * tree-switch-conversion.c: Define
10879 max_ratio_for_speed and max_ratio_for_size constants.
10880
10881 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10882 Martin Liska <mliska@suse.cz>
10883
10884 PR middle-end/66240
10885 PR target/45996
10886 PR c/84100
10887 * common.opt: Rename align options with 'str_' prefix.
10888 * common/config/i386/i386-common.c (set_malign_value): New
10889 function.
10890 (ix86_handle_option): Use it to set -falign-* options/
10891 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10892 type from int to string.
10893 * config/aarch64/aarch64.c: Update default values from int
10894 to string.
10895 * config/alpha/alpha.c (alpha_override_options_after_change):
10896 Likewise.
10897 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10898 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10899 max skip conditionally.
10900 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10901 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10902 max skip conditionally.
10903 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10904 max skip conditionally.
10905 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10906 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10907 max skip conditionally.
10908 * config/i386/i386.c (struct ptt): Change type from int to
10909 string.
10910 (ix86_default_align): Set default values.
10911 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10912 max skip conditionally.
10913 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10914 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10915 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10916 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10917 max skip conditionally.
10918 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10919 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10920 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10921 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10922 max skip conditionally.
10923 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10924 * config/ia64/ia64.c (ia64_option_override): Set default values
10925 for alignment options.
10926 * config/m68k/m68k.c: Handle new str_align_* options.
10927 * config/mips/mips.c (mips_set_compression_mode): Change
10928 type of constants.
10929 (mips_option_override): Set default values for options.
10930 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10931 Likewise.
10932 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10933 Likewise.
10934 * config/rx/rx.c (rx_option_override): Likewise.
10935 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10936 (LABEL_ALIGN): Use align_labels_log.
10937 (LOOP_ALIGN): Use align_loops_align.
10938 * config/s390/s390.c (s390_asm_output_function_label): Use new
10939 macros.
10940 * config/sh/sh.c (sh_override_options_after_change):
10941 Change type of constants.
10942 * config/spu/spu.c (spu_sched_init): Likewise.
10943 * config/sparc/sparc.c (sparc_option_override): Set default
10944 values for options.
10945 * config/visium/visium.c (visium_option_override): Likewise.
10946 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10947 emit p2align format with last argument if it's not needed.
10948 * doc/invoke.texi: Document extended format of -falign-*.
10949 * final.c: Use align_labels alignment.
10950 * flags.h (struct target_flag_state): Change type to use
10951 align_flags.
10952 (struct align_flags_tuple): New.
10953 (struct align_flags): Likewise.
10954 (align_loops_log): Redefine macro to use new types.
10955 (align_loops_max_skip): Redefine macro to use new types.
10956 (align_jumps_log): Redefine macro to use new types.
10957 (align_jumps_max_skip): Redefine macro to use new types.
10958 (align_labels_log): Redefine macro to use new types.
10959 (align_labels_max_skip): Redefine macro to use new types.
10960 (align_functions_log): Redefine macro to use new types.
10961 (align_loops): Redefine macro to use new types.
10962 (align_jumps): Redefine macro to use new types.
10963 (align_labels): Redefine macro to use new types.
10964 (align_functions): Redefine macro to use new types.
10965 (align_functions_max_skip): Redefine macro to use new types.
10966 (align_loops_value): New macro.
10967 (align_jumps_value): New macro.
10968 (align_labels_value): New macro.
10969 (align_functions_value): New macro.
10970 * function.c (invoke_set_current_function_hook): Propagate
10971 alignment values from flags to global variables default in
10972 topleev.h.
10973 * ipa-icf.c (sem_function::equals_wpa): Use
10974 cl_optimization_option_eq instead of memcmp.
10975 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10976 of string types.
10977 (cl_optimization_stream_in): Likewise.
10978 * optc-save-gen.awk: Support strings in cl_optimization.
10979 * opth-gen.awk: Likewise.
10980 * opts.c (finish_options): Remove error checking of invalid
10981 value ranges.
10982 (MAX_CODE_ALIGN): Remove.
10983 (MAX_CODE_ALIGN_VALUE): Likewise.
10984 (parse_and_check_align_values): New function.
10985 (check_alignment_argument): Likewise.
10986 (common_handle_option): Use check_alignment_argument.
10987 * opts.h (parse_and_check_align_values): Declare.
10988 * toplev.c (init_alignments): Remove.
10989 (read_log_maxskip): New.
10990 (parse_N_M): Likewise.
10991 (parse_alignment_opts): Likewise.
10992 (backend_init_target): Remove usage of init_alignments.
10993 * toplev.h (parse_alignment_opts): Declare.
10994 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10995 argument.
10996 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10997 * tree.c (cl_option_hasher::equal): New.
10998 * varasm.c: Use new global macros.
10999
11000 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11001
11002 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11003 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11004 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11005 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11006 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11007 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11008 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11009 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11010 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11011 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11012 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11013 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11014 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11015
11016 2018-07-04 Martin Liska <mliska@suse.cz>
11017 Jonathan Wakely <jwakely@redhat.com>
11018
11019 * coverage.c: Use correct type.
11020 * doc/invoke.texi: Language correction.
11021
11022 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11023
11024 PR target/85620
11025 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11026 ENDBRANCH for non-tail call which may return via indirect branch.
11027 * doc/extend.texi: Document indirect_return attribute.
11028
11029 2018-07-03 Martin Sebor <msebor@redhat.com>
11030
11031 PR tree-optimization/86274
11032 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11033 precondition.
11034 (format_floating): Correct handling of infinities and NaNs.
11035
11036 2018-07-03 Martin Sebor <msebor@redhat.com>
11037
11038 * print-tree.c (print_real_cst): New function.
11039 (print_node_brief): Call it.
11040 (print_node): Ditto.
11041
11042 2018-07-03 Jeff Law <law@redhat.com>
11043
11044 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11045 into a single pattern.
11046
11047 * config/h8300/h8300.md (ors code_iterator): New.
11048 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11049 a single pattern and single splitter.
11050 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11051 (iorqi3_1, xorqi3_1): Likewise.
11052 (iorqi3, xorqi3 expanders): Similarly.
11053
11054 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11055 (movmd_internal) into a single pattern using the P mode iterator.
11056 (movmd splitters): Similarly.
11057 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11058 (movsd splitters): Similarly.
11059
11060 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11061 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11062 right table based on the size of the operand.
11063 * config/h8300/h8300.md (length_table): Corresponding changes. All
11064 references to "addb", "addw" and "addl" changed to "add".
11065 (btst patterns): Merge two variants into a single pattern.
11066 (tstqi, tsthi): Likewise.
11067 (addhi3_incdec, addsi3_incdec): Likewise.
11068 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11069 (mulhi3, mulsi3): Likewise.
11070 (udivhi3, udivsi3): Likewise.
11071 (divhi3, divsi3): Likewise.
11072 (andorqi3, andorhi3, andorsi3): Likewise.
11073
11074 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11075
11076 PR target/85694
11077 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11078 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11079
11080 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11081
11082 PR tree-optimization/85694
11083 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11084 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11085 UNSPEC_URHADD.
11086 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11087 (<u>avg<mode>3_ceil): New patterns.
11088
11089 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11090
11091 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11092 scan-tree-dump directive.
11093 * gcc.dg/vect/slp-perm-2.c: Likewise.
11094 * gcc.dg/vect/slp-perm-3.c: Likewise.
11095 * gcc.dg/vect/slp-perm-5.c: Likewise.
11096 * gcc.dg/vect/slp-perm-6.c: Likewise.
11097 * gcc.dg/vect/slp-perm-7.c: Likewise.
11098 * gcc.dg/vect/slp-perm-8.c: Likewise.
11099
11100 2018-07-03 Marek Polacek <polacek@redhat.com>
11101
11102 PR middle-end/86202
11103 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11104
11105 2018-07-03 Richard Biener <rguenther@suse.de>
11106
11107 PR ipa/86389
11108 * tree-ssa-structalias.c (find_func_clobbers): Properly
11109 handle indirect calls.
11110
11111 2018-07-03 Jeff Law <law@redhat.com>
11112
11113 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11114 (shifts): New code iterator.
11115 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11116 expander. Fix HImode handling on H8/SX.
11117 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11118 (subqi3, subhi3, subsi3 expanders): Likewise.
11119 (andqi3, andhi3, andsi3 expanders): Likewise.
11120 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11121 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11122 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11123 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11124 (zero_extendqihi2, zero_extendqisi2): Likewise.
11125 (extendqihi2, extendqisi2): Likewise.
11126 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11127 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11128 (rotlqi3_1, rotlhi3_1): Likewise.
11129 (logicalhi3_sn, logicalsi3_sn): Likewise.
11130 (logicalhi3, logicalsi3): Likewise.
11131
11132 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11133
11134 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11135 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11136 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11137 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11138 type to append_pattern_def_seq instead of creating a stmt_vec_info
11139 directly.
11140 (build_mask_conversion): Likewise. Remove vinfo argument.
11141 (vect_add_conversion_to_patterm): Likewise, renaming to...
11142 (vect_add_conversion_to_pattern): ...this.
11143 (vect_recog_mask_conversion_pattern): Update call to
11144 build_mask_conversion. Pass the vector type to
11145 append_pattern_def_seq here too.
11146 (vect_recog_gather_scatter_pattern): Update call to
11147 vect_add_conversion_to_pattern.
11148
11149 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11150
11151 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11152 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11153 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11154 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11155 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11156 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11157 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11158 append_pattern_def_seq instead of new_pattern_def_seq.
11159 (vect_recog_divmod_pattern): Do both of the above.
11160 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11161 is null.
11162
11163 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11164
11165 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11166 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11167 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11168 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11169 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11170 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11171 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11172 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11173 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11174 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11175 parameter with a single stmt_vec_info.
11176 (vect_recog_func_ptr): Likewise.
11177 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11178 (vect_try_gather_scatter_pattern): ...this.
11179 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11180 the stmt_vec_info of the statement to be matched. Don't clear
11181 STMT_VINFO_RELATED_STMT.
11182 (vect_pattern_recog): Update call accordingly.
11183
11184 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11185
11186 PR tree-optimization/85694
11187 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11188 (uavgM3_ceil): Document new optabs.
11189 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11190 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11191 functions.
11192 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11193 (savg_ceil_optab): New optabs.
11194 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11195 (vect_vect_recog_func_ptrs): Add it.
11196 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11197 constant directly from the associated lhs.
11198
11199 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11200
11201 * tree-vect-patterns.c (vect_split_statement): New function.
11202 (vect_convert_input): Use it to try to split an existing cast.
11203
11204 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11205
11206 * poly-int.h (print_hex): New function.
11207 * dumpfile.h (dump_dec, dump_hex): Declare.
11208 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11209 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11210 min_input_precision, operation_precision and operation_sign.
11211 * tree-vect-patterns.c (vect_get_range_info): New function.
11212 (vect_same_loop_or_bb_p, vect_single_imm_use)
11213 (vect_operation_fits_smaller_type): Delete.
11214 (vect_look_through_possible_promotion): Add an optional
11215 single_use_p parameter.
11216 (vect_recog_over_widening_pattern): Rewrite to use new
11217 stmt_vec_info infomration. Handle one operation at a time.
11218 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11219 (vect_truncatable_operation_p, vect_set_operation_type)
11220 (vect_set_min_input_precision): New functions.
11221 (vect_determine_min_output_precision_1): Likewise.
11222 (vect_determine_min_output_precision): Likewise.
11223 (vect_determine_precisions_from_range): Likewise.
11224 (vect_determine_precisions_from_users): Likewise.
11225 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11226 (vect_vect_recog_func_ptrs): Put over_widening first.
11227 Add cast_forwprop.
11228 (vect_pattern_recog): Call vect_determine_precisions.
11229
11230 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11231
11232 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11233 statements that have been replaced by further pattern statements.
11234 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11235
11236 2018-07-03 Richard Biener <rguenther@suse.de>
11237
11238 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11239 always set *dt. Dump vectype in vectype overload.
11240 * dumpfile.h (dump_gimple_expr): New function.
11241 (dump_gimple_expr_loc): Likewise.
11242 * dumpfile.c (dump_gimple_expr): New function.
11243 (dump_gimple_expr_loc): Likewise.
11244
11245 2018-07-02 Jeff Law <law@redhat.com>
11246
11247 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11248 the H8/300, H8/300H and H8/S variants into a single pattern.
11249 (movhi_h8300, movqi_h8300hs): Similarly.
11250 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11251 (QHI mode iterator): New.
11252
11253 * config/h8300/h8300.md: Remove trailing whitespace.
11254
11255 2018-07-02 Jim Wilson <jimw@sifive.com>
11256
11257 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11258 instead of emit_insn for interrupt returns.
11259 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11260 (riscv_sret, riscv_uret): Likewise.
11261
11262 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11263
11264 * pretty-print.c (selftest::test_pp_format): Move save and restore
11265 of quotes to class auto_fix_quotes, and add an instance.
11266 * selftest.c: Include "intl.h".
11267 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11268 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11269 * selftest.h (selftest::auto_fix_quotes): New class.
11270
11271 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11272
11273 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11274 (aarch64_sve_prepare_conditional_op): Remove.
11275 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11276 Allow aarch64_simd_reg_or_zero as select operand; remove
11277 the aarch64_sve_prepare_conditional_op call.
11278 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11279 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11280 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11281 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11282 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11283 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11284 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11285 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11286 and a splitters to match all of the *_any patterns.
11287 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11288
11289 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11290 (SVE_COND_FP_BINARY_REV): Remove.
11291 (sve_int_op_rev, sve_fp_op_rev): New.
11292 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11293 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11294 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11295 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11296 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11297 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11298 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11299 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11300 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11301
11302 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11303 Remove match_dup 1 from the inner unspec.
11304 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11305
11306 * config/aarch64/aarch64.md (movprfx): New attr.
11307 (length): Default movprfx to 8.
11308 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11309 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11310 (*<su>mul<SVE_I>3_highpart): Likewise.
11311 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11312 (*v<ASHIFT><SVE_I>3): Likewise.
11313 (*<su><MAXMIN><SVE_I>3): Likewise.
11314 (*<su><MAXMIN><SVE_F>3): Likewise.
11315 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11316 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11317 (*div<SVE_F>4): Likewise.
11318
11319 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11320
11321 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11322 in dump string.
11323
11324 2018-07-02 Richard Biener <rguenther@suse.de>
11325
11326 PR tree-optimization/86363
11327 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11328 memset argument refers to a non-variable address.
11329
11330 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11331
11332 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11333 {PLUS,MINUS}_EXPR code to...
11334 (adjust_symbolic_bound): ...here,
11335 (combine_bound): ...here,
11336 (set_value_range_with_overflow): ...and here.
11337
11338 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11339
11340 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11341 code...
11342 (extract_range_from_abs_expr): ...here.
11343
11344 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11345
11346 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11347 -fno-omit-frame-pointer when not optimizing.
11348
11349 2018-07-02 Martin Liska <mliska@suse.cz>
11350
11351 PR ipa/86279
11352 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11353 (propagate_nothrow): Likewise.
11354
11355 2018-07-02 Martin Liska <mliska@suse.cz>
11356
11357 PR ipa/86323
11358 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11359
11360 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11361
11362 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11363 function in r262149, changing "loc" param from source_location to
11364 const dump_location_t &.
11365 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11366 declaration, as above.
11367
11368 2018-07-01 Paul Koning <ni1d@arrl.net>
11369
11370 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11371 -munit-asm, -mgnu-asm, -mdec-asm.
11372 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11373 (pdp11_output_labelref): New.
11374 (pdp11_output_def): New.
11375 (pdp11_output_addr_vec_elt): New.
11376 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11377 %# and %@ format codes.
11378 (pdp11_option_override): New.
11379 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11380 (pdp11_output_ident): New.
11381 (pdp11_asm_named_section): New.
11382 (pdp11_asm_init_sections): New.
11383 (pdp11_file_start): New.
11384 (pdp11_file_end): New.
11385 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11386 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11387 %o, like %c but octal.
11388 (pdp11_option_override): New.
11389 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11390 -mdec-asm.
11391 (DATA_SECTION_ASM_OP): Ditto.
11392 (READONLY_DATA_SECTION_ASM_OP): New.
11393 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11394 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11395 (ASM_OUTPUT_LABELREF): Ditto.
11396 (ASM_OUTPUT_DEF): Ditto.
11397 (ASM_OUTPUT_EXTERNAL): New.
11398 (ASM_OUTPUT_SOURCE_FILENAME): New.
11399 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11400 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11401 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11402 %# and %@ format codes.
11403 * config/pdp11/pdp11.opt (mgnu-asm): New.
11404 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11405 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11406 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11407
11408 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11409
11410 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11411 dereferencing path[] beyond its length.
11412 (debug_path): New.
11413 (debug_all_paths): New.
11414 (rewire_first_differing_edge): New.
11415 (adjust_paths_after_duplication): New.
11416 (duplicate_thread_path): Call adjust_paths_after_duplication.
11417 Add new argument.
11418 (thread_through_all_blocks): Add new argument to
11419 duplicate_thread_path.
11420
11421 2018-06-30 Jim Wilson <jimw@sifive.com>
11422
11423 * config/riscv/predicates.md (p2m1_shift_operand): New.
11424 (high_mask_shift_operand): New.
11425 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11426 pattern using p2m1_shift_operand.
11427 (lshsi3_zero_extend_3+2): New combiner pattern using
11428 high_mask_shift_operand.
11429
11430 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11431
11432 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11433 split out from...
11434 (vect_recog_rotate_pattern): ...here.
11435 (vect_convert_input): Try to insert casts of invariants in the
11436 preheader.
11437 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11438 preheader to be empty.
11439
11440 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11441
11442 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11443 vector type. If given, install it in the new statement's
11444 STMT_VINFO_VECTYPE.
11445 (vect_element_precision): New function.
11446 (vect_unpromoted_value): New struct.
11447 (vect_unpromoted_value::vect_unpromoted_value): New function.
11448 (vect_unpromoted_value::set_op): Likewise.
11449 (vect_look_through_possible_promotion): Likewise.
11450 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11451 (vect_widened_op_tree, vect_convert_input): Likewise.
11452 (vect_convert_inputs, vect_convert_output): Likewise.
11453 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11454 to handle the optional cast of the multiplication result and
11455 vect_widened_op_tree to detect the widened multiplication itself.
11456 Do not require the input and output of promotion casts to have
11457 the same sign, but base the signedness of the operation on the
11458 input rather than the result. If the pattern includes two
11459 promotions, check that those promotions have the same sign.
11460 Do not restrict the MULT_EXPR handling to a double-width result;
11461 handle quadruple-width results and wider. Use vect_convert_inputs
11462 to convert the inputs to the common type.
11463 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11464 to handle the optional cast of the ABS result. Also allow a sign
11465 change or a sign extension between the ABS and MINUS.
11466 Use vect_widened_op_tree to detect the widened subtraction and use
11467 vect_convert_inputs to convert the inputs to the common type.
11468 (vect_handle_widen_op_by_const): Delete.
11469 (vect_recog_widen_op_pattern): New function.
11470 (vect_recog_widen_mult_pattern): Use it.
11471 (vect_recog_widen_shift_pattern): Likewise.
11472 (vect_recog_widen_sum_pattern): Use
11473 vect_look_through_possible_promotion to handle the promoted
11474 PLUS_EXPR operand.
11475
11476 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11477
11478 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11479 the containing gimple_seq *.
11480 * gimple-iterator.h (gsi_for_stmt): Declare it.
11481 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11482 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11483 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11484 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11485 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11486 checks.
11487 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11488 split out from...
11489 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11490 statement being replaced is part of an existing pattern
11491 definition sequence, inserting the new pattern statements before
11492 the original one.
11493 (vect_pattern_recog_1): Don't return a bool. If the statement
11494 is already part of a pattern, instead apply pattern matching
11495 to the pattern definition statements. Don't clear the
11496 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11497 (vect_pattern_recog): Don't break after the first match;
11498 continue processing the pattern definition statements instead.
11499 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11500
11501 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11502
11503 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11504 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11505 (vect_recog_widen_sum_pattern): Use it.
11506
11507 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11508
11509 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11510 phi is not a pattern statement and has not been replaced by
11511 a pattern statement.
11512 * tree-vect-patterns.c (type_conversion_p): Don't check
11513 STMT_VINFO_IN_PATTERN_P.
11514 (vect_recog_vector_vector_shift_pattern): Likewise.
11515 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11516 the pattern statement rather than the original statement; check
11517 directly for a WIDEN_MULT_EXPR here.
11518 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11519 vect_is_simple_use to return the pattern statement rather
11520 than the original statement; use is_pattern_stmt_p to check
11521 for such a pattern statement.
11522 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11523 to return the pattern statement rather than the original statement;
11524 don't do the same transformation here.
11525 (vect_is_simple_use): If the defining statement has been replaced
11526 by a pattern statement, return the pattern statement instead.
11527 Remove the corresponding (local) transformation from the vectype
11528 overload.
11529
11530 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11531
11532 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11533 end and default to null.
11534 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11535 (vectorizable_reduction): Update calls accordingly, dropping the
11536 gimple ** argument if the passed-back statement isn't needed.
11537 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11538 (vect_recog_rotate_pattern): Likewise.
11539 (vect_recog_mask_conversion_pattern): Likewise.
11540 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11541 (vect_mask_constant_operand_p): Likewise.
11542 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11543 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11544 (get_group_load_store_type, get_load_store_type): Likewise.
11545 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11546 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11547 (vectorizable_conversion, vectorizable_assignment): Likewise.
11548 (vectorizable_shift, vectorizable_operation): Likewise.
11549 (vectorizable_store, vect_is_simple_cond): Likewise.
11550 (vectorizable_condition, vectorizable_comparison): Likewise.
11551 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11552 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11553 and move it to the end. Cope with null def_stmt_outs.
11554
11555 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11556
11557 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11558
11559 2018-06-29 Jeff Law <law@redhat.com>
11560
11561 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11562 displacements for TARGET_V850E2V3 and newer.
11563 (TARGET_LRA_P): Remove. Defaults to LRA now.
11564 * config/v850/v850.md (sign23byte_load): Remove.
11565 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11566 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11567
11568 2018-06-29 Martin Liska <mliska@suse.cz>
11569
11570 PR lto/85759
11571 * coverage.c (coverage_init): Mangle full path name.
11572 * doc/invoke.texi: Document the change.
11573 * gcov-io.c (mangle_path): New.
11574 * gcov-io.h (mangle_path): Likewise.
11575 * gcov.c (mangle_name): Use mangle_path for path mangling.
11576
11577 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11578
11579 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11580 if starting source register is not even.
11581
11582 2018-06-29 Martin Liska <mliska@suse.cz>
11583
11584 PR tree-optimization/86263
11585 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11586 Make edge redirection.
11587
11588 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11589
11590 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11591 (dump_scope_depth): New variable.
11592 (get_dump_scope_depth): New function.
11593 (dump_begin_scope): New function.
11594 (dump_end_scope): New function.
11595 * dumpfile.h (get_dump_scope_depth): New declaration.
11596 (dump_begin_scope): New declaration.
11597 (dump_end_scope): New declaration.
11598 (class auto_dump_scope): New class.
11599 (AUTO_DUMP_SCOPE): New macro.
11600 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11601 AUTO_DUMP_SCOPE.
11602
11603 2018-06-29 Richard Biener <rguenther@suse.de>
11604
11605 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11606 compute_all_dependences succeeds.
11607 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11608 exceed --param loop-max-datarefs-for-datadeps.
11609
11610 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11611
11612 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11613
11614 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11615
11616 PR target/86348
11617 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11618 alternative 0 in preferred_for_speed attribute.
11619
11620 2018-06-28 Paul Koning <ni1d@arrl.net>
11621
11622 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11623 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11624 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11625 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11626 for shift insn patterns.
11627
11628 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11629
11630 * cgraph.c (cgraph_node::get_body): Replace assignments to
11631 "dump_file" with calls to set_dump_file.
11632 * dumpfile.c (alt_dump_file): Make static, and group with...
11633 (alt_flags): ...this definition.
11634 (dumps_are_enabled): New variable.
11635 (refresh_dumps_are_enabled): New function.
11636 (set_dump_file): New function.
11637 (set_alt_dump_file): New function.
11638 (gcc::dump_manager::dump_start): Replace assignments to
11639 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11640 set_alt_dump_file.
11641 (gcc::dump_manager::dump_finish): Likewise.
11642 * dumpfile.h (alt_dump_file): Delete decl.
11643 (dumps_are_enabled): New variable decl.
11644 (set_dump_file): New function decl.
11645 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11646 global.
11647 * tree-nested.c (lower_nested_functions): Replace assignments to
11648 "dump_file" with calls to set_dump_file.
11649
11650 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11651
11652 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11653 goto_locus of each outgoing edge of each basic block.
11654
11655 2018-06-28 Richard Biener <rguenther@suse.de>
11656
11657 * dwarf2out.c (decl_scope_table): Remove.
11658 (push_decl_scope): Likewise.
11659 (pop_decl_scope): Likewise.
11660 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11661 (gen_struct_or_union_type_die): Likewise.
11662 (gen_tagged_type_die): Likewise.
11663 (dwarf2out_init): Do not initialize decl_scope_table.
11664 (dwarf2out_c_finalize): Do not free it.
11665
11666 2018-06-28 Richard Biener <rguenther@suse.de>
11667
11668 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11669 deciding whether to not re-use a DIE.
11670
11671 2018-06-28 Richard Biener <rguenther@suse.de>
11672
11673 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11674 DW_AT_abstract_origin attribute.
11675
11676 2018-06-28 Martin Liska <mliska@suse.cz>
11677
11678 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11679 Use newly introduced constants.
11680 * tree-switch-conversion.h (struct jump_table_cluster):
11681 Define max_ratio_for_size and max_ratio_for_speed.
11682
11683 2018-06-28 Martin Liska <mliska@suse.cz>
11684
11685 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11686 Add new checking assert to catch invalid state.
11687 (jump_table_cluster::can_be_handled): Handle single case
11688 clusters.
11689 (jump_table_cluster::is_beneficial): Bail out for such case.
11690 (bit_test_cluster::find_bit_tests):
11691 Add new checking assert to catch invalid state.
11692 (bit_test_cluster::can_be_handled): Handle single case
11693 clusters.
11694 (bit_test_cluster::is_beneficial): Bail out for such case.
11695 (switch_decision_tree::analyze_switch_statement):
11696 Fix comment.
11697
11698 2018-06-28 Martin Liska <mliska@suse.cz>
11699
11700 * common.opt: Introduce -completion option.
11701 * gcc.c (driver_handle_option): Handle it.
11702 (driver::main): Print completions if completion
11703 is set.
11704 * opt-suggestions.c (option_proposer::get_completions):
11705 New function.
11706 (option_proposer::suggest_completion): Likewise.
11707 (option_proposer::find_param_completions): Likewise.
11708 (verify_autocompletions): Likewise.
11709 (test_completion_valid_options): Likewise.
11710 (test_completion_valid_params): Likewise.
11711 (in_completion_p): Likewise.
11712 (empty_completion_p): Likewise.
11713 (test_completion_partial_match): Likewise.
11714 (test_completion_garbage): Likewise.
11715 (opt_proposer_c_tests): Likewise.
11716 * opt-suggestions.h: Declare new functions.
11717 * opts.c (common_handle_option): Handle OPT__completion_.
11718 * selftest-run-tests.c (selftest::run_tests): Add
11719 opt_proposer_c_tests.
11720 * selftest.c (assert_str_startswith): New.
11721 * selftest.h (assert_str_startswith): Likewise.
11722 (opt_proposer_c_tests): New.
11723 (ASSERT_STR_STARTSWITH): Likewise.
11724
11725 2018-06-28 Martin Liska <mliska@suse.cz>
11726
11727 * Makefile.in: Add opt-suggestions.o.
11728 * gcc-main.c: Include opt-suggestions.h.
11729 * gcc.c (driver::driver): Likewise.
11730 (driver::~driver): Remove m_option_suggestions.
11731 (driver::build_option_suggestions): Moved to option_proposer.
11732 (driver::suggest_option): Likewise.
11733 (driver::handle_unrecognized_options): Use option_proposer.
11734 * gcc.h (class driver): Add new memver m_option_proposer.
11735 * opt-suggestions.c: New file.
11736 * opt-suggestions.h: New file.
11737
11738 2018-06-28 Martin Liska <mliska@suse.cz>
11739
11740 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11741 (auto_string_vec::~auto_string_vec): Likewise.
11742
11743 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11744
11745 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11746 prevent_decl_creation_for_types fields up and add reset_location field.
11747 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11748 statement if id->reset_location is true.
11749 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11750 id->reset_location is true.
11751 (copy_phis_for_bb): Force input_location on the arguments if
11752 id->reset_location is true.
11753 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11754 is set on the function to be inlined.
11755
11756 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11757
11758 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11759
11760 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11761
11762 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11763 registers for Pmode.
11764 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11765 hard registers for the clobbered pseudo.
11766
11767 2018-06-27 Paul Koning <ni1d@arrl.net>
11768
11769 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11770 mutually exclusive options.
11771 * config/pdp11/constraints.md (h): New constraint.
11772 (O): Update definition to match shift code generation.
11773 (D): New constraint.
11774 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11775 (CCFP): Remove.
11776 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11777 function.
11778 (output_jump): Change arguments.
11779 (pdp11_fixed_cc_regs): New function.
11780 (pdp11_cc_mode): Ditto.
11781 (pdp11_expand_shift): Ditto.
11782 (pdp11_assemble_shift): Ditto.
11783 (pdp11_small_shift): Ditto.
11784 (pdp11_branch_cost): Remove.
11785 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11786 from output.
11787 (pdp11_register_move_cost): Update for CC registers.
11788 (pdp11_rtx_costs): Add case for LSHIFTRT.
11789 (pdp11_output_jump): Add CCNZ mode conditional branches.
11790 (notice_update_cc_on_set): Remove.
11791 (pdp11_cc_mode): New function.
11792 (simple_memory_operand): Correct pre/post decrement case.
11793 (no_side_effect_operand): New function.
11794 (pdp11_regno_reg_class): Add CC_REGS class.
11795 (pdp11_fixed_cc_regs): New function.
11796 (pdp11_small_shift): New function.
11797 (pdp11_expand_shift): New function to expand shift insns.
11798 (pdp11_assemble_shift): New function to output shifts.
11799 (pdp11_branch_cost): Remove.
11800 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11801 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11802 (WCHAR_TYPE): Ditto.
11803 (PTRDIFF_TYPE): Ditto.
11804 (ADJUST_INSN_LENGTH): New macro.
11805 (FIXED_REGISTERS): Add CC registers.
11806 (CALL_USED_REGISTERS): Ditto.
11807 (reg_class): Ditto.
11808 (REG_CLASS_NAMES): Ditto.
11809 (REG_CLASS_CONTENTS): Ditto.
11810 (SELECT_CC_MODE): Use new function.
11811 (TARGET_FLAGS_REGNUM): New macro.
11812 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11813 (cc0_reg_rtx): Remove.
11814 (CC_STATUS_MDEP): Remove.
11815 (CC_STATUS_MDEFP_INIT): Remove.
11816 (CC_IN_FPU): Remove.
11817 (NOTICE_UPDATE_CC): Remove.
11818 (REGISTER_NAMES): Add CC registers.
11819 (BRANCH_COST): Change to constant 1.
11820 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11821 handling.
11822 * config/pdp11/pdp11.opt (mbcopy): Remove.
11823 (mbcopy-builtin): Remove.
11824 (mbranch-cheap): Remove.
11825 (mbranch-expensive): Remove.
11826 * config/pdp11/predicates.md (expand_shift_operand): Update to
11827 match shift code generation.
11828 (ccnz_operator): New predicate.
11829 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11830 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11831 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11832 exclusive options.
11833 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11834 description of O constraint.
11835
11836 2018-06-27 Jeff Law <law@redhat.com>
11837 Austin Law <austinklaw@gmail.com>
11838
11839 * config/v850/v850.md (addsi3_set_flags): New pattern.
11840 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11841 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11842 (zero_extendhisi2_v850_set_flags): Likewise.
11843 (zero_extendqisi2_v850_set_flags): Likewise.
11844 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11845 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11846 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11847
11848 * config/v850/v850-protos.h (notice_update_cc): Remove.
11849 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11850 (v850_print_operand): Handle 'D' and "d".
11851 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11852 Add handling of arithmetic/logical operations compared against zero.
11853 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11854 Do not look at v850_compare_op, instead get mode from last argument.
11855 (v850_gen_compare): Remove
11856 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11857 after reload for prologue insns.
11858 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11859 patterns.
11860 (construct_save_jarl): Likewise.
11861 (TARGET_FLAGS_REGNUM): Define.
11862 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11863 (NOTICE_UPDATE_CC): Remove.
11864 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11865 than cc0. Conditionalize on reload_completed.
11866 (cmpsi_insn, setfcc_insn): Likewise.
11867 (tst1 splitter): Turn into define_and_split which sets the flags
11868 after reload.
11869 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11870 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11871 (cstoresf4, cstoredf4): Clobber the flags.
11872 (cmpsi, cmpsf, cmpdf): Remove expanders.
11873 (setf_insn): Remove pattern.
11874 (addsi3): Turn into define_and_split which clobbers the flags after
11875 reload and a suitable pattern (addsi3_clobber_flags) for use after
11876 reload.
11877 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11878 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11879 (ashrsi3, ashrsi3_v850e2): Likewise.
11880 (bins): Clobber the flags.
11881 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11882 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11883 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11884 (call_value_internal_short, call_value_internal_long): Likewise.
11885 (callt_save_interrupt, callt_return_interrupt): Likewise.
11886 (save_interrupt, return_interrupt): Likewise.
11887 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11888 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11889 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11890 (All FP comparisons): Only allow after reload has completed.
11891 (trfsr): Likewise.
11892 (divh, divhu): Tweak output template.
11893 (branch_z_normal, branch_z_invert): Remove
11894 (branch_nz_normal, branch_nz_invert): Likewise.
11895 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11896
11897 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11898 * config/v850/v850.c (notice_update_cc): Remove.
11899 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11900 (CC_NO_CARRY): Likewise.
11901 (NOTICE_UPDATE_CC): Define to nothing.
11902 * config/v850/v850.md: Remove block comment on cc0 handling
11903 Remove "cc" attribute from all patterns. Remove cc_status handling
11904 from all patterns. Minor formatting fixes.
11905
11906 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11907
11908 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11909 (cortex-a76.cortex-a55): Likewise.
11910 * config/aarch64/aarch64-tune.md: Regenerate.
11911 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11912 cortex-a76.cortex-a55.
11913
11914 2018-06-27 Jeff Law <law@redhat.com>
11915
11916 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11917 (MULTILIB_DIRNAMES): Similarly.
11918
11919 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11920
11921 * gimple.h (gimple_return_retbnd): Delete.
11922 (gimple_return_set_retbnd): Likewise.
11923 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11924 gimple_return_set_retbnd.
11925 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11926 gimple_return_retbnd and adjust.
11927 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11928 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11929 Explicitly return NULL in a couple more cases. Move assertion
11930 on debug statements and remove unreachable code.
11931 (reset_debug_binding): Do not test id->retbnd.
11932 (expand_call_inline): Do not set it.
11933
11934 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11935
11936 * configure.ac: Add --disable-gcov option.
11937 * configure: Regenerate.
11938 * Makefile.in: Honour @enable_gcov@.
11939 * doc/install.texi: Document --disable-gcov.
11940
11941 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11942
11943 * config/arm/arm-cpus.in (cortex-a76): New entry.
11944 (cortex-a76.cortex-a55): Likewise.
11945 * config/arm/arm-tables.opt: Regenerate.
11946 * config/arm/arm-tune.md: Likewise.
11947 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11948 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11949 cortex-a76.cortex-a55.
11950
11951 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11952
11953 PR target/85769
11954 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11955
11956 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11957
11958 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11959 comment.
11960 (EPILOGUE_USES): Likewise.
11961
11962 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11963
11964 * tree-inline.c (remap_location): New function extracted from...
11965 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11966 (copy_phis_for_bb): ...here. Call remap_location.
11967 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11968
11969 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11970
11971 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11972 unaligned vsx for 16B memset.
11973
11974 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11975
11976 PR target/86285
11977 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11978 ieee128_float_type_node to long_double_type_node unless
11979 TARGET_LONG_DOUBLE_128 is set.
11980
11981 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11982
11983 * cfgloop.c (get_loop_location): Convert return type from
11984 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11985 by implicit construction from rtx_insn *, and using
11986 dump_user_location_t::from_function_decl for the fallback case.
11987 * cfgloop.h (get_loop_location): Convert return type from
11988 location_t to dump_user_location_t.
11989 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11990 dump_printf_loc to pass in a dump_location_t rather than a
11991 location_t, via the gimple stmt.
11992 * coverage.c (get_coverage_counts): Update calls to
11993 dump_printf_loc to pass in dump_location_t rather than a
11994 location_t.
11995 * doc/optinfo.texi (Dump types): Convert example of
11996 dump_printf_loc from taking "locus" to taking "insn". Update
11997 description of the "_loc" calls to cover dump_location_t.
11998 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11999 "selftest.h".
12000 (dump_user_location_t::dump_user_location_t): New constructors,
12001 from gimple *stmt and rtx_insn *.
12002 (dump_user_location_t::from_function_decl): New function.
12003 (dump_loc): Make static.
12004 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12005 const dump_location_t &.
12006 (dump_generic_expr_loc): Delete.
12007 (dump_printf_loc): Convert param "loc" from location_t to
12008 const dump_location_t &.
12009 (selftest::test_impl_location): New function.
12010 (selftest::dumpfile_c_tests): New function.
12011 * dumpfile.h: Include "profile-count.h".
12012 (class dump_user_location_t): New class.
12013 (struct dump_impl_location_t): New struct.
12014 (class dump_location_t): New class.
12015 (dump_printf_loc): Convert 2nd param from source_location to
12016 const dump_location_t &.
12017 (dump_generic_expr_loc): Delete.
12018 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12019 const dump_location_t &.
12020 * gimple-fold.c (fold_gimple_assign): Update call to
12021 dump_printf_loc to pass in a dump_location_t rather than a
12022 location_t, via the gimple stmt.
12023 (gimple_fold_call): Likewise.
12024 * gimple-loop-interchange.cc
12025 (loop_cand::analyze_iloop_reduction_var): Update for change to
12026 check_reduction_path.
12027 (tree_loop_interchange::interchange): Update for change to
12028 find_loop_location.
12029 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12030 change in return-type of find_loop_location.
12031 (graphite_regenerate_ast_isl): Likewise.
12032 * graphite-optimize-isl.c (optimize_isl): Likewise.
12033 * graphite.c (graphite_transform_loops): Likewise.
12034 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12035 pass in a dump_location_t rather than a location_t, via the
12036 gimple stmt.
12037 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12038 * ipa.c (walk_polymorphic_call_targets): Likewise.
12039 * loop-unroll.c (report_unroll): Convert "locus" param from
12040 location_t to dump_location_t.
12041 (decide_unrolling): Update for change to get_loop_location's
12042 return type.
12043 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12044 location_t to dump_user_location_t.
12045 (grid_find_single_omp_among_assignments_1): Updates calls to
12046 dump_printf_loc to pass in a dump_location_t rather than a
12047 location_t, via the gimple stmt.
12048 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12049 location_t to dump_location_t. Updates calls to dump_printf_loc
12050 to pass in a dump_location_t rather than a location_t, via the
12051 gimple stmt.
12052 (grid_inner_loop_gridifiable_p): Likewise.
12053 (grid_dist_follows_simple_pattern): Likewise.
12054 (grid_gfor_follows_tiling_pattern): Likewise.
12055 (grid_target_follows_gridifiable_pattern): Likewise.
12056 (grid_attempt_target_gridification): Convert initialization
12057 of local "grid" from memset to zero-initialization; FIXME: does
12058 this require C++11? Update call to dump_printf_loc to pass in a
12059 optinfo_location rather than a location_t, via the gimple stmt.
12060 * profile.c (read_profile_edge_counts): Updates call to
12061 dump_printf_loc to pass in a dump_location_t rather than a
12062 location_t
12063 (compute_branch_probabilities): Likewise.
12064 * selftest-run-tests.c (selftest::run_tests): Call
12065 dumpfile_c_tests.
12066 * selftest.h (dumpfile_c_tests): New decl.
12067 * tree-loop-distribution.c (pass_loop_distribution::execute):
12068 Update for change in return type of find_loop_location.
12069 * tree-parloops.c (parallelize_loops): Likewise.
12070 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12071 "locus" from location_t to dump_user_location_t.
12072 (canonicalize_loop_induction_variables): Likewise.
12073 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12074 for change in return type of find_loop_location.
12075 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12076 to dump_printf_loc to pass in a dump_location_t rather than a
12077 location_t, via the stmt.
12078 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12079 Likewise.
12080 * tree-vect-loop-manip.c (find_loop_location): Convert return
12081 type from source_location to dump_user_location_t.
12082 (vect_do_peeling): Update for above change.
12083 (vect_loop_versioning): Update for change in type of
12084 vect_location.
12085 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12086 from location_t to dump_user_location_t.
12087 (vect_estimate_min_profitable_iters): Update for change in type
12088 of vect_location.
12089 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12090 location_t to dump_location_t.
12091 (vect_slp_bb): Update for change in type of vect_location.
12092 * tree-vectorizer.c (vect_location): Convert from source_location
12093 to dump_user_location_t.
12094 (try_vectorize_loop_1): Update for change in vect_location's type.
12095 (vectorize_loops): Likewise.
12096 (increase_alignment): Likewise.
12097 * tree-vectorizer.h (vect_location): Convert from source_location
12098 to dump_user_location_t.
12099 (find_loop_location): Convert return type from source_location to
12100 dump_user_location_t.
12101 (check_reduction_path): Convert 1st param from location_t to
12102 dump_user_location_t.
12103 * value-prof.c (check_counter): Update call to dump_printf_loc to
12104 pass in a dump_user_location_t rather than a location_t; update
12105 call to error_at for change in type of "locus".
12106 (check_ic_target): Update call to dump_printf_loc to
12107 pass in a dump_user_location_t rather than a location_t, via the
12108 call_stmt.
12109
12110 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12111
12112 * config/s390/s390.h (enum processor_flags): Do not use
12113 default tune parameter when -march was specified.
12114
12115 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12116
12117 PR target/86314
12118 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12119 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12120 operands.
12121
12122 2018-06-26 Richard Biener <rguenther@suse.de>
12123
12124 PR tree-optimization/86287
12125 PR bootstrap/86316
12126 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12127 (vect_analyze_loop): Initialize n_stmts.
12128
12129 2018-06-26 Richard Biener <rguenther@suse.de>
12130
12131 PR middle-end/86271
12132 * fold-const.c (fold_convertible_p): Pointer extension
12133 isn't valid.
12134
12135 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12136
12137 PR debug/86064
12138 * dwarf2out.c (loc_list_has_views): Adjust comments.
12139 (dw_loc_list): Split single cross-partition range with
12140 nonzero locview.
12141
12142 2018-06-25 Jeff Law <law@redhat.com>
12143
12144 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12145 on -mbig-switch by default.
12146
12147 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12148 test.
12149 (const_float_0_operand): Remove unused predicate.
12150 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12151 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12152 (recipsf2): New expander. Original pattern now called
12153 (recipsf2_insn).
12154 (recipdf2, recipdf2_insn): Similarly.
12155 (rsqrtsf2, rsqrtsf2_insn): Similarly
12156 (rsqrtdf2, rsqrtdf2_insn): Similarly
12157
12158 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12159
12160 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12161 Simplify logic for FreeBSD (twice).
12162
12163 2018-06-25 Martin Sebor <msebor@redhat.com>
12164
12165 PR tree-optimization/86204
12166 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12167 a strnlen result if it's less than the length of the string.
12168
12169 2018-06-25 Martin Sebor <msebor@redhat.com>
12170
12171 PR tree-optimization/85700
12172 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12173 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12174 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12175
12176 2018-06-25 Martin Sebor <msebor@redhat.com>
12177
12178 * doc/extend.texi (Zero-length arrays): Update and clarify.
12179
12180 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12181
12182 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12183 added IEEE/IBM long double multilib support on PowerPC little
12184 endian Linux systems.
12185 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12186 (MULTILIB_DEFAULTS): Likewise.
12187 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12188 Likewise.
12189 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12190 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12191 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12192
12193 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12194
12195 PR middle-end/86311
12196 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12197 (REORDER_45): Likewise.
12198
12199 2018-06-25 Jeff Law <law@redhat.com>
12200
12201 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12202 dividend to 32 bits. Adjust length.
12203 (udivmodhi4): Cleanup output template. Fix length.
12204
12205 2018-06-25 Carl Love <cel@us.ibm.com>
12206
12207 * config/rs6000/vsx.md: Change word selector to prefered location.
12208
12209 2018-06-25 Richard Biener <rguenther@suse.de>
12210
12211 PR tree-optimization/86304
12212 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12213 epilogue-if-converted loops as well.
12214
12215 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12216
12217 * lto-section-out.c (lto_begin_section): Do not print section
12218 name for noaddr and unnumbered dumps.
12219
12220 2018-06-25 Richard Biener <rguenther@suse.de>
12221
12222 * tree-vectorizer.h (struct vec_info_shared): New structure
12223 with parts split out from struct vec_info and loop_nest from
12224 struct _loop_vec_info.
12225 (struct vec_info): Adjust accordingly.
12226 (struct _loop_vec_info): Likewise.
12227 (LOOP_VINFO_LOOP_NEST): Adjust.
12228 (LOOP_VINFO_DATAREFS): Likewise.
12229 (LOOP_VINFO_DDRS): Likewise.
12230 (struct _bb_vec_info): Likewise.
12231 (BB_VINFO_DATAREFS): Likewise.
12232 (BB_VINFO_DDRS): Likewise.
12233 (struct _stmt_vec_info): Add dr_aux member.
12234 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12235 (DR_MISALIGNMENT_UNINITIALIZED): New.
12236 (set_dr_misalignment): Adjust.
12237 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12238 (vect_analyze_loop): Adjust prototype.
12239 (vect_analyze_loop_form): Likewise.
12240 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12241 Compute dependences lazily.
12242 (vect_record_base_alignments): Use shared datarefs/ddrs.
12243 (vect_verify_datarefs_alignment): Likewise.
12244 (vect_analyze_data_refs_alignment): Likewise.
12245 (vect_analyze_data_ref_accesses): Likewise.
12246 (vect_analyze_data_refs): Likewise.
12247 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12248 constructor parameter for shared part.
12249 (vect_analyze_loop_form): Pass in shared part and adjust.
12250 (vect_analyze_loop_2): Pass in storage for the number of
12251 stmts. Move loop nest finding to the caller. Compute
12252 datarefs lazily.
12253 (vect_analyze_loop): Pass in shared part.
12254 (vect_transform_loop): Verify shared datarefs are unchanged.
12255 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12256 constructor parameter for shared part.
12257 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12258 (vect_slp_bb): Verify shared datarefs are unchanged before
12259 transform.
12260 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12261 change.
12262 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12263 DR_MISALIGNMENT_UNINITIALIZED.
12264 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12265 parameter for shared part.
12266 (vec_info::~vec_info): Adjust.
12267 (vec_info_shared::vec_info_shared): New.
12268 (vec_info_shared::~vec_info_shared): Likewise.
12269 (vec_info_shared::save_datarefs): Likewise.
12270 (vec_info_shared::check_datarefs): Likewise.
12271 (try_vectorize_loop_1): Construct shared part live for analyses
12272 of a single loop for multiple vector sizes.
12273 * tree-parloops.c (gather_scalar_reductions): Adjust.
12274
12275 2018-06-25 Richard Biener <rguenther@suse.de>
12276
12277 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12278 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12279 (vect_analyze_data_refs): Remove similar code from here and
12280 simplify accordingly.
12281
12282 2018-06-25 Richard Biener <rguenther@suse.de>
12283
12284 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12285 for reverse storage order accesses rather than asserting
12286 they cannot happen here.
12287
12288 2018-06-25 Tom de Vries <tdevries@suse.de>
12289
12290 PR debug/86257
12291 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12292 Use data16 instead of .byte for insn prefix.
12293
12294 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12295
12296 PR C++/86082
12297 * parser.c (make_char_string_pack): Pass this literal chars
12298 through cpp_interpret_string.
12299 (cp_parser_userdef_numeric_literal): Check the result of
12300 make_char_string_pack.
12301
12302 2018-06-24 Maya Rashish <coypu@sdf.org>
12303
12304 * ginclude/stddef.h: Simplify conditions around avoiding
12305 re-definition of __size_t.
12306
12307 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12308
12309 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12310 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12311
12312 2018-06-22 Maya Rashish <coypu@sdf.org>
12313
12314 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12315 made to OpenBSD and NetBSD through the years.
12316
12317 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12318
12319 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12320 behavior of vec_pack (vector double, vector double) to match
12321 behavior of vec_float2 (vector double, vector double).
12322
12323 2018-06-22 Olivier Hainque <hainque@adacore.com>
12324
12325 * gimplify.c (gimplify_function_tree): Prevent creation
12326 of a trampoline for the address of the current function
12327 passed to entry/exit instrumentation hooks.
12328
12329 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12330
12331 PR target/86222
12332 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12333 correctly.
12334
12335 2018-06-22 Martin Liska <mliska@suse.cz>
12336
12337 PR tree-optimization/86263
12338 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12339 Bail out if is_enabled is false.
12340 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12341 New declaration.
12342 (jump_table_cluster::is_enabled): New function.
12343
12344 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12345
12346 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12347 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12348 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12349 (lto_input_ts_binfo_tree_pointers): Likewise.
12350 * tree-streamer-out.c (streamer_write_tree_bitfields,
12351 write_ts_binfo_tree_pointers): Likewise.
12352 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12353
12354 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12355
12356 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12357
12358 2018-06-22 Martin Liska <mliska@suse.cz>
12359
12360 * symbol-summary.h (get): Make it pure and inline move
12361 functionality from ::get function.
12362 (get): Remove and inline into ::get and ::get_create.
12363 (get_create): Move code from ::get function.
12364
12365 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12366
12367 PR target/85994
12368 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12369 -x assembler-with-cpp.
12370
12371 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12372
12373 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12374 _FILE_OFFSET_BITS=64 for C++.
12375
12376 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12377
12378 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12379 conversion insn that shows up when pr85657-3.c is compiled using
12380 IEEE 128-bit long double.
12381 (neg<mode>2_internal): Use the correct mode to check whether the
12382 mode is IBM extended.
12383 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12384 multiply and divide external functions from being created more
12385 than once.
12386
12387 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12388
12389 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12390 functions.
12391 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12392 the edge can be forwarded.
12393 (cfg_layout_merge_blocks): Likewise.
12394
12395 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12396
12397 * except.c (finish_eh_generation): Commit edge insertions only after
12398 the EH edges have been redirected from post-landing to landing pads.
12399
12400 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12401
12402 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12403 create_tmp_var_for to create the FRAME decl.
12404 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12405
12406 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12407
12408 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12409 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12410 debug statement when resetting its value.
12411 (expand_call_inline): Copy the locus of the call onto the assignment
12412 of the return value, if any. Use local variable in more cases.
12413
12414 2018-06-21 Martin Liska <mliska@suse.cz>
12415
12416 * ipa-pure-const.c (propagate_nothrow): Use
12417 funct_state_summaries->get.
12418 (dump_malloc_lattice): Likewise.
12419 (propagate_malloc): Likewise.
12420
12421 2018-06-21 Richard Biener <rguenther@suse.de>
12422
12423 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12424 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12425 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12426 comment.
12427 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12428 BLOCK_ABSTRACT_ORIGIN unconditionally.
12429
12430 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12431
12432 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12433 deleting it.
12434 * ipa-reference.c (ipa_reference_c_finalize): Delete
12435 ipa_ref_opt_sum_summaries and set it to NULL.
12436
12437 2018-06-21 Tom de Vries <tdevries@suse.de>
12438
12439 PR tree-optimization/85859
12440 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12441 test with comment from bb_no_side_effects_p.
12442
12443 2018-06-21 Richard Biener <rguenther@suse.de>
12444
12445 PR tree-optimization/86232
12446 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12447 max for constant niter.
12448
12449 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12450
12451 * config/aarch64/aarch64-simd.md
12452 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12453
12454 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12455
12456 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12457 Make opernads of the unspec commutative.
12458
12459 2018-06-21 Richard Biener <rguenther@suse.de>
12460
12461 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12462 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12463 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12464 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12465 NULL DR_STEP.
12466 (vect_record_base_alignments): Do not record base alignment
12467 for gathers or scatters.
12468 (vect_compute_data_ref_alignment): Drop return value that is always
12469 true. Bail out early for gathers or scatters.
12470 (vect_enhance_data_refs_alignment): Bail out early for gathers
12471 or scatters.
12472 (vect_find_same_alignment_drs): Likewise.
12473 (vect_analyze_data_refs_alignment): Remove dead code.
12474 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12475 (vect_analyze_data_refs): For possible gathers or scatters do
12476 not create an alternate DR, just check their possible validity
12477 and mark them. Adjust DECL_NONALIASED handling to not rely
12478 on DR_BASE_ADDRESS.
12479 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12480 update inits of gathers or scatters.
12481 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12482 Also copy gather/scatter flag to pattern vinfo.
12483
12484 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12485
12486 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12487 behavior of vec_packsu (vector unsigned long long, vector unsigned
12488 long long) to match behavior of vec_packs with same signature.
12489
12490 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12491 Thomas Schwinge <thomas@codesourcery.com>
12492 Cesar Philippidis <cesar@codesourcery.com>
12493
12494 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12495 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12496 (gimplify_adjust_omp_clauses): Likewise.
12497 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12498 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12499 (gimplify_omp_target_update): Update handling of acc update and
12500 enter/exit data.
12501 * omp-low.c (install_var_field): Remove unused parameter
12502 base_pointers_restrict.
12503 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12504 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12505 FINALIZE}
12506 (omp_target_base_pointers_restrict_p): Delete.
12507 (scan_omp_target): Update call to scan_sharing_clauses.
12508 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12509 FINALIZE}.
12510 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12511 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12512 (convert_local_omp_clauses): Likewise.
12513 * tree-pretty-print.c (dump_omp_clause): Likewise.
12514 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12515 FINALIZE}.
12516 (omp_clause_code_name): Likewise.
12517
12518 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12519
12520 PR debug/86194
12521 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12522 be narrowed.
12523
12524 PR tree-optimization/86231
12525 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12526 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12527
12528 2018-06-20 Tom de Vries <tdevries@suse.de>
12529
12530 PR tree-optimization/86097
12531 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12532 iv type if signedness of iv type is not the same as that of *nit.
12533
12534 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12535
12536 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12537 EDGE_EH edges, verify they are all EDGE_EH.
12538
12539 2018-06-20 Maya Rashish <coypu@sdf.org>
12540
12541 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12542
12543 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12544
12545 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12546 * config/aarch64/aarch64.c (xgene1_tunings): Add
12547 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12548 (aarch64_mode_valid_for_sched_fusion_p):
12549 Allow 16-byte modes.
12550 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12551 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12552 128-bit modes.
12553 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12554 New pattern.
12555 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12556 * config/aarch64/iterators.md (VQ2): New mode iterator.
12557
12558 2018-06-20 Martin Liska <mliska@suse.cz>
12559
12560 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12561 Change default ratio from 10 to 8.
12562
12563 2018-06-20 Martin Liska <mliska@suse.cz>
12564
12565 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12566 New.
12567 (bit_test_cluster::find_bit_tests): Likewise.
12568 (switch_decision_tree::analyze_switch_statement): Find clusters.
12569 * tree-switch-conversion.h (struct jump_table_cluster): Document
12570 hierarchy.
12571
12572 2018-06-20 Martin Liska <mliska@suse.cz>
12573
12574 * tree-switch-conversion.c (switch_conversion::collect):
12575 Record m_uniq property.
12576 (switch_conversion::expand): Bail out for special conditions.
12577 (group_cluster::~group_cluster): New.
12578 (group_cluster::group_cluster): Likewise.
12579 (group_cluster::dump): Likewise.
12580 (jump_table_cluster::emit): New.
12581 (switch_decision_tree::fix_phi_operands_for_edges): New.
12582 (struct case_node): Remove struct.
12583 (jump_table_cluster::can_be_handled): New.
12584 (case_values_threshold): Moved to header.
12585 (reset_out_edges_aux): Likewise.
12586 (jump_table_cluster::is_beneficial): New.
12587 (bit_test_cluster::can_be_handled): Likewise.
12588 (add_case_node): Remove.
12589 (bit_test_cluster::is_beneficial): New.
12590 (case_bit_test::cmp): New.
12591 (bit_test_cluster::emit): New.
12592 (expand_switch_as_decision_tree_p): Remove.
12593 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12594 (fix_phi_operands_for_edge): Likewise.
12595 (switch_decision_tree::analyze_switch_statement): New.
12596 (compute_cases_per_edge): Move ...
12597 (switch_decision_tree::compute_cases_per_edge): ... here.
12598 (try_switch_expansion): Likewise.
12599 (switch_decision_tree::try_switch_expansion): Likewise.
12600 (record_phi_operand_mapping): Likewise.
12601 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12602 (emit_case_decision_tree): Likewise.
12603 (switch_decision_tree::emit): Likewise.
12604 (balance_case_nodes): Likewise.
12605 (switch_decision_tree::balance_case_nodes): Likewise.
12606 (dump_case_nodes): Likewise.
12607 (switch_decision_tree::dump_case_nodes): Likewise.
12608 (emit_jump): Likewise.
12609 (switch_decision_tree::emit_jump): Likewise.
12610 (emit_cmp_and_jump_insns): Likewise.
12611 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12612 (emit_case_nodes): Likewise.
12613 (switch_decision_tree::emit_case_nodes): Likewise.
12614 (conditional_probability): Remove.
12615 * tree-switch-conversion.h (enum cluster_type): New.
12616 (PRINT_CASE): New.
12617 (struct cluster): Likewise.
12618 (cluster::cluster): Likewise.
12619 (struct simple_cluster): Likewise.
12620 (simple_cluster::simple_cluster): Likewise.
12621 (struct group_cluster): Likewise.
12622 (struct jump_table_cluster): Likewise.
12623 (struct bit_test_cluster): Likewise.
12624 (struct min_cluster_item): Likewise.
12625 (struct case_tree_node): Likewise.
12626 (case_tree_node::case_tree_node): Likewise.
12627 (jump_table_cluster::case_values_threshold): Likewise.
12628 (struct case_bit_test): Likewise.
12629 (struct switch_decision_tree): Likewise.
12630 (struct switch_conversion): Likewise.
12631 (switch_decision_tree::reset_out_edges_aux): Likewise.
12632
12633 2018-06-20 Martin Liska <mliska@suse.cz>
12634
12635 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12636 (hoist_edge_and_branch_if_true): Likewise.
12637 (expand_switch_using_bit_tests_p): Likewise.
12638 (struct case_bit_test): Likewise.
12639 (case_bit_test_cmp): Likewise.
12640 (emit_case_bit_tests): Likewise.
12641 (switch_conversion::switch_conversion): New class.
12642 (struct switch_conv_info): Remove old struct.
12643 (collect_switch_conv_info): More to ...
12644 (switch_conversion::collect): ... this.
12645 (check_range): Likewise.
12646 (switch_conversion::check_range): Likewise.
12647 (check_all_empty_except_final): Likewise.
12648 (switch_conversion::check_all_empty_except_final): Likewise.
12649 (check_final_bb): Likewise.
12650 (switch_conversion::check_final_bb): Likewise.
12651 (create_temp_arrays): Likewise.
12652 (switch_conversion::create_temp_arrays): Likewise.
12653 (free_temp_arrays): Likewise.
12654 (gather_default_values): Likewise.
12655 (switch_conversion::gather_default_values): Likewise.
12656 (build_constructors): Likewise.
12657 (switch_conversion::build_constructors): Likewise.
12658 (constructor_contains_same_values_p): Likewise.
12659 (switch_conversion::contains_same_values_p): Likewise.
12660 (array_value_type): Likewise.
12661 (switch_conversion::array_value_type): Likewise.
12662 (build_one_array): Likewise.
12663 (switch_conversion::build_one_array): Likewise.
12664 (build_arrays): Likewise.
12665 (switch_conversion::build_arrays): Likewise.
12666 (gen_def_assigns): Likewise.
12667 (switch_conversion::gen_def_assigns): Likewise.
12668 (prune_bbs): Likewise.
12669 (switch_conversion::prune_bbs): Likewise.
12670 (fix_phi_nodes): Likewise.
12671 (switch_conversion::fix_phi_nodes): Likewise.
12672 (gen_inbound_check): Likewise.
12673 (switch_conversion::gen_inbound_check): Likewise.
12674 (process_switch): Use the newly created class.
12675 (switch_conversion::expand): New.
12676 (switch_conversion::~switch_conversion): New.
12677 * tree-switch-conversion.h: New file.
12678
12679 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12680
12681 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12682 tree-vect-patterns.c.
12683 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12684 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12685 (vect_recog_sad_pattern): Likewise.
12686 (vect_recog_widen_sum_pattern): Likewise.
12687 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12688 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12689 (vect_recog_rotate_pattern): Likewise.
12690 (vect_recog_mult_pattern): Likewise.
12691 (vect_recog_vector_vector_shift_pattern): Likewise.
12692 (vect_recog_divmod_pattern): Likewise.
12693 (vect_recog_mixed_size_cond_pattern): Likewise.
12694 (vect_recog_bool_pattern): Likewise.
12695 (vect_recog_mask_conversion_pattern): Likewise.
12696 (vect_try_gather_scatter_pattern): Likewise.
12697 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12698 (vect_recog_over_widening_pattern): Likewise.
12699 (vect_recog_gather_scatter_pattern): Likewise.
12700 (vect_recog_func_ptr): Move from tree-vectorizer.h
12701 (vect_vect_recog_func_ptrs): Move further down the file.
12702 (vect_recog_func): Likewise. Remove the third argument.
12703 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12704 (vect_pattern_recog_1): Expect the pattern function to do any
12705 necessary target tests. Also expect it to provide a vector type.
12706 Remove the type_in handling.
12707
12708 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12709
12710 * tree-vect-patterns.c (vect_pattern_detected): New function.
12711 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12712 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12713 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12714 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12715 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12716 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12717 (vect_recog_mask_conversion_pattern)
12718 (vect_try_gather_scatter_pattern): Likewise.
12719
12720 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12721
12722 * tree-vect-patterns.c (vect_get_internal_def): New function.
12723 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12724 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12725 (search_type_for_mask_1): Use it.
12726
12727 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12728
12729 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12730 redundant WIDEN_SUM_EXPR handling.
12731 (vect_recog_sad_pattern): Likewise.
12732
12733 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12734
12735 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12736 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12737 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12738 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12739 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12740
12741 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12742
12743 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12744 use the stmt_vec_info of the original bb statement for the
12745 new zero assignment, even if the call is part of a pattern.
12746
12747 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12748
12749 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12750 that the sequence is attached to the original statement rather
12751 than the pattern statement.
12752 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12753 PATTERN_DEF_SEQ from the original statement rather than
12754 the main pattern statement.
12755 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12756 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12757 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12758
12759 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12760
12761 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12762 definition statements before the early exit for statements that aren't
12763 live or relevant.
12764 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12765 split out from...
12766 (vect_transform_loop): ...here. Process pattern definition
12767 statements without first checking whether the main pattern
12768 statement is live or relevant.
12769
12770 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12771
12772 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12773 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12774
12775 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12776
12777 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12778 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12779 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12780 (expand_block_compare): Change select_block_compare_mode call.
12781 (expand_strncmp_align_check): Use new functions, fix comment.
12782 (emit_final_str_compare_gpr): New function.
12783 (expand_strn_compare): Refactor and clean up code.
12784 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12785
12786 2018-06-19 Tony Reix <tony.reix@atos.com>
12787 Damien Bergamini <damien.bergamini@atos.com>
12788 David Edelsohn <dje.gcc@gmail.com>
12789
12790 * collect2.c (static_obj): New variable.
12791 (static_libs): New variable.
12792 (is_in_list): Uncomment declaration.
12793 (main): Track AIX libraries linked statically.
12794 (is_in_list): Uncomment definition.
12795 (scan_prog_file): Don't add AIX shared libraries initializer
12796 to constructor list if linking statically.
12797
12798 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12799
12800 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12801 constant.
12802 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12803
12804 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12805
12806 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12807 blocks.
12808
12809 2018-06-19 Martin Liska <mliska@suse.cz>
12810
12811 * config/i386/i386.c (ix86_can_inline_p): Do not use
12812 ipa_fn_summaries::get_create.
12813 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12814 get.
12815 (devirtualization_time_bonus): Likewise.
12816 (ipcp_propagate_stage): Likewise.
12817 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12818 (edge_set_predicate): Likewise.
12819 (evaluate_conditions_for_known_args): Likewise.
12820 (evaluate_properties_for_edge): Likewise.
12821 (ipa_call_summary::reset): Tranform to ...
12822 (ipa_call_summary::~ipa_call_summary): ... this.
12823 (ipa_fn_summary::reset): Transform to ...
12824 (ipa_fn_summary::~ipa_fn_summary): ... this.
12825 (ipa_fn_summary_t::remove): Rename to ...
12826 (ipa_fn_summary_t::remove_callees): ... this.
12827 (ipa_fn_summary_t::duplicate): Use placement new
12828 instead of memory copy.
12829 (ipa_call_summary_t::duplicate): Likewise.
12830 (ipa_call_summary_t::remove): Remove.
12831 (dump_ipa_call_summary): Change get_create to get.
12832 (ipa_dump_fn_summary): Dump only when summary exists.
12833 (analyze_function_body): Use symbol_summary::get instead
12834 of get_create.
12835 (compute_fn_summary): Likewise.
12836 (estimate_edge_devirt_benefit): Likewise.
12837 (estimate_edge_size_and_time): Likewise.
12838 (inline_update_callee_summaries): Likewise.
12839 (remap_edge_change_prob): Likewise.
12840 (remap_edge_summaries): Likewise.
12841 (ipa_merge_fn_summary_after_inlining): Likewise.
12842 (write_ipa_call_summary): Likewise.
12843 (ipa_fn_summary_write): Likewise.
12844 (ipa_free_fn_summary): Likewise.
12845 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12846 (struct ipa_call_summary): Likewise.
12847 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12848 of get_create.
12849 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12850 (estimate_size_after_inlining): Likewise.
12851 (estimate_growth): Likewise.
12852 (growth_likely_positive): Likewise.
12853 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12854 (inline_call): Likewise.
12855 * ipa-inline.c (caller_growth_limits): Likewise.
12856 (can_inline_edge_p): Likewise.
12857 (can_inline_edge_by_limits_p): Likewise.
12858 (compute_uninlined_call_time): Likewise.
12859 (compute_inlined_call_time): Likewise.
12860 (want_inline_small_function_p): Likewise.
12861 (edge_badness): Likewise.
12862 (update_caller_keys): Likewise.
12863 (update_callee_keys): Likewise.
12864 (inline_small_functions): Likewise.
12865 (inline_to_all_callers_1): Likewise.
12866 (dump_overall_stats): Likewise.
12867 (early_inline_small_functions): Likewise.
12868 (early_inliner): Likewise.
12869 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12870 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12871 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12872 * ipa-split.c (execute_split_functions): Likewise.
12873 * symbol-summary.h: Likewise.
12874 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12875
12876 2018-06-19 Richard Biener <rguenther@suse.de>
12877
12878 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12879 (vectorize_loops): ... here. Fix dbgcnt handling.
12880 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12881
12882 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12883
12884 PR target/86197
12885 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12886 ieee128 argument takes up only one (vector) register, not two (floating
12887 point) registers.
12888
12889 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12890
12891 * gimplify.c (gimplify_init_constructor): Really never clear for an
12892 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12893
12894 2018-06-19 Richard Biener <rguenther@suse.de>
12895
12896 PR tree-optimization/86179
12897 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12898 after failed recognition.
12899
12900 2018-06-18 Martin Sebor <msebor@redhat.com>
12901
12902 PR middle-end/85602
12903 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12904 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12905 Handle integer subtraction.
12906 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12907 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12908
12909 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12910
12911 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12912 param from rtx to rtx_insn *.
12913 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12914 param.
12915 (frv_ifcvt_modify_insn): Likwise.
12916 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12917 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12918 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12919 as_a <rtx_insn *> cast to local "unprotected_region" once
12920 it's been established that it's not NULL or pc_rtx.
12921 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12922 param "sethi" from rtx to rtx_insn *.
12923 (nds32_group_float_insns): Likewise for param "insn".
12924 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12925 param.
12926 (vax_output_int_subtract): Likewise.
12927 * config/vax/vax.c (vax_output_int_add): Likewise for param
12928 "insn".
12929 (vax_output_int_subtract): Likewise.
12930 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12931 (emit_pattern_after): Likewise for param "after".
12932 (emit_insn_after): Likewise.
12933 (emit_jump_insn_after): Likewise.
12934 (emit_call_insn_after): Likewise.
12935 (emit_debug_insn_after): Likewise.
12936 (emit_pattern_before): Likewise for param "before".
12937 (emit_insn_before): Likewise.
12938 (emit_jump_insn_before): Likewise.
12939 * final.c (get_insn_template): Likewise for param "insn", removing
12940 a cast.
12941 * output.h (get_insn_template): Likewise for 2nd param.
12942 * rtl.h (emit_insn_before): Likewise.
12943 (emit_jump_insn_before): Likewise.
12944 (emit_debug_insn_before_noloc): Likewise.
12945 (emit_insn_after): Likewise.
12946 (emit_jump_insn_after): Likewise.
12947 (emit_call_insn_after): Likewise.
12948 (emit_debug_insn_after): Likewise.
12949 (set_insn_deleted): Likewise for param.
12950
12951 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12952
12953 PR target/85358
12954 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12955 floating point modes, so that IFmode is numerically greater than
12956 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12957 to declare the ordering. This prevents IFmode from being
12958 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12959 machine. Include rs6000-modes.h to share the fractional values
12960 between genmodes* and the rest of the compiler.
12961 (IFmode): Likewise.
12962 (KFmode): Likewise.
12963 (TFmode): Likewise.
12964 * config/rs6000/rs6000-modes.h: New file.
12965 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12966 meaning of rs6000_long_double_size so that 126..128 selects an
12967 appropriate 128-bit floating point type.
12968 (rs6000_option_override_internal): Likewise.
12969 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12970 (TARGET_LONG_DOUBLE_128): Change the meaning of
12971 rs6000_long_double_size so that 126..128 selects an appropriate
12972 128-bit floating point type.
12973 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12974 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12975 source and destination to match the standard usage.
12976 (truncifkf2): Likewise.
12977 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12978 ISA 2.07 to use an explicit clobber, instead of passing in a
12979 temporary.
12980 (copysign<mode>3_soft): Likewise.
12981
12982 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12983
12984 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12985 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12986 (vect_slp_analyze_instance_dependence): Likewise.
12987 (vect_enhance_data_refs_alignment): Likewise.
12988 (vect_analyze_data_refs_alignment): Likewise.
12989 (vect_slp_analyze_and_verify_instance_alignment
12990 (vect_analyze_data_ref_accesses): Likewise.
12991 (vect_prune_runtime_alias_test_list): Likewise.
12992 (vect_analyze_data_refs): Likewise.
12993 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12994 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12995 (vect_analyze_scalar_cycles_1): Likewise.
12996 (vect_get_loop_niters): Likewise.
12997 (vect_analyze_loop_form_1): Likewise.
12998 (vect_update_vf_for_slp): Likewise.
12999 (vect_analyze_loop_operations): Likewise.
13000 (vect_analyze_loop): Likewise.
13001 (vectorizable_induction): Likewise.
13002 (vect_transform_loop): Likewise.
13003 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13004 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13005 (vect_make_slp_decision): Likewise.
13006 (vect_detect_hybrid_slp): Likewise.
13007 (vect_slp_analyze_operations): Likewise.
13008 (vect_slp_bb): Likewise.
13009 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13010 (vectorizable_bswap): Likewise.
13011 (vectorizable_call): Likewise.
13012 (vectorizable_simd_clone_call): Likewise.
13013 (vectorizable_conversion): Likewise.
13014 (vectorizable_assignment): Likewise.
13015 (vectorizable_shift): Likewise.
13016 (vectorizable_operation): Likewise.
13017 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13018
13019 2018-06-18 Martin Sebor <msebor@redhat.com>
13020
13021 PR tree-optimization/81384
13022 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13023 * builtins.c (expand_builtin_strnlen): New function.
13024 (expand_builtin): Call it.
13025 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13026 * builtins.def (BUILT_IN_STRNLEN): New.
13027 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13028 Warn for bounds in excess of maximum object size.
13029 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13030 single-value ranges. Handle strnlen.
13031 (handle_builtin_strlen): Handle strnlen.
13032 (strlen_check_and_optimize_stmt): Same.
13033 * doc/extend.texi (Other Builtins): Document strnlen.
13034
13035 2018-06-18 Maya Rashish <coypu@sdf.org>
13036
13037 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13038 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13039 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13040
13041 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13042 here to ...
13043 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13044
13045 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13046
13047 * tree.c (escaped_string::escape): Replace cast to char * by
13048 const_cast<char *> (unescaped).
13049
13050 2018-06-18 Nick Clifton <nickc@redhat.com>
13051
13052 PR 84195
13053 * tree.c (escaped_string): New class. Converts an unescaped
13054 string into its escaped equivalent.
13055 (warn_deprecated_use): Use the new class to convert the
13056 deprecation message, if present.
13057 (test_escaped_strings): New self test.
13058 (test_c_tests): Add test_escaped_strings.
13059 * doc/extend.texi (deprecated): Add a note that the
13060 deprecation message is affected by the -fmessage-length
13061 option, and that control characters will be escaped.
13062 (#pragma GCC error): Document this pragma.
13063 (#pragma GCC warning): Likewise.
13064 * doc/invoke.texi (-fmessage-length): Document this option's
13065 effect on the #warning and #error preprocessor directives and
13066 the deprecated attribute.
13067
13068 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13069
13070 * tree.c (decl_value_expr_lookup): Revert latest change.
13071 (decl_value_expr_insert): Likewise.
13072
13073 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13074
13075 * gimplify.c (nonlocal_vlas): Delete.
13076 (nonlocal_vla_vars): Likewise.
13077 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13078 referenced VLAs.
13079 (gimplify_body): Do not create and destroy nonlocal_vlas.
13080 * tree-nested.c: Include diagnostic.h.
13081 (use_pointer_in_frame): Tweak.
13082 (lookup_field_for_decl): Add assertion and declare the transformation.
13083 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13084 internal error when the reference is in a wrong context. Do not
13085 create a debug decl by default.
13086 (note_nonlocal_block_vlas): Delete.
13087 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13088 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13089 create a debug decl by default.
13090 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13091 call is in a wrong context.
13092 (fixup_vla_decls): New function.
13093 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13094 debug variables were created.
13095 * tree.c (decl_value_expr_lookup): Add checking assertion.
13096 (decl_value_expr_insert): Likewise.
13097
13098 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13099
13100 PR middle-end/82479
13101 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13102 * tree-scalar-evolution.c (interpret_expr): Likewise.
13103 (expression_expensive_p): Likewise.
13104 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13105 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13106 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13107 (ssa_defined_by_minus_one_stmt_p): New.
13108
13109 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13110
13111 PR middle-end/64946
13112 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13113 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13114 * dojump.c (do_jump): Likewise.
13115 * expr.c (expand_expr_real_2): Check operand type's sign.
13116 * fold-const.c (const_unop): Handle ABSU_EXPR.
13117 (fold_abs_const): Likewise.
13118 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13119 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13120 (strip_sign_op_1): Likesise.
13121 * match.pd: Add new pattern to generate ABSU_EXPR.
13122 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13123 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13124 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13125 * tree-inline.c (estimate_operator_cost): Likewise.
13126 * tree-pretty-print.c (dump_generic_node): Likewise.
13127 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13128 * tree.def (ABSU_EXPR): New.
13129
13130 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13131
13132 PR middle-end/86095
13133 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13134 documented as preserved for backward compatibility only.
13135 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13136
13137 PR rtl-optimization/86108
13138 * bb-reorder.c (create_forwarder_block): Renamed to ...
13139 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13140 jump from new landing pad to the second part.
13141 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13142 Adjust callers.
13143
13144 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13145
13146 PR middle-end/85878
13147 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13148 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13149 Only call store_expr for halves if the mode is the same.
13150
13151 PR middle-end/86123
13152 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13153 Fix up comment formatting.
13154
13155 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13156
13157 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13158 (typed_splay_tree::closure,
13159 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13160 (typed_splay_tree::typed_splay_tree,
13161 typed_splay_tree::operator =): Declared private.
13162 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13163 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13164 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13165 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13166 typed_splay_tree::splay_tree_splay,
13167 typed_splay_tree::splay_tree_foreach_helper,
13168 typed_splay_tree::splay_tree_insert,
13169 typed_splay_tree::splay_tree_remove,
13170 typed_splay_tree::splay_tree_lookup,
13171 typed_splay_tree::splay_tree_predecessor,
13172 typed_splay_tree::splay_tree_successor,
13173 typed_splay_tree::splay_tree_min,
13174 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13175 (typed_splay_tree::root, typed_splay_tree::comp,
13176 typed_splay_tree::delete_key,
13177 typed_splay_tree::delete_value): New data members.
13178 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13179 typed_splay_tree::remove.
13180
13181 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13182
13183 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13184 -mginv and -mno-ginv to the assembler.
13185 * config/mips/mips.opt (-mcrc): New option.
13186 (-mginv): Likewise.
13187 * doc/invoke.text (-mcrc): Document.
13188 (-mginv): Likewise.
13189
13190 2018-06-15 Nick Clifton <nickc@redhat.com>
13191
13192 PR 84195
13193 * tree.c (escaped_string): New class. Converts an unescaped
13194 string into its escaped equivalent.
13195 (warn_deprecated_use): Use the new class to convert the
13196 deprecation message, if present.
13197 (test_escaped_strings): New self test.
13198 (test_c_tests): Add test_escaped_strings.
13199 * doc/extend.texi (deprecated): Add a note that the
13200 deprecation message is affected by the -fmessage-length
13201 option, and that control characters will be escaped.
13202 (#pragma GCC error): Document this pragma.
13203 (#pragma GCC warning): Likewise.
13204 * doc/invoke.texi (-fmessage-length): Document this option's
13205 effect on the #warning and #error preprocessor directives and
13206 the deprecated attribute.
13207
13208 2018-06-15 Richard Biener <rguenther@suse.de>
13209
13210 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13211 here, also noting vector size used.
13212 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13213 size used in MSG_OPTIMIZED_LOCATIONS dump.
13214 (pass_slp_vectorize::execute): Adjust.
13215
13216 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13217
13218 PR target/85968
13219 * config/arc/arc.c (arc_return_address_register): Fix
13220 if-condition.
13221
13222 2018-06-15 Richard Biener <rguenther@suse.de>
13223
13224 PR middle-end/86159
13225 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13226 leave useless conversion stripping to force_gimple_operand_gsi.
13227 (gimplify_build2): Likewise.
13228 (gimplify_build1): Likewise.
13229
13230 2018-06-15 Richard Biener <rguenther@suse.de>
13231
13232 PR middle-end/86076
13233 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13234 before adjusting their block.
13235
13236 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13237
13238 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13239 multilibs for *-*-rtems*.
13240 * config/riscv/t-rtems: New file.
13241
13242 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13243
13244 PR middle-end/86122
13245 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13246 unsigned_type_for returns NULL.
13247
13248 PR target/85945
13249 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13250 subregs of multi-word pseudos unless the float mode has word size.
13251
13252 2018-06-14 Richard Biener <rguenther@suse.de>
13253
13254 PR middle-end/86139
13255 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13256 duplicate and harmful type_hash_canon.
13257 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13258
13259 2018-06-14 Richard Biener <rguenther@suse.de>
13260
13261 PR ipa/86124
13262 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13263 NULL cgraph_node.
13264
13265 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13266
13267 * config/rtems.h (STDINT_LONG32): Define.
13268
13269 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13270 Prachi Godbole <prachi.godbole@imgtec.com>
13271
13272 * config/mips/mips-cpus.def: Define P6600.
13273 * config/mips/mips-tables.opt: Regenerate.
13274 * config/mips/mips.c (mips_ucbranch_type): New enum.
13275 (mips_rtx_cost_data): Add support for P6600.
13276 (mips_issue_rate): Likewise.
13277 (mips_multipass_dfa_lookahead): Likewise.
13278 (mips_avoid_hazard): Likewise.
13279 (mips_reorg_process_insns): Likewise.
13280 (mips_classify_branch_p6600): New function.
13281 * config/mips/mips.h (TUNE_P6600): New define.
13282 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13283 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13284 * config/mips/mips.md: Include p6600.md.
13285 (processor): Add p6600.
13286 * config/mips/p6600.md: New file.
13287 * doc/invoke.texi: Add p6600 to supported architectures.
13288
13289 2018-06-13 Martin Sebor <msebor@redhat.com>
13290
13291 PR tree-optimization/86114
13292 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13293 of integer types.
13294 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13295
13296 2018-06-13 Richard Biener <rguenther@suse.de>
13297
13298 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13299 Properly set vector type of the intermediate stmt.
13300 * tree-vect-stmts.c (vectorizable_operation): The destination
13301 var always has vectype_out type.
13302
13303 2018-06-13 Jeff Law <law@redhat.com>
13304
13305 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13306 integer 0 for argument to print_rtl_with_bb.
13307 (rl78_reorg): Likewise.
13308
13309 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13310
13311 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13312 from rtx to rtx_insn *.
13313 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13314 "label".
13315 (add_sched_insns_for_speculation): Likewise for local "target",
13316 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13317 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13318 from rtx_insn ** to rtx_code_label **.
13319 (reorg_emit_nops): Likewise.
13320 (c6x_reorg): Likewise for local "call_labels".
13321 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13322 rtx to rtx_insn *.
13323 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13324 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13325 the loops over LABEL_REFS.
13326 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13327 braf_label.
13328 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13329 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13330 (split_branches): Strengthen local "olabel" from rtx to
13331 rtx_insn *, adding a safe_as_a cast.
13332 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13333 to "rtx_insn *".
13334 (add_insn_after): Likewise for first two params.
13335 (add_insn_before): Likewise.
13336 (remove_insn): Likewise for param.
13337 (emit_pattern_before_noloc): Likewise for second and third params.
13338 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13339 (emit_call_insn_before_noloc): Likewise.
13340 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13341 to "rtx_insn *".
13342 (emit_barrier_before): Likewise.
13343 (emit_label_before): Strengthen "label" param from "rtx" to
13344 "rtx_code_label *". Strengthen "before" param from "rtx" to
13345 "rtx_insn *".
13346 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13347 "rtx_insn *".
13348 (emit_pattern_after_noloc): Likewise.
13349 (emit_insn_after_noloc): Likewise.
13350 (emit_jump_insn_after_noloc): Likewise.
13351 (emit_call_insn_after_noloc): Likewise.
13352 (emit_debug_insn_after_noloc): Likewise.
13353 (emit_barrier_after): Likewise.
13354 (emit_label_after): Likewise for both params.
13355 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13356 "loc" param from "int" to "location_t".
13357 (emit_insn_after_setloc): Likewise.
13358 (emit_jump_insn_after_setloc): Likewise.
13359 (emit_call_insn_after_setloc): Likewise.
13360 (emit_debug_insn_after_setloc): Likewise.
13361 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13362 "loc" param from "int" to "location_t".
13363 (emit_pattern_before): Convert NULL_RTX to NULL.
13364 (emit_insn_before_setloc): Convert "loc" param from "int" to
13365 "location_t".
13366 (emit_jump_insn_before_setloc): Likewise.
13367 (emit_call_insn_before_setloc): Likewise.
13368 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13369 rtx_insn *. Convert "loc" param from "int" to "location_t".
13370 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13371 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13372 Convert 3rd param from "int" to "location_t".
13373 (emit_barrier_before, emit_barrier_after, next_real_insn):
13374 Strengthen param from rtx to rtx_insn *.
13375 (emit_label_before): Strengthen 1st param from "rtx" to
13376 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13377 "rtx_insn *".
13378 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13379 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13380 Strengthen 2nd param from "rtx" to "rtx_insn *".
13381 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13382 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13383 Likewise. Convert 3rd param from "int" to "location_t".
13384 (emit_label_after): Strengthen 1st param from "rtx" to
13385 "rtx_code_label *".
13386 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13387 "rtx_insn *".
13388 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13389 from "rtx" to "rtx_insn *".
13390
13391 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13392
13393 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13394 bodies streamed in with -Q.
13395 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13396 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13397 * gimple-streamer-out.c: Include gimple-pretty-print.h
13398 (output_bb): Dump stmts streamed.
13399 * lto-section-out.c: Include print-tree.h
13400 (lto_begin_section): Dump sections created.
13401 (lto_output_decl_index): Dump decl encoded.
13402 * lto-streamer-out.c: Include print-tree.h
13403 (create_output_block): Dump output block created.
13404 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13405 (output_function): Dump function output.
13406 (output_constructor): Dump constructor streamed.
13407 (write_global_stream): Output indexes encoded.
13408 (produce_asm_for_decls): Dump streams encoded.
13409 * lto-streamer.c (streamer_dump_file): New global var.
13410 * lto-streamer.h (streamer_dump_file): Declare.
13411 * passes.c (ipa_write_summaries): Initialize streamer dump.
13412 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13413 in.
13414
13415 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13416
13417 PR target/86048
13418 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13419 offsets for register save directives. Emit a second batch of save
13420 directives, if need be, when the function accesses prior frames.
13421
13422 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13423
13424 * config/arc/fpu.md (fmasf4): Force operand to register.
13425 (fnmasf4): Likewise.
13426
13427 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13428
13429 * config/arc/arc-protos.h (arc_pad_return): Remove.
13430 * config/arc/arc.c (machine_function): Remove force_short_suffix
13431 and size_reason.
13432 (arc_print_operand): Adjust printing of '&'.
13433 (arc_verify_short): Remove conditional printing of short suffix.
13434 (arc_final_prescan_insn): Remove reference to size_reason.
13435 (pad_return): New function.
13436 (arc_reorg): Call pad_return.
13437 (arc_pad_return): Remove.
13438 (arc_init_machine_status): Remove reference to force_short_suffix.
13439 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13440 (attr length): When attribute iscompact is true force to 2
13441 regardless; in the case of maybe check if we want to force the
13442 instruction to have 4 bytes length.
13443 (nopv): Change it to generate 4 byte long nop as well.
13444 (blockage): New pattern.
13445 (simple_return): Remove call to arc_pad_return.
13446 (p_return_i): Likewise.
13447
13448 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13449
13450 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13451
13452 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13453
13454 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13455 ARC cores.
13456
13457 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13458
13459 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13460 for ARC700 and ARCv2.
13461
13462 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13463
13464 PR target/86076
13465 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13466 operands[2] instead of operands[1].
13467
13468
13469 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13470
13471 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13472 case, check whether the outer register overlaps an unallocatable
13473 register, not just whether it fits the required class.
13474
13475 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13476
13477 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13478 are poly_ints.
13479 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13480 (memrefs_conflict_p): Likewise.
13481 (init_alias_analysis): Likewise.
13482 * cfgexpand.c (expand_debug_expr): Likewise.
13483 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13484 * cse.c (fold_rtx): Likewise.
13485 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13486 * expr.c (emit_block_move_hints): Likewise.
13487 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13488 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13489 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13490 (emit_group_store): Likewise.
13491 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13492 to read the PRE/POST_MODIFY increment.
13493 * calls.c (store_one_arg): Use strip_offset.
13494 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13495 poly_int_rtx_p.
13496 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13497 by a VEC_SELECT.
13498 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13499 (simplify_binary_operation_1): Extend CONST_INT handling to
13500 poly_int_rtx_p.
13501 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13502 than a HOST_WIDE_INT.
13503 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13504 poly_int64.
13505 (adjust_mems, add_stores): Update accodingly.
13506 (vt_canonicalize_addr): Track polynomial offsets.
13507 (emit_note_insn_var_location): Likewise.
13508 (vt_add_function_parameter): Likewise.
13509 (vt_initialize): Likewise.
13510
13511 2018-06-12 Jeff Law <law@redhat.com>
13512
13513 * config.gcc (alpha*-*-freebsd*): Remove.
13514 * config/alpha/freebsd.h: Remove.
13515
13516 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13517
13518 PR other/69968
13519 * spellcheck-tree.c (levenshtein_distance): Rename to...
13520 (get_edit_distance): ...this, and update for underlying renaming.
13521 * spellcheck-tree.h (levenshtein_distance): Rename to...
13522 (get_edit_distance): ...this.
13523 * spellcheck.c (levenshtein_distance): Rename to...
13524 (get_edit_distance): ...this. Convert from Levenshtein distance
13525 to Damerau-Levenshtein distance by supporting transpositions of
13526 adjacent characters. Rename "v1" to "v_next" and "v0" to
13527 "v_one_ago".
13528 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13529 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13530 update for underlying renaming.
13531 (selftest::levenshtein_distance_unit_test): Rename to...
13532 (selftest::test_get_edit_distance_unit): ...this, and update for
13533 underlying renaming.
13534 (selftest::test_find_closest_string): Add example from PR 69968
13535 where transposition helps
13536 (selftest::test_metric_conditions): Update for renaming.
13537 (selftest::test_metric_conditions): Likewise.
13538 (selftest::spellcheck_c_tests): Likewise.
13539 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13540 (get_edit_distance): ...this.
13541 (best_match::consider): Update for renaming.
13542
13543 2018-06-12 Martin Sebor <msebor@redhat.com>
13544
13545 PR tree-optimization/85259
13546 * builtins.c (compute_objsize): Handle constant offsets.
13547 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13548 true iff a warning has been issued.
13549 * gimple.h (gimple_nonartificial_location): New function.
13550 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13551 gimple_nonartificial_location and handle -Wno-system-headers.
13552 (handle_builtin_stxncpy): Same.
13553
13554 2018-06-12 Martin Sebor <msebor@redhat.com>
13555
13556 PR c/85931
13557 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13558
13559 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13560
13561 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13562 BUILTIN_VEC_XST entries for pointer to double and long long.
13563
13564 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13565
13566 PR target/85990
13567 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13568 Update comments.
13569 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13570 Likewise.
13571
13572 2018-06-12 Martin Liska <mliska@suse.cz>
13573
13574 * doc/options.texi: Document IntegerRange.
13575
13576 2018-06-12 Martin Liska <mliska@suse.cz>
13577
13578 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13579 * opt-functions.awk: Handle Deprecated flag.
13580 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13581 and report error.
13582 (read_cmdline_option): Report warning for a deprecated option.
13583 * opts.h (struct cl_option): Add new field cl_deprecated.
13584 (CL_ERR_DEPRECATED): New.
13585
13586 2018-06-12 Martin Liska <mliska@suse.cz>
13587
13588 * doc/options.texi: Document Deprecated option flag.
13589
13590 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13591
13592 * config/arc/arc-arch.h (arc_extras): New enum.
13593 (arc_cpu_t):Add field extra.
13594 (arc_cpu_types): Consider the extras.
13595 * config/arc/arc-cpus.def: Add extras info.
13596 * config/arc/arc-opts.h (processor_type): Consider extra field.
13597 * config/arc/arc.c (arc_override_options): Handle extra field.
13598
13599 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13600
13601 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13602 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13603 field.
13604 * config/arc/arc.c (arc_init): Update pic warning.
13605 (irq_range): Update irq range parsing warnings.
13606 (arc_override_options): Update various warning messages.
13607 (arc_handle_aux_attribute): Likewise.
13608
13609 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13610
13611 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13612
13613 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13614
13615 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13616 compiler messages directives.
13617
13618 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13619
13620 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13621 * config/mips/mips-tables.opt: Regenerate.
13622 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13623 mips64r6.
13624 * doc/invoke.texi: Document -march=i6500.
13625
13626 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13627
13628 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13629 (i6400_gpmul): Add cpu_unit.
13630 (i6400_gpdiv): Likewise.
13631 (i6400_msa_add_d): Update reservations.
13632 (i6400_msa_int_add) Likewise.
13633 (i6400_msa_short_logic3) Likewise.
13634 (i6400_msa_short_logic2) Likewise.
13635 (i6400_msa_short_logic) Likewise.
13636 (i6400_msa_move) Likewise.
13637 (i6400_msa_cmp) Likewise.
13638 (i6400_msa_short_float2) Likewise.
13639 (i6400_msa_div_d) Likewise.
13640 (i6400_msa_long_logic1) Likewise.
13641 (i6400_msa_long_logic2) Likewise.
13642 (i6400_msa_mult) Likewise.
13643 (i6400_msa_long_float2) Likewise.
13644 (i6400_msa_long_float4) Likewise.
13645 (i6400_msa_long_float5) Likewise.
13646 (i6400_msa_long_float8) Likewise.
13647 (i6400_fpu_fadd): Include frint type.
13648 (i6400_fpu_store): New define_insn_reservation.
13649 (i6400_fpu_load): Likewise.
13650 (i6400_fpu_move): Likewise.
13651 (i6400_fpu_fcmp): Likewise.
13652 (i6400_fpu_fmadd): Likewise.
13653 (i6400_int_mult): Include imul3nc type and update reservation.
13654 (i6400_int_div): Include idiv3 type and update reservation.
13655 (i6400_int_load): Update to check type not move_type.
13656 (i6400_int_store): Likewise.
13657 (i6400_int_prefetch): Set zero latency.
13658
13659 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13660
13661 * gcc.c: Document new %@{...} sequence.
13662 (LINK_COMMAND_SPEC): Use it for the -L switches.
13663 (cpp_unique_options): Use it for the -I switches.
13664 (at_file_argbuf): New global variable.
13665 (in_at_file): Likewise.
13666 (alloc_args): Create at_file_argbuf.
13667 (clear_args): Truncate at_file_argbuf.
13668 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13669 (open_at_file): New function.
13670 (close_at_file): Likewise.
13671 (create_at_file): Delete.
13672 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13673 <'o'>: Likewise.
13674 <'@'>: New case.
13675 (validate_switches_from_spec): Deal with %@{...} sequence.
13676 (validate_switches): Likewise.
13677 (driver::finalize): Call clear_args.
13678
13679 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13680
13681 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13682
13683 2018-06-11 Martin Sebor <msebor@redhat.com>
13684
13685 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13686 (Wno-class-memaccess): Add @opindex.
13687 (Wno-templates, Wno-multiple-inheritance): Same.
13688 (Wno-virtual-inheritance, Wno-namespaces): Same.
13689 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13690 (Wno-format-overflow, Wno-format-truncation): Same.
13691 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13692 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13693 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13694 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13695 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13696 (Wno-misspelled-isr): Same.
13697
13698 2018-06-11 Martin Sebor <msebor@redhat.com>
13699
13700 * PR tree-optimization/86083
13701 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13702
13703 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13704
13705 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13706
13707 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13708
13709 PR target/85755
13710 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13711 on the correct operand.
13712 (*movdi_internal64): Ditto.
13713
13714 2018-06-11 Martin Liska <mliska@suse.cz>
13715
13716 PR tree-optimization/86089
13717 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13718
13719 2018-06-11 Julia Koval <julia.koval@intel.com>
13720
13721 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13722 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13723 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13724
13725 2018-06-11 Olivier Hainque <hainque@adacore.com>
13726
13727 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13728 for Ada with strict dwarf2.
13729
13730 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13731
13732 PR target/85755
13733 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13734 addresses.
13735
13736 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13737
13738 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13739
13740 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13741
13742 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13743 TARGET_ELF.
13744
13745 2018-06-08 Martin Liska <mliska@suse.cz>
13746
13747 * tree-cfg.h (debug_function): Fix argument type to match
13748 implementation.
13749
13750 2018-06-08 Martin Liska <mliska@suse.cz>
13751
13752 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13753 Remove usage of MPX-related (and removed) fields.
13754 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13755
13756 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13757
13758 * cfg.c (debug): Use TDF_NONE rather than 0.
13759 * cfghooks.c (debug): Likewise.
13760 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13761 (struct dump_option_value_info): Convert to...
13762 (struct kv_pair): ...this template type.
13763 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13764 rather than 0.
13765 (optinfo_verbosity_options): Likewise.
13766 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13767 OPTGROUP_NONE.
13768 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13769 than int for "optgroup_flags" param.
13770 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13771 "dump_kind" param.
13772 (dump_dec): Likewise.
13773 (dump_finish): Use TDF_NONE rather than 0.
13774 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13775 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13776 than 0. Update for change to option_ptr.
13777 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13778 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13779 0. Update for changes to optinfo_verbosity_options and
13780 optgroup_options.
13781 (opt_info_switch_p): Convert optgroup_flags from int to
13782 optgroup_flags_t.
13783 (dump_basic_block): Use dump_flags_t rather than int
13784 for "dump_kind" param.
13785 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13786 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13787 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13788 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13789 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13790 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13791 TDF_NONE): Convert from macros to...
13792 (enum dump_flag): ...this new enum.
13793 (dump_flags_t): Update to use enum.
13794 (operator|, operator&, operator~, operator|=, operator&=):
13795 Implement for dump_flags_t.
13796 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13797 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13798 Convert from macros to...
13799 (enum optgroup_flag): ...this new enum.
13800 (optgroup_flags_t): New typedef.
13801 (operator|, operator|=): Implement for optgroup_flags_t.
13802 (struct dump_file_info): Convert field "alt_flags" to
13803 dump_flags_t. Convert field "optgroup_flags" to
13804 optgroup_flags_t.
13805 (dump_basic_block): Use dump_flags_t rather than int for param.
13806 (dump_generic_expr_loc): Likewise.
13807 (dump_dec): Likewise.
13808 (dump_register): Convert param "optgroup_flags" to
13809 optgroup_flags_t.
13810 (opt_info_enable_passes): Likewise.
13811 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13812 than 0.
13813 * gimple-pretty-print.c (debug): Likewise.
13814 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13815 (merged_store_group::apply_stores): Likewise.
13816 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13817 * gimple.c (verify_gimple_pp): Likewise.
13818 * graphite-poly.c (print_pbb_body): Likewise.
13819 * passes.c (pass_manager::register_one_dump_file): Convert
13820 local "optgroup_flags" to optgroup_flags_t.
13821 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13822 (debug): Likewise.
13823 (debug_body): Likewise.
13824 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13825 to optgroup_flags_t.
13826 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13827 than 0.
13828 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13829 (convert_mult_to_fma): Likewise.
13830 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13831 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13832 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13833 "dump_kind" to dump_flags_t.
13834
13835 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13836
13837 * config/rs6000/rs6000.c (min, max): Delete.
13838
13839 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13840
13841 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13842 -mabi=spe and -mabi=no-spe.
13843
13844 2018-06-08 Martin Liska <mliska@suse.cz>
13845
13846 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13847 where we expect an existing summary.
13848
13849 2018-06-08 Martin Liska <mliska@suse.cz>
13850
13851 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13852 * ipa-inline.h (estimate_edge_growth): Likewise.
13853
13854 2018-06-08 Martin Liska <mliska@suse.cz>
13855
13856 * cgraph.c (function_version_hasher::hash): Use
13857 cgraph_node::get_uid ().
13858 (function_version_hasher::equal):
13859 * cgraph.h (cgraph_node::get_uid): New method.
13860 * ipa-inline.c (update_caller_keys): Use
13861 cgraph_node::get_uid ().
13862 (update_callee_keys): Likewise.
13863 * ipa-utils.c (searchc): Likewise.
13864 (ipa_reduced_postorder): Likewise.
13865 * lto-cgraph.c (input_node): Likewise.
13866 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13867 * symbol-summary.h (symtab_insertion): Likewise.
13868 (symtab_removal): Likewise.
13869 (symtab_duplication): Likewise.
13870 * tree-pretty-print.c (dump_function_header): Likewise.
13871 * tree-sra.c (convert_callers_for_node): Likewise.
13872
13873 2018-06-08 Martin Liska <mliska@suse.cz>
13874
13875 * cgraph.c (symbol_table::create_edge): Always assign a new
13876 unique number.
13877 (symbol_table::free_edge): Do not recycle numbers.
13878 * cgraph.h (cgraph_edge::get): New method.
13879 * symbol-summary.h (symtab_removal): Use it.
13880 (symtab_duplication): Likewise.
13881 (call_summary::hashable_uid): Remove.
13882
13883 2018-06-08 Martin Liska <mliska@suse.cz>
13884
13885 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13886 (initialize_growth_caches): Remove.
13887 (free_growth_caches): Likewise.
13888 (do_estimate_edge_time): Use edge_growth_cache.
13889 (do_estimate_edge_size): Likewise.
13890 (do_estimate_edge_hints): Likewise.
13891 * ipa-inline.c (reset_edge_caches): Likewise.
13892 (recursive_inlining): Likewise.
13893 (inline_small_functions): Likewise.
13894 * ipa-inline.h (initialize_growth_caches): Remove.
13895 (estimate_edge_size): Likewise.
13896 (estimate_edge_time): Likewise.
13897 (estimate_edge_hints): Likewise.
13898 (reset_edge_growth_cache): Likewise.
13899 * symbol-summary.h (call_summary::remove): New method.
13900
13901 2018-06-08 Martin Liska <mliska@suse.cz>
13902
13903 * ipa-cp.c (class edge_clone_summary): New summary.
13904 (grow_edge_clone_vectors): Remove.
13905 (ipcp_edge_duplication_hook): Remove.
13906 (class edge_clone_summary_t): New call_summary class.
13907 (ipcp_edge_removal_hook): Remove.
13908 (edge_clone_summary_t::duplicate): New function.
13909 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13910 (create_specialized_node): Likewise.
13911 (ipcp_driver): Initialize edge_clone_summaries and do not
13912 register hooks.
13913
13914 2018-06-08 Martin Liska <mliska@suse.cz>
13915
13916 * symbol-summary.h (get): New function.
13917 (call_summary::m_initialize_when_cloning): New class member.
13918
13919 2018-06-08 Martin Liska <mliska@suse.cz>
13920
13921 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13922 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13923 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13924 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13925 (remove_cgraph_node_from_order): Use the removed_nodes set.
13926 (do_per_function_toporder): Likwise.
13927 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13928 instead of summary_uid.
13929 (symtab_removal): Likewise.
13930 (symtab_duplication): Likewise.
13931
13932 2018-06-08 Martin Liska <mliska@suse.cz>
13933
13934 * ipa-cp.c (ipcp_store_bits_results): Use
13935 ipcp_transformation_sum.
13936 (ipcp_store_vr_results): Likewise.
13937 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13938 to ...
13939 (ipcp_transformation_initialize): ... this.
13940 (ipa_set_node_agg_value_chain):
13941 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13942 (write_ipcp_transformation_info): Likewise.
13943 (read_ipcp_transformation_info): Likewise.
13944 (ipcp_update_bits): Likewise.
13945 (ipcp_update_vr): Likewise.
13946 (ipcp_transform_function): Likewise.
13947 * ipa-prop.h: Rename ipcp_transformation_summary to
13948 ipcp_transformation.
13949 (class ipcp_transformation_t): New function summary.
13950 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13951 (ipa_get_agg_replacements_for_node): Likewise.
13952
13953 2018-06-08 Martin Liska <mliska@suse.cz>
13954
13955 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13956 of struct.
13957 (class funct_state_summary_t): New function_summary class.
13958 (has_function_state): Remove.
13959 (get_function_state): Likewise.
13960 (set_function_state): Likewise.
13961 (add_new_function): Likewise.
13962 (funct_state_summary_t::insert): New function.
13963 (duplicate_node_data): Remove.
13964 (remove_node_data): Remove.
13965 (funct_state_summary_t::duplicate): New function.
13966 (register_hooks): Create new funct_state_summaries.
13967 (pure_const_generate_summary): Use it.
13968 (pure_const_write_summary): Likewise.
13969 (pure_const_read_summary): Likewise.
13970 (propagate_pure_const): Likewise.
13971 (propagate_nothrow): Likewise.
13972 (dump_malloc_lattice): Likewise.
13973 (propagate_malloc): Likewise.
13974 (execute): Do not register hooks, just remove summary
13975 instead.
13976 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13977 constructor.
13978
13979 2018-06-08 Martin Liska <mliska@suse.cz>
13980
13981 * ipa-reference.c (remove_node_data): Remove.
13982 (duplicate_node_data): Likewise.
13983 (class ipa_ref_var_info_summary_t): New class.
13984 (class ipa_ref_opt_summary_t): Likewise.
13985 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13986 (get_reference_optimization_summary): Use
13987 ipa_ref_opt_sum_summaries.
13988 (set_reference_vars_info): Remove.
13989 (set_reference_optimization_summary): Likewise.
13990 (ipa_init): Create summaries.
13991 (init_function_info): Use function summary.
13992 (ipa_ref_opt_summary_t::duplicate): New function.
13993 (ipa_ref_opt_summary_t::remove): New function.
13994 (get_read_write_all_from_node): Fix GNU coding style.
13995 (propagate): Use function summary.
13996 (write_node_summary_p): Fix GNU coding style.
13997 (stream_out_bitmap): Likewise.
13998 (ipa_reference_read_optimization_summary): Use function summary.
13999 (ipa_reference_c_finalize): Do not release hooks.
14000
14001 2018-06-08 Martin Liska <mliska@suse.cz>
14002
14003 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14004 (analyze_function_body): Extract multiple calls of get_create.
14005 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14006 * ipa-inline.c (recursive_inlining): Use ::get method.
14007 * ipa-inline.h (estimate_edge_growth): Likewise.
14008
14009 2018-06-08 Martin Liska <mliska@suse.cz>
14010
14011 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14012 HSA_INVALID.
14013 (hsa_function_summary::hsa_function_summary): Use the new enum
14014 value.
14015 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14016 * hsa-gen.c (hsa_get_host_function): Likewise.
14017 (get_brig_function_name): Likewise.
14018 * ipa-hsa.c (process_hsa_functions): Likewise.
14019 (ipa_hsa_write_summary): Likewise.
14020 * symbol-summary.h (symtab_duplication): Use ::get function/
14021 (get): New function.
14022
14023 2018-06-08 Martin Liska <mliska@suse.cz>
14024
14025 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14026 of get.
14027 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14028 (hsa_register_kernel): Likewise.
14029 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14030 * hsa-gen.c (hsa_get_host_function): Likewise.
14031 (get_brig_function_name): Likewise.
14032 (generate_hsa): Likewise.
14033 (pass_gen_hsail::execute): Likewise.
14034 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14035 (devirtualization_time_bonus): Likewise.
14036 (ipcp_propagate_stage): Likewise.
14037 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14038 (edge_set_predicate): Likewise.
14039 (evaluate_conditions_for_known_args): Likewise.
14040 (evaluate_properties_for_edge): Likewise.
14041 (ipa_fn_summary::reset): Likewise.
14042 (ipa_fn_summary_t::duplicate): Likewise.
14043 (dump_ipa_call_summary): Likewise.
14044 (ipa_dump_fn_summary): Likewise.
14045 (analyze_function_body): Likewise.
14046 (compute_fn_summary): Likewise.
14047 (estimate_edge_devirt_benefit): Likewise.
14048 (estimate_edge_size_and_time): Likewise.
14049 (estimate_calls_size_and_time): Likewise.
14050 (estimate_node_size_and_time): Likewise.
14051 (inline_update_callee_summaries): Likewise.
14052 (remap_edge_change_prob): Likewise.
14053 (remap_edge_summaries): Likewise.
14054 (ipa_merge_fn_summary_after_inlining): Likewise.
14055 (ipa_update_overall_fn_summary): Likewise.
14056 (read_ipa_call_summary): Likewise.
14057 (inline_read_section): Likewise.
14058 (write_ipa_call_summary): Likewise.
14059 (ipa_fn_summary_write): Likewise.
14060 (ipa_free_fn_summary): Likewise.
14061 * ipa-hsa.c (process_hsa_functions): Likewise.
14062 (ipa_hsa_write_summary): Likewise.
14063 (ipa_hsa_read_section): Likewise.
14064 * ipa-icf.c (sem_function::merge): Likewise.
14065 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14066 (do_estimate_edge_time): Likewise.
14067 (estimate_size_after_inlining): Likewise.
14068 (estimate_growth): Likewise.
14069 (growth_likely_positive): Likewise.
14070 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14071 (inline_call): Likewise.
14072 * ipa-inline.c (caller_growth_limits): Likewise.
14073 (can_inline_edge_p): Likewise.
14074 (can_inline_edge_by_limits_p): Likewise.
14075 (compute_uninlined_call_time): Likewise.
14076 (compute_inlined_call_time): Likewise.
14077 (want_inline_small_function_p): Likewise.
14078 (edge_badness): Likewise.
14079 (update_caller_keys): Likewise.
14080 (update_callee_keys): Likewise.
14081 (recursive_inlining): Likewise.
14082 (inline_small_functions): Likewise.
14083 (inline_to_all_callers_1): Likewise.
14084 (dump_overall_stats): Likewise.
14085 (early_inline_small_functions): Likewise.
14086 (early_inliner): Likewise.
14087 * ipa-inline.h (estimate_edge_growth): Likewise.
14088 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14089 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14090 * ipa-prop.h (IPA_NODE_REF): Likewise.
14091 (IPA_EDGE_REF): Likewise.
14092 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14093 (propagate_malloc): Likewise.
14094 * ipa-split.c (execute_split_functions): Likewise.
14095 * symbol-summary.h: Rename get to get_create.
14096 (get): Likewise.
14097 (get_create): Likewise.
14098 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14099
14100 2018-06-08 Martin Liska <mliska@suse.cz>
14101
14102 * symbol-summary.h (release): Move definition out of class
14103 declaration.
14104 (symtab_removal): Likewise.
14105 (symtab_duplication): Likewise.
14106
14107 2018-06-08 Martin Liska <mliska@suse.cz>
14108
14109 * symbol-summary.h (function_summary): Move constructor
14110 implementation out of class declaration.
14111 (release): Likewise.
14112 (symtab_insertion): Likewise.
14113 (symtab_removal): Likewise.
14114 (symtab_duplication): Likewise.
14115 (get): Likewise.
14116
14117 2018-06-08 Martin Liska <mliska@suse.cz>
14118
14119 * Makefile.in: Remove support for MPX (macros, related functions,
14120 fields in cgraph_node, ...).
14121 * builtin-types.def (BT_BND): Likewise.
14122 (BT_FN_BND_CONST_PTR): Likewise.
14123 (BT_FN_CONST_PTR_BND): Likewise.
14124 (BT_FN_VOID_PTR_BND): Likewise.
14125 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14126 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14127 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14128 (expand_builtin_mempcpy_with_bounds): Likewise.
14129 (expand_builtin_memset_with_bounds): Likewise.
14130 (expand_builtin_memset_args): Likewise.
14131 (std_expand_builtin_va_start): Likewise.
14132 (expand_builtin): Likewise.
14133 (expand_builtin_with_bounds): Likewise.
14134 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14135 (DEF_LIB_BUILTIN_CHKP): Likewise.
14136 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14137 (DEF_CHKP_BUILTIN): Likewise.
14138 (BUILT_IN_MEMCPY): Likewise.
14139 (BUILT_IN_MEMMOVE): Likewise.
14140 (BUILT_IN_MEMPCPY): Likewise.
14141 (BUILT_IN_MEMSET): Likewise.
14142 (BUILT_IN_STPCPY): Likewise.
14143 (BUILT_IN_STRCAT): Likewise.
14144 (BUILT_IN_STRCHR): Likewise.
14145 (BUILT_IN_STRCPY): Likewise.
14146 (BUILT_IN_STRLEN): Likewise.
14147 (BUILT_IN_MEMCPY_CHK): Likewise.
14148 (BUILT_IN_MEMMOVE_CHK): Likewise.
14149 (BUILT_IN_MEMPCPY_CHK): Likewise.
14150 (BUILT_IN_MEMSET_CHK): Likewise.
14151 (BUILT_IN_STPCPY_CHK): Likewise.
14152 (BUILT_IN_STRCAT_CHK): Likewise.
14153 (BUILT_IN_STRCPY_CHK): Likewise.
14154 * calls.c (store_bounds): Likewise.
14155 (emit_call_1): Likewise.
14156 (special_function_p): Likewise.
14157 (maybe_warn_nonstring_arg): Likewise.
14158 (initialize_argument_information): Likewise.
14159 (finalize_must_preallocate): Likewise.
14160 (compute_argument_addresses): Likewise.
14161 (expand_call): Likewise.
14162 * cfgexpand.c (expand_call_stmt): Likewise.
14163 (expand_return): Likewise.
14164 (expand_gimple_stmt_1): Likewise.
14165 (pass_expand::execute): Likewise.
14166 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14167 (cgraph_node::remove): Likewise.
14168 (cgraph_node::dump): Likewise.
14169 (cgraph_node::verify_node): Likewise.
14170 * cgraph.h (chkp_function_instrumented_p): Likewise.
14171 (symtab_node::get_alias_target): Likewise.
14172 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14173 (cgraph_local_p): Likewise.
14174 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14175 (cgraph_edge::rebuild_references): Likewise.
14176 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14177 (walk_polymorphic_call_targets): Likewise.
14178 (cgraph_node::expand_thunk): Likewise.
14179 (symbol_table::output_weakrefs): Likewise.
14180 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14181 (ix86_handle_option): Likewise.
14182 * config/i386/constraints.md: Likewise.
14183 * config/i386/i386-builtin-types.def (BND): Likewise.
14184 (VOID): Likewise.
14185 (PVOID): Likewise.
14186 (ULONG): Likewise.
14187 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14188 (BDESC_FIRST): Likewise.
14189 (BDESC): Likewise.
14190 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14191 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14192 * config/i386/i386.c (enum reg_class): Likewise.
14193 (ix86_target_string): Likewise.
14194 (ix86_option_override_internal): Likewise.
14195 (ix86_conditional_register_usage): Likewise.
14196 (ix86_valid_target_attribute_inner_p): Likewise.
14197 (ix86_set_indirect_branch_type): Likewise.
14198 (ix86_set_current_function): Likewise.
14199 (ix86_function_arg_regno_p): Likewise.
14200 (init_cumulative_args): Likewise.
14201 (ix86_function_arg_advance): Likewise.
14202 (ix86_function_arg): Likewise.
14203 (ix86_pass_by_reference): Likewise.
14204 (ix86_function_value_regno_p): Likewise.
14205 (ix86_function_value_1): Likewise.
14206 (ix86_function_value_bounds): Likewise.
14207 (ix86_return_in_memory): Likewise.
14208 (ix86_setup_incoming_vararg_bounds): Likewise.
14209 (ix86_va_start): Likewise.
14210 (indirect_thunk_need_prefix): Likewise.
14211 (print_reg): Likewise.
14212 (ix86_print_operand): Likewise.
14213 (ix86_expand_call): Likewise.
14214 (ix86_output_function_return): Likewise.
14215 (reg_encoded_number): Likewise.
14216 (BDESC_VERIFYS): Likewise.
14217 (ix86_init_mpx_builtins): Likewise.
14218 (ix86_init_builtins): Likewise.
14219 (ix86_emit_cmove): Likewise.
14220 (ix86_emit_move_max): Likewise.
14221 (ix86_expand_builtin): Likewise.
14222 (ix86_builtin_mpx_function): Likewise.
14223 (ix86_get_arg_address_for_bt): Likewise.
14224 (ix86_load_bounds): Likewise.
14225 (ix86_store_bounds): Likewise.
14226 (ix86_load_returned_bounds): Likewise.
14227 (ix86_store_returned_bounds): Likewise.
14228 (ix86_class_likely_spilled_p): Likewise.
14229 (ix86_hard_regno_mode_ok): Likewise.
14230 (x86_order_regs_for_local_alloc): Likewise.
14231 (ix86_mitigate_rop): Likewise.
14232 (ix86_bnd_prefixed_insn_p): Likewise.
14233 (ix86_mpx_bound_mode): Likewise.
14234 (ix86_make_bounds_constant): Likewise.
14235 (ix86_initialize_bounds): Likewise.
14236 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14237 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14238 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14239 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14240 (TARGET_CHKP_BOUND_MODE): Likewise.
14241 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14242 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14243 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14244 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14245 * config/i386/i386.h (TARGET_MPX): Likewise.
14246 (TARGET_MPX_P): Likewise.
14247 (VALID_BND_REG_MODE): Likewise.
14248 (FIRST_BND_REG): Likewise.
14249 (LAST_BND_REG): Likewise.
14250 (enum reg_class): Likewise.
14251 (BND_REG_P): Likewise.
14252 (BND_REGNO_P): Likewise.
14253 (BNDmode): Likewise.
14254 (ADJUST_INSN_LENGTH): Likewise.
14255 * config/i386/i386.md: Likewise.
14256 * config/i386/i386.opt: Likewise.
14257 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14258 (defined): Likewise.
14259 (LINK_MPX): Likewise.
14260 (MPX_SPEC): Likewise.
14261 (LIBMPX_SPEC): Likewise.
14262 (LIBMPXWRAPPERS_SPEC): Likewise.
14263 (CHKP_SPEC): Likewise.
14264 * config/i386/predicates.md: Likewise.
14265 * dbxout.c (dbxout_type): Likewise.
14266 * doc/extend.texi: Likewise.
14267 * doc/invoke.texi: Likewise.
14268 * doc/md.texi: Likewise.
14269 * doc/tm.texi: Likewise.
14270 * doc/tm.texi.in: Likewise.
14271 * dwarf2out.c (is_base_type): Likewise.
14272 (gen_formal_types_die): Likewise.
14273 (gen_subprogram_die): Likewise.
14274 (gen_type_die_with_usage): Likewise.
14275 (gen_decl_die): Likewise.
14276 (dwarf2out_late_global_decl): Likewise.
14277 * expr.c (expand_assignment): Likewise.
14278 (emit_storent_insn): Likewise.
14279 (store_expr_with_bounds): Likewise.
14280 (store_expr): Likewise.
14281 (expand_expr_real_1): Likewise.
14282 * expr.h (store_expr_with_bounds): Likewise.
14283 * function.c (use_register_for_decl): Likewise.
14284 (struct bounds_parm_data): Likewise.
14285 (assign_parms_augmented_arg_list): Likewise.
14286 (assign_parm_find_entry_rtl): Likewise.
14287 (assign_parm_is_stack_parm): Likewise.
14288 (assign_parm_load_bounds): Likewise.
14289 (assign_bounds): Likewise.
14290 (assign_parms): Likewise.
14291 (expand_function_start): Likewise.
14292 * gcc.c (CHKP_SPEC): Likewise.
14293 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14294 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14295 (wrestrict_dom_walker::check_call): Likewise.
14296 * gimple.c (gimple_build_call_from_tree): Likewise.
14297 * gimple.h (enum gf_mask): Likewise.
14298 (gimple_call_with_bounds_p): Likewise.
14299 (gimple_call_set_with_bounds): Likewise.
14300 * gimplify.c (gimplify_init_constructor): Likewise.
14301 * ipa-cp.c (initialize_node_lattices): Likewise.
14302 (propagate_constants_across_call): Likewise.
14303 (find_more_scalar_values_for_callers_subset): Likewise.
14304 * ipa-hsa.c (process_hsa_functions): Likewise.
14305 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14306 * ipa-icf.c (sem_function::merge): Likewise.
14307 * ipa-inline.c (early_inliner): Likewise.
14308 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14309 (warn_function_cold): Likewise.
14310 (propagate_pure_const): Likewise.
14311 * ipa-ref.h (enum GTY): Likewise.
14312 * ipa-split.c (find_retbnd): Likewise.
14313 (consider_split): Likewise.
14314 (split_function): Likewise.
14315 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14316 * ipa.c (walk_polymorphic_call_targets): Likewise.
14317 (symbol_table::remove_unreachable_nodes): Likewise.
14318 (process_references): Likewise.
14319 (cgraph_build_static_cdtor_1): Likewise.
14320 * lto-cgraph.c (lto_output_node): Likewise.
14321 (output_refs): Likewise.
14322 (compute_ltrans_boundary): Likewise.
14323 (input_overwrite_node): Likewise.
14324 (input_node): Likewise.
14325 (input_cgraph_1): Likewise.
14326 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14327 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14328 (class pass_chkp_instrumentation_passes): Likewise.
14329 (make_pass_chkp_instrumentation_passes): Likewise.
14330 * passes.def: Likewise.
14331 * rtl.h (struct GTY): Likewise.
14332 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14333 * stor-layout.c (layout_type): Likewise.
14334 * symtab.c: Likewise.
14335 * target.def: Likewise.
14336 * targhooks.c (default_chkp_bound_type): Likewise.
14337 (default_chkp_bound_mode): Likewise.
14338 (default_builtin_chkp_function): Likewise.
14339 (default_chkp_function_value_bounds): Likewise.
14340 (default_chkp_make_bounds_constant): Likewise.
14341 (default_chkp_initialize_bounds): Likewise.
14342 * targhooks.h (default_chkp_bound_type): Likewise.
14343 (default_chkp_bound_mode): Likewise.
14344 (default_builtin_chkp_function): Likewise.
14345 (default_chkp_function_value_bounds): Likewise.
14346 (default_chkp_make_bounds_constant): Likewise.
14347 (default_chkp_initialize_bounds): Likewise.
14348 * toplev.c (compile_file): Likewise.
14349 (process_options): Likewise.
14350 * tree-core.h (DEF_BUILTIN): Likewise.
14351 (DEF_BUILTIN_CHKP): Likewise.
14352 * tree-inline.c (declare_return_variable): Likewise.
14353 (remap_gimple_stmt): Likewise.
14354 (copy_bb): Likewise.
14355 (initialize_inlined_parameters): Likewise.
14356 (expand_call_inline): Likewise.
14357 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14358 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14359 (make_pass_ipa_chkp_produce_thunks): Likewise.
14360 (make_pass_chkp): Likewise.
14361 (make_pass_chkp_opt): Likewise.
14362 (make_pass_chkp_instrumentation_passes): Likewise.
14363 * tree-pretty-print.c (dump_generic_node): Likewise.
14364 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14365 * tree-ssa-dce.c (propagate_necessity): Likewise.
14366 (eliminate_unnecessary_stmts): Likewise.
14367 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14368 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14369 * tree-ssa-sccvn.h: Likewise.
14370 * tree-ssa-strlen.c (get_string_length): Likewise.
14371 (valid_builtin_call): Likewise.
14372 (adjust_last_stmt): Likewise.
14373 (handle_builtin_strchr): Likewise.
14374 (handle_builtin_strcpy): Likewise.
14375 (handle_builtin_stxncpy): Likewise.
14376 (handle_builtin_memcpy): Likewise.
14377 (handle_builtin_strcat): Likewise.
14378 (strlen_check_and_optimize_stmt): Likewise.
14379 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14380 * tree-streamer-in.c: Likewise.
14381 * tree-streamer.c (record_common_node): Likewise.
14382 * tree.c (tree_code_size): Likewise.
14383 (wide_int_to_tree_1): Likewise.
14384 (type_contains_placeholder_1): Likewise.
14385 (build_common_tree_nodes): Likewise.
14386 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14387 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14388 (POINTER_BOUNDS_P): Likewise.
14389 (BOUNDED_TYPE_P): Likewise.
14390 (BOUNDED_P): Likewise.
14391 (CALL_WITH_BOUNDS_P): Likewise.
14392 (pointer_bounds_type_node): Likewise.
14393 * value-prof.c (gimple_ic): Likewise.
14394 * var-tracking.c (vt_add_function_parameters): Likewise.
14395 * varasm.c (make_decl_rtl): Likewise.
14396 (assemble_start_function): Likewise.
14397 (output_constant): Likewise.
14398 (maybe_assemble_visibility): Likewise.
14399 * varpool.c (ctor_for_folding): Likewise.
14400 * chkp-builtins.def: Remove.
14401 * ipa-chkp.c: Remove.
14402 * ipa-chkp.h: Remove.
14403 * rtl-chkp.c: Remove.
14404 * rtl-chkp.h: Remove.
14405 * tree-chkp-opt.c: Remove.
14406 * tree-chkp.c: Remove.
14407 * tree-chkp.h: Remove.
14408
14409 2018-06-07 Carl Love <cel@us.ibm.com>
14410
14411 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14412 vextract_fp_from_shortl): Add BE support.
14413
14414 2018-06-07 Paul Koning <ni1d@arrl.net>
14415
14416 * compare-elim.c (try_merge_compare): Don't merge compare if
14417 address contains a side effect.
14418 (try_eliminate_compare): Likewise.
14419
14420 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14421
14422 * config.gcc: Support "tremont".
14423 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14424 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14425 PROCESSOR_TREMONT.
14426 * config/i386/i386.c (m_TREMONT): Define.
14427 (processor_target_table): Add "tremont".
14428 (PTA_TREMONT): Define.
14429 (ix86_lea_outperforms): Add TARGET_TREMONT.
14430 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14431 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14432 and M_INTEL_GOLDMONT_PLUS.
14433 (fold_builtin_cpu): Add "tremont".
14434 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14435 (ix86_option_override_internal): Add "tremont".
14436 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14437 (processor_type): Add PROCESSOR_TREMONT.
14438 * config/i386/x86-tune.def: Add m_TREMONT.
14439 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14440
14441 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14442
14443 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14444 symbol defined for msp430i* devices to be lower case.
14445
14446 2018-06-07 Richard Biener <rguenther@suse.de>
14447
14448 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14449 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14450 Properly wrap signed arithmetic if overflow wraps.
14451
14452 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14453
14454 PR tree-optimization/69615
14455 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14456 of a cast from a same precision integral SSA_NAME in a bb dominated
14457 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14458 cast to utype if rhs2 has already a compatible type.
14459
14460 2018-06-07 Richard Biener <rguenther@suse.de>
14461
14462 PR tree-optimization/85935
14463 * graphite-scop-detection.c (find_params_in_bb): Analyze
14464 condition operands with respect to the correct loop. Assert
14465 the analysis doesn't fail.
14466
14467 2018-06-04 Carl Love <cel@us.ibm.com>
14468
14469 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14470 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14471 as it is slightly cheaper.
14472 (first_match_or_eos_index_<mode>):
14473 Calculate index using natural element order.
14474 (first_match_index_<mode>):
14475 Calculate index using natural element order.
14476 (first_match_or_eos_index_<mode>):
14477 Calculate index using natural order.
14478 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14479 for BE and LE modes.
14480 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14481 P9V_BUILTIN_VCLZLSBB_V16QI.
14482 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14483 specific.
14484
14485 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14486
14487 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14488 indentation and line wrap for many prototypes. Add missing
14489 @smallexample directives around block of prototypes for vec_xl and
14490 vec_xst.
14491
14492 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14493
14494 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14495 track if we pass or return IEEE 128-bit floating point.
14496 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14497 C++ mangling that is compatible with GCC 8.1.
14498 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14499 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14500 floating point types.
14501 (rs6000_function_arg_advance_1): Likewise.
14502 (rs6000_mangle_type): Optionally generate mangled names that match
14503 what GCC 8.1 generated for IEEE 128-bit floating point types.
14504 (rs6000_globalize_decl_name): If we have an external function that
14505 passes or returns IEEE 128-bit types, generate a weak reference
14506 from the mangled name used in GCC 8.1 to the current mangled
14507 name.
14508 (rs6000_init_builtins): Make __ibm128 use the long double type if
14509 long double is IBM extended double. Make __float128 use the long
14510 double type if long double is IEEE 128-bit.
14511
14512 PR target/85657
14513 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14514 macro for __ibm128 built-in functions.
14515 (PACK_IF): Add __ibm128 pack/unpack functions.
14516 (UNPACK_IF): Likewise.
14517 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14518 enable long double built-in functions if long double is IEEE
14519 128-bit floating point.
14520 (rs6000_invalid_builtin): Update long double built-in function
14521 error message.
14522 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14523 functions, adjust the built-in function to use the long double
14524 built-in function if __ibm128 and long double are the same type.
14525 * doc/extend.texi (PowerPC builtins): Update documention for
14526 __builtin_{,un}pack_longdouble. Add documentation for
14527 __builtin_{,un}pack_ibm128.
14528
14529 2018-06-06 Jim Wilson <jimw@sifive.com>
14530
14531 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14532 (struct machine_function): New field interrupt_mode.
14533 (riscv_handle_type_attribute): New function. Add forward declaration.
14534 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14535 (riscv_expand_epilogue): Check interrupt_mode field.
14536 (riscv_set_current_function): Check interrupt attribute args and
14537 set interrupt_mode field.
14538 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14539 (riscv_sret, riscv_uret): New.
14540 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14541 new arguments to interrupt attribute.
14542
14543 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14544
14545 PR target/63177
14546 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14547 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14548
14549 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14550
14551 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14552 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14553 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14554 several redundant entries.
14555
14556 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14557
14558 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14559 type from "rtx" to "rtx_insn *".
14560 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14561 for local "call_insn", removing cast.
14562 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14563
14564 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14565
14566 PR tree-optimization/86066
14567 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14568 for BIT_INSERT_EXPR stores.
14569
14570 2018-06-06 Richard Biener <rguenther@suse.de>
14571
14572 PR tree-optimization/86062
14573 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14574 component refs ontop
14575 of to be offsetted base.
14576
14577 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14578
14579 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14580 to be static and remove check on interrupt attribute name.
14581
14582 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14583
14584 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14585 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14586
14587 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14588
14589 PR target/79924
14590 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14591 second argument.
14592 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14593 Remove second argument, change how error is called.
14594 (aarch64_layout_arg): Remove second argument from
14595 aarch64_err_no_fpadvsimd call.
14596 (aarch64_init_cumulative_args): Ditto.
14597 (aarch64_gimplify_va_arg_expr): Ditto.
14598 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14599
14600 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14601
14602 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14603 (*simple_return_indirect_internal<mode>): Rename from
14604 simple_return_indirect_internal. Use W mode iterator.
14605 (rstorssp): New expander.
14606 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14607 (clrssbsy): New expander.
14608 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14609
14610 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14611
14612 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14613 __typeof__.
14614 (cmse_check_pointed_object): Likewise.
14615
14616 2018-06-05 Martin Liska <mliska@suse.cz>
14617
14618 PR gcov-profile/47618
14619 * doc/invoke.texi: Document how -fprofile-dir format
14620 is extended.
14621
14622 2018-06-05 Richard Biener <rguenther@suse.de>
14623
14624 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14625 removal pretend DOM info isn't available so we do not update
14626 it and only remove edges, not dominated blocks. Actually free
14627 DOM info in case we removed something. Remove unreachable blocks.
14628 (mfb_keep_latches): Work with either DOM info or marked backedges.
14629 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14630 first. Mark backedges if DOM info isn't available.
14631 (Re-)compute DOM info after cleanup_control_flow_pre.
14632
14633 2018-06-05 Richard Biener <rguenther@suse.de>
14634
14635 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14636 (locus_discrim_hasher::hash): Adjust.
14637 (locus_discrim_hasher::equal): Likewise.
14638 (next_discriminator_for_locus): Work on line directly.
14639 (same_line_p): Pass in expanded locus1 as well.
14640 (assign_discriminators): Avoid redundant location expansions.
14641
14642 2018-06-05 Richard Biener <rguenther@suse.de>
14643
14644 PR tree-optimization/86046
14645 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14646 if required after clearing TREE_ADDRESSABLE.
14647
14648 2018-06-05 Richard Biener <rguenther@suse.de>
14649
14650 PR tree-optimization/86047
14651 * tree-ssa-loop.c (for_each_index): Glob handling of all
14652 decls and constants and really handle all of them.
14653
14654 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14655
14656 PR target/81497
14657 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14658 qualifier_void_pointer and qualifier_const_void_pointer.
14659 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14660 (arm_init_builtins): Handle the above.
14661 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14662 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14663 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14664 void intrinsics.
14665
14666 2018-06-05 Martin Liska <mliska@suse.cz>
14667
14668 * auto-profile.c (read_autofdo_file): Do not use
14669 gcov_ctr_summary struct.
14670 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14671 * coverage.c (struct counts_entry): Likewise.
14672 (read_counts_file): Read just single summary entry.
14673 (get_coverage_counts): Use gcov_summary struct.
14674 * coverage.h (get_coverage_counts): Likewise.
14675 * gcov-dump.c (dump_working_sets): Likewise.
14676 (tag_summary): Dump just single summary.
14677 * gcov-io.c (gcov_write_summary): Write just histogram
14678 summary.
14679 (gcov_read_summary): Read just single summary.
14680 (compute_working_sets): Use gcov_summary struct.
14681 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14682 of GCOV_COUNTERS_SUMMABLE.
14683 (GCOV_COUNTERS_SUMMABLE): Remove.
14684 (GCOV_FIRST_VALUE_COUNTER): Replace with
14685 GCOV_COUNTER_V_INTERVAL.
14686 (struct gcov_ctr_summary): Remove.
14687 (struct gcov_summary): Directly use fields of former
14688 gcov_ctr_summary.
14689 (compute_working_sets): Use gcov_summary struct.
14690 * gcov.c (read_count_file): Do not use ctrs fields.
14691 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14692 struct.
14693 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14694 struct.
14695 * profile.c: Likewise.
14696 * profile.h: Likewise.
14697
14698 2018-06-05 Martin Liska <mliska@suse.cz>
14699
14700 PR gcov-profile/84846
14701 * gcov.c (output_lines): Print working directory only
14702 in intermediate format.
14703
14704 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14705
14706 * config/s390/s390-builtin-types.def: Add void function type.
14707 * config/s390/s390-builtins.def: Use the function type for the
14708 tbeginc builtin.
14709
14710 2018-06-04 Jim Wilson <jimw@sifive.com>
14711
14712 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14713 to int.
14714 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14715 and maybe_eh_return. Change regno to unsigned int. Use new args to
14716 handle EH_RETURN_DATA_REGNO registers properly.
14717 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14718 (riscv_expand_epilogue): Update comment. Change argument name and
14719 type. Update code to use new name and type. Pass new args to
14720 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14721 EXCEPTION_RETURN.
14722 * config/riscv/riscv.md (NORMAL_RETURN): New.
14723 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14724 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14725 (eh_return): Call gen_eh_return_internal and emit barrier.
14726 (eh_return_internal): Call riscv_expand_epilogue.
14727
14728 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14729
14730 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14731 bit_insertion field and declare can_be_merged_into method.
14732 (merged_store_group::can_be_merged_into): New method.
14733 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14734 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14735 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14736
14737 2018-06-04 Richard Biener <rguenther@suse.de>
14738
14739 PR tree-optimization/85955
14740 * builtins.c (fold_builtin_sincos): Convert pointers to
14741 destination to appropriate type before dereferencing.
14742
14743 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14744
14745 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14746
14747 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14748
14749 * expr.c (expand_expr_real_1): Force the operand into memory if
14750 its TYPE_MODE is BLKmode and if there is no integer mode for
14751 the number of bits being extracted.
14752
14753 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14754
14755 PR target/85832
14756 PR target/86036
14757 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14758 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14759
14760 2018-06-04 Richard Biener <rguenther@suse.de>
14761
14762 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14763 (cleanup_tree_cfg_noloop): ... single caller. Do
14764 start_recording_case_labels later.
14765
14766 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14767
14768 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14769 to _IMMINTRIN_H_INCLUDED.
14770 * config/i386/pconfigintrin.h: Ditto.
14771 * config/i386/waitpkgintrin.h: Ditto.
14772 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14773 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14774 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14775 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14776 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14777 waitpkgintrin.h and cldemoteintrin.h.
14778
14779 2018-06-04 Richard Biener <rguenther@suse.de>
14780
14781 PR tree-optimization/86038
14782 * tracer.c (find_best_successor): Check probability for
14783 being initialized, bail out if not.
14784
14785 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14786
14787 PR target/86003
14788 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14789 of bits to ignore when comparing architectures.
14790
14791 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14792
14793 PR tree-optimization/69615
14794 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14795 maximum or minimum of the type, try to merge it also as if
14796 range1 is + [-, x - 1] or + [x + 1, -].
14797
14798 PR c++/86025
14799 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14800
14801 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14802
14803 PR tree-optimization/86034
14804 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14805 the unsigned bitfield type in a bit insertion sequence if it does not
14806 have a larger precision than the bitfield size.
14807 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14808
14809 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14810
14811 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14812
14813 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14814
14815 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14816 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14817 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14818 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14819
14820 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14821
14822 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14823 Disable -fdelete-null-pointer-checks for ELF toolchain.
14824
14825 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14826 Kito Cheng <kito.cheng@gmail.com>
14827
14828 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14829 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14830 (nds32*-*-*): Add glibc and uclibc conditions.
14831 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14832 (TARGET_EXCEPT_UNWIND_INFO): Define.
14833 * config/nds32/elf.h: New file.
14834 * config/nds32/linux.h: New file.
14835 * config/nds32/nds32-elf.opt: New file.
14836 * config/nds32/nds32-linux.opt: New file.
14837 * config/nds32/nds32-fp-as-gp.c
14838 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14839 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14840 TARGET_LINUX_ABI.
14841 (nds32_asm_file_end): Ditto.
14842 (nds32_print_operand): Ditto.
14843 (nds32_insert_attributes): Ditto.
14844 (nds32_init_libfuncs): New function.
14845 (TARGET_HAVE_TLS): Define.
14846 (TARGET_INIT_LIBFUNCS): Define.
14847 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14848 spec content.
14849 (TARGET_ELF): Apply different mcmodel setting.
14850 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14851 been migrated into elf.h and linux.h files.
14852 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14853 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14854 (mcmodel): The content has been migrated into nds32-elf.opt and
14855 nds32-linux.opt files.
14856 * config/nds32/t-elf: New file.
14857 * config/nds32/t-linux: New file.
14858
14859 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14860 Shiva Chen <shiva0217@gmail.com>
14861
14862 * config/nds32/constants.md (unspec_volatile_element): Add
14863 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14864 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14865 optimization.
14866 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14867 (make_pass_nds32_fp_as_gp): Declare.
14868 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14869 optmization pass.
14870 (nds32_asm_function_end_prologue): Remove unused asm output.
14871 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14872 (nds32_asm_file_start): Output necessary fp_as_gp information.
14873 (nds32_option_override): Adjust register usage.
14874 (nds32_expand_prologue): Consider fp_as_gp situation.
14875 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14876 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14877 (epilogue): Ditto.
14878 (return): Ditto.
14879 (simple_return): Ditto.
14880 (omit_fp_begin): Output special directive for fp_as_gp.
14881 (omit_fp_end): Output special directive for fp_as_gp.
14882 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14883 mforbid-fp-as-gp): New options.
14884
14885 2018-06-01 Mark Wielaard <mark@klomp.org>
14886
14887 * dwarf2out.c (dwarf2out_finish): Remove generation of
14888 DW_AT_loclists_base.
14889
14890 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14891
14892 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14893 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14894 (struct merged_store_group): Add bit_insertion field.
14895 (dump_char_array): Use standard hexadecimal format.
14896 (merged_store_group::merged_store_group): Set bit_insertion to false.
14897 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14898 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14899 also print the mask in the dump file.
14900 (pass_store_merging::gate): Minor tweak.
14901 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14902 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14903 stores with INTEGER_CST stores.
14904 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14905 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14906 and use it throughout. Generate bit insertion sequences if need be.
14907 (pass_store_merging::process_store): Remove redundant condition.
14908 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14909
14910 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14911
14912 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14913 the 128-bit floating point types. Fix function comment.
14914
14915 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14916
14917 * config/aarch64/aarch64-simd.md
14918 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14919 mnemonics.
14920 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14921 mnemonics.
14922
14923 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14924
14925 PR tree-optimization/85989
14926 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14927 variable.
14928 (backprop::intersect_uses): Check it when deciding whether this
14929 is a backedge reference.
14930 (backprop::process_block): Add each phi to m_visited_phis
14931 after visiting it, then clear it at the end.
14932
14933 2018-06-01 Richard Biener <rguenther@suse.de>
14934
14935 * tree-vectorizer.h (vect_dr_stmt): New function.
14936 (vect_get_load_cost): Adjust.
14937 (vect_get_store_cost): Likewise.
14938 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14939 Use vect_dr_stmt instead of DR_SMTT.
14940 (vect_record_base_alignments): Likewise.
14941 (vect_calculate_target_alignment): Likewise.
14942 (vect_compute_data_ref_alignment): Likewise and make static.
14943 (vect_update_misalignment_for_peel): Likewise.
14944 (vect_verify_datarefs_alignment): Likewise.
14945 (vector_alignment_reachable_p): Likewise.
14946 (vect_get_data_access_cost): Likewise. Pass down
14947 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14948 (vect_get_peeling_costs_all_drs): Likewise.
14949 (vect_peeling_hash_get_lowest_cost): Likewise.
14950 (vect_enhance_data_refs_alignment): Likewise.
14951 (vect_find_same_alignment_drs): Likewise.
14952 (vect_analyze_data_refs_alignment): Likewise.
14953 (vect_analyze_group_access_1): Likewise.
14954 (vect_analyze_group_access): Likewise.
14955 (vect_analyze_data_ref_access): Likewise.
14956 (vect_analyze_data_ref_accesses): Likewise.
14957 (vect_vfa_segment_size): Likewise.
14958 (vect_small_gap_p): Likewise.
14959 (vectorizable_with_step_bound_p): Likewise.
14960 (vect_prune_runtime_alias_test_list): Likewise.
14961 (vect_analyze_data_refs): Likewise.
14962 (vect_supportable_dr_alignment): Likewise.
14963 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14964 (vect_gen_prolog_loop_niters): Likewise.
14965 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14966 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14967 modify DR_STMT.
14968 (vect_recog_mask_conversion_pattern): Likewise.
14969 (vect_try_gather_scatter_pattern): Likewise.
14970 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14971 to vect_get_store_cost.
14972 (vect_get_store_cost): Get stmt_info instead of DR.
14973 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14974 (vect_get_load_cost): Get stmt_info instead of DR.
14975
14976 2018-06-01 Richard Biener <rguenther@suse.de>
14977
14978 PR middle-end/86017
14979 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14980 vars wrapped in MEM_REFs.
14981
14982 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14983
14984 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14985 Fix subreg tests so that we only return a choice between
14986 GENERAL_REGS and FP_REGS if the original classes included both.
14987
14988 2018-06-01 Richard Biener <rguenther@suse.de>
14989
14990 PR ipa/85960
14991 * tree-ssa-structalias.c (get_function_part_constraint):
14992 Handle NULL fi->decl.
14993 (find_func_aliases_for_call): Properly handle indirect
14994 fi from direct call.
14995 (find_func_clobbers): Likewise.
14996 (ipa_pta_execute): Likewise.
14997 (create_variable_info_for): For functions that are ifunc_resolver
14998 resolve to a varinfo that contains the result of the resolver call.
14999 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15000 aliases.
15001
15002 2018-05-31 Michael Collison <michael.collison@arm.com>
15003
15004 * config/aarch64/aarch64.md:
15005 (*fix_to_zero_extenddfdi2): New pattern.
15006 * gcc.target/aarch64/fix_extend1.c: New testcase.
15007
15008 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15009
15010 PR middle-end/78809
15011 PR middle-end/83026
15012 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15013 and BUILT_IN_STRNCMP_EQ.
15014 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15015 BUILT_IN_STRNCMP_EQ.
15016 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15017 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15018 (gimple_fold_builtin): Likewise.
15019 * tree-ssa-strlen.c (compute_string_length): New function.
15020 (determine_min_obsize): New function.
15021 (handle_builtin_string_cmp): New function to handle calls to
15022 string compare functions.
15023 (strlen_optimize_stmt): Add handling to builtin string compare
15024 calls.
15025 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15026 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15027 * tree.c (build_common_builtin_nodes): Add new defines of
15028 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15029
15030 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15031
15032 PR target/85984
15033 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15034 functions with naked attribute.
15035
15036 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15037
15038 * config/i386/sse.md (avx_vec_concat<mode>):
15039 Substitute concat_tg_mode mode attribute with xtg_mode.
15040 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15041 (concat_tg_mode): Remove mode attribute.
15042
15043 2018-05-31 Martin Sebor <msebor@redhat.com>
15044
15045 PR c/82063
15046 * calls.c (alloc_max_size): Correct a logic error/typo.
15047 Treat excessive arguments as infinite. Warn for invalid arguments.
15048 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15049
15050 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15051
15052 PR target/85829
15053 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15054 and movx for Haswell.
15055
15056 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15057 Cesar Philippidis <cesar@codesourcery.com>
15058
15059 PR middle-end/85879
15060 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15061 when emitting error on private/firstprivate reductions.
15062 * omp-low.c (lower_omp_target): Avoid reference-type processing
15063 on pointers for firstprivate clause.
15064
15065 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15066
15067 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15068 (st1x2): Likewise.
15069 (st1x3): Likewise.
15070 * config/aarch64/aarch64-simd.md
15071 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15072 (aarch64_ld1_x3_<mode>): Likewise
15073 (aarch64_st1x2<VALLDIF:mode>): Likewise
15074 (aarch64_st1_x2_<mode>): Likewise
15075 (aarch64_st1x3<VALLDIF:mode>): Likewise
15076 (aarch64_st1_x3_<mode>): Likewise
15077 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15078 (vld1_s8_x3): Likewise.
15079 (vld1_u16_x3): Likewise.
15080 (vld1_s16_x3): Likewise.
15081 (vld1_u32_x3): Likewise.
15082 (vld1_s32_x3): Likewise.
15083 (vld1_u64_x3): Likewise.
15084 (vld1_s64_x3): Likewise.
15085 (vld1_f16_x3): Likewise.
15086 (vld1_f32_x3): Likewise.
15087 (vld1_f64_x3): Likewise.
15088 (vld1_p8_x3): Likewise.
15089 (vld1_p16_x3): Likewise.
15090 (vld1_p64_x3): Likewise.
15091 (vld1q_u8_x3): Likewise.
15092 (vld1q_s8_x3): Likewise.
15093 (vld1q_u16_x3): Likewise.
15094 (vld1q_s16_x3): Likewise.
15095 (vld1q_u32_x3): Likewise.
15096 (vld1q_s32_x3): Likewise.
15097 (vld1q_u64_x3): Likewise.
15098 (vld1q_s64_x3): Likewise.
15099 (vld1q_f16_x3): Likewise.
15100 (vld1q_f32_x3): Likewise.
15101 (vld1q_f64_x3): Likewise.
15102 (vld1q_p8_x3): Likewise.
15103 (vld1q_p16_x3): Likewise.
15104 (vld1q_p64_x3): Likewise.
15105 (vst1_s64_x2): Likewise.
15106 (vst1_u64_x2): Likewise.
15107 (vst1_f64_x2): Likewise.
15108 (vst1_s8_x2): Likewise.
15109 (vst1_p8_x2): Likewise.
15110 (vst1_s16_x2): Likewise.
15111 (vst1_p16_x2): Likewise.
15112 (vst1_s32_x2): Likewise.
15113 (vst1_u8_x2): Likewise.
15114 (vst1_u16_x2): Likewise.
15115 (vst1_u32_x2): Likewise.
15116 (vst1_f16_x2): Likewise.
15117 (vst1_f32_x2): Likewise.
15118 (vst1_p64_x2): Likewise.
15119 (vst1q_s8_x2): Likewise.
15120 (vst1q_p8_x2): Likewise.
15121 (vst1q_s16_x2): Likewise.
15122 (vst1q_p16_x2): Likewise.
15123 (vst1q_s32_x2): Likewise.
15124 (vst1q_s64_x2): Likewise.
15125 (vst1q_u8_x2): Likewise.
15126 (vst1q_u16_x2): Likewise.
15127 (vst1q_u32_x2): Likewise.
15128 (vst1q_u64_x2): Likewise.
15129 (vst1q_f16_x2): Likewise.
15130 (vst1q_f32_x2): Likewise.
15131 (vst1q_f64_x2): Likewise.
15132 (vst1q_p64_x2): Likewise.
15133 (vst1_s64_x3): Likewise.
15134 (vst1_u64_x3): Likewise.
15135 (vst1_f64_x3): Likewise.
15136 (vst1_s8_x3): Likewise.
15137 (vst1_p8_x3): Likewise.
15138 (vst1_s16_x3): Likewise.
15139 (vst1_p16_x3): Likewise.
15140 (vst1_s32_x3): Likewise.
15141 (vst1_u8_x3): Likewise.
15142 (vst1_u16_x3): Likewise.
15143 (vst1_u32_x3): Likewise.
15144 (vst1_f16_x3): Likewise.
15145 (vst1_f32_x3): Likewise.
15146 (vst1_p64_x3): Likewise.
15147 (vst1q_s8_x3): Likewise.
15148 (vst1q_p8_x3): Likewise.
15149 (vst1q_s16_x3): Likewise.
15150 (vst1q_p16_x3): Likewise.
15151 (vst1q_s32_x3): Likewise.
15152 (vst1q_s64_x3): Likewise.
15153 (vst1q_u8_x3): Likewise.
15154 (vst1q_u16_x3): Likewise.
15155 (vst1q_u32_x3): Likewise.
15156 (vst1q_u64_x3): Likewise.
15157 (vst1q_f16_x3): Likewise.
15158 (vst1q_f32_x3): Likewise.
15159 (vst1q_f64_x3): Likewise.
15160 (vst1q_p64_x3): Likewise.
15161
15162 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15163
15164 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15165 user_label_prefix to name.
15166
15167 * tree-core.h: Update comment about the format of NAME string
15168 passed to handler in attribute_spec.
15169
15170 * config/msp430/msp430.md: Remove erroneous subreg expression from
15171 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15172 zero_extend{q,h}isi2.
15173
15174 2018-05-30 Borislav Petkov <bp@suse.de>
15175
15176 * doc/extend.texi: Document some architecture specific
15177 constraints and sort entries.
15178
15179 2018-05-30 Martin Sebor <msebor@redhat.com>
15180
15181 PR middle-end/85369
15182 * builtins.c (expand_builtin_stpcpy_1): New function.
15183 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15184 only if the former succeeds.
15185
15186 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15187
15188 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15189 in saphira.
15190
15191 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15192
15193 * doc/invoke.texi (-flinker-output): Document
15194
15195 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15196
15197 * passes.c (ipa_write_summaries): Only modify statements if body
15198 is in memory.
15199 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15200 incrementally linking.
15201 (ipa_passes): Likewise.
15202 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15203 pass down resolution info.
15204 * common.opt (flag_incremental_link): Update info.
15205 * gcc.c (plugin specs): Turn flinker-output=* to
15206 -plugin-opt=-linker-output-known
15207 * toplev.c (compile_file): Also cut compilation when doing incremental
15208 link.
15209 * flag-types. (enum lto_partition_model): Add
15210 LTO_LINKER_OUTPUT_NOLTOREL.
15211 (invoke.texi): Add -flinker-output docs.
15212 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15213 link same way as WPA; do not stream in dead initializers.
15214
15215 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15216 darf2out_register_external_decl): Support incremental link.
15217
15218 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15219
15220 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15221
15222 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15223
15224 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15225 it down to simple_object_copy_lto_debug_sections.
15226 (run_gcc): Determine incremental LTO link time and configure
15227 lto1 into non-wpa mode, disable renaming of debug sections.
15228
15229 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15230
15231 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15232 descriptions of various incorrectly documented functions.
15233
15234 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15235
15236 Revert:
15237 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15238 address check not strict.
15239
15240 2018-05-30 Richard Biener <rguenther@suse.de>
15241
15242 PR tree-optimization/85964
15243 * tracer.c (better_p): Drop initialized count check, we only
15244 call the function with initialized counts now.
15245 (find_best_successor): Do find a best edge if one
15246 has uninitialized count.
15247 (find_best_predecessor): Likewise. Do BB frequency check only
15248 if count is initialized.
15249
15250 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15251
15252 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15253 (aarch64_ldrstr_offset_compare): New.
15254 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15255 load/store orderings.
15256 (aarch64_gen_adjusted_ldpstp): Likewise.
15257
15258 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15259
15260 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15261 Check for subset of GENERAL_REGS and FP_REGS.
15262 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15263 r=w alternative.
15264
15265 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15266
15267 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15268 and wi::to_poly_offset. Add the current offset and then check
15269 whether the sum fits, rather than using an unchecked addition of
15270 a checked term. Check for a shwi rather than a uhwi.
15271 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15272 (store_constructor): Use poly_int_tree_p.
15273 (expand_expr_real_1): Likewise.
15274 * function.c (assign_temp): Likewise.
15275 * fold-const.c (const_binop): Use poly_int_tree_p and
15276 wi::to_poly_offset.
15277 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15278 division.
15279 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15280 to_poly_offset for MEM offsets.
15281 * ipa-icf.c (sem_variable::equals): Likewise.
15282 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15283 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15284 wi::to_poly_offset for BIT_FIELD_REF offsets.
15285 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15286 wi::to_poly_offset.
15287 * var-tracking.c (emit_note_insn_var_location): Use
15288 tree_to_poly_uint64.
15289
15290 2018-05-29 Jim Wilson <jimw@sifive.com>
15291
15292 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15293
15294 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15295
15296 PR target/85950
15297 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15298 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15299 sequence.
15300 (sse4_1_round<mode>2): Use nonimmediate_operand
15301 for operand 1 predicate.
15302
15303 2018-05-29 Martin Sebor <msebor@redhat.com>
15304 Richard Biener <rguenther@suse.de>
15305
15306 PR testsuite/85888
15307 * calls.c (get_size_range): Call determine_value_range instead
15308 of get_value_range..
15309 * tree-vrp.h (determine_value_range): Declared new function.
15310 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15311
15312 2018-05-29 Richard Biener <rguenther@suse.de>
15313
15314 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15315 sure to use non-pattern stmts for get_earlier_stmt arguments.
15316 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15317 called on pattern stmts.
15318 (get_later_stmt): Likewise.
15319
15320 2018-05-29 Martin Liska <mliska@suse.cz>
15321
15322 PR gcov-profile/85759
15323 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15324 env variables.
15325
15326 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15327
15328 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15329 VEC_UNPACK_*_EXPR.
15330 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15331 VEC_PACK_*_EXPR.
15332
15333 PR target/85918
15334 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15335 VEC_PACK_FLOAT_EXPR): New tree codes.
15336 * tree-pretty-print.c (op_code_prio): Handle
15337 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15338 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15339 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15340 * tree-inline.c (estimate_operator_cost): Likewise.
15341 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15342 * fold-const.c (const_binop): Likewise.
15343 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15344 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15345 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15346 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15347 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15348 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15349 * expr.c (expand_expr_real_2): Likewise.
15350 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15351 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15352 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15353 optabs.
15354 * optabs.c (expand_widen_pattern_expr): For
15355 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15356 sign from result type rather than operand's type.
15357 (expand_binop_directly): For vec_packu_float_optab and
15358 vec_packs_float_optab allow result type to be different from operand's
15359 type.
15360 * optabs-tree.c (optab_for_tree_code): Handle
15361 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15362 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15363 * tree-vect-generic.c (expand_vector_operations_1): Handle
15364 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15365 VEC_PACK_FLOAT_EXPR.
15366 * tree-vect-stmts.c (supportable_widening_operation): Handle
15367 FIX_TRUNC_EXPR.
15368 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15369 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15370 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15371 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15372 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15373 mode attributes.
15374 (vec_pack<floatprefix>_float_<mode>): New expander.
15375 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15376 attributes.
15377 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15378 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15379 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15380 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15381 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15382 Document.
15383 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15384 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15385 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15386 VEC_PACK_FLOAT_EXPR): Document.
15387
15388 2018-05-29 Richard Biener <rguenther@suse.de>
15389
15390 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15391 member.
15392 (stmt_vec_info_vec): Make pointer.
15393 (init_stmt_vec_info_vec): Remove.
15394 (free_stmt_vec_info_vec): Likewise.
15395 (set_stmt_vec_info_vec): New function.
15396 (free_stmt_vec_infos): Likewise.
15397 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15398 (set_vinfo_for_stmt): Likewise.
15399 (get_earlier_stmt): Likewise.
15400 (get_later_stmt): Likewise.
15401 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15402 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15403 (vec_info::~vec_info): Free stmt_vec_infos.
15404 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15405 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15406 (pass_slp_vectorize::execute): Likewise.
15407 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15408 (free_stmt_vec_info_vec): Likewise.
15409 (set_stmt_vec_info_vec): New function.
15410 (free_stmt_vec_infos): Likewise.
15411 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15412 the global stmt_vec_info_vec.
15413 * tree-parloops.c (gather_scalar_reductions): Use
15414 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15415 vector.
15416
15417 2018-05-29 Richard Biener <rguenther@suse.de>
15418
15419 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15420
15421 2018-05-29 Martin Liska <mliska@suse.cz>
15422 David Malcolm <dmalcolm@redhat.com>
15423
15424 * vec.c (test_reverse): New.
15425 (vec_c_tests): Add new test.
15426 * vec.h (vl_ptr>::reverse): New function.
15427
15428 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15429
15430 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15431
15432 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15433 and later.
15434
15435 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15436
15437 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15438
15439 2018-05-28 Richard Biener <rguenther@suse.de>
15440
15441 PR tree-optimization/85933
15442 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15443 look at stmts marked as vectorizable.
15444
15445 2018-05-28 Richard Biener <rguenther@suse.de>
15446
15447 PR tree-optimization/85934
15448 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15449 vector boolean check before scalar optimization.
15450
15451 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15452
15453 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15454 for armv5te.
15455
15456 2018-05-28 Mark Wielaard <mark@klomp.org>
15457
15458 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15459 if it is an expression containing a minus sign.
15460
15461 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15462
15463 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15464
15465 2018-05-27 Paul Koning <ni1d@arrl.net>
15466
15467 * config/pdp11/pdp11.md (truncsihi2): Remove.
15468
15469 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15470 Chung-Ju Wu <jasonwucj@gmail.com>
15471
15472 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15473 implementation.
15474 (unaligned_store_dw): Ditto.
15475 * config/nds32/nds32-memory-manipulation.c
15476 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15477 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15478 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15479 (emit_setmem_word_loop): Rename to ...
15480 (emit_setmem_doubleword_loop): ... this.
15481 (nds32_gen_dup_4_byte_to_word_value): New function.
15482 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15483 (nds32_expand_setmem_loop): Refine implementation.
15484 (nds32_expand_setmem_loop_v3m): Ditto.
15485 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15486 pattern.
15487
15488 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15489
15490 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15491
15492 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15493
15494 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15495 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15496 machine->attr_no_prologue_p.
15497 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15498 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15499 (nds32_expand_epilogue): Consider attr_naked_p.
15500 (nds32_expand_epilogue_v3pop): Likewise.
15501 (nds32_can_use_return_insn): Likewise.
15502 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15503 attr_no_prologue_p fields.
15504 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15505
15506 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15507
15508 PR target/85918
15509 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15510 attributes.
15511 * config/i386/sse.md
15512 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15513 Rename to ...
15514 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15515 ... this.
15516 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15517 Rename to ...
15518 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15519 ... this.
15520 (*<floatsuffix>floatv2div2sf2): Rename to ...
15521 (*float<floatunssuffix>v2div2sf2): ... this.
15522 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15523 (float<floatunssuffix>v2div2sf2_mask): ... this.
15524 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15525 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15526 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15527 to ...
15528 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15529 ... this.
15530 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15531 Rename to ...
15532 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15533 ... this.
15534 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15535 Rename to ...
15536 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15537 ... this.
15538 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15539 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15540 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15541 gen_ufix_truncv8dfv8si2.
15542 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15543 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15544 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15545 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15546 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15547 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15548 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15549 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15550
15551 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15552
15553 PR target/85900
15554 PR target/85345
15555 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15556
15557 2018-05-25 Jim Wilson <jimw@sifive.com>
15558
15559 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15560 * config/riscv/riscv.c (struct machine_function): Add
15561 interrupt_handler_p and attribute_checked_p fields.
15562 (riscv_attribute_table): Add interrupt.
15563 (riscv_interrupt_type_p): New.
15564 (riscv_save_reg_p): Save extra regs for interrupt handler.
15565 (riscv_use_save_libcall): Return false for interrupt handler.
15566 (riscv_first_stack_step): Add forward declaration.
15567 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15568 for interrupt handler with large frame. Use it for saved reg list.
15569 (riscv_expand_prologue): Move flag_stack_usage_info support to
15570 eliminate duplication.
15571 (riscv_expand_epilogue): Generate mret for interrupt handler.
15572 (riscv_epilogue_uses): New.
15573 (riscv_can_use_return_insn): Return false for interrupt handler.
15574 (riscv_function_ok_for_sibcall): Likewise.
15575 (riscv_set_current_function): Add interrupt handler support.
15576 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15577 * config/riscv/riscv.md (UNSPECV_MRET): New.
15578 (GP_REGNUM): New.
15579 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15580 (riscv_mret): New.
15581 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15582
15583 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15584
15585 PR tree-optimization/85712
15586 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15587 this candidate has already been replaced in-situ by a copy.
15588
15589 2018-05-25 Jason Merrill <jason@redhat.com>
15590
15591 PR c++/80485 - inline function non-zero address.
15592 * symtab.c (nonzero_address): Check DECL_COMDAT.
15593
15594 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15595
15596 PR target/83628
15597 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15598 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15599 extension of SImode operation. Use const123_operand predicate.
15600 (*saddsi_1): Remove.
15601 (*saddl_se_1): Ditto.
15602 (*ssubsi_1): Ditto.
15603 (*ssubl_se_1): Ditto.
15604 * config/alpha/predicates.md (const123_operand): New predicate.
15605 * config/alpha/constraints.md (P): Use IN_RANGE.
15606
15607 2018-05-25 Richard Biener <rguenther@suse.de>
15608
15609 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15610 defaulted to true.
15611 (ref_maybe_used_by_stmt_p): Likewise.
15612 (stmt_may_clobber_ref_p): Likewise.
15613 (stmt_may_clobber_ref_p_1): Likewise.
15614 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15615 and pass it along.
15616 (ref_maybe_used_by_stmt_p): Likewise.
15617 (stmt_may_clobber_ref_p): Likewise.
15618 (stmt_may_clobber_ref_p_1): Likewise.
15619 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15620 the alias oracle to disambiguate DRs with stmts DR analysis
15621 couldn't handle.
15622 (vect_analyze_data_refs): Do not give up on not analyzable
15623 DRs for BB vectorization. Remove code truncating the dataref
15624 vector.
15625
15626 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15627
15628 PR target/85832
15629 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15630 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15631 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15632
15633 2018-05-25 Richard Biener <rguenther@suse.de>
15634
15635 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15636 function, combining stmt data ref gathering and fatal analysis
15637 parts.
15638 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15639 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15640 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15641 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15642 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15643
15644 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15645
15646 PR tree-optimization/85720
15647 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15648 SCC if all partitions are builtins.
15649 (version_loop_by_alias_check): New parameter. Generate cancelable
15650 runtime alias check if all partitions are builtins.
15651 (distribute_loop): Update call to above function.
15652
15653 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15654
15655 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15656 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15657 (parm_default_def_partition_arg): Ditto.
15658 (set_parm_default_def_partition): Ditto.
15659 (get_parm_default_def_partitions): Ditto and make it static.
15660 (get_undefined_value_partitions): Ditto and make it static.
15661 (remove_ssa_form): Refactor call to init_var_map here.
15662 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15663 computation for loop region.
15664 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15665 (register_default_def): Delete.
15666 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15667 (parm_default_def_partition_arg): Ditto.
15668 (set_parm_default_def_partition): Ditto.
15669 (get_parm_default_def_partitions): Ditto and make it static.
15670 (get_undefined_value_partitions): Ditto and make it static.
15671 (coalesce_with_default, coalesce_with_default): Update comment.
15672 (create_coalesce_list_for_region): New func factored out from
15673 create_outofssa_var_map.
15674 (populate_coalesce_list_for_outofssa): New func factored out from
15675 create_outofssa_var_map and coalesce_ssa_name.
15676 (create_outofssa_var_map): Delete.
15677 (coalesce_ssa_name): Refactor to support live range computation.
15678 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15679 (get_parm_default_def_partitions): Delete.
15680 (get_undefined_value_partitions): Ditto.
15681 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15682 computation for loop region.
15683 (new_tree_live_info, loe_visit_block): Ditto.
15684 (live_worklist, set_var_live_on_entry): Ditto.
15685 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15686 * tree-ssa-live.h (struct _var_map): New fields.
15687 (init_var_map): Change decl.
15688 (region_contains_p): New.
15689
15690 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15691
15692 * tree-ssa-live.h (live_merge_and_clear): Delete.
15693
15694 2018-05-25 Richard Biener <rguenther@suse.de>
15695
15696 PR c++/85912
15697 * tree-dump.c (dequeue_and_dump): Remove access to removed
15698 operand 2 of a SWITCH_EXPR.
15699
15700 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15701
15702 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15703 multiplication and division.
15704 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15705 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15706 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15707 (cond_udiv_optab, cond_umod_optab): New optabs.
15708 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15709 (IFN_COND_RDIV): New internal functions.
15710 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15711 TRUNC_MOD_EXPR and RDIV_EXPR.
15712 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15713 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15714 New unspecs.
15715 (SVE_INT_BINARY): Include mult.
15716 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15717 (optab, sve_int_op): Handle mult.
15718 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15719 UNSPEC_COND_DIV.
15720 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15721 for SVE_INT_BINARY_SD.
15722
15723 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15724
15725 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15726 (optab, sve_int_op): Handle div and udiv.
15727 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15728 for SVE_INT_BINARY_SD.
15729 (*<optab><mode>3): New insn for the same.
15730
15731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15732
15733 * tree-vect-patterns.c: Include predict.h.
15734 (vect_recog_divmod_pattern): Restrict check for division support
15735 to when optimizing for size.
15736
15737 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15738
15739 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15740 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15741 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15742 (gimple_match_op::set_op): Likewise.
15743 (gimple_resimplify4): Declare.
15744 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15745 (expr::gen_transform): Likewise.
15746 (decision_tree::gen): Generate a simplification routine for 4 operands.
15747 * gimple-match-head.c (gimple_simplify): Add an overload for
15748 4 operands. In the top-level function, handle up to 4 call
15749 arguments and call gimple_resimplify4.
15750 (gimple_resimplify4): New function.
15751 (build_call_internal): Pass a fourth operand.
15752 (maybe_push_to_seq): Likewise.
15753 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15754 Fold VEC_COND_EXPRs of an operation and a default value into
15755 an IFN_COND_* function if possible.
15756 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15757 New unspecs.
15758 (SVE_COND_FP_BINARY): Include them.
15759 (optab, sve_fp_op): Handle them.
15760 (SVE_INT_BINARY_REV): New code iterator.
15761 (SVE_COND_FP_BINARY_REV): New int iterator.
15762 (commutative): New int attribute.
15763 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15764 Declare.
15765 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15766 function.
15767 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15768 (*cond_<optab><mode>): New patterns for reversed operands.
15769
15770 2018-05-25 Richard Biener <rguenther@suse.de>
15771
15772 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15773 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15774 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15775 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15776 * tree-vect-data-refs.c (everywhere): Adjust users.
15777 * tree-vect-loop.c (everywhere): Likewise.
15778 * tree-vect-slp.c (everywhere): Likewise.
15779 * tree-vect-stmts.c (everywhere): Likewise.
15780 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15781
15782 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15783
15784 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15785 Rename to...
15786 (gcc_cv_as_section_exclude): ... this.
15787 Try Solaris as #exclude syntax.
15788 * configure: Regenerate.
15789 * config.in: Regenerate.
15790 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15791 SECTION_EXCLUDE.
15792 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15793 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15794
15795 * varasm.c (default_elf_asm_named_section): Don't check if
15796 HAVE_GAS_SECTION_EXCLUDE is defined.
15797
15798 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15799
15800 * doc/md.texi: Update the documentation of the cond_* optabs
15801 to mention the new final operand. Fix GET_MODE_NUNITS call.
15802 Describe the scalar case too.
15803 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15804 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15805 instead of 2.
15806 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15807 (get_conditional_internal_fn): Update comment.
15808 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15809 accumulator value as a final argument to conditional functions.
15810 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15811 a define_expand and add an "else" operand. Assert for now that
15812 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15813 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15814 (*cond_<optab><mode>): New patterns.
15815 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15816 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15817 (UNSPEC_COND_EOR): Delete.
15818 (optab): Remove associated mappings.
15819 (SVE_INT_BINARY): New code iterator.
15820 (sve_int_op): Remove int attribute and add "minus" to the code
15821 attribute.
15822 (SVE_COND_INT_OP): Delete.
15823 (SVE_COND_FP_OP): Rename to...
15824 (SVE_COND_FP_BINARY): ...this.
15825
15826 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15827
15828 * optabs.c (can_reuse_operands_p): New function.
15829 (maybe_legitimize_operands): Try to reuse the results for
15830 earlier operands.
15831
15832 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15833
15834 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15835 Add {q} suffix to insn mnemonic.
15836
15837 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15838
15839 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15840 (msp430_warn_func_return): New.
15841
15842 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15843
15844 * fold-const.c (tree_nonzero_bits): New function.
15845 * fold-const.h (tree_nonzero_bits): Likewise.
15846 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15847 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15848
15849 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15850
15851 PR target/85900
15852 PR target/85345
15853 * varasm.c (assemble_alias): Check ifunc_resolver only on
15854 FUNCTION_DECL.
15855
15856 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15857
15858 PR target/85903
15859 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15860 when memory input operand is handled.
15861
15862 2018-05-24 Luis Machado <luis.machado@linaro.org>
15863
15864 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15865 global.
15866 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15867
15868 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15869
15870 * match.pd: Delay FMA folds until after vectorization.
15871
15872 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15873
15874 PR target/83009
15875 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15876 address check not strict.
15877
15878 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15879
15880 * gimple-match.h (gimple_match_op): New class.
15881 (mprts_hook): Replace parameters with a gimple_match_op *.
15882 (maybe_build_generic_op): Likewise.
15883 (gimple_simplified_result_is_gimple_val): Replace parameters with
15884 a const gimple_match_op *.
15885 (gimple_simplify): Replace code_helper * and tree * parameters with
15886 a gimple_match_op * parameter.
15887 (gimple_resimplify1): Replace code_helper *, tree and tree *
15888 parameters with a gimple_match_op * parameter.
15889 (gimple_resimplify2): Likewise.
15890 (gimple_resimplify3): Likewise.
15891 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15892 parameters with a gimple_match_op * parameter.
15893 * gimple-match-head.c (gimple_simplify): Change prototypes of
15894 auto-generated functions to take a gimple_match_op * instead of
15895 separate code_helper * and tree * parameters. Make the same
15896 change in the top-level overload and update calls to the
15897 gimple_resimplify routines. Update calls to the auto-generated
15898 functions and to maybe_push_res_to_seq in the publicly-facing
15899 operation-specific gimple_simplify overloads.
15900 (gimple_match_op::MAX_NUM_OPS): Define.
15901 (gimple_resimplify1): Replace rcode and ops with a single res_op
15902 parameter. Update call to gimple_simplify.
15903 (gimple_resimplify2): Likewise.
15904 (gimple_resimplify3): Likewise.
15905 (mprts_hook): Replace parameters with a gimple_match_op *.
15906 (maybe_build_generic_op): Likewise.
15907 (build_call_internal): Replace type, nargs and ops with
15908 a gimple_match_op *.
15909 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15910 with a single gimple_match_op *. Update calls to mprts_hook,
15911 build_call_internal and gimple_simplified_result_is_gimple_val.
15912 Factor out code that is common to the tree_code and combined_fn cases.
15913 * genmatch.c (expr::gen_transform): Replace tem_code and
15914 tem_ops with a gimple_match_op called tem_op. Update calls
15915 to the gimple_resimplify functions and maybe_push_res_to_seq.
15916 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15917 res_ops. Update call to the gimple_resimplify functions.
15918 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15919 (decision_tree::gen): Make the functions take a gimple_match_op *
15920 called res_op instead of separate res_code and res_ops parameters.
15921 Update call accordingly.
15922 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15923 and ops with a single res_op parameter. Update calls to
15924 maybe_build_generic_op and maybe_push_res_to_seq.
15925 (fold_stmt_1): Update calls to gimple_simplify and
15926 replace_stmt_with_simplification.
15927 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15928 and gimple_simplified_result_is_gimple_val.
15929 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15930 gimple_simplify.
15931 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15932 with a gimple_match_op *.
15933 (vn_nary_build_or_lookup): Likewise. Update call to
15934 vn_nary_build_or_lookup_1.
15935 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15936 gimple_match_op *. Update calls to the gimple_resimplify routines
15937 and to gimple_simplified_result_is_gimple_val.
15938 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15939 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15940 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15941 (visit_nary_op): Likewise.
15942 (visit_reference_op_load): Likewise.
15943
15944 2018-05-23 Luis Machado <luis.machado@linaro.org>
15945
15946 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15947 modifier for printing the step amount.
15948
15949 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15950
15951 PR target/78849
15952 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15953 types.
15954
15955 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15956
15957 * doc/sourcebuild.texi (Endianness): New subsubsection.
15958
15959 2018-05-23 Luis Machado <luis.machado@linaro.org>
15960
15961 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15962 <prefetch_dynamic_strides>: New const bool field.
15963 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15964 prefetch_dynamic_strides.
15965 (exynosm1_prefetch_tune): Likewise.
15966 (thunderxt88_prefetch_tune): Likewise.
15967 (thunderx_prefetch_tune): Likewise.
15968 (thunderx2t99_prefetch_tune): Likewise.
15969 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15970 false.
15971 (aarch64_override_options_internal): Update to set
15972 PARAM_PREFETCH_DYNAMIC_STRIDES.
15973 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15974 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15975 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15976 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15977 prefetch-dynamic-strides setting.
15978
15979 2018-05-23 Luis Machado <luis.machado@linaro.org>
15980
15981 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15982 <minimum_stride>: New const int field.
15983 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15984 minimum_stride field defaulting to -1.
15985 (exynosm1_prefetch_tune): Likewise.
15986 (thunderxt88_prefetch_tune): Likewise.
15987 (thunderx_prefetch_tune): Likewise.
15988 (thunderx2t99_prefetch_tune): Likewise.
15989 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15990 <default_opt_level>: Set to 3.
15991 (aarch64_override_options_internal): Update to set
15992 PARAM_PREFETCH_MINIMUM_STRIDE.
15993 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15994 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15995 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15996 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15997 stride is constant and is below the minimum stride threshold.
15998
15999 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16000
16001 * config/arm/arm-cpus.in (mode26): Delete.
16002 (armv4): Delete mode26 reference.
16003 * config/arm/arm.c (arm_configure_build_target): Delete use of
16004 isa_bit_mode26.
16005
16006 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16007
16008 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16009 New insn pattern.
16010 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16011 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16012 for non-SSE modes.
16013 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16014 (floatunsdidf2): Ditto.
16015
16016 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16017
16018 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16019 (fixuns_trunc<mode>si2_avx512f): Ditto.
16020 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16021 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16022 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16023
16024 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16025
16026 PR rtl-optimization/79985
16027 * df-scan.c (df_insn_refs_collect): Remove special case for
16028 global registers and asm statements.
16029
16030 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16031
16032 * extend.texi (Global Register Variables): Rewrite the bullet list.
16033 Note that the register is available for allocation. Note that access
16034 via inline asm must use constraints. Add note about async-signal
16035 handlers. Remove paragraph about automagic register selection.
16036
16037 2018-05-23 Richard Biener <rguenther@suse.de>
16038
16039 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16040 of fixed offset from memset VN.
16041
16042 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16043
16044 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16045 first_interp field.
16046 (alloc_cand_and_find_basis): Initialize first_interp field.
16047 (slsr_process_mul): Modify first_interp field.
16048 (slsr_process_add): Likewise.
16049 (slsr_process_cast): Modify first_interp field for each new
16050 interpretation.
16051 (slsr_process_copy): Likewise.
16052 (dump_candidate): Dump first_interp field.
16053 (replace_mult_candidate): Process all interpretations, not just
16054 subsequent ones.
16055 (replace_rhs_if_not_dup): Likewise.
16056 (replace_one_candidate): Likewise.
16057
16058 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16059
16060 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16061 Add new boolean.
16062 (aarch64_needs_frame_chain): New function.
16063 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16064
16065 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16066
16067 PR target/84882
16068 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16069 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16070 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16071 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16072 as true for strict-align.
16073 (aarch64_can_inline_p): Perform checks even when callee has no
16074 attributes to check for strict alignment.
16075 * doc/extend.texi (AArch64 Function Attributes): Document
16076 no-strict-align.
16077 * doc/invoke.texi: (AArch64 Options): Likewise.
16078
16079 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16080
16081 PR tree-optimization/85853
16082 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16083 the handling of the root of the node to...
16084 (vect_slp_analyze_node_operations_1): ...this new function,
16085 and run the whole thing with the child nodes' def types
16086 set according to their SLP node's def type.
16087
16088 2018-05-23 Richard Biener <rguenther@suse.de>
16089
16090 PR middle-end/85874
16091 * tree-data-ref.c (create_runtime_alias_checks): Defer
16092 and ignore overflow warnings.
16093
16094 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16095
16096 PR tree-optimization/85822
16097 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16098 constants.
16099
16100 2018-05-23 Richard Biener <rguenther@suse.de>
16101
16102 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16103 memset constants via native_interpret_expr.
16104
16105 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16106
16107 PR target/85345
16108 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16109 attribute.
16110 (cgraph_node::create_alias): Likewise.
16111 (cgraph_node::get_availability): Check ifunc_resolver instead
16112 of looking up ifunc attribute.
16113 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16114 * varasm.c (do_assemble_alias): Likewise.
16115 (assemble_alias): Likewise.
16116 (default_binds_local_p_3): Likewise.
16117 * cgraph.h (cgraph_node): Add ifunc_resolver.
16118 (cgraph_node::only_called_directly_or_aliased_p): Return false
16119 for IFUNC resolver.
16120 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16121 attribute.
16122 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16123 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16124 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16125 instead of looking up ifunc attribute.
16126
16127 2018-05-22 Luis Machado <luis.machado@linaro.org>
16128
16129 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16130
16131 2018-05-22 Martin Sebor <msebor@redhat.com>
16132
16133 PR middle-end/85359
16134 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16135 only when expasion succeeds.
16136 (expand_builtin_strcmp): Same.
16137 (expand_builtin_strncmp): Same.
16138
16139 2018-05-22 Martin Sebor <msebor@redhat.com>
16140
16141 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16142
16143 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16144 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16145
16146 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16147 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16148 code.
16149 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16150 Add check for legitimate_address.
16151 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16152 (aarch64_swap_ldrstr_operands): New.
16153 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16154 Define prototype.
16155
16156 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16157 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16158
16159 * config/aarch64/aarch64.md: New patterns to generate stp
16160 and ldp.
16161 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16162 single words and double words.
16163 (load_pair_sw, load_pair_dw): Likewise.
16164 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16165 Delete.
16166 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16167 Delete.
16168 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16169 for different mode ldpstp and add peephole for merged zero stores.
16170 Likewise for loads.
16171 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16172 Add size check.
16173 (aarch64_gen_store_pair): Rename calls to match new patterns.
16174 (aarch64_gen_load_pair): Rename calls to match new patterns.
16175 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16176 (load_pair<DREG:mode><DREG2:mode>): ... This.
16177 (store_pair<mode>): Rename to...
16178 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16179 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16180 New mode iterators.
16181 (V_INT_EQUIV): Handle SImode.
16182 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16183 New predicate.
16184
16185 2018-05-22 Martin Sebor <msebor@redhat.com>
16186
16187 PR c/85623
16188 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16189 or ajust the presumed bound on an operation to avoid unnecessary
16190 warnings.
16191
16192 2018-05-22 Martin Sebor <msebor@redhat.com>
16193
16194 PR tree-optimization/85826
16195 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16196 assuming that a DECL necesarily has a constant size.
16197
16198 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16199
16200 PR middle-end/85862
16201 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16202
16203 2018-05-22 Richard Biener <rguenther@suse.de>
16204
16205 PR tree-optimization/85834
16206 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16207 non-constant and non-zero memset arguments.
16208
16209 2018-05-22 Martin Liska <mliska@suse.cz>
16210
16211 PR ipa/85607
16212 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16213
16214 2018-05-22 Richard Biener <rguenther@suse.de>
16215
16216 PR tree-optimization/85863
16217 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16218 comparisons when vectype is specified.
16219 (vectorizable_condition): Do not specify vectype for
16220 vect_is_simple_cond when SLP vectorizing.
16221
16222 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16223
16224 PR target/85657
16225 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16226 define __ibm128 as long double.
16227 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16228 as a distinct type when IEEE 128-bit support is enabled.
16229 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16230 128-bit types to use the correct functions.
16231 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16232 convert between 128-bit floating point types that have different
16233 modes but the same representation, instead of using gen_lowpart to
16234 makean alias.
16235 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16236 KFmode.
16237 (IFKF_reg): New attributes to give the register constraints for
16238 IFmode and KFmode.
16239 (extend<mode>tf2_internal): New insns to mark an explicit
16240 conversion between 128-bit floating point types that have a
16241 different mode but share the same representation.
16242
16243 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16244
16245 PR tree-optimization/85814
16246 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16247 a null return from get_strinfo when unsharing the next
16248 strinfo in the chain.
16249
16250 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16251
16252 PR gcc/84923
16253 * varasm.c (weak_finish): Clean up weak_decls.
16254
16255 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16256
16257 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16258 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16259 UNSPEC_UADALP values.
16260 * config/aarch64/iterators.md (ABAL): New int iterator.
16261 (ABDL2): Likewise.
16262 (ADALP): Likewise.
16263 (sur): Add mappings for the above.
16264 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16265 New define_insn.
16266 (aarch64_<sur>abal<mode>_4): Likewise.
16267 (aarch64_<sur>adalp<mode>_3): Likewise.
16268 (<sur>sadv16qi): New define_expand.
16269
16270 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16271
16272 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16273 (*movdf_internal): Ditto.
16274 (*rcpsf2_sse): Ditto.
16275 (*rsqrtsf2_sse): Ditto.
16276 (*sqrt<mode>2_sse): Ditto.
16277
16278 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16279
16280 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16281 eor3q<mode>4.
16282 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16283 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16284 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16285 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16286 vbcaxq_s64): New.
16287 * config/aarch64/arm_neon.h: Likewise.
16288 * config/aarch64/iterators.md (VQ_I): New.
16289
16290 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16291
16292 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16293 arc*-*-linux*.
16294 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16295 MULTILIB_DIRNAMES
16296
16297 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16298
16299 * config/nds32/constraints.md (S): New constraint.
16300 * config/nds32/nds32.md (call_internal): Use constraint S.
16301 (call_value_internal): Likewise.
16302 (sibcall_internal): Likewise.
16303 (sibcall_value_internal): Likewise.
16304
16305 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16306 Chung-Ju Wu <jasonwucj@gmail.com>
16307
16308 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16309 into consideration.
16310
16311 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16312 Chung-Ju Wu <jasonwucj@gmail.com>
16313
16314 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16315 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16316 (nds32_rtx_costs_impl): Simplify.
16317 (nds32_address_cost_impl): Simplify.
16318 (nds32_init_rtx_costs): New function.
16319 (nds32_rtx_costs_speed_prefer): Likewise.
16320 (nds32_rtx_costs_size_prefer): Likewise.
16321 (nds32_address_cost_speed_prefer): Likewise.
16322 (nds32_address_cost_speed_fwprop): Likewise.
16323 (nds32_address_cost_size_prefer): Likewise.
16324 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16325 * config/nds32/nds32.c (nds32_option_override): Use
16326 nds32_init_rtx_costs function.
16327
16328 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16329
16330 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16331 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16332 (TARGET_PIPELINE_N8): Likewise.
16333 (TARGET_PIPELINE_N10): Likewise.
16334 (TARGET_PIPELINE_N13): Likewise.
16335 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16336
16337 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16338
16339 * config/nds32/nds32-fpu.md: Update copyright year.
16340
16341 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16342
16343 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16344
16345 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16346
16347 * config/nds32/nds32.c
16348 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16349 * config/nds32/nds32.opt (minline-asm-r15): New option.
16350
16351 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16352
16353 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16354 MASK_HW_ABS.
16355 * config/nds32/nds32.md (abssi2): New pattern.
16356
16357 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16358
16359 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16360 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16361 Merge insn pattern from sse_cvtsi2ss<round_name> and
16362 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16363 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16364 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16365 using SWI48 mode iterator.
16366 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16367 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16368 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16369 pattern from sse_cvttss2si<round_saeonly_name>
16370 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16371 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16372 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16373 using SWI48 mode iterator.
16374 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16375 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16376 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16377 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16378 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16379 using SWI48 mode iterator.
16380 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16381 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16382 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16383 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16384 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16385 SWI48 mode iterator.
16386 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16387 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16388 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16389 pattern from sse_cvttsd2si<round_saeonly_name>
16390 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16391
16392 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16393
16394 * config/nds32/nds32-md-auxiliary.c
16395 (nds32_valid_smw_lwm_base_p): Refine.
16396 (nds32_output_smw_single_word): Refine.
16397 (nds32_output_smw_double_word): New.
16398 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16399
16400 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16401
16402 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16403 (nds32_output_stack_pop): Refine.
16404 (nds32_expand_unaligned_load): Refine.
16405 (nds32_expand_unaligned_store): Refine.
16406
16407 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16408 Chung-Ju Wu <jasonwucj@gmail.com>
16409
16410 * config/nds32/constants.md: Add TP_REGNUM constant.
16411 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16412 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16413 UNSPEC_ADD32.
16414 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16415 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16416 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16417 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16418 and PIC code generation.
16419 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16420 code generation.
16421 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16422 optimization.
16423 * config/nds32/nds32.md: Support TLS and PIC.
16424 * config/nds32/nds32.c: Support TLS and PIC.
16425 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16426 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16427 predicate.
16428
16429 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16430
16431 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16432 mode with E_ prefix.
16433
16434 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16435 Chung-Ju Wu <jasonwucj@gmail.com>
16436
16437 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16438 * config/nds32/nds32-md-auxiliary.c
16439 (symbolic_reference_mentioned_p): New.
16440 (nds32_legitimize_ict_address): New.
16441 (nds32_expand_ict_move): New.
16442 (nds32_indirect_call_referenced_p): New.
16443 (nds32_symbol_binds_local_p): Delete.
16444 (nds32_long_call_p): Modify.
16445 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16446 * config/nds32/nds32-protos.h
16447 (symbolic_reference_mentioned_p): Declare.
16448 (nds32_legitimize_ict_address): Declare.
16449 (nds32_expand_ict_move): Declare.
16450 (nds32_indirect_call_referenced_p): Declare.
16451 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16452 (nds32_relax_group): Use nds32_ict_const_p as condition.
16453 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16454 (nds32_asm_file_start): Output ict_model directive in asm code.
16455 (nds32_legitimate_address_p): Consider indirect call.
16456 (nds32_print_operand): Consider indirect call.
16457 (nds32_print_operand_address): Consider indirect call.
16458 (nds32_insert_attributes): Handle "indirect_call" attribute.
16459 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16460 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16461 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16462 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16463 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16464 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16465 (TARGET_ICT_MODEL_SMALL): Define.
16466 (TARGET_ICT_MODEL_LARGE): Define.
16467 * config/nds32/nds32.md (movsi): Consider ict model.
16468 (call, call_value): Consider ict model.
16469 (sibcall, sibcall_value): Consider ict model.
16470 * config/nds32/nds32.opt (mict-model): New option.
16471 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16472 model.
16473
16474 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16475 Monk Chiang <sh.chiang04@gmail.com>
16476 Jim Wilson <jimw@sifive.com>
16477
16478 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16479 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16480 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16481 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16482 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16483 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16484 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16485 compute save_libcall_adjustment properly.
16486 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16487 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16488 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16489 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16490 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16491 (ABI_SPEC): Handle mabi=ilp32e.
16492 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16493 (RVE): Add RVE mask.
16494 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16495 <-march>: Add rv32e as an example.
16496
16497 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16498
16499 PR c++/82899
16500 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16501 (intra_create_variable_infos): Handle C++ constructors.
16502
16503 2018-05-18 Martin Liska <mliska@suse.cz>
16504
16505 * passes.def: Remove a redundant pass.
16506
16507 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16508
16509 PR bootstrap/85838
16510 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16511
16512 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16513
16514 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16515 (ARMv4): Update.
16516 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16517 (ARMv6m): Update.
16518 (armv2, armv2a, armv3, armv3m): Delete architectures.
16519 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16520 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16521 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16522 Delete cpus.
16523 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16524 (*mulsidi3adddi): Likewise.
16525 (mulsidi3): Likewise.
16526 (*mulsidi3_nov6): Likewise.
16527 (umulsidi3): Likewise.
16528 (umulsidi3_nov6): Likewise.
16529 (umaddsidi4): Likewise.
16530 (*umulsidi3adddi): Likewise.
16531 (smulsi3_highpart): Likewise.
16532 (*smulsi3_highpart_nov6): Likewise.
16533 (umulsi3_highpart): Likewise.
16534 (*umulsi3_highpart_nov6): Likewise.
16535 * config/arm/arm.h (arm_arch3m): Delete.
16536 * config/arm/arm.c (arm_arch3m): Delete.
16537 (arm_option_override_internal): Update armv3-related comment.
16538 (arm_configure_build_target): Delete use of isa_bit_mode32.
16539 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16540 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16541 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16542 (mulsa3): Likewise.
16543 (mulusa3): Likewise.
16544 * config/arm/arm-protos.h (arm_arch3m): Delete.
16545 * config/arm/arm-tables.opt: Regenerate.
16546 * config/arm/arm-tune.md: Likewise.
16547 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16548 deleted architectures.
16549
16550 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16551
16552 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16553 (armv5t, armv5te): New features.
16554 (ARMv5, ARMv5e): Delete fgroups.
16555 (ARMv5t, ARMv5te): Adjust for above changes.
16556 (ARMv6m): Likewise.
16557 (armv5, armv5e): Delete arches.
16558 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16559 arm_arch5.
16560 (*call_reg_arm): Likewise.
16561 (*call_value_reg_armv5): Likewise.
16562 (*call_value_reg_arm): Likewise.
16563 (*call_symbol): Likewise.
16564 (*call_value_symbol): Likewise.
16565 (*sibcall_insn): Likewise.
16566 (*sibcall_value_insn): Likewise.
16567 (clzsi2): Likewise.
16568 (prefetch): Likewise.
16569 (define_split and define_peephole2 dependent on arm_arch5):
16570 Likewise.
16571 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16572 arm_arch5e.
16573 (TARGET_ARM_QBIT): Likewise.
16574 (TARGET_DSP_MULTIPLY): Likewise.
16575 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16576 (arm_arch5, arm_arch5e): Delete.
16577 (arm_arch5t, arm_arch5te): Declare.
16578 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16579 (arm_arch5t): Declare.
16580 (arm_option_reconfigure_globals): Update for the above.
16581 (arm_options_perform_arch_sanity_checks): Update comment, replace
16582 use of arm_arch5 with arm_arch5t.
16583 (use_return_insn): Likewise.
16584 (arm_emit_call_insn): Likewise.
16585 (output_return_instruction): Likewise.
16586 (arm_final_prescan_insn): Likewise.
16587 (arm_coproc_builtin_available): Likewise.
16588 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16589 arm_arch5e with arm_arch5t and arm_arch5te.
16590 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16591 (arm_arch5t, arm_arch5te): Declare.
16592 * config/arm/arm-tables.opt: Regenerate.
16593 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16594 * config/arm/t-multilib: Likewise.
16595 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16596 instead of arm_arch5.
16597 (*call_reg_thumb1): Likewise.
16598 (*call_value_reg_thumb1_v5): Likewise.
16599 (*call_value_reg_thumb1): Likewise.
16600 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16601 unreachable path.
16602 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16603
16604 2018-05-18 Martin Liska <mliska@suse.cz>
16605
16606 PR gcov-profile/84846
16607 * doc/gcov.texi: Document -t option of gcov tool.
16608
16609 2018-05-18 Martin Liska <mliska@suse.cz>
16610
16611 PR gcov-profile/84846
16612 * gcov.c (print_usage): Add new -t option.
16613 (process_args): Handle the option.
16614 (generate_results): Use stdout as output when requested by
16615 the option.
16616
16617 2018-05-18 Martin Liska <mliska@suse.cz>
16618
16619 PR gcov-profile/84846
16620 * coverage.c (coverage_init): Write PWD to .gcno file.
16621 * doc/gcov.texi: Document how working directory is printed.
16622 * gcov-dump.c (dump_gcov_file): Print PWD.
16623 * gcov.c (output_intermediate_file): Likewise.
16624 (read_graph_file): Read PWD string.
16625 (output_lines): Print PWD.
16626
16627 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16628
16629 PR middle-end/85817
16630 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16631 for retval and return false if all args to phi are zero.
16632
16633 2018-05-18 Richard Biener <rguenther@suse.de>
16634
16635 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16636 method.
16637 (evrp_dom_walker::before_dom_children): Call it.
16638
16639 2018-05-18 Richard Biener <rguenther@suse.de>
16640
16641 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16642 results when processing array refs with variable index.
16643
16644 2018-05-18 Toon Moene <toon@moene.org>
16645
16646 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16647 directly after that of -floop-interchange. Indicate that both
16648 options are enabled by default when specifying -O3.
16649
16650 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16651
16652 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16653 iterator. Delete separate integer-mode vec_set<mode> expander.
16654 (aarch64_simd_vec_setv2di): Delete.
16655 (vec_setv2di): Delete.
16656 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16657 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16658 the "w, r" alternative.
16659
16660 2018-05-18 Martin Liska <mliska@suse.cz>
16661
16662 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16663 * tree-pass.h (make_pass_lower_switch_O0): New function.
16664 * tree-switch-conversion.c (node_has_low_bound): Remove.
16665 (node_has_high_bound): Likewise.
16666 (node_is_bounded): Likewise.
16667 (class pass_lower_switch): Make it a template type and create
16668 two instances.
16669 (pass_lower_switch::execute): Add template argument.
16670 (make_pass_lower_switch): New function.
16671 (make_pass_lower_switch_O0): New function.
16672 (do_jump_if_equal): Remove.
16673 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16674 all the hard work to tree optimization passes.
16675
16676 2018-05-18 Martin Liska <mliska@suse.cz>
16677
16678 * dbgcnt.c (limit_low): Renamed from limit.
16679 (limit_high): New variable.
16680 (dbg_cnt_is_enabled): Check for upper limit.
16681 (dbg_cnt): Adjust dumping.
16682 (dbg_cnt_set_limit_by_index): Add new argument for high
16683 value.
16684 (dbg_cnt_set_limit_by_name): Likewise.
16685 (dbg_cnt_process_single_pair): Parse new format.
16686 (dbg_cnt_process_opt): Use strtok.
16687 (dbg_cnt_list_all_counters): Remove 'value' and add
16688 'limit_high'.
16689 * doc/invoke.texi: Document changes.
16690
16691 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16692
16693 * doc/sourcebuild.texi (scalar_all_fma): Document.
16694 * tree.def (FMA_EXPR): Delete.
16695 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16696 * internal-fn.c (ternary_direct): New macro.
16697 (expand_ternary_optab_fn): Likewise.
16698 (direct_ternary_optab_supported_p): Likewise.
16699 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16700 * builtins.c (fold_builtin_fma): Delete.
16701 (fold_builtin_3): Don't call it.
16702 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16703 * expr.c (expand_expr_real_2): Likewise.
16704 * fold-const.c (operand_equal_p): Likewise.
16705 (fold_ternary_loc): Likewise.
16706 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16707 * gimple.c (DEFTREECODE): Likewise.
16708 * gimplify.c (gimplify_expr): Likewise.
16709 * optabs-tree.c (optab_for_tree_code): Likewise.
16710 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16711 * tree-eh.c (operation_could_trap_p): Likewise.
16712 (stmt_could_throw_1_p): Likewise.
16713 * tree-inline.c (estimate_operator_cost): Likewise.
16714 * tree-pretty-print.c (dump_generic_node): Likewise.
16715 (op_code_prio): Likewise.
16716 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16717 * tree-ssa-operands.c (get_expr_operands): Likewise.
16718 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16719 * fold-const-call.h (fold_fma): Delete.
16720 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16721 CFN_FNMA and CFN_FNMS.
16722 (fold_fma): Delete.
16723 * genmatch.c (combined_fn): New enum.
16724 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16725 (commutative_op): New function.
16726 (commutate): Use it. Handle more than 2 operands.
16727 (dt_operand::gen_gimple_expr): Use commutative_op.
16728 (parser::parse_expr): Allow :c to be used with non-binary
16729 operators if the commutative operand is known.
16730 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16731 CFN_FMS, CFN_FNMA and CFN_FNMS.
16732 (backprop::process_assign_use): Remove FMA_EXPR handling.
16733 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16734 (gen_hsa_fma): New function.
16735 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16736 IFN_FNMA and IFN_FNMS.
16737 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16738 * gimple-fold.h (follow_all_ssa_edges): Declare.
16739 * gimple-fold.c (follow_all_ssa_edges): New function.
16740 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16741 gimple_build interface and use follow_all_ssa_edges to fold the result.
16742 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16743 instead of checking for optabs directly.
16744 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16745 rather than FMA_EXPRs.
16746 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16747 call to IFN_FMA instead of an FMA_EXPR.
16748
16749 2018-05-17 Jim Wilson <jimw@sifive.com>
16750
16751 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16752 sign extended promoted subreg, and the range does not have the sign bit
16753 set, then do a sign extend.
16754
16755 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16756 test, check for sign extended subreg and/or constant operands, and
16757 do a sign extend in that case.
16758
16759 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16760
16761 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16762 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16763 Add untyped.
16764 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16765 Change logics_shift_reg to logics_shift_imm.
16766 (thunderx2t99_fp_loadpair_basic): Delete.
16767 (thunderx2t99_fp_storepair_basic): Delete.
16768 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16769 (thunderx2t99_asimd_polynomial): Delete.
16770 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16771 and neon_fp_mul_d_scalar_q.
16772 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16773 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16774 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16775 (thunderx2t99_asimd_lut): Add missing tbl types.
16776 (thunderx2t99_asimd_ext): Delete.
16777 (thunderx2t99_asimd_load1_1_mult): Delete.
16778 (thunderx2t99_asimd_load1_2_mult): Delete.
16779 (thunderx2t99_asimd_load1_ldp): New.
16780 (thunderx2t99_asimd_load1): New.
16781 (thunderx2t99_asimd_load2): Add missing *load2* types.
16782 (thunderx2t99_asimd_load3): New.
16783 (thunderx2t99_asimd_load4): New.
16784 (thunderx2t99_asimd_store1_1_mult): Delete.
16785 (thunderx2t99_asimd_store1_2_mult): Delete.
16786 (thunderx2t99_asimd_store2_mult): Delete.
16787 (thunderx2t99_asimd_store2_onelane): Delete.
16788 (thunderx2t99_asimd_store_stp): New.
16789 (thunderx2t99_asimd_store1): New.
16790 (thunderx2t99_asimd_store2): New.
16791 (thunderx2t99_asimd_store3): New.
16792 (thunderx2t99_asimd_store4): New.
16793
16794 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16795
16796 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16797 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16798
16799 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16800 Segher Boessenkool <segher@kernel.crashing.org>
16801
16802 PR target/85698
16803 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16804 operand.
16805
16806 2018-05-17 Richard Biener <rguenther@suse.de>
16807
16808 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16809 for pruning loop and prune defs feeding only already visited PHIs.
16810
16811 2018-05-17 Richard Biener <rguenther@suse.de>
16812
16813 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16814
16815 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16816 Richard Biener <rguenther@suse.de>
16817
16818 PR tree-optimization/85793
16819 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16820 for VMAT_ELEMENTWISE.
16821
16822 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16823
16824 * internal-fn.h (lookup_internal_fn): Declare
16825 * internal-fn.c (lookup_internal_fn): New function.
16826 * gimple.c (gimple_build_call_from_tree): Handle calls to
16827 internal functions.
16828 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16829 internal function names.
16830 * tree-pretty-print.c (dump_generic_node): Likewise.
16831 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16832
16833 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16834
16835 * gimple-fold.h (gimple_build): Make the function forms take
16836 combined_fn rather than built_in_function.
16837 (gimple_simplify): Likewise.
16838 * gimple-match-head.c (gimple_simplify): Likewise.
16839 * gimple-fold.c (gimple_build): Likewise.
16840 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16841 rather than gimple_build_call_internal.
16842 (get_initial_defs_for_reduction): Likewise.
16843 (vect_create_epilog_for_reduction): Likewise.
16844 (vectorizable_live_operation): Likewise.
16845
16846 2018-05-17 Martin Liska <mliska@suse.cz>
16847
16848 * gimple-ssa-sprintf.c (format_directive): Do not use
16849 space in between 'G_' and '('.
16850
16851 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16852
16853 PR target/85323
16854 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16855 even if the mask is not all ones.
16856
16857 PR target/85323
16858 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16859 vector.
16860 (ix86_gimple_fold_builtin): Likewise.
16861
16862 PR target/85323
16863 * config/i386/i386.c: Include tree-vector-builder.h.
16864 (ix86_vector_shift_count): New function.
16865 (ix86_fold_builtin): Fold shift builtins by scalar count.
16866 (ix86_gimple_fold_builtin): Likewise.
16867
16868 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16869 _mm512_setzero): New intrinsics.
16870
16871 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16872 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16873
16874 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16875 code generation for cases where splatting a value is not useful.
16876 * simplify-rtx.c (simplify_ternary_operation): Simplify
16877 vec_merge across a vec_duplicate and a paradoxical subreg forming
16878 a vector mode to a vec_concat.
16879
16880 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16881
16882 * config.gcc: Support "goldmont-plus".
16883 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16884 "goldmont-plus".
16885 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16886 PROCESSOR_GOLDMONT_PLUS.
16887 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16888 (processor_target_table): Add "goldmont-plus".
16889 (PTA_GOLDMONT_PLUS): Define.
16890 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16891 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16892 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16893 (fold_builtin_cpu): Add "goldmont-plus".
16894 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16895 (ix86_option_override_internal): Add "goldmont-plus".
16896 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16897 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16898 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16899 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16900
16901 2018-05-17 Richard Biener <rguenther@suse.de>
16902
16903 PR tree-optimization/85757
16904 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16905 remove defs that only feed that PHI from further processing.
16906
16907 2018-05-16 Jim Wilson <jimw@sifive.com>
16908
16909 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16910 asterisk to name.
16911 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16912
16913 2018-05-16 Mark Wielaard <mark@klomp.org>
16914
16915 * dwarf2out.c (count_index_strings): New function.
16916 (output_indirect_strings): Call count_index_strings and generate
16917 header for dwarf_version >= 5.
16918
16919 2018-05-16 Mark Wielaard <mark@klomp.org>
16920
16921 * dwarf2out.c (dwarf_FORM): New function.
16922 (set_indirect_string): Use dwarf_FORM.
16923 (reset_indirect_string): Likewise.
16924 (size_of_die): Likewise.
16925 (value_format): Likewise.
16926 (output_die): Likewise.
16927 (add_skeleton_AT_string): Likewise.
16928 (output_macinfo_op): Likewise.
16929 (index_string): Likewise.
16930 (output_index_string_offset): Likewise.
16931 (output_index_string): Likewise.
16932 (count_index_strings): Likewise.
16933
16934 2018-05-16 Carl Love <cel@us.ibm.com>
16935
16936 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16937 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16938
16939 2018-05-16 Martin Jambor <mjambor@suse.cz>
16940
16941 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16942 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16943
16944 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16945
16946 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16947 (fnma<mode>4): Likewise.
16948 (fms<mode>4): Likewise.
16949 (fnms<mode>4): Likewise.
16950 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16951 (aarch64_fnma<mode>4): Likewise.
16952 (aarch64_fms<mode>4): Likewise.
16953 (aarch64_fnms<mode>4): Likewise.
16954 (aarch64_fnmadd<mode>4): Likewise.
16955
16956 2018-05-16 Jason Merrill <jason@redhat.com>
16957
16958 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16959
16960 2018-05-16 Richard Biener <rguenther@suse.de>
16961
16962 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16963 (dump_stmt_cost): Declare.
16964 (add_stmt_cost): Dump cost we add.
16965 (add_stmt_costs): New function.
16966 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16967 No longer exported.
16968 (vect_analyze_stmt): Adjust prototype.
16969 (vectorizable_condition): Likewise.
16970 (vectorizable_live_operation): Likewise.
16971 (vectorizable_reduction): Likewise.
16972 (vectorizable_induction): Likewise.
16973 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16974 cost vector to pass to vectorizable_ and record afterwards.
16975 (vect_model_reduction_cost): Take cost vector argument and adjust.
16976 (vect_model_induction_cost): Likewise.
16977 (vectorizable_reduction): Likewise.
16978 (vectorizable_induction): Likewise.
16979 (vectorizable_live_operation): Likewise.
16980 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16981 SLP_TREE_NUMBER_OF_VEC_STMTS.
16982 (vect_analyze_slp_cost_1): Remove.
16983 (vect_analyze_slp_cost): Likewise.
16984 (vect_slp_analyze_node_operations): Take visited args and
16985 a target cost vector. Avoid processing already visited stmt sets.
16986 (vect_slp_analyze_operations): Use a local cost vector to gather
16987 costs and register those of non-discarded instances.
16988 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16989 (vect_schedule_slp_instance): Remove copying of
16990 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16991 zero.
16992 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16993 adding cost. Record cost entry location.
16994 (vect_prologue_cost_for_slp_op): Function to compute cost of
16995 a constant or invariant generated for SLP vect in the prologue,
16996 split out from vect_analyze_slp_cost_1.
16997 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16998 (vect_model_promotion_demotion_cost): Likewise.
16999 (vect_model_store_cost): Likewise, make static.
17000 (vect_model_load_cost): Likewise.
17001 (vectorizable_bswap): Add cost vector arg and adjust.
17002 (vectorizable_call): Likewise.
17003 (vectorizable_simd_clone_call): Likewise.
17004 (vectorizable_conversion): Likewise.
17005 (vectorizable_assignment): Likewise.
17006 (vectorizable_shift): Likewise.
17007 (vectorizable_operation): Likewise.
17008 (vectorizable_store): Likewise.
17009 (vectorizable_load): Likewise.
17010 (vectorizable_condition): Likewise.
17011 (vectorizable_comparison): Likewise.
17012 (can_vectorize_live_stmts): Likewise.
17013 (vect_analyze_stmt): Likewise.
17014 (vect_transform_stmt): Adjust calls to vectorizable_*.
17015 * tree-vectorizer.c: Include gimple-pretty-print.h.
17016 (dump_stmt_cost): New function.
17017
17018 2018-05-16 Richard Biener <rguenther@suse.de>
17019
17020 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17021 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17022 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17023 (check_name): New callback.
17024 (dse_classify_store): Track cycles via a visited bitmap of PHI
17025 defs and simplify handling of in-loop and across loop dead stores
17026 and properly fail for loop-variant refs. Handle byte-tracking with
17027 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17028 limiting the walk.
17029
17030 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17031
17032 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17033 (vect_get_mask_type_for_stmt): Likewise.
17034 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17035 split out from...
17036 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17037 to determine the statement's vector type and the vector type that
17038 should be used for calculating nunits. Deal with cases in which
17039 the type has to be deferred.
17040 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17041 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17042 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17043 (vect_determine_vf_for_stmt): New functions, split out from...
17044 (vect_determine_vectorization_factor): ...here.
17045 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17046 (vect_get_mask_type_for_stmt): New functions, split out from
17047 vect_determine_vectorization_factor.
17048
17049 2018-05-16 Richard Biener <rguenther@suse.de>
17050
17051 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17052 verify the [VEC_]COND_EXPR embedded comparison.
17053
17054 2018-05-15 Martin Sebor <msebor@redhat.com>
17055
17056 PR tree-optimization/85753
17057 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17058 RECORD_TYPE in addition to ARRAY_TYPE.
17059
17060 2018-05-15 Martin Sebor <msebor@redhat.com>
17061
17062 PR middle-end/85643
17063 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17064
17065 2018-05-15 Richard Biener <rguenther@suse.de>
17066
17067 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17068 add by_clobber_p one. Change algorithm to collect all defs
17069 representing uses we need to walk and try reducing them to
17070 a single one before failing.
17071 (dse_dom_walker::dse_optimize_stmt): Adjust.
17072
17073 2018-05-13 Mark Wielaard <mark@klomp.org>
17074
17075 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17076 (size_of_loc_descr): Likewise.
17077 (output_loc_operands): Likewise.
17078 (output_loc_operands_raw): Likewise.
17079 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17080 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17081 (hash_loc_operands): Likewise.
17082 (compare_loc_operands): Likewise.
17083
17084 2018-05-14 Mark Wielaard <mark@klomp.org>
17085
17086 * dwarf2out.c (count_index_addrs): New function.
17087 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17088
17089 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17090
17091 PR tree-optimization/83648
17092 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17093 return value as malloc candidate.
17094
17095 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17096
17097 PR ipa/85734
17098 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17099 param as true in call to suggest_attribute.
17100
17101 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17102
17103 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17104 -mreadonly-in-sdata.
17105
17106 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17107
17108 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17109 New pattern.
17110 (aarch64_crypto_aesd_fused): Likewise.
17111
17112 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17113
17114 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17115 (movsi_aarch64): Likewise.
17116 (load_pairsi): Likewise.
17117 (load_pairdi): Likewise.
17118 (store_pairsi): Likewise.
17119 (store_pairdi): Likewise.
17120 (load_pairsf): Likewise.
17121 (load_pairdf): Likewise.
17122 (store_pairsf): Likewise.
17123 (store_pairdf): Likewise.
17124 (zero_extend): Likewise.
17125 (trunc): Swap alternatives.
17126 (fcvt_target): Add '?' to prefer w over r.
17127
17128 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17129
17130 PR target/85756
17131 * config/i386/i386.md: Disallow non-commutative arithmetics in
17132 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17133 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17134 in the peephole2 before it.
17135
17136 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17137
17138 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17139 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17140 (ix86_handle_option): Handle -mcldemote.
17141 * config.gcc: New header.
17142 * config/i386/cldemoteintrin.h: New file.
17143 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17144 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17145 -mcldemote.
17146 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17147 OPTION_MASK_ISA_CLDEMOTE.
17148 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17149 (ix86_valid_target_attribute_inner_p): Ditto.
17150 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17151 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17152 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17153 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17154 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17155 (cldemote): New.
17156 * config/i386/i386.opt: Add -mcldemote.
17157 * config/i386/x86intrin.h: New header.
17158 * doc/invoke.texi: Add -mcldemote.
17159
17160 2018-05-14 Richard Biener <rguenther@suse.de>
17161
17162 * doc/match-and-simplify.texi: Adjust :s documentation.
17163
17164 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17165
17166 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17167 intended memcpy size.
17168 (REORDER_45): Likewise.
17169
17170 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17171
17172 * sort.cc: New file.
17173 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17174 * vec.c (qsort_chk): Use gcc_qsort.
17175 * Makefile.in (OBJS-libcommon): Add sort.o.
17176 (build/sort.o): New target. Use it...
17177 (BUILD_RTL): ... here, and...
17178 (build/gencfn-macros): ... here, and...
17179 (build/genmatch): ... here.
17180
17181 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17182 Chung-Ju Wu <jasonwucj@gmail.com>
17183
17184 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17185 * config/nds32/nds32-graywolf.md: New file.
17186 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17187 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17188 pipeline.
17189 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17190 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17191 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17192 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17193 * config/nds32/pipelines.md: Include n15 settings.
17194
17195 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17196 Chung-Ju Wu <jasonwucj@gmail.com>
17197
17198 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17199 * config/nds32/nds32-n13.md: New file.
17200 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17201 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17202 pipeline.
17203 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17204 * config/nds32/nds32.md (pipeline_model): Add n13.
17205 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17206 * config/nds32/pipelines.md: Include n13 settings.
17207
17208 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17209 Chung-Ju Wu <jasonwucj@gmail.com>
17210
17211 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17212 * config/nds32/nds32-n10.md: New file.
17213 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17214 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17215 pipeline.
17216 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17217 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17218 * config/nds32/nds32.md (pipeline_model): Add n10.
17219 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17220 * config/nds32/pipelines.md: Include n10 settings.
17221
17222 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17223 Kito Cheng <kito.cheng@gmail.com>
17224 Chung-Ju Wu <jasonwucj@gmail.com>
17225
17226 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17227 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17228 Add enum values for DSP extension instructions.
17229 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17230 New constraints.
17231 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17232 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17233 New code iterators.
17234 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17235 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17236 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17237 * config/nds32/nds32-intrinsic.md: Likewise.
17238 * config/nds32/nds32_intrinsic.h: Likewise.
17239 * config/nds32/nds32-md-auxiliary.c: Likewise.
17240 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17241 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17242 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17243 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17244 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17245 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17246 TYPE_DMAC in switch statement.
17247 * config/nds32/nds32.c: New checking and implementation for DSP
17248 extension instructions.
17249 * config/nds32/nds32.h: Likewise.
17250 * config/nds32/nds32.md: Likewise.
17251 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17252 * config/nds32/predicates.md: Implement new predicates for DSP
17253 extension.
17254
17255 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17256
17257 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17258 Reformat alternatives and attributes so it is easier to identify
17259 which constraints/attributes go with which instruction.
17260 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17261 (mov<mode>_softfloat32, FMOVE64): Likewise.
17262 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17263 (mov<mode>_softfloat64, FMOVE64): Likewise.
17264
17265 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17266
17267 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17268 subsection.
17269 (Basic PowerPC Built-in Functions): The new name of the
17270 subsection previously known as "PowerPC Built-in Functions".
17271 (Basic PowerPC Built-in Functions Available on all Configurations):
17272 New subsubsection.
17273 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17274 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17275 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17276 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17277
17278 2018-05-11 Martin Jambor <mjambor@suse.cz>
17279
17280 PR ipa/85655
17281 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17282 single const.
17283
17284 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17285
17286 PR target/85733
17287 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17288
17289 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17290
17291 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17292 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17293 (ix86_handle_option): Handle -mwaitpkg.
17294 * config.gcc: New header.
17295 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17296 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17297 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17298 function type.
17299 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17300 OPTION_MASK_ISA_WAITPKG.
17301 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17302 (ix86_option_override_internal): Add PTA_WAITPKG.
17303 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17304 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17305 IX86_BUILTIN_TPAUSE.
17306 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17307 __builtin_ia32_umwait and __builtin_ia32_tpause.
17308 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17309 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17310 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17311 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17312 UNSPECV_TPAUSE): New.
17313 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17314 * config/i386/i386.opt: Add -mwaitpkg.
17315 * config/i386/waitpkgintrin.h: New file.
17316 * config/i386/x86intrin.h: New header.
17317 * doc/invoke.texi: Add -mwaitpkg.
17318
17319 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17320
17321 PR target/85606
17322 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17323 equivalent.
17324 (cortex-m0): Use armv6s-m isa.
17325 (cortex-m0plus): Likewise.
17326 (cortex-m1): Likewise.
17327 (cortex-m0.small-multiply): Likewise.
17328 (cortex-m0plus.small-multiply): Likewise.
17329 (cortex-m1.small-multiply): Likewise.
17330
17331 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17332 Jakub Jelinek <jakub@redhat.com>
17333
17334 PR tree-optimization/85692
17335 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17336 source permute as well.
17337
17338 2018-05-11 Martin Liska <mliska@suse.cz>
17339
17340 PR sanitizer/85556
17341 * doc/extend.texi: Document LLVM style format for no_sanitize
17342 attribute.
17343
17344 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17345
17346 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17347 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17348 (mode_supports_vsx_dform_quad): Likewise.
17349 (mode_supports_vmx_dform): Move these functions to be next to the
17350 other mode_supports functions.
17351 (mode_supports_dq_form): Likewise.
17352 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17353 mode_supports_dq_form.
17354 (reg_offset_addressing_ok_p): Likewise.
17355 (offsettable_ok_by_alignment): Likewise.
17356 (rs6000_legitimate_offset_address_p): Likewise.
17357 (legitimate_lo_sum_address_p): Likewise.
17358 (rs6000_legitimize_address): Likewise.
17359 (rs6000_legitimize_reload_address): Likewise.
17360 (rs6000_secondary_reload_inner): Likewise.
17361 (rs6000_preferred_reload_class): Likewise.
17362 (rs6000_output_move_128bit): Likewise.
17363
17364 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17365
17366 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17367 Generate SImode target register for null target.
17368 <case IX86_BUILTIN_XGETBV>: Ditto.
17369 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17370 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17371
17372 2018-05-10 Carl Love <cel@us.ibm.com>
17373
17374 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17375 dcbtt and dcbtstt if operands[2] is 0.
17376
17377 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17378
17379 PR target/85693
17380 * config/i386/sse.md (usadv64qi): New expander.
17381
17382 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17383
17384 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17385 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17386 -maltivec=be support.
17387 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17388 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17389 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17390 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17391 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17392 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17393 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17394 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17395 altivec_vsumsws): Adjust.
17396 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17397 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17398 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17399 support.
17400 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17401 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17402 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17403 (altivec_lve<VI_char>x): Delete expand.
17404 (*altivec_lve<VI_char>x_internal): Rename to...
17405 (altivec_lve<VI_char>x): ... this.
17406 (altivec_lvxl_<mode>): Delete expand.
17407 (*altivec_lvxl_<mode>_internal): Rename to ...
17408 (altivec_lvxl_<mode>): ... this.
17409 (altivec_stvxl_<mode>): Delete expand.
17410 (*altivec_stvxl_<mode>_internal): Rename to ...
17411 (altivec_stvxl_<mode>): ... this.
17412 (altivec_stve<VI_char>x): Delete expand.
17413 (*altivec_stve<VI_char>x_internal): Rename to ...
17414 (altivec_stve<VI_char>x): ... this.
17415 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17416 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17417 reduc_plus_scal_<mode>): Adjust.
17418 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17419 comment.
17420 (rs6000_cpu_cpp_builtins): Adjust.
17421 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17422 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17423 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17424 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17425 -maltivec=be support.
17426 (rs6000_split_vec_extract_var): Adjust.
17427 (rs6000_split_v4si_init): Adjust.
17428 (swap_selector_for_mode): Delete.
17429 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17430 altivec_expand_stvex_be): Delete.
17431 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17432 -maltivec=be support.
17433 (rs6000_gimple_fold_builtin): Ditto.
17434 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17435 Adjust.
17436 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17437 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17438 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17439 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17440 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17441 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17442 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17443 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17444 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17445 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17446 anonymous split): Adjust.
17447 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17448 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17449
17450 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17451
17452 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17453 when --with-gxx-include-dir is also specified.
17454 * configure: Regenerate.
17455
17456 2018-05-09 Jim Wilson <jimw@sifive.com>
17457
17458 PR target/84797
17459 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17460 * config/riscv/t-withmultilib: New.
17461 * config/riscv/withmultilib.h: New.
17462 * doc/install.texi: Document RISC-V --with-multilib-list support.
17463
17464 2018-05-09 Richard Biener <rguenther@suse.de>
17465
17466 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17467 vector.
17468 (vect_bb_vectorization_profitable_p): Adjust. Compute
17469 actual scalar cost using the cost vector and the add_stmt_cost
17470 machinery.
17471
17472 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17473
17474 PR rtl-optimization/85645
17475 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17476 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17477
17478 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17479
17480 PR rtl-optimization/85645
17481 * shrink-wrap.c (spread_components): Return a boolean saying if
17482 anything was changed.
17483 (try_shrink_wrapping_separate): Iterate spread_components until
17484 nothing changes anymore.
17485
17486 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17487
17488 PR rtl-optimization/85645
17489 * regrename.c (build_def_use): Also kill the chains that include the
17490 destination of a REG_CFA_REGISTER note.
17491
17492 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17493
17494 PR rtl-optimization/85645
17495 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17496 insn that has a REG_CFA_REGISTER note.
17497
17498 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17499
17500 * cfgexpand.c (expand_clobber): New function.
17501 (expand_gimple_stmt_1): Use it.
17502 * tree-vect-stmts.c (vect_clobber_variable): New function,
17503 split out from...
17504 (vectorizable_simd_clone_call): ...here.
17505 (vectorizable_store): Emit a clobber either side of an
17506 IFN_STORE_LANES sequence.
17507 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17508
17509 2018-05-09 Tom de Vries <tom@codesourcery.com>
17510
17511 PR target/85626
17512 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17513 (define_insn "trap_if_false"): Add exit after trap.
17514
17515 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17516
17517 PR rtl-optimization/85638
17518 * bb-reorder.c: Include common/common-target.h.
17519 (create_forwarder_block): New function extracted from...
17520 (fix_up_crossing_landing_pad): ...here. Rename into...
17521 (dw2_fix_up_crossing_landing_pad): ...this.
17522 (sjlj_fix_up_crossing_landing_pad): New function.
17523 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17524 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17525 from both partitions and exit the loop after one iteration.
17526
17527 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17528
17529 Revert:
17530 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17531 subsection.
17532 (Basic PowerPC Built-in Functions): The new name of the
17533 subsection previously known as "PowerPC Built-in Functions".
17534 (Basic PowerPC Built-in Functions Available on all Configurations):
17535 New subsubsection.
17536 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17537 subsubsection.
17538 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17539 subsubsection.
17540 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17541 subsubsection.
17542 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17543 subsubsection.
17544
17545 2018-05-08 Jim Wilson <jimw@sifive.com>
17546
17547 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17548 (LD_EMUL_SUFFIX): New.
17549 (LINK_SPEC): Use it.
17550
17551 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17552
17553 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17554 subsection.
17555 (Basic PowerPC Built-in Functions): The new name of the
17556 subsection previously known as "PowerPC Built-in Functions".
17557 (Basic PowerPC Built-in Functions Available on all Configurations):
17558 New subsubsection.
17559 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17560 subsubsection.
17561 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17562 subsubsection.
17563 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17564 subsubsection.
17565 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17566 subsubsection.
17567
17568 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17569
17570 PR target/85683
17571 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17572 after cmpelim optimization.
17573
17574 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17575
17576 * config.gcc: Support "goldmont".
17577 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17578 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17579 PROCESSOR_GOLDMONT.
17580 * config/i386/i386.c (m_GOLDMONT): Define.
17581 (processor_target_table): Add "goldmont".
17582 (PTA_GOLDMONT): Define.
17583 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17584 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17585 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17586 (fold_builtin_cpu): Add "goldmont".
17587 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17588 (ix86_option_override_internal): Add "goldmont".
17589 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17590 (processor_type): Add PROCESSOR_GOLDMONT.
17591 * config/i386/i386.md: Add CPU "glm".
17592 * config/i386/glm.md: New file.
17593 * config/i386/x86-tune.def: Add m_GOLDMONT.
17594 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17595
17596 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17597
17598 PR target/85572
17599 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17600 E_V4DImode.
17601 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17602 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17603 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17604
17605 PR target/85317
17606 * config/i386/i386.c (ix86_fold_builtin): Handle
17607 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17608
17609 PR target/85480
17610 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17611 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17612
17613 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17614
17615 PR target/85658
17616 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17617 (check_arch): Likewise.
17618 (check_fpu): Return the result rather than printing it.
17619 (end arch): Fix operator precedence.
17620 (end cpu): Likewise.
17621 (END): Print the result from check_fpu.
17622
17623 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17624 Alan Hayward <alan.hayward@arm.com>
17625 David Sherwood <david.sherwood@arm.com>
17626
17627 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17628 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17629 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17630 (*fcmuo<mode>_and): New patterns.
17631
17632 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17633
17634 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17635 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17636 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17637 (cmp_op, sve_imm_con): New code attributes.
17638 (SVE_COND_INT_CMP, imm_con): Delete.
17639 (cmp_op): Remove above unspecs from int attribute.
17640 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17641 to...
17642 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17643 comparison-specific unspecs.
17644 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17645 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17646 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17647 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17648 (*vec_fcm<cmp_op><mode>): Rename to...
17649 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17650 (*vec_fcmuo<mode>): Rename to...
17651 (*fcmuo<mode>): ...this and adjust likewise.
17652 (*pred_fcm<cmp_op><mode>): New pattern.
17653 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17654 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17655 functions.
17656 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17657 and UNORDERED.
17658 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17659 (aarch64_emit_sve_predicated_cond): New function.
17660 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17661 (aarch64_emit_unspec_cond_or): Replace with...
17662 (aarch64_emit_sve_or_conds): ...this new function. Use
17663 aarch64_emit_sve_ptrue_op for the individual comparisons and
17664 aarch64_emit_binop to OR them together.
17665 (aarch64_emit_inverted_unspec_cond): Replace with...
17666 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17667 aarch64_emit_sve_ptrue_op for the comparison and
17668 aarch64_emit_unop to invert the result.
17669 (aarch64_expand_sve_vec_cmp_float): Update after the above
17670 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17671
17672 2018-05-07 Nathan Sidwell <nathan@acm.org>
17673
17674 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17675 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17676 (Backwards Compatibility): Likewise.
17677
17678 2018-05-07 Luis Machado <luis.machado@linaro.org>
17679
17680 PR bootstrap/85681
17681 Revert:
17682 2018-05-07 Luis Machado <luis.machado@linaro.org>
17683
17684 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17685 <prefetch_dynamic_strides>: New const bool field.
17686 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17687 prefetch_dynamic_strides.
17688 (exynosm1_prefetch_tune): Likewise.
17689 (thunderxt88_prefetch_tune): Likewise.
17690 (thunderx_prefetch_tune): Likewise.
17691 (thunderx2t99_prefetch_tune): Likewise.
17692 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17693 to false.
17694 (aarch64_override_options_internal): Update to set
17695 PARAM_PREFETCH_DYNAMIC_STRIDES.
17696 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17697 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17698 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17699 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17700 prefetch-dynamic-strides setting.
17701
17702 2018-05-07 Luis Machado <luis.machado@linaro.org>
17703
17704 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17705 <minimum_stride>: New const int field.
17706 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17707 minimum_stride field.
17708 (exynosm1_prefetch_tune): Likewise.
17709 (thunderxt88_prefetch_tune): Likewise.
17710 (thunderx_prefetch_tune): Likewise.
17711 (thunderx2t99_prefetch_tune): Likewise.
17712 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17713 (aarch64_override_options_internal): Update to set
17714 PARAM_PREFETCH_MINIMUM_STRIDE.
17715 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17716 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17717 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17718 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17719 stride is constant and is below the minimum stride threshold.
17720
17721 2018-05-07 Luis Machado <luis.machado@linaro.org>
17722
17723 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17724 to 512.
17725
17726 2018-05-07 Luis Machado <luis.machado@linaro.org>
17727
17728 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17729 <prefetch_dynamic_strides>: New const bool field.
17730 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17731 prefetch_dynamic_strides.
17732 (exynosm1_prefetch_tune): Likewise.
17733 (thunderxt88_prefetch_tune): Likewise.
17734 (thunderx_prefetch_tune): Likewise.
17735 (thunderx2t99_prefetch_tune): Likewise.
17736 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17737 to false.
17738 (aarch64_override_options_internal): Update to set
17739 PARAM_PREFETCH_DYNAMIC_STRIDES.
17740 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17741 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17742 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17743 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17744 prefetch-dynamic-strides setting.
17745
17746 2018-05-07 Luis Machado <luis.machado@linaro.org>
17747
17748 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17749 <minimum_stride>: New const int field.
17750 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17751 minimum_stride field.
17752 (exynosm1_prefetch_tune): Likewise.
17753 (thunderxt88_prefetch_tune): Likewise.
17754 (thunderx_prefetch_tune): Likewise.
17755 (thunderx2t99_prefetch_tune): Likewise.
17756 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17757 (aarch64_override_options_internal): Update to set
17758 PARAM_PREFETCH_MINIMUM_STRIDE.
17759 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17760 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17761 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17762 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17763 stride is constant and is below the minimum stride threshold.
17764
17765 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17766
17767 PR c++/85659
17768 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17769 the type is addressable. Don't force op into register if it has
17770 BLKmode.
17771
17772 2018-05-05 Roland McGrath <mcgrathr@google.com>
17773
17774 PR other/77609
17775 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17776 any section for which we don't know a specific type it should have,
17777 regardless of name. Previously this was done only for the exact
17778 names ".init_array", ".fini_array", and ".preinit_array".
17779 (default_elf_asm_named_section): Add comment about
17780 relationship with default_section_type_flags and SECTION_NOTYPE.
17781 (get_section): Don't consider it a type conflict if one side has
17782 SECTION_NOTYPE and the other doesn't, as long as neither has the
17783 SECTION_BSS et al used in the default_section_type_flags logic.
17784
17785 2018-05-05 Tom de Vries <tom@codesourcery.com>
17786
17787 PR target/85653
17788 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17789 (workaround_barsyncs): New function.
17790 (nvptx_reorg): Use workaround_barsyncs.
17791 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17792 (define_expand "nvptx_membar_cta"): New define_expand.
17793 (define_insn "*nvptx_membar_cta"): New insn.
17794
17795 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17796
17797 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17798 To improve optimization opportunities.
17799 * builtin-types.def: The new needed builtin types for the above.
17800
17801 2018-05-04 Richard Biener <rguenther@suse.de>
17802
17803 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17804 * gimple-ssa-store-merging.c
17805 (imm_store_chain_info::output_merged_store): Remove redundant create,
17806 release split_store vector contents on failure.
17807 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17808 scalar stmt vector on cache hit.
17809
17810 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17811
17812 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17813 Xilinx FP support.
17814 * config.gcc (powerpc-xilinx-eabi*): Remove.
17815 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17816 support.
17817 (fusion_addis_mem_combo_load): Ditto.
17818 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17819 FP support.
17820 (rs6000_cpu_cpp_builtins): Ditto.
17821 * config/rs6000/rs6000-linux.c
17822 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17823 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17824 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17825 support.
17826 (rs6000_setup_reg_addr_masks): Ditto.
17827 (rs6000_init_hard_regno_mode_ok): Ditto.
17828 (rs6000_option_override_internal): Ditto.
17829 (legitimate_lo_sum_address_p): Ditto.
17830 (rs6000_legitimize_address): Ditto.
17831 (rs6000_legitimize_reload_address): Ditto.
17832 (rs6000_legitimate_address_p): Ditto.
17833 (abi_v4_pass_in_fpr): Ditto.
17834 (setup_incoming_varargs): Ditto.
17835 (rs6000_gimplify_va_arg): Ditto.
17836 (rs6000_split_multireg_move): Ditto.
17837 (rs6000_savres_strategy): Ditto.
17838 (rs6000_emit_prologue_components): Ditto.
17839 (rs6000_emit_epilogue_components): Ditto.
17840 (rs6000_emit_prologue): Ditto.
17841 (rs6000_emit_epilogue): Ditto.
17842 (rs6000_elf_file_end): Ditto.
17843 (rs6000_function_value): Ditto.
17844 (rs6000_libcall_value): Ditto.
17845 * config/rs6000/rs6000.h: Ditto.
17846 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17847 (TARGET_MINMAX): ... this. New.
17848 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17849 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17850 (*movsi_internal1_single): Delete.
17851 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17852 mfpu=, mxilinx-fpu): Delete.
17853 * config/rs6000/singlefp.h: Delete.
17854 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17855 * config/rs6000/t-rs6000: Ditto.
17856 * config/rs6000/t-xilinx: Delete.
17857 * config/rs6000/titan.md: Adjust for fp_type removal.
17858 * config/rs6000/vsx.md: Remove Xilinx FP support.
17859 (VStype_simple): Delete.
17860 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17861 * config/rs6000/xfpu.h: Delete.
17862 * config/rs6000/xfpu.md: Delete.
17863 * config/rs6000/xilinx.h: Delete.
17864 * config/rs6000/xilinx.opt: Delete.
17865 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17866 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17867
17868 2018-05-04 Tom de Vries <tom@codesourcery.com>
17869
17870 PR libgomp/85639
17871 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17872 if ignore == 0.
17873
17874 2018-05-04 Richard Biener <rguenther@suse.de>
17875
17876 PR middle-end/85627
17877 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17878 (expand_complex_div_wide): Likewise.
17879 (expand_complex_operations_1): Likewise.
17880 (expand_complex_libcall): Preserve EH info of the original stmt.
17881 (tree_lower_complex): Handle removed blocks.
17882 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17883 on complex multiplication and division libcall builtins.
17884
17885 2018-05-04 Richard Biener <rguenther@suse.de>
17886
17887 PR middle-end/85574
17888 * fold-const.c (negate_expr_p): Restrict negation of operand
17889 zero of a division to when we know that can happen without
17890 overflow.
17891 (fold_negate_expr_1): Likewise.
17892
17893 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17894
17895 PR libstdc++/85466
17896 * real.h (real_nextafter): Declare.
17897 * real.c (real_nextafter): New function.
17898 * fold-const-call.c (fold_const_nextafter): New function.
17899 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17900 CASE_CFN_NEXTTOWARD.
17901 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17902 even when arg1_mode is different from arg0_mode.
17903
17904 2018-05-03 Nathan Sidwell <nathan@acm.org>
17905
17906 * doc/extend.texi (Deprecated Features): Remove
17907 -ffriend-injection.
17908 (Backwards Compatibility): Likewise.
17909 * doc/invoke.texi (C++ Language Options): Likewise.
17910 (C++ Dialect Options): Likewise.
17911
17912 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17913
17914 PR target/85530
17915 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17916 _mm512_mask_mullox_epi64): New intrinsics.
17917
17918 2018-05-03 Tom de Vries <tom@codesourcery.com>
17919
17920 PR testsuite/85106
17921 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17922 dump files): Add offload-tree.
17923
17924 2018-05-03 Richard Biener <rguenther@suse.de>
17925
17926 PR tree-optimization/85615
17927 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17928 to loops not nested in BBs loop father to avoid creating multi-entry
17929 loops.
17930
17931 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17932
17933 PR tree-optimization/70291
17934 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17935 arguments. Change return type to tree. Emit libcall as a new
17936 statement rather than replacing existing one when inplace_p is true.
17937 (expand_complex_multiplication_components): New function.
17938 (expand_complex_multiplication): Expand floating-point complex
17939 multiplication using the above.
17940 (expand_complex_division): Rename inner_type parameter to type.
17941 Update expand_complex_libcall call-site.
17942 (expand_complex_operations_1): Update expand_complex_multiplication
17943 and expand_complex_division call-sites.
17944
17945 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17946
17947 PR target/85582
17948 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17949 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17950 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17951 the highest significant bit of the shift count mask is clear. In
17952 check whether and[sq]i3 is needed verify that all significant bits
17953 of the shift count other than the highest are set.
17954
17955 2018-05-02 Tom de Vries <tom@codesourcery.com>
17956
17957 PR libgomp/82428
17958 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17959 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17960 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17961 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17962 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17963 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17964 __builtin_goacc_parlevel_size.
17965
17966 2018-05-02 Richard Biener <rguenther@suse.de>
17967
17968 PR tree-optimization/85597
17969 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17970 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17971 directly.
17972
17973 2018-05-02 Tom de Vries <tom@codesourcery.com>
17974
17975 PR testsuite/85106
17976 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17977 dump files): Add ltrans-tree.
17978
17979 2018-05-02 Tom de Vries <tom@codesourcery.com>
17980
17981 PR testsuite/85106
17982 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17983 dump files): Add wpa-ipa.
17984
17985 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17986
17987 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17988 powerpc*-*-linux*paired* target.
17989 * config/rs6000/750cl.h: Delete.
17990 * config/rs6000/paired.h: Delete.
17991 * config/rs6000/paired.md: Delete.
17992 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17993 float support.
17994 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17995 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17996 comment. Remove paired float support.
17997 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17998 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17999 VECTOR_PAIRED.
18000 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18001 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18002 declarations.
18003 * config/rs6000/rs6000.c: Remove paired float support.
18004 (paired_expand_vector_init, paired_expand_vector_move,
18005 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18006 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18007 paired_expand_builtin, paired_expand_predicate_builtin,
18008 paired_init_builtins): Delete.
18009 * config/rs6000/rs6000.h: Remove paired float support.
18010 * config/rs6000/rs6000.md: Remove paired float support.
18011 (move_from_CR_ov_bit): Delete.
18012 * config/rs6000/rs6000.opt (mpaired): Delete.
18013 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18014 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18015
18016 2018-05-02 Richard Biener <rguenther@suse.de>
18017
18018 PR middle-end/85567
18019 * gimplify.c (gimplify_save_expr): When in SSA form allow
18020 SAVE_EXPRs to compute to SSA vars.
18021
18022 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18023
18024 PR target/85582
18025 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18026 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18027 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18028 clobber operands[2], instead use a new pseudo. Formatting fixes.
18029
18030 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18031
18032 PR tree-optimization/85586
18033 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18034 exit early for statements in the same group if the accesses are
18035 not strided.
18036
18037 2018-05-02 Tom de Vries <tom@codesourcery.com>
18038
18039 PR lto/85451
18040 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18041 error message.
18042
18043 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18044
18045 PR tree-optimization/85143
18046 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18047
18048 2018-05-01 Tom de Vries <tom@codesourcery.com>
18049
18050 PR lto/85451
18051 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18052 not found" error message.
18053
18054 2018-05-01 Tom de Vries <tom@codesourcery.com>
18055
18056 PR other/83786
18057 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18058 * vec.c (test_ordered_remove_if): New function.
18059 (vec_c_tests): Call test_ordered_remove_if.
18060 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18061 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18062 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18063 VEC_ORDERED_REMOVE_IF.
18064
18065 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18066
18067 PR tree-optimization/82665
18068 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18069 pointer subtraction where arguments come from a memchr call.
18070
18071 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18072
18073 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18074 --push-state --as-needed and --pop-state instead of --as-needed and
18075 --no-as-needed if ld supports it.
18076 * configure: Regenerated.
18077
18078 PR web/85578
18079 * doc/install.texi2html: Replace _002d with - and _002a with * in
18080 generated html files using sed.
18081
18082 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18083
18084 PR c++/85523
18085 * gcc-rich-location.c (blank_line_before_p): New function.
18086 (use_new_line): New function.
18087 (gcc_rich_location::add_fixit_insert_formatted): New function.
18088 * gcc-rich-location.h
18089 (gcc_rich_location::add_fixit_insert_formatted): New function.
18090
18091 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18092
18093 * selftest.c (assert_streq): Rename "expected" and "actual" to
18094 "val1" and "val2". Extend NULL-handling to cover both inputs
18095 symmetrically, while still requiring both to be non-NULL for a pass.
18096 * selftest.h (assert_streq): Rename "expected" and "actual" to
18097 "val1" and "val2".
18098 (ASSERT_EQ): Likewise.
18099 (ASSERT_EQ_AT): Likewise.
18100 (ASSERT_KNOWN_EQ): Likewise.
18101 (ASSERT_KNOWN_EQ_AT): Likewise.
18102 (ASSERT_NE): Likewise.
18103 (ASSERT_MAYBE_NE): Likewise.
18104 (ASSERT_MAYBE_NE_AT): Likewise.
18105 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18106 the assertion to pass.
18107 (ASSERT_STREQ_AT): Likewise.
18108
18109 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18110
18111 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18112 interaction with -pie.
18113
18114 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18115
18116 * selftest.h: Fix alphabetization of per-source-file selftest
18117 declarations.
18118
18119 2018-04-30 Jason Merrill <jason@redhat.com>
18120
18121 PR c++/61982 - dead stores to destroyed objects.
18122 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18123 of clobber.
18124
18125 2018-04-30 Jason Merrill <jason@redhat.com>
18126
18127 * tree.c (build_clobber): New.
18128 * tree.h: Declare it.
18129 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18130
18131 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18132
18133 * diagnostic-show-locus.c (layout::layout): Update for
18134 location_get_source_line returning a char_span.
18135 (struct char_span): Move to input.h.
18136 (struct correction): Update for fields in char_span becoming
18137 private.
18138 (struct source_line): Update for location_get_source_line
18139 returning a char_span.
18140 (layout::print_line): Likewise.
18141 * edit-context.c (edited_file::print_content): Likewise.
18142 (edited_file::print_diff_hunk): Likewise.
18143 (edited_file::print_run_of_changed_lines): Likewise.
18144 (edited_file::get_num_lines): Likewise.
18145 (edited_line::edited_line): Likewise.
18146 * final.c (asm_show_source): Likewise.
18147 * input.c (location_get_source_line): Convert return type
18148 from const char * to char_span, losing the final "line_len"
18149 param.
18150 (dump_location_info): Update for the above.
18151 (get_substring_ranges_for_loc): Likewise. Use a char_span
18152 when handling the literal within the line.
18153 (test_reading_source_line): Update for location_get_source_line
18154 returning a char_span.
18155 * input.h (class char_span): Move here from
18156 diagnostic-show-locus.c, converting from a struct to a class.
18157 Make data members private.
18158 (char_span::operator bool): New.
18159 (char_span::length): New.
18160 (char_span::get_buffer): New.
18161 (char_span::operator[]): New.
18162 (char_span::subspan): Make const.
18163 (char_span::xstrdup): New.
18164 (location_get_source_line): Convert return type from const char *
18165 to char_span, losing the final "line_size" param.
18166
18167 2018-04-30 Jan Hubicka <jh@suse.cz>
18168
18169 * lto-wrapper.c (ltrans_priorities): New static var.
18170 (cmp_priority): New.
18171 (run_gcc): Read priorities and if doing parallel build order
18172 the Makefile by them.
18173
18174 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18175
18176 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18177
18178 2018-04-30 Richard Biener <rguenther@suse.de>
18179
18180 * tree-cfg.c (verify_address): Remove base argument, add
18181 flag whether to check TREE_ADDRESSABLE and do that.
18182 (verify_expr): Remove.
18183 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18184 (verify_gimple_assign_single): Likewise.
18185 (verify_gimple_switch): Likewise.
18186 (verify_expr_location_1): Dereference tp once. Add (disabled)
18187 piece from verify_expr.
18188 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18189
18190 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18191
18192 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18193
18194 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18195
18196 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18197 (small_data_pattern): Likewise.
18198 (arc_rewrite_small_data): Likewise.
18199 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18200 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18201 (get_symbol_alignment): New function.
18202 (legitimate_small_data_address_p): Likewise.
18203 (legitimate_scaled_address): Update, call
18204 legitimate_small_data_address_p.
18205 (output_sdata): New static variable.
18206 (arc_print_operand): Update how we handle small data operands.
18207 (arc_print_operand_address): Likewise.
18208 (arc_legitimate_address_p): Update, use
18209 legitimate_small_data_address_p.
18210 (arc_rewrite_small_data_p): Remove.
18211 (arc_rewrite_small_data_1): Likewise.
18212 (arc_rewrite_small_data): Likewise.
18213 (small_data_pattern): Likewise.
18214 (compact_sda_memory_operand): Update to use
18215 legitimate_small_data_address_p and get_symbol_alignment.
18216 (prepare_move_operands): Don't rewite sdata pattern.
18217 (prepare_extend_operands): Remove.
18218 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18219 pattern.
18220 (zero_extendqisi2): Likewise.
18221 (zero_extendhisi2): Likewise.
18222 (extendqihi2): Likewise.
18223 (extendqisi2): Likewise.
18224 (extendhisi2): Likewise.
18225 (addsi3): Likewise.
18226 (subsi3): Likewise.
18227 (andsi3): Likewise.
18228 * config/arc/constraints.md (Usd): Change it to memory constraint.
18229
18230 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18231
18232 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18233 as source of std instructions.
18234 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18235 allow 6-bit constants as source for store instructions.
18236 (movdi_insn): Update instruction pattern to allow 6-bit constants
18237 as source for store instructions.
18238
18239 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18240
18241 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18242
18243 2018-04-30 Nathan Sidwell <nathan@acm.org>
18244 Sandra Loosemore <sandra@codesourcery.com>
18245
18246 * dumpfile.c (dump_open): Allow '-' for stdout.
18247 * doc/invoke.texi (Developer Options): Document dump filename
18248 determination early. Document stdin/stdout selection.
18249
18250 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18251
18252 Microblaze Target: PIC data text relative
18253
18254 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18255 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18256 Add declaration.
18257 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18258 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18259 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18260 New addressing mode for data-text relative position indepenedent code.
18261 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18262 'ADDRESS_SYMBOLIC_TXT_REL'.
18263 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18264 (microblaze_legitimate_pic_operand): Exclude function calls from
18265 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18266 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18267 addresses cases.
18268 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18269 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18270 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18271 for 'address + offset'.
18272 (microblaze_expand_prologue): Add new function prologue call for
18273 'r20' assignation.
18274 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18275 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18276 table in case of TARGET_PIC_DATA_TEXT_REL.
18277 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18278 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18279 Add new macros 'UNSPEC_TEXT',
18280 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18281 + exclude function calls from 'UNSPEC_PLT' in case of data text
18282 relative mode.
18283 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18284 new target hook for generating address diff vector tables in case of
18285 flag_pic.
18286 * doc/tm.texi : Regenerate.
18287 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18288 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18289 of addr diff vector generation.
18290 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18291 target hook definition.
18292 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18293 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18294 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18295 option for data text relative.
18296
18297 2018-04-30 Richard Biener <rguenther@suse.de>
18298
18299 * tree-chrec.h (evolution_function_is_constant_p): Remove
18300 redundant check.
18301 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18302
18303 2018-04-30 Richard Biener <rguenther@suse.de>
18304
18305 PR bootstrap/85571
18306 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18307
18308 2018-04-30 Richard Biener <rguenther@suse.de>
18309
18310 PR tree-optimization/28364
18311 PR tree-optimization/85275
18312 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18313 copying first exit test.
18314
18315 2018-04-28 Mark Wielaard <mark@klomp.org>
18316
18317 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18318 dwarf_version >= 5.
18319 (dwarf_AT): Handle DW_AT_addr_base.
18320 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18321
18322 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18323
18324 PR target/84431
18325 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18326 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18327 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18328 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18329
18330 2018-04-28 Richard Biener <rguenther@suse.de>
18331
18332 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18333 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18334 to reflect use. Only add interesting stmts.
18335
18336 2018-04-27 Martin Jambor <mjambor@suse.cz>
18337
18338 PR ipa/85549
18339 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18340 the jump function allows for passing through aggregate values.
18341
18342 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18343
18344 * input.h (in_system_header_at): Convert from macro to inline
18345 function.
18346 (from_macro_expansion_at): Likewise.
18347 (from_macro_definition_at): Likewise.
18348
18349 2018-04-27 Jeff Law <law@redhat.com>
18350
18351 * config.gcc: Mark tile* targets as deprecated/obsolete.
18352
18353 2018-04-27 Richard Biener <rguenther@suse.de>
18354
18355 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18356 fix for ILP32.
18357
18358 2018-04-27 Richard Biener <rguenther@suse.de>
18359
18360 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18361
18362 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18363
18364 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18365 with Yd constraint. Set "preferred_for_speed" attribute from
18366 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18367 with Yd constraint.
18368 (*movdi_internal): Ditto.
18369 (movti_interunit splitters): Remove
18370 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18371 (movdi_interunit splitters): Ditto.
18372 * config/i386/constraints.md (Ye): Remove.
18373 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18374
18375 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18376
18377 PR target/85512
18378 * config/aarch64/constraints.md (Usg): Limit to 31.
18379 (Usj): Limit to 63.
18380
18381 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18382
18383 PR tree-optimization/85529
18384 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18385 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18386 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18387 zero extension or masking of the MSB bit.
18388 (optimize_range_tests): Add FIRST_BB argument, pass it through
18389 to optimize_range_tests_var_bound.
18390 (maybe_optimize_range_tests, reassociate_bb): Adjust
18391 optimize_range_tests callers.
18392
18393 2018-04-26 Richard Biener <rguenther@suse.de>
18394 Jakub Jelinek <jakub@redhat.com>
18395
18396 * cgraph.h (symbol_table): Just declare debug method here.
18397 * symtab.c (symbol_table::debug): Define.
18398
18399 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18400
18401 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18402
18403 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18404
18405 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18406 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18407 (*movdi_internal): Substitute Yi and Yj constraint with x
18408 and Ym and Yn constraint with y constraint. Update "isa"
18409 attribute and set "preferred_for_speed" attribute from
18410 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18411 (*movsi_internal): Ditto.
18412 (*movdf_internal): Ditto.
18413 (*movsf_internal): Ditto.
18414 (*zero_extendsidi2): Ditto.
18415 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18416 (sse2_loadld): Ditto.
18417 (*vec_extract<ssevecmodelower>_0): Ditto.
18418 (*vec_extractv4si_0_zext_sse4): Ditto.
18419 (vec_concatv2di): Ditto.
18420 (*vec_dup<mode>): Ditto.
18421 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18422 * config/i386/constraints.md (Yi): Remove.
18423 (Yj): Remove.
18424 (Ym): Remove.
18425 (Yn): Remove.
18426
18427 2018-04-26 Nathan Sidwell <nathan@acm.org>
18428
18429 * dumpfile.c (dump_open): New.
18430 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18431 (dump_finish): Detect stdio/stderr by value not name.
18432
18433 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18434
18435 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18436
18437 2018-04-26 Tom de Vries <tom@codesourcery.com>
18438
18439 PR target/84952
18440 * config/nvptx/nvptx.c (verify_neutering_jumps)
18441 (verify_neutering_labels): New function
18442 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18443
18444 2018-04-26 Tom de Vries <tom@codesourcery.com>
18445
18446 PR target/84025
18447 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18448 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18449 need neutering.
18450
18451 2018-04-26 Richard Biener <rguenther@suse.de>
18452 Tom de Vries <tom@codesourcery.com>
18453
18454 PR lto/85422
18455 * lto-streamer-out.c (output_function): Fixup loops if required to match
18456 discovery done in the reader.
18457
18458 2018-04-26 Richard Biener <rguenther@suse.de>
18459
18460 PR tree-optimization/85116
18461 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18462 have a loop exit from the single latch predecessor. Remove
18463 case of header with just condition.
18464 (ch_base::copy_headers): Exclude infinite loops from any
18465 processing.
18466 (pass_ch::execute): Record exits.
18467
18468 2018-04-26 Richard Biener <rguenther@suse.de>
18469
18470 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18471 prologue cost vector and pass it to vect_get_load_cost.
18472 (vect_get_peeling_costs_all_drs): Likewise.
18473 (vect_peeling_hash_get_lowest_cost): Likewise.
18474 (vect_enhance_data_refs_alignment): Likewise.
18475
18476 2018-04-26 Richard Biener <rguenther@suse.de>
18477
18478 PR middle-end/85450
18479 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18480 checking of integer<->pointer conversions.
18481 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18482 sign-/zero-extending pointer types.
18483 (expand_omp_for_static_chunk): Likewise.
18484
18485 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18486 Jean Lee <xiaoyur347@gmail.com>
18487
18488 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18489 (TARGET_ASAN_SHADOW_OFFSET): Define.
18490 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18491 true for -fsanitize=address.
18492
18493 2018-04-25 Mark Wielaard <mark@klomp.org>
18494
18495 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18496 shorter ones.
18497
18498 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18499
18500 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18501 than "alu", remove explicit "memory" and "imm_disp" attributes.
18502 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18503
18504 PR middle-end/85414
18505 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18506 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18507 gen_lowpart_no_emit.
18508
18509 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18510
18511 PR target/85473
18512 * config/i386/i386.c (ix86_expand_builtin): Change memory
18513 operand to XI, extend p0 to Pmode.
18514 * config/i386/i386.md: Change unspec volatile and operand
18515 1 mode to XI, change operand 0 mode to P.
18516
18517 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18518
18519 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18520 GET_MODE_MASK before any checking.
18521 (nds32_can_use_bset_p): Likewise.
18522 (nds32_can_use_btgl_p): Likewise.
18523
18524 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18525
18526 * config/nds32/nds32-doubleword.md: New define_split pattern for
18527 illegal register number.
18528
18529 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18530
18531 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18532
18533 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18534
18535 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18536
18537 2018-04-25 Richard Biener <rguenther@suse.de>
18538
18539 * lto-streamer.h (LTO_major_version): Bump to 8.
18540
18541 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18542
18543 * BASE-VER: Set to 9.0.0.
18544
18545 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18546
18547 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18548 in __abskf2 and __powikf2.
18549
18550 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18551
18552 PR target/85512
18553 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18554 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18555 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18556 Use the above on operand 2. Reindent.
18557 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18558
18559 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18560
18561 PR target/85485
18562 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18563 handle OPT_mcet.
18564 * config/i386/i386.opt (mcet): Removed.
18565 * doc/install.texi: Remove -mcet documentation.
18566 * doc/invoke.texi: Likewise.
18567
18568 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18569
18570 PR target/85485
18571 * doc/install.texi: Remove -mcet from bootstrap-cet.
18572
18573 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18574
18575 PR target/85511
18576 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18577 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18578 if TARGET_64BIT.
18579
18580 PR target/85503
18581 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18582 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18583 containing a CONST_VECTOR.
18584
18585 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18586
18587 * doc/install.texi: Update newlib dependency for nvptx.
18588
18589 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18590
18591 PR target/85508
18592 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18593 instead of INTVAL when shifting x left.
18594
18595 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18596
18597 PR tree-optimization/85478
18598 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18599 vect_grouped_store_supported for single element vectors.
18600
18601 2018-04-24 Richard Biener <rguenther@suse.de>
18602
18603 PR target/85491
18604 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18605 load cost increase to the case of non-constant step.
18606
18607 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18608
18609 PR target/84828
18610 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18611 destination if any_malformed_asm.
18612
18613 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18614
18615 PR middle-end/85496
18616 * expr.c (store_field): In the bitfield case, if the value comes from
18617 a function call and is returned in registers by means of a PARALLEL,
18618 do not change the mode of the temporary unless BLKmode and VOIDmode.
18619
18620 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18621
18622 PR rtl-optimization/85423
18623 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18624 dependencies to debug insns when the previous insn is non-debug.
18625
18626 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18627
18628 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18629 enums into a single definition.
18630 (fls): Fix predicates and printing.
18631 (seti): Likewise.
18632
18633 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18634
18635 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18636 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18637 and short u6 immediate.
18638 (check_if_valid_sleep_operand): Remove.
18639 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18640
18641 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18642
18643 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18644 flag_always_save_lp condition.
18645 * config/nds32/nds32.opt (malways-save-lp): New option.
18646
18647 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18648
18649 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18650 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18651 * config/nds32/nds32.h
18652 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18653 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18654
18655 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18656
18657 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18658 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18659
18660 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18661 Chung-Ju Wu <jasonwucj@gmail.com>
18662
18663 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18664 Declare.
18665 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18666 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18667
18668 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18669
18670 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18671
18672 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18673
18674 * config/nds32/nds32-protos.h (nds32_data_alignment,
18675 nds32_local_alignment): Declare.
18676 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18677 nds32_local_alignment): New functions.
18678 (TARGET_CONSTANT_ALIGNMENT): Define.
18679 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18680
18681 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18682
18683 * config/nds32/nds32.c
18684 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18685 (TARGET_MODES_TIEABLE_P): Likewise.
18686
18687 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18688
18689 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18690 level Ofast and Og.
18691
18692 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18693 Chung-Ju Wu <jasonwucj@gmail.com>
18694
18695 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18696 for unaligned access.
18697 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18698 unaligned access.
18699 * config/nds32/nds32-intrinsic.md: Likewise.
18700 * config/nds32/nds32_intrinsic.h: Likewise.
18701 * config/nds32/nds32.h (nds32_builtins): Likewise.
18702 * config/nds32/nds32.opt (munaligned-access): New option.
18703 * config/nds32/nds32.c (nds32_asm_file_start): Display
18704 flag_unaligned_access status.
18705
18706 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18707
18708 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18709 -mno-relax is present.
18710 * config/riscv/linux.h (LINK_SPEC): Ditto.
18711
18712 2018-04-20 Martin Sebor <msebor@redhat.com>
18713
18714 PR c/85365
18715 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18716 for null pointers.
18717 (gimple_fold_builtin_stxcpy_chk): Same.
18718 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18719
18720 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18721
18722 PR target/85456
18723 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18724 __powikf2 when long double is IEEE 128-bit.
18725
18726 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18727
18728 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18729 step to make sure stack always aligned.
18730
18731 2018-04-20 Carl Love <cel@us.ibm.com>
18732
18733 PR target/83402
18734 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18735 size check for arg0.
18736
18737 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18738 Tom de Vries <tom@codesourcery.com>
18739
18740 PR target/85445
18741 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18742 Emit insns for calls too.
18743 (nvptx_find_par): Always look for worker-level predecessor insn.
18744 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18745 calls.
18746 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18747 (nvptx_process_pars): Propagate frames for calls.
18748
18749 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18750
18751 PR target/85469
18752 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18753 Removed.
18754 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18755 (ix86_handle_option): Don't handle OPT_mibt.
18756 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18757 __SHSTK__.
18758 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18759 has_ibt and ibt.
18760 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18761 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18762 (ix86_target_macros): Define __CET__ with flag_cf_protection
18763 for -fcf-protection.
18764 * config/i386/i386.c (isa2_opts): Remove -mibt.
18765 * config/i386/i386.h (TARGET_IBT): Removed.
18766 (TARGET_IBT_P): Likewise.
18767 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18768 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18769 * config/i386/i386.opt (mcet): Update help message.
18770 (mshstk): Likewise.
18771 (mibt): Removed.
18772 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18773 -mcet as an alias for -mshstk.
18774
18775 2018-04-20 Richard Biener <rguenther@suse.de>
18776
18777 PR middle-end/85475
18778 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18779 complexity by forcing a single use of the multiply operand.
18780
18781 2018-04-20 Martin Jambor <mjambor@suse.cz>
18782
18783 ipa/85449
18784 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18785 recursion dependency to only apply to non-clones.
18786
18787 2018-04-20 Martin Jambor <mjambor@suse.cz>
18788
18789 ipa/85447
18790 * ipa-cp.c (create_specialized_node): Check that clones of
18791 self-recursive edges exist during IPA-CP.
18792
18793 2018-04-19 Toon Moene <toon@moene.org>
18794
18795 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18796 by -O3.
18797
18798 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18799
18800 PR tree-optimization/85467
18801 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18802 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18803 VECTOR_CST element to type.
18804
18805 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18806
18807 PR target/85397
18808 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18809 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18810 (builtin_longjmp): Likewise.
18811 (save_stack_nonlocal): New pattern.
18812 (restore_stack_nonlocal): Likewise.
18813
18814 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18815
18816 PR target/85404
18817 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18818 Replace ASM_OUTPUT_LABEL with fprintf.
18819
18820 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18821
18822 PR target/85417
18823 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18824 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18825 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18826 define __IBT__ and __SHSTK__ for -fcf-protection.
18827 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18828 TARGET_IBT.
18829 (ix86_trampoline_init): Likewise.
18830 (x86_output_mi_thunk): Likewise.
18831 (ix86_notrack_prefixed_insn_p): Likewise.
18832 (ix86_option_override_internal): Don't disallow -fcf-protection.
18833 * config/i386/i386.md (rdssp<mode>): Also enable for
18834 -fcf-protection.
18835 (incssp<mode>): Likewise.
18836 (nop_endbr): Likewise.
18837 * config/i386/i386.opt (mcet): Change help message to built-in
18838 functions only.
18839 (mibt): Likewise.
18840 (mshstk): Likewise.
18841 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18842 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18843 enable CET built-in functions.
18844
18845 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18846
18847 * common/config/i386/i386-common.c
18848 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18849 OPTION_MASK_ISA_MOVDIRI_UNSET,
18850 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18851 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18852 * config.gcc (movdirintrin.h): New header.
18853 * config/i386/cpuid.h (bit_MOVDIRI,
18854 bit_MOVDIR64B): New bits.
18855 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18856 and -mmvodir64b.
18857 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18858 (VOID, PVOID, PCVOID)): New function types.
18859 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18860 __builtin_ia32_directstoreu_u64,
18861 __builtin_ia32_movdir64b): New builtins.
18862 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18863 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18864 and -mmovdiri.
18865 (ix86_valid_target_attribute_inner_p): Ditto.
18866 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18867 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18868 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18869 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18870 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18871 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18872 (movdiri<mode>, movdir64b_<mode>): New.
18873 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18874 * config/i386/immintrin.h: Include movdirintrin.h.
18875 * config/i386/movdirintrin.h: New file.
18876 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18877
18878 2018-04-19 Richard Biener <rguenther@suse.de>
18879
18880 PR middle-end/85455
18881 * cfg.c (clear_bb_flags): When loop state says we have
18882 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18883
18884 2018-04-19 Richard Biener <rguenther@suse.de>
18885
18886 PR tree-optimization/84737
18887 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18888 copying restrict info.
18889 (vect_setup_realignment): Use it.
18890 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18891 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18892 the first DR to all generated stores.
18893 (vectorizable_load): Likewise for loads.
18894
18895 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18896
18897 PR tree-optimization/85446
18898 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18899 the integral and pointer types to have the same precision.
18900
18901 * doc/install.texi: Document --disable-cet being the default and
18902 --enable-cet=auto.
18903
18904 2018-04-18 Martin Liska <mliska@suse.cz>
18905
18906 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18907 style.
18908
18909 2018-04-18 Martin Liska <mliska@suse.cz>
18910
18911 Revert
18912 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18913
18914 PR ipa/83983
18915 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18916 arguments if they are comparable.
18917
18918 2018-04-18 Martin Liska <mliska@suse.cz>
18919
18920 Revert
18921 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18922
18923 PR lto/84805
18924 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18925 incomplete types.
18926
18927 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18928
18929 PR target/85388
18930 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18931 ENDBR after calling __morestack.
18932
18933 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18934
18935 PR jit/85384
18936 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18937 by using gcc_base_ver to generate a gcc_driver_version, and use
18938 it when generating GCC_DRIVER_NAME.
18939 * configure: Regenerate.
18940
18941 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18942
18943 PR target/81084
18944 * config.gcc: Obsolete powerpc*-*-*spe*.
18945
18946 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18947
18948 PR debug/84637
18949 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18950 (stabstr_D): Change type of unum from unsigned int to
18951 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18952 type.
18953
18954 2018-04-17 Jim Wilson <jimw@sifive.com>
18955
18956 PR 84856
18957 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18958 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18959 Set arg_pointer_offset after using pretend_args_size.
18960
18961 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18962
18963 PR rtl-optimization/85431
18964 * dse.c (record_store): Ignore zero width stores.
18965
18966 PR sanitizer/85230
18967 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18968 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18969 __builtin_stack_restore rather than after it.
18970 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18971 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18972 argument instead of virtual_dynamic_stack_rtx.
18973
18974 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18975
18976 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18977 New prototype.
18978 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18979 Add note to error message to explain internal mapping of overloaded
18980 built-in function name to non-overloaded built-in function name.
18981 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18982 function.
18983
18984 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18985
18986 PR target/85424
18987 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18988 where the inputs overlap with the output.
18989
18990 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18991
18992 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18993 (=v, v) alternative and explicit "memory" attribute.
18994 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18995 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18996 attributes.
18997 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18998 "sselog1" type instead of "sselog".
18999 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19000 "sselog". Remove explicit "memory" attribute.
19001 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19002 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19003 attributes.
19004 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19005 "sselog1" type instead of "sselog". Remove explicit "memory"
19006 attribute.
19007 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19008 use "sselog1" type instead of "sselog". Remove explicit "memory"
19009 attribute.
19010 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19011 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19012 attributes.
19013 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19014 "sselog1" type instead of "sselog". Remove explicit "memory"
19015 attribute.
19016 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19017 use "sselog1" type instead of "sselog". Remove explicit "memory"
19018 attribute.
19019
19020 PR target/85430
19021 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19022
19023 PR middle-end/85414
19024 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19025 on a SUBREG.
19026
19027 2018-04-17 Martin Jambor <mjambor@suse.cz>
19028
19029 PR ipa/85421
19030 * ipa-cp.c (create_specialized_node): Call
19031 expand_all_artificial_thunks if necessary.
19032
19033 2018-04-17 Martin Liska <mliska@suse.cz>
19034
19035 PR lto/85405
19036 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19037 in message, remote space in between '_G' and '('.
19038
19039 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19040
19041 PR target/85281
19042 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19043 avx512f_vmcmp<mode>3<round_saeonly_name>,
19044 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19045 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19046 avx512f_rndscale<mode><round_saeonly_name>,
19047 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19048 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19049 Use %<iptr>2 instead of %2 for -masm=intel.
19050 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19051 avx512f_vcvttss2usi<round_saeonly_name>,
19052 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19053 -masm=intel.
19054 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19055 avx512f_vcvttsd2usi<round_saeonly_name>,
19056 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19057 Use %q1 instead of %1 for -masm=intel.
19058 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19059 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19060 of %3 for -masm=intel.
19061 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19062 -masm=intel.
19063 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19064 -masm=intel.
19065 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19066 -masm=intel.
19067 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19068 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19069 %g1.
19070 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19071 -masm=intel.
19072 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19073 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19074 %g1 and one with %0 and %1.
19075 (avx512er_vmrcp28<mode><round_saeonly_name>,
19076 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19077 %1 for -masm=intel.
19078 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19079 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19080 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19081 of %0 and %{%4%} for -masm=intel.
19082 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19083 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19084 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19085 order of %0 and %{%5%}%{z%} for -masm=intel.
19086
19087 2018-04-17 Jan Hubicka <jh@suse.cz>
19088
19089 PR lto/85405
19090 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19091
19092 2018-04-17 Martin Liska <mliska@suse.cz>
19093
19094 PR ipa/85329
19095 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19096 for target_clone error message. Make default implementation
19097 clone to be a local declaration.
19098 (separate_attrs): Add new argument and check for an empty
19099 string.
19100 (expand_target_clones): Handle it.
19101 (ipa_target_clone): Make redirection just for target_clones
19102 functions.
19103
19104 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19105 Tom de Vries <tom@codesourcery.com>
19106
19107 PR middle-end/84955
19108 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19109 tiled basic blocks without omp continue statements.
19110
19111 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19112
19113 PR target/83660
19114 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19115 vec_extract expression as having side effects to make sure it gets
19116 a cleanup point.
19117
19118 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19119
19120 PR target/85403
19121 * config/i386/i386.c (get_builtin_code_for_version): Check
19122 error_mark_node.
19123
19124 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19125
19126 PR target/84331
19127 * config.gcc: Support "skylake".
19128 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19129 PROCESSOR_SKYLAKE.
19130 * config/i386/i386.c (m_SKYLAKE): Define.
19131 (processor_target_table): Add "skylake".
19132 (ix86_option_override_internal): Add "skylake".
19133 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19134 PROCESSOR_CANNONLAKE.
19135 (get_builtin_code_for_version): Fix priority for
19136 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19137 PROCESSOR_SKYLAKE-AVX512.
19138 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19139 (processor_type): Add PROCESSOR_SKYLAKE.
19140
19141 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19142 Jason Merrill <jason@redhat.com>
19143
19144 PR c++/85112
19145 * convert.c (convert_to_integer_1): Use direct recursion for
19146 enumeral types and types with a precision less than the number
19147 of bits in their mode.
19148
19149 2018-04-16 Julia Koval <julia.koval@intel.com>
19150
19151 PR target/84413
19152 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19153 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19154
19155 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19156
19157 PR target/85293
19158 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19159 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19160 and -mno-direct-move.
19161
19162 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19163
19164 PR target/83402
19165 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19166 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19167 Ensure negative shifts result in {0}.
19168
19169 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19170
19171 PR rtl-optimization/79916
19172 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19173 regs (if any) to define how to gnerate SD moves when LRA is in
19174 progress.
19175
19176 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19177
19178 PR rtl-optimization/85393
19179 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19180 * except.c (expand_dw2_landing_pad_for_region): Make static.
19181 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19182 a label and unconditional jump to old_bb, rather than
19183 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19184 basic block.
19185
19186 PR rtl-optimization/85376
19187 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19188 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19189 instead of a specific value.
19190
19191 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19192 Bin Cheng <bin.cheng@arm.com>
19193
19194 PR tree-optimization/82965
19195 PR tree-optimization/83991
19196 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19197 by_profile_only parameter.
19198 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19199 information if the loop was predicted to iterate too many times.
19200 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19201
19202 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19203
19204 PR lto/71991
19205 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19206 always inline.
19207
19208 2018-04-13 Martin Liska <mliska@suse.cz>
19209 Jakub Jelinek <jakub@redhat.com>
19210
19211 PR middle-end/81657
19212 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19213 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19214 * builtins.c (expand_builtin_memory_copy_args): Use
19215 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19216 handle dest_addr == pc_rtx.
19217
19218 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19219
19220 PR target/85291
19221 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19222 asked to not generate direct moves.
19223 (fix_trunc<mode>si2_stfiwx): Similar.
19224 (fix_trunc<mode>si2_internal): Similar.
19225
19226 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19227
19228 PR debug/83157
19229 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19230 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19231 lookup if dest in some wider mode is known to be const0_rtx and
19232 if so, record permanent equivalence for it to be ZERO_EXTEND of
19233 the narrower mode destination.
19234
19235 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19236
19237 * lto-streamer-out.c (output_function): Revert 259346.
19238 * omp-expand.c (expand_oacc_for): Likewise.
19239
19240 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19241
19242 PR rtl-optimization/85354
19243 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19244 * sel-sched.c (sel_global_init): ... here.
19245
19246 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19247
19248 PR target/85238
19249 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19250 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19251 mode for PE-COFF targets.
19252 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19253 (i386_pe_asm_lto_end): Likewise.
19254 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19255 (TARGET_ASM_LTO_END): Likewise.
19256 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19257 (i386_pe_asm_lto_start): New function.
19258 (i386_pe_asm_lto_end): Likewise.
19259
19260 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19261 Richard Biener <rguenther@suse.de>
19262
19263 PR middle-end/84955
19264 * lto-streamer-out.c (output_function): Fix CFG loop state before
19265 streaming out.
19266 * omp-expand.c (expand_oacc_for): Handle calls to internal
19267 functions like regular functions.
19268
19269 2018-04-12 Richard Biener <rguenther@suse.de>
19270
19271 PR lto/85371
19272 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19273 for the early LTO debug to properly generate references to it
19274 during DIE emission. Do not re-use that for the skeleton for
19275 split-dwarf.
19276 (dwarf2out_early_finish): Likewise.
19277
19278 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19279
19280 PR target/85328
19281 * config/i386/sse.md
19282 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19283 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19284 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19285 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19286 and output is a reg, avoid creating invalid lowpart subreg, but
19287 instead split into a 512-bit move. Don't split if not AVX512VL,
19288 input is xmm16+ reg and output is a mem.
19289 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19290 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19291 xmm16+ reg and output is a mem.
19292
19293 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19294
19295 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19296 also for flag_dwarf2_cfi_asm.
19297
19298 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19299
19300 PR rtl-optimization/85342
19301 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19302 a bool scalar var inside of the loop instead. Don't try to update
19303 recog_data.operand after failed apply_change_group.
19304
19305 2018-04-12 Tom de Vries <tom@codesourcery.com>
19306
19307 PR target/85296
19308 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19309 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19310 array with flexible array member as array without given dimension.
19311 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19312 argument for undefined param to true.
19313
19314 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19315
19316 PR target/85321
19317 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19318 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19319 from PowerPC section.
19320 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19321 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19322 help text that is too long.
19323 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19324 help text that is too long.
19325 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19326 help text that is too long.
19327
19328 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19329
19330 * config/alpha/alpha.md (stack_probe_internal): Rename
19331 from "probe_stack". Update all callers.
19332
19333 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19334
19335 PR rtl-optimization/84566
19336 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19337 sched_macro_fuse_insns.
19338
19339 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19340
19341 PR target/84301
19342 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19343 (compute_block_dependences): ... from here.
19344
19345 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19346
19347 PR tree-optimization/85331
19348 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19349 from int to HOST_WIDE_INT.
19350
19351 2018-04-11 Martin Jambor <mjambor@suse.cz>
19352
19353 PR ipa/84149
19354 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19355 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19356 not the same as the source val.
19357 (cgraph_edge_brings_value_p): New parameter.
19358 (gather_edges_for_value): Pass destination value to
19359 cgraph_edge_brings_value_p.
19360 (perhaps_add_new_callers): Likewise.
19361 (get_info_about_necessary_edges): Likewise and exclude values brought
19362 only by self-recursive edges.
19363 (create_specialized_node): Redirect only clones of self-calling edges.
19364 (+self_recursive_pass_through_p): New function.
19365 (find_more_scalar_values_for_callers_subset): Use it.
19366 (find_aggregate_values_for_callers_subset): Likewise.
19367 (known_aggs_to_agg_replacement_list): Removed.
19368 (decide_whether_version_node): Re-calculate known constants for all
19369 remaining context clones.
19370
19371 2018-04-11 Richard Biener <rguenther@suse.de>
19372
19373 PR lto/85339
19374 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19375 from early DWARF output.
19376 (dwarf2out_early_finish): Output line info unconditionally into
19377 early DWARF and add reference to it.
19378
19379 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19380
19381 PR target/85281
19382 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19383 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19384 other than V2DFmode using iptr mode attribute.
19385 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19386
19387 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19388
19389 PR rtl-optimization/84659
19390 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19391
19392 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19393
19394 PR debug/85302
19395 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19396 SIZEP is NULL.
19397 (output_loc_list): Pass address of a dummy size variable even in the
19398 locview handling loop.
19399 (index_location_lists): Add comment on why skip_loc_list_entry can't
19400 call size_of_locs.
19401
19402 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19403
19404 PR target/85261
19405 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19406 into register.
19407
19408 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19409
19410 PR target/85321
19411 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19412 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19413 and -mstring-compare-inline-limit.
19414
19415 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19416
19417 PR target/85287
19418 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19419 for stack clash protection in a register whenever we need it to be in
19420 a register.
19421
19422 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19423
19424 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19425 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19426
19427 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19428
19429 PR target/85321
19430 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19431 the help text.
19432 (mlong-double-): Ditto.
19433 * config/rs6000/sysv4.opt (msdata=): Ditto.
19434 (mtls-size=): Ditto.
19435
19436 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19437
19438 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19439 erroneous entries for
19440 "vector int vec_ldl (int, long int *)", and
19441 "vector unsigned int vec_ldl (int, unsigned long int *)".
19442 Add comments and entries for
19443 "vector bool char vec_ldl (int, bool char *)",
19444 "vector bool short vec_ldl (int, bool short *)",
19445 "vector bool int vec_ldl (int, bool int *)",
19446 "vector bool long long vec_ldl (int, bool long long *)",
19447 "vector pixel vec_ldl (int, pixel *)",
19448 "vector long long vec_ldl (int, long long *)",
19449 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19450 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19451 type tree bool_long_long_type_node and correct definition of
19452 bool_V2DI_type_node to make reference to this new type tree.
19453 (rs6000_mangle_type): Replace erroneous reference to
19454 bool_long_type_node with bool_long_long_type_node.
19455 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19456 comments to emphasize sign distinctions for char and int types and
19457 replace RS6000_BTI_bool_long constant with
19458 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19459 use of RS6000_BTI_pixel.
19460 (bool_long_type_node): Remove this macro definition.
19461 (bool_long_long_type_node): New macro definition
19462
19463 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19464
19465 PR rtl-optimization/85300
19466 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19467 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19468 simplify_unary_operation fails.
19469
19470 2018-04-10 Martin Liska <mliska@suse.cz>
19471
19472 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19473 cgraph_edge and ipa_ref.
19474
19475 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19476
19477 PR target/85177
19478 PR target/85255
19479 * config/i386/sse.md
19480 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19481 computation of the VEC_MERGE selector from mask.
19482 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19483 Fix decoding of the VEC_MERGE selector into mask.
19484
19485 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19486
19487 PR tree-optimization/85286
19488 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19489
19490 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19491
19492 * final.c (final_1): Set insn_last_address as well as
19493 insn_current_address.
19494
19495 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19496
19497 PR target/85173
19498 * explow.c (emit_stack_probe): Call validize_mem on memory location
19499 before passing it to gen_probe_stack. Create address operand and
19500 legitimize it for the probe_stack_address case.
19501
19502 2018-04-09 Jan Hubicka <jh@suse.cz>
19503
19504 PR lto/85078
19505 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19506 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19507 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19508 walk basetypes.
19509 (free_lang_data): Rebuild type inheritance graph.
19510
19511 2018-04-09 Martin Sebor <msebor@redhat.com>
19512
19513 * invoke.texi (-finline-small-functions): Mention other optimization
19514 options.
19515 (-findirect-inlining, -fpartial-inlining): Same.
19516 (-finline-functions-called-once): Same.
19517 (-freorder-blocks-and-partition): Same.
19518
19519 2018-04-09 Jan Hubicka <jh@suse.cz>
19520
19521 PR rtl/84058
19522 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19523 jumps; choose last target that matches the criteria (i.e.
19524 no partition changes for non-crossing jumps).
19525 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19526 support for redirecting crossing jumps to non-crossing.
19527
19528 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19529
19530 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19531 also for naked functions.
19532
19533 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19534
19535 * config/arc/arc.md (add_shift): New pattern.
19536 (add_shift2): Likewise.
19537 (sub_shift): Likewise.
19538 (sub_shift_cmp0_noout): Likewise.
19539 (compare_si_ashiftsi): Likewise.
19540 (xbfu_cmp0_noout): New combine pattern.
19541 (xbfu_cmp0"): Likewise.
19542 (movsi_set_cc_insn): Place the predicable variant first.
19543 (commutative_binary_cmp0_noout): Remove clobber.
19544 (commutative_binary_cmp0): New pattern.
19545 (noncommutative_binary_cmp0): Likewise.
19546 (noncommutative_binary_cmp0_noout): Likewise.
19547 (noncommutative_binary_comparison_result_used): Removed.
19548 (rsub_cmp0): New pattern.
19549 (rsub_cmp0_noout): Likewise.
19550 (extzvsi): Changed, keep only meaningful variants.
19551 (SQH, SEZ): New iterators.
19552 (SQH_postfix): New mode attribute.
19553 (SEZ_prefix): New code attribute.
19554 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19555 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19556 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19557 of numerical value.
19558 (noncommutative_operator): Check the availability of barrel
19559 shifter option.
19560
19561 2018-04-09 Richard Biener <rguenther@suse.de>
19562
19563 PR tree-optimization/85284
19564 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19565 Only use the niter constraining form of simple_iv when the exit
19566 is always executed.
19567
19568 2018-04-09 Tom de Vries <tom@codesourcery.com>
19569
19570 PR target/84041
19571 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19572 (define_expand "*memory_barrier"): New define_expand.
19573 (define_insn "memory_barrier"): New insn.
19574
19575 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19576
19577 PR rtl-optimization/80463
19578 PR rtl-optimization/83972
19579 PR rtl-optimization/83480
19580
19581 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19582 correct producer for the insn.
19583 (tidy_control_flow): Fixup seqnos in case of debug insns.
19584
19585 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19586
19587 PR rtl-optimization/83913
19588
19589 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19590 different sched-times when merging exprs.
19591
19592 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19593
19594 PR rtl-optimization/83962
19595
19596 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19597 tidy_fallthru_edge and tidy_control_flow.
19598
19599 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19600
19601 PR rtl-optimization/83530
19602
19603 * sel-sched.c (force_next_insn): New global variable.
19604 (remove_insn_for_debug): When force_next_insn is true, also leave only
19605 next insn in the ready list.
19606 (sel_sched_region): When the region wasn't scheduled, make another pass
19607 over it with force_next_insn set to 1.
19608
19609 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19610
19611 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19612 into tm_file.
19613 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19614 for interrupt control.
19615 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19616 functions for interrupt control.
19617 * config/nds32/nds32-intrinsic.md: Likewise.
19618 * config/nds32/nds32_intrinsic.h: Likewise.
19619 * config/nds32/nds32.h (nds32_builtins): Likewise.
19620
19621 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19622
19623 * config/nds32/nds32.c (nds32_init_machine_status,
19624 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19625 strict_aligned_p field.
19626 (nds32_expand_to_rtl_hook): New function.
19627 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19628 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19629
19630 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19631 Chung-Ju Wu <jasonwucj@gmail.com>
19632
19633 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19634 * config/nds32/nds32-n7.md: New file.
19635 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19636 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19637 pipeline.
19638 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19639 * config/nds32/nds32.md (pipeline_model): Add n7.
19640 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19641 * config/nds32/pipelines.md: Include n7 settings.
19642
19643 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19644 Chung-Ju Wu <jasonwucj@gmail.com>
19645
19646 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19647 * config/nds32/nds32-e8.md: New file.
19648 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19649 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19650 pipeline.
19651 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19652 * config/nds32/nds32.md (pipeline_model): Add e8.
19653 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19654 * config/nds32/pipelines.md: Include e8 settings.
19655
19656 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19657 Chung-Ju Wu <jasonwucj@gmail.com>
19658
19659 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19660 * config/nds32/nds32-n8.md: New file.
19661 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19662 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19663 pipeline.
19664 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19665 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19666 * config/nds32/nds32.md (pipeline_model): Add n8.
19667 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19668 * config/nds32/pipelines.md: Include n8 settings.
19669
19670 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19671 Chung-Ju Wu <jasonwucj@gmail.com>
19672
19673 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19674 * config/nds32/nds32-n9-2r1w.md: New file.
19675 * config/nds32/nds32-n9-3r2w.md: New file.
19676 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19677 nds32_register_ports): New or modify for cpu n9.
19678 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19679 pipeline.
19680 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19681 * config/nds32/nds32-utils.c: New file.
19682 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19683 TARGET_MUL_SLOW): Define.
19684 * config/nds32/nds32.md (pipeline_model): New attribute.
19685 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19686 New options that support cpu n9.
19687 * config/nds32/pipelines.md: Include n9 settings.
19688 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19689
19690 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19691
19692 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19693 information if necessary.
19694 (output_cond_branch_compare_zero): Likewise.
19695 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19696 (nds32_target_alignment): Refine for alignment.
19697 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19698 (FUNCTION_BOUNDARY): Modify.
19699 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19700 align case.
19701 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19702
19703 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19704
19705 * config/nds32/constants.md (unspec_volatile_element): Add values for
19706 TLB operation and data prefetch.
19707 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19708 functions for TLB operation and data prefetch.
19709 * config/nds32/nds32-intrinsic.md: Likewise.
19710 * config/nds32/nds32_intrinsic.h: Likewise.
19711 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19712 (nds32_print_operand): Likewise.
19713 * config/nds32/nds32.h (nds32_builtins): Likewise.
19714
19715 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19716 Andrew Pinski <pinsika@gcc.gnu.org>
19717
19718 PR middle-end/82976
19719 * match.pd: Use constant_boolean_node of correct type instead of
19720 boolean_true_node or boolean_false_node for simplifying
19721 pointer comparisons to zero.
19722
19723 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19724
19725 PR tree-optimization/80021
19726 * tree.c (verify_type_variant): Make error call in verify_variant_match
19727 translatable and remove final full stop.
19728
19729 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19730
19731 * config/nds32/constants.md (unspec_volatile_element): Add
19732 UNSPEC_VOLATILE_EH_RETURN.
19733 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19734 nds32_output_stack_pop): Support dwarf exception handling process.
19735 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19736 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19737 exception handling process.
19738 (nds32_compute_stack_frame): Likewise.
19739 (nds32_return_addr_rtx): Likewise.
19740 (nds32_initial_elimination_offset): Likewise.
19741 (nds32_expand_prologue): Likewise.
19742 (nds32_expand_epilogue): Likewise.
19743 (nds32_dynamic_chain_address): New function.
19744 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19745 exception handling.
19746 (DYNAMIC_CHAIN_ADDRESS): Define.
19747 (EH_RETURN_DATA_REGNO): Define.
19748 (EH_RETURN_STACKADJ_RTX): Define.
19749 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19750 patterns for dwarf exception handling.
19751
19752 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19753
19754 * config/nds32/nds32.h: Clean up obsolete macros.
19755
19756 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19757
19758 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19759 Add enum values for particular instructions.
19760 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19761 particular intrinsic functions.
19762 * config/nds32/nds32-intrinsic.md: Likewise.
19763 * config/nds32/nds32_intrinsic.h: Likewise.
19764 * config/nds32/nds32.h (nds32_builtins): Likewise.
19765 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19766 (btst, ave): New patterns for particular instructions.
19767
19768 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19769
19770 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19771 Add enum values for atomic load/store and memory sync.
19772 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19773 and memory sync.
19774 * config/nds32/nds32-intrinsic.md: Likewise.
19775 * config/nds32/nds32_intrinsic.h: Likewise.
19776 * config/nds32/nds32.h (nds32_builtins): Likewise.
19777
19778 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19779
19780 PR tree-optimization/85257
19781 * fold-const.c (native_encode_vector): If not all elts could fit
19782 and off is -1, return 0 rather than offset.
19783 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19784 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19785 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19786 adjust buffer in native_interpret_expr call.
19787
19788 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19789
19790 * config/nds32/constants.md (unspec_volatile_element): Add cache
19791 control enum values.
19792 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19793 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19794 * config/nds32/nds32.c (nds32_cctl_names): New.
19795 (nds32_print_operand): Handle cache control register names.
19796 * config/nds32/nds32.h (nds32_builtins): New enum values.
19797 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19798 macros.
19799 * config/nds32/nds32.md (type): Add mmu.
19800 * config/nds32/pipelines.md (simple_insn): Add mmu.
19801
19802 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19803
19804 * config/nds32/nds32.md (type): Remove call.
19805 * config/nds32/pipelines.md (simple_insn): Likewise.
19806
19807 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19808
19809 * config/nds32/constants.md (unspec_volatile_element): Add
19810 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19811 UNSPEC_VOLATILE_FMFCFG.
19812 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19813 description for fmfcfg and fmfcsr.
19814 (bdesc_1arg): Add fmtcsr.
19815 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19816 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19817 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19818 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19819 unspec_fmfcfg): New patterns.
19820 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19821 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19822 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19823 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19824 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19825 __nds32__fmfcfg): Define.
19826
19827 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19828
19829 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19830 intrinsic register names.
19831 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19832 intrinsic register enum values and macros.
19833
19834 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19835
19836 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19837 for load/store addressing form.
19838 (nds32_print_operand_address): Likewise.
19839
19840 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19841
19842 PR target/85196
19843 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19844 based on LABEL_REF. Remove useless assertion.
19845 (pic_address_needs_scratch): Fix formatting.
19846 (sparc_legitimize_pic_address): Minor tweaks.
19847 (sparc_delegitimize_address): Adjust assertion accordingly.
19848 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19849 into symbolic_operand.
19850 (movsi_high_pic_label_ref): Likewise.
19851 (movsi_lo_sum_pic_label_ref): Likewise.
19852 (movdi_pic_label_ref): Likewise.
19853 (movdi_high_pic_label_ref): Likewise.
19854 (movdi_lo_sum_pic_label_ref): Likewise.
19855
19856 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19857
19858 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19859 custom LIB_SPEC setup.
19860
19861 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19862 Kito Cheng <kito.cheng@gmail.com>
19863
19864 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19865 * config/riscv/freebsd.h: New.
19866
19867 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19868
19869 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19870 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19871 file.
19872
19873 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19874 Kito Cheng <kito.cheng@gmail.com>
19875
19876 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19877 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19878 * config/nds32/nds32-protos.h (nds32_output_call,
19879 nds32_output_return): Declare.
19880 * config/nds32/nds32.md: Refine all the call and return patterns.
19881
19882 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19883
19884 PR debug/85252
19885 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19886 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19887
19888 PR rtl-optimization/84872
19889 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19890 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19891 EDGE_CROSSING edge.
19892
19893 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19894
19895 * expr.c (copy_blkmode_to_reg): Revert 254862.
19896 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19897
19898 2018-04-06 Richard Biener <rguenther@suse.de>
19899
19900 PR middle-end/85244
19901 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19902 after seeing a component reference with an adjacent field. Treat
19903 refs to arrays at struct end of external decls similar to
19904 refs to unconstrained commons.
19905
19906 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19907
19908 PR sanitizer/85213
19909 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19910 look through SAVE_EXPRs with non-side-effects argument. Adjust
19911 recursive calls.
19912 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19913 save_p here.
19914
19915 2018-04-06 Richard Biener <rguenther@suse.de>
19916
19917 PR middle-end/85180
19918 * alias.c (find_base_term): New wrapper around find_base_term
19919 unwinding CSELIB_VAL_PTR changes.
19920 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19921 recursion.
19922
19923 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19924
19925 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19926 instructions.
19927 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19928 constant definitions.
19929 ("nop"): lr 0,0 -> nopr r0
19930 ("nop_lr0", "nop_lr1"): New insn definitions.
19931
19932 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19933
19934 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19935 NDS32_V3PUSH_AVAILABLE_P macro.
19936
19937 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19938 Chung-Ju Wu <jasonwucj@gmail.com>
19939
19940 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19941 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19942 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19943 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19944 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19945 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19946 * config/nds32/constraints.md: New constraints and checking for hard
19947 float configuration.
19948 * config/nds32/iterators.md: New mode iterator and attribute for hard
19949 float configuration.
19950 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19951 patterns.
19952 * config/nds32/nds32-fpu.md: New file.
19953 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19954 deal with hard float code generation.
19955 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19956 ARCH_V3S.
19957 (abi_type, float_reg_number): New enum type.
19958 * config/nds32/nds32-predicates.c: New predicates for hard float.
19959 * config/nds32/nds32-protos.h: Declare functions for hard float.
19960 * config/nds32/nds32.c: Implementation for hard float configuration.
19961 * config/nds32/nds32.h: Definitions for hard float configuration.
19962 * config/nds32/nds32.md: Include hard float machine description and
19963 modify patterns for hard float configuration.
19964 * config/nds32/nds32.opt: New options for hard float configuration.
19965 * config/nds32/predicates.md: New predicates for hard float
19966 configuration.
19967
19968 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19969
19970 * common/config/nds32/nds32-common.c
19971 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19972
19973 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19974
19975 PR middle-end/85195
19976 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19977 CONSTRUCTOR_ELT (ctor, ...)->value.
19978
19979 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19980
19981 PR target/85193
19982 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19983
19984 2018-04-05 Tom de Vries <tom@codesourcery.com>
19985
19986 PR target/85204
19987 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19988 cond jump.
19989
19990 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19991 Kito Cheng <kito.cheng@gmail.com>
19992
19993 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19994 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19995 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19996 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19997
19998 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19999 Kito Cheng <kito.cheng@gmail.com>
20000
20001 * config/nds32/constraints.md (Ufe): New memory constraint.
20002 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20003 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20004 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20005 operands.
20006 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20007 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20008
20009 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20010
20011 * config/nds32/nds32.md: Use optimize_size in the condition for
20012 alu-shift instructions.
20013
20014 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20015
20016 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20017
20018 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20019
20020 * config/nds32/nds32.md (negsi2): Refine pattern.
20021
20022 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20023 Chung-Ju Wu <jasonwucj@gmail.com>
20024
20025 * config/nds32/iterators.md (shift_rotate): New code iterator.
20026 (shift): New code attribute.
20027 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20028 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20029 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20030 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20031 bit-wise operations.
20032 (andsi3, *andsi3): Ditto.
20033 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20034 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20035 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20036 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20037 nds32_ior_operand, nds32_xor_operand): New predicates.
20038
20039 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20040
20041 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20042 (addsi3, subsi3): ... this.
20043
20044 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20045
20046 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20047
20048 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20049
20050 * config/nds32/nds32.md: Adjust indention.
20051
20052 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20053
20054 * config/nds32/nds32.md (feature): New attribute.
20055
20056 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20057
20058 * config/nds32/nds32.md (subtype): New attribute.
20059
20060 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20061
20062 PR target/85203
20063 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20064 expansion to perform a bitwise AND of the argument followed by a
20065 boolean negation of the result.
20066
20067 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20068
20069 PR rtl-optimization/84878
20070 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20071 the basic block. Assert the use reference is not artificial and that
20072 it has an associated insn.
20073
20074 2018-04-04 Michael Matz <matz@suse.de>
20075
20076 * builtins.c (compute_objsize): Pass correct operand
20077 to array_at_struct_end_p.
20078
20079 2018-04-04 Richard Biener <rguenther@suse.de>
20080
20081 PR lto/85176
20082 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20083 from contexts for DINFO_LEVEL_TERSE and below.
20084
20085 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20086
20087 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20088 resiter_operand condition.
20089 * config/nds32/nds32.md (*move<mode>): Ditto.
20090
20091 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20092 Monk Chiang <sh.chiang04@gmail.com>
20093
20094 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20095
20096 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20097
20098 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20099
20100 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20101 Kito Cheng <kito.cheng@gmail.com>
20102
20103 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20104 nds32_cond_code_str, output_cond_branch,
20105 output_cond_branch_compare_zero, nds32_expand_cbranch,
20106 nds32_expand_cstore, nds32_expand_movcc,
20107 nds32_output_cbranchsi4_equality_zero,
20108 nds32_output_cbranchsi4_equality_reg,
20109 nds32_output_cbranchsi4_equality_reg_or_const_int,
20110 nds32_output_cbranchsi4_greater_less_zero: New functions.
20111 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20112 nds32_expand_cstore, nds32_expand_movcc,
20113 nds32_output_cbranchsi4_equality_zero,
20114 nds32_output_cbranchsi4_equality_reg,
20115 nds32_output_cbranchsi4_equality_reg_or_const_int,
20116 nds32_output_cbranchsi4_greater_less_zero): Declare.
20117 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20118 nds32_rimm11s_operand): New predicates.
20119 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20120 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20121 patterns.
20122
20123 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20124
20125 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20126 * config/nds32/nds32.md: Ditto.
20127 * config/nds32/pipelines.md: Ditto.
20128
20129 2018-04-04 Richard Biener <rguenther@suse.de>
20130
20131 PR tree-optimization/85168
20132 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20133 propagating abnormals.
20134
20135 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20136
20137 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20138
20139 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20140 Kito Cheng <kito.cheng@gmail.com>
20141
20142 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20143 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20144 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20145 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20146 * config/nds32/nds32.md (sibcall_internal): New.
20147 (sibcall_register): Remove.
20148 (sibcall_immediate): Remove.
20149 (sibcall_value_internal): New.
20150 (sibcall_value_register): Remove.
20151 (sibcall_value_immediate): Remove.
20152 * config/nds32/predicates.md (nds32_general_register_operand): New.
20153 (nds32_call_address_operand): New.
20154
20155 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20156
20157 PR rtl-optimization/85167
20158 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20159 bb_defs if *split_p, instead preinitialize it to NULL.
20160
20161 PR tree-optimization/85156
20162 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20163 evaluating the argument multiple times.
20164
20165 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20166
20167 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20168 than vector.
20169 (_mm_cvtpd_ps): Likewise.
20170 (_mm_cvttpd_epi32): Likewise.
20171 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20172 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20173 vector, pixel, and bool following altivec.h include.
20174
20175 2018-04-03 Martin Sebor <msebor@redhat.com>
20176
20177 * doc/extend.texi (Common Function Attributes): Clarify.
20178 (const attribute): Likewise.
20179 (pure attribute): Likewise.
20180
20181 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20182
20183 PR target/85169
20184 * config/i386/i386.c (ix86_expand_vector_set): Use
20185 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20186
20187 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20188
20189 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20190 instructions when changing rounding bits to preserve precision bits
20191 in the x87 control word.
20192
20193 2018-04-03 Martin Liska <mliska@suse.cz>
20194
20195 PR tree-optimization/82491
20196 * rtl.h (strip_offset_and_add): Replace += suboffset with
20197 poly_uint64 () + suboffset.
20198
20199 2018-03-29 Martin Liska <mliska@suse.cz>
20200 Martin Jambor <mjambor@suse.cz>
20201
20202 PR ipa/84947
20203 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20204 param_type is not an integral or pointer type.
20205
20206 2018-04-03 Richard Biener <rguenther@suse.de>
20207
20208 * sese.h (recompute_all_dominators): Remove.
20209
20210 2018-04-02 Martin Sebor <msebor@redhat.com>
20211
20212 * doc/invoke.texi (-Wrestrict): Fix typos.
20213
20214 2018-04-02 Jim Wilson <jimw@sifive.com>
20215
20216 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20217 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20218 (<optab>di3, <optab>si3_extend): Likewise.
20219 (<optab>si3_mask, <optab>si3_mask_1): New.
20220 (<optab>di3_mask, <optab>di3_mask_1): New.
20221 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20222 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20223 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20224
20225 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20226
20227 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20228 example.
20229
20230 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20231
20232 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20233 (nds32_canonicalize_comparison): New function.
20234
20235 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20236 Kito Cheng <kito.cheng@gmail.com>
20237 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20238
20239 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20240 * config/nds32/constants.md (unspec_volatile_element): Add
20241 UNSPEC_VOLATILE_RELAX_GROUP.
20242 * config/nds32/nds32-relax-opt.c: New file.
20243 * config/nds32/nds32-predicates.c
20244 (nds32_symbol_load_store_p): New function.
20245 * config/nds32/nds32-protos.h
20246 (nds32_symbol_load_store_p): Declare function.
20247 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20248 * config/nds32/nds32.c
20249 (nds32_register_pass): New function to register pass.
20250 (nds32_register_passes): New function to register passes.
20251 * config/nds32/nds32.md (relax_group): New pattern.
20252 * config/nds32/nds32.opt (mrelax-hint): New option.
20253 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20254
20255 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20256
20257 * config/nds32/t-nds32: Modify files dependency.
20258
20259 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20260
20261 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20262 (PROFILE_HOOK): Define its implementation.
20263
20264 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20265
20266 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20267 type and 32-bit size.
20268
20269 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20270
20271 PR middle-end/85090
20272 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20273 (V_128_256): New mode iterator.
20274 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20275 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20276 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20277 of V.
20278 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20279 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20280
20281 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20282
20283 PR target/83315
20284 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20285 NaN inputs correctly.
20286
20287 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20288
20289 PR target/80546
20290 * config/rs6000/vsx.md (??r): New mode attribute.
20291 (*vsx_mov<mode>_64bit): Use it.
20292 (*vsx_mov<mode>_32bit): Likewise.
20293
20294 2018-03-30 Martin Sebor <msebor@redhat.com>
20295
20296 PR tree-optimization/84818
20297 * builtins.c (check_access): Use warning_n.
20298
20299 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20300
20301 PR target/83822
20302 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20303 condition.
20304 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20305 condition.
20306
20307 2018-03-30 Julia Koval <julia.koval@intel.com>
20308
20309 PR target/84413
20310 * x86-tune.def (movx, partial_reg_dependency): Enable for
20311 m_SKYLAKE_AVX512.
20312
20313 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20314
20315 PR inline-asm/84985
20316 * lra-constraints.c (process_alt_operands): Move setting
20317 this_alternative_matches below.
20318
20319 2018-03-29 Martin Liska <mliska@suse.cz>
20320
20321 PR lto/84995.
20322 * doc/invoke.texi: Document how LTO works with debug info.
20323 Describe auto-load support of binutils. Mention 'x86-64'
20324 as valid option value of -march option.
20325
20326 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20327
20328 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20329
20330 PR c/85094
20331 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20332 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20333 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20334 checking.
20335
20336 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20337
20338 PR target/84912
20339 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20340 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20341 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20342 for RS6000_BTM_POWERPC64.
20343 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20344 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20345 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20346 definition.
20347 (DIVDE): Use it.
20348 (DIVDEU): Likewise.
20349
20350 2018-03-28 Carl Love <cel@us.ibm.com>
20351
20352 Revert
20353 2017-09-27 Carl Love <cel@us.ibm.com>
20354
20355 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20356 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20357 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20358 fctiw instruction.
20359
20360 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20361
20362 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20363 instead of __vector bool.
20364 (_mm_max_pu8): Likewise.
20365 (_mm_min_pi16): Likewise.
20366
20367 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20368
20369 PR target/84912
20370 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20371 (DIVWEUO): Likewise.
20372 (DIVDEO): Likewise.
20373 (DIVDEUO): Likewise.
20374 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20375 DIVWEUO and DIVDEUO.
20376 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20377 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20378 (div_extend): Likewise.
20379 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20380 builtin function.
20381 (__builtin_divweuo): Likewise.
20382 (__builtin_divdeo): Likewise.
20383 (__builtin_divdeuo): Likewise.
20384
20385 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20386
20387 PR target/85095
20388 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20389 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20390
20391 PR tree-optimization/82004
20392 * gimple-match-head.c (optimize_pow_to_exp): New function.
20393 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20394 Don't fold to exp if optimize_pow_to_exp is false.
20395
20396 2018-03-28 Martin Liska <mliska@suse.cz>
20397
20398 PR other/84819
20399 * calls.c (initialize_argument_information): Fix trailing space.
20400 * common.opt: Fix typo and provide better explanation for
20401 -fsanitize-coverage option.
20402 * config/i386/i386.opt: Fix typo.
20403
20404 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20405 Martin Liska <mliska@suse.cz>
20406
20407 PR sanitizer/85081
20408 * gimplify.c (asan_poison_variable): Don't do the check for
20409 gimplify_omp_ctxp here.
20410 (gimplify_decl_expr): Do it here.
20411 (gimplify_target_expr): Likewise.
20412
20413 2018-03-28 Martin Liska <mliska@suse.cz>
20414
20415 PR target/84988
20416 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20417 chkp_type_bounds_count if MPX is not enabled.
20418
20419 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20420
20421 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20422
20423 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20424
20425 PR target/84914
20426 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20427 function to create the function decl for complex long double
20428 multiply and divide for -mabi=ieeelongdouble.
20429 (init_float128_ieee): Call it.
20430
20431 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20432
20433 PR target/85044
20434 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20435 -fcf-protection=branch -mibt.
20436 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20437
20438 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20439
20440 PR target/81863
20441 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20442 arm_word_relocations.
20443
20444 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20445
20446 PR target/85056
20447 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20448 extern array declarations.
20449
20450 2018-03-27 Richard Biener <rguenther@suse.de>
20451
20452 PR middle-end/84067
20453 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20454 explicit single_use checks.
20455
20456 2018-03-27 Richard Biener <rguenther@suse.de>
20457
20458 PR tree-optimization/85082
20459 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20460 Valueize the VUSE.
20461
20462 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20463
20464 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20465 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20466 Turn on fasynchronous-unwind-tables and funwind-tables.
20467
20468 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20469
20470 PR target/85073
20471 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20472 (*bmi_blsr_<mode>_ccz): Ditto.
20473
20474 2018-03-26 Tom de Vries <tom@codesourcery.com>
20475
20476 PR tree-optimization/85063
20477 * omp-general.c (offloading_function_p): New function. Factor out
20478 of ...
20479 * omp-offload.c (pass_omp_target_link::gate): ... here.
20480 * omp-general.h (offloading_function_p): Declare.
20481 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20482 with attribute omp declare target for offloading functions.
20483
20484 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20485
20486 PR tree-optimization/84005
20487 * tree-data-ref.h (get_base_for_alignment): Declare.
20488 * tree-data-ref.c (get_base_for_alignment_1): New function.
20489 (get_base_for_alignment): Likewise.
20490 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20491 get_base_for_alignment to find a suitable base object, instead
20492 of always using drb->base_address.
20493
20494 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20495
20496 PR inline-asm/85022
20497 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20498 known size by default.
20499
20500 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20501
20502 PR inline-asm/85030
20503 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20504 and non BLKmode operands.
20505
20506 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20507
20508 PR target/85026
20509 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20510 Clean up attributes.
20511
20512 2018-03-23 Richard Biener <rguenther@suse.de>
20513
20514 PR debug/85020
20515 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20516 we are going to emit early debug for LTO.
20517
20518 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20519
20520 PR inline-asm/85034
20521 * function.c (match_asm_constraints_1): Don't optimize if input
20522 doesn't satisfy general_operand predicate for output's mode.
20523
20524 PR inline-asm/85022
20525 * alias.c (write_dependence_p): Don't require for x_canonicalized
20526 non-VOIDmode if x has VOIDmode.
20527
20528 PR sanitizer/85029
20529 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20530 just don't try to optimize it rather than assert it never happens.
20531
20532 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20533
20534 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20535 macro expansions for definition of ST_INTERNAL_<mode> and
20536 LD_INTERNAL_<mode> builtins.
20537 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20538 Remove prototype.
20539 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20540 function.
20541 (altivec_expand_st_builtin): Likewise.
20542 (altivec_expand_builtin): Remove calls to deleted functions.
20543 (rs6000_address_for_altivec): Delete this function.
20544 * config/rs6000/vector.md: Remove expands for
20545 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20546
20547 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20548
20549 PR target/84826
20550 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20551 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20552 re-computing once computed.
20553 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20554 (arm_init_machine_status): Initialize
20555 machine->static_chain_stack_bytes.
20556
20557 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20558
20559 PR target/84760
20560 * doc/extend.texi: Add four new prototypes for vec_ld.
20561 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20562 definitions for more logical presentation.
20563 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20564 entries for V1TI variants of __builtin_altivec_ld builtin.
20565 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20566 handling of V1TI variant of LVX icode pattern.
20567 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20568 (rs6000_gimple_fold_builtin): Likewise.
20569 (altivec_init_builtins): Add code to define
20570 __builtin_altivec_lvx_v1ti function.
20571
20572 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20573
20574 PR inline-asm/84941
20575 * function.c (match_asm_constraints_1): Don't do the optimization
20576 if input isn't a REG, SUBREG, MEM or constant.
20577
20578 2018-03-22 Tom de Vries <tom@codesourcery.com>
20579
20580 PR tree-optimization/84956
20581 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20582 bb_has_abnormal_pred.
20583
20584 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20585
20586 PR sanitizer/85018
20587 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20588 DECL_INITIAL (decl) to decl at the end.
20589 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20590 adjust the comment.
20591
20592 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20593
20594 * doc/extend.texi (__builtin_tgmath): Document when complex
20595 integer types are treated as _Complex _Float64.
20596
20597 2018-03-21 Tom de Vries <tom@codesourcery.com>
20598
20599 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20600
20601 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20602
20603 PR tree-optimization/84960
20604 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20605 if it is ENTRY block, move them into single succ of ENTRY in that case.
20606
20607 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20608
20609 PR tree-optimization/84811
20610 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20611 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20612 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20613 (known_subrange_p): Update accordingly. Cast each value involved
20614 in the size comparison, rather than casting the result of the
20615 subtraction.
20616
20617 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20618
20619 PR tree-optimization/84982
20620 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20621 by flipping the least significant bit rather than all bits from
20622 bitpos to bitpos + bitsize - 1.
20623
20624 2018-03-21 Nathan Sidwell <nathan@acm.org>
20625
20626 * doc/extend.texi (Deprecated Features): Remove mention of
20627 long-deleted deprecations.
20628
20629 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20630
20631 PR jit/84288
20632 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20633 * configure: Regenerate.
20634
20635 2018-03-21 Tom de Vries <tom@codesourcery.com>
20636
20637 PR tree-optimization/83126
20638 * tree-parloops.c (num_phis): New function.
20639 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20640
20641 2018-03-21 Nathan Sidwell <nathan@acm.org>
20642
20643 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20644 mention anon-struct/union members and trailing attributes.
20645
20646 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20647
20648 PR tree-optimization/84969
20649 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20650 builtin memset partitions if they set different rhs values.
20651
20652 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20653
20654 PR rtl-optimization/84989
20655 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20656 VEC_DUPLICATE with scalar result mode.
20657
20658 2018-03-21 Martin Liska <mliska@suse.cz>
20659
20660 PR ipa/84963
20661 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20662 not intended return statement.
20663
20664 2018-03-21 Martin Liska <mliska@suse.cz>
20665
20666 PR target/84988
20667 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20668 (chkp_find_bound_slots_1): Limit number of iterations.
20669
20670 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20671
20672 PR target/84838
20673 * Minor grammar fixes for x86 options.
20674
20675 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20676
20677 PR debug/84875
20678 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20679 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20680
20681 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20682
20683 PR target/83789
20684 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20685 (altivec_lvx_<mode>_1op): Likewise.
20686 (altivec_stvx_<mode>_2op): Likewise.
20687 (altivec_stvx_<mode>_1op): Likewise.
20688 (altivec_lvx_<VM2:mode>): New define_expand.
20689 (altivec_stvx_<VM2:mode>): Likewise.
20690 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20691 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20692 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20693 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20694 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20695 (rs6000_gen_lvx): Likewise.
20696 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20697 (altivec_expand_stv_builtin): Likewise.
20698 (altivec_expand_builtin): Likewise.
20699 * config/rs6000/vector.md: Likewise.
20700
20701 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20702
20703 PR target/82518
20704 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20705 BYTES_BIG_ENDIAN.
20706
20707 2018-03-20 Richard Biener <rguenther@suse.de>
20708
20709 PR target/84986
20710 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20711 sign-conversions as zero, fall back to standard scalar_stmt
20712 cost for the rest.
20713
20714 2018-03-20 Martin Liska <mliska@suse.cz>
20715
20716 PR ipa/84825
20717 * predict.c (rebuild_frequencies): Handle case when we have
20718 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20719
20720 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20721
20722 PR target/84990
20723 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20724 flag_section_anchors.
20725 * varasm.c (use_blocks_for_decl_p): Remove hack for
20726 dw2_force_const_mem.
20727
20728 PR target/84845
20729 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20730 to ...
20731 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20732 be created, use lowpart_subreg of operands[0] rather than operands[0]
20733 itself.
20734 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20735 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20736 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20737 and n constraint instead of aarch64_shift_imm_di and Usd.
20738 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20739 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20740
20741 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20742
20743 PR target/82989
20744 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20745 to favor GPR over NEON registers.
20746 (<shift>di3_neon): Likewise.
20747
20748 2018-03-20 Tom de Vries <tom@codesourcery.com>
20749
20750 PR target/84952
20751 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20752 (nvptx_process_pars): Emit bar.sync asap and alap.
20753
20754 2018-03-20 Tom de Vries <tom@codesourcery.com>
20755
20756 PR target/84954
20757 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20758 seen_label if seen_label is already set.
20759
20760 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20761
20762 PR target/84945
20763 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20764 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20765 Use 1U instead of 1. Formatting fixes.
20766
20767 PR c/84953
20768 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20769 instead of TREE_TYPE (s1) for the return value.
20770
20771 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20772
20773 PR tree-optimization/84946
20774 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20775 bitsize + bitsize in poly_uint64 rather than poly_int64.
20776
20777 PR sanitizer/78651
20778 * dwarf2asm.c: Include fold-const.c.
20779 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20780 of decl rather than decl itself.
20781
20782 PR rtl-optimization/84643
20783 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20784
20785 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20786
20787 PR sanitizer/78651
20788 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20789 calling assemble_variable.
20790
20791 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20792
20793 PR target/81647
20794 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20795 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20796
20797 2018-03-19 Jim Wilson <jimw@sifive.com>
20798
20799 PR bootstrap/84856
20800 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20801 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20802 (riscv_first_stack_step): Likewise.
20803 (riscv_option_override): Use STACK_BOUNDARY instead of
20804 MIN_STACK_BOUNDARY.
20805 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20806 MIN_STACK_BOUNDARY.
20807 (BIGGEST_ALIGNMENT): Set to 128.
20808 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20809 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20810 STACK_BOUNDARY.
20811
20812 2018-03-19 Richard Biener <rguenther@suse.de>
20813
20814 PR tree-optimization/84933
20815 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20816 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20817
20818 2018-03-19 Richard Biener <rguenther@suse.de>
20819
20820 PR tree-optimization/84859
20821 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20822 (cond_if_else_store_replacement): Perform sinking operation on
20823 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20824 Generalize what a BB with a single eligible store is.
20825
20826 2018-03-19 Richard Biener <rguenther@suse.de>
20827
20828 PR tree-optimization/84929
20829 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20830 chrec_is_positive against non-chrec arg.
20831
20832 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20833
20834 PR target/84711
20835 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20836
20837 2018-03-18 Martin Liska <mliska@suse.cz>
20838
20839 PR rtl-optimization/84635
20840 * regrename.c (build_def_use): Use matches_mode only when
20841 matches >= 0.
20842
20843 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20844
20845 PR tree-optimization/84913
20846 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20847 vectorize chains of COND_EXPRs.
20848
20849 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20850
20851 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20852
20853 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20854
20855 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20856
20857 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20858
20859 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20860
20861 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20862 Kito Cheng <kito.cheng@gmail.com>
20863
20864 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20865 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20866 (nds32_adjust_reg_alloc_order): New function.
20867 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20868
20869 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20870
20871 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20872 nds32_print_operand, nds32_print_operand_address): Use
20873 HOST_WIDE_INT_PRINT_DEC instead.
20874
20875 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20876
20877 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20878
20879 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20880
20881 PR target/84902
20882 * config/i386/i386.c (initial_ix86_tune_features,
20883 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20884 unsigned long long.
20885 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20886 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20887 rather than 1u << ix86_tune. Formatting fix.
20888 (ix86_option_override_internal): Change ix86_arch_mask from
20889 unsigned int to unsigned HOST_WIDE_INT, initialize to
20890 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20891 (ix86_function_specific_restore): Likewise.
20892
20893 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20894
20895 PR target/84899
20896 * postreload.c (reload_combine_recognize_pattern): Perform
20897 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20898 truncate_int_for_mode the result for the destination's mode.
20899
20900 PR c/84909
20901 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20902 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20903 Likewise.
20904 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20905 Likewise.
20906
20907 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20908
20909 PR target/84876
20910 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20911 regno_allocno_class_array and sorted_pseudos.
20912 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20913 insns where regno is used.
20914
20915 2018-03-16 Martin Liska <mliska@suse.cz>
20916
20917 PR ipa/84833
20918 * multiple_target.c (create_dispatcher_calls): Redirect
20919 reference in the symbol table.
20920
20921 2018-03-16 Martin Liska <mliska@suse.cz>
20922
20923 PR ipa/84722
20924 * multiple_target.c (create_dispatcher_calls): Redirect also
20925 an alias.
20926
20927 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20928
20929 PR c++/79937
20930 PR c++/82410
20931 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20932 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20933 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20934
20935 2018-03-16 Julia Koval <julia.koval@intel.com>
20936
20937 * doc/invoke.texi (Skylake Server): Add CLWB.
20938 Cannonlake): Remove CLWB.
20939
20940 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20941
20942 PR tree-optimization/84841
20943 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20944 1 << 3.
20945 (FLOAT_ONE_CONST_TYPE): Define.
20946 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20947 (sort_by_operand_rank): Put entries with higher constant_type last
20948 rather than first to match comments.
20949
20950 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20951
20952 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20953 split predicate.
20954
20955 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20956
20957 PR c++/79085
20958 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20959 check and use address of target always.
20960
20961 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20962
20963 PR target/84574
20964 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20965 (indirect_thunk_bnd_needed): Likewise.
20966 (indirect_thunks_used): Likewise.
20967 (indirect_thunks_bnd_used): Likewise.
20968 (indirect_return_needed): New.
20969 (indirect_return_bnd_needed): Likewise.
20970 (output_indirect_thunk_function): Add a bool argument for
20971 function return.
20972 (output_indirect_thunk_function): Don't generate alias for
20973 function return thunk.
20974 (ix86_code_end): Call output_indirect_thunk_function to generate
20975 function return thunks.
20976 (ix86_output_function_return): Set indirect_return_bnd_needed
20977 and indirect_return_needed instead of indirect_thunk_bnd_needed
20978 and indirect_thunk_needed.
20979
20980 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20981
20982 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20983 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20984 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20985
20986 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20987 Paul Hua <paul.hua.gm@gmail.com>
20988
20989 PR c/84852
20990 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20991
20992 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20993
20994 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20995 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20996 resp. SFmode cases.
20997
20998 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20999
21000 PR target/84711
21001 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21002 instead of GET_MODE_SIZE when comparing Units.
21003
21004 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21005
21006 PR target/68256
21007 * varasm.c (hash_section): Return an unchangeble hash value
21008 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21009 Return !aarch64_can_use_per_function_literal_pools_p ().
21010
21011 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21012
21013 PR target/84860
21014 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21015 rather than address of cmode as last argument to prepare_cmp_insn.
21016
21017 2018-03-15 Julia Koval <julia.koval@intel.com>
21018
21019 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21020 F_AVX512VNNI, F_AVX512BITALG): New.
21021
21022 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21023
21024 PR target/83451
21025 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21026 insn for floating-point loads and stores.
21027
21028 2018-03-14 Carl Love <cel@us.ibm.com>
21029
21030 * config/rs6000/rs6000-c.c: Add macro definitions for
21031 ALTIVEC_BUILTIN_VEC_PERMXOR.
21032 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21033 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21034 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21035 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21036 UNSPEC_VPERMXOR.
21037 * config/doc/extend.texi: Add prototypes for vec_permxor.
21038
21039 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21040
21041 PR c/84852
21042 * diagnostic-show-locus.c (class layout_point): Convert m_line
21043 from int to linenum_type.
21044 (line_span::comparator): Use linenum "compare" function when
21045 comparing line numbers.
21046 (test_line_span): New function.
21047 (layout_range::contains_point): Convert param "row" from int to
21048 linenum_type.
21049 (layout_range::intersects_line_p): Likewise.
21050 (layout::will_show_line_p): Likewise.
21051 (layout::print_source_line): Likewise.
21052 (layout::should_print_annotation_line_p): Likewise.
21053 (layout::print_annotation_line): Likewise.
21054 (layout::print_leading_fixits): Likewise.
21055 (layout::annotation_line_showed_range_p): Likewise.
21056 (struct line_corrections): Likewise for field m_row.
21057 (line_corrections::line_corrections): Likewise for param "row".
21058 (layout::print_trailing_fixits): Likewise.
21059 (layout::get_state_at_point): Likewise.
21060 (layout::get_x_bound_for_row): Likewise.
21061 (layout::print_line): Likewise.
21062 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21063 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21064 * input.c (selftest::test_linenum_comparisons): New function.
21065 (selftest::input_c_tests): Call it.
21066 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21067 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21068 * selftest.h (ASSERT_GT): New macro.
21069 (ASSERT_GT_AT): New macro.
21070 (ASSERT_LT): New macro.
21071 (ASSERT_LT_AT): New macro.
21072
21073 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21074
21075 PR rtl-optimization/84780
21076 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21077
21078 2018-03-14 Martin Liska <mliska@suse.cz>
21079
21080 * tree.c (record_node_allocation_statistics): Use
21081 get_stats_node_kind.
21082 (get_stats_node_kind): New function extracted from
21083 record_node_allocation_statistics.
21084 (free_node): Use get_stats_node_kind.
21085
21086 2018-03-14 Richard Biener <rguenther@suse.de>
21087
21088 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21089 that the value-set of ANTIC_IN doesn't grow.
21090
21091 Revert
21092 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21093 member.
21094 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21095 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21096
21097 2018-03-14 Julia Koval <julia.koval@intel.com>
21098
21099 * config.gcc (icelake-client, icelake-server): New.
21100 (icelake): Remove.
21101 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21102 (initial_ix86_arch_features): Ditto.
21103 (PTA_SKYLAKE): Add SGX.
21104 (PTA_ICELAKE): Remove.
21105 (PTA_ICELAKE_CLIENT): New.
21106 (PTA_ICELAKE_SERVER): New.
21107 (ix86_option_override_internal): Split up icelake on icelake client and
21108 icelake server.
21109 (get_builtin_code_for_version): Ditto.
21110 (fold_builtin_cpu): Ditto.
21111 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21112 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21113 * config/i386/i386.h (processor_type): Ditto.
21114 * doc/invoke.texi: Ditto.
21115
21116 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21117
21118 PR sanitizer/83392
21119 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21120 INTEGER_CST offset, add it together with bitpos / 8 and
21121 sign extend based on POINTER_SIZE.
21122
21123 PR target/84844
21124 Revert
21125 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21126
21127 PR target/78090
21128 * config/i386/constraints.md (Yc): New register constraint.
21129 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21130 Use Yc constraint for alternative 2 of operand 0. Remove
21131 preferred_for_speed attribute.
21132
21133 2018-03-14 Richard Biener <rguenther@suse.de>
21134
21135 PR tree-optimization/84830
21136 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21137 with the old one to avoid oscillations.
21138
21139 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21140
21141 PR target/83712
21142 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21143 pseudos.
21144 (assign_by_spills): Return a flag of reload assignment failure.
21145 Do not process the reload assignment failures. Do not spill other
21146 reload pseudos if they has the same reg class. Update n if
21147 necessary.
21148 (lra_assign): Add a return arg. Set up from the result of
21149 assign_by_spills call.
21150 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21151 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21152 usage_insns if it is not NULL.
21153 (spill_hard_reg_in_range): New function.
21154 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21155 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21156 function prototypes.
21157 (lra_assign): Change prototype.
21158 * lra.c (lra): Add code to deal with fails by splitting hard reg
21159 live ranges.
21160
21161 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21162
21163 * config/riscv/riscv.opt (mrelax): New option.
21164 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21165 "norelax" when riscv_mrelax is disabled.
21166 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21167
21168 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21169
21170 PR target/84743
21171 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21172 reassociation for int modes.
21173
21174 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21175
21176 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21177 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21178 for big-endian.
21179 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21180 * config/aarch64/aarch64-sve.md
21181 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21182 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21183 (*extend<mode><Vwide>2): Rename to...
21184 (aarch64_sve_extend<mode><Vwide>2): ...this.
21185 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21186 renaming the old pattern to...
21187 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21188 unsigned packs.
21189 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21190 define_expand, renaming the old pattern to...
21191 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21192 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21193 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21194 account when deciding which SVE instruction the optab should use.
21195 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21196
21197 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21198
21199 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21200 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21201 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21202 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21203 (tlsdesc_small_<mode>): Turn a define_expand and use
21204 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21205 (tlsdesc_small_advsimd_<mode>): ...this.
21206 (tlsdesc_small_sve_<mode>): New pattern.
21207
21208 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21209
21210 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21211 (UNSPEC_UMUL_HIGHPART): New constants.
21212 (MUL_HIGHPART): New int iteraor.
21213 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21214 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21215 define_expand.
21216 (*<su>mul<mode>3_highpart): New define_insn.
21217
21218 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21219
21220 PR lto/84805
21221 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21222 incomplete types.
21223
21224 2018-03-13 Martin Liska <mliska@suse.cz>
21225
21226 PR ipa/84658.
21227 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21228 vector.
21229 (sem_item_optimizer::~sem_item_optimizer): Release it.
21230 (sem_item_optimizer::merge_classes): Register variable aliases.
21231 (sem_item_optimizer::fixup_pt_set): New function.
21232 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21233 * ipa-icf.h: Declare new variables and functions.
21234
21235 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21236
21237 PR middle-end/84834
21238 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21239 integer_pow2p@2 and test integer_pow2p in condition.
21240 (A < 0 ? C : 0): Similarly for @1.
21241
21242 PR middle-end/84831
21243 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21244 characters starting at p contain '\0' character, don't look beyond
21245 that.
21246
21247 PR target/84827
21248 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21249 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21250
21251 PR target/84828
21252 * reg-stack.c (change_stack): Change update_end var from int to
21253 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21254 also call set_block_for_insn on the newly added insns and rescan.
21255
21256 PR target/84786
21257 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21258 on the last operand.
21259
21260 PR c++/84704
21261 * tree.c (stabilize_reference_1): Return save_expr (e) for
21262 STATEMENT_LIST even if it doesn't have side-effects.
21263
21264 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21265
21266 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21267
21268 2018-03-12 Renlin Li <renlin.li@arm.com>
21269
21270 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21271 aarch64_output_scalar_simd_mov_immediate.
21272
21273 2018-03-12 Martin Sebor <msebor@redhat.com>
21274
21275 PR tree-optimization/83456
21276 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21277 for perfectly overlapping calls to memcpy.
21278 (gimple_fold_builtin_memory_chk): Same.
21279 (gimple_fold_builtin_strcpy): Handle no-warning.
21280 (gimple_fold_builtin_stxcpy_chk): Same.
21281 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21282
21283 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21284
21285 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21286 parameter. Use it for SFmode.
21287 (rs6000_function_arg_advance_1): Adjust.
21288 (rs6000_function_arg): Adjust.
21289 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21290
21291 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21292
21293 PR rtl-optimization/84169
21294 PR rtl-optimization/84780
21295 * combine.c (can_combine_p): Check for a 2-insn combination whether
21296 the destination register is used between the two insns, too.
21297
21298 2018-03-12 Richard Biener <rguenther@suse.de>
21299
21300 PR tree-optimization/84803
21301 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21302 for refs DR analysis didn't process.
21303
21304 2018-03-12 Richard Biener <rguenther@suse.de>
21305
21306 PR tree-optimization/84777
21307 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21308 force-vectorize loops ignore whether we are optimizing for size.
21309
21310 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21311
21312 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21313 (TARGET_MD_ASM_ADJUST): Define.
21314
21315 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21316 Kito Cheng <kito.cheng@gmail.com>
21317 Chung-Ju Wu <jasonwucj@gmail.com>
21318
21319 * config/nds32/nds32.c (nds32_compute_stack_frame,
21320 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21321 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21322 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21323 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21324 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21325 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21326 * config/nds32/nds32.md (prologue, epilogue): Use macro
21327 NDS32_V3PUSH_AVAILABLE_P to do checking.
21328
21329 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21330
21331 PR debug/58150
21332 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21333 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21334 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21335 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21336 addition of most attributes on !orig_type_die or the attribute not
21337 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21338
21339 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21340 Chung-Ju Wu <jasonwucj@gmail.com>
21341
21342 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21343 __NDS32_VH__ macro.
21344 * config/nds32/nds32.opt (mvh): New option.
21345
21346 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21347 Chung-Ju Wu <jasonwucj@gmail.com>
21348
21349 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21350 function.
21351 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21352 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21353 definition.
21354
21355 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21356 Chung-Ju Wu <jasonwucj@gmail.com>
21357
21358 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21359 function.
21360 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21361 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21362
21363 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21364 Kito Cheng <kito.cheng@gmail.com>
21365 Chung-Ju Wu <jasonwucj@gmail.com>
21366
21367 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21368 UNSPEC_FFMISM and UNSPEC_FLMISM.
21369 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21370 for ffb, ffmism and flmism.
21371 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21372 (unspec_ffmism): Ditto.
21373 (unspec_flmism): Ditto.
21374 (nds32_expand_builtin_impl): Check if string extension is available.
21375 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21376 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21377
21378 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21379
21380 Reverting patch:
21381 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21382
21383 PR target/83712
21384 * lra-assigns.c (assign_by_spills): Return a flag of reload
21385 assignment failure. Do not process the reload assignment
21386 failures. Do not spill other reload pseudos if they has the same
21387 reg class.
21388 (lra_assign): Add a return arg. Set up from the result of
21389 assign_by_spills call.
21390 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21391 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21392 usage_insns if it is not NULL.
21393 (spill_hard_reg_in_range): New function.
21394 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21395 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21396 function prototypes.
21397 (lra_assign): Change prototype.
21398 * lra.c (lra): Add code to deal with fails by splitting hard reg
21399 live ranges.
21400
21401 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21402
21403 PR target/84807
21404 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21405
21406 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21407
21408 PR debug/84620
21409 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21410 (dw_val_node): Add val_symbolic_view.
21411 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21412 (symview_upper_bound): New.
21413 (new_line_info_table): Initialize symviews_since_reset.
21414 (dwarf2out_source_line): Count symviews_since_reset and set
21415 symview_upper_bound.
21416 (dw_val_equal_p): Handle symview.
21417 (add_AT_symview): New.
21418 (print_dw_val): Handle symview.
21419 (attr_checksum, attr_checksum_ordered): Likewise.
21420 (same_dw_val_p, size_of_die): Likewise.
21421 (value_format, output_die): Likewise.
21422 (add_high_low_attributes): Use add_AT_symview for entry_view.
21423 (dwarf2out_finish): Reset symview_upper_bound, clear
21424 zero_view_p.
21425
21426 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21427
21428 PR target/83969
21429 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21430 Add strict argument and use it.
21431 (rs6000_split_multireg_move): Update for new strict argument.
21432 (mem_operand_gpr): Disallow all non-offsettable addresses.
21433 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21434
21435 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21436
21437 PR target/84772
21438 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21439 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21440 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21441
21442 PR c++/84767
21443 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21444 decl, use remap_type if we want to use the type.
21445
21446 2018-03-09 Martin Sebor <msebor@redhat.com>
21447
21448 PR tree-optimization/84526
21449 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21450 Remove dead code.
21451 (builtin_access::generic_overlap): Be prepared to handle non-array
21452 base objects.
21453
21454 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21455
21456 PR rtl-optimization/84682
21457 * lra-constraints.c (process_address_1): Check is_address flag
21458 for address constraints.
21459 (process_alt_operands): Likewise.
21460 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21461 preprocess_constraints.
21462 * recog.h (preprocess_constraints): Add oploc parameter.
21463 Adjust callers.
21464 * recog.c (preprocess_constraints): Test address_operand for
21465 CT_ADDRESS constraints.
21466
21467 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21468
21469 PR target/83712
21470 * lra-assigns.c (assign_by_spills): Return a flag of reload
21471 assignment failure. Do not process the reload assignment
21472 failures. Do not spill other reload pseudos if they has the same
21473 reg class.
21474 (lra_assign): Add a return arg. Set up from the result of
21475 assign_by_spills call.
21476 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21477 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21478 usage_insns if it is not NULL.
21479 (spill_hard_reg_in_range): New function.
21480 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21481 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21482 function prototypes.
21483 (lra_assign): Change prototype.
21484 * lra.c (lra): Add code to deal with fails by splitting hard reg
21485 live ranges.
21486
21487 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21488
21489 PR target/83193
21490 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21491 Accept complain bool parameter. Only emit errors if it is true.
21492 (arm_parse_cpu_option_name): Likewise.
21493 (arm_target_thumb_only): Adjust callers of the above.
21494 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21495 prototype to take a default true bool parameter.
21496 (arm_parse_arch_option_name): Likewise.
21497
21498 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21499 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21500
21501 PR jit/64089
21502 PR jit/84288
21503 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21504 * configure: Regenerate.
21505 * configure.ac ("linker --version-script option"): New.
21506 ("linker soname option"): New.
21507
21508 2018-03-09 Richard Biener <rguenther@suse.de>
21509
21510 PR tree-optimization/84775
21511 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21512 immediate uses of predicate stmts and mark them modified.
21513
21514 Revert
21515 PR tree-optimization/84178
21516 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21517 to caller.
21518 (version_loop_for_if_conversion): Delay update_ssa call.
21519 (tree_if_conversion): Delay update_ssa until after predicate
21520 insertion.
21521
21522 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21523
21524 PR target/84763
21525 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21526 when the function accesses prior frames.
21527
21528 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21529
21530 PR debug/84456
21531 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21532 gen_llsym, otherwise call maybe_gen_llsym.
21533
21534 PR inline-asm/84742
21535 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21536 has ',' character inside of it.
21537
21538 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21539
21540 PR target/84748
21541 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21542 as clobbering CC_REGNUM.
21543
21544 2018-03-08 Richard Biener <rguenther@suse.de>
21545
21546 PR middle-end/84552
21547 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21548 (follow_copies_to_constant): Do not follow SSA names registered
21549 for update.
21550
21551 2018-03-08 Richard Biener <rguenther@suse.de>
21552
21553 PR tree-optimization/84178
21554 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21555 to caller.
21556 (version_loop_for_if_conversion): Delay update_ssa call.
21557 (tree_if_conversion): Delay update_ssa until after predicate
21558 insertion.
21559
21560 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21561
21562 PR tree-optimization/84178
21563 * tree-if-conv.c (release_bb_predicate): Remove the
21564 the assertion that the stmts have NULL use_ops.
21565 Discard the statements, asserting that they haven't
21566 yet been added to a BB.
21567
21568 2018-03-08 Richard Biener <rguenther@suse.de>
21569
21570 PR tree-optimization/84746
21571 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21572 (phi_translate): Pass in destination ANTIC_OUT set.
21573 (phi_translate_1): Likewise. For a simplified result lookup
21574 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21575 (phi_translate_set): Adjust.
21576 (do_pre_regular_insertion): Likewise.
21577 (do_pre_partial_partial_insertion): Likewise.
21578
21579 2018-03-08 Martin Liska <mliska@suse.cz>
21580
21581 PR gcov-profile/84735
21582 * doc/gcov.texi: Document usage of profile files.
21583 * gcov-io.h: Document changes in the format.
21584
21585 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21586
21587 PR debug/84404
21588 PR debug/84408
21589 * dwarf2out.c (struct dw_line_info_table): Update comments for
21590 view == -1.
21591 (FORCE_RESET_NEXT_VIEW): New.
21592 (FORCE_RESETTING_VIEW_P): New.
21593 (RESETTING_VIEW_P): Check for -1 too.
21594 (ZERO_VIEW_P): Likewise.
21595 (new_line_info_table): Force-reset next view.
21596 (dwarf2out_begin_function): Likewise.
21597 (dwarf2out_source_line): Simplify zero_view_p initialization.
21598 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21599 view directly. Omit view when omitting .loc at line 0.
21600
21601 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21602
21603 PR tree-optimization/84740
21604 * tree-switch-conversion.c (process_switch): Call build_constructors
21605 only if info.phi_count is non-zero.
21606
21607 PR tree-optimization/84739
21608 * tree-tailcall.c (find_tail_calls): Check call arguments against
21609 DECL_ARGUMENTS (current_function_decl) rather than
21610 DECL_ARGUMENTS (func) when checking for tail recursion.
21611
21612 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21613
21614 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21615 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21616 Volker Reichelt's entry and add entries for people that perform
21617 GCC fuzzy testing and report numerous bugs.
21618
21619 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21620
21621 PR target/82411
21622 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21623 readonly data in sdata, if that is disabled.
21624 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21625 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21626 -mreadonly-in-sdata option.
21627
21628 2018-03-07 Martin Sebor <msebor@redhat.com>
21629
21630 PR tree-optimization/84468
21631 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21632 basic block when looking for nul assignment.
21633
21634 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21635
21636 PR target/84277
21637 * except.h (output_function_exception_table): Adjust prototype.
21638 * except.c (output_function_exception_table): Remove FNNAME parameter
21639 and add SECTION parameter. Ouput one part of the table at a time.
21640 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21641 the first part of the exception table and emit unwind directives.
21642 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21643 (i386_pe_seh_cold_init): Likewise.
21644 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21645 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21646 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21647 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21648 * config/i386/winnt.c: Include except.h.
21649 (struct seh_frame_state): Add reg_offset, after_prologue and
21650 in_cold_section fields.
21651 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21652 (i386_pe_seh_cold_init): New function.
21653 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21654 to seh->in_cold_section.
21655 (seh_emit_push): Record the offset of the push.
21656 (seh_emit_save): Record the offet of the save.
21657 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21658 Test seh->after_prologue to disregard the epilogue.
21659 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21660 (i386_pe_end_cold_function): New function.
21661
21662 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21663
21664 PR fortran/84565
21665 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21666 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21667
21668 PR c++/84704
21669 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21670 on tmp_var.
21671 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21672 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21673
21674 PR middle-end/84723
21675 * multiple_target.c: Include tree-inline.h and intl.h.
21676 (expand_target_clones): Diagnose and fail if node->definition and
21677 !tree_versionable_function_p (node->decl).
21678
21679 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21680
21681 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21682 sprint_ul.
21683 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21684 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21685 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21686
21687 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21688
21689 PR target/84710
21690 * combine.c (try_combine): Use reg_or_subregno instead of handling
21691 just paradoxical SUBREGs and REGs.
21692
21693 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21694
21695 * config/arc/arc.c (arc_finalize_pic): Remove function.
21696 (arc_must_save_register): We use single base PIC register, remove
21697 checks to save/restore the PIC register.
21698 (arc_expand_prologue): Likewise.
21699 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21700 Remove.
21701 (arc_verify_short): Likewise.
21702 (arc_attr_type): Likewise.
21703 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21704 (walk_stores): Likewise.
21705 (arc_address_cost): Make it static.
21706 (arc_verify_short): Likewise.
21707 (branch_dest): Likewise.
21708 (arc_attr_type): Likewise.
21709 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21710 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21711 (arc_final_prescan_insn): Remove inserting the nops due to
21712 hardware hazards. It is done in reorg step.
21713 (insn_length_variant_t): Remove.
21714 (insn_length_parameters_t): Likewise.
21715 (arc_insn_length_parameters): Likewise.
21716 (arc_get_insn_variants): Likewise.
21717 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21718
21719 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21720
21721 PR inline-asm/84683
21722 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21723 assertion failure.
21724
21725 PR tree-optimization/84687
21726 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21727 on new_node->decl.
21728 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21729
21730 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21731
21732 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21733 Rename to ppc_speculation_barrier.
21734 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21735 __builtin_ppc_speculation_barrier.
21736
21737 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21738
21739 PR target/84700
21740 * combine.c (combine_simplify_rtx): Don't try to simplify if
21741 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21742 are equal to x.
21743
21744 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21745
21746 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21747 to 32 bytes when compiling for POWER9.
21748
21749 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21750
21751 PR target/84564
21752 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21753 regparm >= 3 with no arg reg available also for calls with
21754 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21755
21756 PR target/84524
21757 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21758 orig,vex.
21759 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21760
21761 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21762
21763 PR target/84264
21764 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21765
21766 2018-03-05 Richard Biener <rguenther@suse.de>
21767
21768 PR tree-optimization/84486
21769 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21770 When inserting a __builtin_assume_aligned call set the LHS
21771 SSA name alignment info accordingly.
21772
21773 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21774
21775 PR tree-optimization/84114
21776 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21777 Avoid reassociation of FLOAT_MODE addition.
21778
21779 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21780
21781 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21782 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21783 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21784 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21785 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21786 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21787 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21788 and -mwbnoinvd.
21789 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21790 __builtin_ia32_wbinvd): New builtins.
21791 (SPECIAL_ARGS2): New.
21792 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21793 (SPECIAL_ARGS2): New.
21794 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21795 (ix86_valid_target_attribute_inner_p): Ditto.
21796 (ix86_init_mmx_sse_builtins): Add special_args2.
21797 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21798 TARGET_WBNOINVD_P): New.
21799 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21800 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21801 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21802 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21803 * config/i386/pconfigintrin.h: New file.
21804 * config/i386/wbnoinvdintrin.h: Ditto.
21805 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21806 wbnoinvdintrin.h.
21807 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21808
21809 2018-03-05 Richard Biener <rguenther@suse.de>
21810
21811 PR tree-optimization/84670
21812 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21813 member.
21814 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21815 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21816 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21817 doesn't grow if all successors (recursively) were visited at least
21818 once.
21819
21820 2018-03-05 Richard Biener <rguenther@suse.de>
21821
21822 PR tree-optimization/84650
21823 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21824 if executed in the loop pipeline.
21825
21826 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21827
21828 * doc/configfiles.texi (Configuration Files): Move info about
21829 conditionalizing $target-protos.h to...
21830 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21831 differs from $target-protos.h.
21832
21833 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21834 Chung-Ju Wu <jasonwucj@gmail.com>
21835
21836 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21837 * config/nds32/nds32-multiple.md (setmemsi): Define.
21838 * config/nds32/nds32-memory-manipulation.c
21839 (nds32_gen_dup_4_byte_to_word_value): New.
21840 (emit_setmem_word_loop): New.
21841 (emit_setmem_byte_loop): New.
21842 (nds32_expand_setmem_loop): New.
21843 (nds32_expand_setmem_loop_v3m): New.
21844 (nds32_expand_setmem_unroll): New.
21845 (nds32_expand_setmem): New.
21846
21847 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21848 Chung-Ju Wu <jasonwucj@gmail.com>
21849
21850 * config/nds32/nds32-memory-manipulation.c
21851 (nds32_emit_load_store): New.
21852 (nds32_emit_post_inc_load_store): New.
21853 (nds32_emit_mem_move): New.
21854 (nds32_emit_mem_move_block): New.
21855 (nds32_expand_movmemsi_loop_unknown_size): New.
21856 (nds32_expand_movmemsi_loop_known_size): New.
21857 (nds32_expand_movmemsi_loop): New.
21858 (nds32_expand_movmemsi_unroll): New.
21859 (nds32_expand_movmemqi): Rename ...
21860 (nds32_expand_movmemsi): ... to this.
21861 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21862 (movmemsi): ... to this.
21863 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21864 (nds32_expand_movmemsi): ... to this.
21865
21866 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21867 Monk Chiang <sh.chiang04@gmail.com>
21868 Chung-Ju Wu <jasonwucj@gmail.com>
21869
21870 * config/nds32/nds32-protos.h
21871 (nds32_expand_load_multiple): New arguments.
21872 (nds32_expand_store_multiple): Ditto.
21873 (nds32_valid_multiple_load_store): Rename ...
21874 (nds32_valid_multiple_load_store_p): ... to this.
21875 * config/nds32/nds32-memory-manipulation.c
21876 (nds32_expand_load_multiple): Refine implementation.
21877 (nds32_expand_store_multiple): Ditto.
21878 * config/nds32/nds32-multiple.md
21879 (load_multiple): Update nds32_expand_load_multiple interface.
21880 (store_multiple): Update nds32_expand_store_multiple interface.
21881 * config/nds32/nds32-predicates.c
21882 (nds32_valid_multiple_load_store): Rename ...
21883 (nds32_valid_multiple_load_store_p): ... to this and refine
21884 implementation.
21885 * config/nds32/predicates.md
21886 (nds32_load_multiple_and_update_address_operation): New predicate.
21887 (nds32_store_multiple_and_update_address_operation): New predicate.
21888
21889 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21890 Chung-Ju Wu <jasonwucj@gmail.com>
21891
21892 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21893 (combo): New attribute.
21894 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21895
21896 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21897
21898 * config/nds32/nds32.opt: Change -mcmodel= default value.
21899
21900 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21901 Monk Chiang <sh.chiang04@gmail.com>
21902 Chung-Ju Wu <jasonwucj@gmail.com>
21903
21904 * config/nds32/constants.md (unspec_element): New enum.
21905 * config/nds32/constraints.md (Umw): New constraint.
21906 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21907 * config/nds32/nds32-intrinsic.md: Likewise.
21908 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21909 (nds32_valid_smw_lwm_base_p): New.
21910 (nds32_output_smw_single_word): New.
21911 (nds32_output_lmw_single_word): New.
21912 (nds32_expand_unaligned_load): New.
21913 (nds32_expand_unaligned_store): New.
21914 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21915 (nds32_output_smw_single_word): Declare.
21916 (nds32_output_lmw_single_word): Declare.
21917 (nds32_expand_unaligned_load): Declare.
21918 (nds32_expand_unaligned_store): Declare.
21919 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21920 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21921 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21922 NDS32_BUILTIN_UASTORE_DW.
21923 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21924 predicate.
21925
21926 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21927 Kito Cheng <kito.cheng@gmail.com>
21928 Chung-Ju Wu <jasonwucj@gmail.com>
21929
21930 * config/nds32/nds32-intrinsic.c
21931 (nds32_expand_builtin_null_ftype_reg): Delete.
21932 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21933 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21934 (nds32_read_argument): New.
21935 (nds32_legitimize_target): Ditto.
21936 (nds32_legitimize_argument): Ditto.
21937 (nds32_check_constant_argument): Ditto.
21938 (nds32_expand_unop_builtin): Ditto.
21939 (nds32_expand_unopimm_builtin): Ditto.
21940 (nds32_expand_binop_builtin): Ditto.
21941 (nds32_builtin_decl_impl): Ditto.
21942 (builtin_description): Ditto.
21943 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21944 (nds32_init_builtins_impl): Ditto.
21945 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21946 (nds32_builtin_decl): New.
21947 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21948 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21949
21950 2018-03-02 Jeff Law <law@redhat.com>
21951
21952 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21953 (redundant_insn, fill_simple_delay_slots): Likewise.
21954 (fill_slots_from_thread): Likewise.
21955 * resource.c (mark_referenced_resources): Likewise.
21956 (mark_set_resources, find_dead_or_set_registers): Likewise.
21957
21958 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21959
21960 * substring-locations.h (format_warning_va): Formatting fix for
21961 ATTRIBUTE_GCC_DIAG.
21962 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21963 argument.
21964 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21965 * substring-locations.c: Include intl.h.
21966 (format_warning_va): Turned into small wrapper around
21967 format_warning_n_va, renamed to ...
21968 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21969 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21970 use ngettext.
21971 (format_warning_at_substring_n): New function.
21972 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21973 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21974 format_warning_at_substring with just a shorter name instead of
21975 const function pointer.
21976 (fmtwarn_n): New function.
21977 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21978 appropriate, get rid of all the fmtstr temporaries, move conditionals
21979 with G_() wrapped string literals directly into fmtwarn arguments,
21980 cast dir.len to (int), formatting fixes.
21981
21982 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21983
21984 * doc/invoke.texi: Remove "Cilk Plus" references.
21985
21986 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21987 Richard Biener <rguenther@suse.de>
21988
21989 PR ipa/84628
21990 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21991 for error or warning attributes if CALL_FROM_THUNK_P is set.
21992 Formatting fixes.
21993
21994 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21995
21996 PR target/56540
21997 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21998 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21999
22000 PR target/56540
22001 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22002 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22003
22004 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22005 instead of -1U in last predictors element's probability member.
22006
22007 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22008
22009 PR ipa/83983
22010 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22011 arguments if they are comparable.
22012
22013 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22014
22015 PR tree-optimization/84634
22016 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22017 masks and masked_loop_p with a single loop_masks, making sure it's
22018 null for bb vectorization.
22019
22020 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22021
22022 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22023 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22024 loop->force_vectorize to check whether there is no alias.
22025
22026 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22027
22028 PR target/84614
22029 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22030 prototypes.
22031 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22032 comments.
22033 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22034 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22035 instead of a loop around prev_real_insn.
22036 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22037 prev_real_insn.
22038
22039 PR inline-asm/84625
22040 * config/i386/i386.c (ix86_print_operand): Use conditional
22041 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22042 zero vector.
22043
22044 2018-03-02 Richard Biener <rguenther@suse.de>
22045
22046 PR tree-optimization/84427
22047 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22048 (bitmap_set_subtract_values): Rewrite to handle multiple
22049 exprs per value.
22050 (clean): Likewise.
22051 (prune_clobbered_mems): Likewise.
22052 (phi_translate): Take edge instead of pred/phiblock.
22053 (phi_translate_1): Likewise.
22054 (phi_translate_set): Likewise. Insert all translated
22055 exprs for a value into the set, keeping possibly multiple
22056 expressions per value.
22057 (compute_antic_aux): Adjust for phi_translate changes.
22058 When intersecting union the expressions and prune those
22059 not in the final value set, keeping possibly multiple
22060 expressions per value. Do not use value-insertion
22061 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22062 all expressions. Add verification that the value-sets
22063 only shrink during iteration.
22064 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22065 (do_pre_regular_insertion): Likewise.
22066 (do_pre_partial_partial_insertion): Likewise.
22067
22068 2018-03-02 Richard Biener <rguenther@suse.de>
22069
22070 PR target/82005
22071 * config/darwin.c (saved_debug_info_level): New static global.
22072 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22073 (darwin_asm_lto_end): Restore debug info generation settings.
22074
22075 2018-03-01 Martin Liska <mliska@suse.cz>
22076
22077 PR sanitizer/82484
22078 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22079 volatile arguments.
22080
22081 2018-03-01 Richard Biener <rguenther@suse.de>
22082
22083 PR debug/84645
22084 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22085 type annotation with LTO when debug was disabled at compile-time.
22086
22087 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22088
22089 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22090 XINT with INTVAL.
22091 (mips_final_postscan_insn): Likewise.
22092
22093 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22094
22095 PR rtl-optimization/84528
22096 * alias.c (init_alias_target): Add commentary.
22097 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22098 a unique base value if the frame pointer is not eliminated
22099 to the stack pointer.
22100
22101 2018-03-01 Tom de Vries <tom@codesourcery.com>
22102
22103 PR rtl-optimization/83327
22104 * lra-int.h (hard_regs_spilled_into): Declare.
22105 * lra.c (hard_regs_spilled_into): Define.
22106 (init_reg_info): Init hard_regs_spilled_into.
22107 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22108 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22109 (process_bb_lives): Handle hard_regs_spilled_into.
22110 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22111 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22112
22113 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22114
22115 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22116 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22117 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22118 * config/rs6000/aix72.h: New file.
22119
22120 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22121
22122 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22123 instead of warning_at with conditional singular and plural messages
22124 where possible.
22125
22126 PR target/52991
22127 * stor-layout.c (update_alignment_for_field): For
22128 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22129 && !DECL_PACKED (field), do the alignment update, just use
22130 only desired_align instead of MAX (type_align, desired_align)
22131 as the alignment.
22132 (place_field): Don't do known_align < desired_align handling
22133 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22134 is non-NULL, instead do it after rli->prev_field handling and
22135 only if not within a bitfield word. For DECL_PACKED (field)
22136 use type_align of BITS_PER_UNIT.
22137
22138 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22139
22140 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22141 superfluous parentheses and trailing spaces.
22142
22143 2018-02-28 Richard Biener <rguenther@suse.de>
22144
22145 PR tree-optimization/84584
22146 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22147 SCoPs with fake exit edge.
22148
22149 2018-02-28 Martin Liska <mliska@suse.cz>
22150
22151 PR testsuite/84597
22152 * timevar.c (timer::print): Fix format to properly print 100%
22153 values.
22154
22155 2018-02-28 Richard Biener <rguenther@suse.de>
22156
22157 PR middle-end/84607
22158 * genmatch.c (capture_info::walk_match): Do not mark
22159 captured expressions without operands as expr_p given
22160 they act more like predicates and should be subject to
22161 "lost tail" side-effect preserving.
22162
22163 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22164
22165 PR rtl-optimization/81611
22166 * auto-inc-dec.c (attempt_change): Move dead note from
22167 mem_insn if it's the next use of regno
22168 (find_address): Take address use of reg holding
22169 non-incremented value. Add parm to limit search to the named
22170 reg only.
22171 (merge_in_block): Attempt to use a mem insn that is the next
22172 use of the original regno.
22173
22174 2018-02-27 Martin Sebor <msebor@redhat.com>
22175
22176 PR c++/83871
22177 * doc/invoke.texi (-Wmissing-attributes): New option.
22178 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22179
22180 2018-02-27 Martin Sebor <msebor@redhat.com>
22181
22182 PR translation/84207
22183 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22184 n argument to unsigned HOST_WIDE_INT.
22185 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22186 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22187 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22188 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22189
22190 2018-02-27 Richard Biener <rguenther@suse.de>
22191
22192 PR tree-optimization/84512
22193 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22194 Do not use the estimate returned from record_stmt_cost for
22195 the scalar iteration cost but sum properly using add_stmt_cost.
22196
22197 2018-02-27 Richard Biener <rguenther@suse.de>
22198
22199 PR tree-optimization/84466
22200 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22201 Adjust last change to less strictly validate use operands.
22202
22203 2018-02-27 Martin Liska <mliska@suse.cz>
22204
22205 PR gcov-profile/84548
22206 * gcov.c (process_file): Allow partial overlap and consider it
22207 also as group functions.
22208 (output_lines): Properly calculate range of lines for a group.
22209
22210 2018-02-27 Martin Liska <mliska@suse.cz>
22211
22212 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22213 'ggc' suffixes. Change first column width.
22214 (timer::print): Fix formatting of the column.
22215
22216 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22217
22218 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22219 preserve inline entry blocks for the sake of debug inline
22220 entry point markers alone.
22221 (remove_unused_locals): Suggest in comments a better place to
22222 force the preservation of inline entry blocks that are
22223 otherwise unused, but do not preserve them.
22224
22225 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22226
22227 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22228
22229 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22230
22231 PR target/84039
22232 * config/i386/constraints.md (Bs): Replace
22233 ix86_indirect_branch_register with
22234 TARGET_INDIRECT_BRANCH_REGISTER.
22235 (Bw): Likewise.
22236 * config/i386/i386.md (indirect_jump): Likewise.
22237 (tablejump): Likewise.
22238 (*sibcall_memory): Likewise.
22239 (*sibcall_value_memory): Likewise.
22240 Peepholes of indirect call and jump via memory: Likewise.
22241 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22242 (*sibcall_value_GOT_32): Likewise.
22243 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22244 (GOT_memory_operand): Likewise.
22245 (call_insn_operand): Likewise.
22246 (sibcall_insn_operand): Likewise.
22247 (GOT32_symbol_operand): Likewise.
22248 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22249
22250 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22251
22252 PR rtl-optimization/83496
22253 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22254 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22255 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22256 redundant insn, if any.
22257 (relax_delay_slots): Likewise.
22258 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22259
22260 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22261
22262 PR tree-optimization/83965
22263 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22264 that grouped statements are part of a reduction chain. Return
22265 true if the statement is not marked as a reduction itself but
22266 is part of a group.
22267 (vect_recog_dot_prod_pattern): Don't check whether the statement
22268 is part of a group here.
22269 (vect_recog_sad_pattern): Likewise.
22270 (vect_recog_widen_sum_pattern): Likewise.
22271
22272 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22273
22274 PR debug/84545
22275 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22276
22277 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22278
22279 PR target/84530
22280 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22281 the bool argument.
22282 (ix86_output_indirect_function_return): New prototype.
22283 (ix86_split_simple_return_pop_internal): Likewise.
22284 * config/i386/i386.c (indirect_return_via_cx): New.
22285 (indirect_return_via_cx_bnd): Likewise.
22286 (indirect_thunk_name): Handle return va CX_REG.
22287 (output_indirect_thunk_function): Create alias for
22288 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22289 (ix86_output_indirect_jmp): Remove the bool argument.
22290 (ix86_output_indirect_function_return): New function.
22291 (ix86_split_simple_return_pop_internal): Likewise.
22292 * config/i386/i386.md (*indirect_jump): Don't pass false
22293 to ix86_output_indirect_jmp.
22294 (*tablejump_1): Likewise.
22295 (simple_return_pop_internal): Change it to define_insn_and_split.
22296 Call ix86_split_simple_return_pop_internal to split it for
22297 -mfunction-return=.
22298 (simple_return_indirect_internal): Call
22299 ix86_output_indirect_function_return instead of
22300 ix86_output_indirect_jmp.
22301
22302 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22303
22304 PR bootstrap/84405
22305 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22306 memset and value initialization afterwards.
22307
22308 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22309
22310 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22311
22312 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22313
22314 PR target/84521
22315 * common/config/aarch64/aarch64-common.c
22316 (aarch_option_optimization_table[]): Switch
22317 off fomit-frame-pointer
22318
22319 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22320 Chung-Ju Wu <jasonwucj@gmail.com>
22321
22322 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22323 volatile memory.
22324 (store_multiple): Ditto.
22325
22326 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22327
22328 * config.gcc: Add --with-cpu support for nds32 target.
22329 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22330 * config/nds32/nds32.opt: Add -mcpu= option.
22331
22332 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22333
22334 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22335 isel=yes): Warn for these deprecated options.
22336
22337 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22338
22339 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22340 ISA_2_5_MASKS_EMBEDDED.
22341
22342 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22343
22344 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22345 p->max as pointers rather than using iterative_hash_expr.
22346
22347 2018-02-23 Carl Love <cel@us.ibm.com>
22348
22349 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22350 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22351 BU_P8V_OVERLOAD_2.
22352 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22353 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22354 P8V_BUILTIN_VEC_VUNSIGNED2.
22355
22356 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22357
22358 PR target/81572
22359 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22360 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22361 LRA_UNKNOWN_ALT.
22362 * lra-constraints.c (curr_insn_transform): Set up
22363 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22364 LRA_UNKNOWN_ALT.
22365 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22366 * lra-eliminations.c (spill_pseudos): Ditto.
22367 (process_insn_for_elimination): Ditto.
22368 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22369 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22370 LRA_NON_CLOBBERED_ALT.
22371
22372 2018-02-22 Martin Sebor <msebor@redhat.com>
22373
22374 PR tree-optimization/84480
22375 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22376 to maybe_diag_stxncpy_trunc. Call it.
22377 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22378 from gimple_fold_builtin_strcpy. Print inlining stack.
22379 (handle_builtin_stxncpy): Print inlining stack.
22380 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22381
22382 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22383
22384 PR target/84176
22385 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22386 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22387 and -fcheck-pointer-bounds are used together.
22388 (indirect_thunk_prefix): New enum.
22389 (indirect_thunk_need_prefix): New function.
22390 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22391 "_nt" instead of "_bnd" for NOTRACK prefix.
22392 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22393 (output_indirect_thunk_function): Likewise.
22394 (): Likewise.
22395 (ix86_code_end): Update output_indirect_thunk_function calls.
22396 (ix86_output_indirect_branch_via_reg): Replace
22397 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22398 (ix86_output_indirect_branch_via_push): Likewise.
22399 (ix86_output_function_return): Likewise.
22400 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22401 incompatible with -fcf-protection=branch and
22402 -fcheck-pointer-bounds.
22403
22404 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22405
22406 PR target/83335
22407 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22408 Change gcc_assert call to output_operand_lossage.
22409
22410 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22411
22412 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22413
22414 2018-02-22 DJ Delorie <dj@redhat.com>
22415 Sebastian Perta <sebastian.perta@renesas.com>
22416 Oleg Endo <olegendo@gcc.gnu.org>
22417
22418 * config/rx/rx.c (rx_rtx_costs): New function.
22419 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22420
22421 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22422
22423 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22424
22425 2018-02-22 Martin Liska <mliska@suse.cz>
22426
22427 PR driver/83193
22428 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22429 Add "native" as a possible value.
22430
22431 2018-02-22 Martin Liska <mliska@suse.cz>
22432
22433 PR driver/83193
22434 * config/i386/i386.c (ix86_option_override_internal):
22435 Add "native" as a possible value for -march and -mtune.
22436
22437 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22438
22439 PR target/84502
22440 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22441 to all type variants.
22442
22443 PR tree-optimization/84503
22444 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22445 width as info->bitpos + info->bitsize - start.
22446 (merged_store_group::merge_overlapping): Simplify width computation.
22447 (check_no_overlap): New function.
22448 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22449 start + width and last_order of the group, fail if check_no_overlap
22450 fails.
22451 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22452 to group if check_no_overlap fails.
22453
22454 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22455
22456 * config/rs6000/altivec.md: Delete contraint arguments to
22457 define_expand, define_split, and define_peephole2, and in
22458 define_insn_and_split if always unused.
22459 * config/rs6000/darwin.md: Ditto.
22460 * config/rs6000/dfp.md: Ditto.
22461 * config/rs6000/rs6000.md: Ditto.
22462 * config/rs6000/sync.md: Ditto.
22463 * config/rs6000/vector.md: Ditto.
22464 * config/rs6000/vsx.md: Ditto.
22465
22466 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22467
22468 * config/rs6000/altivec.md: Write output control strings as braced
22469 blocks instead of double-quoted strings.
22470 * config/rs6000/darwin.md: Ditto.
22471 * config/rs6000/rs6000.md: Ditto.
22472 * config/rs6000/vector.md: Ditto.
22473 * config/rs6000/vsx.md: Ditto.
22474
22475 2018-02-21 Jason Merrill <jason@redhat.com>
22476
22477 PR c++/84314 - ICE with templates and fastcall attribute.
22478 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22479
22480 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22481
22482 * ipa-cp.c (determine_versionability): Fix comment typos.
22483
22484 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22485
22486 PR c/84229
22487 * ipa-cp.c (determine_versionability): Do not version functions caling
22488 va_arg_pack.
22489
22490 2018-02-21 Martin Liska <mliska@suse.cz>
22491
22492 PR driver/83193
22493 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22494 Add "native" as a possible value.
22495 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22496 the macro when native cpu detection is available.
22497
22498 2018-02-21 Martin Liska <mliska@suse.cz>
22499
22500 PR driver/83193
22501 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22502 Add "native" as a possible value.
22503 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22504 when native cpu detection is available.
22505
22506 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22507 Martin Sebor <msebor@redhat.com>
22508
22509 PR tree-optimization/84478
22510 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22511 false.
22512 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22513 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22514 support which is conservatively correct, for 2 only stay conservative
22515 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22516 argument to the 2 argument get_range_strlen, adjust 6 arg
22517 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22518 false.
22519 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22520 (gimple_fold_builtin_strlen): Pass true as last argument to
22521 get_range_strlen.
22522
22523 2018-02-20 Martin Sebor <msebor@redhat.com>
22524
22525 PR middle-end/84095
22526 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22527 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22528 (builtin_memref::builtin_memref): Factor out parts into
22529 set_base_and_offset and call it.
22530
22531 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22532
22533 PR middle-end/84406
22534 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22535 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22536 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22537 search at the associated MODE_INT.
22538
22539 2018-02-20 Jeff Law <law@redhat.com>
22540
22541 PR middle-end/82123
22542 PR tree-optimization/81592
22543 PR middle-end/79257
22544 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22545 for range data rather than using global data.
22546 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22547 range data rather than using global data.
22548 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22549 pass it to children as needed.
22550 (struct directive::fmtresult): Similarly.
22551 (struct directive::set_width): Similarly.
22552 (struct directive::set_precision): Similarly.
22553 (format_integer, format_directive, parse_directive): Similarly.
22554 (format_none): Accept unnamed vr_values parameter.
22555 (format_percent, format_floating, format_character): Similarly.
22556 (format_string, format_plain): Similarly.
22557 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22558 the EVRP range analyzer for range data rather than using global data.
22559 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22560 gimple-ssa-evrp-analyze.h
22561 (class sprintf_dom_walker): Add after_dom_children member function.
22562 Add evrp_range_analyzer member.
22563 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22564 range analyzer as needed.
22565 (sprintf_dom_walker::after_dom_children): New member function.
22566 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22567 if not optimizing.
22568 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22569 (evrp_range_analyzer::pop_to_marker): Likewise.
22570
22571 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22572
22573 PR tree-optimization/84419
22574 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22575 with the required type if its current type is compatible but
22576 different.
22577
22578 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22579
22580 PR middle-end/82004
22581 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22582 after vectorization.
22583
22584 2018-02-20 Martin Liska <mliska@suse.cz>
22585
22586 PR driver/83193
22587 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22588 possible values if we don't have a hint.
22589
22590 2018-02-20 Martin Liska <mliska@suse.cz>
22591
22592 PR c/84310
22593 PR target/79747
22594 * final.c (shorten_branches): Build align_tab array with one
22595 more element.
22596 * opts.c (finish_options): Add alignment option limit check.
22597 (MAX_CODE_ALIGN): Likewise.
22598 (MAX_CODE_ALIGN_VALUE): Likewise.
22599 * doc/invoke.texi: Document maximum allowed option value for
22600 all -falign-* options.
22601
22602 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22603
22604 PR target/84146
22605 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22606 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22607 * var-tracking.c (emit_note_insn_var_location): Remove all references
22608 to NOTE_INSN_CALL_ARG_LOCATION.
22609 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22610 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22611 Use copy_rtx_if_shared.
22612 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22613 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22614 (dwarf2out_var_location): Remove handling of
22615 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22616 on call_insn.
22617 * final.c (final_scan_insn): Remove all references to
22618 NOTE_INSN_CALL_ARG_LOCATION.
22619 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22620 before dumping final insns.
22621 * except.c (emit_note_eh_region_end): Remove all references to
22622 NOTE_INSN_CALL_ARG_LOCATION.
22623 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22624 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22625 * config/arc/arc.c (hwloop_optimize): Likewise.
22626 * config/arm/arm.c (create_fix_barrier): Likewise.
22627 * config/s390/s390.c (s390_chunkify_start): Likewise.
22628 * config/sh/sh.c (find_barrier): Likewise.
22629 * config/i386/i386.c (rest_of_insert_endbranch,
22630 ix86_seh_fixup_eh_fallthru): Likewise.
22631 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22632 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22633 * config/frv/frv.c (frv_function_prologue): Likewise.
22634 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22635 reg note.
22636 (note_outside_basic_block_p): Remove all references to
22637 NOTE_INSN_CALL_ARG_LOCATION.
22638 * gengtype.c (adjust_field_rtx_def): Likewise.
22639 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22640 Likewise.
22641 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22642 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22643
22644 PR c++/84444
22645 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22646 is ADDR_EXPR.
22647
22648 PR tree-optimization/84452
22649 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22650 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22651 is NULL.
22652
22653 2018-02-19 Martin Liska <mliska@suse.cz>
22654
22655 PR sanitizer/82183
22656 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22657
22658 2018-02-19 Martin Liska <mliska@suse.cz>
22659 Richard Sandiford <richard.sandiford@linaro.org>
22660
22661 PR tree-optimization/82491
22662 * gimple-fold.c (get_base_constructor): Make earlier bail out
22663 to prevent ubsan.
22664
22665 2018-02-19 Carl Love <cel@us.ibm.com>
22666
22667 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22668 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22669 BU_P8V_OVERLOAD_1.
22670 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22671 P8V_BUILTIN_VEC_NEG.
22672
22673 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22674
22675 * config/rl78/rl78.md (movdf): New define expand.
22676
22677 2018-02-19 Martin Liska <mliska@suse.cz>
22678
22679 PR other/80589
22680 * doc/invoke.texi: Fix typo.
22681 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22682
22683 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22684
22685 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22686 handle rs6000_single_float and rs6000_double_float specially for
22687 e500 family CPUs.
22688
22689 2018-02-16 Jeff Law <law@redhat.com>
22690
22691 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22692 (pop_regs): Use it.
22693
22694 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22695
22696 PR ipa/84425
22697 * ipa-inline.c (inline_small_functions): Fix a typo.
22698
22699 2018-02-16 Nathan Sidwell <nathan@acm.org>
22700
22701 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22702
22703 2018-02-16 Carl Love <cel@us.ibm.com>
22704
22705 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22706 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22707 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22708 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22709 expansion to P8V_BUILTIN_VEC_FLOAT2.
22710
22711 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22712
22713 PR rtl-optimization/70023
22714 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22715 src_regno into account.
22716
22717 2018-02-16 Carl Love <cel@us.ibm.com>
22718
22719 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22720 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22721 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22722 * config/rs6000/rs6000.c: Remove case statements for
22723 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22724 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22725 and P9V_BUILTIN_VEC_VINSERT4B.
22726 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22727 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22728 * config/rs6000/vsx.md:
22729 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22730 vec_insert4b.
22731
22732 2018-02-16 Carl Love <cel@us.ibm.com>
22733
22734 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22735 vec_insert4b.
22736 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22737 definitions.
22738 * config/rs6000/rs6000-c.c: Add the definitions for
22739 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22740 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22741 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22742 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22743 definition for insert4b and define insn *insert3b_internal.
22744 * doc/extend.texi: Add documentation for vec_extract4b.
22745
22746 2018-02-16 Nathan Sidwell <nathan@acm.org>
22747
22748 * doc/extend.texi (Backwards Compatibility): Mention friend
22749 injection. Note for-scope is deprecated.
22750 * doc/invoke.texi (-ffriend-injection): Deprecate.
22751
22752 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22753
22754 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22755 that moved to I2, also allow destinations that are a paradoxical
22756 subreg (instead of a normal reg).
22757
22758 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22759
22760 PR target/83831
22761 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22762 to QImode.
22763
22764 2018-02-16 Richard Biener <rguenther@suse.de>
22765
22766 PR tree-optimization/84037
22767 PR tree-optimization/84016
22768 PR target/82862
22769 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22770 Adjust vec_construct for the fact we need additional higher latency
22771 128bit inserts for AVX256 and AVX512 vector builds.
22772 (ix86_add_stmt_cost): Scale vector construction cost for
22773 elementwise loads.
22774
22775 2018-02-16 Richard Biener <rguenther@suse.de>
22776
22777 PR tree-optimization/84417
22778 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22779 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22780 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22781
22782 2018-02-16 Martin Liska <mliska@suse.cz>
22783
22784 PR sanitizer/84307
22785 * internal-fn.def (ASAN_CHECK): Set proper flags.
22786 (ASAN_MARK): Likewise.
22787
22788 2018-02-16 Julia Koval <julia.koval@intel.com>
22789
22790 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22791 from PTA_CANNONLAKE.
22792
22793 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22794
22795 PR target/84272
22796 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22797 Use ++iter rather than iter++ for std::list iterators.
22798 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22799 defer deleting them until all nodes in the forest are processed. Do
22800 free even leaf nodes. Change to_process into auto_vec.
22801
22802 PR bootstrap/84405
22803 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22804 * vec.h (vec_default_construct): Use memset instead of placement new
22805 if BROKEN_VALUE_INITIALIZATION is defined.
22806 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22807 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22808 is defined.
22809
22810 PR rtl-optimization/83723
22811 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22812 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22813 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22814 recursive calls.
22815 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22816 callers.
22817 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22818
22819 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22820
22821 PR rtl-optimization/81443
22822 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22823 from inner REGs to paradoxical SUBREGs.
22824
22825 2018-02-16 Richard Biener <rguenther@suse.de>
22826
22827 PR tree-optimization/84399
22828 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22829 For operands we can analyze at their definition make sure we can
22830 analyze them at each use as well.
22831
22832 2018-02-16 Richard Biener <rguenther@suse.de>
22833
22834 PR tree-optimization/84190
22835 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22836 volatile accesses if the decl isn't volatile.
22837
22838 2018-02-15 Jason Merrill <jason@redhat.com>
22839
22840 PR c++/84314 - ICE with templates and fastcall attribute.
22841 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22842 TYPE_CANONICAL on an existing type.
22843
22844 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22845
22846 PR tree-optimization/84383
22847 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22848 dstoff nor call operand_equal_p if dstbase is NULL.
22849
22850 PR tree-optimization/84334
22851 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22852 also a CONSTANT_CLASS_P, punt.
22853
22854 2018-02-14 Jim Wilson <jimw@sifive.com>
22855
22856 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22857 first SMALL_OPERAND check. New local min_second_step. Move assert
22858 to where locals are set. Add TARGET_RVC support.
22859 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22860
22861 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22862
22863 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22864
22865 2018-02-14 Martin Sebor <msebor@redhat.com>
22866
22867 PR tree-optimization/83698
22868 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22869 arrays constrain the offset range to their bounds.
22870 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22871 (builtin_access::overlap): Avoid setting the size of overlap if it's
22872 already been set.
22873 (maybe_diag_overlap): Also consider arrays when deciding what values
22874 of offsets to include in diagnostics.
22875
22876 2018-02-14 Martin Sebor <msebor@redhat.com>
22877
22878 PR c/84108
22879 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22880 that correspond to the kind of a declaration.
22881
22882 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22883
22884 PR target/83984
22885 * config/pa/pa.md: Load address of PIC label using the linkage table
22886 if the label is nonlocal.
22887
22888 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22889
22890 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22891 warning message if user requests -maltivec=be.
22892 * doc/invoke.texi: Document deprecation of -maltivec=be.
22893
22894 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22895
22896 PR target/84220
22897 * config/rs6000/rs6000-c.c: Update definitions for
22898 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22899 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22900
22901 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22902
22903 PR target/84239
22904 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22905 add _get_ssp intrinsics. Remove argument from
22906 __builtin_ia32_rdssp[d|q].
22907 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22908 * config/i386/i386-builtin.def: Remove argument from
22909 __builtin_ia32_rdssp[d|q].
22910 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22911 ix86_expand_special_args_builtin for _rdssp[d|q].
22912 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22913 Clear register before usage.
22914 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22915 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22916
22917 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22918
22919 PR tree-optimization/84357
22920 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22921 operand 1 of an ARRAY_REF too.
22922
22923 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22924
22925 PR target/83831
22926 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22927 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22928 declarations.
22929 (set_of_reg): New struct.
22930 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22931 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22932 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22933 functions.
22934 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22935 Split into bitclr, bitset, bitinvert patterns if appropriate.
22936 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22937 use rx_fuse_in_memory_bitop.
22938 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22939 to named insn, correct maximum insn length.
22940
22941 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22942
22943 PR target/79242
22944 * machmode.def: Define a complex mode for PARTIAL_INT.
22945 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22946 MODE_PARTIAL_INT.
22947 * doc/rtl.texi: Document CSPImode.
22948 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22949 handling.
22950 (msp430_hard_regno_nregs_with_padding): Likewise.
22951
22952 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22953
22954 PR target/84279
22955 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22956
22957 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22958
22959 PR rtl-optimization/84169
22960 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22961 we generated a parallel as new i3 and we split that to new i2 and i3
22962 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22963 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22964 those to i2, not i1. Partially rewrite this scan code.
22965
22966 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22967
22968 PR c/82210
22969 * stor-layout.c (place_field): For variable length fields, adjust
22970 offset_align afterwards not just based on the field's alignment,
22971 but also on the size.
22972
22973 PR middle-end/84309
22974 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22975 of exps and logs in the use_exp2 case.
22976
22977 2018-02-13 Jeff Law <law@redhat.com>
22978
22979 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22980 entry for "vector".
22981
22982 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22983 ARGS as unused.
22984
22985 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22986
22987 PR debug/84342
22988 PR debug/84319
22989 * common.opt (gas-loc-support, gas-locview-support): New.
22990 (ginline-points, ginternal-reset-location-views): New.
22991 * doc/invoke.texi: Document them. Use @itemx where intended.
22992 (gvariable-location-views): Adjust.
22993 * target.def (reset_location_view): New.
22994 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22995 (TARGET_RESET_LOCATION_VIEW): New.
22996 * doc/tm.texi: Rebuilt.
22997 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22998 (dwarf2out_default_as_locview_support): New.
22999 (output_asm_line_debug_info): Use option variables.
23000 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23001 (output_loc_list): Likewise.
23002 (add_high_low_attributes): Check option variables.
23003 Don't output entry view attribute in strict mode.
23004 (gen_inlined_subroutine_die): Check option variables.
23005 (dwarf2out_inline_entry): Likewise.
23006 (init_sections_and_labels): Likewise.
23007 (dwarf2out_early_finish): Likewise.
23008 (maybe_reset_location_view): New, from...
23009 (dwarf2out_var_location): ... here. Call it.
23010 * debug.h (dwarf2out_default_as_loc_support): Declare.
23011 (dwarf2out_default_as_locview_support): Declare.
23012 * hooks.c (hook_int_rtx_insn_0): New.
23013 * hooks.h (hook_int_rtx_insn_0): Declare.
23014 * toplev.c (process_options): Take -gas-loc-support and
23015 -gas-locview-support from dwarf2out. Enable
23016 -gvariable-location-views by default only with locview
23017 assembler support. Enable -ginternal-reset-location-views by
23018 default only if the target defines the corresponding hook.
23019 Enable -ginline-points by default if location views are
23020 enabled; force it disabled if statement frontiers are
23021 disabled.
23022 * tree-inline.c (expand_call_inline): Check option variables.
23023 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23024
23025 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23026
23027 PR tree-optimization/84321
23028 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23029 handling. Also check whether the anti-range contains any values
23030 that satisfy the mask; switch to a VR_RANGE if not.
23031
23032 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23033
23034 PR sanitizer/84340
23035 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23036
23037 2018-02-13 Martin Jambor <mjambor@suse.cz>
23038
23039 PR c++/83990
23040 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23041 of call statements, also set location of a load to a temporary.
23042
23043 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23044
23045 * config/rl78/rl78.c (add_vector_labels): New function.
23046 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23047 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23048 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23049 which checks that no arguments are passed.
23050 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23051 * doc/extend.texi: Documentation for the new attribute.
23052
23053 2018-02-13 Andreas Schwab <schwab@suse.de>
23054
23055 * config/riscv/linux.h (CPP_SPEC): Define.
23056
23057 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23058
23059 PR target/84335
23060 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23061 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23062 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23063 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23064 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23065 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23066 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23067 temporarily for AES and PCLMUL builtins.
23068
23069 PR tree-optimization/84339
23070 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23071 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23072 Formatting fixes.
23073
23074 PR middle-end/84309
23075 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23076 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23077 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23078 inline function.
23079 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23080 inline function.
23081 * omp-simd-clone.h: New file.
23082 * omp-simd-clone.c: Include omp-simd-clone.h.
23083 (expand_simd_clones): No longer static.
23084 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23085 cgraph.h and omp-simd-clone.h.
23086 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23087 (vect_recog_widen_shift_pattern): Formatting fix.
23088 (vect_pattern_recog_1): Don't check optab for calls.
23089
23090 PR target/84336
23091 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23092 operands[2] into a REG before using gen_lowpart on it.
23093
23094 2018-02-12 Jeff Law <law@redhat.com>
23095
23096 PR target/83760
23097 * config/sh/sh.c (find_barrier): Consider a sibling call
23098 a barrier as well.
23099
23100 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23101 successfully back substituting a reg.
23102
23103 2018-02-12 Richard Biener <rguenther@suse.de>
23104
23105 PR tree-optimization/84037
23106 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23107 parameter, move visited init to caller.
23108 (vect_slp_analyze_operations): Separate cost from validity
23109 check, initialize visited once for all instances.
23110 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23111 for all instances.
23112 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23113 out an assert.
23114 (vect_model_promotion_demotion_cost): Likewise.
23115 (vectorizable_bswap): Guard cost modeling with !slp_node
23116 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23117 SLP stmts.
23118 (vectorizable_call): Likewise.
23119 (vectorizable_conversion): Likewise.
23120 (vectorizable_assignment): Likewise.
23121 (vectorizable_shift): Likewise.
23122 (vectorizable_operation): Likewise.
23123 (vectorizable_store): Likewise.
23124 (vectorizable_load): Likewise.
23125 (vectorizable_condition): Likewise.
23126 (vectorizable_comparison): Likewise.
23127
23128 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23129
23130 PR sanitizer/84307
23131 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23132 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23133 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23134
23135 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23136
23137 PR middle-end/83665
23138 * params.def (inline-min-speedup): Increase from 8 to 15.
23139 (max-inline-insns-auto): Decrease from 40 to 30.
23140 * ipa-split.c (consider_split): Add some buffer for function to
23141 be considered inlining candidate.
23142 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23143 default values.
23144
23145 2018-02-12 Richard Biener <rguenther@suse.de>
23146
23147 PR tree-optimization/84037
23148 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23149 matched stmts if we cannot swap the non-matched ones.
23150
23151 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23152
23153 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23154 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23155 _mm_maskz_scalef_round_ss): New intrinsics.
23156 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23157 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23158 __builtin_ia32_scalefss_round): Remove.
23159 (__builtin_ia32_scalefsd_mask_round,
23160 __builtin_ia32_scalefss_mask_round): New intrinsics.
23161 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23162 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23163 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23164 "<round_constraint>")): Changed to ...
23165 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23166 "<round_scalar_constraint>")): ... this.
23167 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23168 %0, %1, %2<round_op3>}"): Changed to ...
23169 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23170 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23171 %2<round_scalar_mask_op3>}"): ... this.
23172 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23173
23174 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23175
23176 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23177 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23178 (_mm_maskz_sqrt_round_ss): New intrinsics.
23179 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23180 (__builtin_ia32_sqrtsd_mask_round)
23181 (__builtin_ia32_sqrtss_mask_round): New builtins.
23182 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23183 (__builtin_ia32_sqrtss_round): Remove.
23184 (__builtin_ia32_sqrtsd_mask_round)
23185 (__builtin_ia32_sqrtss_mask_round): New builtins.
23186 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23187 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23188 ((match_operand:VF_128 1 "vector_operand"
23189 "xBm,<round_constraint>")): Changed to ...
23190 ((match_operand:VF_128 1 "vector_operand"
23191 "xBm,<round_scalar_constraint>")): ... this.
23192 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23193 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23194 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23195 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23196 %<iptr>1<round_scalar_mask_op3>}): ... this.
23197 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23198 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23199
23200 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23201
23202 PR target/84266
23203 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23204 Cast vec_cmpeq result to correct type.
23205 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23206 Cast vec_cmpgt result to correct type.
23207
23208 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23209
23210 * final.c (final_scan_insn_1): Renamed from...
23211 (final_scan_insn): ... this. New wrapper, to recover
23212 seen from the outermost call in recursive ones.
23213 * config/sparc/sparc.c (output_return): Drop seen from call.
23214 (output_sibcall): Likewise.
23215 * config/visium/visium.c (output_branch): Likewise.
23216
23217 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23218
23219 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23220 function label.
23221
23222 2018-02-10 Alan Modra <amodra@gmail.com>
23223
23224 PR target/84300
23225 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23226 Specify LR as an input.
23227
23228 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23229
23230 PR sanitizer/83987
23231 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23232 remove_member_access_dummy_vars): New functions.
23233 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23234 lower_omp_1, execute_lower_omp): Use them.
23235
23236 PR rtl-optimization/84308
23237 * shrink-wrap.c (spread_components): Release todo vector.
23238
23239 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23240
23241 PR rtl-optimization/57193
23242 * ira-color.c (struct allocno_color_data): Add member
23243 conflict_allocno_hard_prefs.
23244 (update_conflict_allocno_hard_prefs): New.
23245 (bucket_allocno_compare_func): Add a preference based on
23246 conflict_allocno_hard_prefs.
23247 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23248 (color_allocnos): Remove a dead code. Initiate
23249 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23250
23251 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23252
23253 PR target/84226
23254 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23255 constraint from =wa to wa. Avoid a subreg on the output operand,
23256 instead use a pseudo and subreg it in a move.
23257 (p9_xxbrd_<mode>): Changed to ...
23258 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23259 (p9_xxbrd_v2df): New expander.
23260 (p9_xxbrw_<mode>): Changed to ...
23261 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23262 (p9_xxbrw_v4sf): New expander.
23263
23264 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23265
23266 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23267
23268 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23269
23270 PR target/83926
23271 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23272 multiply in 32-bit mode.
23273 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23274 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23275 mode.
23276
23277 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23278
23279 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23280 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23281 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23282 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23283
23284 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23285
23286 PR lto/84213
23287 * dwarf2out.c (is_trivial_indirect_ref): New function.
23288 (dwarf2out_late_global_decl): Do not generate a location
23289 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23290 and that are not defined in the current unit.
23291
23292 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23293
23294 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23295 instead of a libcall for UNORDERED.
23296
23297 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23298
23299 PR target/82641
23300 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23301 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23302
23303 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23304
23305 PR target/PR84295
23306 * config/s390/s390.c (s390_set_current_function): Invoke
23307 s390_indirect_branch_settings also if fndecl didn't change.
23308
23309 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23310
23311 * config/rs6000/rs6000.md (blockage): Set length to zero.
23312
23313 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23314
23315 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23316
23317 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23318
23319 PR sanitizer/84285
23320 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23321 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23322 -static-lib*san.
23323
23324 PR debug/84252
23325 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23326 PARALLEL incoming that failed vt_get_decl_and_offset check.
23327
23328 PR middle-end/84237
23329 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23330 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23331 TREE_READONLY bit.
23332 (get_variable_section): For decls in named .bss* sections pass true as
23333 second argument to bss_initializer_p.
23334
23335 2018-02-09 Marek Polacek <polacek@redhat.com>
23336 Jakub Jelinek <jakub@redhat.com>
23337
23338 PR c++/83659
23339 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23340 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23341 Sync some changes from cxx_fold_indirect_ref.
23342
23343 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23344
23345 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23346 markers.
23347 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23348 (BLOCK_INLINE_ENTRY_LABEL): New.
23349 (dwarf2out_var_location): Disregard inline entry markers.
23350 (inline_entry_data): New struct.
23351 (inline_entry_data_hasher): New hashtable type.
23352 (inline_entry_data_hasher::hash): New.
23353 (inline_entry_data_hasher::equal): New.
23354 (inline_entry_data_table): New variable.
23355 (add_high_low_attributes): Add DW_AT_entry_pc and
23356 DW_AT_GNU_entry_view attributes if a pending entry is found
23357 in inline_entry_data_table. Add old entry_pc attribute only
23358 if debug nonbinding markers are disabled.
23359 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23360 markers are enabled.
23361 (block_within_block_p, dwarf2out_inline_entry): New.
23362 (dwarf2out_finish): Check that no entries remained in
23363 inline_entry_data_table.
23364 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23365 (final_scan_insn, notice_source_line): Likewise.
23366 (rest_of_clean_state): Skip inline entry markers.
23367 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23368 markers.
23369 * gimple.c (gimple_build_debug_inline_entry): New.
23370 * gimple.h (enum gimple_debug_subcode): Add
23371 GIMPLE_DEBUG_INLINE_ENTRY.
23372 (gimple_build_debug_inline_entry): Declare.
23373 (gimple_debug_inline_entry_p): New.
23374 (gimple_debug_nonbind_marker_p): Adjust.
23375 * insn-notes.def (INLINE_ENTRY): New.
23376 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23377 inline entry marker notes.
23378 (print_insn): Likewise.
23379 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23380 (INSN_DEBUG_MARKER_KIND): Likewise.
23381 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23382 * tree-inline.c (expand_call_inline): Build and insert
23383 debug_inline_entry stmt.
23384 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23385 inline entry blocks early, if nonbind markers are enabled.
23386 (dump_scope_block): Dump fragment info.
23387 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23388 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23389 (gimple_build_debug_inline_entry): New.
23390 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23391 Enable/disable inline entry points too.
23392 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23393 (DEBUG_INSN): Describe inline entry markers.
23394
23395 * common.opt (gvariable-location-views): New.
23396 (gvariable-location-views=incompat5): New.
23397 * config.in: Rebuilt.
23398 * configure: Rebuilt.
23399 * configure.ac: Test assembler for view support.
23400 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23401 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23402 * dwarf2out.c (var_loc_view): New typedef.
23403 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23404 (dwarf2out_locviews_in_attribute): New.
23405 (dwarf2out_locviews_in_loclist): New.
23406 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23407 (enum dw_line_info_opcode): Add LI_adv_address.
23408 (struct dw_line_info_table): Add view.
23409 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23410 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23411 (zero_view_p): New variable.
23412 (ZERO_VIEW_P): New macro.
23413 (output_asm_line_debug_info): New.
23414 (struct var_loc_node): Add view.
23415 (add_AT_view_list, AT_loc_list): New.
23416 (add_var_loc_to_decl): Add view param. Test it against last.
23417 (new_loc_list): Add view params. Record them.
23418 (AT_loc_list_ptr): Handle loc and view lists.
23419 (view_list_to_loc_list_val_node): New.
23420 (print_dw_val): Handle dw_val_class_view_list.
23421 (size_of_die): Likewise.
23422 (value_format): Likewise.
23423 (loc_list_has_views): New.
23424 (gen_llsym): Set vl_symbol too.
23425 (maybe_gen_llsym, skip_loc_list_entry): New.
23426 (dwarf2out_maybe_output_loclist_view_pair): New.
23427 (output_loc_list): Output view list or entries too.
23428 (output_view_list_offset): New.
23429 (output_die): Handle dw_val_class_view_list.
23430 (output_dwarf_version): New.
23431 (output_compilation_unit_header): Use it.
23432 (output_skeleton_debug_sections): Likewise.
23433 (output_rnglists, output_line_info): Likewise.
23434 (output_pubnames, output_aranges): Update version comments.
23435 (output_one_line_info_table): Output view numbers in asm comments.
23436 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23437 Call maybe_gen_llsym.
23438 (loc_list_from_tree_1): Adjust.
23439 (add_AT_location_description): Create view list attribute if
23440 needed, check it's absent otherwise.
23441 (convert_cfa_to_fb_loc_list): Adjust.
23442 (maybe_emit_file): Call output_asm_line_debug_info for test.
23443 (dwarf2out_var_location): Reset views as needed. Precompute
23444 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23445 attribute. Set view.
23446 (new_line_info_table): Reset next view.
23447 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23448 (dwarf2out_source_line): Likewise. Output view resets and labels to
23449 the assembler, or select appropriate line info opcodes.
23450 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23451 (optimize_string_length): Catch it. Adjust.
23452 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23453 dw_val_class_view_list, and remove it if no longer needed.
23454 (hash_loc_list): Hash view numbers.
23455 (loc_list_hasher::equal): Compare them.
23456 (optimize_location_lists): Check whether a view list symbol is
23457 needed, and whether the locview attribute is present, and
23458 whether they match. Remove the locview attribute if no longer
23459 needed.
23460 (index_location_lists): Call skip_loc_list_entry for test.
23461 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23462 Use output_dwarf_version.
23463 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23464 (struct dw_val_node): Add val_view_list.
23465 * final.c (SEEN_NEXT_VIEW): New.
23466 (set_next_view_needed): New.
23467 (clear_next_view_needed): New.
23468 (maybe_output_next_view): New.
23469 (final_start_function): Rename to...
23470 (final_start_function_1): ... this. Take pointer to FIRST,
23471 add SEEN parameter. Emit param bindings in the initial view.
23472 (final_start_function): Reintroduce SEEN-less interface.
23473 (final): Rename to...
23474 (final_1): ... this. Take SEEN parameter. Output final pending
23475 next view at the end.
23476 (final): Reintroduce seen-less interface.
23477 (final_scan_insn): Output pending next view before switching
23478 sections or ending a block. Mark the next view as needed when
23479 outputting variable locations. Notify debug backend of section
23480 changes, and of location view changes.
23481 (rest_of_handle_final): Adjust.
23482 * toplev.c (process_options): Autodetect value for debug variable
23483 location views option. Warn on incompat5 without -gdwarf-5.
23484 * doc/invoke.texi (gvariable-location-views): New.
23485 (gvariable-location-views=incompat5): New.
23486 (gno-variable-location-views): New.
23487
23488 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23489
23490 PR tree-optimization/84136
23491 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23492 that the result of find_edge is non-NULL.
23493
23494 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23495
23496 PR target/83008
23497 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23498 storing integer register in SImode. Fix cost of 256 and 512
23499 byte aligned SSE register store.
23500
23501 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23502
23503 * config/i386/i386.c (ix86_multiplication_cost): Fix
23504 multiplication cost for TARGET_AVX512DQ.
23505
23506 2018-02-08 Marek Polacek <polacek@redhat.com>
23507
23508 PR tree-optimization/84238
23509 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23510 get_range_strlen.
23511
23512 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23513
23514 PR tree-optimization/84265
23515 * tree-vect-stmts.c (vectorizable_store): Don't treat
23516 VMAT_CONTIGUOUS accesses as grouped.
23517 (vectorizable_load): Likewise.
23518
23519 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23520
23521 PR tree-optimization/81635
23522 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23523 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23524 (test_round_for_mask): New functions.
23525 (wide_int_cc_tests): Call test_round_for_mask.
23526 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23527 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23528 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23529 range returned by get_range_info.
23530
23531 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23532
23533 PR ipa/81360
23534 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23535 * symtab.c: Include builtins.h
23536 (symtab_node::output_to_lto_symbol_table_p): Move here
23537 from lto-streamer-out.c:output_symbol_p.
23538 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23539 (output_symbol_p): Move all logic to symtab.c
23540 (produce_symtab): Update.
23541
23542 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23543
23544 * config/s390/s390-opts.h (enum indirect_branch): Define.
23545 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23546 (s390_indirect_branch_via_thunk)
23547 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23548 (enum s390_indirect_branch_type): Define.
23549 * config/s390/s390.c (struct s390_frame_layout, struct
23550 machine_function): Remove.
23551 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23552 (indirect_branch_table_label_no, indirect_branch_table_name):
23553 Define variables.
23554 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23555 (enum s390_indirect_branch_option): Define.
23556 (s390_return_addr_from_memory): New function.
23557 (s390_handle_string_attribute): New function.
23558 (s390_attribute_table): Add new attribute handler.
23559 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23560 (s390_indirect_branch_via_thunk): New function.
23561 (s390_indirect_branch_via_inline_thunk): New function.
23562 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23563 sibling call optimization for non z10 compiles.
23564 (s390_emit_call): Force indirect branch target to be a single
23565 register. Add r1 clobber for non-z10 compiles.
23566 (s390_emit_epilogue): Emit return jump via return_use expander.
23567 (s390_reorg): Handle JUMP_INSNs as execute targets.
23568 (s390_option_override_internal): Perform validity checks for the
23569 new command line options.
23570 (s390_indirect_branch_attrvalue): New function.
23571 (s390_indirect_branch_settings): New function.
23572 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23573 (s390_output_indirect_thunk_function): New function.
23574 (s390_code_end): Implement target hook.
23575 (s390_case_values_threshold): Implement target hook.
23576 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23577 macros.
23578 * config/s390/s390.h (struct s390_frame_layout)
23579 (struct machine_function): Move here from s390.c.
23580 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23581 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23582 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23583 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23584 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23585 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23586 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23587 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23588 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23589 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23590 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23591 (mnemonic attribute): Add values which aren't recognized
23592 automatically.
23593 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23594 pattern for branch conversion. Fix mnemonic attribute.
23595 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23596 indirect branch via thunk if requested.
23597 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23598 ("*indirect_jump"): Disable for branch conversion using out of
23599 line thunks.
23600 ("indirect_jump_via_thunk<mode>_z10")
23601 ("indirect_jump_via_thunk<mode>")
23602 ("indirect_jump_via_inlinethunk<mode>_z10")
23603 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23604 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23605 ("casesi_jump_via_inlinethunk<mode>_z10")
23606 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23607 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23608 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23609 ("*indirect2_jump"): Disable for branch conversion.
23610 ("casesi_jump"): Turn into expander and expand patterns for branch
23611 conversion.
23612 ("return_use"): New expander.
23613 ("*return"): Emit return via thunk and rename it to ...
23614 ("*return<mode>"): ... this one.
23615 * config/s390/s390.opt: Add new options and and enum for the
23616 option values.
23617
23618 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23619
23620 * lra-constraints.c (match_reload): Unconditionally use
23621 gen_lowpart_SUBREG, rather than selecting between that
23622 and equivalent gen_rtx_SUBREG code.
23623
23624 2018-02-08 Richard Biener <rguenther@suse.de>
23625
23626 PR tree-optimization/84233
23627 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23628 changed flag instead of boguously re-using phi_inserted.
23629
23630 2018-02-08 Martin Jambor <mjambor@suse.cz>
23631
23632 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23633 static local variables.
23634
23635 2018-02-08 Richard Biener <rguenther@suse.de>
23636
23637 PR tree-optimization/84278
23638 * tree-vect-stmts.c (vectorizable_store): When looking for
23639 smaller vector types to perform grouped strided loads/stores
23640 make sure the mode is supported by the target.
23641 (vectorizable_load): Likewise.
23642
23643 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23644
23645 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23646 Increase LDP/STP opportunities by adding adjacent callee-saves.
23647
23648 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23649
23650 PR rtl-optimization/84068
23651 PR rtl-optimization/83459
23652 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23653
23654 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23655
23656 PR tree-optimization/84224
23657 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23658 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23659 non-zero arguments.
23660
23661 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23662
23663 PR target/84113
23664 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23665 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23666 count, remove one USE.
23667
23668 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23669
23670 * doc/install.texi (Configuration): Document the
23671 --with-long-double-format={ibm,ieee} PowerPC configuration
23672 options.
23673
23674 PR target/84154
23675 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23676 Convert from define_expand to be define_insn_and_split. Rework
23677 float/double/_Float128 conversions to QI/HI/SImode to work with
23678 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23679 conversions to QI/HImode types did a store and then a load to
23680 truncate the value. For conversions to VSX registers, don't split
23681 the insn, instead emit the code directly. Use the code iterator
23682 any_fix to combine signed and unsigned conversions.
23683 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23684 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23685 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23686 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23687 (fix_<mode>di2_hw): Likewise.
23688 (fixuns_<mode>di2_hw): Likewise.
23689 (fix_<mode>si2_hw): Likewise.
23690 (fixuns_<mode>si2_hw): Likewise.
23691 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23692 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23693 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23694 fix<uns>_trunc<SFDF:mode>si2_p8.
23695 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23696 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23697 (fix<uns>_<mode>_mem): Likewise.
23698 (fctiw<u>z_<mode>_mem): Likewise.
23699 (fix<uns>_<mode>_mem): Likewise.
23700 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23701 the register allocator from doing a direct move to the GPRs to do
23702 a store, and instead use the ISA 3.0 store byte/half-word from
23703 vector register instruction. For IEEE 128-bit floating point,
23704 also optimize stores of 32-bit ints.
23705 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23706
23707 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23708
23709 * genextract.c (push_pathstr_operand): New function to support
23710 [a-zA-Z].
23711 (walk_rtx): Call push_pathstr_operand.
23712 (print_path): Support [a-zA-Z].
23713
23714 2018-02-07 Richard Biener <rguenther@suse.de>
23715
23716 PR tree-optimization/84037
23717 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23718 (cse_and_gimplify_to_preheader): Declare.
23719 (vect_get_place_in_interleaving_chain): Likewise.
23720 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23721 ivexpr_map.
23722 (_loop_vec_info::~_loop_vec_info): Delete it.
23723 (cse_and_gimplify_to_preheader): New function.
23724 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23725 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23726 (vectorizable_load): Likewise. For grouped stores always base
23727 the IV on the first element.
23728 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23729 condition before gimplifying.
23730
23731 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23732
23733 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23734 *DIV_EXPR and *MOD_EXPR.
23735
23736 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23737
23738 PR target/84248
23739 * config/i386/i386.c (ix86_option_override_internal): Mask out
23740 the CF_SET bit when checking -fcf-protection.
23741
23742 2018-02-07 Tom de Vries <tom@codesourcery.com>
23743
23744 PR libgomp/84217
23745 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23746 enough.
23747
23748 2018-02-07 Richard Biener <rguenther@suse.de>
23749
23750 PR tree-optimization/84204
23751 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23752 this place.
23753
23754 PR tree-optimization/84205
23755 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23756 special-case isl_ast_op_zdiv_r.
23757
23758 PR tree-optimization/84223
23759 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23760 Only add conditions from within the region.
23761 (gather_bbs::after_dom_children): Adjust.
23762
23763 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23764
23765 PR target/84209
23766 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23767 * config/avr/avr.md: Only post-reload split REG-REG moves if
23768 either register is GENERAL_REG_P.
23769
23770 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23771
23772 PR tree-optimization/84235
23773 * tree-ssa-scopedtables.c
23774 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23775 if the subtraction is performed in floating point type where NaNs are
23776 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23777 build 1. Formatting fix.
23778
23779 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23780
23781 PR target/84146
23782 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23783 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23784 and skip it regardless of bb boundaries. Use CALL_P macro,
23785 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23786 unnecessarily, formatting fix.
23787
23788 2018-02-06 Michael Collison <michael.collison@arm.com>
23789
23790 * config/arm/thumb2.md:
23791 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23792 (*thumb_mov_notscc): Ditto.
23793
23794 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23795
23796 PR target/84154
23797 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23798 unsigned_fix, not "s".
23799
23800 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23801
23802 * configure.ac (gcc_fn_eh_frame_ro): New function.
23803 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23804 correct .eh_frame permissions.
23805 * configure: Regenerate.
23806
23807 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23808
23809 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23810 irrelevant options.
23811
23812 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23813
23814 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23815 Display warning message for -mno-speculate-indirect-jumps.
23816
23817 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23818
23819 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23820 Undocumented.
23821 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23822
23823 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23824
23825 PR tree-optimization/84225
23826 * tree-eh.c (find_trapping_overflow): Only call
23827 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23828
23829 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23830
23831 PR target/84145
23832 * config/i386/i386.c: Reimplement the check of possible options
23833 -mibt/-mshstk conbination. Change error messages.
23834 * doc/invoke.texi: Fix a typo: remove extra '='.
23835
23836 2018-02-06 Marek Polacek <polacek@redhat.com>
23837
23838 PR tree-optimization/84228
23839 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23840
23841 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23842
23843 PR target/82641
23844 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23845 emitted arch directives.
23846 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23847 __ARM_FEATURE_COPROC before changing architectures.
23848
23849 2018-02-06 Richard Biener <rguenther@suse.de>
23850
23851 * config/i386/i386.c (print_reg): Fix typo.
23852 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23853
23854 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23855
23856 * configure: Regenerate.
23857
23858 2018-02-05 Martin Sebor <msebor@redhat.com>
23859
23860 PR tree-optimization/83369
23861 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23862 inlining context.
23863
23864 2018-02-05 Martin Liska <mliska@suse.cz>
23865
23866 * doc/invoke.texi: Cherry-pick upstream r323995.
23867
23868 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23869
23870 * ira.c (ira_init_register_move_cost): Adjust comment.
23871
23872 2018-02-05 Martin Liska <mliska@suse.cz>
23873
23874 PR gcov-profile/84137
23875 * doc/gcov.texi: Fix typo in documentation.
23876
23877 2018-02-05 Martin Liska <mliska@suse.cz>
23878
23879 PR gcov-profile/83879
23880 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23881 using dlopen functionality.
23882
23883 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23884
23885 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23886 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23887 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23888 _mm_maskz_range_round_ss): New intrinsics.
23889 (__builtin_ia32_rangesd128_round)
23890 (__builtin_ia32_rangess128_round): Remove.
23891 (__builtin_ia32_rangesd128_mask_round,
23892 __builtin_ia32_rangess128_mask_round): New builtins.
23893 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23894 __builtin_ia32_rangess128_round): Remove.
23895 (__builtin_ia32_rangesd128_mask_round,
23896 __builtin_ia32_rangess128_mask_round): New builtins.
23897 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23898 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23899 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23900 "<round_saeonly_constraint>")): Changed to ...
23901 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23902 "<round_saeonly_scalar_constraint>")): ... this.
23903 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23904 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23905 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23906 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23907 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23908
23909 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23910
23911 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23912 options.
23913 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23914 Remove all values except native, 8540 and 8548.
23915
23916 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23917
23918 * config/i386/i386.c (ix86_output_function_return): Pass
23919 INVALID_REGNUM, instead of -1, as invalid register number to
23920 indirect_thunk_name and output_indirect_thunk.
23921
23922 2018-02-02 Julia Koval <julia.koval@intel.com>
23923
23924 * config.gcc: Add -march=icelake.
23925 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23926 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23927 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23928 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23929 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23930 (processor_target_table): Add icelake.
23931 (ix86_option_override_internal): Handle new PTAs.
23932 (get_builtin_code_for_version): Handle icelake.
23933 (M_INTEL_COREI7_ICELAKE): New.
23934 (fold_builtin_cpu): Handle icelake.
23935 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23936 * doc/invoke.texi: Add -march=icelake.
23937
23938 2018-02-02 Julia Koval <julia.koval@intel.com>
23939
23940 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23941 to wide_int_bitmask.
23942 * wide-int-bitmask.h: New.
23943
23944 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23945
23946 PR target/84066
23947 * config/i386/i386.md: Replace Pmode with word_mode in
23948 builtin_setjmp_setup and builtin_longjmp to support x32.
23949
23950 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23951
23952 PR target/56010
23953 PR target/83743
23954 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23955 #include "opts.h".
23956 (rs6000_supported_cpu_names): New static variable.
23957 (linux_cpu_translation_table): Likewise.
23958 (elf_platform) <cpu>: Define new static variable and use it.
23959 Translate kernel AT_PLATFORM name to canonical name if needed.
23960 Error if platform name is unknown.
23961
23962 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23963
23964 PR target/84089
23965 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23966
23967 2018-02-01 Jeff Law <law@redhat.com>
23968
23969 PR target/84128
23970 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23971 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23972 the scratch if RELEASE_VIA_POP is false.
23973 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23974 If we have to save a temporary register, decrement SIZE appropriately.
23975 Pass new arguments to release_scratch_register_on_entry.
23976 (ix86_adjust_stack_and_probe): Likewise.
23977 (ix86_emit_probe_stack_range): Pass new arguments to
23978 release_scratch_register_on_entry.
23979
23980 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23981
23982 PR rtl-optimization/84157
23983 * combine.c (change_zero_ext): Use REG_P predicate in
23984 front of HARD_REGISTER_P predicate.
23985
23986 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23987
23988 * config/avr/avr.c (avr_option_override): Move disabling of
23989 -fdelete-null-pointer-checks to...
23990 * common/config/avr/avr-common.c (avr_option_optimization_table):
23991 ...here.
23992
23993 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23994
23995 PR tree-optimization/81635
23996 * tree-data-ref.c (split_constant_offset_1): For types that
23997 wrap on overflow, try to use range info to prove that wrapping
23998 cannot occur.
23999
24000 2018-02-01 Renlin Li <renlin.li@arm.com>
24001
24002 PR target/83370
24003 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24004 TAILCALL_ADDR_REGS.
24005 (aarch64_register_move_cost): Likewise.
24006 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24007 TAILCALL_ADDR_REGS.
24008 (REG_CLASS_NAMES): Likewise.
24009 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24010 TAILCALL_ADDR_REGS. Remove IP registers.
24011 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24012
24013 2018-02-01 Richard Biener <rguenther@suse.de>
24014
24015 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24016 for specifying RPO order and allow NULL for that.
24017 * domwalk.c (dom_walker::dom_walker): Likewise.
24018 (dom_walker::walk): Handle NULL RPO order.
24019 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24020 in RPO order.
24021 (rewrite_update_dom_walker): Likewise.
24022 (mark_def_dom_walker): Likewise.
24023
24024 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24025
24026 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24027 (aarch64_maybe_expand_sve_subreg_move): Declare.
24028 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24029 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24030 predicate.
24031 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24032 that are semantically a reverse operation.
24033 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24034 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24035 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24036 functions.
24037 (aarch64_can_change_mode_class): For big-endian, forbid changes
24038 between two SVE modes if they have different element sizes.
24039
24040 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24041
24042 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24043 the TImode handling for big-endian targets.
24044
24045 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24046
24047 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24048 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24049 not just bytes.
24050 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24051 Remove BSWAP handing for big-endian targets and use the form of
24052 LD1RQ appropariate for the mode.
24053
24054 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24055
24056 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24057 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24058 duplicated element.
24059
24060 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24061
24062 PR tearget/83845
24063 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24064 check for operands that need to go through aarch64_sve_reload_be.
24065
24066 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24067
24068 PR tree-optimization/81661
24069 PR tree-optimization/84117
24070 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24071 * tree-eh.c: Include gimplify.h.
24072 (find_trapping_overflow, replace_trapping_overflow,
24073 rewrite_to_non_trapping_overflow): New functions.
24074 * tree-vect-loop.c: Include tree-eh.h.
24075 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24076 * tree-data-ref.c: Include tree-eh.h.
24077 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24078
24079 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24080
24081 PR rtl-optimization/84123
24082 * combine.c (change_zero_ext): Check if hard register satisfies
24083 can_change_dest_mode before calling gen_lowpart_SUBREG.
24084
24085 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24086
24087 PR target/82444
24088 * ira.c (ira_init_register_move_cost): Remove assert.
24089
24090 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24091
24092 PR rtl-optimization/84071
24093 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24094 * doc/tm.texi: Regenerate.
24095
24096 2018-01-31 Richard Biener <rguenther@suse.de>
24097
24098 PR tree-optimization/84132
24099 * tree-data-ref.c (analyze_miv_subscript): Properly
24100 check whether evolution_function_is_affine_multivariate_p
24101 before calling gcd_of_steps_may_divide_p.
24102
24103 2018-01-31 Julia Koval <julia.koval@intel.com>
24104
24105 PR target/83618
24106 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24107 * config/i386/i386.md (rdpid_rex64) New.
24108 (rdpid): Make 32bit only.
24109
24110 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24111
24112 PR lto/84105
24113 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24114 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24115
24116 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24117
24118 Revert
24119 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24120
24121 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24122
24123 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24124
24125 PR rtl-optimization/84071
24126 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24127 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24128
24129 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24130
24131 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24132 (arc_attribute_table): Add 'aux' attribute.
24133 (arc_in_small_data_p): Consider aux like variables.
24134 (arc_is_aux_reg_p): New function.
24135 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24136 (arc_get_aux_arg): New function.
24137 (prepare_move_operands): Handle aux-register access.
24138 (arc_handle_aux_attribute): New function.
24139 * doc/extend.texi (ARC Variable attributes): Add subsection.
24140
24141 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24142
24143 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24144 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24145 (arc_attribute_table): Add 'uncached' attribute.
24146 (arc_print_operand): Print '.di' flag for uncached memory
24147 accesses.
24148 (arc_in_small_data_p): Do not consider for small data the uncached
24149 types.
24150 (arc_is_uncached_mem_p): New function.
24151 * config/arc/predicates.md (compact_store_memory_operand): Check
24152 for uncached memory accesses.
24153 (nonvol_nonimm_operand): Likewise.
24154 * doc/extend.texi (ARC Type Attribute): New subsection.
24155
24156 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24157
24158 PR c/84100
24159 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24160 falign-loops=): Add Optimization flag.
24161
24162 2018-01-30 Jeff Law <law@redhat.com>
24163
24164 PR target/84064
24165 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24166 INT_REGISTERS_SAVED. Check it prior to calling
24167 get_scratch_register_on_entry.
24168 (ix86_adjust_stack_and_probe): Similarly.
24169 (ix86_emit_probe_stack_range): Similarly.
24170 (ix86_expand_prologue): Corresponding changes.
24171
24172 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24173
24174 PR target/40411
24175 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24176 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24177
24178 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24179
24180 PR target/84112
24181 * lra-constraints.c (curr_insn_transform): Process AND in the
24182 address.
24183
24184 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24185
24186 PR rtl-optimization/83986
24187 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24188 dependence against last_pending_memory_flush in addition to
24189 pending_jump_insns.
24190
24191 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24192
24193 PR tree-optimization/81611
24194 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24195 copies.
24196
24197 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24198
24199 PR target/83758
24200 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24201 a reg rtx.
24202
24203 2018-01-30 Richard Biener <rguenther@suse.de>
24204 Jakub Jelinek <jakub@redhat.com>
24205
24206 PR tree-optimization/84111
24207 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24208 inner loops added during recursion, as they don't have up-to-date
24209 SSA form.
24210
24211 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24212
24213 PR ipa/81360
24214 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24215 (can_inline_edge_by_limits_p): ... here.
24216 (can_early_inline_edge_p, check_callers,
24217 update_caller_keys, update_callee_keys, recursive_inlining,
24218 add_new_edges_to_heap, speculation_useful_p,
24219 inline_small_functions,
24220 inline_small_functions, flatten_function,
24221 inline_to_all_callers_1): Update.
24222
24223 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24224
24225 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24226 zeros correctly.
24227
24228 2018-01-30 Richard Biener <rguenther@suse.de>
24229
24230 PR tree-optimization/83008
24231 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24232 invariant and constant vector uses in stmts when they need
24233 more than one stmt.
24234
24235 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24236
24237 PR bootstrap/84017
24238 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24239 * configure: Regenerate.
24240
24241 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24242
24243 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24244 pattern.
24245 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24246 Use gen_rtx_REG rather than gen_lowpart.
24247
24248 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24249
24250 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24251 rather than 0 when creating partial subregs.
24252
24253 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24254
24255 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24256 of usage.
24257
24258 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24259
24260 PR target/81550
24261 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24262 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24263 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24264 flags. This restores the settings used before the 2017-07-24.
24265 Turning off pre increment/decrement/modify allows IVOPTS to
24266 optimize DF/SF loops where the index is an int.
24267
24268 2018-01-29 Richard Biener <rguenther@suse.de>
24269 Kelvin Nilsen <kelvin@gcc.gnu.org>
24270
24271 PR bootstrap/80867
24272 * tree-vect-stmts.c (vectorizable_call): Don't call
24273 targetm.vectorize_builtin_md_vectorized_function if callee is
24274 NULL.
24275
24276 2018-01-22 Carl Love <cel@us.ibm.com>
24277
24278 * doc/extend.tex: Fix typo in second arg in
24279 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24280
24281 2018-01-29 Richard Biener <rguenther@suse.de>
24282
24283 PR tree-optimization/84086
24284 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24285 (flush_ssaname_freelist): When SSA names were released reset
24286 the SCEV hash table.
24287
24288 2018-01-29 Richard Biener <rguenther@suse.de>
24289
24290 PR tree-optimization/84057
24291 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24292 removed paths when removing edges.
24293
24294 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24295
24296 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24297 -mfunction-return=@var{choice}.
24298
24299 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24300
24301 PR diagnostic/84034
24302 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24303 Handle CR like TAB.
24304 (layout::print_source_line): Likewise.
24305 (test_get_line_width_without_trailing_whitespace): Add test cases.
24306
24307 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24308
24309 PR middle-end/84040
24310 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24311 debug insns.
24312
24313 2018-01-26 Jim Wilson <jimw@sifive.com>
24314
24315 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24316
24317 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24318 specified.
24319
24320 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24321
24322 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24323 and CMP + SUB-immediate -> SUBS.
24324
24325 2018-01-26 Martin Sebor <msebor@redhat.com>
24326
24327 PR tree-optimization/83896
24328 * tree-ssa-strlen.c (get_string_len): Rename...
24329 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24330 Avoid assuming length is constant.
24331 (handle_char_store): Use HOST_WIDE_INT for string length.
24332
24333 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24334
24335 PR target/81763
24336 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24337 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24338
24339 2018-01-26 Richard Biener <rguenther@suse.de>
24340
24341 PR rtl-optimization/84003
24342 * dse.c (record_store): Only record redundant stores when
24343 the earlier store aliases at least all accesses the later one does.
24344
24345 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24346
24347 PR rtl-optimization/83985
24348 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24349 REG_CFA_RESTORE insns.
24350 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24351 REG_CFA_RESTORE insns here.
24352
24353 PR c/83989
24354 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24355 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24356
24357 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24358
24359 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24360 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24361 (arc_init): Likewise.
24362 (arc_override_options): Likewise.
24363 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24364 value.
24365 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24366 support.
24367 * config/arc/arc.h (TARGET_DBNZ): Define.
24368 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24369 properly set the tune attribute.
24370 (dbnz): Use TARGET_DBNZ guard.
24371 * config/arc/arc.opt (mtune): Add core3 option.
24372
24373 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24374
24375 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24376 recognize new pic like addresses.
24377 (arc_delegitimize_address): Clean up.
24378
24379 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24380
24381 * config/arc/arc-arches.def: Option mrf16 valid for all
24382 architectures.
24383 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24384 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24385 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24386 * config/arc/arc-tables.opt: Regenerate.
24387 * config/arc/arc.c (arc_conditional_register_usage): Handle
24388 reduced register file case.
24389 (arc_file_start): Set must have build attributes.
24390 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24391 mrf16 option value.
24392 * config/arc/arc.opt (mrf16): Add new option.
24393 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24394 * config/arc/genmultilib.awk: Handle new mrf16 option.
24395 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24396 * config/arc/t-multilib: Regenerate.
24397 * doc/invoke.texi (ARC Options): Document mrf16 option.
24398
24399 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24400
24401 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24402 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24403 (arc_attribute_table): Add 'secure_call' attribute.
24404 (arc_print_operand): Print secure call operand.
24405 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24406 secure.
24407 (arc_is_secure_call_p): New function. * config/arc/arc.md
24408 (call_i): Add support for sjli instruction.
24409 (call_value_i): Likewise.
24410 * config/arc/constraints.md (Csc): New constraint.
24411
24412 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24413 John Eric Martin <John.Martin@emmicro-us.com>
24414
24415 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24416 * config/arc/arc.c (_arc_jli_section): New struct.
24417 (arc_jli_section): New type.
24418 (rc_jli_sections): New static variable.
24419 (arc_handle_jli_attribute): New function.
24420 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24421 (arc_file_end): New function.
24422 (TARGET_ASM_FILE_END): Define.
24423 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24424 (arc_add_jli_section): New function.
24425 (jli_call_scan): Likewise.
24426 (arc_reorg): Call jli_call_scan.
24427 (arc_output_addsi): Remove 'S' from printing asm operand.
24428 (arc_is_jli_call_p): New function.
24429 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24430 operand.
24431 (movhi_insn): Likewise.
24432 (movsi_insn): Likewise.
24433 (movsi_set_cc_insn): Likewise.
24434 (loadqi_update): Likewise.
24435 (load_zeroextendqisi_update): Likewise.
24436 (load_signextendqisi_update): Likewise.
24437 (loadhi_update): Likewise.
24438 (load_zeroextendhisi_update): Likewise.
24439 (load_signextendhisi_update): Likewise.
24440 (loadsi_update): Likewise.
24441 (loadsf_update): Likewise.
24442 (movsicc_insn): Likewise.
24443 (bset_insn): Likewise.
24444 (bxor_insn): Likewise.
24445 (bclr_insn): Likewise.
24446 (bmsk_insn): Likewise.
24447 (bicsi3_insn): Likewise.
24448 (cmpsi_cc_c_insn): Likewise.
24449 (movsi_ne): Likewise.
24450 (movsi_cond_exec): Likewise.
24451 (clrsbsi2): Likewise.
24452 (norm_f): Likewise.
24453 (normw): Likewise.
24454 (swap): Likewise.
24455 (divaw): Likewise.
24456 (flag): Likewise.
24457 (sr): Likewise.
24458 (kflag): Likewise.
24459 (ffs): Likewise.
24460 (ffs_f): Likewise.
24461 (fls): Likewise.
24462 (call_i): Remove 'S' asm letter, add jli instruction.
24463 (call_value_i): Likewise.
24464 * config/arc/arc.op (mjli-always): New option.
24465 * config/arc/constraints.md (Cji): New constraint.
24466 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24467 operand.
24468 (subsf3_fpx): Likewise.
24469 (mulsf3_fpx): Likewise.
24470 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24471 asm operand.
24472 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24473 function attrbutes.
24474 * doc/invoke.texi (ARC): Document mjli-always option.
24475
24476 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24477
24478 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24479 avoid addition with 0 and use incw and decw where possible.
24480
24481 2018-01-26 Richard Biener <rguenther@suse.de>
24482
24483 PR tree-optimization/81082
24484 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24485 association if it requires casting to unsigned.
24486 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24487 from fold_plusminus_mult_expr to catch important cases late when
24488 range info is available.
24489
24490 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24491
24492 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24493 * configure.ac (hidden_linkonce): New test.
24494 * configure: Regenerate.
24495 * config.in: Regenerate.
24496
24497 2018-01-26 Julia Koval <julia.koval@intel.com>
24498
24499 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24500 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24501 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24502 _mm_mask_bitshuffle_epi64_mask): Fix type.
24503 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24504 USI_FTYPE_V4DI_V4DI_USI): Remove.
24505 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24506 __builtin_ia32_vpshufbitqmb256_mask,
24507 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24508 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24509 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24510
24511 2018-01-26 Alan Modra <amodra@gmail.com>
24512
24513 PR target/84033
24514 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24515 UNSPEC_VBPERMQ. Sort other unspecs.
24516
24517 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24518
24519 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24520
24521 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24522
24523 PR middle-end/83055
24524 * predict.c (drop_profile): Do not push/pop cfun; update also
24525 node->count.
24526 (handle_missing_profiles): Fix logic looking for zero profiles.
24527
24528 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24529
24530 PR middle-end/83977
24531 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24532 on functions with #pragma omp declare simd or functions with simd
24533 attribute.
24534 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24535 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24536 Remove trailing \n from warning_at calls.
24537
24538 2018-01-25 Tom de Vries <tom@codesourcery.com>
24539
24540 PR target/84028
24541 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24542 for neutered workers.
24543
24544 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24545
24546 PR target/68467
24547 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24548 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24549
24550 2018-01-24 Jeff Law <law@redhat.com>
24551
24552 PR target/83994
24553 * i386.c (get_probe_interval): Move to earlier point.
24554 (ix86_compute_frame_layout): If -fstack-clash-protection and
24555 the frame is larger than the probe interval, then use pushes
24556 to save registers rather than reg->mem moves.
24557 (ix86_expand_prologue): Remove conditional for int_registers_saved
24558 assertion.
24559
24560 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24561
24562 PR target/84014
24563 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24564 min/max for never referenced object.
24565
24566 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24567
24568 PR middle-end/83977
24569 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24570 here.
24571 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24572 attributes from DECL_ATTRIBUTES (decl) without affecting
24573 DECL_ATTRIBUTES (current_function_decl).
24574 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24575 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24576
24577 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24578
24579 PR tree-optimization/83979
24580 * fold-const.c (fold_comparison): Use constant_boolean_node
24581 instead of boolean_{true,false}_node.
24582
24583 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24584
24585 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24586 with zero counts.
24587
24588 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24589
24590 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24591 Simplify the clause that sets the length attribute.
24592 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24593 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24594 clause that sets the length attribute.
24595 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24596
24597 2018-01-24 Tom de Vries <tom@codesourcery.com>
24598
24599 PR target/83589
24600 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24601 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24602 Add strict parameter.
24603 (prevent_branch_around_nothing): Insert dummy insn between branch to
24604 label and label with no ptx insn inbetween.
24605 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24606
24607 2018-01-24 Tom de Vries <tom@codesourcery.com>
24608
24609 PR target/81352
24610 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24611 for neutered threads in warp.
24612 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24613
24614 2018-01-24 Richard Biener <rguenther@suse.de>
24615
24616 PR tree-optimization/83176
24617 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24618 operands.
24619
24620 2018-01-24 Richard Biener <rguenther@suse.de>
24621
24622 PR tree-optimization/82819
24623 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24624 code generating pluses that are no-ops in the target precision.
24625
24626 2018-01-24 Richard Biener <rguenther@suse.de>
24627
24628 PR middle-end/84000
24629 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24630
24631 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24632
24633 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24634 to merge probabilities.
24635 * predict.c (probably_never_executed): Also mark as cold functions
24636 with global 0 profile and guessed local profile.
24637 * profile-count.c (profile_probability::combine_with_count): New
24638 member function.
24639 * profile-count.h (profile_probability::operator*,
24640 profile_probability::operator*=, profile_probability::operator/,
24641 profile_probability::operator/=): Reduce precision to adjusted
24642 and set value to guessed on contradictory divisions.
24643 (profile_probability::combine_with_freq): Remove.
24644 (profile_probability::combine_wiht_count): Declare.
24645 (profile_count::force_nonzero):: Set to adjusted.
24646 (profile_count::probability_in):: Set quality to adjusted.
24647 * tree-ssa-tail-merge.c (replace_block_by): Use
24648 combine_with_count.
24649
24650 2018-01-23 Andrew Waterman <andrew@sifive.com>
24651 Jim Wilson <jimw@sifive.com>
24652
24653 * config/riscv/riscv.c (riscv_stack_boundary): New.
24654 (riscv_option_override): Set riscv_stack_boundary. Handle
24655 riscv_preferred_stack_boundary_arg.
24656 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24657 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24658 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24659 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24660 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24661 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24662
24663 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24664
24665 PR target/83905
24666 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24667 of struct ix86_frame.
24668 (ix86_expand_epilogue): Likewise. Add a local variable for
24669 the reg_save_offset field in struct ix86_frame.
24670
24671 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24672
24673 PR tree-optimization/82604
24674 * tree-loop-distribution.c (enum partition_kind): New enum item
24675 PKIND_PARTIAL_MEMSET.
24676 (partition_builtin_p): Support above new enum item.
24677 (generate_code_for_partition): Ditto.
24678 (compute_access_range): Differentiate cases that equality can be
24679 proven at all loops, the innermost loops or no loops.
24680 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24681 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24682 (finalize_partitions, distribute_loop): Don't fuse partition of
24683 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24684 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24685 parloop is enabled.
24686
24687 2018-01-23 Martin Liska <mliska@suse.cz>
24688
24689 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24690 order to ignore the predictor.
24691 (PRED_POLYMORPHIC_CALL): Likewise.
24692 (PRED_RECURSIVE_CALL): Likewise.
24693
24694 2018-01-23 Martin Liska <mliska@suse.cz>
24695
24696 * tree-profile.c (tree_profiling): Print function header to
24697 aware reader which function we are working on.
24698 * value-prof.c (gimple_find_values_to_profile): Do not print
24699 not interesting value histograms.
24700
24701 2018-01-23 Martin Liska <mliska@suse.cz>
24702
24703 * profile-count.h (enum profile_quality): Add
24704 profile_uninitialized as the first value. Do not number values
24705 as they are zero based.
24706 (profile_count::verify): Update sanity check.
24707 (profile_probability::verify): Likewise.
24708
24709 2018-01-23 Nathan Sidwell <nathan@acm.org>
24710
24711 * doc/invoke.texi (ffor-scope): Deprecate.
24712
24713 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24714
24715 PR tree-optimization/83510
24716 * domwalk.c (set_all_edges_as_executable): New function.
24717 (dom_walker::dom_walker): Convert bool param
24718 "skip_unreachable_blocks" to enum reachability. Move setup of
24719 edge flags to set_all_edges_as_executable and only do it when
24720 reachability is REACHABLE_BLOCKS.
24721 * domwalk.h (enum dom_walker::reachability): New enum.
24722 (dom_walker::dom_walker): Convert bool param
24723 "skip_unreachable_blocks" to enum reachability.
24724 (set_all_edges_as_executable): New decl.
24725 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24726 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24727 "reachability".
24728 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24729 but converting true to REACHABLE_BLOCKS.
24730 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24731 * tree-vrp.c
24732 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24733 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24734 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24735 REACHABLE_BLOCKS.
24736 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24737 if check_all_array_refs will be called.
24738
24739 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24740
24741 * tree.c (selftest::test_location_wrappers): Add more test
24742 coverage.
24743
24744 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24745
24746 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24747 (selftest::test_bit_in_range): Likewise.
24748
24749 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24750
24751 PR testsuite/83888
24752 * doc/sourcebuild.texi (vect_float): Say that the selector
24753 only describes the situation when -funsafe-math-optimizations is on.
24754 (vect_float_strict): Document.
24755
24756 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24757
24758 PR tree-optimization/83965
24759 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24760 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24761 instead of checking only for a reduction.
24762 (vect_recog_widen_sum_pattern): Likewise.
24763
24764 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24765
24766 * predict.c (probably_never_executed): Only use precise profile info.
24767 (compute_function_frequency): Skip after inlining hack since we now
24768 have quality checking.
24769
24770 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24771
24772 * profile-count.h (profile_probability::very_unlikely,
24773 profile_probability::unlikely, profile_probability::even): Set
24774 precision to guessed.
24775
24776 2018-01-23 Richard Biener <rguenther@suse.de>
24777
24778 PR tree-optimization/83963
24779 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24780 Properly terminate dominator walk when crossing the exit edge not
24781 when visiting its source block.
24782
24783 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24784
24785 PR c++/83918
24786 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24787 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24788
24789 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24790
24791 PR tree-optimization/83957
24792 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24793 semicolon after for body surrounded by braces.
24794
24795 PR tree-optimization/83081
24796 * profile-count.h (profile_probability::split): New method.
24797 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24798 Use profile_probability::split.
24799 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24800 when splitting a single conditional jump into 2.
24801
24802 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24803
24804 PR tree-optimization/69452
24805 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24806 decl.
24807
24808 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24809
24810 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24811 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24812 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24813
24814 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24815
24816 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24817 declaration.
24818 * config/rl78/rl78.md (movdi): New define_expand.
24819 * config/rl78/rl78.c (rl78_split_movdi): New function.
24820
24821 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24822
24823 PR target/83862
24824 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24825 no longer used.
24826 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24827 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24828 128-bit to produce an UNSPEC move to get the double word with the
24829 signbit and then a shift directly to do signbit.
24830 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24831 implementation with a new version that just does either a direct
24832 move or a regular move. Move memory interface to separate insns.
24833 Move insns so they are next to the expander.
24834 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24835 with signbit move. Split big and little endian case.
24836 (signbit<mode>2_dm_mem_le): Likewise.
24837 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24838 (signbit<mode>2_dm2): Likewise.
24839
24840 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24841
24842 * config/rl78/rl78.md (anddi3): New define_expand.
24843
24844 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24845
24846 * config/rl78/rl78.md (umindi3): New define_expand.
24847
24848 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24849
24850 * config/rl78/rl78.md (smindi3): New define_expand.
24851
24852 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24853
24854 * config/rl78/rl78.md (smaxdi3): New define_expand.
24855
24856 2018-01-22 Carl Love <cel@us.ibm.com>
24857
24858 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24859 LVX_V1TI): Add macro expansion.
24860 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24861 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24862 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24863 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24864 Change check to determine if the instruction is a byte reversing
24865 entry. Fix typo in comment.
24866 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24867 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24868 Add def_builtin calls for new builtins.
24869 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24870 Add define_insn expansion.
24871
24872 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24873
24874 * config/rl78/rl78.md (umaxdi3): New define_expand.
24875
24876 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24877
24878 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24879 for non-QImode registers.
24880
24881 2018-01-22 Richard Biener <rguenther@suse.de>
24882
24883 PR tree-optimization/83963
24884 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24885 including the loop exit block.
24886 (scop_detection::merge_sese): Likewise.
24887 (scop_detection::add_scop): Do it here instead.
24888
24889 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24890
24891 * doc/sourcebuild.texi (arm_softfloat): Document.
24892
24893 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24894
24895 PR gcc/77734
24896 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24897 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24898 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24899
24900 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24901 David Edelsohn <dje.gcc@gmail.com>
24902
24903 PR target/83946
24904 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24905 Change "crset eq" to "crset 2".
24906 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24907 (*call_indirect_aix<mode>_nospec): Likewise.
24908 (*call_value_indirect_aix<mode>_nospec): Likewise.
24909 (*call_indirect_elfv2<mode>_nospec): Likewise.
24910 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24911 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24912 change assembly output from . to $.
24913 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24914 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24915 (*tablejump<mode>_internal1_nospec): Likewise.
24916
24917 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24918
24919 PR target/80870
24920 * config/sh/sh_optimize_sett_clrt.cc:
24921 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24922
24923 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24924
24925 PR tree-optimization/83940
24926 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24927 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24928 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24929 use it to pass back the definition type.
24930 (vect_check_store_rhs): Likewise rhs_dt_out.
24931 (vect_build_gather_load_calls): Add a mask_dt argument and use
24932 it instead of a call to vect_is_simple_use.
24933 (vectorizable_store): Update calls to vect_check_load_store_mask
24934 and vect_check_store_rhs. Use the dt returned by the latter instead
24935 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24936 instead of calls to vect_is_simple_use. Pass the scalar rather
24937 than the vector operand to vect_is_simple_use when handling
24938 second and subsequent copies of an rhs value.
24939 (vectorizable_load): Update calls to vect_check_load_store_mask
24940 and vect_build_gather_load_calls. Use the cached mask_dt and
24941 gs_info.offset_dt instead of calls to vect_is_simple_use.
24942
24943 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24944
24945 PR middle-end/83945
24946 * tree-emutls.c: Include gimplify.h.
24947 (lower_emutls_2): New function.
24948 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24949 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24950 it before further processing.
24951
24952 PR target/83930
24953 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24954 UINTVAL (trueop1) instead of INTVAL (op1).
24955
24956 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24957
24958 PR debug/81570
24959 PR debug/83728
24960 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24961 INCOMING_FRAME_SP_OFFSET if not defined.
24962 (scan_trace): Add ENTRY argument. If true and
24963 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24964 emit a note to adjust the CFA offset.
24965 (create_cfi_notes): Adjust scan_trace callers.
24966 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24967 INCOMING_FRAME_SP_OFFSET in the CIE.
24968 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24969 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24970 Likewise.
24971 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24972 * doc/tm.texi: Regenerated.
24973
24974 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24975
24976 PR rtl-optimization/83147
24977 * lra-constraints.c (remove_inheritance_pseudos): Use
24978 lra_substitute_pseudo_within_insn.
24979
24980 2018-01-19 Tom de Vries <tom@codesourcery.com>
24981 Cesar Philippidis <cesar@codesourcery.com>
24982
24983 PR target/83920
24984 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24985
24986 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24987
24988 PR target/83790
24989 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24990 spaces for function labels.
24991
24992 2018-01-19 Martin Liska <mliska@suse.cz>
24993
24994 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24995 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24996 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24997 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24998 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24999 (PRED_CONST_RETURN): Change from 69 to 65.
25000 (PRED_NULL_RETURN): Change from 91 to 71.
25001 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25002 (PRED_LOOP_GUARD): Change from 66 to 73.
25003
25004 2018-01-19 Martin Liska <mliska@suse.cz>
25005
25006 * predict.c (predict_insn_def): Add new assert.
25007 (struct branch_predictor): Change type to signed integer.
25008 (test_prediction_value_range): Amend test to cover
25009 PROB_UNINITIALIZED.
25010 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25011 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25012 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25013 (PRED_LOOP_IV_COMPARE): Likewise.
25014 * predict.h (PROB_UNINITIALIZED): Define new constant.
25015
25016 2018-01-19 Martin Liska <mliska@suse.cz>
25017
25018 * predict.c (dump_prediction): Add new format for
25019 analyze_brprob.py script which is enabled with -details
25020 suboption.
25021 * profile-count.h (precise_p): New function.
25022
25023 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25024
25025 PR tree-optimization/83922
25026 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25027 there are no statements that need masking.
25028 (vect_active_double_reduction_p): New function.
25029 (vect_analyze_loop_operations): Use it when handling phis that
25030 are not in the loop header.
25031
25032 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25033
25034 PR tree-optimization/83914
25035 * tree-vect-loop.c (vectorizable_induction): Don't convert
25036 init_expr or apply the peeling adjustment for inductions
25037 that are nested within the vectorized loop.
25038
25039 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25040
25041 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25042 instead of NEG.
25043
25044 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25045
25046 PR sanitizer/81715
25047 PR testsuite/83882
25048 * function.h (gimplify_parameters): Add gimple_seq * argument.
25049 * function.c: Include gimple.h and options.h.
25050 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25051 for the added local temporaries if needed.
25052 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25053 if there are any parameter cleanups, wrap whole body into a
25054 try/finally with the cleanups.
25055
25056 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25057
25058 PR target/82964
25059 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25060 Use GET_MODE_CLASS for scalar floating point.
25061
25062 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25063
25064 PR ipa/82256
25065 patch by PaX Team
25066 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25067 Fix call of call_cgraph_insertion_hooks.
25068
25069 2018-01-18 Martin Sebor <msebor@redhat.com>
25070
25071 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25072
25073 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25074
25075 PR ipa/83619
25076 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25077 frequencies.
25078
25079 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25080
25081 PR other/70268
25082 * common.opt: (-ffile-prefix-map): New option.
25083 * opts.c (common_handle_option): Defer it.
25084 * opts-global.c (handle_common_deferred_options): Handle it.
25085 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25086 * file-prefix-map.h: New file.
25087 (remap_debug_filename, add_debug_prefix_map): ...here.
25088 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25089 * final.c (debug_prefix_map, add_debug_prefix_map
25090 remap_debug_filename): Move to...
25091 * file-prefix-map.c: New file.
25092 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25093 generalize, get rid of alloca(), use strrchr() instead of strchr().
25094 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25095 Implement in terms of add_prefix_map().
25096 (remap_macro_filename, remap_debug_filename): Implement in term of
25097 remap_filename().
25098 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25099 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25100 * dbxout.c: Include file-prefix-map.h.
25101 * varasm.c: Likewise.
25102 * vmsdbgout.c: Likewise.
25103 * xcoffout.c: Likewise.
25104 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25105 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25106 * doc/invoke.texi (-ffile-prefix-map): Document.
25107 (-fdebug-prefix-map): Update description.
25108
25109 2018-01-18 Martin Liska <mliska@suse.cz>
25110
25111 * config/i386/i386.c (indirect_thunk_name): Document that also
25112 lfence is emitted.
25113 (output_indirect_thunk): Document why both instructions
25114 (pause and lfence) are generated.
25115
25116 2018-01-18 Richard Biener <rguenther@suse.de>
25117
25118 PR tree-optimization/83887
25119 * graphite-scop-detection.c
25120 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25121 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25122 (scop_detection::merge_sese): Re-implement with a flood-fill
25123 algorithm that properly finds a SESE region if it exists.
25124
25125 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25126
25127 PR c/61240
25128 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25129 pointer_diff optimizations use view_convert instead of convert.
25130
25131 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25132
25133 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25134 Generate different code for -mno-speculate-indirect-jumps.
25135 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25136 (*call_indirect_aix<mode>): Disable for
25137 -mno-speculate-indirect-jumps.
25138 (*call_indirect_aix<mode>_nospec): New define_insn.
25139 (*call_value_indirect_aix<mode>): Disable for
25140 -mno-speculate-indirect-jumps.
25141 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25142 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25143 -mno-speculate-indirect-jumps.
25144 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25145
25146 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25147
25148 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25149 long double type, set the flags for noting the default long double
25150 type, even if we don't pass or return a long double type.
25151
25152 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25153
25154 PR ipa/83051
25155 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25156 failure.
25157
25158 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25159
25160 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25161 support for merge[hl].
25162 (fold_mergehl_helper): New helper function.
25163 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25164 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25165 (altivec_vmrglw_direct): Add xxmrglw insn.
25166
25167 2018-01-17 Andrew Waterman <andrew@sifive.com>
25168
25169 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25170 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25171
25172 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25173
25174 PR lto/83121
25175 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25176 call the lto_location_cache before reading the
25177 DECL_SOURCE_LOCATION of the types.
25178
25179 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25180 Richard Sandiford <richard.sandiford@linaro.org>
25181
25182 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25183 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25184 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25185 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25186 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25187 Add declaration.
25188 * config/aarch64/constraints.md (aarch64_movti_operand):
25189 Limit immediates.
25190 * config/aarch64/predicates.md (Uti): Add new constraint.
25191
25192 2018-01-17 Carl Love <cel@us.ibm.com>
25193
25194 * config/rs6000/vsx.md (define_expand xl_len_r,
25195 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25196 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25197 lxvll.
25198 (define_expand, define_insn): Move the shift left from the
25199 define_insn to the define_expand for lxvl and stxvl instructions.
25200 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25201 and XL_LEN_R definitions to PURE.
25202
25203 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25204
25205 * config/i386/i386.c (indirect_thunk_name): Declare regno
25206 as unsigned int. Compare regno with INVALID_REGNUM.
25207 (output_indirect_thunk): Ditto.
25208 (output_indirect_thunk_function): Ditto.
25209 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25210 in the call to output_indirect_thunk_function.
25211
25212 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25213
25214 PR middle-end/83884
25215 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25216 rather than the size of inner_type to determine the stack slot size
25217 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25218
25219 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25220
25221 PR target/83546
25222 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25223 to PTA_SILVERMONT.
25224
25225 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25226
25227 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25228 endian Linux systems to optionally enable multilibs for selecting
25229 the long double type if the user configured an explicit type.
25230 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25231 have no long double multilibs if not defined.
25232 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25233 warn if the user used -mabi={ieee,ibm}longdouble and we built
25234 multilibs for long double.
25235 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25236 appropriate multilib option.
25237 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25238 multilib options.
25239 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25240 for building long double multilibs.
25241 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25242
25243 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25244
25245 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25246 copies.
25247
25248 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25249 64 bits.
25250 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25251 128 bits.
25252
25253 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25254 variables.
25255
25256 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25257 return value.
25258
25259 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25260
25261 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25262 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25263
25264 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25265
25266 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25267 different rtl trees depending on TARGET_64BIT.
25268 (rs6000_gen_lvx): Likewise.
25269
25270 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25271
25272 * config/visium/visium.md (nop): Tweak comment.
25273 (hazard_nop): Likewise.
25274
25275 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25276
25277 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25278 -mspeculate-indirect-jumps.
25279 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25280 for -mno-speculate-indirect-jumps.
25281 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25282 (*call_value_indirect_elfv2<mode>): Disable for
25283 -mno-speculate-indirect-jumps.
25284 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25285 (indirect_jump): Emit different RTL for
25286 -mno-speculate-indirect-jumps.
25287 (*indirect_jump<mode>): Disable for
25288 -mno-speculate-indirect-jumps.
25289 (*indirect_jump<mode>_nospec): New define_insn.
25290 (tablejump): Emit different RTL for
25291 -mno-speculate-indirect-jumps.
25292 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25293 (tablejumpsi_nospec): New define_expand.
25294 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25295 (tablejumpdi_nospec): New define_expand.
25296 (*tablejump<mode>_internal1): Disable for
25297 -mno-speculate-indirect-jumps.
25298 (*tablejump<mode>_internal1_nospec): New define_insn.
25299 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25300 option.
25301
25302 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25303
25304 * caller-save.c (insert_save): Drop unnecessary parameter. All
25305 callers updated.
25306
25307 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25308 Richard Biener <rguenth@suse.de>
25309
25310 PR libgomp/83590
25311 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25312 return early, inline manually is_gimple_sizepos. Make sure if we
25313 call gimplify_expr we don't end up with a gimple constant.
25314 * tree.c (variably_modified_type_p): Don't return true for
25315 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25316 * gimplify.h (is_gimple_sizepos): Remove.
25317
25318 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25319
25320 PR tree-optimization/83857
25321 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25322 vectorizable_live_operation for pure SLP statements.
25323 (vectorizable_live_operation): Handle PHIs.
25324
25325 2018-01-16 Richard Biener <rguenther@suse.de>
25326
25327 PR tree-optimization/83867
25328 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25329 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25330
25331 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25332
25333 PR c/83844
25334 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25335 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25336 If off is not INTEGER_CST, issue a may not be aligned warning
25337 rather than isn't aligned. Use isn%'t rather than isn't.
25338 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25339 into MULT_EXPR.
25340 <case MULT_EXPR>: Improve the case when bottom and one of the
25341 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25342 operand, in that case check if the other operand is multiple of
25343 bottom divided by the INTEGER_CST operand.
25344
25345 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25346
25347 PR target/83858
25348 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25349 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25350 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25351 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25352 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25353 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25354 (pa_function_arg_size): New function.
25355
25356 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25357
25358 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25359 in a separate statement.
25360
25361 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25362
25363 PR tree-optimization/83847
25364 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25365 group gathers and scatters.
25366
25367 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25368
25369 PR rtl-optimization/86620
25370 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25371
25372 PR rtl-optimization/83213
25373 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25374 to last if both are JUMP_INSNs.
25375
25376 PR tree-optimization/83843
25377 * gimple-ssa-store-merging.c
25378 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25379 store_immediate_info for bswap/nop orig_stores.
25380
25381 2018-01-15 Andrew Waterman <andrew@sifive.com>
25382
25383 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25384 !TARGET_MUL.
25385 <UDIV>: Increase cost if !TARGET_DIV.
25386
25387 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25388
25389 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25390 (define_attr "cr_logical_3op"): New.
25391 (cceq_ior_compare): Adjust.
25392 (cceq_ior_compare_complement): Adjust.
25393 (*cceq_rev_compare): Adjust.
25394 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25395 (is_cracked_insn): Adjust.
25396 (insn_must_be_first_in_group): Adjust.
25397 * config/rs6000/40x.md: Adjust.
25398 * config/rs6000/440.md: Adjust.
25399 * config/rs6000/476.md: Adjust.
25400 * config/rs6000/601.md: Adjust.
25401 * config/rs6000/603.md: Adjust.
25402 * config/rs6000/6xx.md: Adjust.
25403 * config/rs6000/7450.md: Adjust.
25404 * config/rs6000/7xx.md: Adjust.
25405 * config/rs6000/8540.md: Adjust.
25406 * config/rs6000/cell.md: Adjust.
25407 * config/rs6000/e300c2c3.md: Adjust.
25408 * config/rs6000/e500mc.md: Adjust.
25409 * config/rs6000/e500mc64.md: Adjust.
25410 * config/rs6000/e5500.md: Adjust.
25411 * config/rs6000/e6500.md: Adjust.
25412 * config/rs6000/mpc.md: Adjust.
25413 * config/rs6000/power4.md: Adjust.
25414 * config/rs6000/power5.md: Adjust.
25415 * config/rs6000/power6.md: Adjust.
25416 * config/rs6000/power7.md: Adjust.
25417 * config/rs6000/power8.md: Adjust.
25418 * config/rs6000/power9.md: Adjust.
25419 * config/rs6000/rs64.md: Adjust.
25420 * config/rs6000/titan.md: Adjust.
25421
25422 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25423
25424 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25425 ix86_indirect_branch_register logic.
25426
25427 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25428
25429 * config/i386/constraints.md (Bs): Update
25430 ix86_indirect_branch_register check. Don't check
25431 ix86_indirect_branch_register with GOT_memory_operand.
25432 (Bw): Likewise.
25433 * config/i386/predicates.md (GOT_memory_operand): Don't check
25434 ix86_indirect_branch_register here.
25435 (GOT32_symbol_operand): Likewise.
25436
25437 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25438
25439 * config/i386/predicates.md (constant_call_address_operand):
25440 Rewrite ix86_indirect_branch_register logic.
25441 (sibcall_insn_operand): Likewise.
25442
25443 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25444
25445 * config/i386/constraints.md (Bs): Replace
25446 ix86_indirect_branch_thunk_register with
25447 ix86_indirect_branch_register.
25448 (Bw): Likewise.
25449 * config/i386/i386.md (indirect_jump): Likewise.
25450 (tablejump): Likewise.
25451 (*sibcall_memory): Likewise.
25452 (*sibcall_value_memory): Likewise.
25453 Peepholes of indirect call and jump via memory: Likewise.
25454 * config/i386/i386.opt: Likewise.
25455 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25456 (GOT_memory_operand): Likewise.
25457 (call_insn_operand): Likewise.
25458 (sibcall_insn_operand): Likewise.
25459 (GOT32_symbol_operand): Likewise.
25460
25461 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25462
25463 PR middle-end/83837
25464 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25465 type rather than type addr's type points to.
25466 (expand_omp_atomic_mutex): Likewise.
25467 (expand_omp_atomic): Likewise.
25468
25469 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25470
25471 PR target/83839
25472 * config/i386/i386.c (output_indirect_thunk_function): Use
25473 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25474 for __x86_return_thunk.
25475
25476 2018-01-15 Richard Biener <rguenther@suse.de>
25477
25478 PR middle-end/83850
25479 * expmed.c (extract_bit_field_1): Fix typo.
25480
25481 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25482
25483 PR target/83687
25484 * config/arm/iterators.md (VF): New mode iterator.
25485 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25486 Remove integer-related logic from pattern.
25487 (neon_vabd<mode>_3): Likewise.
25488
25489 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25490
25491 PR middle-end/82694
25492 * common.opt (fstrict-overflow): No longer an alias.
25493 (fwrapv-pointer): New option.
25494 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25495 also for pointer types based on flag_wrapv_pointer.
25496 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25497 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25498 opts->x_flag_wrapv got set.
25499 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25500 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25501 POINTER_TYPE_OVERFLOW_UNDEFINED.
25502 * match.pd: Likewise in address comparison pattern.
25503 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25504
25505 2018-01-15 Richard Biener <rguenther@suse.de>
25506
25507 PR lto/83804
25508 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25509 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25510 Reset type names to their identifier if their TYPE_DECL doesn't
25511 have linkage (and thus is used for ODR and devirt).
25512 (save_debug_info_for_decl): Remove.
25513 (save_debug_info_for_type): Likewise.
25514 (add_tree_to_fld_list): Adjust.
25515 * tree-pretty-print.c (dump_generic_node): Make dumping of
25516 type names more robust.
25517
25518 2018-01-15 Richard Biener <rguenther@suse.de>
25519
25520 * BASE-VER: Bump to 8.0.1.
25521
25522 2018-01-14 Martin Sebor <msebor@redhat.com>
25523
25524 PR other/83508
25525 * builtins.c (check_access): Avoid warning when the no-warning bit
25526 is set.
25527
25528 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25529
25530 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25531 * ira-color (allocno_hard_regs_compare): Likewise.
25532
25533 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25534
25535 PR target/83013
25536 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25537 Use .pushsection/.popsection.
25538
25539 2018-01-14 Martin Sebor <msebor@redhat.com>
25540
25541 PR c++/81327
25542 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25543
25544 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25545
25546 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25547 entry from extra_headers.
25548 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25549 extra_headers, make the list bitwise identical to the i?86-*-* one.
25550
25551 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25552
25553 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25554 -mcmodel=large with -mindirect-branch=thunk,
25555 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25556 -mfunction-return=thunk-extern.
25557 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25558 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25559 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25560
25561 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25562
25563 * config/i386/i386.c (print_reg): Print the name of the full
25564 integer register without '%'.
25565 (ix86_print_operand): Handle 'V'.
25566 * doc/extend.texi: Document 'V' modifier.
25567
25568 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25569
25570 * config/i386/constraints.md (Bs): Disallow memory operand for
25571 -mindirect-branch-register.
25572 (Bw): Likewise.
25573 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25574 (GOT_memory_operand): Likewise.
25575 (call_insn_operand): Likewise.
25576 (sibcall_insn_operand): Likewise.
25577 (GOT32_symbol_operand): Likewise.
25578 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25579 for -mindirect-branch-register.
25580 (tablejump): Likewise.
25581 (*sibcall_memory): Likewise.
25582 (*sibcall_value_memory): Likewise.
25583 Disallow peepholes of indirect call and jump via memory for
25584 -mindirect-branch-register.
25585 (*call_pop): Replace m with Bw.
25586 (*call_value_pop): Likewise.
25587 (*sibcall_pop_memory): Replace m with Bs.
25588 * config/i386/i386.opt (mindirect-branch-register): New option.
25589 * doc/invoke.texi: Document -mindirect-branch-register option.
25590
25591 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25592
25593 * config/i386/i386-protos.h (ix86_output_function_return): New.
25594 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25595 set function_return_type.
25596 (indirect_thunk_name): Add ret_p to indicate thunk for function
25597 return.
25598 (output_indirect_thunk_function): Pass false to
25599 indirect_thunk_name.
25600 (ix86_output_indirect_branch_via_reg): Likewise.
25601 (ix86_output_indirect_branch_via_push): Likewise.
25602 (output_indirect_thunk_function): Create alias for function
25603 return thunk if regno < 0.
25604 (ix86_output_function_return): New function.
25605 (ix86_handle_fndecl_attribute): Handle function_return.
25606 (ix86_attribute_table): Add function_return.
25607 * config/i386/i386.h (machine_function): Add
25608 function_return_type.
25609 * config/i386/i386.md (simple_return_internal): Use
25610 ix86_output_function_return.
25611 (simple_return_internal_long): Likewise.
25612 * config/i386/i386.opt (mfunction-return=): New option.
25613 (indirect_branch): Mention -mfunction-return=.
25614 * doc/extend.texi: Document function_return function attribute.
25615 * doc/invoke.texi: Document -mfunction-return= option.
25616
25617 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25618
25619 * config/i386/i386-opts.h (indirect_branch): New.
25620 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25621 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25622 with local indirect jump when converting indirect call and jump.
25623 (ix86_set_indirect_branch_type): New.
25624 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25625 (indirectlabelno): New.
25626 (indirect_thunk_needed): Likewise.
25627 (indirect_thunk_bnd_needed): Likewise.
25628 (indirect_thunks_used): Likewise.
25629 (indirect_thunks_bnd_used): Likewise.
25630 (INDIRECT_LABEL): Likewise.
25631 (indirect_thunk_name): Likewise.
25632 (output_indirect_thunk): Likewise.
25633 (output_indirect_thunk_function): Likewise.
25634 (ix86_output_indirect_branch_via_reg): Likewise.
25635 (ix86_output_indirect_branch_via_push): Likewise.
25636 (ix86_output_indirect_branch): Likewise.
25637 (ix86_output_indirect_jmp): Likewise.
25638 (ix86_code_end): Call output_indirect_thunk_function if needed.
25639 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25640 needed.
25641 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25642 (ix86_attribute_table): Add indirect_branch.
25643 * config/i386/i386.h (machine_function): Add indirect_branch_type
25644 and has_local_indirect_jump.
25645 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25646 to true.
25647 (tablejump): Likewise.
25648 (*indirect_jump): Use ix86_output_indirect_jmp.
25649 (*tablejump_1): Likewise.
25650 (simple_return_indirect_internal): Likewise.
25651 * config/i386/i386.opt (mindirect-branch=): New option.
25652 (indirect_branch): New.
25653 (keep): Likewise.
25654 (thunk): Likewise.
25655 (thunk-inline): Likewise.
25656 (thunk-extern): Likewise.
25657 * doc/extend.texi: Document indirect_branch function attribute.
25658 * doc/invoke.texi: Document -mindirect-branch= option.
25659
25660 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25661
25662 PR ipa/83051
25663 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25664
25665 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25666
25667 * ipa-inline.c (want_inline_small_function_p): Return false if
25668 inlining has already failed with CIF_FINAL_ERROR.
25669 (update_caller_keys): Call want_inline_small_function_p before
25670 can_inline_edge_p.
25671 (update_callee_keys): Likewise.
25672
25673 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25674
25675 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25676 New function.
25677 (rs6000_quadword_masked_address_p): Likewise.
25678 (quad_aligned_load_p): Likewise.
25679 (quad_aligned_store_p): Likewise.
25680 (const_load_sequence_p): Add comment to describe the outer-most loop.
25681 (mimic_memory_attributes_and_flags): New function.
25682 (rs6000_gen_stvx): Likewise.
25683 (replace_swapped_aligned_store): Likewise.
25684 (rs6000_gen_lvx): Likewise.
25685 (replace_swapped_aligned_load): Likewise.
25686 (replace_swapped_load_constant): Capitalize argument name in
25687 comment describing this function.
25688 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25689 and stores that access quad-word aligned addresses and replace
25690 with stvx or lvx instructions when appropriate.
25691 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25692 New function prototype.
25693 (rs6000_quadword_masked_address_p): Likewise.
25694 (rs6000_gen_lvx): Likewise.
25695 (rs6000_gen_stvx): Likewise.
25696 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25697 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25698 when memory address is aligned.
25699 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25700 this split to select lvx instruction when memory address is aligned.
25701 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25702 instruction when memory address is aligned.
25703 (*vsx_le_perm_load_v16qi): Likewise.
25704 (four unnamed splitters): Modify to select the stvx instruction
25705 when memory is aligned.
25706
25707 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25708
25709 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25710 which appears in the queue multiple times.
25711
25712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25713 Alan Hayward <alan.hayward@arm.com>
25714 David Sherwood <david.sherwood@arm.com>
25715
25716 * tree-vectorizer.h (vec_lower_bound): New structure.
25717 (_loop_vec_info): Add check_nonzero and lower_bounds.
25718 (LOOP_VINFO_CHECK_NONZERO): New macro.
25719 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25720 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25721 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25722 fields. Make seg_len the distance travelled, not including the
25723 access size.
25724 (dr_direction_indicator): Declare.
25725 (dr_zero_step_indicator): Likewise.
25726 (dr_known_forward_stride_p): Likewise.
25727 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25728 tree-ssanames.h.
25729 (runtime_alias_check_p): Allow runtime alias checks with
25730 variable strides.
25731 (operator ==): Compare access_size and align.
25732 (prune_runtime_alias_test_list): Rework for new distinction between
25733 the access_size and seg_len.
25734 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25735 segment lengths.
25736 (get_segment_min_max): New function.
25737 (create_intersect_range_checks): Use it.
25738 (dr_step_indicator): New function.
25739 (dr_direction_indicator): Likewise.
25740 (dr_zero_step_indicator): Likewise.
25741 (dr_known_forward_stride_p): Likewise.
25742 * tree-loop-distribution.c (data_ref_segment_size): Return
25743 DR_STEP * (niters - 1).
25744 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25745 constructor.
25746 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25747 (vect_preserves_scalar_order_p): New function, split out from...
25748 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25749 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25750 (vect_vfa_access_size): New function.
25751 (vect_vfa_align): Likewise.
25752 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25753 (dump_lower_bound): New function.
25754 (vect_check_lower_bound): Likewise.
25755 (vect_small_gap_p): Likewise.
25756 (vectorizable_with_step_bound_p): Likewise.
25757 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25758 depencies if the vectorization factor is 1. Convert the checks
25759 for nonzero steps into checks on the bounds of DR_STEP. Try using
25760 a bunds check for variable steps if the minimum required step is
25761 relatively small. Update calls to the dr_with_seg_len
25762 constructor and to vect_compile_time_alias.
25763 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25764 function.
25765 (vect_loop_versioning): Call it.
25766 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25767 when retrying.
25768 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25769
25770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25771 Alan Hayward <alan.hayward@arm.com>
25772 David Sherwood <david.sherwood@arm.com>
25773
25774 * doc/sourcebuild.texi (vect_scatter_store): Document.
25775 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25776 optabs.
25777 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25778 Document.
25779 * genopinit.c (main): Add supports_vec_scatter_store and
25780 supports_vec_scatter_store_cached to target_optabs.
25781 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25782 IFN_MASK_SCATTER_STORE.
25783 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25784 functions.
25785 * internal-fn.h (internal_store_fn_p): Declare.
25786 (internal_fn_stored_value_index): Likewise.
25787 * internal-fn.c (scatter_store_direct): New macro.
25788 (expand_scatter_store_optab_fn): New function.
25789 (direct_scatter_store_optab_supported_p): New macro.
25790 (internal_store_fn_p): New function.
25791 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25792 IFN_MASK_SCATTER_STORE.
25793 (internal_fn_mask_index): Likewise.
25794 (internal_fn_stored_value_index): New function.
25795 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25796 for scatter stores.
25797 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25798 * optabs-query.c (supports_vec_scatter_store_p): New function.
25799 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25800 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25801 true for scatter stores.
25802 (vect_gather_scatter_fn_p): Handle scatter stores too.
25803 (vect_check_gather_scatter): Consider using scatter stores if
25804 supports_vec_scatter_store_p.
25805 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25806 scatter stores too.
25807 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25808 internal_fn_stored_value_index.
25809 (check_load_store_masking): Handle scatter stores too.
25810 (vect_get_store_rhs): Make public.
25811 (vectorizable_call): Use internal_store_fn_p.
25812 (vectorizable_store): Handle scatter store internal functions.
25813 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25814 when deciding whether the end of the group has been reached.
25815 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25816 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25817 (mask_scatter_store<mode>): New insns.
25818
25819 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25820 Alan Hayward <alan.hayward@arm.com>
25821 David Sherwood <david.sherwood@arm.com>
25822
25823 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25824 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25825 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25826 function.
25827 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25828 Use vect_truncate_gather_scatter_offset if we can't treat the
25829 operation as a normal gather load or scatter store.
25830 (get_group_load_store_type): Take the gather_scatter_info
25831 as argument. Try using a gather load or scatter store for
25832 single-element groups.
25833 (get_load_store_type): Update calls to get_group_load_store_type
25834 and vect_use_strided_gather_scatters_p.
25835
25836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25837 Alan Hayward <alan.hayward@arm.com>
25838 David Sherwood <david.sherwood@arm.com>
25839
25840 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25841 optional tree argument.
25842 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25843 null target hooks.
25844 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25845 but continue to use the current value as a fallback.
25846 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25847 to compare the updates.
25848 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25849 (get_load_store_type): Use it when handling a strided access.
25850 (vect_get_strided_load_store_ops): New function.
25851 (vect_get_data_ptr_increment): Likewise.
25852 (vectorizable_load): Handle strided gather loads. Always pass
25853 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25854
25855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25856 Alan Hayward <alan.hayward@arm.com>
25857 David Sherwood <david.sherwood@arm.com>
25858
25859 * doc/md.texi (gather_load@var{m}): Document.
25860 (mask_gather_load@var{m}): Likewise.
25861 * genopinit.c (main): Add supports_vec_gather_load and
25862 supports_vec_gather_load_cached to target_optabs.
25863 * optabs-tree.c (init_tree_optimization_optabs): Use
25864 ggc_cleared_alloc to allocate target_optabs.
25865 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25866 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25867 functions.
25868 * internal-fn.h (internal_load_fn_p): Declare.
25869 (internal_gather_scatter_fn_p): Likewise.
25870 (internal_fn_mask_index): Likewise.
25871 (internal_gather_scatter_fn_supported_p): Likewise.
25872 * internal-fn.c (gather_load_direct): New macro.
25873 (expand_gather_load_optab_fn): New function.
25874 (direct_gather_load_optab_supported_p): New macro.
25875 (direct_internal_fn_optab): New function.
25876 (internal_load_fn_p): Likewise.
25877 (internal_gather_scatter_fn_p): Likewise.
25878 (internal_fn_mask_index): Likewise.
25879 (internal_gather_scatter_fn_supported_p): Likewise.
25880 * optabs-query.c (supports_at_least_one_mode_p): New function.
25881 (supports_vec_gather_load_p): Likewise.
25882 * optabs-query.h (supports_vec_gather_load_p): Declare.
25883 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25884 and memory_type field.
25885 (NUM_PATTERNS): Bump to 15.
25886 * tree-vect-data-refs.c: Include internal-fn.h.
25887 (vect_gather_scatter_fn_p): New function.
25888 (vect_describe_gather_scatter_call): Likewise.
25889 (vect_check_gather_scatter): Try using internal functions for
25890 gather loads. Recognize existing calls to a gather load function.
25891 (vect_analyze_data_refs): Consider using gather loads if
25892 supports_vec_gather_load_p.
25893 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25894 (vect_get_gather_scatter_offset_type): Likewise.
25895 (vect_convert_mask_for_vectype): Likewise.
25896 (vect_add_conversion_to_patterm): Likewise.
25897 (vect_try_gather_scatter_pattern): Likewise.
25898 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25899 (vect_vect_recog_func_ptrs): Add it.
25900 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25901 internal_fn_mask_index and internal_gather_scatter_fn_p.
25902 (check_load_store_masking): Take the gather_scatter_info as an
25903 argument and handle gather loads.
25904 (vect_get_gather_scatter_ops): New function.
25905 (vectorizable_call): Check internal_load_fn_p.
25906 (vectorizable_load): Likewise. Handle gather load internal
25907 functions.
25908 (vectorizable_store): Update call to check_load_store_masking.
25909 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25910 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25911 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25912 (aarch64_gather_scale_operand_d): New predicates.
25913 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25914 (mask_gather_load<mode>): New insns.
25915
25916 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25917 Alan Hayward <alan.hayward@arm.com>
25918 David Sherwood <david.sherwood@arm.com>
25919
25920 * optabs.def (fold_left_plus_optab): New optab.
25921 * doc/md.texi (fold_left_plus_@var{m}): Document.
25922 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25923 * internal-fn.c (fold_left_direct): Define.
25924 (expand_fold_left_optab_fn): Likewise.
25925 (direct_fold_left_optab_supported_p): Likewise.
25926 * fold-const-call.c (fold_const_fold_left): New function.
25927 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25928 * tree-parloops.c (valid_reduction_p): New function.
25929 (gather_scalar_reductions): Use it.
25930 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25931 (vect_finish_replace_stmt): Declare.
25932 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25933 (needs_fold_left_reduction_p): New function, split out from...
25934 (vect_is_simple_reduction): ...here. Accept reductions that
25935 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25936 (vect_force_simple_reduction): Also store the reduction type in
25937 the assignment's STMT_VINFO_REDUC_TYPE.
25938 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25939 (merge_with_identity): New function.
25940 (vect_expand_fold_left): Likewise.
25941 (vectorize_fold_left_reduction): Likewise.
25942 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25943 scalar phi in place for it. Check for target support and reject
25944 cases that would reassociate the operation. Defer the transform
25945 phase to vectorize_fold_left_reduction.
25946 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25947 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25948 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25949
25950 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25951
25952 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25953 call to ifc_temp_var.
25954
25955 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25956 Alan Hayward <alan.hayward@arm.com>
25957 David Sherwood <david.sherwood@arm.com>
25958
25959 * target.def (legitimize_address_displacement): Take the original
25960 offset as a poly_int.
25961 * targhooks.h (default_legitimize_address_displacement): Update
25962 accordingly.
25963 * targhooks.c (default_legitimize_address_displacement): Likewise.
25964 * doc/tm.texi: Regenerate.
25965 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25966 as an argument, moving assert of ad->disp == ad->disp_term to...
25967 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25968 Try calling targetm.legitimize_address_displacement before expanding
25969 the address rather than afterwards, and adjust for the new interface.
25970 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25971 Match the new hook interface. Handle SVE addresses.
25972 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25973 new hook interface.
25974
25975 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25976
25977 * Makefile.in (OBJS): Add early-remat.o.
25978 * target.def (select_early_remat_modes): New hook.
25979 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25980 * doc/tm.texi: Regenerate.
25981 * targhooks.h (default_select_early_remat_modes): Declare.
25982 * targhooks.c (default_select_early_remat_modes): New function.
25983 * timevar.def (TV_EARLY_REMAT): New timevar.
25984 * passes.def (pass_early_remat): New pass.
25985 * tree-pass.h (make_pass_early_remat): Declare.
25986 * early-remat.c: New file.
25987 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25988 function.
25989 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25990
25991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25992 Alan Hayward <alan.hayward@arm.com>
25993 David Sherwood <david.sherwood@arm.com>
25994
25995 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25996 vfm1 with a bound_epilog parameter.
25997 (vect_do_peeling): Update calls accordingly, and move the prologue
25998 call earlier in the function. Treat the base bound_epilog as 0 for
25999 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26000 this base when peeling for gaps.
26001 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26002 with fully-masked loops.
26003 (vect_estimate_min_profitable_iters): Handle the single peeled
26004 iteration in that case.
26005
26006 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26007 Alan Hayward <alan.hayward@arm.com>
26008 David Sherwood <david.sherwood@arm.com>
26009
26010 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26011 single-element interleaving even if the size is not a power of 2.
26012 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26013 accesses for single-element interleaving if the group size is
26014 not a power of 2.
26015
26016 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26017 Alan Hayward <alan.hayward@arm.com>
26018 David Sherwood <david.sherwood@arm.com>
26019
26020 * doc/md.texi (fold_extract_last_@var{m}): Document.
26021 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26022 * optabs.def (fold_extract_last_optab): New optab.
26023 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26024 * internal-fn.c (fold_extract_direct): New macro.
26025 (expand_fold_extract_optab_fn): Likewise.
26026 (direct_fold_extract_optab_supported_p): Likewise.
26027 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26028 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26029 EXTRACT_LAST_REDUCTION.
26030 (get_initial_def_for_reduction): Do not create an initial vector
26031 for EXTRACT_LAST_REDUCTION reductions.
26032 (vectorizable_reduction): Leave the scalar phi in place for
26033 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26034 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26035 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26036 transform phase to vectorizable_condition.
26037 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26038 split out from...
26039 (vect_finish_stmt_generation): ...here.
26040 (vect_finish_replace_stmt): New function.
26041 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26042 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26043 pattern.
26044 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26045
26046 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26047 Alan Hayward <alan.hayward@arm.com>
26048 David Sherwood <david.sherwood@arm.com>
26049
26050 * doc/md.texi (extract_last_@var{m}): Document.
26051 * optabs.def (extract_last_optab): New optab.
26052 * internal-fn.def (EXTRACT_LAST): New internal function.
26053 * internal-fn.c (cond_unary_direct): New macro.
26054 (expand_cond_unary_optab_fn): Likewise.
26055 (direct_cond_unary_optab_supported_p): Likewise.
26056 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26057 loops using EXTRACT_LAST.
26058 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26059 (extract_last_<mode>): ...this optab.
26060 (vec_extract<mode><Vel>): Update accordingly.
26061
26062 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26063 Alan Hayward <alan.hayward@arm.com>
26064 David Sherwood <david.sherwood@arm.com>
26065
26066 * target.def (empty_mask_is_expensive): New hook.
26067 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26068 * doc/tm.texi: Regenerate.
26069 * targhooks.h (default_empty_mask_is_expensive): Declare.
26070 * targhooks.c (default_empty_mask_is_expensive): New function.
26071 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26072 if the target says that empty masks are expensive.
26073 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26074 New function.
26075 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26076
26077 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26078 Alan Hayward <alan.hayward@arm.com>
26079 David Sherwood <david.sherwood@arm.com>
26080
26081 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26082 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26083 (vect_use_loop_mask_for_alignment_p): New function.
26084 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26085 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26086 niters_skip argument. Make sure that the first niters_skip elements
26087 of the first iteration are inactive.
26088 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26089 Update call to vect_set_loop_masks_directly.
26090 (get_misalign_in_elems): New function, split out from...
26091 (vect_gen_prolog_loop_niters): ...here.
26092 (vect_update_init_of_dr): Take a code argument that specifies whether
26093 the adjustment should be added or subtracted.
26094 (vect_update_init_of_drs): Likewise.
26095 (vect_prepare_for_masked_peels): New function.
26096 (vect_do_peeling): Skip prologue peeling if we're using a mask
26097 instead. Update call to vect_update_inits_of_drs.
26098 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26099 mask_skip_niters.
26100 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26101 alignment. Do not include the number of peeled iterations in
26102 the minimum threshold in that case.
26103 (vectorizable_induction): Adjust the start value down by
26104 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26105 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26106 Take the number of skipped iterations into account when calculating
26107 the loop bounds.
26108 * tree-vect-stmts.c (vect_gen_while_not): New function.
26109
26110 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26111 Alan Hayward <alan.hayward@arm.com>
26112 David Sherwood <david.sherwood@arm.com>
26113
26114 * doc/sourcebuild.texi (vect_fully_masked): Document.
26115 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26116 default value to 0.
26117 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26118 split out from...
26119 (vect_analyze_loop_2): ...here. Don't check the vectorization
26120 factor against the number of loop iterations if the loop is
26121 fully-masked.
26122
26123 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26124 Alan Hayward <alan.hayward@arm.com>
26125 David Sherwood <david.sherwood@arm.com>
26126
26127 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26128 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26129 (dump_groups): Update accordingly.
26130 (iv_use::mem_type): New member variable.
26131 (address_p): New function.
26132 (record_use): Add a mem_type argument and initialize the new
26133 mem_type field.
26134 (record_group_use): Add a mem_type argument. Use address_p.
26135 Remove obsolete null checks of base_object. Update call to record_use.
26136 (find_interesting_uses_op): Update call to record_group_use.
26137 (find_interesting_uses_cond): Likewise.
26138 (find_interesting_uses_address): Likewise.
26139 (get_mem_type_for_internal_fn): New function.
26140 (find_address_like_use): Likewise.
26141 (find_interesting_uses_stmt): Try find_address_like_use before
26142 calling find_interesting_uses_op.
26143 (addr_offset_valid_p): Use the iv mem_type field as the type
26144 of the addressed memory.
26145 (add_autoinc_candidates): Likewise.
26146 (get_address_cost): Likewise.
26147 (split_small_address_groups_p): Use address_p.
26148 (split_address_groups): Likewise.
26149 (add_iv_candidate_for_use): Likewise.
26150 (autoinc_possible_for_pair): Likewise.
26151 (rewrite_groups): Likewise.
26152 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26153 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26154 (get_alias_ptr_type_for_ptr_address): New function.
26155 (rewrite_use_address): Rewrite address uses in calls that were
26156 identified by find_address_like_use.
26157
26158 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26159 Alan Hayward <alan.hayward@arm.com>
26160 David Sherwood <david.sherwood@arm.com>
26161
26162 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26163 TARGET_MEM_REFs.
26164 * gimple-expr.h (is_gimple_addressable: Likewise.
26165 * gimple-expr.c (is_gimple_address): Likewise.
26166 * internal-fn.c (expand_call_mem_ref): New function.
26167 (expand_mask_load_optab_fn): Use it.
26168 (expand_mask_store_optab_fn): Likewise.
26169
26170 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26171 Alan Hayward <alan.hayward@arm.com>
26172 David Sherwood <david.sherwood@arm.com>
26173
26174 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26175 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26176 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26177 (cond_umax@var{mode}): Document.
26178 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26179 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26180 (cond_umin_optab, cond_umax_optab): New optabs.
26181 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26182 (COND_IOR, COND_XOR): New internal functions.
26183 * internal-fn.h (get_conditional_internal_fn): Declare.
26184 * internal-fn.c (cond_binary_direct): New macro.
26185 (expand_cond_binary_optab_fn): Likewise.
26186 (direct_cond_binary_optab_supported_p): Likewise.
26187 (get_conditional_internal_fn): New function.
26188 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26189 Cope with reduction statements that are vectorized as calls rather
26190 than assignments.
26191 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26192 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26193 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26194 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26195 (UNSPEC_COND_EOR): New unspecs.
26196 (optab): Add mappings for them.
26197 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26198 (sve_int_op, sve_fp_op): New int attributes.
26199
26200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26201 Alan Hayward <alan.hayward@arm.com>
26202 David Sherwood <david.sherwood@arm.com>
26203
26204 * optabs.def (while_ult_optab): New optab.
26205 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26206 * internal-fn.def (WHILE_ULT): New internal function.
26207 * internal-fn.h (direct_internal_fn_supported_p): New override
26208 that takes two types as argument.
26209 * internal-fn.c (while_direct): New macro.
26210 (expand_while_optab_fn): New function.
26211 (convert_optab_supported_p): Likewise.
26212 (direct_while_optab_supported_p): New macro.
26213 * wide-int.h (wi::udiv_ceil): New function.
26214 * tree-vectorizer.h (rgroup_masks): New structure.
26215 (vec_loop_masks): New typedef.
26216 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26217 and fully_masked_p.
26218 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26219 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26220 (vect_max_vf): New function.
26221 (slpeel_make_loop_iterate_ntimes): Delete.
26222 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26223 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26224 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26225 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26226 internal-fn.h, stor-layout.h and optabs-query.h.
26227 (vect_set_loop_mask): New function.
26228 (add_preheader_seq): Likewise.
26229 (add_header_seq): Likewise.
26230 (interleave_supported_p): Likewise.
26231 (vect_maybe_permute_loop_masks): Likewise.
26232 (vect_set_loop_masks_directly): Likewise.
26233 (vect_set_loop_condition_masked): Likewise.
26234 (vect_set_loop_condition_unmasked): New function, split out from
26235 slpeel_make_loop_iterate_ntimes.
26236 (slpeel_make_loop_iterate_ntimes): Rename to..
26237 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26238 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26239 (vect_do_peeling): Update call accordingly.
26240 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26241 loops.
26242 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26243 mask_compare_type, can_fully_mask_p and fully_masked_p.
26244 (release_vec_loop_masks): New function.
26245 (_loop_vec_info): Use it to free the loop masks.
26246 (can_produce_all_loop_masks_p): New function.
26247 (vect_get_max_nscalars_per_iter): Likewise.
26248 (vect_verify_full_masking): Likewise.
26249 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26250 retries, and free the mask rgroups before retrying. Check loop-wide
26251 reasons for disallowing fully-masked loops. Make the final decision
26252 about whether use a fully-masked loop or not.
26253 (vect_estimate_min_profitable_iters): Do not assume that peeling
26254 for the number of iterations will be needed for fully-masked loops.
26255 (vectorizable_reduction): Disable fully-masked loops.
26256 (vectorizable_live_operation): Likewise.
26257 (vect_halve_mask_nunits): New function.
26258 (vect_double_mask_nunits): Likewise.
26259 (vect_record_loop_mask): Likewise.
26260 (vect_get_loop_mask): Likewise.
26261 (vect_transform_loop): Handle the case in which the final loop
26262 iteration might handle a partial vector. Call vect_set_loop_condition
26263 instead of slpeel_make_loop_iterate_ntimes.
26264 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26265 (check_load_store_masking): New function.
26266 (prepare_load_store_mask): Likewise.
26267 (vectorizable_store): Handle fully-masked loops.
26268 (vectorizable_load): Likewise.
26269 (supportable_widening_operation): Use vect_halve_mask_nunits for
26270 booleans.
26271 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26272 (vect_gen_while): New function.
26273 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26274 (aarch64_uqdec<mode>): New insn.
26275
26276 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26277 Alan Hayward <alan.hayward@arm.com>
26278 David Sherwood <david.sherwood@arm.com>
26279
26280 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26281 (reduc_xor_scal_optab): New optabs.
26282 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26283 (reduc_xor_scal_@var{m}): Document.
26284 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26285 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26286 internal functions.
26287 * fold-const-call.c (fold_const_call): Handle them.
26288 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26289 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26290 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26291 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26292 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26293 (UNSPEC_XORV): New unspecs.
26294 (optab): Add entries for them.
26295 (BITWISEV): New int iterator.
26296 (bit_reduc_op): New int attributes.
26297
26298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26299 Alan Hayward <alan.hayward@arm.com>
26300 David Sherwood <david.sherwood@arm.com>
26301
26302 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26303 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26304 * optabs.def (vec_shl_insert_optab): New optab.
26305 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26306 (duplicate_and_interleave): Likewise.
26307 * tree-vect-loop.c: Include internal-fn.h.
26308 (neutral_op_for_slp_reduction): New function, split out from
26309 get_initial_defs_for_reduction.
26310 (get_initial_def_for_reduction): Handle option 2 for variable-length
26311 vectors by loading the neutral value into a vector and then shifting
26312 the initial value into element 0.
26313 (get_initial_defs_for_reduction): Replace the code argument with
26314 the neutral value calculated by neutral_op_for_slp_reduction.
26315 Use gimple_build_vector for constant-length vectors.
26316 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26317 but the first group_size elements have a neutral value.
26318 Use duplicate_and_interleave otherwise.
26319 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26320 Update call to get_initial_defs_for_reduction. Handle SLP
26321 reductions for variable-length vectors by creating one vector
26322 result for each scalar result, with the elements associated
26323 with other scalar results stubbed out with the neutral value.
26324 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26325 Require IFN_VEC_SHL_INSERT for double reductions on
26326 variable-length vectors, or SLP reductions that have
26327 a neutral value. Require can_duplicate_and_interleave_p
26328 support for variable-length unchained SLP reductions if there
26329 is no neutral value, such as for MIN/MAX reductions. Also require
26330 the number of vector elements to be a multiple of the number of
26331 SLP statements when doing variable-length unchained SLP reductions.
26332 Update call to vect_create_epilog_for_reduction.
26333 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26334 and remove initial values.
26335 (duplicate_and_interleave): Make public.
26336 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26337 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26338
26339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26340 Alan Hayward <alan.hayward@arm.com>
26341 David Sherwood <david.sherwood@arm.com>
26342
26343 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26344 (can_duplicate_and_interleave_p): New function.
26345 (vect_get_and_check_slp_defs): Take the vector of statements
26346 rather than just the current one. Remove excess parentheses.
26347 Restriction rejectinon of vect_constant_def and vect_external_def
26348 for variable-length vectors to boolean types, or types for which
26349 can_duplicate_and_interleave_p is false.
26350 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26351 (duplicate_and_interleave): New function.
26352 (vect_get_constant_vectors): Use gimple_build_vector for
26353 constant-length vectors and suitable variable-length constant
26354 vectors. Use duplicate_and_interleave for other variable-length
26355 vectors. Don't defer the update when inserting new statements.
26356
26357 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26358 Alan Hayward <alan.hayward@arm.com>
26359 David Sherwood <david.sherwood@arm.com>
26360
26361 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26362 min_profitable_iters doesn't go negative.
26363
26364 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26365 Alan Hayward <alan.hayward@arm.com>
26366 David Sherwood <david.sherwood@arm.com>
26367
26368 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26369 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26370 * optabs.def (vec_mask_load_lanes_optab): New optab.
26371 (vec_mask_store_lanes_optab): Likewise.
26372 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26373 (MASK_STORE_LANES): Likewise.
26374 * internal-fn.c (mask_load_lanes_direct): New macro.
26375 (mask_store_lanes_direct): Likewise.
26376 (expand_mask_load_optab_fn): Handle masked operations.
26377 (expand_mask_load_lanes_optab_fn): New macro.
26378 (expand_mask_store_optab_fn): Handle masked operations.
26379 (expand_mask_store_lanes_optab_fn): New macro.
26380 (direct_mask_load_lanes_optab_supported_p): Likewise.
26381 (direct_mask_store_lanes_optab_supported_p): Likewise.
26382 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26383 parameter.
26384 (vect_load_lanes_supported): Likewise.
26385 * tree-vect-data-refs.c (strip_conversion): New function.
26386 (can_group_stmts_p): Likewise.
26387 (vect_analyze_data_ref_accesses): Use it instead of checking
26388 for a pair of assignments.
26389 (vect_store_lanes_supported): Take a masked_p parameter.
26390 (vect_load_lanes_supported): Likewise.
26391 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26392 vect_store_lanes_supported and vect_load_lanes_supported.
26393 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26394 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26395 parameter. Don't allow gaps for masked accesses.
26396 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26397 and vect_load_lanes_supported.
26398 (get_load_store_type): Take a masked_p parameter and update
26399 call to get_group_load_store_type.
26400 (vectorizable_store): Update call to get_load_store_type.
26401 Handle IFN_MASK_STORE_LANES.
26402 (vectorizable_load): Update call to get_load_store_type.
26403 Handle IFN_MASK_LOAD_LANES.
26404
26405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26406 Alan Hayward <alan.hayward@arm.com>
26407 David Sherwood <david.sherwood@arm.com>
26408
26409 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26410 modes for SVE.
26411 * config/aarch64/aarch64-protos.h
26412 (aarch64_sve_struct_memory_operand_p): Declare.
26413 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26414 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26415 (VPRED, vpred): Handle SVE structure modes.
26416 * config/aarch64/constraints.md (Utx): New constraint.
26417 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26418 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26419 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26420 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26421 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26422 structure modes. Split into pieces after RA.
26423 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26424 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26425 New patterns.
26426 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26427 SVE structure modes.
26428 (aarch64_classify_address): Likewise.
26429 (sizetochar): Move earlier in file.
26430 (aarch64_print_operand): Handle SVE register lists.
26431 (aarch64_array_mode): New function.
26432 (aarch64_sve_struct_memory_operand_p): Likewise.
26433 (TARGET_ARRAY_MODE): Redefine.
26434
26435 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26436 Alan Hayward <alan.hayward@arm.com>
26437 David Sherwood <david.sherwood@arm.com>
26438
26439 * target.def (array_mode): New target hook.
26440 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26441 * doc/tm.texi: Regenerate.
26442 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26443 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26444 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26445 targetm.array_mode.
26446 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26447 type sizes.
26448
26449 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26450 Alan Hayward <alan.hayward@arm.com>
26451 David Sherwood <david.sherwood@arm.com>
26452
26453 * fold-const.c (fold_binary_loc): Check the argument types
26454 rather than the result type when testing for a vector operation.
26455
26456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26457
26458 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26459 * doc/tm.texi: Regenerate.
26460
26461 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26462 Alan Hayward <alan.hayward@arm.com>
26463 David Sherwood <david.sherwood@arm.com>
26464
26465 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26466 (sve): Document new AArch64 extension.
26467 * doc/md.texi (w): Extend the description of the AArch64
26468 constraint to include SVE vectors.
26469 (Upl, Upa): Document new AArch64 predicate constraints.
26470 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26471 enum.
26472 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26473 (msve-vector-bits=): New option.
26474 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26475 SVE when these are disabled.
26476 (sve): New extension.
26477 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26478 modes. Adjust their number of units based on aarch64_sve_vg.
26479 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26480 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26481 aarch64_addr_query_type.
26482 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26483 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26484 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26485 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26486 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26487 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26488 (aarch64_simd_imm_zero_p): Delete.
26489 (aarch64_check_zero_based_sve_index_immediate): Declare.
26490 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26491 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26492 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26493 (aarch64_sve_float_mul_immediate_p): Likewise.
26494 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26495 rather than an rtx.
26496 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26497 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26498 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26499 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26500 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26501 (aarch64_regmode_natural_size): Likewise.
26502 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26503 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26504 left one place.
26505 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26506 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26507 for VG and the SVE predicate registers.
26508 (V_ALIASES): Add a "z"-prefixed alias.
26509 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26510 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26511 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26512 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26513 (REG_CLASS_NAMES): Add entries for them.
26514 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26515 and the predicate registers.
26516 (aarch64_sve_vg): Declare.
26517 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26518 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26519 (REGMODE_NATURAL_SIZE): Define.
26520 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26521 SVE macros.
26522 * config/aarch64/aarch64.c: Include cfgrtl.h.
26523 (simd_immediate_info): Add a constructor for series vectors,
26524 and an associated step field.
26525 (aarch64_sve_vg): New variable.
26526 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26527 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26528 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26529 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26530 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26531 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26532 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26533 (aarch64_get_mask_mode): New functions.
26534 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26535 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26536 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26537 predicate modes and predicate registers. Explicitly restrict
26538 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26539 to store a vector mode if it is recognized by
26540 aarch64_classify_vector_mode.
26541 (aarch64_regmode_natural_size): New function.
26542 (aarch64_hard_regno_caller_save_mode): Return the original mode
26543 for predicates.
26544 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26545 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26546 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26547 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26548 functions.
26549 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26550 does not overlap dest if the function is frame-related. Handle
26551 SVE constants.
26552 (aarch64_split_add_offset): New function.
26553 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26554 them aarch64_add_offset.
26555 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26556 and update call to aarch64_sub_sp.
26557 (aarch64_add_cfa_expression): New function.
26558 (aarch64_expand_prologue): Pass extra temporary registers to the
26559 functions above. Handle the case in which we need to emit new
26560 DW_CFA_expressions for registers that were originally saved
26561 relative to the stack pointer, but now have to be expressed
26562 relative to the frame pointer.
26563 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26564 functions above.
26565 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26566 IP0 and IP1 values for SVE frames.
26567 (aarch64_expand_vec_series): New function.
26568 (aarch64_expand_sve_widened_duplicate): Likewise.
26569 (aarch64_expand_sve_const_vector): Likewise.
26570 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26571 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26572 into the register, rather than emitting a SET directly.
26573 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26574 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26575 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26576 (offset_9bit_signed_scaled_p): New functions.
26577 (aarch64_replicate_bitmask_imm): New function.
26578 (aarch64_bitmask_imm): Use it.
26579 (aarch64_cannot_force_const_mem): Reject expressions involving
26580 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26581 (aarch64_classify_index): Handle SVE indices, by requiring
26582 a plain register index with a scale that matches the element size.
26583 (aarch64_classify_address): Handle SVE addresses. Assert that
26584 the mode of the address is VOIDmode or an integer mode.
26585 Update call to aarch64_classify_symbol.
26586 (aarch64_classify_symbolic_expression): Update call to
26587 aarch64_classify_symbol.
26588 (aarch64_const_vec_all_in_range_p): New function.
26589 (aarch64_print_vector_float_operand): Likewise.
26590 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26591 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26592 and the FP immediates 1.0 and 0.5.
26593 (aarch64_print_address_internal): Handle SVE addresses.
26594 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26595 (aarch64_regno_regclass): Handle predicate registers.
26596 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26597 data modes.
26598 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26599 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26600 (aarch64_convert_sve_vector_bits): New function.
26601 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26602 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26603 rather than an rtx.
26604 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26605 Handle SVE vector and predicate modes. Accept VL-based constants
26606 that need only one temporary register, and VL offsets that require
26607 no temporary registers.
26608 (aarch64_conditional_register_usage): Mark the predicate registers
26609 as fixed if SVE isn't available.
26610 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26611 Return true for SVE vector and predicate modes.
26612 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26613 rather than an unsigned int. Handle SVE modes.
26614 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26615 SVE modes.
26616 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26617 if SVE is enabled.
26618 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26619 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26620 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26621 (aarch64_sve_float_mul_immediate_p): New functions.
26622 (aarch64_sve_valid_immediate): New function.
26623 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26624 Explicitly reject structure modes. Check for INDEX constants.
26625 Handle PTRUE and PFALSE constants.
26626 (aarch64_check_zero_based_sve_index_immediate): New function.
26627 (aarch64_simd_imm_zero_p): Delete.
26628 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26629 vector modes. Accept constants in the range of CNT[BHWD].
26630 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26631 ask for an Advanced SIMD mode.
26632 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26633 (aarch64_simd_vector_alignment): Handle SVE predicates.
26634 (aarch64_vectorize_preferred_vector_alignment): New function.
26635 (aarch64_simd_vector_alignment_reachable): Use it instead of
26636 the vector size.
26637 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26638 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26639 functions.
26640 (MAX_VECT_LEN): Delete.
26641 (expand_vec_perm_d): Add a vec_flags field.
26642 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26643 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26644 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26645 for SVE modes.
26646 (aarch64_evpc_rev): Rename to...
26647 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26648 (aarch64_evpc_rev_global): New function.
26649 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26650 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26651 MAX_VECT_LEN.
26652 (aarch64_evpc_sve_tbl): New function.
26653 (aarch64_expand_vec_perm_const_1): Update after rename of
26654 aarch64_evpc_rev. Handle SVE permutes too, trying
26655 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26656 than aarch64_evpc_tbl.
26657 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26658 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26659 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26660 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26661 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26662 (aarch64_expand_sve_vcond): New functions.
26663 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26664 of aarch64_vector_mode_p.
26665 (aarch64_dwarf_poly_indeterminate_value): New function.
26666 (aarch64_compute_pressure_classes): Likewise.
26667 (aarch64_can_change_mode_class): Likewise.
26668 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26669 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26670 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26671 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26672 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26673 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26674 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26675 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26676 constraints.
26677 (Dn, Dl, Dr): Accept const as well as const_vector.
26678 (Dz): Likewise. Compare against CONST0_RTX.
26679 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26680 of "vector" where appropriate.
26681 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26682 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26683 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26684 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26685 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26686 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26687 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26688 (v_int_equiv): Extend to SVE modes.
26689 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26690 mode attributes.
26691 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26692 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26693 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26694 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26695 (SVE_COND_FP_CMP): New int iterators.
26696 (perm_hilo): Handle the new unpack unspecs.
26697 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26698 attributes.
26699 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26700 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26701 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26702 (aarch64_equality_operator, aarch64_constant_vector_operand)
26703 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26704 (aarch64_sve_nonimmediate_operand): Likewise.
26705 (aarch64_sve_general_operand): Likewise.
26706 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26707 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26708 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26709 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26710 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26711 (aarch64_sve_float_arith_immediate): Likewise.
26712 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26713 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26714 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26715 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26716 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26717 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26718 (aarch64_sve_float_arith_operand): Likewise.
26719 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26720 (aarch64_sve_float_mul_operand): Likewise.
26721 (aarch64_sve_vec_perm_operand): Likewise.
26722 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26723 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26724 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26725 as well as const_vector.
26726 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26727 in file. Use CONST0_RTX and CONSTM1_RTX.
26728 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26729 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26730 Use aarch64_simd_imm_zero.
26731 * config/aarch64/aarch64-sve.md: New file.
26732 * config/aarch64/aarch64.md: Include it.
26733 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26734 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26735 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26736 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26737 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26738 (sve): New attribute.
26739 (enabled): Disable instructions with the sve attribute unless
26740 TARGET_SVE.
26741 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26742 aarch64_expand_mov_immediate.
26743 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26744 CNT[BHSD] immediates.
26745 (movti): Split CONST_POLY_INT moves into two halves.
26746 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26747 Split additions that need a temporary here if the destination
26748 is the stack pointer.
26749 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26750 (*add<mode>3_poly_1): New instruction.
26751 (set_clobber_cc): New expander.
26752
26753 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26754
26755 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26756 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26757 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26758 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26759 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26760 Change innermode from fixed_mode_size to machine_mode.
26761 (simplify_subreg): Update call accordingly. Handle a constant-sized
26762 subreg of a variable-length CONST_VECTOR.
26763
26764 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26765 Alan Hayward <alan.hayward@arm.com>
26766 David Sherwood <david.sherwood@arm.com>
26767
26768 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26769 (add_offset_to_base): New function, split out from...
26770 (create_mem_ref): ...here. When handling a scale other than 1,
26771 check first whether the address is valid without the offset.
26772 Add it into the base if so, leaving the index and scale as-is.
26773
26774 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26775
26776 PR c++/83778
26777 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26778 fold_for_warn before checking if arg2 is INTEGER_CST.
26779
26780 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26781
26782 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26783 (store_multiple_operation): Delete.
26784 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26785 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26786 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26787 guarded by TARGET_STRING.
26788 (rs6000_output_load_multiple): Delete.
26789 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26790 OPTION_MASK_STRING / TARGET_STRING handling.
26791 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26792 (const rs6000_opt_masks) <"string">: Change mask to 0.
26793 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26794 (MASK_STRING): Delete.
26795 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26796 parts. Simplify.
26797 (load_multiple): Delete.
26798 (*ldmsi8): Delete.
26799 (*ldmsi7): Delete.
26800 (*ldmsi6): Delete.
26801 (*ldmsi5): Delete.
26802 (*ldmsi4): Delete.
26803 (*ldmsi3): Delete.
26804 (store_multiple): Delete.
26805 (*stmsi8): Delete.
26806 (*stmsi7): Delete.
26807 (*stmsi6): Delete.
26808 (*stmsi5): Delete.
26809 (*stmsi4): Delete.
26810 (*stmsi3): Delete.
26811 (movmemsi_8reg): Delete.
26812 (corresponding unnamed define_insn): Delete.
26813 (movmemsi_6reg): Delete.
26814 (corresponding unnamed define_insn): Delete.
26815 (movmemsi_4reg): Delete.
26816 (corresponding unnamed define_insn): Delete.
26817 (movmemsi_2reg): Delete.
26818 (corresponding unnamed define_insn): Delete.
26819 (movmemsi_1reg): Delete.
26820 (corresponding unnamed define_insn): Delete.
26821 * config/rs6000/rs6000.opt (mno-string): New.
26822 (mstring): Replace by deprecation warning stub.
26823 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26824
26825 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26826
26827 * regrename.c (regrename_do_replace): If replacing the same
26828 reg multiple times, try to reuse last created gen_raw_REG.
26829
26830 PR debug/81155
26831 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26832 main to workaround a bug in GDB.
26833
26834 2018-01-12 Tom de Vries <tom@codesourcery.com>
26835
26836 PR target/83737
26837 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26838
26839 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26840
26841 PR rtl-optimization/80481
26842 * ira-color.c (get_cap_member): New function.
26843 (allocnos_conflict_by_live_ranges_p): Use it.
26844 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26845 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26846
26847 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26848
26849 PR target/83628
26850 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26851 (*saddl_se_1): Ditto.
26852 (*ssubsi_1): Ditto.
26853 (*ssubl_se_1): Ditto.
26854
26855 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26856
26857 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26858 rather than wi::to_widest for DR_INITs.
26859 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26860 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26861 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26862 INTEGER_CSTs.
26863 (vect_analyze_group_access_1): Note that here.
26864
26865 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26866
26867 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26868 polynomial type sizes.
26869
26870 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26871
26872 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26873 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26874 (gimple_add_tmp_var): Likewise.
26875
26876 2018-01-12 Martin Liska <mliska@suse.cz>
26877
26878 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26879 (gimple_alloc_sizes): Likewise.
26880 (dump_gimple_statistics): Use PRIu64 in printf format.
26881 * gimple.h: Change uint64_t to int.
26882
26883 2018-01-12 Martin Liska <mliska@suse.cz>
26884
26885 * tree-core.h: Use uint64_t instead of int.
26886 * tree.c (tree_node_counts): Likewise.
26887 (tree_node_sizes): Likewise.
26888 (dump_tree_statistics): Use PRIu64 in printf format.
26889
26890 2018-01-12 Martin Liska <mliska@suse.cz>
26891
26892 * Makefile.in: As qsort_chk is implemented in vec.c, add
26893 vec.o to linkage of gencfn-macros.
26894 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26895 passing the info to record_node_allocation_statistics.
26896 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26897 and pass the info.
26898 * ggc-common.c (struct ggc_usage): Add operator== and use
26899 it in operator< and compare function.
26900 * mem-stats.h (struct mem_usage): Likewise.
26901 * vec.c (struct vec_usage): Remove operator< and compare
26902 function. Can be simply inherited.
26903
26904 2018-01-12 Martin Jambor <mjambor@suse.cz>
26905
26906 PR target/81616
26907 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26908 * tree-ssa-math-opts.c: Include domwalk.h.
26909 (convert_mult_to_fma_1): New function.
26910 (fma_transformation_info): New type.
26911 (fma_deferring_state): Likewise.
26912 (cancel_fma_deferring): New function.
26913 (result_of_phi): Likewise.
26914 (last_fma_candidate_feeds_initial_phi): Likewise.
26915 (convert_mult_to_fma): Added deferring logic, split actual
26916 transformation to convert_mult_to_fma_1.
26917 (math_opts_dom_walker): New type.
26918 (math_opts_dom_walker::after_dom_children): New method, body moved
26919 here from pass_optimize_widening_mul::execute, added deferring logic
26920 bits.
26921 (pass_optimize_widening_mul::execute): Moved most of code to
26922 math_opts_dom_walker::after_dom_children.
26923 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26924 * config/i386/i386.c (ix86_option_override_internal): Added
26925 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26926
26927 2018-01-12 Richard Biener <rguenther@suse.de>
26928
26929 PR debug/83157
26930 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26931 inline instance vars.
26932
26933 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26934
26935 PR target/81819
26936 * config/rx/rx.c (rx_is_restricted_memory_address):
26937 Handle SUBREG case.
26938
26939 2018-01-12 Richard Biener <rguenther@suse.de>
26940
26941 PR tree-optimization/80846
26942 * target.def (split_reduction): New target hook.
26943 * targhooks.c (default_split_reduction): New function.
26944 * targhooks.h (default_split_reduction): Declare.
26945 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26946 target requests first reduce vectors by combining low and high
26947 parts.
26948 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26949 (get_vectype_for_scalar_type_and_size): Export.
26950 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26951 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26952 * doc/tm.texi: Regenerate.
26953 * config/i386/i386.c (ix86_split_reduction): Implement
26954 TARGET_VECTORIZE_SPLIT_REDUCTION.
26955
26956 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26957
26958 PR target/83368
26959 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26960 in PIC mode except for TARGET_VXWORKS_RTP.
26961 * config/sparc/sparc.c: Include cfgrtl.h.
26962 (TARGET_INIT_PIC_REG): Define.
26963 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26964 (sparc_pic_register_p): New predicate.
26965 (sparc_legitimate_address_p): Use it.
26966 (sparc_legitimize_pic_address): Likewise.
26967 (sparc_delegitimize_address): Likewise.
26968 (sparc_mode_dependent_address_p): Likewise.
26969 (gen_load_pcrel_sym): Remove 4th parameter.
26970 (load_got_register): Adjust call to above. Remove obsolete stuff.
26971 (sparc_expand_prologue): Do not call load_got_register here.
26972 (sparc_flat_expand_prologue): Likewise.
26973 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26974 (sparc_use_pseudo_pic_reg): New function.
26975 (sparc_init_pic_reg): Likewise.
26976 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26977 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26978
26979 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26980
26981 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26982 Add item for branch_cost.
26983
26984 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26985
26986 PR rtl-optimization/83565
26987 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26988 not extend the result to a larger mode for rotate operations.
26989 (num_sign_bit_copies1): Likewise.
26990
26991 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26992
26993 PR target/40411
26994 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26995 -symbolic.
26996 Use values-Xc.o for -pedantic.
26997 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26998
26999 2018-01-12 Martin Liska <mliska@suse.cz>
27000
27001 PR ipa/83054
27002 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27003 New function.
27004 (possible_polymorphic_call_targets): Use it.
27005 (ipa_devirt): Likewise.
27006
27007 2018-01-12 Martin Liska <mliska@suse.cz>
27008
27009 * profile-count.h (enum profile_quality): Use 0 as invalid
27010 enum value of profile_quality.
27011
27012 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27013
27014 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27015 -mext-string options.
27016
27017 2018-01-12 Richard Biener <rguenther@suse.de>
27018
27019 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27020 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27021 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27022 Likewise.
27023 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27024
27025 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27026
27027 * configure.ac (--with-long-double-format): Add support for the
27028 configuration option to change the default long double format on
27029 PowerPC systems.
27030 * config.gcc (powerpc*-linux*-*): Likewise.
27031 * configure: Regenerate.
27032 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27033 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27034 used without modification.
27035
27036 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27037
27038 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27039 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27040 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27041 MISC_BUILTIN_SPEC_BARRIER.
27042 (rs6000_init_builtins): Likewise.
27043 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27044 enum value.
27045 (speculation_barrier): New define_insn.
27046 * doc/extend.texi: Document __builtin_speculation_barrier.
27047
27048 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27049
27050 PR target/83203
27051 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27052 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27053 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27054 iterators.
27055 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27056 integral modes instead of "ss" and "sd".
27057 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27058 vectors with 32-bit and 64-bit elements.
27059 (vecdupssescalarmodesuffix): New mode attribute.
27060 (vec_dup<mode>): Use it.
27061
27062 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27063
27064 PR target/83330
27065 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27066 frame if argument is passed on stack.
27067
27068 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27069
27070 PR target/82682
27071 * ree.c (combine_reaching_defs): Optimize also
27072 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27073 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27074
27075 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27076
27077 PR middle-end/83189
27078 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27079
27080 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27081
27082 PR middle-end/83718
27083 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27084 after they are computed.
27085
27086 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27087
27088 PR tree-optimization/83695
27089 * gimple-loop-linterchange.cc
27090 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27091 reset cached scev information after interchange.
27092 (pass_linterchange::execute): Remove call to scev_reset_htab.
27093
27094 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27095
27096 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27097 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27098 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27099 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27100 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27101 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27102 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27103 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27104 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27105 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27106 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27107 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27108 (V_lane_reg): Likewise.
27109 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27110 New define_expand.
27111 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27112 (vfmal_lane_low<mode>_intrinsic,
27113 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27114 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27115 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27116 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27117 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27118 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27119
27120 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27121
27122 * config/arm/arm-cpus.in (fp16fml): New feature.
27123 (ALL_SIMD): Add fp16fml.
27124 (armv8.2-a): Add fp16fml as an option.
27125 (armv8.3-a): Likewise.
27126 (armv8.4-a): Add fp16fml as part of fp16.
27127 * config/arm/arm.h (TARGET_FP16FML): Define.
27128 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27129 when appropriate.
27130 * config/arm/arm-modes.def (V2HF): Define.
27131 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27132 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27133 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27134 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27135 vfmsl_low, vfmsl_high): New set of builtins.
27136 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27137 (vfml_op): New code attribute.
27138 (VFMLHALVES): New int iterator.
27139 (VFML, VFMLSEL): New mode attributes.
27140 (V_reg): Define mapping for V2HF.
27141 (V_hi, V_lo): New mode attributes.
27142 (VF_constraint): Likewise.
27143 (vfml_half, vfml_half_selector): New int attributes.
27144 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27145 define_expand.
27146 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27147 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27148 New define_insn.
27149 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27150 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27151 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27152 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27153 documentation.
27154 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27155 Document new effective target and option set.
27156
27157 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27158
27159 * config/arm/arm-cpus.in (armv8_4): New feature.
27160 (ARMv8_4a): New fgroup.
27161 (armv8.4-a): New arch.
27162 * config/arm/arm-tables.opt: Regenerate.
27163 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27164 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27165 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27166 Add matching rules for -march=armv8.4-a and extensions.
27167 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27168
27169 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27170
27171 PR target/81821
27172 * config/rx/rx.md (BW): New mode attribute.
27173 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27174
27175 2018-01-11 Richard Biener <rguenther@suse.de>
27176
27177 PR tree-optimization/83435
27178 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27179 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27180 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27181
27182 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27183 Alan Hayward <alan.hayward@arm.com>
27184 David Sherwood <david.sherwood@arm.com>
27185
27186 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27187 field.
27188 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27189 (aarch64_print_address_internal): Use it to check for a zero offset.
27190
27191 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27192 Alan Hayward <alan.hayward@arm.com>
27193 David Sherwood <david.sherwood@arm.com>
27194
27195 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27196 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27197 Return a poly_int64 rather than a HOST_WIDE_INT.
27198 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27199 rather than a HOST_WIDE_INT.
27200 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27201 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27202 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27203 final_offset from HOST_WIDE_INT to poly_int64.
27204 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27205 to_constant when getting the number of units in an Advanced SIMD
27206 mode.
27207 (aarch64_builtin_vectorized_function): Check for a constant number
27208 of units.
27209 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27210 GET_MODE_SIZE.
27211 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27212 attribute instead of GET_MODE_NUNITS.
27213 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27214 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27215 GET_MODE_SIZE for fixed-size registers.
27216 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27217 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27218 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27219 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27220 (aarch64_print_operand, aarch64_print_address_internal)
27221 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27222 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27223 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27224 Handle polynomial GET_MODE_SIZE.
27225 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27226 wider than SImode without modification.
27227 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27228 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27229 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27230 passing and returning SVE modes.
27231 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27232 rather than GEN_INT.
27233 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27234 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27235 (aarch64_allocate_and_probe_stack_space): Likewise.
27236 (aarch64_layout_frame): Cope with polynomial offsets.
27237 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27238 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27239 polynomial offsets.
27240 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27241 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27242 poly_int64 rather than a HOST_WIDE_INT.
27243 (aarch64_get_separate_components, aarch64_process_components)
27244 (aarch64_expand_prologue, aarch64_expand_epilogue)
27245 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27246 (aarch64_anchor_offset): New function, split out from...
27247 (aarch64_legitimize_address): ...here.
27248 (aarch64_builtin_vectorization_cost): Handle polynomial
27249 TYPE_VECTOR_SUBPARTS.
27250 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27251 GET_MODE_NUNITS.
27252 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27253 number of elements from the PARALLEL rather than the mode.
27254 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27255 rather than GET_MODE_BITSIZE.
27256 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27257 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27258 (aarch64_expand_vec_perm_const_1): Handle polynomial
27259 d->perm.length () and d->perm elements.
27260 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27261 Apply to_constant to d->perm elements.
27262 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27263 polynomial CONST_VECTOR_NUNITS.
27264 (aarch64_move_pointer): Take amount as a poly_int64 rather
27265 than an int.
27266 (aarch64_progress_pointer): Avoid temporary variable.
27267 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27268 the mode attribute instead of GET_MODE.
27269
27270 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27271 Alan Hayward <alan.hayward@arm.com>
27272 David Sherwood <david.sherwood@arm.com>
27273
27274 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27275 x exists before using it.
27276 (aarch64_add_constant_internal): Rename to...
27277 (aarch64_add_offset_1): ...this. Replace regnum with separate
27278 src and dest rtxes. Handle the case in which they're different,
27279 including when the offset is zero. Replace scratchreg with an rtx.
27280 Use 2 additions if there is no spare register into which we can
27281 move a 16-bit constant.
27282 (aarch64_add_constant): Delete.
27283 (aarch64_add_offset): Replace reg with separate src and dest
27284 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27285 Use aarch64_add_offset_1.
27286 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27287 an rtx rather than an int. Take the delta as a poly_int64
27288 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27289 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27290 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27291 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27292 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27293 and aarch64_add_sp.
27294 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27295 aarch64_add_constant.
27296
27297 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27298
27299 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27300 Use scalar_float_mode.
27301
27302 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27303
27304 * config/aarch64/aarch64-simd.md
27305 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27306 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27307 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27308 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27309 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27310 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27311 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27312 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27313 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27314 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27315
27316 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27317
27318 PR target/83514
27319 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27320 targ_options->x_arm_arch_string is non NULL.
27321
27322 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27323
27324 * config/aarch64/aarch64.h
27325 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27326
27327 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27328
27329 PR target/82096
27330 * expmed.c (emit_store_flag_force): Swap if const op0
27331 and change VOIDmode to mode of op0.
27332
27333 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27334
27335 PR rtl-optimization/83761
27336 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27337 than bytes to mode_for_size.
27338
27339 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27340
27341 PR middle-end/83189
27342 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27343 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27344 profile.
27345
27346 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27347
27348 PR middle-end/83575
27349 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27350 when in layout mode.
27351 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27352 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27353 partition fixup.
27354
27355 2018-01-10 Michael Collison <michael.collison@arm.com>
27356
27357 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27358 * config/aarch64/aarch64-option-extension.def: Add
27359 AARCH64_OPT_EXTENSION of 'fp16fml'.
27360 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27361 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27362 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27363 * config/aarch64/constraints.md (Ui7): New constraint.
27364 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27365 (VFMLA_SEL_W): Ditto.
27366 (f16quad): Ditto.
27367 (f16mac1): Ditto.
27368 (VFMLA16_LOW): New int iterator.
27369 (VFMLA16_HIGH): Ditto.
27370 (UNSPEC_FMLAL): New unspec.
27371 (UNSPEC_FMLSL): Ditto.
27372 (UNSPEC_FMLAL2): Ditto.
27373 (UNSPEC_FMLSL2): Ditto.
27374 (f16mac): New code attribute.
27375 * config/aarch64/aarch64-simd-builtins.def
27376 (aarch64_fmlal_lowv2sf): Ditto.
27377 (aarch64_fmlsl_lowv2sf): Ditto.
27378 (aarch64_fmlalq_lowv4sf): Ditto.
27379 (aarch64_fmlslq_lowv4sf): Ditto.
27380 (aarch64_fmlal_highv2sf): Ditto.
27381 (aarch64_fmlsl_highv2sf): Ditto.
27382 (aarch64_fmlalq_highv4sf): Ditto.
27383 (aarch64_fmlslq_highv4sf): Ditto.
27384 (aarch64_fmlal_lane_lowv2sf): Ditto.
27385 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27386 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27387 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27388 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27389 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27390 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27391 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27392 (aarch64_fmlal_lane_highv2sf): Ditto.
27393 (aarch64_fmlsl_lane_highv2sf): Ditto.
27394 (aarch64_fmlal_laneq_highv2sf): Ditto.
27395 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27396 (aarch64_fmlalq_lane_highv4sf): Ditto.
27397 (aarch64_fmlsl_lane_highv4sf): Ditto.
27398 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27399 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27400 * config/aarch64/aarch64-simd.md:
27401 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27402 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27403 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27404 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27405 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27406 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27407 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27408 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27409 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27410 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27411 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27412 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27413 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27414 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27415 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27416 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27417 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27418 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27419 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27420 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27421 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27422 (vfmlsl_low_u32): Ditto.
27423 (vfmlalq_low_u32): Ditto.
27424 (vfmlslq_low_u32): Ditto.
27425 (vfmlal_high_u32): Ditto.
27426 (vfmlsl_high_u32): Ditto.
27427 (vfmlalq_high_u32): Ditto.
27428 (vfmlslq_high_u32): Ditto.
27429 (vfmlal_lane_low_u32): Ditto.
27430 (vfmlsl_lane_low_u32): Ditto.
27431 (vfmlal_laneq_low_u32): Ditto.
27432 (vfmlsl_laneq_low_u32): Ditto.
27433 (vfmlalq_lane_low_u32): Ditto.
27434 (vfmlslq_lane_low_u32): Ditto.
27435 (vfmlalq_laneq_low_u32): Ditto.
27436 (vfmlslq_laneq_low_u32): Ditto.
27437 (vfmlal_lane_high_u32): Ditto.
27438 (vfmlsl_lane_high_u32): Ditto.
27439 (vfmlal_laneq_high_u32): Ditto.
27440 (vfmlsl_laneq_high_u32): Ditto.
27441 (vfmlalq_lane_high_u32): Ditto.
27442 (vfmlslq_lane_high_u32): Ditto.
27443 (vfmlalq_laneq_high_u32): Ditto.
27444 (vfmlslq_laneq_high_u32): Ditto.
27445 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27446 (AARCH64_FL_FOR_ARCH8_4): New.
27447 (AARCH64_ISA_F16FML): New ISA flag.
27448 (TARGET_F16FML): New feature flag for fp16fml.
27449 (doc/invoke.texi): Document new fp16fml option.
27450
27451 2018-01-10 Michael Collison <michael.collison@arm.com>
27452
27453 * config/aarch64/aarch64-builtins.c:
27454 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27455 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27456 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27457 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27458 (AARCH64_ISA_SHA3): New ISA flag.
27459 (TARGET_SHA3): New feature flag for sha3.
27460 * config/aarch64/iterators.md (sha512_op): New int attribute.
27461 (CRYPTO_SHA512): New int iterator.
27462 (UNSPEC_SHA512H): New unspec.
27463 (UNSPEC_SHA512H2): Ditto.
27464 (UNSPEC_SHA512SU0): Ditto.
27465 (UNSPEC_SHA512SU1): Ditto.
27466 * config/aarch64/aarch64-simd-builtins.def
27467 (aarch64_crypto_sha512hqv2di): New builtin.
27468 (aarch64_crypto_sha512h2qv2di): Ditto.
27469 (aarch64_crypto_sha512su0qv2di): Ditto.
27470 (aarch64_crypto_sha512su1qv2di): Ditto.
27471 (aarch64_eor3qv8hi): Ditto.
27472 (aarch64_rax1qv2di): Ditto.
27473 (aarch64_xarqv2di): Ditto.
27474 (aarch64_bcaxqv8hi): Ditto.
27475 * config/aarch64/aarch64-simd.md:
27476 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27477 (aarch64_crypto_sha512su0qv2di): Ditto.
27478 (aarch64_crypto_sha512su1qv2di): Ditto.
27479 (aarch64_eor3qv8hi): Ditto.
27480 (aarch64_rax1qv2di): Ditto.
27481 (aarch64_xarqv2di): Ditto.
27482 (aarch64_bcaxqv8hi): Ditto.
27483 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27484 (vsha512h2q_u64): Ditto.
27485 (vsha512su0q_u64): Ditto.
27486 (vsha512su1q_u64): Ditto.
27487 (veor3q_u16): Ditto.
27488 (vrax1q_u64): Ditto.
27489 (vxarq_u64): Ditto.
27490 (vbcaxq_u16): Ditto.
27491 * config/arm/types.md (crypto_sha512): New type attribute.
27492 (crypto_sha3): Ditto.
27493 (doc/invoke.texi): Document new sha3 option.
27494
27495 2018-01-10 Michael Collison <michael.collison@arm.com>
27496
27497 * config/aarch64/aarch64-builtins.c:
27498 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27499 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27500 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27501 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27502 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27503 (AARCH64_ISA_SM4): New ISA flag.
27504 (TARGET_SM4): New feature flag for sm4.
27505 * config/aarch64/aarch64-simd-builtins.def
27506 (aarch64_sm3ss1qv4si): Ditto.
27507 (aarch64_sm3tt1aq4si): Ditto.
27508 (aarch64_sm3tt1bq4si): Ditto.
27509 (aarch64_sm3tt2aq4si): Ditto.
27510 (aarch64_sm3tt2bq4si): Ditto.
27511 (aarch64_sm3partw1qv4si): Ditto.
27512 (aarch64_sm3partw2qv4si): Ditto.
27513 (aarch64_sm4eqv4si): Ditto.
27514 (aarch64_sm4ekeyqv4si): Ditto.
27515 * config/aarch64/aarch64-simd.md:
27516 (aarch64_sm3ss1qv4si): Ditto.
27517 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27518 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27519 (aarch64_sm4eqv4si): Ditto.
27520 (aarch64_sm4ekeyqv4si): Ditto.
27521 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27522 (sm3part_op): Ditto.
27523 (CRYPTO_SM3TT): Ditto.
27524 (CRYPTO_SM3PART): Ditto.
27525 (UNSPEC_SM3SS1): New unspec.
27526 (UNSPEC_SM3TT1A): Ditto.
27527 (UNSPEC_SM3TT1B): Ditto.
27528 (UNSPEC_SM3TT2A): Ditto.
27529 (UNSPEC_SM3TT2B): Ditto.
27530 (UNSPEC_SM3PARTW1): Ditto.
27531 (UNSPEC_SM3PARTW2): Ditto.
27532 (UNSPEC_SM4E): Ditto.
27533 (UNSPEC_SM4EKEY): Ditto.
27534 * config/aarch64/constraints.md (Ui2): New constraint.
27535 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27536 * config/arm/types.md (crypto_sm3): New type attribute.
27537 (crypto_sm4): Ditto.
27538 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27539 (vsm3tt1aq_u32): Ditto.
27540 (vsm3tt1bq_u32): Ditto.
27541 (vsm3tt2aq_u32): Ditto.
27542 (vsm3tt2bq_u32): Ditto.
27543 (vsm3partw1q_u32): Ditto.
27544 (vsm3partw2q_u32): Ditto.
27545 (vsm4eq_u32): Ditto.
27546 (vsm4ekeyq_u32): Ditto.
27547 (doc/invoke.texi): Document new sm4 option.
27548
27549 2018-01-10 Michael Collison <michael.collison@arm.com>
27550
27551 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27552 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27553 (AARCH64_FL_FOR_ARCH8_4): New.
27554 (AARCH64_FL_V8_4): New flag.
27555 (doc/invoke.texi): Document new armv8.4-a option.
27556
27557 2018-01-10 Michael Collison <michael.collison@arm.com>
27558
27559 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27560 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27561 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27562 * config/aarch64/aarch64-option-extension.def: Add
27563 AARCH64_OPT_EXTENSION of 'sha2'.
27564 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27565 (crypto): Disable sha2 and aes if crypto disabled.
27566 (crypto): Enable aes and sha2 if enabled.
27567 (simd): Disable sha2 and aes if simd disabled.
27568 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27569 New flags.
27570 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27571 (TARGET_SHA2): New feature flag for sha2.
27572 (TARGET_AES): New feature flag for aes.
27573 * config/aarch64/aarch64-simd.md:
27574 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27575 conditional on TARGET_AES.
27576 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27577 (aarch64_crypto_sha1hsi): Make pattern conditional
27578 on TARGET_SHA2.
27579 (aarch64_crypto_sha1hv4si): Ditto.
27580 (aarch64_be_crypto_sha1hv4si): Ditto.
27581 (aarch64_crypto_sha1su1v4si): Ditto.
27582 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27583 (aarch64_crypto_sha1su0v4si): Ditto.
27584 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27585 (aarch64_crypto_sha256su0v4si): Ditto.
27586 (aarch64_crypto_sha256su1v4si): Ditto.
27587 (doc/invoke.texi): Document new aes and sha2 options.
27588
27589 2018-01-10 Martin Sebor <msebor@redhat.com>
27590
27591 PR tree-optimization/83781
27592 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27593 as string arrays.
27594
27595 2018-01-11 Martin Sebor <msebor@gmail.com>
27596 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27597
27598 PR tree-optimization/83501
27599 PR tree-optimization/81703
27600
27601 * tree-ssa-strlen.c (get_string_cst): Rename...
27602 (get_string_len): ...to this. Handle global constants.
27603 (handle_char_store): Adjust.
27604
27605 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27606 Jim Wilson <jimw@sifive.com>
27607
27608 * config/riscv/riscv-protos.h (riscv_output_return): New.
27609 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27610 (riscv_attribute_table, riscv_output_return),
27611 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27612 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27613 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27614 function.
27615 (riscv_expand_prologue): Add early return for naked function.
27616 (riscv_expand_epilogue): Likewise.
27617 (riscv_function_ok_for_sibcall): Return false for naked function.
27618 (riscv_set_current_function): New.
27619 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27620 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27621 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27622 * doc/extend.texi (RISC-V Function Attributes): New.
27623
27624 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27625
27626 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27627 check for 128-bit long double before checking TCmode.
27628 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27629 128-bit long doubles before checking TFmode or TCmode.
27630 (FLOAT128_IBM_P): Likewise.
27631
27632 2018-01-10 Martin Sebor <msebor@redhat.com>
27633
27634 PR tree-optimization/83671
27635 * builtins.c (c_strlen): Unconditionally return zero for the empty
27636 string.
27637 Use -Warray-bounds for warnings.
27638 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27639 for non-constant array indices with COMPONENT_REF, arrays of
27640 arrays, and pointers to arrays.
27641 (gimple_fold_builtin_strlen): Determine and set length range for
27642 non-constant character arrays.
27643
27644 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27645
27646 PR middle-end/81897
27647 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27648 empty blocks.
27649
27650 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27651
27652 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27653
27654 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27655
27656 PR target/83399
27657 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27658 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27659 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27660 indexed_or_indirect_operand predicate.
27661 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27662 (*vsx_le_perm_load_v8hi): Likewise.
27663 (*vsx_le_perm_load_v16qi): Likewise.
27664 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27665 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27666 (*vsx_le_perm_store_v8hi): Likewise.
27667 (*vsx_le_perm_store_v16qi): Likewise.
27668 (eight unnamed splitters): Likewise.
27669
27670 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27671
27672 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27673 * config/rs6000/emmintrin.h: Likewise.
27674 * config/rs6000/mmintrin.h: Likewise.
27675 * config/rs6000/xmmintrin.h: Likewise.
27676
27677 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27678
27679 PR c++/43486
27680 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27681 "public_flag".
27682 * tree.c (tree_nop_conversion): Return true for location wrapper
27683 nodes.
27684 (maybe_wrap_with_location): New function.
27685 (selftest::check_strip_nops): New function.
27686 (selftest::test_location_wrappers): New function.
27687 (selftest::tree_c_tests): Call it.
27688 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27689 (maybe_wrap_with_location): New decl.
27690 (EXPR_LOCATION_WRAPPER_P): New macro.
27691 (location_wrapper_p): New inline function.
27692 (tree_strip_any_location_wrapper): New inline function.
27693
27694 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27695
27696 PR target/83735
27697 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27698 stack_realign_offset for the largest alignment of stack slot
27699 actually used.
27700 (ix86_find_max_used_stack_alignment): New function.
27701 (ix86_finalize_stack_frame_flags): Use it. Set
27702 max_used_stack_alignment if we don't realign stack.
27703 * config/i386/i386.h (machine_function): Add
27704 max_used_stack_alignment.
27705
27706 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27707
27708 * config/arm/arm.opt (-mbranch-cost): New option.
27709 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27710 account.
27711
27712 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27713
27714 PR target/83629
27715 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27716 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27717
27718 2018-01-10 Richard Biener <rguenther@suse.de>
27719
27720 PR debug/83765
27721 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27722 early out so it also covers the case where we have a non-NULL
27723 origin.
27724
27725 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27726
27727 PR tree-optimization/83753
27728 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27729 for non-strided grouped accesses if the number of elements is 1.
27730
27731 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27732
27733 PR target/81616
27734 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27735 * i386.h (TARGET_USE_GATHER): Define.
27736 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27737
27738 2018-01-10 Martin Liska <mliska@suse.cz>
27739
27740 PR bootstrap/82831
27741 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27742 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27743 partitioning.
27744 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27745 CLEANUP_NO_PARTITIONING is not set.
27746
27747 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27748
27749 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27750 for vectors, as a partial revert of r254296.
27751 * rtl.h (const_vec_p): Delete.
27752 (const_vec_duplicate_p): Don't test for vector CONSTs.
27753 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27754 * expmed.c (make_tree): Likewise.
27755
27756 Revert:
27757 * common.md (E, F): Use CONSTANT_P instead of checking for
27758 CONST_VECTOR.
27759 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27760 checking for CONST_VECTOR.
27761
27762 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27763
27764 PR middle-end/83575
27765 * predict.c (force_edge_cold): Handle in more sane way edges
27766 with no prediction.
27767
27768 2018-01-09 Carl Love <cel@us.ibm.com>
27769
27770 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27771 V4SI, V4SF types.
27772 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27773 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27774 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27775 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27776 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27777 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27778 * config/rs6000/rs6000-protos.h: Add extern defition for
27779 rs6000_generate_float2_double_code.
27780 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27781 function.
27782 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27783 (float2_v2df): Add define_expand.
27784
27785 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27786
27787 PR target/83628
27788 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27789 op_mode in the force_to_mode call.
27790
27791 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27792
27793 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27794 instead of checking each element individually.
27795 (aarch64_evpc_uzp): Likewise.
27796 (aarch64_evpc_zip): Likewise.
27797 (aarch64_evpc_ext): Likewise.
27798 (aarch64_evpc_rev): Likewise.
27799 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27800 instead of checking each element individually. Return true without
27801 generating rtl if
27802 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27803 whether all selected elements come from the same input, instead of
27804 checking each element individually. Remove calls to gen_rtx_REG,
27805 start_sequence and end_sequence and instead assert that no rtl is
27806 generated.
27807
27808 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27809
27810 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27811 order of HIGH and CONST checks.
27812
27813 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27814
27815 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27816 if the destination isn't an SSA_NAME.
27817
27818 2018-01-09 Richard Biener <rguenther@suse.de>
27819
27820 PR tree-optimization/83668
27821 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27822 move prologue...
27823 (canonicalize_loop_form): ... here, renamed from ...
27824 (canonicalize_loop_closed_ssa_form): ... this and amended to
27825 swap successor edges for loop exit blocks to make us use
27826 the RPO order we need for initial schedule generation.
27827
27828 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27829
27830 PR tree-optimization/64811
27831 * match.pd: When optimizing comparisons with Inf, avoid
27832 introducing or losing exceptions from comparisons with NaN.
27833
27834 2018-01-09 Martin Liska <mliska@suse.cz>
27835
27836 PR sanitizer/82517
27837 * asan.c (shadow_mem_size): Add gcc_assert.
27838
27839 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27840
27841 Don't save registers in main().
27842
27843 PR target/83738
27844 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27845 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27846 * config/avr/avr.c (avr_set_current_function): Don't error if
27847 naked, OS_task or OS_main are specified at the same time.
27848 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27849 OS_main.
27850 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27851 attribute.
27852 * common/config/avr/avr-common.c (avr_option_optimization_table):
27853 Switch on -mmain-is-OS_task for optimizing compilations.
27854
27855 2018-01-09 Richard Biener <rguenther@suse.de>
27856
27857 PR tree-optimization/83572
27858 * graphite.c: Include cfganal.h.
27859 (graphite_transform_loops): Connect infinite loops to exit
27860 and remove fake edges at the end.
27861
27862 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27863
27864 * ipa-inline.c (edge_badness): Revert accidental checkin.
27865
27866 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27867
27868 PR ipa/80763
27869 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27870 symbols; not inline clones.
27871
27872 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27873
27874 PR target/83507
27875 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27876 hard registers. Formatting fixes.
27877
27878 PR preprocessor/83722
27879 * gcc.c (try_generate_repro): Pass
27880 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27881 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27882 do_report_bug.
27883
27884 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27885 Kito Cheng <kito.cheng@gmail.com>
27886
27887 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27888 (riscv_leaf_function_p): Delete.
27889 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27890
27891 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27892
27893 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27894 function.
27895 (do_ifelse): New function.
27896 (do_isel): New function.
27897 (do_sub3): New function.
27898 (do_add3): New function.
27899 (do_load_mask_compare): New function.
27900 (do_overlap_load_compare): New function.
27901 (expand_compare_loop): New function.
27902 (expand_block_compare): Call expand_compare_loop() when appropriate.
27903 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27904 option description.
27905 (-mblock-compare-inline-loop-limit): New option.
27906
27907 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27908
27909 PR target/83677
27910 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27911 Reverse order of second and third operands in first alternative.
27912 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27913 of first and second elements in UNSPEC_VPERMR vector.
27914 (altivec_expand_vec_perm_le): Likewise.
27915
27916 2018-01-08 Jeff Law <law@redhat.com>
27917
27918 PR rtl-optimizatin/81308
27919 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27920 (process_switch): If group_case_labels makes a change, then set
27921 cfg_altered.
27922 (pass_convert_switch::execute): If a switch is converted, then
27923 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27924
27925 PR rtl-optimization/81308
27926 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27927 splitting insns.
27928
27929 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27930
27931 PR target/83663 - Revert r255946
27932 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27933 generation for cases where splatting a value is not useful.
27934 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27935 across a vec_duplicate and a paradoxical subreg forming a vector
27936 mode to a vec_concat.
27937
27938 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27939
27940 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27941 -march=armv8.3-a variants.
27942 * config/arm/t-multilib: Likewise.
27943 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27944
27945 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27946
27947 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27948 to generate rtl.
27949 (cceq_ior_compare_complement): Give it a name so I can use it, and
27950 change boolean_or_operator predicate to boolean_operator so it can
27951 be used to generate a crand.
27952 (eqne): New code iterator.
27953 (bd/bd_neg): New code_attrs.
27954 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27955 a single define_insn.
27956 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27957 decrement (bdnzt/bdnzf/bdzt/bdzf).
27958 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27959 with the new names of the branch decrement patterns, and added the
27960 names of the branch decrement conditional patterns.
27961
27962 2018-01-08 Richard Biener <rguenther@suse.de>
27963
27964 PR tree-optimization/83563
27965 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27966 cache.
27967
27968 2018-01-08 Richard Biener <rguenther@suse.de>
27969
27970 PR middle-end/83713
27971 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27972
27973 2018-01-08 Richard Biener <rguenther@suse.de>
27974
27975 PR tree-optimization/83685
27976 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27977 references to abnormals.
27978
27979 2018-01-08 Richard Biener <rguenther@suse.de>
27980
27981 PR lto/83719
27982 * dwarf2out.c (output_indirect_strings): Handle empty
27983 skeleton_debug_str_hash.
27984 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27985
27986 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27987
27988 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27989 (emit_store_direct): Likewise.
27990 (arc_trampoline_adjust_address): Likewise.
27991 (arc_asm_trampoline_template): New function.
27992 (arc_initialize_trampoline): Use asm_trampoline_template.
27993 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27994 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27995 * config/arc/arc.md (flush_icache): Delete pattern.
27996
27997 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27998
27999 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28000 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28001 munaligned-access.
28002
28003 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28004
28005 PR target/83681
28006 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28007 by not USED_FOR_TARGET.
28008 (make_pass_resolve_sw_modes): Likewise.
28009
28010 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28011
28012 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28013 USED_FOR_TARGET.
28014
28015 2018-01-08 Richard Biener <rguenther@suse.de>
28016
28017 PR middle-end/83580
28018 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28019
28020 2018-01-08 Richard Biener <rguenther@suse.de>
28021
28022 PR middle-end/83517
28023 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28024
28025 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28026
28027 PR middle-end/81897
28028 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28029 basic blocks with a small number of successors.
28030 (convert_control_dep_chain_into_preds): Improve handling of
28031 forwarder blocks.
28032 (dump_predicates): Split apart into...
28033 (dump_pred_chain): ...here...
28034 (dump_pred_info): ...and here.
28035 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28036 (can_chain_union_be_invalidated_p): Improve check for invalidation
28037 of paths.
28038 (uninit_uses_cannot_happen): Avoid unnecessary if
28039 convert_control_dep_chain_into_preds yielded nothing.
28040
28041 2018-01-06 Martin Sebor <msebor@redhat.com>
28042
28043 PR tree-optimization/83640
28044 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28045 subtracting negative offset from size.
28046 (builtin_access::overlap): Adjust offset bounds of the access to fall
28047 within the size of the object if possible.
28048
28049 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28050
28051 PR rtl-optimization/83699
28052 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28053 extract_bit_field_as_subreg to cases in which the extracted
28054 value is also a vector.
28055
28056 * lra-constraints.c (process_alt_operands): Test for the equivalence
28057 substitutions when detecting a possible reload cycle.
28058
28059 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28060
28061 PR debug/83480
28062 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28063 by default if flag_selective_schedling{,2}. Formatting fixes.
28064
28065 PR rtl-optimization/83682
28066 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28067 if it has non-VECTOR_MODE element mode.
28068 (vec_duplicate_p): Likewise.
28069
28070 PR middle-end/83694
28071 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28072 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28073
28074 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28075
28076 PR target/83604
28077 * config/i386/i386-builtin.def
28078 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28079 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28080 Require also OPTION_MASK_ISA_AVX512F in addition to
28081 OPTION_MASK_ISA_GFNI.
28082 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28083 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28084 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28085 to OPTION_MASK_ISA_GFNI.
28086 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28087 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28088 OPTION_MASK_ISA_AVX512BW.
28089 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28090 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28091 addition to OPTION_MASK_ISA_GFNI.
28092 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28093 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28094 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28095 to OPTION_MASK_ISA_GFNI.
28096 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28097 a requirement for all ISAs rather than any of them with a few
28098 exceptions.
28099 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28100 processing.
28101 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28102 bitmasks to be enabled with 3 exceptions, instead of requiring any
28103 enabled ISA with lots of exceptions.
28104 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28105 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28106 Change avx512bw in isa attribute to avx512f.
28107 * config/i386/sgxintrin.h: Add license boilerplate.
28108 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28109 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28110 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28111 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28112 defined.
28113 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28114 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28115 temporarily sse2 rather than sse if not enabled already.
28116
28117 PR target/83604
28118 * config/i386/sse.md (VI248_VLBW): Rename to ...
28119 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28120 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28121 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28122 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28123 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28124 mode iterator instead of VI248_VLBW.
28125
28126 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28127
28128 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28129 (record_modified): Skip clobbers; add debug output.
28130 (param_change_prob): Use sreal frequencies.
28131
28132 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28133
28134 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28135 punt for user-aligned variables.
28136
28137 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28138
28139 * tree-chrec.c (chrec_contains_symbols): Return true for
28140 POLY_INT_CST.
28141
28142 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28143
28144 PR target/82439
28145 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28146 of (x|y) == x for BICS pattern.
28147
28148 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28149
28150 PR tree-optimization/83605
28151 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28152 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28153 can throw.
28154
28155 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28156
28157 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28158 * config/epiphany/rtems.h: New file.
28159
28160 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28161 Uros Bizjak <ubizjak@gmail.com>
28162
28163 PR target/83554
28164 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28165 QIreg_operand instead of register_operand predicate.
28166 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28167 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28168 comments instead of -fmitigate[-_]rop.
28169
28170 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28171
28172 PR bootstrap/81926
28173 * cgraphunit.c (symbol_table::compile): Switch to text_section
28174 before calling assembly_start debug hook.
28175 * run-rtl-passes.c (run_rtl_passes): Likewise.
28176 Include output.h.
28177
28178 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28179
28180 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28181 range_int_cst_p rather than !symbolic_range_p before calling
28182 extract_range_from_multiplicative_op_1.
28183
28184 2018-01-04 Jeff Law <law@redhat.com>
28185
28186 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28187 redundant test in assertion.
28188
28189 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28190
28191 * doc/rtl.texi: Document machine_mode wrapper classes.
28192
28193 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28194
28195 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28196 using tree_to_uhwi.
28197
28198 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28199
28200 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28201 the VEC_PERM_EXPR fold to fail.
28202
28203 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28204
28205 PR debug/83585
28206 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28207 to switched_sections.
28208
28209 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28210
28211 PR target/83680
28212 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28213 test for d.testing.
28214
28215 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28216
28217 PR target/83387
28218 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28219 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28220
28221 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28222
28223 PR debug/83666
28224 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28225 is BLKmode and bitpos not zero or mode change is needed.
28226
28227 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28228
28229 PR target/83675
28230 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28231 TARGET_VIS2.
28232
28233 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28234
28235 PR target/83628
28236 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28237 instead of MULT rtx. Update all corresponding splitters.
28238 (*saddl_se): Ditto.
28239 (*ssub<modesuffix>): Ditto.
28240 (*ssubl_se): Ditto.
28241 (*cmp_sadd_di): Update split patterns.
28242 (*cmp_sadd_si): Ditto.
28243 (*cmp_sadd_sidi): Ditto.
28244 (*cmp_ssub_di): Ditto.
28245 (*cmp_ssub_si): Ditto.
28246 (*cmp_ssub_sidi): Ditto.
28247 * config/alpha/predicates.md (const23_operand): New predicate.
28248 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28249 Look for ASHIFT, not MULT inner operand.
28250 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28251
28252 2018-01-04 Martin Liska <mliska@suse.cz>
28253
28254 PR gcov-profile/83669
28255 * gcov.c (output_intermediate_file): Add version to intermediate
28256 gcov file.
28257 * doc/gcov.texi: Document new field 'version' in intermediate
28258 file format. Fix location of '-k' option of gcov command.
28259
28260 2018-01-04 Martin Liska <mliska@suse.cz>
28261
28262 PR ipa/82352
28263 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28264
28265 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28266
28267 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28268
28269 2018-01-03 Martin Sebor <msebor@redhat.com>
28270
28271 PR tree-optimization/83655
28272 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28273 checking calls with invalid arguments.
28274
28275 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28276
28277 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28278 (vectorizable_mask_load_store): Delete.
28279 (vectorizable_call): Return false for masked loads and stores.
28280 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28281 instead of gimple_assign_rhs1.
28282 (vectorizable_load): Handle IFN_MASK_LOAD.
28283 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28284
28285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28286
28287 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28288 split out from..,
28289 (vectorizable_mask_load_store): ...here.
28290 (vectorizable_load): ...and here.
28291
28292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28293
28294 * tree-vect-stmts.c (vect_build_all_ones_mask)
28295 (vect_build_zero_merge_argument): New functions, split out from...
28296 (vectorizable_load): ...here.
28297
28298 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28299
28300 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28301 split out from...
28302 (vectorizable_mask_load_store): ...here.
28303 (vectorizable_store): ...and here.
28304
28305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28306
28307 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28308 split out from...
28309 (vectorizable_mask_load_store): ...here.
28310
28311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28312
28313 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28314 (vect_model_store_cost): Take a vec_load_store_type instead of a
28315 vect_def_type.
28316 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28317 (vect_model_store_cost): Take a vec_load_store_type instead of a
28318 vect_def_type.
28319 (vectorizable_mask_load_store): Update accordingly.
28320 (vectorizable_store): Likewise.
28321 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28322
28323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28324
28325 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28326 IFN_MASK_LOAD calls here rather than...
28327 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28328
28329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28330 Alan Hayward <alan.hayward@arm.com>
28331 David Sherwood <david.sherwood@arm.com>
28332
28333 * expmed.c (extract_bit_field_1): For vector extracts,
28334 fall back to extract_bit_field_as_subreg if vec_extract
28335 isn't available.
28336
28337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28338 Alan Hayward <alan.hayward@arm.com>
28339 David Sherwood <david.sherwood@arm.com>
28340
28341 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28342 they are variable or constant sized.
28343 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28344 slots for constant-sized data.
28345
28346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28347 Alan Hayward <alan.hayward@arm.com>
28348 David Sherwood <david.sherwood@arm.com>
28349
28350 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28351 handling COND_EXPRs with boolean comparisons, try to find a better
28352 basis for the mask type than the boolean itself.
28353
28354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28355
28356 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28357 is calculated and how it can be overridden.
28358 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28359 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28360 if defined.
28361 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28362 if nonzero.
28363
28364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28365 Alan Hayward <alan.hayward@arm.com>
28366 David Sherwood <david.sherwood@arm.com>
28367
28368 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28369 Remove the mode argument.
28370 (aarch64_simd_valid_immediate): Remove the mode and inverse
28371 arguments.
28372 * config/aarch64/iterators.md (bitsize): New iterator.
28373 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28374 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28375 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28376 aarch64_simd_valid_immediate.
28377 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28378 (aarch64_reg_or_bic_imm): Likewise.
28379 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28380 with an insn_type enum and msl with a modifier_type enum.
28381 Replace element_width with a scalar_mode. Change the shift
28382 to unsigned int. Add constructors for scalar_float_mode and
28383 scalar_int_mode elements.
28384 (aarch64_vect_float_const_representable_p): Delete.
28385 (aarch64_can_const_movi_rtx_p)
28386 (aarch64_simd_scalar_immediate_valid_for_move)
28387 (aarch64_simd_make_constant): Update call to
28388 aarch64_simd_valid_immediate.
28389 (aarch64_advsimd_valid_immediate_hs): New function.
28390 (aarch64_advsimd_valid_immediate): Likewise.
28391 (aarch64_simd_valid_immediate): Remove mode and inverse
28392 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28393 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28394 and aarch64_float_const_representable_p on the result.
28395 (aarch64_output_simd_mov_immediate): Remove mode argument.
28396 Update call to aarch64_simd_valid_immediate and use of
28397 simd_immediate_info.
28398 (aarch64_output_scalar_simd_mov_immediate): Update call
28399 accordingly.
28400
28401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28402 Alan Hayward <alan.hayward@arm.com>
28403 David Sherwood <david.sherwood@arm.com>
28404
28405 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28406 (mode_nunits): Likewise CONST_MODE_NUNITS.
28407 * machmode.def (ADJUST_NUNITS): Document.
28408 * genmodes.c (mode_data::need_nunits_adj): New field.
28409 (blank_mode): Update accordingly.
28410 (adj_nunits): New variable.
28411 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28412 parameter.
28413 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28414 listed in adj_nunits.
28415 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28416 listed in adj_nunits. Don't emit case statements for such modes.
28417 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28418 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28419 nothing if adj_nunits is nonnull.
28420 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28421 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28422 (emit_mode_fbit): Update use of print_maybe_const_decl.
28423 (emit_move_size): Likewise. Treat the array as non-const
28424 if adj_nunits.
28425 (emit_mode_adjustments): Handle adj_nunits.
28426
28427 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28428
28429 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28430 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28431 (VECTOR_MODES): Use it.
28432 (make_vector_modes): Take the prefix as an argument.
28433
28434 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28435 Alan Hayward <alan.hayward@arm.com>
28436 David Sherwood <david.sherwood@arm.com>
28437
28438 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28439 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28440 for MODE_VECTOR_BOOL.
28441 * machmode.def (VECTOR_BOOL_MODE): Document.
28442 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28443 (make_vector_bool_mode): New function.
28444 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28445 MODE_VECTOR_BOOL.
28446 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28447 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28448 Likewise.
28449 * stor-layout.c (int_mode_for_mode): Likewise.
28450 * tree.c (build_vector_type_for_mode): Likewise.
28451 * varasm.c (output_constant_pool_2): Likewise.
28452 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28453 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28454 for MODE_VECTOR_BOOL.
28455 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28456 of mode class checks.
28457 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28458 instead of a list of mode class checks.
28459 (expand_vector_scalar_condition): Likewise.
28460 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28461
28462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28463 Alan Hayward <alan.hayward@arm.com>
28464 David Sherwood <david.sherwood@arm.com>
28465
28466 * machmode.h (mode_size): Change from unsigned short to
28467 poly_uint16_pod.
28468 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28469 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28470 or if measurement_type is not polynomial.
28471 (fixed_size_mode::includes_p): Check for constant-sized modes.
28472 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28473 return a poly_uint16 rather than an unsigned short.
28474 (emit_mode_size): Change the type of mode_size from unsigned short
28475 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28476 (emit_mode_adjustments): Cope with polynomial vector sizes.
28477 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28478 for GET_MODE_SIZE.
28479 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28480 for GET_MODE_SIZE.
28481 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28482 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28483 * caller-save.c (setup_save_areas): Likewise.
28484 (replace_reg_with_saved_mem): Likewise.
28485 * calls.c (emit_library_call_value_1): Likewise.
28486 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28487 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28488 (gen_lowpart_for_combine): Likewise.
28489 * convert.c (convert_to_integer_1): Likewise.
28490 * cse.c (equiv_constant, cse_insn): Likewise.
28491 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28492 (cselib_subst_to_values): Likewise.
28493 * dce.c (word_dce_process_block): Likewise.
28494 * df-problems.c (df_word_lr_mark_ref): Likewise.
28495 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28496 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28497 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28498 (rtl_for_decl_location): Likewise.
28499 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28500 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28501 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28502 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28503 (expand_expr_real_1): Likewise.
28504 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28505 (pad_below): Likewise.
28506 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28507 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28508 * ira.c (get_subreg_tracking_sizes): Likewise.
28509 * ira-build.c (ira_create_allocno_objects): Likewise.
28510 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28511 (ira_sort_regnos_for_alter_reg): Likewise.
28512 * ira-costs.c (record_operand_costs): Likewise.
28513 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28514 (resolve_simple_move): Likewise.
28515 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28516 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28517 (lra_constraints): Likewise.
28518 (CONST_POOL_OK_P): Reject variable-sized modes.
28519 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28520 (add_pseudo_to_slot, lra_spill): Likewise.
28521 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28522 * optabs-query.c (get_best_extraction_insn): Likewise.
28523 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28524 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28525 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28526 * recog.c (offsettable_address_addr_space_p): Likewise.
28527 * regcprop.c (maybe_mode_change): Likewise.
28528 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28529 * regrename.c (build_def_use): Likewise.
28530 * regstat.c (dump_reg_info): Likewise.
28531 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28532 (find_reloads, find_reloads_subreg_address): Likewise.
28533 * reload1.c (eliminate_regs_1): Likewise.
28534 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28535 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28536 (simplify_binary_operation_1, simplify_subreg): Likewise.
28537 * targhooks.c (default_function_arg_padding): Likewise.
28538 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28539 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28540 (verify_gimple_assign_ternary): Likewise.
28541 * tree-inline.c (estimate_move_cost): Likewise.
28542 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28543 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28544 (get_address_cost_ainc): Likewise.
28545 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28546 (vect_supportable_dr_alignment): Likewise.
28547 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28548 (vectorizable_reduction): Likewise.
28549 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28550 (vectorizable_operation, vectorizable_load): Likewise.
28551 * tree.c (build_same_sized_truth_vector_type): Likewise.
28552 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28553 * var-tracking.c (emit_note_insn_var_location): Likewise.
28554 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28555 (ADDR_VEC_ALIGN): Likewise.
28556
28557 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28558 Alan Hayward <alan.hayward@arm.com>
28559 David Sherwood <david.sherwood@arm.com>
28560
28561 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28562 unsigned short.
28563 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28564 or if measurement_type is polynomial.
28565 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28566 * combine.c (make_extraction): Likewise.
28567 * dse.c (find_shift_sequence): Likewise.
28568 * dwarf2out.c (mem_loc_descriptor): Likewise.
28569 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28570 (extract_bit_field, extract_low_bits): Likewise.
28571 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28572 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28573 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28574 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28575 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28576 * reload.c (find_reloads): Likewise.
28577 * reload1.c (alter_reg): Likewise.
28578 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28579 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28580 * tree-if-conv.c (predicate_mem_writes): Likewise.
28581 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28582 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28583 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28584 * valtrack.c (dead_debug_insert_temp): Likewise.
28585 * varasm.c (mergeable_constant_section): Likewise.
28586 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28587
28588 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28589 Alan Hayward <alan.hayward@arm.com>
28590 David Sherwood <david.sherwood@arm.com>
28591
28592 * expr.c (expand_assignment): Cope with polynomial mode sizes
28593 when assigning to a CONCAT.
28594
28595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28596 Alan Hayward <alan.hayward@arm.com>
28597 David Sherwood <david.sherwood@arm.com>
28598
28599 * machmode.h (mode_precision): Change from unsigned short to
28600 poly_uint16_pod.
28601 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28602 short.
28603 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28604 or if measurement_type is not polynomial.
28605 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28606 in which the mode is already known to be a scalar_int_mode.
28607 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28608 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28609 initializer.
28610 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28611 for GET_MODE_PRECISION.
28612 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28613 for GET_MODE_PRECISION.
28614 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28615 as polynomial.
28616 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28617 (expand_field_assignment, make_extraction): Likewise.
28618 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28619 (get_last_value): Likewise.
28620 * convert.c (convert_to_integer_1): Likewise.
28621 * cse.c (cse_insn): Likewise.
28622 * expr.c (expand_expr_real_1): Likewise.
28623 * lra-constraints.c (simplify_operand_subreg): Likewise.
28624 * optabs-query.c (can_atomic_load_p): Likewise.
28625 * optabs.c (expand_atomic_load): Likewise.
28626 (expand_atomic_store): Likewise.
28627 * ree.c (combine_reaching_defs): Likewise.
28628 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28629 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28630 * tree.h (type_has_mode_precision_p): Likewise.
28631 * ubsan.c (instrument_si_overflow): Likewise.
28632
28633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28634 Alan Hayward <alan.hayward@arm.com>
28635 David Sherwood <david.sherwood@arm.com>
28636
28637 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28638 polynomial numbers of units.
28639 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28640 (valid_vector_subparts_p): New function.
28641 (build_vector_type): Remove temporary shim and take the number
28642 of units as a poly_uint64 rather than an int.
28643 (build_opaque_vector_type): Take the number of units as a
28644 poly_uint64 rather than an int.
28645 * tree.c (build_vector_from_ctor): Handle polynomial
28646 TYPE_VECTOR_SUBPARTS.
28647 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28648 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28649 (build_vector_from_val): If the number of units is variable,
28650 use build_vec_duplicate_cst for constant operands and
28651 VEC_DUPLICATE_EXPR otherwise.
28652 (make_vector_type): Remove temporary is_constant ().
28653 (build_vector_type, build_opaque_vector_type): Take the number of
28654 units as a poly_uint64 rather than an int.
28655 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28656 VECTOR_CST_NELTS.
28657 * cfgexpand.c (expand_debug_expr): Likewise.
28658 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28659 (store_constructor, expand_expr_real_1): Likewise.
28660 (const_scalar_mask_from_tree): Likewise.
28661 * fold-const-call.c (fold_const_reduction): Likewise.
28662 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28663 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28664 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28665 (fold_relational_const): Likewise.
28666 (native_interpret_vector): Likewise. Change the size from an
28667 int to an unsigned int.
28668 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28669 TYPE_VECTOR_SUBPARTS.
28670 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28671 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28672 duplicating a non-constant operand into a variable-length vector.
28673 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28674 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28675 * ipa-icf.c (sem_variable::equals): Likewise.
28676 * match.pd: Likewise.
28677 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28678 * print-tree.c (print_node): Likewise.
28679 * stor-layout.c (layout_type): Likewise.
28680 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28681 * tree-cfg.c (verify_gimple_comparison): Likewise.
28682 (verify_gimple_assign_binary): Likewise.
28683 (verify_gimple_assign_ternary): Likewise.
28684 (verify_gimple_assign_single): Likewise.
28685 * tree-pretty-print.c (dump_generic_node): Likewise.
28686 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28687 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28688 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28689 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28690 (vect_shift_permute_load_chain): Likewise.
28691 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28692 (expand_vector_condition, optimize_vector_constructor): Likewise.
28693 (lower_vec_perm, get_compute_type): Likewise.
28694 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28695 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28696 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28697 (vect_recog_mask_conversion_pattern): Likewise.
28698 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28699 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28700 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28701 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28702 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28703 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28704 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28705 (supportable_widening_operation): Likewise.
28706 (supportable_narrowing_operation): Likewise.
28707 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28708 Likewise.
28709 * varasm.c (output_constant): Likewise.
28710
28711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28712 Alan Hayward <alan.hayward@arm.com>
28713 David Sherwood <david.sherwood@arm.com>
28714
28715 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28716 so that both the length == 3 and length != 3 cases set up their
28717 own permute vectors. Add comments explaining why we know the
28718 number of elements is constant.
28719 (vect_permute_load_chain): Likewise.
28720
28721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28722 Alan Hayward <alan.hayward@arm.com>
28723 David Sherwood <david.sherwood@arm.com>
28724
28725 * machmode.h (mode_nunits): Change from unsigned char to
28726 poly_uint16_pod.
28727 (ONLY_FIXED_SIZE_MODES): New macro.
28728 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28729 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28730 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28731 New typedefs.
28732 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28733 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28734 or if measurement_type is not polynomial.
28735 * genmodes.c (ZERO_COEFFS): New macro.
28736 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28737 poly_uint16.
28738 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28739 Use ZERO_COEFFS when emitting initializers.
28740 * data-streamer.h (bp_pack_poly_value): New function.
28741 (bp_unpack_poly_value): Likewise.
28742 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28743 for GET_MODE_NUNITS.
28744 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28745 for GET_MODE_NUNITS.
28746 * tree.c (make_vector_type): Remove temporary shim and make
28747 the real function take the number of units as a poly_uint64
28748 rather than an int.
28749 (build_vector_type_for_mode): Handle polynomial nunits.
28750 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28751 * emit-rtl.c (const_vec_series_p_1): Likewise.
28752 (gen_rtx_CONST_VECTOR): Likewise.
28753 * fold-const.c (test_vec_duplicate_folding): Likewise.
28754 * genrecog.c (validate_pattern): Likewise.
28755 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28756 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28757 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28758 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28759 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28760 * rtlanal.c (subreg_get_info): Likewise.
28761 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28762 (vect_grouped_load_supported): Likewise.
28763 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28764 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28765 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28766 (simplify_const_unary_operation, simplify_binary_operation_1)
28767 (simplify_const_binary_operation, simplify_ternary_operation)
28768 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28769 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28770 instead of CONST_VECTOR_NUNITS.
28771 * varasm.c (output_constant_pool_2): Likewise.
28772 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28773 explicit-encoded elements in the XVEC for variable-length vectors.
28774
28775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28776
28777 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28778
28779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28780 Alan Hayward <alan.hayward@arm.com>
28781 David Sherwood <david.sherwood@arm.com>
28782
28783 * coretypes.h (fixed_size_mode): Declare.
28784 (fixed_size_mode_pod): New typedef.
28785 * builtins.h (target_builtins::x_apply_args_mode)
28786 (target_builtins::x_apply_result_mode): Change type to
28787 fixed_size_mode_pod.
28788 * builtins.c (apply_args_size, apply_result_size, result_vector)
28789 (expand_builtin_apply_args_1, expand_builtin_apply)
28790 (expand_builtin_return): Update accordingly.
28791
28792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28793
28794 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28795 * cselib.c (cselib_hash_rtx): Likewise.
28796 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28797 CONST_VECTOR encoding.
28798
28799 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28800 Jeff Law <law@redhat.com>
28801
28802 PR target/83641
28803 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28804 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28805 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28806 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28807
28808 PR target/83641
28809 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28810 explicitly probe *sp in a noreturn function if there were any callee
28811 register saves or frame pointer is needed.
28812
28813 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28814
28815 PR debug/83621
28816 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28817 BLKmode for ternary, binary or unary expressions.
28818
28819 PR debug/83645
28820 * var-tracking.c (delete_vta_debug_insn): New inline function.
28821 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28822 insns from get_insns () to NULL instead of each bb separately.
28823 Use delete_vta_debug_insn. No longer static.
28824 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28825 delete_vta_debug_insns callers.
28826 * rtl.h (delete_vta_debug_insns): Declare.
28827 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28828 instead of variable_tracking_main.
28829
28830 2018-01-03 Martin Sebor <msebor@redhat.com>
28831
28832 PR tree-optimization/83603
28833 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28834 arguments past the endof the argument list in functions declared
28835 without a prototype.
28836 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28837 Avoid checking when arguments are null.
28838
28839 2018-01-03 Martin Sebor <msebor@redhat.com>
28840
28841 PR c/83559
28842 * doc/extend.texi (attribute const): Fix a typo.
28843 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28844 issuing -Wsuggest-attribute for void functions.
28845
28846 2018-01-03 Martin Sebor <msebor@redhat.com>
28847
28848 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28849 offset_int::from instead of wide_int::to_shwi.
28850 (maybe_diag_overlap): Remove assertion.
28851 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28852 * gimple-ssa-sprintf.c (format_directive): Same.
28853 (parse_directive): Same.
28854 (sprintf_dom_walker::compute_format_length): Same.
28855 (try_substitute_return_value): Same.
28856
28857 2018-01-03 Jeff Law <law@redhat.com>
28858
28859 PR middle-end/83654
28860 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28861 non-constant residual for zero at runtime and avoid probing in
28862 that case. Reorganize code for trailing problem to mirror handling
28863 of the residual.
28864
28865 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28866
28867 PR tree-optimization/83501
28868 * tree-ssa-strlen.c (get_string_cst): New.
28869 (handle_char_store): Call get_string_cst.
28870
28871 2018-01-03 Martin Liska <mliska@suse.cz>
28872
28873 PR tree-optimization/83593
28874 * tree-ssa-strlen.c: Include tree-cfg.h.
28875 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28876 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28877 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28878 to false.
28879 (strlen_dom_walker::before_dom_children): Call
28880 gimple_purge_dead_eh_edges. Dump tranformation with details
28881 dump flags.
28882 (strlen_dom_walker::before_dom_children): Update call by adding
28883 new argument cleanup_eh.
28884 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28885
28886 2018-01-03 Martin Liska <mliska@suse.cz>
28887
28888 PR ipa/83549
28889 * cif-code.def (VARIADIC_THUNK): New enum value.
28890 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28891 thunks.
28892
28893 2018-01-03 Jan Beulich <jbeulich@suse.com>
28894
28895 * sse.md (mov<mode>_internal): Tighten condition for when to use
28896 vmovdqu<ssescalarsize> for TI and OI modes.
28897
28898 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28899
28900 Update copyright years.
28901
28902 2018-01-03 Martin Liska <mliska@suse.cz>
28903
28904 PR ipa/83594
28905 * ipa-visibility.c (function_and_variable_visibility): Skip
28906 functions with noipa attribure.
28907
28908 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28909
28910 * gcc.c (process_command): Update copyright notice dates.
28911 * gcov-dump.c (print_version): Ditto.
28912 * gcov.c (print_version): Ditto.
28913 * gcov-tool.c (print_version): Ditto.
28914 * gengtype.c (create_file): Ditto.
28915 * doc/cpp.texi: Bump @copying's copyright year.
28916 * doc/cppinternals.texi: Ditto.
28917 * doc/gcc.texi: Ditto.
28918 * doc/gccint.texi: Ditto.
28919 * doc/gcov.texi: Ditto.
28920 * doc/install.texi: Ditto.
28921 * doc/invoke.texi: Ditto.
28922
28923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28924
28925 * vector-builder.h (vector_builder::m_full_nelts): Change from
28926 unsigned int to poly_uint64.
28927 (vector_builder::full_nelts): Update prototype accordingly.
28928 (vector_builder::new_vector): Likewise.
28929 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28930 (vector_builder::operator ==): Likewise.
28931 (vector_builder::finalize): Likewise.
28932 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28933 Take the number of elements as a poly_uint64 rather than an
28934 unsigned int.
28935 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28936 from unsigned int to poly_uint64.
28937 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28938 (vec_perm_indices::new_vector): Likewise.
28939 (vec_perm_indices::length): Likewise.
28940 (vec_perm_indices::nelts_per_input): Likewise.
28941 (vec_perm_indices::input_nelts): Likewise.
28942 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28943 number of elements per input as a poly_uint64 rather than an
28944 unsigned int. Use the original encoding for variable-length
28945 vectors, rather than clamping each individual element.
28946 For the second and subsequent elements in each pattern,
28947 clamp the step and base before clamping their sum.
28948 (vec_perm_indices::series_p): Handle polynomial element counts.
28949 (vec_perm_indices::all_in_range_p): Likewise.
28950 (vec_perm_indices_to_tree): Likewise.
28951 (vec_perm_indices_to_rtx): Likewise.
28952 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28953 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28954 (tree_vector_builder::new_binary_operation): Handle polynomial
28955 element counts. Return false if we need to know the number
28956 of elements at compile time.
28957 * fold-const.c (fold_vec_perm): Punt if the number of elements
28958 isn't known at compile time.
28959
28960 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28961
28962 * vec-perm-indices.h (vec_perm_builder): Change element type
28963 from HOST_WIDE_INT to poly_int64.
28964 (vec_perm_indices::element_type): Update accordingly.
28965 (vec_perm_indices::clamp): Handle polynomial element_types.
28966 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28967 (vec_perm_indices::all_in_range_p): Likewise.
28968 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28969 than shwi trees.
28970 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28971 polynomial vec_perm_indices element types.
28972 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28973 * fold-const.c (fold_vec_perm): Likewise.
28974 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28975 * tree-vect-generic.c (lower_vec_perm): Likewise.
28976 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28977 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28978 element type to HOST_WIDE_INT.
28979
28980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28981 Alan Hayward <alan.hayward@arm.com>
28982 David Sherwood <david.sherwood@arm.com>
28983
28984 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28985 rather than an int. Use plus_constant.
28986 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28987 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28988
28989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28990 Alan Hayward <alan.hayward@arm.com>
28991 David Sherwood <david.sherwood@arm.com>
28992
28993 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28994 a HOST_WIDE_INT to a poly_int64.
28995
28996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28997 Alan Hayward <alan.hayward@arm.com>
28998 David Sherwood <david.sherwood@arm.com>
28999
29000 * calls.c (load_register_parameters): Cope with polynomial
29001 mode sizes. Require a constant size for BLKmode parameters
29002 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29003 forces a parameter to be padded at the lsb end in order to
29004 fill a complete number of words, require the parameter size
29005 to be ordered wrt UNITS_PER_WORD.
29006
29007 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29008 Alan Hayward <alan.hayward@arm.com>
29009 David Sherwood <david.sherwood@arm.com>
29010
29011 * reload1.c (spill_stack_slot_width): Change element type
29012 from unsigned int to poly_uint64_pod.
29013 (alter_reg): Treat mode sizes as polynomial.
29014
29015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29016 Alan Hayward <alan.hayward@arm.com>
29017 David Sherwood <david.sherwood@arm.com>
29018
29019 * reload.c (complex_word_subreg_p): New function.
29020 (reload_inner_reg_of_subreg, push_reload): Use it.
29021
29022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29023 Alan Hayward <alan.hayward@arm.com>
29024 David Sherwood <david.sherwood@arm.com>
29025
29026 * lra-constraints.c (process_alt_operands): Reject matched
29027 operands whose sizes aren't ordered.
29028 (match_reload): Refer to this check here.
29029
29030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29031 Alan Hayward <alan.hayward@arm.com>
29032 David Sherwood <david.sherwood@arm.com>
29033
29034 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29035 that the mode size is in the set {1, 2, 4, 8, 16}.
29036
29037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29038 Alan Hayward <alan.hayward@arm.com>
29039 David Sherwood <david.sherwood@arm.com>
29040
29041 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29042 Use plus_constant instead of gen_rtx_PLUS.
29043
29044 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29045 Alan Hayward <alan.hayward@arm.com>
29046 David Sherwood <david.sherwood@arm.com>
29047
29048 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29049 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29050 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29051 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29052 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29053 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29054 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29055 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29056 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29057 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29058 a poly_int64.
29059 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29060 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29061 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29062 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29063 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29064 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29065 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29066 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29067 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29068 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29069 function.
29070 * expr.c (emit_move_resolve_push): Treat the input and result
29071 of PUSH_ROUNDING as a poly_int64.
29072 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29073 (emit_push_insn): Likewise.
29074 * lra-eliminations.c (mark_not_eliminable): Likewise.
29075 * recog.c (push_operand): Likewise.
29076 * reload1.c (elimination_effects): Likewise.
29077 * rtlanal.c (nonzero_bits1): Likewise.
29078 * calls.c (store_one_arg): Likewise. Require the padding to be
29079 known at compile time.
29080
29081 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29082 Alan Hayward <alan.hayward@arm.com>
29083 David Sherwood <david.sherwood@arm.com>
29084
29085 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29086 Use plus_constant instead of gen_rtx_PLUS.
29087
29088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29089 Alan Hayward <alan.hayward@arm.com>
29090 David Sherwood <david.sherwood@arm.com>
29091
29092 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29093 rather than an int.
29094
29095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29096 Alan Hayward <alan.hayward@arm.com>
29097 David Sherwood <david.sherwood@arm.com>
29098
29099 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29100 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29101 via stack temporaries. Treat the mode size as polynomial too.
29102
29103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29104 Alan Hayward <alan.hayward@arm.com>
29105 David Sherwood <david.sherwood@arm.com>
29106
29107 * expr.c (expand_expr_real_2): When handling conversions involving
29108 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29109 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29110 as a poly_uint64 too.
29111
29112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29113 Alan Hayward <alan.hayward@arm.com>
29114 David Sherwood <david.sherwood@arm.com>
29115
29116 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29117
29118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29119 Alan Hayward <alan.hayward@arm.com>
29120 David Sherwood <david.sherwood@arm.com>
29121
29122 * combine.c (can_change_dest_mode): Handle polynomial
29123 REGMODE_NATURAL_SIZE.
29124 * expmed.c (store_bit_field_1): Likewise.
29125 * expr.c (store_constructor): Likewise.
29126 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29127 and polynomial REGMODE_NATURAL_SIZE.
29128 (gen_lowpart_common): Likewise.
29129 * reginfo.c (record_subregs_of_mode): Likewise.
29130 * rtlanal.c (read_modify_subreg_p): Likewise.
29131
29132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29133 Alan Hayward <alan.hayward@arm.com>
29134 David Sherwood <david.sherwood@arm.com>
29135
29136 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29137 numbers of elements.
29138
29139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29140 Alan Hayward <alan.hayward@arm.com>
29141 David Sherwood <david.sherwood@arm.com>
29142
29143 * match.pd: Cope with polynomial numbers of vector elements.
29144
29145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29146 Alan Hayward <alan.hayward@arm.com>
29147 David Sherwood <david.sherwood@arm.com>
29148
29149 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29150 in a POINTER_PLUS_EXPR.
29151
29152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29153 Alan Hayward <alan.hayward@arm.com>
29154 David Sherwood <david.sherwood@arm.com>
29155
29156 * omp-simd-clone.c (simd_clone_subparts): New function.
29157 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29158 (ipa_simd_modify_function_body): Likewise.
29159
29160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29161 Alan Hayward <alan.hayward@arm.com>
29162 David Sherwood <david.sherwood@arm.com>
29163
29164 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29165 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29166 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29167 (expand_vector_condition, vector_element): Likewise.
29168 (subparts_gt): New function.
29169 (get_compute_type): Use subparts_gt.
29170 (count_type_subparts): Delete.
29171 (expand_vector_operations_1): Use subparts_gt instead of
29172 count_type_subparts.
29173
29174 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29175 Alan Hayward <alan.hayward@arm.com>
29176 David Sherwood <david.sherwood@arm.com>
29177
29178 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29179 (vect_compile_time_alias): ...this new function. Do the calculation
29180 on poly_ints rather than trees.
29181 (vect_prune_runtime_alias_test_list): Update call accordingly.
29182
29183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29184 Alan Hayward <alan.hayward@arm.com>
29185 David Sherwood <david.sherwood@arm.com>
29186
29187 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29188 numbers of units.
29189 (vect_schedule_slp_instance): Likewise.
29190
29191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29192 Alan Hayward <alan.hayward@arm.com>
29193 David Sherwood <david.sherwood@arm.com>
29194
29195 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29196 constant and extern definitions for variable-length vectors.
29197 (vect_get_constant_vectors): Note that the number of units
29198 is known to be constant.
29199
29200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29201 Alan Hayward <alan.hayward@arm.com>
29202 David Sherwood <david.sherwood@arm.com>
29203
29204 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29205 of units as polynomial. Choose between WIDE and NARROW based
29206 on multiple_p.
29207
29208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29209 Alan Hayward <alan.hayward@arm.com>
29210 David Sherwood <david.sherwood@arm.com>
29211
29212 * tree-vect-stmts.c (simd_clone_subparts): New function.
29213 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29214
29215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29216 Alan Hayward <alan.hayward@arm.com>
29217 David Sherwood <david.sherwood@arm.com>
29218
29219 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29220 vectors as polynomial. Use build_index_vector for
29221 IFN_GOMP_SIMD_LANE.
29222
29223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29224 Alan Hayward <alan.hayward@arm.com>
29225 David Sherwood <david.sherwood@arm.com>
29226
29227 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29228 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29229 for variable-length vectors.
29230 (vectorizable_mask_load_store): Treat the number of units as
29231 polynomial, asserting that it is constant if the condition has
29232 already been enforced.
29233 (vectorizable_store, vectorizable_load): Likewise.
29234
29235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29236 Alan Hayward <alan.hayward@arm.com>
29237 David Sherwood <david.sherwood@arm.com>
29238
29239 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29240 of units as polynomial. Punt if we can't tell at compile time
29241 which vector contains the final result.
29242
29243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29244 Alan Hayward <alan.hayward@arm.com>
29245 David Sherwood <david.sherwood@arm.com>
29246
29247 * tree-vect-loop.c (vectorizable_induction): Treat the number
29248 of units as polynomial. Punt on SLP inductions. Use an integer
29249 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29250 cast of such a series for variable-length floating-point
29251 reductions.
29252
29253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29254 Alan Hayward <alan.hayward@arm.com>
29255 David Sherwood <david.sherwood@arm.com>
29256
29257 * tree.h (build_index_vector): Declare.
29258 * tree.c (build_index_vector): New function.
29259 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29260 of units as polynomial, forcibly converting it to a constant if
29261 vectorizable_reduction has already enforced the condition.
29262 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29263 to create a {1,2,3,...} vector.
29264 (vectorizable_reduction): Treat the number of units as polynomial.
29265 Choose vectype_in based on the largest scalar element size rather
29266 than the smallest number of units. Enforce the restrictions
29267 relied on above.
29268
29269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29270 Alan Hayward <alan.hayward@arm.com>
29271 David Sherwood <david.sherwood@arm.com>
29272
29273 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29274 number of units as polynomial.
29275
29276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29277 Alan Hayward <alan.hayward@arm.com>
29278 David Sherwood <david.sherwood@arm.com>
29279
29280 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29281 * target.def (autovectorize_vector_sizes): Return the vector sizes
29282 by pointer, using vector_sizes rather than a bitmask.
29283 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29284 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29285 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29286 Likewise.
29287 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29288 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29289 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29290 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29291 * omp-general.c (omp_max_vf): Likewise.
29292 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29293 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29294 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29295 * tree-vect-slp.c (vect_slp_bb): Likewise.
29296 * doc/tm.texi: Regenerate.
29297 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29298 to a poly_uint64.
29299 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29300 the vector size as a poly_uint64 rather than an unsigned int.
29301 (current_vector_size): Change from an unsigned int to a poly_uint64.
29302 (get_vectype_for_scalar_type): Update accordingly.
29303 * tree.h (build_truth_vector_type): Take the size and number of
29304 units as a poly_uint64 rather than an unsigned int.
29305 (build_vector_type): Add a temporary overload that takes
29306 the number of units as a poly_uint64 rather than an unsigned int.
29307 * tree.c (make_vector_type): Likewise.
29308 (build_truth_vector_type): Take the number of units as a poly_uint64
29309 rather than an unsigned int.
29310
29311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29312 Alan Hayward <alan.hayward@arm.com>
29313 David Sherwood <david.sherwood@arm.com>
29314
29315 * target.def (get_mask_mode): Take the number of units and length
29316 as poly_uint64s rather than unsigned ints.
29317 * targhooks.h (default_get_mask_mode): Update accordingly.
29318 * targhooks.c (default_get_mask_mode): Likewise.
29319 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29320 * doc/tm.texi: Regenerate.
29321
29322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29323 Alan Hayward <alan.hayward@arm.com>
29324 David Sherwood <david.sherwood@arm.com>
29325
29326 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29327 * omp-general.c (omp_max_vf): Likewise.
29328 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29329 (expand_omp_simd): Handle polynomial safelen.
29330 * omp-low.c (omplow_simd_context): Add a default constructor.
29331 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29332 (lower_rec_simd_input_clauses): Update accordingly.
29333 (lower_rec_input_clauses): Likewise.
29334
29335 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29336 Alan Hayward <alan.hayward@arm.com>
29337 David Sherwood <david.sherwood@arm.com>
29338
29339 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29340 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29341 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29342 (vect_analyze_slp_cost): Likewise.
29343 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29344 (vect_model_load_cost): Likewise.
29345
29346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29347 Alan Hayward <alan.hayward@arm.com>
29348 David Sherwood <david.sherwood@arm.com>
29349
29350 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29351 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29352 from an unsigned int * to a poly_uint64_pod *.
29353 (calculate_unrolling_factor): New function.
29354 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29355
29356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29357 Alan Hayward <alan.hayward@arm.com>
29358 David Sherwood <david.sherwood@arm.com>
29359
29360 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29361 from an unsigned int to a poly_uint64.
29362 (_loop_vec_info::slp_unrolling_factor): Likewise.
29363 (_loop_vec_info::vectorization_factor): Change from an int
29364 to a poly_uint64.
29365 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29366 (vect_get_num_vectors): New function.
29367 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29368 (vect_get_num_copies): Use vect_get_num_vectors.
29369 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29370 to an unsigned int *.
29371 (vect_analyze_data_refs): Change min_vf from an int * to a
29372 poly_uint64 *.
29373 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29374 than an unsigned HOST_WIDE_INT.
29375 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29376 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29377 to an unsigned int *.
29378 (vect_analyze_data_ref_dependences): Likewise.
29379 (vect_compute_data_ref_alignment): Handle polynomial vf.
29380 (vect_enhance_data_refs_alignment): Likewise.
29381 (vect_prune_runtime_alias_test_list): Likewise.
29382 (vect_shift_permute_load_chain): Likewise.
29383 (vect_supportable_dr_alignment): Likewise.
29384 (dependence_distance_ge_vf): Take the vectorization factor as a
29385 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29386 (vect_analyze_data_refs): Change min_vf from an int * to a
29387 poly_uint64 *.
29388 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29389 vfm1 as a poly_uint64 rather than an int. Make the same change
29390 for the returned bound_scalar.
29391 (vect_gen_vector_loop_niters): Handle polynomial vf.
29392 (vect_do_peeling): Likewise. Update call to
29393 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29394 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29395 be constant.
29396 * tree-vect-loop.c (vect_determine_vectorization_factor)
29397 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29398 (vect_get_known_peeling_cost): Likewise.
29399 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29400 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29401 (vect_transform_loop): Likewise. Use the lowest possible VF when
29402 updating the upper bounds of the loop.
29403 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29404 rather than an int.
29405 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29406 polynomial unroll factors.
29407 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29408 (vect_make_slp_decision): Likewise.
29409 (vect_supported_load_permutation_p): Likewise, and polynomial
29410 vf too.
29411 (vect_analyze_slp_cost): Handle polynomial vf.
29412 (vect_slp_analyze_node_operations): Likewise.
29413 (vect_slp_analyze_bb_1): Likewise.
29414 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29415 than an unsigned HOST_WIDE_INT.
29416 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29417 (vectorizable_load): Handle polynomial vf.
29418 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29419 a poly_uint64.
29420 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29421
29422 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29423 Alan Hayward <alan.hayward@arm.com>
29424 David Sherwood <david.sherwood@arm.com>
29425
29426 * match.pd: Handle bit operations involving three constants
29427 and try to fold one pair.
29428
29429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29430
29431 * tree-vect-loop-manip.c: Include gimple-fold.h.
29432 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29433 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29434 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29435 Add a path that uses a step of VF instead of 1, but disable it
29436 for now.
29437 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29438 and niters_no_overflow parameters. Update calls to
29439 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29440 Create a new SSA name if the latter choses to use a ste other
29441 than zero, and return it via niters_vector_mult_vf_var.
29442 * tree-vect-loop.c (vect_transform_loop): Update calls to
29443 vect_do_peeling, vect_gen_vector_loop_niters and
29444 slpeel_make_loop_iterate_ntimes.
29445 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29446 (vect_gen_vector_loop_niters): Update declarations after above changes.
29447
29448 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29449
29450 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29451 128-bit round to integer instructions.
29452 (ceil<mode>2): Likewise.
29453 (btrunc<mode>2): Likewise.
29454 (round<mode>2): Likewise.
29455
29456 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29457
29458 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29459 unaligned VSX load/store on P8/P9.
29460 (expand_block_clear): Allow the use of unaligned VSX
29461 load/store on P8/P9.
29462
29463 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29464
29465 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29466 New function.
29467 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29468 swap associated with both a load and a store.
29469
29470 2018-01-02 Andrew Waterman <andrew@sifive.com>
29471
29472 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29473 * config/riscv/riscv.md (clear_cache): Use it.
29474
29475 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29476
29477 * web.c: Remove out-of-date comment.
29478
29479 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29480
29481 * expr.c (fixup_args_size_notes): Check that any existing
29482 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29483 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29484 (emit_single_push_insn): ...here.
29485
29486 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29487
29488 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29489 (const_vector_encoded_nelts): New function.
29490 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29491 (const_vector_int_elt, const_vector_elt): Declare.
29492 * emit-rtl.c (const_vector_int_elt_1): New function.
29493 (const_vector_elt): Likewise.
29494 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29495 of CONST_VECTOR_ELT.
29496
29497 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29498
29499 * expr.c: Include rtx-vector-builder.h.
29500 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29501 directly on the tree encoding.
29502 (const_vector_from_tree): Likewise.
29503 * optabs.c: Include rtx-vector-builder.h.
29504 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29505 sequence of "u" values.
29506 * vec-perm-indices.c: Include rtx-vector-builder.h.
29507 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29508 directly on the vec_perm_indices encoding.
29509
29510 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29511
29512 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29513 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29514 * rtx-vector-builder.h: New file.
29515 * rtx-vector-builder.c: Likewise.
29516 * rtl.h (rtx_def::u2): Add a const_vector field.
29517 (CONST_VECTOR_NPATTERNS): New macro.
29518 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29519 (CONST_VECTOR_DUPLICATE_P): Likewise.
29520 (CONST_VECTOR_STEPPED_P): Likewise.
29521 (CONST_VECTOR_ENCODED_ELT): Likewise.
29522 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29523 (unwrap_const_vec_duplicate): Likewise.
29524 (const_vec_series_p): Check for a non-duplicated vector encoding.
29525 Say that the function only returns true for integer vectors.
29526 * emit-rtl.c: Include rtx-vector-builder.h.
29527 (gen_const_vec_duplicate_1): Delete.
29528 (gen_const_vector): Call gen_const_vec_duplicate instead of
29529 gen_const_vec_duplicate_1.
29530 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29531 (gen_const_vec_duplicate): Use rtx_vector_builder.
29532 (gen_const_vec_series): Likewise.
29533 (gen_rtx_CONST_VECTOR): Likewise.
29534 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29535 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29536 Build a new vector rather than modifying a CONST_VECTOR in-place.
29537 (handle_special_swappables): Update call accordingly.
29538 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29539 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29540 Build a new vector rather than modifying a CONST_VECTOR in-place.
29541 (handle_special_swappables): Update call accordingly.
29542
29543 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29544
29545 * simplify-rtx.c (simplify_const_binary_operation): Use
29546 CONST_VECTOR_ELT instead of XVECEXP.
29547
29548 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29549
29550 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29551 the selector elements to be different from the data elements
29552 if the selector is a VECTOR_CST.
29553 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29554 ssizetype for the selector.
29555
29556 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29557
29558 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29559 before testing each element individually.
29560 * tree-vect-generic.c (lower_vec_perm): Likewise.
29561
29562 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29563
29564 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29565 * selftest-run-tests.c (selftest::run_tests): Call it.
29566 * vector-builder.h (vector_builder::operator ==): New function.
29567 (vector_builder::operator !=): Likewise.
29568 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29569 (vec_perm_indices::all_from_input_p): New function.
29570 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29571 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29572 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29573 instead of reading the VECTOR_CST directly. Detect whether both
29574 vector inputs are the same before constructing the vec_perm_indices,
29575 and update the number of inputs argument accordingly. Use the
29576 utility functions added above. Only construct sel2 if we need to.
29577
29578 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29579
29580 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29581 the broadcast of the low byte.
29582 (expand_mult_highpart): Use an explicit encoding for the permutes.
29583 * optabs-query.c (can_mult_highpart_p): Likewise.
29584 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29585 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29586 (vectorizable_bswap): Likewise.
29587 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29588 explicit encoding for the power-of-2 permutes.
29589 (vect_permute_store_chain): Likewise.
29590 (vect_grouped_load_supported): Likewise.
29591 (vect_permute_load_chain): Likewise.
29592
29593 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29594
29595 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29596 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29597 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29598 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29599 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29600 (vect_gen_perm_mask_any): Likewise.
29601
29602 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29603
29604 * int-vector-builder.h: New file.
29605 * vec-perm-indices.h: Include int-vector-builder.h.
29606 (vec_perm_indices): Redefine as an int_vector_builder.
29607 (auto_vec_perm_indices): Delete.
29608 (vec_perm_builder): Redefine as a stand-alone class.
29609 (vec_perm_indices::vec_perm_indices): New function.
29610 (vec_perm_indices::clamp): Likewise.
29611 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29612 (vec_perm_indices::new_vector): New function.
29613 (vec_perm_indices::new_expanded_vector): Update for new
29614 vec_perm_indices class.
29615 (vec_perm_indices::rotate_inputs): New function.
29616 (vec_perm_indices::all_in_range_p): Operate directly on the
29617 encoded form, without computing elided elements.
29618 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29619 encoding. Update for new vec_perm_indices class.
29620 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29621 the given vec_perm_builder.
29622 (expand_vec_perm_var): Update vec_perm_builder constructor.
29623 (expand_mult_highpart): Use vec_perm_builder instead of
29624 auto_vec_perm_indices.
29625 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29626 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29627 or double series encoding as appropriate.
29628 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29629 vec_perm_indices instead of auto_vec_perm_indices.
29630 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29631 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29632 (vect_permute_store_chain): Likewise.
29633 (vect_grouped_load_supported): Likewise.
29634 (vect_permute_load_chain): Likewise.
29635 (vect_shift_permute_load_chain): Likewise.
29636 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29637 (vect_transform_slp_perm_load): Likewise.
29638 (vect_schedule_slp_instance): Likewise.
29639 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29640 (vectorizable_mask_load_store): Likewise.
29641 (vectorizable_bswap): Likewise.
29642 (vectorizable_store): Likewise.
29643 (vectorizable_load): Likewise.
29644 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29645 vec_perm_indices instead of auto_vec_perm_indices. Use
29646 tree_to_vec_perm_builder to read the vector from a tree.
29647 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29648 vec_perm_builder instead of a vec_perm_indices.
29649 (have_whole_vector_shift): Use vec_perm_builder and
29650 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29651 truncation to calc_vec_perm_mask_for_shift.
29652 (vect_create_epilog_for_reduction): Likewise.
29653 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29654 from auto_vec_perm_indices to vec_perm_indices.
29655 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29656 instead of changing individual elements.
29657 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29658 the vector in d.perm.
29659 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29660 from auto_vec_perm_indices to vec_perm_indices.
29661 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29662 instead of changing individual elements.
29663 (arm_vectorize_vec_perm_const): Use new_vector to install
29664 the vector in d.perm.
29665 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29666 Update vec_perm_builder constructor.
29667 (rs6000_expand_interleave): Likewise.
29668 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29669 (rs6000_expand_interleave): Likewise.
29670
29671 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29672
29673 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29674 to qimode could truncate the indices.
29675 * optabs.c (expand_vec_perm_var): Likewise.
29676
29677 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29678
29679 * Makefile.in (OBJS): Add vec-perm-indices.o.
29680 * vec-perm-indices.h: New file.
29681 * vec-perm-indices.c: Likewise.
29682 * target.h (vec_perm_indices): Replace with a forward class
29683 declaration.
29684 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29685 * optabs.h: Include vec-perm-indices.h.
29686 (expand_vec_perm): Delete.
29687 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29688 (expand_vec_perm_const): Declare.
29689 * target.def (vec_perm_const_ok): Replace with...
29690 (vec_perm_const): ...this new hook.
29691 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29692 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29693 * doc/tm.texi: Regenerate.
29694 * optabs.def (vec_perm_const): Delete.
29695 * doc/md.texi (vec_perm_const): Likewise.
29696 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29697 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29698 expand_vec_perm for constant permutation vectors. Assert that
29699 the mode of variable permutation vectors is the integer equivalent
29700 of the mode that is being permuted.
29701 * optabs-query.h (selector_fits_mode_p): Declare.
29702 * optabs-query.c: Include vec-perm-indices.h.
29703 (selector_fits_mode_p): New function.
29704 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29705 is defined, instead of checking whether the vec_perm_const_optab
29706 exists. Use targetm.vectorize.vec_perm_const instead of
29707 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29708 fit in the vector mode before using a variable permute.
29709 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29710 vec_perm_indices instead of an rtx.
29711 (expand_vec_perm): Replace with...
29712 (expand_vec_perm_const): ...this new function. Take the selector
29713 as a vec_perm_indices rather than an rtx. Also take the mode of
29714 the selector. Update call to shift_amt_for_vec_perm_mask.
29715 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29716 Use vec_perm_indices::new_expanded_vector to expand the original
29717 selector into bytes. Check whether the indices fit in the vector
29718 mode before using a variable permute.
29719 (expand_vec_perm_var): Make global.
29720 (expand_mult_highpart): Use expand_vec_perm_const.
29721 * fold-const.c: Includes vec-perm-indices.h.
29722 * tree-ssa-forwprop.c: Likewise.
29723 * tree-vect-data-refs.c: Likewise.
29724 * tree-vect-generic.c: Likewise.
29725 * tree-vect-loop.c: Likewise.
29726 * tree-vect-slp.c: Likewise.
29727 * tree-vect-stmts.c: Likewise.
29728 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29729 Delete.
29730 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29731 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29732 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29733 (aarch64_vectorize_vec_perm_const): ...this new function.
29734 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29735 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29736 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29737 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29738 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29739 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29740 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29741 into...
29742 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29743 check for NEON modes.
29744 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29745 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29746 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29747 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29748 into...
29749 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29750 the old VEC_PERM_CONST conditions.
29751 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29752 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29753 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29754 (ia64_vectorize_vec_perm_const_ok): Merge into...
29755 (ia64_vectorize_vec_perm_const): ...this new function.
29756 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29757 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29758 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29759 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29760 * config/mips/mips.c (mips_expand_vec_perm_const)
29761 (mips_vectorize_vec_perm_const_ok): Merge into...
29762 (mips_vectorize_vec_perm_const): ...this new function.
29763 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29764 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29765 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29766 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29767 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29768 (rs6000_expand_vec_perm_const): Delete.
29769 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29770 Delete.
29771 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29772 (altivec_expand_vec_perm_const_le): Take each operand individually.
29773 Operate on constant selectors rather than rtxes.
29774 (altivec_expand_vec_perm_const): Likewise. Update call to
29775 altivec_expand_vec_perm_const_le.
29776 (rs6000_expand_vec_perm_const): Delete.
29777 (rs6000_vectorize_vec_perm_const_ok): Delete.
29778 (rs6000_vectorize_vec_perm_const): New function.
29779 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29780 an element count and rtx array.
29781 (rs6000_expand_extract_even): Update call accordingly.
29782 (rs6000_expand_interleave): Likewise.
29783 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29784 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29785 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29786 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29787 (rs6000_expand_vec_perm_const): Delete.
29788 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29789 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29790 (altivec_expand_vec_perm_const_le): Take each operand individually.
29791 Operate on constant selectors rather than rtxes.
29792 (altivec_expand_vec_perm_const): Likewise. Update call to
29793 altivec_expand_vec_perm_const_le.
29794 (rs6000_expand_vec_perm_const): Delete.
29795 (rs6000_vectorize_vec_perm_const_ok): Delete.
29796 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29797 reference to the SPE evmerge intructions.
29798 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29799 an element count and rtx array.
29800 (rs6000_expand_extract_even): Update call accordingly.
29801 (rs6000_expand_interleave): Likewise.
29802 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29803 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29804 new function.
29805 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29806
29807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29808
29809 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29810 vector mode and that that mode matches the mode of the data
29811 being permuted.
29812 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29813 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29814 directly using expand_vec_perm_1 when forcing selectors into
29815 registers.
29816 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29817
29818 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29819
29820 * optabs-query.h (can_vec_perm_p): Delete.
29821 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29822 * optabs-query.c (can_vec_perm_p): Split into...
29823 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29824 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29825 particular selector is valid.
29826 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29827 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29828 (vect_grouped_load_supported): Likewise.
29829 (vect_shift_permute_load_chain): Likewise.
29830 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29831 (vect_transform_slp_perm_load): Likewise.
29832 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29833 (vectorizable_bswap): Likewise.
29834 (vect_gen_perm_mask_checked): Likewise.
29835 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29836 implementations of variable permutation vectors into account
29837 when deciding which selector to use.
29838 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29839 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29840 with a false third argument.
29841 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29842 to test whether the constant selector is valid and can_vec_perm_var_p
29843 to test whether a variable selector is valid.
29844
29845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29846
29847 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29848 * optabs-query.c (can_vec_perm_p): Likewise.
29849 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29850 instead of vec_perm_indices.
29851 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29852 (vect_gen_perm_mask_checked): Likewise,
29853 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29854 (vect_gen_perm_mask_checked): Likewise,
29855
29856 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29857
29858 * optabs-query.h (qimode_for_vec_perm): Declare.
29859 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29860 (qimode_for_vec_perm): ...this new function.
29861 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29862
29863 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29864
29865 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29866 does not have a conditional at the top.
29867
29868 2018-01-02 Richard Biener <rguenther@suse.de>
29869
29870 * ipa-inline.c (big_speedup_p): Fix expression.
29871
29872 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29873
29874 PR target/81616
29875 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29876 for generic 4->6.
29877
29878 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29879
29880 PR target/81616
29881 Generic tuning.
29882 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29883 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29884 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29885 cond_taken_branch_cost 3->4.
29886
29887 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29888
29889 PR tree-optimization/83581
29890 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29891 TODO_cleanup_cfg if any changes have been made.
29892
29893 PR middle-end/83608
29894 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29895 convert_modes if target mode has the right side, but different mode
29896 class.
29897
29898 PR middle-end/83609
29899 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29900 last argument when extracting from CONCAT. If either from_real or
29901 from_imag is NULL, use expansion through memory. If result is not
29902 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29903 the parts directly to inner mode, if even that fails, use expansion
29904 through memory.
29905
29906 PR middle-end/83623
29907 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29908 check for bswap in mode rather than HImode and use that in expand_unop
29909 too.
29910 \f
29911 Copyright (C) 2018 Free Software Foundation, Inc.
29912
29913 Copying and distribution of this file, with or without modification,
29914 are permitted in any medium without royalty provided the copyright
29915 notice and this notice are preserved.