Fix typo in gcc/ChangeLog
[gcc.git] / gcc / ChangeLog
1 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2
3 * opts.c (default_options_table): Do not enable
4 OPT_fdelayed_branch at -Og.
5 * doc/invoke.texi (-fdelayed-branch): Document it.
6
7 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
8
9 * optabs-libfuncs.c (build_libfunc_function_visibility):
10 New, split out from...
11 (build_libfunc_function): ... here.
12 (init_one_libfunc_visibility): New, split out from ...
13 (init_one_libfunc): ... here.
14
15 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
16 scratch register need not be early-clobber. Document the reason
17 why we cannot use ST<OP>.
18
19 2018-10-31 Joseph Myers <joseph@codesourcery.com>
20
21 PR bootstrap/82856
22 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
23 line for second argument of AC_DEFINE_UNQUOTED.
24 * doc/install.texi (Tools/packages necessary for modifying GCC):
25 Update to autoconf 2.69 and automake 1.15.1.
26 * aclocal.m4, config.in, configure: Regenerate.
27
28 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
29
30 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
31 initialization.
32
33 2018-10-31 Martin Liska <mliska@suse.cz>
34
35 PR driver/83193
36 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
37 Add new argument invalid_extension.
38 (aarch64_get_all_extension_candidates): New function.
39 (aarch64_rewrite_selected_cpu): Add NULL to function call.
40 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
41 new argument.
42 (aarch64_get_all_extension_candidates): New function.
43 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
44 argument invalid_extension.
45 (aarch64_parse_cpu): Likewise.
46 (aarch64_print_hint_for_extensions): New function.
47 (aarch64_validate_mcpu): Provide hint about invalid extension.
48 (aarch64_validate_march): Likewise.
49 (aarch64_handle_attr_arch): Pass new argument.
50 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
51 (aarch64_handle_attr_isa_flags): Likewise.
52
53 2018-10-31 Richard Biener <rguenther@suse.de>
54
55 PR middle-end/70359
56 PR middle-end/86270
57 * tree-outof-ssa.c (insert_backedge_copies): Restrict
58 copy generation to useful cases. Place the copy before
59 the definition of the backedge value when possible.
60
61 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
62
63 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
64 * config/arc/arc.c (arc_active_insn): New function.
65 (check_store_cacheline_hazard): Likewise.
66 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
67 (arc_override_options): Disable delay slot scheduler for older
68 A7.
69 (arc_store_addr_hazard_p): New implementation, old one renamed to
70 ...
71 (arc_store_addr_hazard_internal_p): Renamed.
72 (arc_reorg): Don't combine into brcc instructions which are part
73 of hardware hazard solution.
74 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
75 (tune_arc700): Likewise.
76 * config/arc/arc.opt (arc7xx): New tune value.
77 * config/arc/arc700.md: Improve A7 scheduler.
78
79 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
80
81 * config/arc/arc.c (arc_override_options): Remove
82 TARGET_COMPACT_CASESI.
83 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
84 (CASE_VECTOR_MODE): Likewise.
85 (CASE_VECTOR_PC_RELATIVE): Likewise.
86 (CASE_VECTOR_SHORTEN_MODE): Likewise.
87 (CASE_VECTOR_SHORTEN_MODE1): Delete.
88 (ADDR_VEC_ALIGN): Update.
89 (ASM_OUTPUT_CASE_LABEL): Undefine.
90 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
91 (TARGET_BI_BIH): Define.
92 (DEFAULT_BRANCH_INDEX): Likewise.
93 * config/arc/arc.md (casesi): Rework to accept BI/BIH
94 instructions, remove compact_casesi use case.
95 (casesi_compact_jump): Remove.
96 (casesi_dispatch): New pattern.
97 * config/arc/arc.opt: Add mbranch-index option. Deprecate
98 compact_casesi option.
99 * doc/invoke.texi: Document mbranch-index option.
100
101 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
102
103 * config/arc/arc.c (arc_get_tp): Remove function.
104 (arc_emit_call_tls_get_addr): Likewise.
105 (arc_call_tls_get_addr): New function.
106 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
107 * config/arc/arc.md (tls_load_tp_soft): Remove.
108 (tls_gd_get_addr): Likewise.
109
110 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
111
112 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
113 (mulsi3_600_lib): Remove pattern.
114 (umulsi3_highpart_600_lib_le): Likewise.
115 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
116 (umulsidi3): Remove call to umulsidi3_600_lib.
117 (umulsidi3_600_lib): Remove pattern.
118 (peephole2): Remove peephole using the above deprecated patterns.
119
120 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
121
122 PR target/87374
123 * config/arm/arm.c (arm_option_check_internal): Disable the combined
124 use of -mslow-flash-data and -mword-relocations.
125 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
126 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
127 flag_pic.
128 * doc/invoke.texi (-mword-relocations): Mention conflict with
129 -mslow-flash-data.
130 (-mslow-flash-data): Reciprocally.
131
132 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
133
134 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
135 16-byte modes held in GP registers to use an even regno.
136
137 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
138 (aarch64_atomic_ldop_supported_p): Remove.
139 (aarch64_gen_atomic_ldop): Remove.
140 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
141 Fully expand LSE operations here.
142 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
143 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
144 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
145 and use ATOMIC_LDOP instead; use register_operand for the input;
146 drop the split and emit insns directly.
147 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
148 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
149 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
150
151 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
152 (aarch64_gen_atomic_ldop): Don't call it.
153 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
154 Use aarch64_reg_or_zero.
155 (aarch64_atomic_exchange<ALLI>): Likewise.
156 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
157 operand 0; use aarch64_reg_or_zero for input; merge ...
158 (@aarch64_atomic_swp<ALLI>): ... this and remove.
159
160 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
161 (aarch64_split_compare_and_swap): Use it.
162 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
163 test oldval against the proper predicate.
164 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
165 Use nonmemory_operand for expected.
166 (cas_short_expected_pred): New.
167 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
168 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
169 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
170 (aarch64_plushi_operand): New.
171
172 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
173 Force oldval into the rval register for TARGET_LSE; emit the compare
174 during initial expansion so that it may be deleted if unused.
175 (aarch64_gen_atomic_cas): Remove.
176 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
177 Change =&r to +r for operand 0; use match_dup for operand 2;
178 remove is_weak and mod_f operands as unused. Drop the split
179 and merge with...
180 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
181 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
182 (@aarch64_atomic_cas<GPI>): Similarly.
183
184 2018-10-31 Richard Biener <rguenther@suse.de>
185
186 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
187 using ABSU_EXPR.
188
189 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
190
191 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
192 * config/aarch64/aarch64.md: Include saphira.md
193 * config/aarch64/saphira.md: New file for pipeline description.
194
195 2018-10-30 Martin Sebor <msebor@redhat.com>
196
197 PR middle-end/87041
198 * gimple-ssa-sprintf.c (format_directive): Use %G to include
199 inlining context.
200 (sprintf_dom_walker::compute_format_length):
201 Avoid setting POSUNDER4K here.
202 (get_destination_size): Handle null argument values.
203 (get_user_idx_format): New function.
204 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
205 functions, including user-defined with attribute format printf.
206 Use %G to include inlining context.
207 Set POSUNDER4K here.
208
209 2018-10-30 Jan Hubicka <jh@suse.cz>
210
211 * params.def (lto-partitions): Bump from 32 to 128.
212
213 2018-10-30 Jan Hubicka <jh@suse.cz>
214
215 * tree.c
216 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
217 head in file.
218 (free_lang_data_in_type): Forward declare.
219 (fld_type_variant_equal_p): New function.
220 (fld_type_variant): New function
221 (fld_incomplete_types): New hash.
222 (fld_incomplete_type_of): New function
223 (fld_simplfied-type): New function.
224 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
225 (free_lang_data): Allocate and free fld_incomplete_type; update call
226 of free_lang_data_in_decl.
227
228 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
229
230 * gcov.c (output_lines): Remove duplicate line.
231
232 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
233
234 * config/rs6000/rs6000.md (bswapdi2): Force address into register
235 if not in indexed or indirect form.
236 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
237 (bswapdi2_store): Ditto.
238 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
239 helper function.
240 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
241 Prototype for helper function.
242
243 2018-10-30 Martin Sebor <msebor@redhat.com>
244
245 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
246 (target, pragma GCC optimize, pragma GCC target): Ditto.
247
248 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
249
250 * doc/extend.texi: Fix prototype and description of
251 __builtin_expect_with_probability.
252
253 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
254
255 * cgraph.h (clone_function_name_1): Replaced by new
256 clone_function_name_numbered that takes name as string; for
257 privatize_symbol_name_1 use only.
258 (clone_function_name): Renamed to
259 clone_function_name_numbered to be explicit about numbering.
260 (clone_function_name): New two-argument function that does
261 not number its output.
262 (clone_function_name): New three-argument function that
263 takes a number to append to its output.
264 * cgraphclones.c (duplicate_thunk_for_node):
265 (clone_function_name_1): Renamed.
266 (clone_function_name_numbered): Two new functions.
267 (clone_function_name): Improved documentation.
268 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
269 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
270 * final.c (final_scan_insn_1): Use the new clone_function_name
271 without numbering.
272 * multiple_target.c (create_dispatcher_calls): Ditto.
273 (create_target_clone): Ditto.
274 * omp-expand.c (grid_expand_target_grid_body): Ditto.
275 * omp-low.c (create_omp_child_function_name): Ditto.
276 * omp-simd-clone.c (simd_clone_create): Ditto.
277 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
278 new clone_function_name without numbering.
279
280 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
281
282 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
283 Assert that the allocation size is not zero.
284
285 2018-10-30 Richard Biener <rguenther@suse.de>
286
287 PR tree-optimization/87800
288 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
289 non-induction or reduction PHIs.
290
291 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
292
293 * config/aarch64/falkor-tag-collision-avoidance.c
294 (execute_tag_collision_avoidance): Call df_note_add_problem.
295
296 2018-10-30 Martin Liska <mliska@suse.cz>
297
298 * doc/extend.texi: Fix typo in documentation
299 of __builtin_expect_with_probability.
300
301 2018-10-29 David Malcolm <dmalcolm@redhat.com>
302
303 PR c++/87721
304 * input.c (get_substring_ranges_for_loc): Detect if
305 linemap_resolve_location gives us a NULL map, and reject
306 this case.
307
308 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
309
310 * config.gcc (xstormy16-*-elf): Set tm_d_file.
311
312 2018-10-29 David Malcolm <dmalcolm@redhat.com>
313 Martin Sebor <msebor@redhat.com>
314 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
315
316 * doc/ux.texi (Quoting): New subsection, adapted from material at
317 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
318 MartinSebor and ManuelLopezIbanez.
319 (Fix-it hints): Note that fix-it hints shouldn't be marked for
320 translation.
321
322 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
323
324 PR middle-end/87469
325 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
326 max value.
327
328 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
329
330 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
331
332 2018-10-29 Paul Koning <ni1d@arrl.net>
333
334 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
335
336 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
337
338 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
339 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
340 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
341 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
342 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
343 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
344 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
345 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
346 Change 'vector' to '__vector'.
347 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
348 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
349 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
350 _mm_avg_pu16): Likewise. And, whitespace corrections.
351
352 2018-10-29 Richard Biener <rguenther@suse.de>
353
354 PR tree-optimization/87785
355 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
356 internal defs.
357
358 2018-10-29 Olivier Hainque <hainque@adacore.com>
359
360 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
361
362 2018-10-29 Olivier Hainque <hainque@adacore.com>
363
364 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
365 ports configuration macro, defaults to "gnu".
366 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
367 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
368
369 2018-10-29 Olivier Hainque <hainque@adacore.com>
370
371 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
372
373 2018-10-29 Richard Biener <rguenther@suse.de>
374
375 PR tree-optimization/87790
376 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
377 (vect_make_slp_decision): Adjust.
378 (vect_slp_analyze_bb_1): Likewise.
379 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
380 edges.
381
382 2018-10-29 Richard Biener <rguenther@suse.de>
383
384 PR tree-optimization/87785
385 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
386 and processing.
387 (vect_build_slp_tree): Likewise.
388 (vect_gather_slp_loads): New function.
389 (vect_analyze_slp_instance): Gather loads separately from the
390 SLP tree build.
391
392 2018-10-29 Martin Liska <mliska@suse.cz>
393
394 * Makefile.in: Make dependency to json.o.
395 * doc/gcov.texi: Document new JSON format, remove
396 old intermediate format documentation.
397 * gcov.c (struct function_info): Come up with m_name and
398 m_demangled_name.
399 (function_info::function_info): Initialize it.
400 (function_info::~function_info): Release it.
401 (main): Rename flag_intermediate_format to flag_json_format.
402 (print_usage): Describe --json-format.
403 (process_args): Set flag_json_format.
404 (output_intermediate_line): Remove.
405 (output_intermediate_json_line): Likewise.
406 (get_gcov_intermediate_filename): Return new extension
407 ".gcov.json.gz".
408 (output_intermediate_file): Implement JSON emission.
409 (output_json_intermediate_file): Implement JSON emission.
410 (generate_results): Use ::get_name for function name.
411 Handle JSON output file.
412 (read_graph_file): Use ::get_name instead of cplus_demangle.
413 (read_count_file): Likewise.
414 (solve_flow_graph): Likewise.
415 (add_line_counts): Likewise.
416 (accumulate_line_counts): Use new flag_json_format.
417 (output_function_details): Use ::get_name instead of cplus_demangle.
418 (output_lines): Likewise.
419 * json.cc (test_writing_literals): Add new tests.
420 * json.h (class literal): Add new boolean constructor.
421
422 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
423
424 PR rtl-optimization/87701
425 PR rtl-optimization/87780
426 * combine.c (make_more_copies): Rewrite.
427
428 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
429
430 * doc/generic.texi (ABSU_EXPR): Document.
431 * match.pd (absu(x)*absu(x) -> x*x): Handle.
432 (absu(absu(X)) -> absu(X)): Likewise.
433 (absu(-X) -> absu(X)): Likewise.
434 (absu(X) where X is nonnegative -> X): Likewise.
435
436 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
437
438 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
439 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
440 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
441 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
442 (s-tm-texi): Also check timestamp on d-target.def.
443 (generated_files): Add TM_D_H and d-target-hooks-def.h.
444 (build/genhooks.o): Also depend on D_TARGET_DEF.
445 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
446 variables.
447 * config/aarch64/aarch64-d.c: New file.
448 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
449 Define.
450 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
451 prototype.
452 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
453 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
454 * config/arm/arm-d.c: New file.
455 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
456 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
457 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
458 * config/arm/t-arm (arm-d.o): New rule.
459 * config/default-d.c: New file.
460 * config/glibc-d.c: New file.
461 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
462 * config/i386/i386-d.c: New file.
463 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
464 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
465 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
466 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
467 * config/i386/t-i386 (i386-d.o): New rule.
468 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
469 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
470 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
471 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
472 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
473 * config/mips/mips-d.c: New file.
474 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
475 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
476 * config/mips/t-mips (mips-d.o): New rule.
477 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
478 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
479 * config/powerpcspe/powerpcspe-d.c: New file.
480 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
481 New prototype.
482 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
483 Support GNU D by using 0 as the language type.
484 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
485 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
486 * config/riscv/riscv-d.c: New file.
487 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
488 prototype.
489 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
490 * config/riscv/t-riscv (riscv-d.o): New rule.
491 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
492 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
493 * config/rs6000/rs6000-d.c: New file.
494 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
495 prototype.
496 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
497 Support GNU D by using 0 as the language type.
498 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
499 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
500 * config/s390/s390-d.c: New file.
501 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
502 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
503 * config/s390/t-s390 (s390-d.o): New rule.
504 * config/sparc/sparc-d.c: New file.
505 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
506 prototype.
507 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
508 * config/sparc/t-sparc (sparc-d.o): New rule.
509 * config/t-glibc (glibc-d.o): New rule.
510 * configure: Regenerated.
511 * configure.ac (tm_d_file): New variable.
512 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
513 * doc/contrib.texi (Contributors): Add self for the D frontend.
514 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
515 * doc/install.texi (Configuration): Mention libphobos as an option for
516 --enable-shared. Mention d as an option for --enable-languages.
517 (Testing): Mention check-d as a target.
518 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
519 name suffixes. Mention d as a -x option.
520 * doc/sourcebuild.texi (Top Level): Mention libphobos.
521 * doc/standards.texi (Standards): Add section on D language.
522 * doc/tm.texi: Regenerated.
523 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
524 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
525 * dwarf2out.c (is_dlang): New function.
526 (gen_compile_unit_die): Use DW_LANG_D for D.
527 (declare_in_namespace): Return module die for D, instead of adding
528 extra declarations into the namespace.
529 (gen_namespace_die): Generate DW_TAG_module for D.
530 (gen_decl_die): Handle CONST_DECLSs for D.
531 (dwarf2out_decl): Likewise.
532 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
533 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
534 kinds of aggregates.
535 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
536 * genhooks.c: Include d/d-target.def.
537
538 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
539
540 PR target/85669
541 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
542 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
543 (STACK_DYNAMIC_OFFSET): Likewise.
544
545 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
546
547 PR target/80024
548 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
549 error message.
550
551 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
552
553 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
554 return type and other typos.
555
556 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
557
558 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
559 a shorter sequence with fewer branches.
560 (emit_final_str_compare_gpr): Ditto.
561
562 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
563
564 * config/rs6000/tmmintrin.h: New file.
565 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
566
567 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
568
569 * config/rs6000/mmintrin.h: Enable 32bit compilation.
570 * config/rs6000/xmmintrin.h: Likewise.
571
572 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
573
574 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
575
576 2018-10-26 Richard Biener <rguenther@suse.de>
577
578 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
579 and wrapper.
580 (vect_mark_slp_stmts_relevant): Likewise.
581 (vect_detect_hybrid_slp_stmts): Likewise.
582 (vect_bb_slp_scalar_cost): Likewise.
583 (vect_remove_slp_scalar_calls): Likewise.
584
585 2018-10-26 Jan Hubicka <jh@suse.cz>
586
587 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
588 (warn_types_mismatch): Fix walk of DECL_NAME.
589 (odr_types_equivalent_p): Fix overactive assert.
590
591 2018-10-26 Richard Biener <rguenther@suse.de>
592
593 PR tree-optimization/87105
594 * tree-vectorizer.h (_slp_tree::refcnt): New member.
595 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
596 refcnt.
597 (vect_create_new_slp_node): Initialize refcnt to one.
598 (bst_traits): Move.
599 (scalar_stmts_set_t, bst_fail): Remove.
600 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
601 (vect_build_slp_tree): Add bst_map argument and lookup
602 already created SLP nodes.
603 (vect_print_slp_tree): Handle a SLP graph, print SLP node
604 addresses.
605 (vect_slp_rearrange_stmts): Handle a SLP graph.
606 (vect_analyze_slp_instance): Adjust and free SLP nodes from
607 the CSE map. Fix indenting.
608 (vect_schedule_slp_instance): Add short-cut.
609
610 2018-10-26 Martin Liska <mliska@suse.cz>
611
612 PR testsuite/86158
613 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
614 addr_expr and not with pointers.
615
616 2018-10-26 Jan Hubicka <jh@suse.cz>
617
618 * tree.c (free_lang_data_in_type): Only check main variants.
619 * ipa-devirt.c (warn_odr): Make static.
620 (types_same_for_odr): Drop strict variant.
621 (types_odr_comparable): Likewise.
622 (odr_or_derived_type_p): Look for main variants.
623 (odr_name_hasher::equal): Cleanup comment.
624 (odr_subtypes_equivalent): Add warn and warned arguments; check main
625 variants.
626 (type_variants_equivalent_p): break out from ...
627 (odr_types_equivalent): ... here; go for main variants where needed.
628 (warn_odr): ... here; turn static.
629 (warn_types_mismatch): Compare mangled names of main variants.
630 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
631 (type_with_linkage_p): Sanity check that we look at main variant.
632 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
633 * tree.h (types_same_for_odr): Drop strict argument.
634
635 2018-10-26 Richard Biener <rguenther@suse.de>
636
637 PR tree-optimization/87746
638 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
639 Simplify and fix WRT strided store groups with size not
640 equal to step in element count.
641 (vect_analyze_group_access_1): Dump the whole group.
642
643 2018-10-25 Carl Love <cel@us.ibm.com>
644
645 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
646 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
647 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
648 precicion entry for each overloaded builtin.
649 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
650 VSCEDPUO): Rename overloaded name.
651 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
652 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
653 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
654 define_expand for xscmpexqp instruction.
655 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
656
657 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
658 Jinsong Ji <jji@us.ibm.com>
659
660 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
661 function with vec_sl.
662 (_mm_slli_epi32): Likewise.
663 (_mm_slli_epi64): Likewise.
664 (_mm_srai_epi16): Replace deprecated function with vec_sra.
665 (_mm_srai_epi32): Likewise.
666 (_mm_srli_epi16): Replace deprecated function with vec_sr.
667 (_mm_srli_epi32): Likewise.
668 (_mm_srli_epi64): Likewise.
669 (_mm_sll_epi16): Replace deprecated function with vec_sl.
670 (_mm_sll_epi32): Likewise.
671 (_mm_sll_epi64): Likewise.
672 (_mm_sra_epi16): Replace deprecated function with vec_sra.
673 (_mm_sra_epi32): Likewise.
674 (_mm_srl_epi16): Replace deprecated function with vec_sr.
675 (_mm_srl_epi32): Likewise.
676 (_mm_srl_epi64): Likewise.
677
678 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
679 Jinsong Ji <jji@us.ibm.com>
680
681 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
682 comparison operators with vec_cmp* for compatibility due to
683 unfortunate history; clean up formatting and use types more
684 appropriately.
685 (_mm_sll_epi32): Likewise.
686 (_mm_sll_epi64): Likewise.
687 (_mm_srl_epi16): Likewise.
688 (_mm_srl_epi32): Likewise.
689 (_mm_srl_epi64): Likewise.
690
691 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
692 Jinsong Ji <jji@us.ibm.com>
693
694 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
695 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
696 __vector __bool int. Use vec_cmpgt in preference to deprecated
697 function vec_vcmpgtfp.
698 (_mm_max_ps): Likewise.
699
700 2018-10-25 Jeff Law <law@redhat.com>
701
702 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
703 if returning false.
704
705 2018-10-25 Martin Sebor <msebor@redhat.com>
706
707 * doc/extend.texi (aligned): Expand attribute description.
708 (Alignment): Rename section. Discuss function arguments.
709
710 2018-10-25 Jan Hubicka <jh@suse.cz>
711
712 * ipa-devirt.c (main_odr_variant): Remove.
713 (hash_odr_name, types_same_for_odr, types_odr_comparable,
714 odr_name_hasher::equal, odr_subtypes_equivalent_p):
715 Drop use of main_odr_variant.
716 (add_type_duplicate): Silence confused warnings on integer types.
717 (get_odr_type): Always look for main variant.
718 (register_odr_type): Simplify.
719
720 2018-10-25 Richard Biener <rguenther@suse.de>
721
722 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
723 Initialize ng to silence error with release checking bootstrap.
724
725 2018-10-25 Richard Biener <rguenther@suse.de>
726
727 * tree-if-conv.c: Include tree-ssa-sccvn.h.
728 (tree_if_conversion): Run CSE on the if-converted loop body.
729
730 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
731
732 * config/s390/constraints.md (ZL): New constraint.
733 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
734 operands.
735 * config/s390/s390.md (movdi_larl): Remove.
736 (movdi_64): Add the LARL alternative.
737
738 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
739
740 PR bootstrap/87747
741 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
742 (RTX_CODE_HWINT_P): New macro.
743 (rtx_code_size): Use RTX_CODE_HWINT_P ().
744
745 2018-10-25 Jan Hubicka <jh@suse.cz>
746
747 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
748 is anonymous.
749
750 2018-10-25 Richard Biener <rguenther@suse.de>
751
752 PR tree-optimization/87665
753 PR tree-optimization/87745
754 * tree-vectorizer.h (get_earlier_stmt): Remove.
755 (get_later_stmt): Pick up UID from the original non-pattern stmt.
756
757 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
758
759 * options.texi (Deprecated): Move list to Var section.
760
761 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
762 Jinsong Ji <jji@us.ibm.com>
763
764 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
765 __vector long to __vector long long.
766 (_mm_cvtpd_ps): Likewise.
767 (_mm_cvttpd_epi32): Likewise.
768 (_mm_cvtpi32_pd): Likewise.
769 (_mm_unpackhi_epi64): Likewise.
770 (_mm_unpacklo_epi64): Likewise.
771
772 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
773
774 PR rtl-optimization/87720
775 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
776
777 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
778
779 * gimple-ssa-isolate-paths.c
780 (find_implicit_erroneous_behavior): Do not change code if the
781 pass is running for warnings only.
782 (find_explicit_erroneous_behavior): Likewise.
783
784 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
785
786 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
787 Define as rs6000_mangle_decl_assembler_name.
788 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
789 long double to IEEE long double, switch the names of the long
790 double built-in functions to be <func>f128 instead of <func>l.
791
792 2018-10-24 Martin Sebor <msebor@redhat.com>
793
794 * doc/extend.texi (nonnull): List no-argument form. Reference
795 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
796
797 2018-10-24 Richard Biener <rguenther@suse.de>
798
799 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
800
801 2018-10-24 Martin Liska <mliska@suse.cz>
802
803 PR tree-optimization/84436
804 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
805 Remove.
806 (switch_conversion::contains_linear_function_p): New.
807 (switch_conversion::build_one_array): Support linear
808 transformation on input.
809 * tree-switch-conversion.h (struct switch_conversion): Add
810 contains_linear_function_p declaration.
811
812 2018-10-24 Richard Biener <rguenther@suse.de>
813
814 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
815 if its argument is CONSTANT_CLASS_P.
816
817 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
818
819 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
820 it is wrong for forward declarations.
821
822 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
823
824 * config/s390/s390.c (s390_check_qrst_address): Add the missing
825 SYMBOL_REF_P () check.
826
827 2018-10-24 Richard Biener <rguenther@suse.de>
828
829 PR tree-optimization/87105
830 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
831 dump classification.
832 (vect_analyze_data_ref_accesses): Handle duplicate loads and
833 stores by splitting the affected group after the fact.
834 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
835 fail the SLP build because of size constraints.
836
837 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
838
839 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
840 * configure: Regenerate.
841 * config.in: Regenerate.
842 * varasm.c (mergeable_string_section): Use readonly_data_section
843 if linker doesn't support SHF_MERGE with alignment > 8.
844 (mergeable_constant_section): Likewise.
845
846 2018-10-24 Richard Biener <rguenther@suse.de>
847
848 PR tree-optimization/84013
849 * tree-ssa-structalias.c (struct msdi_data): New struct for
850 marshalling data to walk_stmt_load_store_ops.
851 (maybe_set_dependence_info): Refactor as callback for
852 walk_stmt_load_store_ops.
853 (compute_dependence_clique): Set restrict info on all stmt kinds.
854
855 2018-10-24 Martin Liska <mliska@suse.cz>
856
857 * cgraph.c (cgraph_node::dump):
858 Remove reduntant dumps and make tp_first_run dump more compact.
859
860 2018-10-24 Richard Biener <rguenther@suse.de>
861
862 PR tree-optimization/87665
863 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
864 to reflect reality.
865
866 2018-10-12 Jeff Law <law@redhat.com>
867
868 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
869 for H8/S.
870
871 2018-10-23 Richard Biener <rguenther@suse.de>
872
873 * tree-vrp.c (add_assert_info): Guard dump_printf with
874 dump_enabled_p.
875 * gimple-ssa-evrp-analyze.c
876 (evrp_range_analyzer::record_ranges_from_incoming_edge):
877 Use value_range::ignore_equivs_equal_p.
878
879 2018-10-23 Richard Biener <rguenther@suse.de>
880
881 PR tree-optimization/87105
882 PR tree-optimization/87608
883 * passes.def (pass_all_early_optimizations): Add early phi-opt
884 after dce.
885 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
886 addition to debug stmts.
887 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
888 and abs replacement early.
889 * tree-cfg.c (gimple_empty_block_p): Likewise.
890
891 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
892
893 PR target/86383
894 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
895 specified to configure.
896 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
897
898 2018-10-23 Richard Biener <rguenther@suse.de>
899
900 PR tree-optimization/87700
901 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
902
903 2018-10-23 Jakub Jelinek <jakub@redhat.com>
904
905 PR target/87674
906 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
907 second argument from __mmask16 to __mmask8.
908 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
909 _mm_mask_packs_epi32): Likewise.
910 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
911 Likewise.
912 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
913
914 2018-10-23 Richard Biener <rguenther@suse.de>
915
916 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
917
918 2018-10-23 Richard Biener <rguenther@suse.de>
919
920 PR tree-optimization/86144
921 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
922 over simd attribute.
923
924 2018-10-23 Richard Biener <rguenther@suse.de>
925
926 PR tree-optimization/87693
927 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
928 the case we do not find the taken edge.
929
930 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
931 Jinsong Ji <jji@us.ibm.com>
932
933 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
934 (_mm_store_pd): Use unaligned vector type for pointer cast.
935 (_mm_maskmoveu_si128): Likewise.
936 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
937 (_mm_store_ps): Use unaligned vector type for pointer cast.
938
939 2018-10-22 Paul Koning <ni1d@arrl.net>
940
941 * symtab.c (symtab_node::increase_alignment): Correct max
942 alignment check.
943
944 2018-10-22 Yury Gribov <tetra2005@gmail.com>
945
946 PR tree-optimization/87633
947 * match.pd: Do not generate unordered integer comparisons.
948
949 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
950
951 PR rtl-optimization/87600
952 * combine.c: Add include of expr.h.
953 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
954 register to a pseudo.
955 (make_more_copies): New function, add a copy to a new pseudo after
956 the moves from hard registers into pseudos.
957 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
958 later. Call make_more_copies.
959
960 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
961
962 * lra-constraints.c (process_alt_operands): New local array,
963 matching_early_clobber. Check matching_early_clobber before
964 decrementing reject, and set matching_early_clobber after.
965
966 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
967
968 PR target/87598
969 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
970 call output_addr_const and hope for the best.
971
972 2018-10-22 Richard Biener <rguenther@suse.de>
973
974 * gimple-ssa-evrp-analyze.c
975 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
976 smarter about what ranges to use.
977 * tree-vrp.c (add_assert_info): Dump here.
978 (register_edge_assert_for_2): Instead of here at multiple but
979 not all places.
980
981 * gcc.dg/tree-ssa/evrp12.c: New testcase.
982 * gcc.dg/predict-6.c: Adjust.
983 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
984 * gcc.dg/tree-ssa/vrp02.c: Likewise.
985 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
986
987 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
988 Richard Biener <rguenther@suse.de>
989
990 * bitmap.h: Update data structure documentation, including a
991 description of bitmap views as either linked-lists or splay trees.
992 (struct bitmap_element_def): Update comments for splay tree bitmaps.
993 (struct bitmap_head_def): Likewise.
994 (bitmap_list_view, bitmap_tree_view): New prototypes.
995 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
996 tree_form fields.
997 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
998 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
999 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1000 released bitmap element here.
1001 (bitmap_element_free): Remove.
1002 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1003 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1004 this function similar ones such that linked-list bitmap implementation
1005 functions are grouped.
1006 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1007 and moved for grouping.
1008 (bitmap_list_insert_element_after): Renamed from
1009 bitmap_elt_insert_after, and moved for grouping.
1010 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1011 (bitmap_tree_link_left, bitmap_tree_link_right,
1012 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1013 bitmap_tree_link_element, bitmap_tree_unlink_element,
1014 bitmap_tree_find_element): New functions for splay-tree bitmap
1015 implementation.
1016 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1017 Renamed and moved, see above entries.
1018 (bitmap_tree_listify_from): New function to convert part of a splay
1019 tree bitmap to a linked-list bitmap.
1020 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1021 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1022 (bitmap_find_bit): Remove.
1023 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1024 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1025 Handle splay tree bitmaps.
1026 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1027 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1028 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1029 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1030 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1031 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1032 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1033 corresponding changes to use linked-list specific bitmap_element
1034 manipulation functions as applicable for efficiency.
1035 (bitmap_tree_to_vec): New function.
1036 (debug_bitmap_elt_file): New function split out from ...
1037 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1038 (bitmap_print): Likewise.
1039
1040 PR tree-optimization/63155
1041 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1042 SSA edge worklists.
1043 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1044 in tree-view.
1045
1046 2018-10-22 Martin Liska <mliska@suse.cz>
1047
1048 PR tree-optimization/87686
1049 Revert
1050 2018-08-29 Martin Liska <mliska@suse.cz>
1051
1052 * tree-switch-conversion.c (switch_conversion::expand):
1053 Strenghten assumption about gswitch statements.
1054
1055 2018-10-22 Martin Liska <mliska@suse.cz>
1056
1057 * ipa-icf.c (sem_item::compare_attributes): Remove.
1058 (sem_item::compare_referenced_symbol_properties): Use
1059 attribute_list_equal instead.
1060 (sem_function::equals_wpa): Likewise.
1061 * ipa-icf.h: Remove compare_attributes.
1062
1063 2018-10-22 Richard Biener <rguenther@suse.de>
1064
1065 PR middle-end/87682
1066 * mem-stats.h (mem_usage::operator==): Fix pasto.
1067
1068 2018-10-22 Richard Biener <rguenther@suse.de>
1069
1070 PR tree-optimization/87640
1071 * tree-vrp.c (set_value_range_with_overflow): Decompose
1072 incomplete result.
1073 (extract_range_from_binary_expr_1): Adjust.
1074
1075 2018-10-22 Martin Jambor <mjambor@suse.cz>
1076
1077 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1078 (stmt_can_throw_external): Likewise.
1079 (stmt_can_throw_internal): Likewise.
1080 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1081 (lower_eh_constructs_2): Likewise.
1082 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1083 (stmt_can_throw_external): Likewise.
1084 (stmt_can_throw_internal): Likewise.
1085 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1086 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1087 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1088 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1089 (pass_lower_eh_dispatch::execute): Pass cfun to
1090 stmt_can_throw_external.
1091 (cleanup_empty_eh): Likewise.
1092 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1093 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1094 stmt_can_throw_external instead of pushing it to cfun.
1095 (symbol_table::create_edge): Likewise.
1096 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1097 stmt_can_throw_internal.
1098 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1099 to stmt_could_throw_p.
1100 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1101 stmt_can_throw_internal.
1102 (pass_store_merging::execute): Likewise.
1103 * gimple-ssa-strength-reduction.c
1104 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1105 stmt_could_throw_p.
1106 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1107 stmt_can_throw_internal.
1108 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1109 to stmt_can_throw_external.
1110 (check_stmt): Pass cfun to stmt_could_throw_p.
1111 (check_stmt): Pass cfun to stmt_can_throw_external.
1112 (pass_nothrow::execute): Likewise.
1113 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1114 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1115 stmt_can_throw_internal.
1116 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1117 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1118 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1119 * tree-complex.c (expand_complex_libcall): Pass cfun to
1120 stmt_could_throw_p and to stmt_can_throw_internal.
1121 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1122 * tree-inline.c (copy_edges_for_bb): Likewise.
1123 (maybe_move_debug_stmts_to_successors): Likewise.
1124 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1125 stmt_could_throw_p.
1126 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1127 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1128 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1129 stmt_can_throw_internal.
1130 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1131 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1132 stmt_could_throw_p.
1133 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1134 stmt_can_throw_internal.
1135 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1136 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1137 stmt_could_throw_p.
1138 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1139 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1140 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1141 (convert_mult_to_fma_1): Likewise.
1142 (convert_to_divmod): Likewise.
1143 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1144 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1145 * tree-ssa-propagate.c
1146 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1147 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1148 (maybe_optimize_range_tests): Likewise.
1149 (linearize_expr_tree): Likewise.
1150 (reassociate_bb): Likewise.
1151 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1152 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1153 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1154 (handle_char_store): Likewise.
1155 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1156 stmt_can_throw_internal.
1157 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1158 stmt_could_throw_p.
1159 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1160 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1161 (vectorizable_simd_clone_call): Likewise.
1162 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1163 (gimple_stringop_fixed_value): Likewise.
1164
1165 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1166
1167 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1168 literal pool references.
1169 (s390_check_qrst_address): Adapt to the new behavior of
1170 s390_loadrelative_operand_p ().
1171
1172 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1173
1174 PR target/72782
1175 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1176
1177 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1178
1179 PR target/72782
1180 * config/i386/sse.md (*<code><mode>3_bcst): New.
1181
1182 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1183
1184 PR target/72782
1185 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1186 V4DI, V16SI and V8DI.
1187 (*sub<mode>3<mask_name>_bcst): New.
1188 (*add<mode>3<mask_name>_bcst): Likewise.
1189
1190 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1191 Jinsong Ji <jji@us.ibm.com>
1192
1193 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1194 __m64 with __vector unsigned long long for compatibility.
1195 (_mm_movemask_epi8): Likewise.
1196 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1197 (_mm_cvttps_pi32): Likewise.
1198 (_mm_cvtpi32_ps): Likewise.
1199 (_mm_cvtps_pi16): Likewise.
1200 (_mm_loadh_pi): Likewise.
1201 (_mm_storeh_pi): Likewise.
1202 (_mm_movehl_ps): Likewise.
1203 (_mm_movelh_ps): Likewise.
1204 (_mm_loadl_pi): Likewise.
1205 (_mm_storel_pi): Likewise.
1206 (_mm_movemask_ps): Likewise.
1207 (_mm_shuffle_pi16): Likewise.
1208
1209 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1210
1211 PR target/72782
1212 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1213 __builtin_ia32_vfnmsubpd512_mask.
1214 (_mm512_mask_fnmsub_round_pd): Likewise.
1215 (_mm512_fnmsub_pd): Likewise.
1216 (_mm512_mask_fnmsub_pd): Likewise.
1217 (_mm512_maskz_fnmsub_round_pd): Use
1218 __builtin_ia32_vfnmsubpd512_maskz.
1219 (_mm512_maskz_fnmsub_pd): Likewise.
1220 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1221 (_mm512_mask_fnmsub_round_ps): Likewise.
1222 (_mm512_fnmsub_ps): Likewise.
1223 (_mm512_mask_fnmsub_ps): Likewise.
1224 (_mm512_maskz_fnmsub_round_ps): Use
1225 __builtin_ia32_vfnmsubps512_maskz.
1226 (_mm512_maskz_fnmsub_ps): Likewise.
1227 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1228 __builtin_ia32_vfnmsubpd256_mask.
1229 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1230 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1231 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1232 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1233 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1234 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1235 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1236 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1237 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1238 __builtin_ia32_vfnmsubpd.
1239 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1240 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1241 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1242 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1243 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1244 * config/i386/i386-builtin.def: Add
1245 __builtin_ia32_vfnmsubpd256_mask,
1246 __builtin_ia32_vfnmsubpd256_maskz,
1247 __builtin_ia32_vfnmsubpd128_mask,
1248 __builtin_ia32_vfnmsubpd128_maskz,
1249 __builtin_ia32_vfnmsubps256_mask,
1250 __builtin_ia32_vfnmsubps256_maskz,
1251 __builtin_ia32_vfnmsubps128_mask,
1252 __builtin_ia32_vfnmsubps128_maskz,
1253 __builtin_ia32_vfnmsubpd512_mask,
1254 __builtin_ia32_vfnmsubpd512_maskz,
1255 __builtin_ia32_vfnmsubps512_mask,
1256 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1257 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1258 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1259 __builtin_ia32_vfnmsubpd256.
1260 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1261 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1262 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1263 Likewise.
1264 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1265 Likewise.
1266 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1267 Likewise.
1268 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1269
1270 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1271
1272 PR target/72782
1273 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1274 __builtin_ia32_vfnmaddpd512_mask.
1275 (_mm512_mask_fnmadd_round_pd): Likewise.
1276 (_mm512_fnmadd_pd): Likewise.
1277 (_mm512_mask_fnmadd_pd): Likewise.
1278 (_mm512_maskz_fnmadd_round_pd): Use
1279 __builtin_ia32_vfnmaddpd512_maskz.
1280 (_mm512_maskz_fnmadd_pd): Likewise.
1281 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1282 (_mm512_mask_fnmadd_round_ps): Likewise.
1283 (_mm512_fnmadd_ps): Likewise.
1284 (_mm512_mask_fnmadd_ps): Likewise.
1285 (_mm512_maskz_fnmadd_round_ps): Use
1286 __builtin_ia32_vfnmaddps512_maskz.
1287 (_mm512_maskz_fnmadd_ps): Likewise.
1288 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1289 __builtin_ia32_vfnmaddpd256_mask.
1290 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1291 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1292 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1293 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1294 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1295 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1296 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1297 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1298 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1299 __builtin_ia32_vfnmaddpd.
1300 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1301 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1302 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1303 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1304 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1305 * config/i386/i386-builtin.def: Add
1306 __builtin_ia32_vfnmaddpd256_mask,
1307 __builtin_ia32_vfnmaddpd256_maskz,
1308 __builtin_ia32_vfnmaddpd128_mask,
1309 __builtin_ia32_vfnmaddpd128_maskz,
1310 __builtin_ia32_vfnmaddps256_mask,
1311 __builtin_ia32_vfnmaddps256_maskz,
1312 __builtin_ia32_vfnmaddps128_mask,
1313 __builtin_ia32_vfnmaddps128_maskz,
1314 __builtin_ia32_vfnmaddpd512_mask,
1315 __builtin_ia32_vfnmaddpd512_maskz,
1316 __builtin_ia32_vfnmaddps512_mask,
1317 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1318 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1319 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1320 __builtin_ia32_vfnmaddpd256.
1321 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1322 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1323 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1324 Likewise.
1325 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1326 Likewise.
1327 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1328 Likewise.
1329 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1330
1331 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 PR target/72782
1334 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1335 __builtin_ia32_vfmsubpd512_mask.
1336 (_mm512_mask_fmsub_round_pd): Likewise.
1337 (_mm512_fmsub_pd): Likewise.
1338 (_mm512_mask_fmsub_pd): Likewise.
1339 (_mm512_maskz_fmsub_round_pd): Use
1340 __builtin_ia32_vfmsubpd512_maskz.
1341 (_mm512_maskz_fmsub_pd): Likewise.
1342 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1343 (_mm512_mask_fmsub_round_ps): Likewise.
1344 (_mm512_fmsub_ps): Likewise.
1345 (_mm512_mask_fmsub_ps): Likewise.
1346 (_mm512_maskz_fmsub_round_ps): Use
1347 __builtin_ia32_vfmsubps512_maskz.
1348 (_mm512_maskz_fmsub_ps): Likewise.
1349 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1350 __builtin_ia32_vfmsubpd256_mask.
1351 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1352 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1353 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1354 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1355 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1356 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1357 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1358 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1359 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1360 __builtin_ia32_vfmsubpd.
1361 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1362 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1363 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1364 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1365 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1366 * config/i386/i386-builtin.def: Add
1367 __builtin_ia32_vfmsubpd256_mask,
1368 __builtin_ia32_vfmsubpd256_maskz,
1369 __builtin_ia32_vfmsubpd128_mask,
1370 __builtin_ia32_vfmsubpd128_maskz,
1371 __builtin_ia32_vfmsubps256_mask,
1372 __builtin_ia32_vfmsubps256_maskz,
1373 __builtin_ia32_vfmsubps128_mask,
1374 __builtin_ia32_vfmsubps128_maskz,
1375 __builtin_ia32_vfmsubpd512_mask,
1376 __builtin_ia32_vfmsubpd512_maskz,
1377 __builtin_ia32_vfmsubps512_mask,
1378 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1379 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1380 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1381 __builtin_ia32_vfmsubpd256.
1382 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1383 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1384 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1385 Likewise.
1386 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1387 Likewise.
1388 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1389 Likewise.
1390 (fmai_vmfmsub_<mode><round_name>): Likewise.
1391
1392 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1393
1394 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1395 Remove plus. Renamed to ...
1396 (*sub<mode>3<mask_name>_bcst): This.
1397 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1398 (*add<mode>3<mask_name>_bcst): This.
1399
1400 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1401
1402 PR target/72782
1403 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1404
1405 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 PR target/87662
1408 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1409 (_mm_or_epi32): Likewise.
1410 (_mm256_xor_epi32): Likewise.
1411 (_mm_xor_epi32): Likewise.
1412 (_mm256_or_epi64): Likewise.
1413 (_mm_or_epi64): Likewise.
1414 (_mm256_xor_epi64): Likewise.
1415 (_mm_xor_epi64): Likewise.
1416
1417 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1418
1419 PR target/72782
1420 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1421
1422 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR middle-end/87647
1425 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1426
1427 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1428
1429 * doc/ux.texi: Move @section directly after @node.
1430
1431 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1432
1433 PR middle-end/85488
1434 PR middle-end/87649
1435 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1436 depend closely nested inside of loop with ordered clause with
1437 a parameter.
1438
1439 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1440
1441 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1442 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1443 * doc/ux.texi: New file.
1444
1445 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1446
1447 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1448 be the first CR field allocated.
1449
1450 2018-10-19 Richard Biener <rguenther@suse.de>
1451
1452 PR target/87657
1453 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1454 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1455
1456 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 PR target/72782
1459 * config/i386/sse.md
1460 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1461 (*add<mode>3<mask_name>_bcst_2): Likewise.
1462
1463 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1464
1465 * config/i386/sse.md
1466 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1467 Replace nonimmediate_operand with register_operand.
1468 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1469 Likewise.
1470 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1471 Likewise.
1472
1473 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1474
1475 PR rtl-optimization/87596
1476 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1477 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1478 for instructions in FROM..TO range.
1479
1480 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1481
1482 * cfgexpand.c (expand_one_var): Use specific wording in error message
1483 for non-local frame variables.
1484 * stor-layout.c (layout_decl): Do not issue a warning for them.
1485
1486 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1487
1488 * haifa-sched.c (priority): Add force_recompute parameter.
1489 (apply_replacement): Call priority () with force_recompute = true.
1490 (restore_pattern): Likewise.
1491
1492 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1493
1494 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1495 HOST_BITS_PER_WIDE_INT.
1496 (test_vector_ops_duplicate): Likewise.
1497
1498 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 PR target/72782
1501 * config/i386/sse.md (VF_AVX512): New.
1502 (avx512bcst): Likewise.
1503 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1504 Likewise.
1505 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1506 Likewise.
1507 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1508 Likewise.
1509
1510 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1511
1512 * doc/invoke.texi (-dumpversion): Improve grammar.
1513 (-dumpfullversion): Make more consistent with -dumpversion.
1514
1515 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1516
1517 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1518 Set JUMP_LABEL to the jump insn.
1519 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1520 Predict emitted jump and add label to jump insn.
1521
1522 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1523
1524 PR tree-optimization/87562
1525 * input.c (get_substring_ranges_for_loc): Use
1526 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1527 getting the linemap for the endpoint. Verify that it's either
1528 in the same linemap as the start point's spelling location, or
1529 at least in the same file.
1530
1531 2018-10-18 Richard Biener <rguenther@suse.de>
1532
1533 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1534 feed width-specific load/store costs through ix86_vec_cost.
1535 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1536 (k8_cost): Likewise.
1537 (bdver_cost): Likewise.
1538 (znver1_cost): Likewise.
1539 (btver1_cost): Likewise.
1540 (btver2_cost): Likewise.
1541
1542 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1545 to simplify subreg of vec_merge.
1546
1547 2018-10-18 Richard Biener <rguenther@suse.de>
1548
1549 * config/i386/i386.c: Fix costing of vector FMA.
1550
1551 2018-10-18 Richard Biener <rguenther@suse.de>
1552
1553 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1554 and argument.
1555 (ix86_builtin_vectorization_cost): For vec_construct properly
1556 cost insertion into SSE regs.
1557 (...): Adjust calls to ix86_vec_cost.
1558
1559 2018-10-18 Richard Biener <rguenther@suse.de>
1560
1561 PR middle-end/87087
1562 Revert
1563 2018-02-07 Richard Biener <rguenther@suse.de>
1564
1565 PR tree-optimization/84204
1566 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1567 this place.
1568
1569 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1570
1571 PR target/87537
1572 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1573 of vec_duplicate.
1574 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1575 VEC_MERGE of a VEC_DUPLICATE.
1576
1577 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1578
1579 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1580 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1581 * doc/standards.texi (C Language): Document C2X.
1582 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1583 (rl78_option_override): Handle "GNU C2X" language name.
1584
1585 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1586
1587 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1588 Document C17 as published in 2018.
1589
1590 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1591
1592 PR middle-end/87623
1593 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1594 bail out if both sides do not have the same storage order.
1595
1596 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1597
1598 * bitmap.c (bitmap_head::dump): New.
1599 * bitmap.h (bitmap_head): Add dump().
1600 * gimple-ssa-evrp-analyze.c
1601 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1602 (evrp_range_analyzer::set_ssa_range_info): Same.
1603 (evrp_range_analyzer::record_ranges_from_phis): Same.
1604 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1605 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1606 * gimple-ssa-sprintf.c (get_int_range): Same.
1607 (format_integer): Same.
1608 (sprintf_dom_walker::handle_gimple_call): Same.
1609 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1610 (ipcp_vr_lattice::top_p): Same.
1611 (ipcp_vr_lattice::bottom_p): Same.
1612 (ipcp_vr_lattice::set_to_bottom): Same.
1613 (ipa_vr_operation_and_type_effects): Same.
1614 (propagate_vr_across_jump_function): Same.
1615 (ipcp_store_vr_results): Same.
1616 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1617 (ipa_print_node_jump_functions_for_edge): Same.
1618 (ipa_get_value_range): Same.
1619 (ipa_compute_jump_functions_for_edge): Same.
1620 (ipa_write_jump_function): Same.
1621 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1622 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1623 Same.
1624 * vr-values.c (set_value_range_to_nonnegative): Same.
1625 (set_value_range_to_truthvalue): Same.
1626 (vr_values::get_value_range): Same.
1627 (vr_values::set_defs_to_varying): Same.
1628 (vr_values::update_value_range): Same.
1629 (symbolic_range_based_on_p): Same.
1630 (vr_values::op_with_boolean_value_range_p): Same.
1631 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1632 (vr_values::extract_range_from_ssa_name): Same.
1633 (vr_values::extract_range_from_binary_expr): Same.
1634 (vr_values::extract_range_from_unary_expr): Same.
1635 (vr_values::extract_range_from_cond_expr): Same.
1636 (vr_values::extract_range_from_comparison): Same.
1637 (vr_values::check_for_binary_op_overflow): Same.
1638 (vr_values::extract_range_basic): Same.
1639 (vr_values::extract_range_from_assignment): Same.
1640 (compare_ranges): Same.
1641 (compare_range_with_value): Same.
1642 (vr_values::adjust_range_with_scev): Same.
1643 (vrp_valueize): Same.
1644 (vrp_valueize_1): Same.
1645 (vr_values::get_vr_for_comparison): Same.
1646 (vr_values::compare_name_with_value): Same.
1647 (vr_values::compare_names): Same.
1648 (vr_values::vrp_evaluate_conditional): Same.
1649 (find_case_label_ranges): Same.
1650 (vr_values::vrp_visit_switch_stmt): Same.
1651 (vr_values::extract_range_from_phi_node): Same.
1652 (vr_values::simplify_div_or_mod_using_ranges): Same.
1653 (vr_values::simplify_bit_ops_using_ranges): Same.
1654 (test_for_singularity): Same.
1655 (range_fits_type_p): Same.
1656 (vr_values::simplify_cond_using_ranges_1): Same.
1657 (vr_values::simplify_switch_using_ranges): Same.
1658 (vr_values::simplify_float_conversion_using_ranges): Same.
1659 (vr_values::two_valued_val_range_p): Same.
1660 (vr_values::add_equivalence): Move to value_range::equiv_add.
1661 * vr-values.h (vr_values::add_equivalence): Remove.
1662 (VR_INITIALIZER): Remove.
1663 * tree-vrp.c (value_range::set): New.
1664 (value_range::equiv_add): New.
1665 (value_range::value_range): New.
1666 (value_range::deep_copy): New.
1667 (value_range::check): New.
1668 (value_range::equal_p): New.
1669 (value_range::ignore_equivs_equal_p): New.
1670 (value_range::operator==): New.
1671 (value_range::operator!=): New.
1672 (value_range::symbolic_p): New.
1673 (value_range::numeric_p): New.
1674 (value_range::set_undefined): New.
1675 (value_range::set_varying): New.
1676 (value_range::may_contain_p): New.
1677 (value_range::equiv_clear): New.
1678 (value_range::singleton_p): New.
1679 (value_range::intersect): New.
1680 (value_range::dump): New.
1681 (value_range::set_and_canonicalize): New.
1682 (set_value_range): Adjust for value_range API.
1683 (set_value_range_to_undefined): Same.
1684 (set_value_range_to_varying): Same.
1685 (set_and_canonicalize_value_range): Same.
1686 (set_value_range_to_nonnull): Same.
1687 (set_value_range_to_null): Same.
1688 (range_is_null): Same.
1689 (range_is_nonnull): Same.
1690 (range_int_cst_p): Same.
1691 (range_int_cst_singleton_p): Same.
1692 (symbolic_range_p): Same.
1693 (range_includes_zero_p): Same.
1694 (value_range_constant_singleton): Same.
1695 (vrp_set_zero_nonzero_bits): Same.
1696 (ranges_from_anti_range): Same.
1697 (extract_range_into_wide_ints): Same.
1698 (extract_range_from_multiplicative_op): Same.
1699 (set_value_range_with_overflow): Same.
1700 (extract_range_from_binary_expr_1): Same.
1701 (extract_range_from_unary_expr): Same.
1702 (dump_value_range): Same.
1703 (debug_value_range): Same.
1704 (vrp_prop::check_array_ref): Same.
1705 (vrp_prop::check_mem_ref): Same.
1706 (vrp_prop::vrp_initialize): Same.
1707 (vrp_prop::visit_stmt): Same.
1708 (intersect_ranges): Same.
1709 (vrp_prop::visit_phi): Same.
1710 (vrp_prop::vrp_finalize): Same.
1711 (determine_value_range_1): Same.
1712 (determine_value_range): Same.
1713 (vrp_intersect_ranges_1): Rename to...
1714 (vrp_intersect_1): this.
1715 (vrp_intersect_ranges): Rename to...
1716 (value_range::intersect_helper): ...this.
1717 (vrp_meet_1): Rename to...
1718 (value_range::union_helper): ...this.
1719 (vrp_meet): Rename to...
1720 (value_range::union_): ...this.
1721 (copy_value_range): Remove.
1722 * tree-vrp.h (struct value_range): Rewrite into a proper class.
1723 (value_range::vrtype): New.
1724 (value_range::type): New.
1725 (value_range::equiv): New.
1726 (value_range::min): New.
1727 (value_range::max): New.
1728 (value_range::varying_p): New.
1729 (value_range::undefined_p): New.
1730 (value_range::null_p): New.
1731 (value_range::equiv_add): New.
1732 (copy_value_range): Remove.
1733
1734 2018-10-17 David Malcolm <dmalcolm@redhat.com>
1735
1736 * Makefile.in (SELFTEST_TARGETS): New.
1737 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1738 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1739 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1740 c/Make-lang.in.
1741 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1742 (selftest-c++-gdb, selftest-c++-valgrind): Move to
1743 cp/Make-lang.in.
1744 * configure: Regenerate.
1745 * configure.ac (selftest_languages): New.
1746
1747 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1748
1749 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1750 overflow wraps argument.
1751 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1752 wide_int_range_multiplicative_op.
1753 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1754 overflow wraps argument.
1755 (wide_int_range_multiplicative_op): Same.
1756 (wide_int_range_lshift): Same.
1757 (wide_int_range_div): Same.
1758 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1759 (wide_int_range_lshift): Same.
1760 (wide_int_range_div): Same.
1761
1762 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1763
1764 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1765 use sign as argument.
1766 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1767 wide_int_range_shift_undefined_p.
1768
1769 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1770
1771 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1772 Rename to...
1773 (@despeculate_copy<ALLI_TI:mode>): ... This.
1774 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1775 switch statement.
1776
1777 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1778
1779 * config.gcc: Obsolete *-*-solaris2.10*.
1780 * doc/install.texi (Specific, *-*-solaris2*): Document it.
1781
1782 2018-10-12 Jeff Law <law@redhat.com>
1783
1784 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
1785 reg + sym +- const_int addressing modes.
1786
1787 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1788
1789 * common.opt (fdiagnostics-minimum-margin-width=): New option.
1790 * diagnostic-show-locus.c (layout::layout): Apply the minimum
1791 margin width.
1792 (layout::start_annotation_line): Only print up to 3 of the
1793 margin character, to avoid touching the left-hand side.
1794 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
1795 minimum margin width, as set by test_diagnostic_context's ctor.
1796 (selftest::test_fixit_insert_containing_newline): Likewise.
1797 (selftest::test_fixit_insert_containing_newline_2): Likewise.
1798 (selftest::test_line_numbers_multiline_range): Clear
1799 dc.min_margin_width.
1800 * diagnostic.c (diagnostic_initialize): Initialize
1801 min_margin_width.
1802 * diagnostic.h (struct diagnostic_context): Add field
1803 "min_margin_width".
1804 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
1805 * opts.c (common_handle_option): Handle
1806 OPT_fdiagnostics_minimum_margin_width_.
1807 * selftest-diagnostic.c
1808 (selftest::test_diagnostic_context::test_diagnostic_context):
1809 Initialize min_margin_width to 6.
1810 * toplev.c (general_init): Initialize global_dc->min_margin_width.
1811
1812 2018-10-15 David Malcolm <dmalcolm@redhat.com>
1813
1814 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1815 Fix usage of "error_at_rich_loc" in the comment.
1816
1817 2018-10-15 Renlin Li <renlin.li@arm.com>
1818
1819 PR target/87563
1820 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
1821 if-conversioned loop when it contains ifn with types not
1822 supported by backend.
1823 * internal-fn.c (expand_direct_optab_fn): Add an assert.
1824 (direct_internal_fn_supported_p): New helper function.
1825 * internal-fn.h (direct_internal_fn_supported_p): Declare.
1826
1827 2018-10-15 Jakub Jelinek <jakub@redhat.com>
1828
1829 PR target/87572
1830 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1831 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1832 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1833
1834 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1835
1836 PR tree-optimization/87022
1837 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1838 bits in dist vector rather than the first one.
1839
1840 2018-10-15 Richard Biener <rguenther@suse.de>
1841
1842 PR middle-end/87610
1843 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
1844 (visit_loadstore): When a used restrict tag escaped verify that
1845 the points-to solution of "other" pointers do not include
1846 escaped.
1847 (compute_dependence_clique): If a used restrict tag escaped
1848 communicated that down to visit_loadstore.
1849
1850 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
1851
1852 * config/s390/s390.c (s390_expand_vec_init): Force vector element
1853 into reg if it isn't a general operand.
1854
1855 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1856
1857 PR target/87599
1858 * config/i386/sse.md (*vec_dupv2di): Add register source to
1859 movddup.
1860
1861 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
1862
1863 PR target/87572
1864 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
1865 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
1866 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
1867 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
1868
1869 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
1870
1871 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
1872 (notice_args_size): Set it in the current trace if no insn that can
1873 throw internally has been seen yet.
1874 (connect_traces): When connecting args_size between traces, allow the
1875 incoming values not to match if there is an insn setting it before the
1876 first insn that can throw internally; in that case, force the creation
1877 of a CFI note on this latter insn.
1878
1879 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
1880
1881 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
1882 the base class, because using the injected-class-name was not clearly
1883 specified until DR 176.
1884
1885 2018-10-12 Paul Koning <ni1d@arrl.net>
1886
1887 * config/pdp11/pdp11.md (doloop_end): New expander.
1888 (doloop_end_insn): renamed from "doloop_end".
1889 (addqi3): New pattern.
1890 (subqi3): New pattern.
1891 * config/pdp11/predicates.md (incdec_operand): New predicate.
1892
1893 2018-10-12 Yury Gribov <tetra2005@gmail.com>
1894
1895 PR middle-end/81376
1896 * real.c (format_helper::can_represent_integral_type_p): New function
1897 * real.h (format_helper::can_represent_integral_type_p): Ditto.
1898 * match.pd: New pattern.
1899
1900 2018-10-12 Alexandre Oliva <oliva@adacore.com>
1901
1902 * configure.ac: Introduce --enable-large-address-aware
1903 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1904 * doc/install.texi: Document it.
1905 * configure, config.in: Rebuilt.
1906 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1907 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1908 (LINK_SPEC): Insert it.
1909 * config/i386/mingw-w64.h: Likewise.
1910
1911 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1912
1913 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
1914
1915 PR rtl-optimization/87600
1916 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1917
1918 2018-10-12 Paul Koning <ni1d@arrl.net>
1919
1920 * doc/md.texi (doloop_end): Document that the pattern code may
1921 need to check operand mode.
1922
1923 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
1924
1925 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1926 to zero-extend between int and floating-point registers.
1927 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1928 ldp into floating-point registers. Add type and arch attributes.
1929 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1930 Use f_loads for type attribute.
1931
1932 2018-10-11 Martin Sebor <msebor@redhat.com>
1933
1934 * doc/extend.texi (attribute packed): Correct typos.
1935
1936 2018-10-11 Martin Sebor <msebor@redhat.com>
1937
1938 * doc/extend.texi (attribute flatten): Mention interaction with
1939 noinline.
1940
1941 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1942
1943 PR target/87156
1944 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1945 Set new_decl virtual flag to zero.
1946
1947 2018-10-11 Martin Sebor <msebor@redhat.com>
1948
1949 PR middle-end/87593
1950 * doc/extend.texi (attribute format_arg): Discuss using multiple
1951 attributes on a single function.
1952
1953 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
1954
1955 PR tree-optimization/86829
1956 * match.pd (sin (atan (x))): New simplification rules.
1957 (cos (atan (x))): Likewise.
1958 * real.c (build_sinatan_real): New function.
1959 * real.h (build_sinatan_real): Prototype.
1960
1961 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
1962
1963 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1964 function.
1965 (fold_mergeeo_helper): New helper function.
1966 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1967 intrinsics. Correct some whitespace indentation issues.
1968
1969 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
1970
1971 PR target/87511
1972 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1973 Use HOST_WIDE_INT_1U for shift.
1974
1975 2018-10-11 Doug Rupp <rupp@adacore.com>
1976 Olivier Hainque <hainque@adacore.com>
1977
1978 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1979 Pass --relax to the linker for RTPs.
1980 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1981
1982 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
1983 Jan Hubicka <jh@suse.cz>
1984 Martin Jambor <mjambor@suse.cz>
1985
1986 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1987 the same elements are repeated rather than printing all of them.
1988 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1989 "repeated" elements.
1990 * read-rtl-function.c (test_loading_repeat): New function.
1991 (read_rtl_function_c_tests): Call test_loading_repeat.
1992 * rtl-tests.c (test_dumping_repeat): New function.
1993 (rtl_tests_c_tests): Call test_dumping_repeat.
1994
1995 2018-10-11 Richard Biener <rguenther@suse.de>
1996
1997 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1998 bdver?_cost): Unify to ...
1999 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2000 * config/i386/i386.c (processor_cost_table): Adjust.
2001
2002 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2003
2004 PR middle-end/87574
2005 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2006 the thunk when expanding to GIMPLE.
2007
2008 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2009
2010 * varasm.c (mergeable_string_section): Don't try to move zero-length
2011 strings to the merge section.
2012
2013 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2014
2015 PR target/87573
2016 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2017
2018 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2019
2020 PR target/87550
2021 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2022 to special_args set.
2023
2024 2018-10-10 Richard Biener <rguenther@suse.de>
2025
2026 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2027 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2028 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2029 and recursing and pattern terminating the recursion on SSE
2030 vector width using ix86_expand_reduc.
2031 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2032 width and recursing and SSE2 vector variant doing the final
2033 reduction with ix86_expand_reduc.
2034 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2035 with terminating the recursion at AVX level, splitting that
2036 to SSE there.
2037
2038 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2039
2040 * genmatch.c (error_cb): Rename to...
2041 (diagnostic_cb): ...this, converting int params to enums.
2042 (fatal_at): Update for renaming.
2043 (warning_at): Likewise.
2044 (main): Likewise.
2045 * input.c (selftest::ebcdic_execution_charset::apply):
2046 Update for renaming of...
2047 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2048 to...
2049 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2050 converting level and reason to enums.
2051 (class selftest::lexer_error_sink): Rename to...
2052 (class selftest::lexer_test_options): ...this, renaming field
2053 "m_errors" to "m_diagnostics".
2054 (selftest::lexer_test_options::apply): Update for renaming of...
2055 (selftest::lexer_test_options::on_error): ...this, renaming to...
2056 (selftest::lexer_test_options::on_diagnostic): ...this
2057 converting level and reason to enums.
2058 (selftest::test_lexer_string_locations_raw_string_unterminated):
2059 Update for renamings.
2060 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2061 "reason".
2062
2063 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2064
2065 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2066 * config/rs6000/pmmintrin.h: New file.
2067
2068 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2069
2070 PR tree-optimization/86659
2071 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2072
2073 2018-10-09 Richard Biener <rguenther@suse.de>
2074
2075 PR tree-optimization/63155
2076 * tree-ssa-structalias.c: Include tree-ssa.h.
2077 (get_constraint_for_ssa_var): For undefs return nothing_id.
2078 (find_func_aliases): Cleanup PHI handling.
2079
2080 2018-10-09 Richard Biener <rguenther@suse.de>
2081
2082 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2083 replacements.
2084
2085 2018-10-09 Martin Liska <mliska@suse.cz>
2086
2087 * asan.c (asan_emit_stack_protection): If a stack variable
2088 is located in a same file as current function, then emit
2089 line info into variable definition string.
2090
2091 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2092
2093 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2094 information.
2095
2096 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2097
2098 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2099 on the thunk.
2100
2101 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 PR tree-optimization/86659
2104 * gimple-match.h (struct gimple_match_op): Add reverse field.
2105 (gimple_match_op::set_op): New overloaded method.
2106 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2107 the REF_REVERSE_STORAGE_ORDER flag on the value.
2108 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2109 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2110
2111 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2112
2113 PR middle-end/63155
2114 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2115 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2116
2117 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2118
2119 PR target/87517
2120 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2121 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2122
2123 2018-10-08 Richard Biener <rguenther@suse.de>
2124
2125 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2126 cost the same as AVX128 ones.
2127
2128 2018-10-08 Paul Koning <ni1d@arrl.net>
2129
2130 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2131 (expand_block_move): New function.
2132 * config/pdp11/pdp11.c (output_block_move): Remove.
2133 (expand_block_move): New function.
2134 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2135 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2136 (*movmemhi1): Remove.
2137
2138 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2139
2140 * config/s390/2827.md: Increase latencies for some FP instructions.
2141
2142 2018-10-08 Richard Biener <rguenther@suse.de>
2143
2144 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2145 Open a dump scope.
2146 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2147 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2148 (add_stmt_cost): Dump return value of the hook.
2149
2150 2018-10-08 Richard Biener <rguenther@suse.de>
2151
2152 PR tree-optimization/63155
2153 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2154 (ssa_propagation_engine::ssa_propagate): Remove redundant
2155 bitmap bit clearing.
2156
2157 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2158
2159 PR rtl-optimization/86939
2160 PR rtl-optimization/87479
2161 * ira.h (non_conflicting_reg_copy_p): New prototype.
2162 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2163 (make_hard_regno_dead): Don't add conflicts for register
2164 ignore_reg_for_conflicts.
2165 (make_object_dead): Likewise.
2166 (non_conflicting_reg_copy_p): New function.
2167 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2168 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2169 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2170 (make_hard_regno_dead): Don't add conflicts for register
2171 ignore_reg_for_conflicts. Remove special conflict handling of
2172 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2173 check_pic_pseudo_p and update callers.
2174 (mark_pseudo_dead): Don't add conflicts for register
2175 ignore_reg_for_conflicts.
2176 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2177
2178 2018-10-05 Andrew Waterman <andrew@sifive.com>
2179 Jim Wilson <jimw@sifive.com>
2180
2181 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2182 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2183 new pattern using HONOR_SNANS that emits one extra instruction.
2184
2185 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2186
2187 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2188 patterns): Merge SI and DI patterns to a GPR pattern.
2189 (unnamed define_insn and define_split for record form of that): Merge
2190 to a single define_insn_and_split pattern.
2191
2192 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2193
2194 PR c++/56856
2195 * input.c (expand_location_to_spelling_point): Add param "aspect"
2196 and use rather than hardcoding LOCATION_ASPECT_CARET.
2197 (get_substring_ranges_for_loc): Handle the case of a single token
2198 within a macro expansion.
2199 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2200 defaulting to LOCATION_ASPECT_CARET.
2201
2202 2018-10-05 Paul Koning <ni1d@arrl.net>
2203
2204 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2205 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2206 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2207 (pdp11_guard_type): New function.
2208
2209 2018-10-05 Paul Koning <ni1d@arrl.net>
2210
2211 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2212 * config/pdp11/pdp11.opt (mfloat32): Remove.
2213 (mfloat64): Remove.
2214 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2215 (pdp11 -mfloat64): Remove.
2216
2217 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2218
2219 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2220 (*cmp<mode>_cc_i387): Ditto.
2221 (*cmpu<mode>_cc_i387): Ditto.
2222 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2223 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2224 "scratch" argument.
2225 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2226 Emit x86_sahf_1 pattern.
2227 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2228 (ix86_expand_carry_flag_compare): Ditto.
2229
2230 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2231
2232 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2233 to reg_or_0_operand. Add "C" constraint.
2234 (*cmpxf_cc_i387): Ditto.
2235 (*cmp<mode>_i387): Change operand 2 predicate
2236 to nonimm_or_0_operand. Add "C" constraint.
2237 (*cmp<mode>_cc_i387): Ditto.
2238 (*cmp<mode>_0_i387): Remove insn pattern.
2239 (*cmp<mode>_0_cc_i387): Ditto.
2240
2241 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2242
2243 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2244 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2245 from vector_move_operand. Update all uses.
2246
2247 2018-10-05 Martin Sebor <msebor@redhat.com>
2248
2249 PR tree-optimization/87490
2250 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2251 consistently.
2252
2253 2018-10-05 Richard Biener <rguenther@suse.de>
2254
2255 PR tree-optimization/63155
2256 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2257 vertical space in dumpfiles.
2258 * tree-ssa-propagate.h
2259 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2260 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2261 (ssa_edge_worklist_back): Likewise.
2262 (curr_order): Likewise.
2263 (cfg_blocks_get): Remove abstraction.
2264 (cfg_blocks_add): Likewise.
2265 (cfg_blocks_empty_p): Likewise.
2266 (add_ssa_edge): Add to current or next worklist based on
2267 RPO index.
2268 (add_control_edge): Likewise.
2269 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2270 into ...
2271 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2272 iteration from CFG and SSA edge worklist so we process
2273 everything in RPO order, prioritizing forward progress
2274 over iteration.
2275 (ssa_prop_init): Allocate new worklists, do not dump
2276 immediate uses.
2277 (ssa_prop_fini): Free new worklists.
2278
2279 2018-10-05 Richard Biener <rguenther@suse.de>
2280
2281 * tree-core.h (tree_block::abstract_flag): Remove.
2282 (tree_block::block_num): Make full 32bits.
2283 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2284 * tree.h (BLOCK_ABSTRACT): Remove.
2285 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2286 resulting from BLOCK_ABSTRACT being always false.
2287 (gen_inlined_subroutine_die): Likewise.
2288 (gen_block_die): Likewise.
2289 * tree.c (block_ultimate_origin): Likewise.
2290 * tree-pretty-print.c (dump_block_node): Remove code dealing
2291 with BLOCK_ABSTRACT.
2292 * tree-ssa-live.c (dump_scope_block): Likewise.
2293 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2294 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2295
2296 2018-10-05 Richard Biener <rguenther@suse.de>
2297
2298 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2299 is asked for initialize mode to the component mode of the
2300 vector type.
2301
2302 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2303
2304 PR target/87522
2305 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2306 assembler for -mavx.
2307 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2308
2309 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2310
2311 PR target/87509
2312 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2313 RS6000_BTM_DFP.
2314 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2315 to be DImode. When using mffscrn, force the operand to a register.
2316
2317 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2318
2319 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2320 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2321 X87MODEF mode iterator.
2322 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2323 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2324 X87MODEF mode iterator.
2325
2326 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2327
2328 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2329 -Wno-prio-ctor-dtor.
2330
2331 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2332
2333 * Makefile.in (OBJS): Add opt-problem.o.
2334 * dump-context.h: Include "selftest.h.
2335 (selftest::temp_dump_context): New forward decl.
2336 (class dump_context): Make friend of class
2337 selftest::temp_dump_context.
2338 (dump_context::dump_loc_immediate): New decl.
2339 (class dump_pretty_printer): Move here from dumpfile.c.
2340 (class temp_dump_context): Move to namespace selftest.
2341 (temp_dump_context::temp_dump_context): Add param
2342 "forcibly_enable_dumping".
2343 (selftest::verify_dumped_text):
2344 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2345 (selftest::verify_item):
2346 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2347 (ASSERT_IS_TREE): Likewise.
2348 (ASSERT_IS_GIMPLE): Likewise.
2349 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2350 to...
2351 (dump_context::dump_loc_immediate): ...this new function.
2352 (class dump_pretty_printer): Move to dump-context.h.
2353 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2354 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2355 (temp_dump_context::temp_dump_context): Move to "selftest"
2356 namespace. Add param "forcibly_enable_dumping", and use it to
2357 conditionalize the use of m_pp;
2358 (selftest::verify_dumped_text): Make non-static.
2359 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2360 (selftest::verify_item): Make non-static.
2361 (ASSERT_IS_TEXT): Move to dump-context.h.
2362 (ASSERT_IS_TREE): Likewise.
2363 (ASSERT_IS_GIMPLE): Likewise.
2364 (selftest::test_capture_of_dump_calls): Pass "true" for new
2365 param of temp_dump_context.
2366 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2367 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2368 TDF_COMPARE_DEBUG.
2369 * opt-problem.cc: New file.
2370 * opt-problem.h: New file.
2371 * optinfo-emit-json.cc
2372 (selftest::test_building_json_from_dump_calls): Pass "true" for
2373 new param of temp_dump_context.
2374 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2375 (optinfo::emit_for_opt_problem): New function.
2376 (optinfo::emit): Clarity which emit_item is used.
2377 * optinfo.h (optinfo::get_dump_location): New accessor.
2378 (optinfo::emit_for_opt_problem): New decl.
2379 (optinfo::emit): Make const.
2380 * selftest-run-tests.c (selftest::run_tests): Call
2381 selftest::opt_problem_cc_tests.
2382 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2383 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2384 bool to opt_result, converting fprintf messages to
2385 opt_result::failure_at calls. Add "stmt" param for use by the
2386 failure_at calls.
2387 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2388 (runtime_alias_check_p): Convert return type from bool to
2389 opt_result, converting dump_printf calls to
2390 opt_result::failure_at, using the statement DDR_A for their
2391 location.
2392 (find_data_references_in_stmt): Convert return type from bool to
2393 opt_result, converting "return false" to opt_result::failure_at
2394 with a new message.
2395 * tree-data-ref.h: Include "opt-problem.h".
2396 (dr_analyze_innermost): Convert return type from bool to opt_result,
2397 and add a const gimple * param.
2398 (find_data_references_in_stmt): Convert return type from bool to
2399 opt_result.
2400 (runtime_alias_check_p): Likewise.
2401 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2402 dr_analyze_innermost.
2403 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2404 Convert return type from bool to opt_result, adding a message for
2405 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2406 (vect_analyze_data_ref_dependence): Convert return type from bool
2407 to opt_result. Change sense of return type from "false"
2408 effectively meaning "no problems" to "false" meaning a problem,
2409 so that "return false" becomes "return opt_result::success".
2410 Convert "return true" calls to opt_result::failure_at, using
2411 the location of statement A rather than vect_location.
2412 (vect_analyze_data_ref_dependences): Convert return type from bool
2413 to opt_result.
2414 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2415 calls to opt_result::failure_at, using the stmt location rather
2416 than vect_location.
2417 (vect_verify_datarefs_alignment): Convert return type from bool
2418 to opt_result.
2419 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2420 into multiple more-tightly-scoped copies.
2421 (vect_analyze_data_refs_alignment): Convert return type from bool
2422 to opt_result.
2423 (vect_analyze_data_ref_accesses): Likewise, converting a
2424 "return false" to a "return opt_result::failure_at", adding a
2425 new message.
2426 (vect_prune_runtime_alias_test_list): Convert return type from
2427 bool to opt_result, converting dump_printf_loc to
2428 opt_result::failure_at. Add a %G to show the pertinent statement,
2429 and use the stmt's location rather than vect_location.
2430 (vect_find_stmt_data_reference): Convert return type from
2431 bool to opt_result, converting dump_printf_loc to
2432 opt_result::failure_at, using stmt's location.
2433 (vect_analyze_data_refs): Convert return type from bool to
2434 opt_result. Convert "return false" to "return
2435 opt_result::failure_at", adding messages as needed.
2436 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2437 type from bool to opt_result.
2438 (vect_determine_vf_for_stmt): Likewise.
2439 (vect_determine_vectorization_factor): Likewise, converting
2440 dump_printf_loc to opt_result::failure_at, using location of phi
2441 rather than vect_location.
2442 (vect_analyze_loop_form_1): Convert return type from bool to
2443 opt_result, converting dump_printf_loc calls, retaining the use of
2444 vect_location.
2445 (vect_analyze_loop_form): Convert return type from loop_vec_info
2446 to opt_loop_vec_info.
2447 (vect_analyze_loop_operations): Convert return type from bool to
2448 opt_result, converting dump_printf_loc calls, using the location
2449 of phi/stmt rather than vect_location where available. Convert
2450 various "return false" to "return opt_result::failure_at" with
2451 "unsupported phi" messages.
2452 (vect_get_datarefs_in_loop): Convert return type from bool to
2453 opt_result. Add a message for the
2454 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2455 (vect_analyze_loop_2): Convert return type from bool to
2456 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2457 each "goto again;", adding new messages where needed.
2458 Add "unsupported grouped {store|load}" messages.
2459 (vect_analyze_loop): Convert return type from loop_vec_info to
2460 opt_loop_vec_info.
2461 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2462 bool to opt_result.
2463 * tree-vect-stmts.c (process_use): Likewise, converting
2464 dump_printf_loc call and using stmt location, rather than
2465 vect_location.
2466 (vect_mark_stmts_to_be_vectorized): Likeise.
2467 (vect_analyze_stmt): Likewise, adding a %G.
2468 (vect_get_vector_types_for_stmt): Convert return type from bool to
2469 opt_result, converting dump_printf_loc calls and using stmt
2470 location, rather than vect_location.
2471 (vect_get_mask_type_for_stmt): Convert return type from tree to
2472 opt_tree, converting dump_printf_loc calls and using stmt location.
2473 * tree-vectorizer.c: Include "opt-problem.h.
2474 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2475 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2476 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2477 enabled, use it to report at the top level "couldn't vectorize
2478 loop" followed by the problem.
2479 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2480 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2481 to opt_result.
2482 (vect_analyze_stmt): Likewise.
2483 (vect_get_vector_types_for_stmt): Likewise.
2484 (tree vect_get_mask_type_for_stmt): Likewise.
2485 (vect_analyze_data_ref_dependences): Likewise.
2486 (vect_enhance_data_refs_alignment): Likewise.
2487 (vect_analyze_data_refs_alignment): Likewise.
2488 (vect_verify_datarefs_alignment): Likewise.
2489 (vect_analyze_data_ref_accesses): Likewise.
2490 (vect_prune_runtime_alias_test_list): Likewise.
2491 (vect_find_stmt_data_reference): Likewise.
2492 (vect_analyze_data_refs): Likewise.
2493 (vect_analyze_loop): Convert return type from loop_vec_info to
2494 opt_loop_vec_info.
2495 (vect_analyze_loop_form): Likewise.
2496 (vect_analyze_slp): Convert return type from bool to opt_result.
2497
2498 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2499
2500 * doc/invoke.texi (-fopt-info): Document new "internals"
2501 sub-option.
2502 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2503 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2504 MSG_ALL_KINDS.
2505 (optinfo_verbosity_options): Add "internals".
2506 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2507 (dump_context::apply_dump_filter_p): New member function.
2508 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2509 explicitly masking the dump_kind.
2510 (dump_context::begin_scope): Increment the scope depth first. Use
2511 apply_dump_filter_p rather than explicitly masking the dump_kind.
2512 (dump_context::emit_item): Use apply_dump_filter_p rather than
2513 explicitly masking the dump_kind.
2514 (dump_dec): Likewise.
2515 (dump_hex): Likewise.
2516 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2517 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2518 (opt_info_switch_p): Update handling of default
2519 MSG_OPTIMIZED_LOCATIONS to cope with default of
2520 MSG_PRIORITY_USER_FACING.
2521 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2522 masking the dump_kind.
2523 (selftest::test_capture_of_dump_calls): Update test_dump_context
2524 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2525 than MSG_ALL. Generalize scope test to be run at all four
2526 combinations of with/without MSG_PRIORITY_USER_FACING and
2527 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2528 for each of the two values.
2529 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2530 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2531 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2532 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2533 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2534 with MSG_PRIORITY_*.
2535 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2536 dump messages as MSG_PRIORITY_USER_FACING.
2537 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2538 about the interaction with MSG_PRIORITY_*.
2539
2540 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2541
2542 * varasm.c (output_constant): Add new parameter merge_strings.
2543 Make strings properly zero terminated in merge string sections.
2544 (mergeable_string_section): Don't fail if the last char is non-zero.
2545 (assemble_variable_contents): Handle merge string sections.
2546 (assemble_variable): Likewise.
2547 (assemble_constant_contents): Likewise.
2548 (output_constant_def_contents): Likewise.
2549 (output_constructor_array_range,
2550 output_constructor_regular_field): Adjust call to output_constant.
2551 (output_object_block): Adjust call to assemble_constant_contents
2552 and assemble_variable_contents.
2553
2554 2018-10-04 Martin Liska <mliska@suse.cz>
2555
2556 PR c/87483
2557 * cgraphunit.c (process_function_and_variable_attributes):
2558 Warn about a function with alias attribute and a body.
2559
2560 2018-10-04 Martin Liska <mliska@suse.cz>
2561
2562 PR ipa/82625
2563 * multiple_target.c (redirect_to_specific_clone): New function.
2564 (ipa_target_clone): Use it.
2565 * tree-inline.c: Fix comment.
2566
2567 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2568
2569 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2570 fields.
2571 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2572 (gcc::dump_manager::register_pass): New member function, adapted
2573 from loop body in gcc::pass_manager::register_pass, adding a
2574 call to update_dfi_for_opt_info.
2575 (gcc::dump_manager::opt_info_enable_passes): Store the
2576 -fopt-info options into the new fields. Move the loop
2577 bodies into...
2578 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2579 function.
2580 * dumpfile.h (struct opt_pass): New forward decl.
2581 (gcc::dump_manager::register_pass): New decl.
2582 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2583 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2584 "m_optinfo_flags", and "m_optinfo_filename".
2585 * passes.c (gcc::pass_manager::register_pass): Move all of the
2586 dump-handling code to gcc::dump_manager::register_pass.
2587
2588 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2589
2590 PR rtl-optimization/87466
2591 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2592 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2593 * doc/tm.texi: Regenerate.
2594 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2595 * lra-lives.c (process_bb_lives): Likewise.
2596 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2597 Define.
2598
2599 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2600
2601 * params.c (add_params): Fix initialization.
2602
2603 2018-10-04 Martin Liska <mliska@suse.cz>
2604
2605 PR gcov-profile/84107
2606 * tree-profile.c (init_ic_make_global_vars):
2607 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2608 Come up with new ic_tuple* variables. Emit
2609 __gcov_indirect_call{,_topn} variables.
2610 (gimple_gen_ic_profiler): Access the variable
2611 and emit gimple.
2612 (gimple_gen_ic_func_profiler): Access
2613 __gcov_indirect_call.callee field.
2614 (gimple_init_gcov_profiler): Use ptr_type_node.
2615 * value-prof.c (gimple_ic): Use ptr_type_node.
2616
2617 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2618
2619 PR tree-optimization/85787
2620 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2621 into this function and add support for detecting multiple phis.
2622 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2623
2624 2018-10-04 Martin Liska <mliska@suse.cz>
2625
2626 PR ipa/87491
2627 * ipa-inline.c (inline_to_all_callers_1):
2628 Call ultimate_alias_target for node being inlined.
2629
2630 2018-10-03 Jeff Law <law@redhat.com>
2631
2632 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2633 target's wchar_t.
2634 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2635 * tree.h (get_typenode_from_name): Prototype.
2636
2637 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2638
2639 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2640 Change operand 2 predicate to nonimmediate_operand.
2641 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2642
2643 2018-10-03 Martin Sebor <msebor@redhat.com>
2644 Jeff Law <law@redhat.com>
2645
2646 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2647 initialize it.
2648 (get_string_length): Detect unterminated arrays.
2649 (format_string): Same.
2650 (format_directive): Warn about unterminated arrays.
2651 (handle_gimple_call): Mark statements with no_warning as needed.
2652
2653 2018-10-03 Jim Wilson <jimw@sifive.com>
2654
2655 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2656 also define __riscv_abi_rve. Delete trailing white space.
2657
2658 2018-10-03 Paul Koning <ni1d@arrl.net>
2659
2660 Enable LRA register allocator for PDP11.
2661 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2662 (R): Likewise.
2663 (D): Likewise.
2664 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2665 * config/pdp11/pdp11.opt (-mlra): New option.
2666 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2667
2668 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2669
2670 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2671 (*<absneg:code>extend<mode>xf2): Ditto.
2672
2673 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2674
2675 PR tree-optimization/87415
2676 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2677 precision fields.
2678
2679 2018-10-02 Jeff Law <law@redhat.com>
2680
2681 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2682 an unterminated string is discovered. Bubble up range
2683 even for unterminated strings.
2684 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2685 indicates the string was not terminated via NONSTR.
2686
2687 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2688
2689 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2690 pointer conversions.
2691 Do not do anything special for anti-ranges.
2692
2693 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2694
2695 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2696 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2697
2698 2018-10-03 Martin Liska <mliska@suse.cz>
2699
2700 PR gcov-profile/86109
2701 * coverage.c (coverage_begin_function): Do not
2702 mark lambdas as artificial.
2703 * tree-core.h (struct GTY): Remove tm_clone_flag
2704 and introduce new lambda_function.
2705 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2706
2707 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2708
2709 PR target/87474
2710 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2711 P8_VECTOR and VSX are enabled.
2712
2713 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2714
2715 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2716 0x3907 as CPU model number.
2717
2718 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
2719
2720 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2721 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2722 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2723 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2724 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2725 * config/s390/s390.md: Likewise. Rename also the cpu attribute
2726 value from arch12 to z14.
2727
2728 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2729
2730 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2731 (isinfxf2): Ditto.
2732 (isinf<mode>2): Ditto.
2733
2734 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
2735
2736 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2737 before emitting fxam. Perform calculations in XFmode.
2738
2739 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2740
2741 * match.pd (((X /[ex] A) +- B) * A): New transformation.
2742
2743 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
2744
2745 PR middle-end/87319
2746 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2747 * tree.c (signed_or_unsigned_type_for): Handle complex.
2748
2749 2018-10-02 Jeff Law <law@redhat.com>
2750
2751 * gimple-fold.c (get_range_strlen): Remove dead code.
2752
2753 2018-10-02 Martin Sebor <msebor@redhat.com>
2754 Jeff Law <law@redhat.com>
2755
2756 * builtins.c (unterminated_array): Add new arguments.
2757 If argument is not terminated, bubble up size and exact
2758 state to callers.
2759 (expand_builtin_strnlen): Detect, avoid expanding
2760 and diagnose unterminated arrays.
2761 (c_strlen): Fill in offset of start of unterminated strings.
2762 * builtins.h (unterminated_array): Update prototype.
2763
2764 2018-10-02 Richard Biener <rguenther@suse.de>
2765
2766 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2767 of haddv4df, first reduce to SSE width and exploit the fact
2768 that we only need element zero with the reduction result.
2769 (reduc_plus_scal_v2df): Likewise.
2770
2771 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2772
2773 * dojump.h (do_jump): Delete.
2774 (do_jump_1): Likewise.
2775 (split_comparison): Move around.
2776 * dojump.c (do_jump): Make static.
2777 (do_jump_1): Likewise.
2778 (jumpifnot): Move around.
2779 (jumpifnot_1): Likewise.
2780 (jumpif): Likewise.
2781 (jumpif_1): Likewise.
2782 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2783
2784 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
2785
2786 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
2787 insns in the delay slot and add_insn_after for the jump insn.
2788
2789 2018-10-02 Richard Biener <rguenther@suse.de>
2790
2791 * tree-inline.c (expand_call_inline): Use the location of
2792 the callee declaration for the inline-entry marker.
2793 * final.c (notice_source_line): Remove special-casing of
2794 NOTE_INSN_INLINE_ENTRY.
2795
2796 2018-10-01 Carl Love <cel@us.ibm.com>
2797
2798 PR 69431
2799 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
2800 (__builtin_mtfsb0): New.
2801 (__builtin_mtfsb1): New.
2802 ( __builtin_set_fpscr_rn): New.
2803 (__builtin_set_fpscr_drn): New.
2804 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
2805 (rs6000_expand_set_fpscr_rn_builtin): Add.
2806 (rs6000_expand_set_fpscr_drn_builtin): Add.
2807 (rs6000_expand_builtin): Add case statement entries for
2808 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
2809 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
2810 RS6000_BUILTIN_MFFSL.
2811 (rs6000_init_builtins): Add ftype initialization and def_builtin
2812 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
2813 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
2814 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
2815 rs6000_mffscdrn): Add define_insn.
2816 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
2817 * doc/extend.texi: Add documentation for the builtins.
2818
2819 2018-10-01 Richard Biener <rguenther@suse.de>
2820
2821 PR tree-optimization/87465
2822 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2823 causing branch miscounts.
2824
2825 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2826
2827 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
2828 aarch64_option_default_param): New.
2829 (params.h): Include.
2830 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
2831 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
2832 stack-clash protection validation code.
2833
2834 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2835
2836 * params.c (validate_param): New.
2837 (add_params): Use it.
2838 (set_param_value): Refactor param validation into validate_param.
2839 (diagnostic.h): Include.
2840 * diagnostic.h (diagnostic_ready_p): New.
2841
2842 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2843
2844 * params.c (set_param_value):
2845 Add index of parameter being validated.
2846 * common/common-target.def (option_validate_param): New.
2847 * common/common-targhooks.h (default_option_validate_param): New.
2848 * common/common-targhooks.c (default_option_validate_param): New.
2849 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
2850 * doc/tm.texi: Regenerate.
2851
2852 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2853
2854 PR target/86486
2855 * config/aarch64/aarch64.c (aarch64_override_options_internal):
2856 Add validation for stack-clash parameters and set defaults.
2857
2858 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2859
2860 PR target/86486
2861 * configure.ac: Add stack-clash-protection-guard-size.
2862 * doc/install.texi: Document it.
2863 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
2864 * params.def: Update comment for guard-size.
2865 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
2866 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
2867 * configure: Regenerate.
2868
2869 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2870
2871 PR target/86486
2872 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
2873 STACK_DYNAMIC_OFFSET): New.
2874 * config/aarch64/aarch64.c (aarch64_layout_frame):
2875 Update outgoing args size.
2876 (aarch64_stack_clash_protection_alloca_probe_range,
2877 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2878
2879 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2880
2881 PR target/86486
2882 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
2883 probe ranges.
2884 * target.def (stack_clash_protection_alloca_probe_range): New.
2885 (stack_clash_protection_final_dynamic_probe): Remove.
2886 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
2887 (default_stack_clash_protection_final_dynamic_probe): Remove.
2888 * targhooks.c: Likewise.
2889 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2890 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
2891 * doc/tm.texi: Regenerate.
2892
2893 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2894
2895 PR target/86486
2896 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
2897 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2898 aarch64_clamp_to_uimm12_shift): New.
2899 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2900 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2901
2902 2018-10-01 Tamar Christina <tamar.christina@arm.com>
2903
2904 PR target/86486
2905 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2906
2907 2018-10-01 Jeff Law <law@redhat.com>
2908 Richard Sandiford <richard.sandiford@linaro.org>
2909 Tamar Christina <tamar.christina@arm.com>
2910
2911 PR target/86486
2912 * config/aarch64/aarch64.md
2913 (probe_stack_range): Add k (SP) constraint.
2914 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2915 STACK_CLASH_MAX_UNROLL_PAGES): New.
2916 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2917 stack probes for stack clash.
2918 (aarch64_allocate_and_probe_stack_space): New.
2919 (aarch64_expand_prologue): Use it.
2920 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2921 (aarch64_sub_sp): Add emit_move_imm optional param.
2922
2923 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
2924
2925 PR tree-optimization/87261
2926 * match.pd: Remove trailing whitespace.
2927 Add (x & y) | ~(x | y) -> ~(x ^ y),
2928 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2929
2930 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2931
2932 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2933 constraints.
2934 (ashlsi3_insn): Update instruction constraints.
2935 (ashrsi3_insn): Likewise.
2936 (rotrsi3): Likewise.
2937 (add_shift): Likewise.
2938 * config/arc/constraints.md (Csz): New 32 bit constraint. It
2939 avoids placing in the limm field small constants which, otherwise,
2940 could end into a small instruction.
2941
2942 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
2943
2944 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2945 destination register is not odd-even.
2946 (umaddsidi4_split): Likewise.
2947
2948 2018-10-01 Richard Biener <rguenther@suse.de>
2949
2950 * tree-inline.c (expand_call_inline): Store origin of fn
2951 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2952 * tree.c (block_ultimate_origin): Simplify and do some
2953 checking.
2954
2955 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
2956
2957 * config/i386/mmx.md (EMMS): New int iterator.
2958 (emms): New int attribute.
2959 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2960 EMMS int iterator. Explicitly declare clobbers.
2961 (mmx_emms): Remove expander.
2962 (mmx_femms): Ditto.
2963 * config/i386/predicates.md (emms_operation): Remove predicate.
2964 (vzeroall_pattern): New predicate.
2965 (vzeroupper_pattern): Rename from vzeroupper_operation.
2966 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2967 vzeroupper_pattern and vzeroall_pattern predicates.
2968
2969 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
2970
2971 PR rtl-optimization/86939
2972 * ira-lives.c (make_hard_regno_born): Rename from this...
2973 (make_hard_regno_live): ... to this. Remove update to conflict
2974 information. Update function comment.
2975 (make_hard_regno_dead): Add conflict information update. Update
2976 function comment.
2977 (make_object_born): Rename from this...
2978 (make_object_live): ... to this. Remove update to conflict information.
2979 Update function comment.
2980 (make_object_dead): Add conflict information update. Update function
2981 comment.
2982 (mark_pseudo_regno_live): Call make_object_live.
2983 (mark_pseudo_regno_subword_live): Likewise.
2984 (mark_hard_reg_dead): Update function comment.
2985 (mark_hard_reg_live): Call make_hard_regno_live.
2986 (process_bb_node_lives): Likewise.
2987 * lra-lives.c (make_hard_regno_born): Rename from this...
2988 (make_hard_regno_live): ... to this. Remove update to conflict
2989 information. Remove now uneeded check_pic_pseudo_p argument.
2990 Update function comment.
2991 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2992 to conflict information. Update function comment.
2993 (mark_pseudo_live): Remove update to conflict information. Update
2994 function comment.
2995 (mark_pseudo_dead): Add conflict information update.
2996 (mark_regno_live): Call make_hard_regno_live.
2997 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2998 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2999
3000 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3001
3002 PR target/87370
3003 * config/i386/i386.c (construct_container): Use TImode for
3004 BLKmode values in 2 integer registers.
3005
3006 2018-09-29 Jeff Law <law@redhat.com>
3007
3008 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3009 c_strlen rather than just a tree *.
3010 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3011 Update recursive calls appropriately. If caller did not provide a
3012 suitable data pointer, create a local one. When a non-terminated
3013 string is discovered, bubble up information about the string via the
3014 c_strlen_data object.
3015 * builtins.h (c_strlen): Update prototype.
3016 (c_strlen_data): New structure.
3017 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3018 For a type 2 call, if c_strlen indicates a non-terminated string
3019 use the length of the non-terminated string.
3020 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3021
3022 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3023
3024 PR target/87467
3025 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3026 __m512d type for __A argument rather than __m512.
3027
3028 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3029
3030 * match.pd (simple_comparison): Don't optimize if either operand is
3031 a function pointer when target needs function pointer canonicalization.
3032
3033 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3034
3035 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3036 power5 .. power9 to remove indirection.
3037 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3038 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3039 ASM_CPU_476_SPEC): Delete.
3040 (ASM_CPU_SPEC): Adjust.
3041 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3042 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3043
3044 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3045
3046 * config.in: Delete HAVE_AS_DCI.
3047 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3048 * config/rs6000/rs6000.h: Ditto.
3049 * configure.ac: Delete HAVE_AS_DCI.
3050 * configure: Regenerate.
3051
3052 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3053
3054 * config.in (HAVE_AS_LWSYNC): Delete.
3055 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3056 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3057 do it as a .long .
3058 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3059 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3060 as a .long .
3061 * configure.ac: Delete HAVE_AS_LWSYNC.
3062 * configure: Regenerate.
3063
3064 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3065 Pierre-Marie de Rodat <derodat@adacore.com>
3066
3067 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3068 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3069 (cgraph_node::create_thunk): Add indirect_offset parameter.
3070 (thunk_adjust): Likewise.
3071 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3072 and initialize the corresponding field with it.
3073 (cgraph_node::dump): Dump indirect_offset field.
3074 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3075 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3076 (thunk_adjust): Add indirect_offset parameter and deal with it.
3077 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3078 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3079 or if the thunk is external or local. Fix formatting. Do not chain
3080 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3081 if any, in the GIMPLE representation.
3082 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3083 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3084 (input_node): Read indirect_offset field.
3085 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3086 call to thunk_adjust.
3087 * tree-nested.c (struct nesting_info): Add thunk_p field.
3088 (create_nesting_tree): Set it.
3089 (convert_all_function_calls): Copy static chain from targets to thunks.
3090 (finalize_nesting_tree_1): Return early for thunks.
3091 (unnest_nesting_tree_1): Do not finalize thunks.
3092 (gimplify_all_functions): Do not gimplify thunks.
3093
3094 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3095
3096 * opt-suggestions.c (option_proposer::build_option_suggestions):
3097 Release "option_values".
3098
3099 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3100
3101 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3102 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3103 * dumpfile.c (kind_as_string): New function.
3104 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3105 kind_as_string to vary the prefix based on dump_kind.
3106 (selftest::test_capture_of_dump_calls): Update for above.
3107
3108 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3109
3110 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3111 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3112
3113 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3114
3115 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3116 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3117 INVALID_REGNUM instead of FPSR_REG.
3118 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3119 * config/i386/i386.md: Update comment of FP compares.
3120 (fldenv): Do not clobber FPSR_REG.
3121
3122 2018-09-28 Richard Biener <rguenther@suse.de>
3123
3124 * tree.h (BLOCK_ORIGIN): New.
3125 * omp-expand.c (grid_expand_target_grid_body): Assign
3126 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3127 * tree-inline.c (remap_block): Likewise.
3128 * auto-profile.c (get_function_decl_from_block): Simplify
3129 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3130 * langhooks.c (lhd_print_error_function): Likewise.
3131 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3132 Likewise.
3133 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3134 * tree.c (block_nonartificial_location): Likewise.
3135 (block_ultimate_origin): Likewise.
3136 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3137 no longer needed LTO case.
3138
3139 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3140 Jan Hubicka <jh@suse.cz>
3141 Martin Jambor <mjambor@suse.cz>
3142
3143 * simplify-rtx.c (simplify_merge_mask): New function.
3144 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3145 same masks are used in op1 or op2.
3146 (test_vec_merge): New function.
3147 (test_vector_ops): Call test_vec_merge.
3148
3149 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3150
3151 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3152 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3153 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3154 (cypress_costs): Set it.
3155 (supersparc_costs): Likewise.
3156 (hypersparc_costs): Likewise.
3157 (leon_cost): Likewise.
3158 (leon3_costs): Likewise.
3159 (sparclet_costs): Likewise.
3160 (ultrasparc_costs): Likewise.
3161 (ultrasparc_costs): Likewise.
3162 (niagara_costs): Likewise.
3163 (niagara2_costs): Likewise.
3164 (niagara3_costs): Likewise.
3165 (niagara4_costs): Likewise.
3166 (niagara7_costs): Likewise.
3167 (m8_costs): Likewise.
3168 (TARGET_CAN_FOLLOW_JUMP): Define.
3169 (pass_work_around_errata::gate): Minor tweak.
3170 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3171 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3172 Automaitcally clear MASK_FSMULD mask for V7 processors.
3173 (sparc_can_follow_jump): New static function.
3174 (output_ubranch): Deal with CROSSING_JUMP_P.
3175 (sparc_use_sched_lookahead): Rewrite using switch statement.
3176 (sparc_issue_rate): Reorder.
3177 (sparc_branch_cost): New function.
3178
3179 2018-09-27 Martin Sebor <msebor@redhat.com>
3180
3181 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3182 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3183 (int_fits_type_p): Same.
3184
3185 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3186
3187 * config/i386/i386.md (FPCR_REG): Remove.
3188 (UNSPEC_FLDCW): Remove.
3189 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3190 (x86_fldcw_1): Remove insn pattern.
3191 (fnstenv): Do not clobber FPCR_REG.
3192 (fldenv): Ditto.
3193 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3194 (CALL_USED_REGISTERS): Ditto.
3195 (REG_ALLOC_ORDER): Ditto.
3196 (REG_CLASS_CONTENTS): Ditto.
3197 (HI_REGISTER_NAMES): Ditto.
3198 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3199 of numerical constants.
3200 * config/i386/i386.c (regclass_map): Remove fpsr register.
3201 (dbx_register_map): Ditto.
3202 (dbx64_register_map): Ditto.
3203 (svr4_dbx_register_map): Ditto.
3204 (print_reg): Do not handle FPCR_REG.
3205
3206 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3207
3208 PR target/87149
3209 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3210 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3211 Delete, always treat as true.
3212 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3213 Ditto. Simplify remaining code.
3214 * config/powerpcspe/powerpcspe.h: Ditto.
3215 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3216 Simplify remaining code.
3217 (rs6000_expand_builtin): Ditto.
3218 * config/rs6000/rs6000.h: Ditto.
3219 * configure.ac: Ditto.
3220 * configure: Regenerate.
3221
3222 2018-09-27 Martin Liska <mliska@suse.cz>
3223
3224 * coverage.c (get_coverage_counts): Revert the formatting
3225 of missing profile opt info.
3226
3227 2018-09-27 Richard Biener <rguenther@suse.de>
3228
3229 PR debug/37801
3230 PR debug/87440
3231 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3232 block as we do not output that.
3233 (gen_inlined_subroutine_die): Elide the originally outermost
3234 block, matching what we do for concrete instances.
3235 (decls_for_scope): Add parameter specifying whether to recurse
3236 to subblocks.
3237
3238 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3239 Tom de Vries <tom@codesourcery.com>
3240
3241 PR 82089
3242
3243 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3244 STORE_FLAG_VALUE == 1.
3245
3246 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3247
3248 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3249 constant definitions.
3250 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3251 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3252 ("speculation_barrier"): New expander definition.
3253
3254 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3255
3256 PR gcov-profile/86957
3257 * common.opt: New warning option -Wmissing-profile.
3258 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3259 * doc/invoke.texi: Document -Wmissing-profile.
3260
3261 2018-09-26 Jim Wilson <jimw@sifive.com>
3262
3263 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3264 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3265
3266 2018-09-26 Martin Sebor <msebor@redhat.com>
3267
3268 * tree.c (zerop): Change return type to bool.
3269 (integer_zerop, integer_onep, integer_each_onep): Same.
3270 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3271 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3272 (real_onep, real_minus_onep, chain_index): Same.
3273 (print_type_hash_statistics, type_list_equal): Same.
3274 * tree.h (zerop): Same.
3275 (zerop, 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
3281 2018-09-26 Jim Wilson <jimw@sifive.com>
3282
3283 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3284
3285 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3286
3287 PR target/87414
3288 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3289 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3290 call.
3291
3292 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3293
3294 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3295
3296 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3297
3298 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3299 and FP_SECOND_SSE_REGS.
3300 (REG_CLASS_NAMES): Ditto.
3301 (REG_CLASS_CONTENTS): Ditto.
3302 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3303 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3304 (ix86_preferred_output_reload_class): Ditto.
3305 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3306 clobber constraint to "=&f".
3307 (fix_truncdi_i387): Ditto.
3308 (lrintxfdi2): Ditto.
3309 (fistdi2_<rounding>): Ditto.
3310 (fpremxf4_i387): Change "=u" constraint to "=f".
3311 (fprem1xf4_i387): Ditto.
3312 (sincosxf3): Ditto.
3313 (fptanxf4_i387): Ditto.
3314 (fxtractxf3_i387): Ditto.
3315 (fscalexf4_i387): Ditto.
3316 (atan2xf3): Change "u" constraint to "f".
3317 (fyl2xxf3_i387): Ditto.
3318 (fyl2xp1xf3_i387): Ditto.
3319
3320 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3321
3322 PR target/87439
3323 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3324 for removed I387_MASK_PM entity.
3325
3326
3327 2018-09-26 Jeff Law <law@redhat.com>
3328 Revert
3329 2018-09-26 Alexey Neyman <stilor@att.net>
3330
3331 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3332 headers are no longer pulled in by <isl/val.h>.
3333
3334 2018-09-26 Richard Biener <rguenther@suse.de>
3335
3336 PR debug/87443
3337 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3338 or concrete instance DIE to the tree. Create abstract origin
3339 attributes also for concrete instances.
3340
3341 2018-09-26 Alexey Neyman <stilor@att.net>
3342
3343 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3344 headers are no longer pulled in by <isl/val.h>.
3345
3346 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3347
3348 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3349 Use new helper functions.
3350 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3351 Use new helper functions.
3352 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3353 aarch_mm_needs_release): New declarations.
3354 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3355 aarch_mm_needs_release): New.
3356
3357 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3358
3359 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3360 (arm32_output_mi_thunk): Deal with long calls.
3361
3362 2018-09-26 Richard Biener <rguenther@suse.de>
3363
3364 PR debug/87428
3365 PR debug/87362
3366 * tree-inline.c (expand_call_inline): When the location
3367 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3368 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3369 the inserted BLOCK to make inlined_function_outer_scope_p
3370 recognize it.
3371 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3372 coords for reserved locations.
3373
3374 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3375
3376 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3377 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3378 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3379 (*sibcall_nonlocal_sysv<mode>): Ditto.
3380 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3381 (<bd>_<mode>): Ditto.
3382 (<bd>tf_<mode>): Ditto.
3383
3384 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3385
3386 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3387 control string as a list of templates instead of as C code.
3388 (*altivec_movti): Ditto.
3389 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3390
3391 2018-09-25 Jim Wilson <jimw@sifive.com>
3392
3393 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3394 when target symbol is weak.
3395
3396 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3397
3398 PR c/87387
3399 * builtins.c (unterminated_array): Simplify.
3400 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3401 where pointer arithmetic is safe.
3402
3403 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3404
3405 PR target/86987
3406 * config/rs6000/altivec.md (altivec_vspltb): Use
3407 const_0_to_15_operand instead of u5bit_cint_operand.
3408 (*altivec_vspltb_internal): Ditto.
3409 (altivec_vspltb_direct): Ditto.
3410 (altivec_vsplth): Use const_0_to_7_operand instead of
3411 u5bit_cint_operand.
3412 (*altivec_vsplth_internal): Ditto.
3413 (altivec_vsplth_direct): Ditto.
3414 (altivec_vspltw): Use const_0_to_3_operand instead of
3415 u5bit_cint_operand.
3416 (*altivec_vspltw_internal): Ditto.
3417 (altivec_vspltw_direct): Ditto.
3418 (altivec_vspltsf): Ditto.
3419 (*altivec_vspltsf_internal): Ditto.
3420 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3421 various splats with the proper size immediate. Reorder the various
3422 cases by ascending size of immediate, and put all such together.
3423
3424 2018-09-25 Richard Biener <rguenther@suse.de>
3425
3426 PR debug/83941
3427 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3428 GC-ification.
3429 (maybe_create_die_with_external_ref): Do not create
3430 DW_TAG_imported_unit here.
3431 (add_abstract_origin_attribute): Handle external BLOCK refs.
3432 (dwarf2out_abstract_function): Simplify LTO case.
3433 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3434 rather than using maybe_create_die_with_external_ref.
3435
3436 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3437
3438 PR target/71278
3439 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3440 (frndintxf2_mask_pm_i387): Ditto.
3441 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3442 Enable for !flag_trapping_math.
3443 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3444 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3445 Change operand 1 predicate to nonimmediate_operand.
3446 (attr "i387_cw"): Remove mask_pm.
3447 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3448 (enum ix86_entity): Remove I387_MASK_PM.
3449 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3450 handle I387_MASK_PM.
3451 (ix86_mode_needed): Ditto.
3452 (ix86_mode_after): Ditto.
3453 (ix86_mode_entry): Ditto.
3454 (ix86_mode_exit): Ditto.
3455 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3456
3457 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3458
3459 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3460 to_update_switch_stmts to vNULL instead of calling create on them
3461 immediately.
3462
3463 2018-09-25 Richard Biener <rguenther@suse.de>
3464
3465 PR tree-optimization/87402
3466 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3467 (visit_phi): Re-instantiate handling of supposed to be VARYING
3468 but non-VARYING backedge value.
3469
3470 2018-09-25 Richard Biener <rguenther@suse.de>
3471
3472 PR debug/83941
3473 * dwarf2out.c (struct sym_off_pair): New.
3474 (external_die_map): New global.
3475 (lookup_decl_die): When in LTO create DIEs lazily from the
3476 external_die_map.
3477 (lookup_block_die): New function, create DIEs lazily in LTO.
3478 (equate_block_to_die): New function.
3479 (dwarf2out_die_ref_for_decl): During WPA get the association
3480 from the external DIE map.
3481 (dwarf2out_register_external_die): Record mapping into the
3482 external DIE map.
3483 (maybe_create_die_with_external_ref): New function split out from
3484 DIE generation part of old dwarf2out_register_external_die.
3485 (add_abstract_origin_attribute): Do not return the DIE. When
3486 in LTO reference externals directly.
3487 (dwarf2out_abstract_function): When in LTO ignore calls for
3488 decls with external DIEs (already present abstract instances).
3489 (gen_call_site_die): Adjust.
3490 (add_high_low_attributes): Likewise.
3491 (gen_lexical_block_die): Likewise.
3492 (gen_inlined_subroutine_die): Likewie.
3493 (gen_block_die): Likewise.
3494 (dwarf2out_inline_entry): Likewise.
3495 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3496 DIEs.
3497
3498 2018-09-25 Martin Liska <mliska@suse.cz>
3499
3500 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3501 integers and not by a float value.
3502
3503 2018-09-25 Martin Liska <mliska@suse.cz>
3504
3505 PR fortran/87394
3506 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3507 instead of NULL.
3508 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3509 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3510 * godump.c (go_format_type): Remove extra parenthesis.
3511
3512 2018-09-25 Martin Liska <mliska@suse.cz>
3513
3514 * alias.c (set_dest_equal_p): Remove unused function.
3515 * config/i386/i386.c (def_builtin_pure2): Likewise.
3516 * diagnostic-show-locus.c (class layout): Remove
3517 unused field.
3518 (layout::layout): Likewise here.
3519 * dump-context.h (class temp_dump_context): Likewise.
3520 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3521 (add_AT_loclistsptr): Likewise.
3522 (add_AT_offset): Likewise.
3523 (get_AT_hi_pc): Likewise.
3524 (is_comdat_die): Likewise.
3525 (type_is_enum): Likewise.
3526 (ceiling): Likewise.
3527 (add_AT_vms_delta): Likewise.
3528 (is_class_die): Likewise.
3529 * edit-context.c (class line_event): Remove unused field.
3530 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3531 unused function.
3532 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3533 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3534 (ok_for_base_p_nonstrict): Likewise.
3535 * tree-chrec.c (is_not_constant_evolution): Likewise.
3536 (chrec_fold_poly_cst): Likewise.
3537 * tree-if-conv.c (has_pred_critical_p): Likewise.
3538 * tree-ssa-coalesce.c (print_exprs): Likewise.
3539 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3540 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3541 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3542 (value_range_nonnegative_p): Likewise.
3543
3544 2018-09-25 Martin Liska <mliska@suse.cz>
3545
3546 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3547 Do not handle "GNU Pascal".
3548 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3549 Likewise.
3550 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3551 from documentation. Likewise.
3552 * dbxout.c (dbxout_range_type): Likewise.
3553 * doc/cpp.texi: Likewise.
3554 * doc/extend.texi: Likewise.
3555 * doc/frontends.texi: Likewise.
3556 * doc/invoke.texi: Remove Pascal entry.
3557 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3558 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3559
3560 2018-09-25 Martin Liska <mliska@suse.cz>
3561
3562 PR middle-end/86078
3563 * doc/invoke.texi: Document all parameters and remove default
3564 of the parameters.
3565
3566 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3567
3568 PR bootstrap/87417
3569 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3570 contains HOST_WIDE_INTs when computing its size.
3571
3572 2018-09-24 Jim Wilson <jimw@sifive.com>
3573
3574 PR target/87391
3575 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3576 not TARGET_RVE.
3577 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3578
3579 2018-09-24 Andrew Pinski <apinski@marvell.com>
3580
3581 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3582 access prev before checking it for NULLness in the
3583 AARCH64_FUSE_CMP_BRANCH case.
3584
3585 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3586
3587 PR target/82699
3588 * config/i386/i386.c (rest_of_insert_endbranch): Set
3589 endbr_queued_at_entrance to true and don't insert ENDBR if
3590 x86_function_profiler will be called.
3591 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3592 is true.
3593 * config/i386/i386.h (machine_function): Add
3594 endbr_queued_at_entrance.
3595
3596 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3597
3598 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3599 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3600 types.
3601 (check_attr_test): Use alternative_mask.
3602 (get_attr_value): Likewise.
3603 (compute_alternative_mask): Use alternative_mask and XWINT.
3604 (make_alternative_compare): Use alternative_mask.
3605 (attr_alt_subset_p): Use XWINT.
3606 (attr_alt_subset_of_compl_p): Likewise.
3607 (attr_alt_intersection): Use alternative_mask and XWINT.
3608 (attr_alt_union): Likewise.
3609 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3610 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3611 (simplify_test_exp): Use alternative_mask and XWINT.
3612 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3613 number calculation to support 64 bits. Generate code that
3614 checks 64-bit masks.
3615 (main): Use alternative_mask.
3616 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3617
3618 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3619
3620 PR target/80080
3621 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3622 RETURN+USE when returning via %r14.
3623
3624 2018-09-24 Martin Liska <mliska@suse.cz>
3625
3626 * gcov.c (output_lines): Print colorization legend
3627 for both flag_use_colors and flag_use_hotness_colors.
3628 Reword the help.
3629
3630 2018-09-24 Martin Liska <mliska@suse.cz>
3631
3632 * coverage.c (get_coverage_counts): Use warning_at
3633 with current_function_decl location. Use %qD in warning
3634 message.
3635
3636 2018-09-24 Martin Liska <mliska@suse.cz>
3637
3638 * memory-block.h (memory_block_pool::release): Annotate with
3639 valgrind that the memory is not accessible.
3640
3641 2018-09-24 Martin Liska <mliska@suse.cz>
3642
3643 PR sanitizer/85774
3644 * asan.c: Make asan_handled_variables extern.
3645 * asan.h: Likewise.
3646 * cfgexpand.c (expand_stack_vars): Make sure
3647 a representative is unpoison if another
3648 variable in the partition is handled by
3649 use-after-scope sanitization.
3650
3651 2018-09-24 Richard Biener <rguenther@suse.de>
3652
3653 PR tree-optimization/63155
3654 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3655 the worklist when the edge of the respective argument isn't
3656 executable.
3657
3658 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3659
3660 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3661 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3662 (MASK_CLASS_P): Update for rename.
3663 (MAYBE_MASK_CLASS_P): Ditto.
3664 (REG_CLASS_NAMES): Update.
3665 (REG_CLASS_CONTENT): Update.
3666 * config/i386/i386.c (regclass_map): Update for MASK_REG
3667 and ALL_MASK_REGS rename.
3668 * config/i386/constraints.md (Yk): Update for rename.
3669 (k): Ditto.
3670
3671 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3672
3673 * config/i386/i386.h (enum reg_class): Remove
3674 EVEX_SSE_REGS and MOD4_SSE_REGS.
3675 (REG_CLASS_NAMES): Update.
3676 (REG_CLASS_CONTENT): Update.
3677 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3678 registers as ALL_SSE_REGS.
3679 (ix86_additional_allocno_class_p): Remove.
3680 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3681 (ix86_register_priority): Lower priority of EVEX SSE registers.
3682 Use IN_RANGE macro where appropriate.
3683 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3684 AVX-5124VNNIW checks.
3685 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3686 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3687 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3688 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3689 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3690 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3691 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3692 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3693 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3694 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3695 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3696 * config/i386/constraints.md (Yh): Remove.
3697
3698 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3699
3700 * config/i386/i386.c (regclass_map): Declare integer REX registers
3701 as GENERAL_REGS.
3702
3703 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3704
3705 * doc/service.texi (Service): Switch the fsf.org link to https.
3706
3707 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3708
3709 PR target/86798
3710 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3711 Define to speculation_safe_value_not_needed.
3712
3713 2018-09-21 Florian Weimer <fweimer@redhat.com>
3714
3715 PR middle-end/81035
3716 * doc/extend.texi (Common Function Attributes): Mention that
3717 noreturn suppresses tail call optimization.
3718
3719 2018-09-21 Jeff Law <law@redhat.com>
3720
3721 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3722 vr_values::cleanup_edges_and_switches.
3723 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3724 vr_values class.
3725 (identify_jump_threads): Remove EDGE_IGNORE handling.
3726 (execute_vrp): Move handling of to_remove_edges and
3727 to_update_switch_stmts into vr_values class member functions.
3728 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3729 (to_update_switch_stmts): Likewise.
3730 * vr-values.c: Include cfghooks.h.
3731 (vr_values::vr_values): Initialize to_remove_edges and
3732 to_update_switch_stmts.
3733 (vr_values::~vr_values): Verify to_remove_edges and
3734 to_update_switch_stmts are empty.
3735 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3736 (vr_values::cleanup_edges_and_switches): New member function.
3737 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3738 function. Add new data members.
3739
3740 2018-09-21 David Malcolm <dmalcolm@redhat.com>
3741
3742 PR tree-optimization/87309
3743 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3744 calls with pflags and alt_flags.
3745 (selftest::test_capture_of_dump_calls): Add test of interaction of
3746 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3747
3748 2018-09-21 Olivier Hainque <hainque@adacore.com>
3749
3750 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3751
3752 2018-09-21 Olivier Hainque <hainque@adacore.com>
3753
3754 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3755
3756 2018-09-21 Olivier Hainque <hainque@adacore.com>
3757
3758 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3759 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3760 (VXWORKS_LIBS_RTP): Minor reordering.
3761
3762 2018-09-21 Olivier Hainque <hainque@adacore.com>
3763
3764 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3765 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3766
3767 2018-09-21 Olivier Hainque <hainque@adacore.com>
3768
3769 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3770 (PTRDIFF_TYPE): Likewise.
3771
3772 2018-09-21 Olivier Hainque <hainque@adacore.com>
3773
3774 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3775 triplet, similar to support for VxWorks7.
3776 * config/vxworks-dummy.h: Provide a default definition
3777 of TARGET_VXWORKS64 to 0.
3778
3779 2018-09-21 Olivier Hainque <hainque@adacore.com>
3780
3781 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3782 * config/vxworks-dummy.h: here.
3783
3784 2018-09-21 Olivier Hainque <hainque@adacore.com>
3785
3786 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
3787
3788 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
3789 Bo Zhou <zbo.zhou@hisilicon.com>
3790
3791 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
3792 * config/aarch64/aarch64-tune.md: Regenerated.
3793 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
3794 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
3795 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
3796
3797 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3798 Julian Brown <julian@codesourcery.com>
3799
3800 * builtins.c (get_builtin_sync_mem): Handle address spaces.
3801
3802 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3803
3804 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
3805 if the call takes a static chain.
3806
3807 2018-09-21 Martin Liska <mliska@suse.cz>
3808
3809 * auto-profile.c (autofdo_source_profile::read): Do not
3810 set sum_all.
3811 (read_profile): Do not add working sets.
3812 (read_autofdo_file): Remove sum_all.
3813 (afdo_callsite_hot_enough_for_early_inline): Remove const
3814 qualifier.
3815 * coverage.c (struct counts_entry): Remove gcov_summary.
3816 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
3817 do not support GCOV_TAG_PROGRAM_SUMMARY.
3818 (get_coverage_counts): Remove summary and expected
3819 arguments.
3820 * coverage.h (get_coverage_counts): Likewise.
3821 * doc/gcov-dump.texi: Remove -w option.
3822 * gcov-dump.c (dump_working_sets): Remove.
3823 (main): Do not support '-w' option.
3824 (print_usage): Likewise.
3825 (tag_summary): Likewise.
3826 * gcov-io.c (gcov_write_summary): Do not dump
3827 histogram.
3828 (gcov_read_summary): Likewise.
3829 (gcov_histo_index): Remove.
3830 (gcov_histogram_merge): Likewise.
3831 (compute_working_sets): Likewise.
3832 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
3833 it not obsolete.
3834 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
3835 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
3836 (GCOV_HISTOGRAM_SIZE): Remove.
3837 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
3838 (struct gcov_summary): Simplify rapidly just
3839 to runs and sum_max fields.
3840 (gcov_histo_index): Remove.
3841 (NUM_GCOV_WORKING_SETS): Likewise.
3842 (compute_working_sets): Likewise.
3843 * gcov-tool.c (print_overlap_usage_message): Remove
3844 trailing empty line.
3845 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
3846 (output_lines): Remove program related line.
3847 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
3848 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
3849 histogram.
3850 (input_profile_summary): Do not read it.
3851 (merge_profile_summaries): And do not merge it.
3852 (input_symtab): Do not call removed function.
3853 * modulo-sched.c (sms_schedule): Do not print sum_max.
3854 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
3855 removed when histogram method was invented.
3856 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
3857 mode.
3858 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
3859 GCOV coding style.
3860 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
3861 and dump selected value.
3862 * profile.c (add_working_set): Remove.
3863 (get_working_sets): Likewise.
3864 (find_working_set): Likewise.
3865 (get_exec_counts): Do not work with working sets.
3866 (read_profile_edge_counts): Do not inform as sum_max is removed.
3867 (compute_branch_probabilities): Likewise.
3868 (compute_value_histograms): Remove argument for call of
3869 get_coverage_counts.
3870 * profile.h: Do not make gcov_summary const.
3871
3872 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
3873
3874 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
3875
3876 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3877
3878 PR tree-optimization/86990
3879 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
3880 Check that the entire merged store group is made of constants only for
3881 overlapping stores.
3882
3883 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3884
3885 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
3886 (VTABLE_VERIFICATION_SPEC): Likewise.
3887 (SANITIZER_EARLY_SPEC): Likewise.
3888 (SANITIZER_SPEC): Likewise.
3889 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
3890 * doc/invoke.texi (Link Options): Document -r.
3891
3892 2018-09-20 Richard Biener <rguenther@suse.de>
3893
3894 PR middle-end/87054
3895 * gimplify.c (gimplify_expr): Retain alignment of
3896 addressable lvalue in dereference.
3897
3898 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
3899
3900 PR bootstrap/87013
3901 * configure.ac: Check for .loc is_stmt support.
3902 * configure, config.in: Rebuilt.
3903 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3904 if not supported.
3905
3906 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3907
3908 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3909 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3910 -misel=no.
3911
3912 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
3913
3914 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3915 VECTOR_OTHER.
3916 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3917 case VECTOR_OTHER.
3918
3919 2018-09-20 Marek Polacek <polacek@redhat.com>
3920
3921 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3922
3923 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3924
3925 PR tree-optimization/87288
3926 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3927 into account when determining PEELING_FOR_NITERS.
3928
3929 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
3930
3931 PR tree-optimization/86877
3932 * tree-vect-loop.c (vect_analyze_loop_2): Call
3933 vect_verify_datarefs_alignment.
3934
3935 2018-09-19 Marek Polacek <polacek@redhat.com>
3936
3937 * doc/invoke.texi: Document -Wclass-conversion.
3938
3939 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
3940
3941 * config/pa/pa.c (pa_adjust_priority): Delete.
3942 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3943
3944 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3945 (atomic_storehi): Likewise.
3946 (atomic_storesi): Likewise.
3947 (atomic_loaddi): Restore compare and swap exchange loop code.
3948
3949 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
3950
3951 PR rtl-optimization/86902
3952 * combine.c (try_combine): When changing the CC mode used, don't change
3953 an unrelated mode in other_insn to that new CC mode.
3954
3955 2018-09-19 David Malcolm <dmalcolm@redhat.com>
3956
3957 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3958 with %T in place of calls to dump_generic_expr.
3959 (prune_runtime_alias_test_list): Likewise.
3960 (create_runtime_alias_checks): Likewise.
3961 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3962 (vect_analyze_data_ref_dependence): Likewise.
3963 (vect_slp_analyze_data_ref_dependence): Likewise.
3964 (vect_record_base_alignment): Likewise. Use %G in place of call
3965 to dump_gimple_stmt.
3966 (vect_compute_data_ref_alignment): Likewise.
3967 (verify_data_ref_alignment): Likewise.
3968 (vect_find_same_alignment_drs): Likewise.
3969 (vect_analyze_group_access_1): Likewise.
3970 (vect_analyze_data_ref_accesses): Likewise.
3971 (dependence_distance_ge_vf): Likewise.
3972 (dump_lower_bound): Likewise.
3973 (vect_prune_runtime_alias_test_list): Likewise.
3974 (vect_find_stmt_data_reference): Likewise.
3975 (vect_analyze_data_refs): Likewise.
3976 (vect_create_addr_base_for_vector_ref): Likewise.
3977 (vect_create_data_ref_ptr): Likewise.
3978 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3979 (vect_can_advance_ivs_p): Likewise.
3980 (vect_update_ivs_after_vectorizer): Likewise.
3981 (vect_gen_prolog_loop_niters): Likewise.
3982 (vect_prepare_for_masked_peels): Likewise.
3983 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3984 (vect_determine_vectorization_factor): Likewise.
3985 (vect_is_simple_iv_evolution): Likewise.
3986 (vect_analyze_scalar_cycles_1): Likewise.
3987 (vect_analyze_loop_operations): Likewise.
3988 (report_vect_op): Likewise.
3989 (vect_is_slp_reduction): Likewise.
3990 (check_reduction_path): Likewise.
3991 (vect_is_simple_reduction): Likewise.
3992 (vect_create_epilog_for_reduction): Likewise.
3993 (vect_finalize_reduction:): Likewise.
3994 (vectorizable_induction): Likewise.
3995 (vect_transform_loop_stmt): Likewise.
3996 (vect_transform_loop): Likewise.
3997 (optimize_mask_stores): Likewise.
3998 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3999 (vect_split_statement): Likewise.
4000 (vect_recog_over_widening_pattern): Likewise.
4001 (vect_recog_average_pattern): Likewise.
4002 (vect_determine_min_output_precision_1): Likewise.
4003 (vect_determine_precisions_from_range): Likewise.
4004 (vect_determine_precisions_from_users): Likewise.
4005 (vect_mark_pattern_stmts): Likewise.
4006 (vect_pattern_recog_1): Likewise.
4007 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4008 (vect_record_max_nunits): Likewise.
4009 (vect_build_slp_tree_1): Likewise.
4010 (vect_build_slp_tree_2): Likewise.
4011 (vect_print_slp_tree): Likewise.
4012 (vect_analyze_slp_instance): Likewise.
4013 (vect_detect_hybrid_slp_stmts): Likewise.
4014 (vect_detect_hybrid_slp_1): Likewise.
4015 (vect_slp_analyze_operations): Likewise.
4016 (vect_slp_analyze_bb_1): Likewise.
4017 (vect_transform_slp_perm_load): Likewise.
4018 (vect_schedule_slp_instance): Likewise.
4019 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4020 (vect_mark_stmts_to_be_vectorized): Likewise.
4021 (vect_init_vector_1): Likewise.
4022 (vect_get_vec_def_for_operand): Likewise.
4023 (vect_finish_stmt_generation_1): Likewise.
4024 (vect_check_load_store_mask): Likewise.
4025 (vectorizable_call): Likewise.
4026 (vectorizable_conversion): Likewise.
4027 (vectorizable_operation): Likewise.
4028 (vectorizable_load): Likewise.
4029 (vect_analyze_stmt): Likewise.
4030 (vect_is_simple_use): Likewise.
4031 (vect_get_vector_types_for_stmt): Likewise.
4032 (vect_get_mask_type_for_stmt): Likewise.
4033 * tree-vectorizer.c (increase_alignment): Likewise.
4034
4035 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4036
4037 * doc/rtl.texi: Adjust vec_select description.
4038 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4039 non-constant selectors.
4040
4041 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4042
4043 * config/aarch64/aarch64-protos.h
4044 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4045 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4046 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4047 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4048 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4049 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4050 (AARCH64_ISA_RCPC8_4): New flag.
4051 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4052 to aarch64_offset_9bit_signed_unscaled_p.
4053 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4054 and use stlur.
4055 * config/aarch64/constraints.md (Ust): New constraint.
4056 * config/aarch64/predicates.md.
4057 (aarch64_9bit_offset_memory_operand): New predicate.
4058 (aarch64_rcpc_memory_operand): New predicate.
4059
4060 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4061
4062 PR rtl-optimization/87361
4063 * rtlanal.c (nonzero_bits1): Revert accidental change.
4064
4065 2018-09-19 Richard Biener <rguenther@suse.de>
4066
4067 PR tree-optimization/87349
4068 PR tree-optimization/87342
4069 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4070
4071 2018-09-18 Marek Polacek <polacek@redhat.com>
4072
4073 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4074 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4075
4076 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4077
4078 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4079
4080 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4081
4082 PR rtl-optimization/86882
4083 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4084
4085 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4086
4087 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4088 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4089
4090 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4091
4092 PR other/87353
4093 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4094
4095 2018-09-18 Richard Biener <rguenther@suse.de>
4096
4097 PR middle-end/63155
4098 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4099 (compute_samebase_partition_bases): Likewise.
4100 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4101 (gimple_can_coalesce_p): Simplify.
4102
4103 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4104
4105 Handle a library implementation of ffs calling __builtin_ffs.
4106 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4107 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4108 to __ffsdi2.
4109
4110 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4111
4112 * diagnostic-show-locus.c (class layout_range): Add field
4113 "m_original_idx".
4114 (layout_range::layout_range): Add "original_idx" param and use it
4115 to initialize new field.
4116 (make_range): Use 0 for original_idx.
4117 (layout::layout): Pass in index to calls to
4118 maybe_add_location_range.
4119 (layout::maybe_add_location_range): Add param "original_idx" and
4120 pass it on to layout_range.
4121 (layout::print_any_labels): Pass on range->m_original_idx to
4122 get_text call.
4123 (gcc_rich_location::add_location_if_nearby): Use 0 for
4124 original_idx.
4125 * gcc-rich-location.h (text_range_label::get_text): Update for new
4126 param.
4127 (range_label_for_type_mismatch::get_text): Likewise.
4128
4129 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4130
4131 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4132
4133 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4134
4135 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4136 format_string_diagnostic_t.
4137 (fmtwarn_n): Likewise.
4138 * substring-locations.c
4139 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4140 (format_warning_n_va): Convert to...
4141 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4142 (format_warning_va): Convert to...
4143 (format_string_diagnostic_t::emit_warning_va): ...this.
4144 (format_warning_at_substring): Convert to...
4145 (format_string_diagnostic_t::emit_warning): ...this.
4146 (format_warning_at_substring_n): Convert to...
4147 (format_string_diagnostic_t::emit_warning_n): ...this.
4148 * substring-locations.h (class format_string_diagnostic_t): New
4149 class.
4150 (format_warning_va): Convert to
4151 format_string_diagnostic_t::emit_warning_va.
4152 (format_warning_n_va): Convert to
4153 format_string_diagnostic_t::emit_warning_n_va.
4154 (format_warning_at_substring): Convert to
4155 format_string_diagnostic_t::emit_warning.
4156 (format_warning_at_substring_n): Convert to
4157 format_string_diagnostic_t::emit_warning_n.
4158
4159 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4160 Bernd Schmidt <bernds_cb1@t-online.de>
4161
4162 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4163 SImode args.
4164
4165 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4166
4167 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4168 operand 0 predicate to nonimmediate operand.
4169 (rint<mode>2_frndint): Remove insn pattern.
4170 (rint<mode>2): Change operand 1 predicate to general_operand.
4171 Extend operand 1 to XFmode and generate rintxf2 insn.
4172 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4173 Do not use X87MODEF mode macro.
4174 (frndintxf2_<rounding>_i387): Rename from
4175 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4176 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4177 to XFmode and generate significandxf3 insn.
4178
4179 2018-09-17 Richard Biener <rguenther@suse.de>
4180
4181 PR tree-optimization/87328
4182 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4183 visiting unexecutable backedges when not iterating.
4184 (do_rpo_vn): Mark all edges not executable even when not
4185 iterating.
4186
4187 2018-09-17 Martin Jambor <mjambor@suse.cz>
4188
4189 PR c/63886
4190 * doc/invoke.texi (Warning Options): Likewise.
4191
4192 2018-09-17 Richard Biener <rguenther@suse.de>
4193
4194 PR tree-optimization/87301
4195 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4196 clean EH info from leftover copy assignments.
4197
4198 2018-09-17 Martin Liska <mliska@suse.cz>
4199
4200 PR gcov-profile/85871
4201 * gcov.c (output_intermediate_file): Fix out of bounds
4202 access.
4203
4204 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4205
4206 * config/arc/arc.c: Object attributes for core4 not reflected
4207 correctly.
4208 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4209 core3).
4210
4211 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4212
4213 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4214
4215 2018-09-17 Martin Liska <mliska@suse.cz>
4216
4217 * doc/gcov.texi: Document new option --use-hotness-colors.
4218 * gcov.c (struct source_info): Declare new field.
4219 (source_info::source_info): Set default for maximum_count.
4220 (print_usage): Add new -q option.
4221 (process_args): Process it.
4222 (accumulate_line_info): Save src->maximum_count.
4223 (output_line_beginning): Make color line number if
4224 flag_use_hotness_colors is set.
4225 (output_line_details): Pass default argument value.
4226 (output_lines): Pass src->maximum_count.
4227
4228 2018-09-17 Martin Liska <mliska@suse.cz>
4229
4230 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4231 Use processor_names table.
4232 * config/i386/i386.c (ix86_default_align): Use
4233 processor_cost_table for alignment values.
4234 (ix86_option_override_internal): Use processor_names.
4235 (ix86_function_specific_print): Likewise.
4236 * config/i386/i386.h (struct processor_costs):
4237 Add alignment values.
4238 (struct ptt): Remove and replace with const char *.
4239 * config/i386/x86-tune-costs.h (struct processor_costs):
4240 Declare default alignments for all costs.
4241
4242 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4243
4244 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4245 symbolics or VR_VARYING ranges for ABS_EXPR.
4246 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4247 when range will wrap.
4248
4249 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4250
4251 PR middle-end/86864
4252 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4253 before and after a JUMP_TABLE_DATA.
4254
4255 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4256
4257 PR middle-end/87188
4258 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4259 when one operand is a function pointer. Use POINTER_TYPE_P and
4260 FUNC_OR_METHOD_TYPE_P.
4261 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4262 * fold-const.c (build_range_check): Likewise.
4263 * match.pd (simple_comparison): Likewise.
4264
4265 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4266
4267 PR c/82967
4268 * spellcheck.c (get_edit_distance_cutoff): New function.
4269 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4270 (selftest::test_get_edit_distance_one_way): ...this.
4271 (selftest::test_get_edit_distance_unit): Rename to...
4272 (selftest::test_get_edit_distance_both_ways): ...this.
4273 (selftest::test_edit_distances): Move tests to this new function,
4274 and test some more pairs of strings. Update for above renaming.
4275 (selftest::get_old_cutoff): New function.
4276 (selftest::test_get_edit_distance_cutoff): New function.
4277 (selftest::assert_suggested_for): New function.
4278 (ASSERT_SUGGESTED_FOR): New macro.
4279 (selftest::assert_not_suggested_for): New function.
4280 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4281 (selftest::test_suggestions): New function.
4282 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4283 tests to selftest::test_edit_distances and call it. Add calls to
4284 selftest::test_get_edit_distance_cutoff and
4285 selftest::test_suggestions.
4286 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4287 (best_match::consider): Replace hard-coded cutoff calculation with
4288 a call to...
4289 (best_match::get_cutoff): New declaration.
4290 (best_match::get_best_meaningful_candidate): Likewise.
4291
4292 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4293
4294 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4295
4296 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4297
4298 revert:
4299 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4300
4301 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4302 terminated string literal.
4303
4304 2018-09-14 Martin Sebor <msebor@redhat.com>
4305
4306 * builtins.c (unterminated_array): Handle ARRAY_REF.
4307 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4308 * builtins.h (unterminated_array): Declare extern.
4309 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4310 arrays.
4311 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4312 calls.
4313
4314 2018-09-14 Martin Sebor <msebor@redhat.com>
4315 Jeff Law <law@redhat.com>
4316
4317 * builtins.c (unterminated_array): New.
4318 (expand_builtin_strcpy): Adjust.
4319 (expand_builtin_strcpy_args): Detect unterminated arrays.
4320 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4321 unterminated arrays.
4322 * gimple-fold.h (get_maxval_strlen): Add argument.
4323 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4324
4325 * gimple-fold.c (get_range_strlen): Add argument.
4326 (get_maxval_strlen): Adjust.
4327 * gimple-fold.h (get_range_strlen): Add argument.
4328
4329 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4330
4331 * config/i386/movdirintrin.h: Fix copyright year.
4332
4333 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4334
4335 * reg-stack.c: Include regs.h.
4336 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4337 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4338 FIRST_STACK_REG, not DFmode.
4339 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4340 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4341 (change stack): Default register mode to the reg_raw_mode of
4342 FIRST_STACK_REG, not DFmode.
4343 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4344 (*swapxf): Rename from swapxf.
4345
4346 2018-09-14 Carl Love <cel@us.ibm.com>
4347
4348 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4349 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4350
4351 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4352
4353 PR target/87224
4354 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4355 alternatives.
4356
4357 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4358
4359 PR target/85628
4360 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4361
4362 2018-09-14 Jason Merrill <jason@redhat.com>
4363
4364 Fix --enable-gather-detailed-mem-stats.
4365 * hash-table.c (hash_table_usage): Change from variable to function.
4366 * hash-table.h: Adjust.
4367 * Makefile.in: Add missing dependencies on hash-table.h.
4368
4369 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4370
4371 PR tree-optimization/87259
4372 PR lto/87283
4373 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4374 execute_cse_reciprocals_1 has tried transforming.
4375
4376 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4377
4378 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4379 VR_VARYING for PLUS/MINUS_EXPR.
4380
4381 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4382
4383 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4384 formatting.
4385
4386 2018-09-14 Richard Biener <rguenther@suse.de>
4387
4388 PR middle-end/63155
4389 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4390 bits for the merged partition.
4391
4392 2018-09-13 Martin Sebor <msebor@redhat.com>
4393 Bernd Edlinger <bernd.edlinger@hotmail.de>
4394
4395 * builtins.h (c_srlen): Add argument.
4396 * builtins.c (warn_string_no_nul): New function.
4397 (c_strlen): Add argument and use it. Update recursive calls.
4398 Pass DECL argument to string_constant to get info on non
4399 terminated strings. Update *NONSTR as needed.
4400 (fold_builtin_strlen): Add argument to calls to c_strlen.
4401 Warn for unterminated arrays.
4402 (warn_string_no_null): Add prototype.
4403 * expr.c (string_constant): Update arguments. Update recursive
4404 calls appropriately. Detect missing NUL terminator and outermost
4405 declaration its missing in.
4406 Improve checks for arrays with nonzero lower bound or elements
4407 that are not a single byte. Simplify offset computation.
4408 Simplify checks for non-NUL terminated strings.
4409 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4410 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4411
4412 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4413
4414 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4415 correctly.
4416 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4417 argument. Fix range checks.
4418 * fold-const.h (c_getstr): Adjust protoype.
4419 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4420 string is constant but contains no NUL byte.
4421
4422 * expr.c (string_constant): Adjust function comment.
4423 Remove bogus check for zero termination.
4424
4425 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4426
4427 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4428 (get_constant_size): Don't make STRING_CSTs larger than they are.
4429 (check_string_literal): New check function for STRING_CSTs.
4430 (output_constant): Use it.
4431
4432 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4433
4434 PR target/86812
4435 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4436
4437 2018-09-13 Richard Biener <rguenther@suse.de>
4438
4439 PR tree-optimization/87263
4440 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4441 (struct unwind_state): Add max_rpo field.
4442 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4443 Compute max_rpo, the max RPO number a block can be backwards reached
4444 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4445 separating it from the iterating mode.
4446
4447 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4448
4449 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4450 (rfs_decision): New scheduling decision.
4451
4452 2018-09-13 Richard Biener <rguenther@suse.de>
4453
4454 PR bootstrap/87134
4455 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4456 (vn_nary_op_insert_pieces_predicated): Do not write useless
4457 valid_dominated_by_p entry outside of the allocated storage.
4458
4459 2018-09-13 Omar Sandoval <osandov@osandov.com>
4460 Tom de Vries <tdevries@suse.de>
4461
4462 PR debug/86985
4463 * dwarf2out.c (is_c): New function.
4464 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4465
4466 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4467
4468 PR target/85628
4469 * config/aarch64/aarch64.md (*aarch64_bfxil):
4470 Define.
4471 * config/aarch64/constraints.md (Ulc): Define.
4472 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4473 Define.
4474 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4475 New function.
4476
4477 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4478
4479 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4480 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4481 aarch64_layout_frame call.
4482 (aarch64_expand_epilogue): Likewise.
4483 (aarch64_initial_elimination_offset): Likewise.
4484 (aarch64_get_separate_components): Likewise.
4485 (aarch64_use_return_insn_p): Likewise.
4486 (aarch64_layout_frame): Remove unneeded check.
4487
4488 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4489
4490 * configure.ac: Only append
4491 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4492 gcc_config_arguments if it was never reconfigured or last reconfigure
4493 was with different arguments.
4494 * configure: Regenerated.
4495
4496 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4497 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4498
4499 PR middle-end/87290
4500 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4501 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4502
4503 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4504
4505 PR tree-optimization/87287
4506 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4507 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4508 * match.pd (X % C == 0): ... here. New optimization.
4509
4510 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4511
4512 PR middle-end/82853
4513 * expr.h (maybe_optimize_mod_cmp): Declare.
4514 * expr.c (mod_inv): New function.
4515 (maybe_optimize_mod_cmp): New function.
4516 (do_store_flag): Use it.
4517 * cfgexpand.c (expand_gimple_cond): Likewise.
4518
4519 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4520 Julian Brown <julian@codesourcery.com>
4521
4522 PR middle-end/86336
4523 * gimplify.c (gimplify_scan_omp_clauses): Set
4524 target_firstprivatize_array_bases in OpenACC parallel and kernels
4525 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4526 OpenACC data regions.
4527
4528 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4529
4530 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4531 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4532
4533 2018-09-12 Richard Biener <rguenther@suse.de>
4534
4535 PR tree-optimization/87280
4536 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4537 edge but unreachable target.
4538 (do_rpo_vn): For conservatively handling a PHI only mark
4539 the backedge executable but not the block reachable.
4540
4541 2018-09-12 Richard Biener <rguenther@suse.de>
4542
4543 PR tree-optimization/87266
4544 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4545 visited blocks.
4546
4547 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4548
4549 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4550 constants.
4551 ("trunc<BFP:mode><DFP_ALL:mode>2")
4552 ("trunc<DFP_ALL:mode><BFP:mode>2")
4553 ("extend<BFP:mode><DFP_ALL:mode>2")
4554 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4555 according to the target operand type.
4556
4557 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4558 Andreas Krebbel <krebbel@linux.ibm.com>
4559
4560 PR tree-optimization/86844
4561 * gimple-ssa-store-merging.c
4562 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4563 there are any overlapping stores in between them, make sure they are
4564 also coalesced or we give up completely.
4565
4566 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4567
4568 PR middle-end/87248
4569 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4570 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4571
4572 2018-09-12 Tom de Vries <tdevries@suse.de>
4573
4574 * common.opt (gdescribe-dies): Add option.
4575 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4576 attribute for artifical and nameless decls.
4577 (dwarf2out_register_external_die): Add description attribute to
4578 external reference die.
4579 (add_desc_attribute): New functions.
4580 (gen_subprogram_die): Add description attribute to
4581 DW_TAG_call_site_parameter.
4582 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4583 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4584 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4585 -gno-describe-dies.
4586 (@item -gdescribe-dies): Add.
4587
4588 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4589
4590 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4591 (extract_range_from_binary_expr_1: Call
4592 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4593 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4594 depend on sign.
4595
4596 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4597
4598 * gimple-ssa-warn-alloca.c
4599 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4600 field for ALLOCA_BOUND_*_LARGE.
4601
4602 2018-09-11 Nathan Sidwell <nathan@acm.org>
4603
4604 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4605
4606 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4607
4608 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4609 for clobbers. Remove obsolete comment.
4610
4611 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4612
4613 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4614 mpxchk, mpxld and mpxst types.
4615 (define_attr length_immediate): Remove all processing of mpx types.
4616 (define_attr prefix_0f): Ditto.
4617 (define_attr memory): Ditto.
4618
4619 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4620
4621 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4622 (log<mode>2): Change operand 1 predicate to general_operand.
4623 Extend operand 1 to XFmode and generate logxf3 insn.
4624 (log10<mode>2): Change operand 1 predicate to general_operand.
4625 Extend operand 1 to XFmode and generate log10xf3 insn.
4626 (log2<mode>2): Change operand 1 predicate to general_operand.
4627 Extend operand 1 to XFmode and generate log2xf3 insn.
4628 (fyl2xp1_extend<mode>xf3_i387): Remove.
4629 (log1p<mode>2): Change operand 1 predicate to general_operand.
4630 Extend operand 1 to XFmode and generate log1pxf3 insn.
4631 (fxtract_extend<mode>xf3_i387): Remove.
4632 (logb<mode>2): Change operand 1 predicate to general_operand.
4633 Extend operand 1 to XFmode and generate logbxf3 insn.
4634 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4635 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4636 (significand<mode>2): Change operand 1 predicate to general_operand.
4637 Extend operand 1 to XFmode and generate significandxf3 insn.
4638
4639 2018-09-11 Nathan Sidwell <nathan@acm.org>
4640
4641 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4642 (load_specs): Use fatal_error.
4643 (DELETE_IF_ORDINARY, process_command): Use error.
4644 (execute, run_attempt): Use fatal_error.
4645
4646 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4647
4648 * diagnostic-core.h (sorry_at): New prototype.
4649 * diagnostic.c (sorry_at): New function.
4650
4651 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4652
4653 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4654 by zero as VR_UNDEFINED.
4655
4656 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4657
4658 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4659 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4660 (<sincos>mode2): New expander.
4661 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4662 (sincos -> sin, cos splitters): Remove splitter patterns.
4663 (sincos<mode>3): Change operand 2 predicate to general_operand.
4664 Extend operand 2 to XFmode and generate sincosxf3 insn.
4665 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4666 Change operand 3 predicate to const1_operand.
4667 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4668 (tanxf2): Update operands in the call to fptanxf4_i387.
4669 (tan<mode>2): Change operand 1 predicate to general_operand.
4670 Extend operand 1 to XFmode and generate tanxf3 insn.
4671 (atan2xf3): Rename from *fpatanxf3_i387.
4672 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4673 (atan2xf3): Remove expander.
4674 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4675 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4676 (atan<mode>2): Change operand 1 predicate to general_operand.
4677 Extend operand 1 to XFmode and generate atanxf3 insn.
4678
4679 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4680
4681 * config/i386/i386.md (x87/SSE constant load splitter): Use
4682 memory_operand instead of nonimmediate_operand for input operand
4683 predicate.
4684
4685 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4686
4687 * config/i386/i386.md (float partial SSE register stall splitter): Move
4688 splitter near its instruction pattern.
4689 (float_extend partial SSE register stall splitter): Ditto.
4690 (float_truncate partial SSE register stall splitter): Ditto.
4691
4692 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4693
4694 PR target/86794
4695 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4696 to speculation_safe_value_not_needed.
4697
4698 PR target/85666
4699 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4700 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4701 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4702 leaf_function_p, instead use has_hard_reg_initial_val.
4703
4704 2018-09-09 Nathan Sidwell <nathan@acm.org>
4705
4706 * gcc.h (pfatal_with_name): Don't declare here.
4707 * gcc.c (pfatal_with_name): Make static.
4708
4709 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4710
4711 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4712 earlyclobber.
4713
4714 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
4715
4716 PR rtl-optimization/85458
4717 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4718 priority hook to reduce the priority of EXPR.
4719
4720 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
4721
4722 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4723 DImode for x87 on 32bit targets. Conditionally disable x87 modes
4724 with X87_ENABLE_FLOAT. Remove preparation code.
4725 (*float<SWI48:mode><MODEF:mode>2): Rename from
4726 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
4727 math using "enabled" attribute.
4728 (*floatdi<MODEF:mode>2_i387): Rename from
4729 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
4730 enable for 32bit targets only.
4731 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4732 splitter.
4733 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4734 as operand 1 predicate. Rewrite as define_insn_and_split.
4735 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4736
4737 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4738
4739 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4740 to fallthru to FLOAT case.
4741
4742 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4743
4744 PR target/86731
4745 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4746 around folding of vec_sl to handle out of range shift values.
4747
4748 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
4749
4750 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4751 Update callers to gen_fix_trunc<mode>_i387_fisttp
4752 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4753 nonimmediate_operand.
4754 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4755 and corresponding splitters.
4756 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4757 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4758 (fix_truncdi_i387_with_temp): Remove insn pattern
4759 and corresponding splitters.
4760 (fix_trunc<mode>_i387): Change operand 0 predicate to
4761 nonimmediate_operand.
4762 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4763 and corresponding splitters.
4764 (*fistdi2_1): Remove.
4765 (fistdi2): Ditto.
4766 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4767 (lrintxfdi2): Remove expander. Reimplement as define_insn.
4768 (*fist<mode>2_1): Remove.
4769 (fist<mode>2): Ditto.
4770 (fist<mode>2_with_temp): Remove insn pattern and corresponding
4771 splitters.
4772 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
4773 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4774 (fistdi2_<rounding>): Change operand 0 predicate to
4775 nonimmediate_operand.
4776 (fistdi2_<rounding>_with_temp): Remove insn pattern
4777 and corresponding splitters.
4778 (fist<mode>2_<rounding>): Change operand 0 predicate to
4779 nonimmediate_operand.
4780 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4781 and corresponding splitters.
4782
4783 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
4784
4785 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4786
4787 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4788 the init value.
4789
4790 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4791
4792 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4793 early gimple folding of vec_splat().
4794 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
4795 * gimple-fold.h: Add an extern define for tree_vec_extract().
4796
4797 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
4798
4799 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
4800 wrappers around TREE_TYPE comparisons.
4801
4802 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4803
4804 PR target/80080
4805 * config/s390/predicates.md: Add nonsym_memory_operand.
4806 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
4807 contains a SYMBOL_REF, load it into an intermediate pseudo.
4808 (s390_emit_compare_and_swap): Legitimize operand.
4809 * config/s390/s390.md: Use the new nonsym_memory_operand
4810 with UNSPECV_CAS patterns.
4811
4812 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4813
4814 PR target/80080
4815 * config/s390/s390-passes.def: New file.
4816 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
4817 declaration.
4818 (make_pass_s390_early_mach): Add declaration.
4819 * config/s390/s390.c (make_pass_s390_early_mach):
4820 (s390_option_override): Remove dynamic registration.
4821 * config/s390/t-s390: Add s390-passes.def.
4822
4823 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
4824
4825 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4826 Remove UNSPEC_LTREL_BASE check.
4827 (annotate_constant_pool_refs): Likewise.
4828 (find_constant_pool_ref): Likewise.
4829 (find_ltrel_base): Removed.
4830 (replace_ltrel_base): Removed.
4831 (s390_mainpool_finish): Remove replace_ltrel_base call.
4832 (s390_chunkify_start): Remove pending LTREL_BASE logic.
4833 (s390_chunkify_finish): Remove replace_ltrel_base call.
4834 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
4835
4836 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
4837
4838 PR target/86779
4839 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4840 to speculation_safe_value_not_needed.
4841
4842 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
4843 Bernd Schmidt <bernds_cb1@t-online.de>
4844
4845 * config/nvptx/nvptx-opts.h: New file.
4846 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
4847 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
4848 (ASM_SPEC): Define.
4849 (TARGET_SM35): New macro.
4850 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
4851 correct predicate.
4852 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
4853 values.
4854 (misa=): New option.
4855 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
4856
4857 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
4858
4859 * config/i386/i386.md (truncdfsf2): Remove expander.
4860 (truncdfsf2_with_temp): Ditto.
4861 (truncxf<mode>2): Ditto.
4862 (*truncdfsf_fast_mixed): Remove insn pattern.
4863 (*truncdfsf_fast_i387): Ditto.
4864 (*truncdfsf_mixed): Ditto.
4865 (*truncdfsf_i387): Ditto.
4866 (*truncdfsf2_i387_1): Ditto.
4867 (*truncxfsf2_mixed): Ditto.
4868 (*truncxfdf2_mixed): Ditto.
4869 (*truncxf<mode>2_i387_noop): Ditto. Update callers
4870 to call gen_truncxf<mode>2 instead.
4871 (*truncxf<mode>2_i387): Remove.
4872 (reg->reg splitters): Remove splitter pattern.
4873 (reg->mem splitters): Ditto.
4874
4875 (truncdfsf2): New insn pattern.
4876 (truncxf<mode>2): Ditto.
4877
4878 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4879
4880 * tree-ssa-math-opts.c (is_mult_by): New function.
4881 (is_square_of): Use the above.
4882 (optimize_recip_sqrt): New function.
4883 (pass_cse_reciprocals::execute): Use the above.
4884
4885 2018-09-05 Richard Biener <rguenther@suse.de>
4886
4887 PR bootstrap/87134
4888 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
4889 to zero-init the emplaced vec.
4890
4891 2018-09-05 Martin Liska <mliska@suse.cz>
4892
4893 PR tree-optimization/87205
4894 * tree-switch-conversion.c (pass_lower_switch::execute):
4895 Group cases for switch statements.
4896
4897 2018-09-05 Richard Biener <rguenther@suse.de>
4898
4899 PR tree-optimization/87217
4900 * tree-ssa-sccvn.c (vuse_valueize): New.
4901 (vn_reference_lookup_pieces): Use it.
4902 (vn_reference_lookup): Likewise.
4903
4904 2018-09-05 Nathan Sidwell <nathan@acm.org>
4905
4906 PR c++/87137
4907 * stor-layout.c (place_field): Scan forwards to check last
4908 bitfield when ms_bitfield_placement is in effect.
4909
4910 2018-09-05 Richard Biener <rguenther@suse.de>
4911
4912 PR bootstrap/87225
4913 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4914 return.
4915
4916 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
4917 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4918
4919 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4920 * config.gcc (extra_objs): Build it.
4921 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4922 Likewise.
4923 * config/aarch64/aarch64-passes.def
4924 (pass_tag_collision_avoidance): New pass.
4925 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4926 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4927 (aarch64_classify_address): Remove static qualifier.
4928 (aarch64_address_info, aarch64_address_type): Move to...
4929 * config/aarch64/aarch64-protos.h: ... here.
4930 (make_pass_tag_collision_avoidance): New function.
4931 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4932 New tuning flag.
4933
4934 2018-09-05 Martin Liska <mliska@suse.cz>
4935
4936 * doc/gcov.texi: Update documentation of humar
4937 readable mode.
4938 * gcov.c (format_count): Print one decimal place, it provides
4939 more fine number of situations like '1G' vs. '1.4G'.
4940
4941 2018-09-05 Martin Liska <mliska@suse.cz>
4942
4943 PR target/87164
4944 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4945 * optc-gen.awk: Allow 'Var' for Deprecated options in order
4946 to generate a MASK value.
4947
4948 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
4949
4950 PR debug/86593
4951 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4952 if frame pointer isn't used.
4953 (compute_frame_pointer_to_fb_displacement): Likewise.
4954
4955 2018-09-04 Jakub Jelinek <jakub@redhat.com>
4956
4957 PR target/87198
4958 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4959 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4960 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4961 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4962 and OPTION_MASK_ISA_XSAVEC_UNSET.
4963
4964 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
4965
4966 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4967 XOR operations in NAND case.
4968
4969 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4970
4971 * wide-int-range.cc (wide_int_range_convert): New.
4972 * wide-int-range.h (wide_int_range_convert): New.
4973 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4974 code into wide_int_range_convert.
4975 (extract_range_into_wide_ints): Do not munge anti range constants
4976 into the entire domain. Just return the range back.
4977
4978 2018-09-04 Martin Liska <mliska@suse.cz>
4979
4980 * genmatch.c (output_line_directive): Add new argument
4981 fnargs.
4982 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4983
4984 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
4985
4986 * doc/invoke.texi (Option Summary): Add whitespace.
4987
4988 * doc/invoke.texi (Option Summary): Add -Waligned-new.
4989
4990 2018-09-04 Richard Biener <rguenther@suse.de>
4991
4992 PR tree-optimization/87211
4993 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4994 backedge value we're supposed to treat as VARYING also number
4995 the PHI to VARYING in case it got a different value-number already.
4996
4997 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
4998
4999 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5000 (extract_range_from_binary_expr_1): Do not call
5001 vrp_can_optimize_bit_op.
5002 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5003 static.
5004 (wide_int_range_get_mask_and_bounds): New.
5005 (wide_int_range_optimize_bit_op): New.
5006 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5007 (wide_int_range_bit_and): Same.
5008 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5009 (wide_int_range_optimize_bit_op): New.
5010 (wide_int_range_get_mask_and_bounds): New.
5011
5012 2018-09-04 Richard Biener <rguenther@suse.de>
5013
5014 PR tree-optimization/87176
5015 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5016 variable. When value-numbering a virtual PHI node make sure
5017 to not value-number to the backedge value.
5018
5019 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5020
5021 * doc/extend.texi (Long Long, Hex Floats): Document support for
5022 long long and hex floats in more recent versions of ISO C++.
5023
5024 2018-09-03 Richard Biener <rguenther@suse.de>
5025
5026 PR tree-optimization/87177
5027 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5028 cleanup.
5029
5030 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5031
5032 * bb-reorder.c (edge_order): Convert to C-qsort-style
5033 tri-state comparator.
5034 (reorder_basic_blocks_simple): Change std::stable_sort to
5035 gcc_stablesort.
5036
5037 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5038
5039 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5040 tri-state comparator.
5041 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5042
5043 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5044
5045 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5046 (mergesort): ... here as maximum count for using netsort.
5047 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5048 (gcc_stablesort): New.
5049 * system.h (gcc_stablesort): Declare.
5050
5051 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5052
5053 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5054 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5055 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5056
5057 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5058
5059 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5060 lxsdx and stxsdx alternatives.
5061 (*mov<mode>_hardfloat64): Ditto.
5062 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5063
5064 2018-09-03 Richard Biener <rguenther@suse.de>
5065
5066 PR tree-optimization/87200
5067 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5068 simplify result.
5069
5070 2018-09-03 Martin Liska <mliska@suse.cz>
5071
5072 PR tree-optimization/87201
5073 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5074 Fix parenthesis in an expression.
5075
5076 2018-09-03 Richard Biener <rguenther@suse.de>
5077
5078 PR tree-optimization/87197
5079 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5080 visited. CSE the VN_INFO hashtable lookup.
5081
5082 PR tree-optimization/87169
5083 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5084 iterating make sure there's no extra backedges from irreducible
5085 regions feeding the header. Mark the destination block
5086 executable.
5087
5088 2018-09-03 Martin Liska <mliska@suse.cz>
5089
5090 PR driver/83193
5091 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5092 * common/common-targhooks.c (default_get_valid_option_values):
5093 New function.
5094 * common/common-targhooks.h (default_get_valid_option_values):
5095 Likewise.
5096 * common/config/i386/i386-common.c: Move processor_target_table
5097 from i386.c.
5098 (ix86_get_valid_option_values): New function.
5099 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5100 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5101 (PTA_*): Move all defined masks into i386-common.c.
5102 (ix86_function_specific_restore): Use new processor_cost_table.
5103 * config/i386/i386.h (struct ptt): Moved from i386.c.
5104 (struct pta): Likewise.
5105 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5106 * doc/tm.texi.in: Likewise.
5107 * opt-suggestions.c (option_proposer::suggest_option):
5108 Pass prefix to build_option_suggestions.
5109 (option_proposer::get_completions): Likewise.
5110 (option_proposer::build_option_suggestions): Use the new target
5111 hook.
5112 * opts.c (struct option_help_tuple): New struct.
5113 (print_filtered_help): Use the new target hook.
5114
5115 2018-09-03 Martin Liska <mliska@suse.cz>
5116
5117 PR middle-end/59521
5118 * predict.c (set_even_probabilities): Add likely_edges
5119 argument and handle cases where we have precisely one
5120 likely edge.
5121 (combine_predictions_for_bb): Catch also likely_edges.
5122 (tree_predict_by_opcode): Handle gswitch statements.
5123 * tree-cfg.h (find_case_label_for_value): New declaration.
5124 (find_taken_edge_switch_expr): Likewise.
5125 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5126 Find pivot in decision tree based on probabily, not by number of
5127 nodes.
5128
5129 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5130
5131 * doc/standards.texi (Standards): Update Objective-C reference.
5132
5133 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5134
5135 * doc/install.texi (Prerequisites): Update link for MPC.
5136
5137 2018-09-01 Michael Matz <matz@suse.de>
5138
5139 PR tree-optimization/87074
5140 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5141 PHIs for outer-loop uses.
5142
5143 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5144
5145 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5146 * doc/invoke.texi (C Dialect Options): Ditto.
5147
5148 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5149
5150 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5151
5152 2018-08-31 Richard Biener <rguenther@suse.de>
5153
5154 PR tree-optimization/87168
5155 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5156 (rpo_elim::eliminate_avail): When OP was not visited it must
5157 be available.
5158
5159 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5160
5161 * tree-vrp.c (copy_value_range): Convert param "from" from
5162 "value_range *" to "const value_range *".
5163 (range_is_null): Likewise for param "vr".
5164 (range_int_cst_p): Likewise.
5165 (range_int_cst_singleton_p): Likewise.
5166 (symbolic_range_p): Likewise.
5167 (value_ranges_intersect_p): Likewise for both params.
5168 (value_range_nonnegative_p): Likewise for param "vr".
5169 (value_range_constant_singleton): Likewise.
5170 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5171 (extract_range_into_wide_ints): Likewise for param "vr".
5172 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5173 and "vr1".
5174 (vrp_can_optimize_bit_op): Likewise.
5175 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5176 "vr1_".
5177 (extract_range_from_unary_expr): Likewise.
5178 (debug_value_range): Likewise for param "vr".
5179 (value_range::dump): Add "const" qualifier.
5180 (vrp_prop::check_array_ref): Convert local "vr" from
5181 "value_range *" to "const value_range *".
5182 (vrp_prop::check_mem_ref): Likewise.
5183 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5184 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5185 (vrp_intersect_ranges): Likewise.
5186 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5187 (vrp_prop::vrp_finalize): Likewise.
5188 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5189 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5190 (extract_range_from_unary_expr): Likewise.
5191 (value_range_constant_singleton): Likewise.
5192 (symbolic_range_p): Likewise.
5193 (copy_value_range): Likewise.
5194 (extract_range_from_binary_expr_1): Likewise.
5195 (range_int_cst_p): Likewise.
5196 (vrp_set_zero_nonzero_bits): Likewise.
5197 (range_int_cst_singleton_p): Likewise.
5198
5199 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5200
5201 * config/aarch64/arm_neon.h (vabsd_s64): New.
5202 (vnegd_s64): Likewise.
5203
5204 2018-08-31 Martin Jambor <mjambor@suse.cz>
5205
5206 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5207
5208 2018-08-31 Martin Liska <mliska@suse.cz>
5209
5210 * ipa-icf.c (sem_item::add_type): Use
5211 sem_item::m_type_hash_cache.
5212 * ipa-icf.h: Move the cache from sem_item_optimizer
5213 to sem_item.
5214
5215 2018-08-31 Nathan Sidwell <nathan@acm.org>
5216
5217 * doc/extend.texi (Backwards Compatibility): Remove implicit
5218 extern C leeway of () being (...).
5219
5220 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5221
5222 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5223
5224 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5225
5226 PR target/86684
5227 PR target/87149
5228 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5229
5230 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5231
5232 PR middle-end/87138
5233 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5234 gen_int_mode. Formatting fixes.
5235
5236 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5237
5238 * target.def (custom_function_descriptors): Improve documentation.
5239 * doc/tm.texi.in (Trampolines): Expand discussion of function
5240 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5241 beginning of the section.
5242 * doc/tm.texi: Regenerated.
5243
5244 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5245
5246 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5247 base class in the initializer list. This is a workaround for
5248 building with older GCC.
5249 (class auto_bb_flag): Likewise.
5250
5251 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5252
5253 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5254 (altivec_vcmpequ<VI_char>_p): Remove star.
5255 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5256 vector load modes.
5257 (expand_strncmp_vec_sequence): New function.
5258 (emit_final_str_compare_vec): New function.
5259 (expand_strn_compare): Add support for vector strncmp.
5260 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5261 length specification to bytes.
5262 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5263 (vcmpnezb_p): New pattern.
5264 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5265 for option -mstring-compare-inline-limit.
5266
5267 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5268
5269 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5270 (PTA_SKYLAKE): Add PTA_AES.
5271 (PTA_GOLDMONT): Likewise.
5272
5273 2018-08-29 Jan Hubicka <jh@suse.cz>
5274
5275 PR lto/86517
5276 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5277 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5278
5279 2018-08-29 Jan Hubicka <jh@suse.cz>
5280
5281 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5282 TYPE_STUB_DECL.
5283 (hash_tree): Do not visit TYPE_STUB_DECL.
5284 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5285 stream TYPE_STUB_DECL.
5286 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5287 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5288 after free_lang_data.
5289 (type_in_anonymous_namespace_p): Likewise.
5290
5291 2018-08-29 Jan Hubicka <jh@suse.cz>
5292
5293 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5294 comment that it has to be even number.
5295 (class sreal): Change m_sig type to int32_t.
5296 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5297 int64_t for temporary calculations.
5298 (sreal_verify_basics): Drop one bit from minimum and maximum.
5299
5300 2018-08-30 Richard Biener <rguenther@suse.de>
5301
5302 PR tree-optimization/87147
5303 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5304 (visit_phi): When the degenerate result is from the backedge and
5305 we didn't visit its definition yet drop to VARYING.
5306 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5307
5308 2018-08-29 Jan Hubicka <jh@suse.cz>
5309
5310 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5311 DECL_VINDEX.
5312 (hash_tree): Likewise.
5313
5314 2018-08-29 Jan Hubicka <jh@suse.cz>
5315
5316 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5317 and TYPE_NEXT_REF_TO.
5318
5319 2018-08-29 Jan Hubicka <jh@suse.cz>
5320
5321 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5322 comment that it has to be even number.
5323 (class sreal): Change m_sig type to int32_t.
5324 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5325 int64_t for temporary calculations.
5326 (sreal_verify_basics): Drop one bit from minimum and maximum.
5327
5328 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5329
5330 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5331
5332 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5333
5334 PR middle-end/86995
5335 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5336 if to_add is negative.
5337
5338 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5339
5340 PR middle-end/87053
5341 * builtins.c (c_strlen): Improve range checks.
5342
5343 2018-08-29 Martin Sebor <msebor@redhat.com>
5344 Jeff Law <law@redhat.com>
5345
5346 PR tree-optimization/86714
5347 PR tree-optimization/86711
5348 * builtins.c (c_strlen): Add arguments to call to string_constant.
5349 * expr.c (string_constant): Add argument. Detect missing nul
5350 terminator and outermost declaration it's missing in.
5351 * expr.h (string_constant): Add argument.
5352 * fold-const.c (read_from_constant_string): Add arguments to call to
5353 string_constant.
5354 (c_getstr): Likewise.
5355 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5356 to string_constant.
5357 * tree-ssa-strlen.c (get_stridx): Likewise.
5358
5359 2018-08-29 Jan Hubicka <jh@suse.cz>
5360
5361 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5362 Do not stream DECL_VINDEX.
5363 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5364 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5365 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5366
5367 2018-08-29 Richard Biener <rguenther@suse.de>
5368
5369 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5370 virtual operands that are not default defs to honor region
5371 boundaries.
5372 (rpo_vn_valueize): Remove ineffective code here.
5373
5374 2018-08-29 Richard Biener <rguenther@suse.de>
5375
5376 PR tree-optimization/87132
5377 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5378 when skipping defs reachable over backedges.
5379
5380 2018-08-29 Richard Biener <rguenther@suse.de>
5381
5382 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5383 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5384 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5385 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5386 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5387 (vn_reference_lookup_3): Remove use of const_parms.
5388 (free_rpo_vn): Do not free const_parms.
5389 (do_rpo_vn): Do not call init_const_parms.
5390 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5391 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5392 (call_may_clobber_ref_p_1): Likewise.
5393
5394 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5395
5396 PR other/86726
5397 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5398 (-O): Ditto.
5399 (-ftree-scev-cprop): Document.
5400
5401 2018-08-29 Jan Hubicka <jh@suse.cz>
5402
5403 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5404 parameters.
5405 (sreal constructor): Update.
5406 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5407 sreal:operator/): Update.
5408
5409 2018-08-29 Martin Liska <mliska@suse.cz>
5410
5411 * tree-switch-conversion.c (switch_conversion::expand):
5412 Strenghten assumption about gswitch statements.
5413
5414 2018-08-29 Richard Biener <rguenther@suse.de>
5415
5416 PR tree-optimization/87117
5417 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5418 re-value-number released SSA VDEFs.
5419
5420 2018-08-29 Richard Biener <rguenther@suse.de>
5421
5422 PR tree-optimization/87126
5423 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5424
5425 2018-08-28 Jim Wilson <jimw@sifive.com>
5426
5427 * config/riscv/pic.md: Rewrite.
5428 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5429 invalid address.
5430 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5431 (SOFTF, default_load, softload, softstore): New.
5432
5433 2018-08-28 Jeff Law <law@redhat.com>
5434
5435 * fold-const.c (fold_binary_loc): Remove recently added assert.
5436
5437 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5438
5439 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5440 to OP parmeter of generated function.
5441
5442 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5443
5444 PR tree-optimization/87009
5445 * match.pd: Add boolean optimizations.
5446
5447 2018-08-28 Martin Sebor <msebor@redhat.com>
5448
5449 PR middle-end/86631
5450 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5451 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5452 (pass_walloca::gate): Use it.
5453 (alloca_call_type): Same.
5454 (pass_walloca::execute): Same.
5455 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5456
5457 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5458
5459 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5460 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5461 >= 3005 to >= 9000.
5462
5463 2018-08-28 Richard Biener <rguenther@suse.de>
5464
5465 PR tree-optimization/87124
5466 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5467 constants before looking up avail.
5468
5469 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5470
5471 PR middle-end/87099
5472 * calls.c (maybe_warn_nonstring_arg): Punt early if
5473 warn_stringop_overflow is zero. Don't call get_range_strlen
5474 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5475 Swap comparison operands to have constants on rhs. Only use
5476 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5477 increment lenrng[0].
5478
5479 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5480
5481 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5482 use of tree_to_shwi. Remove duplicated test for the size being
5483 a whole number of bytes.
5484
5485 2018-08-28 Richard Biener <rguenther@suse.de>
5486
5487 PR tree-optimization/87117
5488 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5489 Handle removed stmt without LHS (GIMPLE_NOP).
5490
5491 2018-08-28 Richard Biener <rguenther@suse.de>
5492
5493 PR tree-optimization/87117
5494 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5495 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5496
5497 2018-08-28 Richard Biener <rguenther@suse.de>
5498
5499 PR tree-optimization/87117
5500 * tree-ssa-pre.c (compute_avail): Do not make expressions
5501 with predicated values available.
5502 (get_expr_value_id): Assert we do not run into predicated value
5503 expressions.
5504
5505 2018-08-28 Richard Biener <rguenther@suse.de>
5506
5507 PR tree-optimization/87117
5508 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5509 get virtual operands.
5510 (get_expr_operands): Handle STRING_CST like other decls.
5511
5512 2018-08-28 Martin Liska <mliska@suse.cz>
5513
5514 * tree.h: Update documentation of fndecl_built_in_p
5515 functions.
5516
5517
5518 2018-08-27 Jeff Law <law@redhat.com>
5519 PR tree-optimization/87110
5520 * tree-ssa-dse.c (compute_trims): Handle non-constant
5521 TYPE_SIZE_UNIT.
5522
5523 2018-08-27 Martin Sebor <msebor@redhat.com>
5524
5525 PR tree-optimization/86914
5526 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5527
5528 2018-08-27 Martin Sebor <msebor@redhat.com>
5529
5530 PR tree-optimization/87112
5531 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5532 the type of the bound argument.
5533
5534 2018-08-27 Jeff Law <law@redhat.com>
5535
5536 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5537 type does not have a TYPE_SIZE_UNIT.
5538
5539 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5540
5541 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5542 with include of backend.h.
5543
5544 2018-08-27 Richard Biener <rguenther@suse.de>
5545
5546 PR tree-optimization/86927
5547 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5548 use const cond reduction code.
5549
5550 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5551
5552 PR tree-optimization/85758
5553 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5554
5555 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5556
5557 PR c++/87091
5558 * diagnostic-show-locus.c (class layout_range): Update for
5559 conversion of show_caret_p to a tri-state.
5560 (layout_range::layout_range): Likewise.
5561 (make_range): Likewise.
5562 (layout::maybe_add_location_range): Likewise.
5563 (layout::should_print_annotation_line_p): Don't show annotation
5564 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5565 (layout::get_state_at_point): Update for conversion of
5566 show_caret_p to a tri-state. Bail out early for
5567 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5568 underlining or source colorization.
5569 (gcc_rich_location::add_location_if_nearby): Update for conversion
5570 of show_caret_p to a tri-state.
5571 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5572 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5573 Likewise.
5574 (selftest::test_one_liner_labels): Likewise.
5575 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5576 conversion of show_caret_p to a tri-state.
5577 * pretty-print.c (text_info::set_location): Likewise.
5578 * pretty-print.h (text_info::set_location): Likewise.
5579 * substring-locations.c (format_warning_n_va): Likewise.
5580 * tree-diagnostic.c (default_tree_printer): Likewise.
5581 * tree-pretty-print.c (newline_and_indent): Likewise.
5582
5583 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5584
5585 PR c++/87091
5586 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5587 line above for line-insertion fix-it hints.
5588 (selftest::test_fixit_insert_containing_newline): Update the
5589 expected results, and add a test with line-numbering enabled.
5590
5591 2018-08-27 Martin Liska <mliska@suse.cz>
5592
5593 PR sanitizer/86962
5594 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5595 params with DECL_HAS_VALUE_EXPR_P.
5596
5597 2018-08-27 Martin Liska <mliska@suse.cz>
5598
5599 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5600 selected expansion strategy.
5601
5602 2018-08-27 Martin Liska <mliska@suse.cz>
5603
5604 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5605 * builtins.c (is_builtin_fn): Likewise.
5606 * attribs.c (diag_attr_exclusions): Use new function
5607 fndecl_built_in_p and remove check for FUNCTION_DECL if
5608 possible.
5609 (builtin_mathfn_code): Likewise.
5610 (fold_builtin_expect): Likewise.
5611 (fold_call_expr): Likewise.
5612 (fold_builtin_call_array): Likewise.
5613 (fold_call_stmt): Likewise.
5614 (set_builtin_user_assembler_name): Likewise.
5615 (is_simple_builtin): Likewise.
5616 * calls.c (gimple_alloca_call_p): Likewise.
5617 (maybe_warn_nonstring_arg): Likewise.
5618 * cfgexpand.c (expand_call_stmt): Likewise.
5619 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5620 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5621 (cgraph_node::verify_node): Likewise.
5622 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5623 (cgraph_node::create_clone): Likewise.
5624 * config/arm/arm.c (arm_insert_attributes): Likewise.
5625 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5626 * dse.c (scan_insn): Likewise.
5627 * expr.c (expand_expr_real_1): Likewise.
5628 * fold-const.c (operand_equal_p): Likewise.
5629 (fold_binary_loc): Likewise.
5630 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5631 * gimple-low.c (lower_stmt): Likewise.
5632 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5633 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5634 Likewise.
5635 * gimple.c (gimple_build_call_from_tree): Likewise.
5636 (gimple_call_builtin_p): Likewise.
5637 (gimple_call_combined_fn): Likewise.
5638 * gimplify.c (gimplify_call_expr): Likewise.
5639 (gimple_boolify): Likewise.
5640 (gimplify_modify_expr): Likewise.
5641 (gimplify_addr_expr): Likewise.
5642 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5643 * ipa-cp.c (determine_versionability): Likewise.
5644 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5645 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5646 * ipa-split.c (visit_bb): Likewise.
5647 (split_function): Likewise.
5648 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5649 * lto-cgraph.c (input_node): Likewise.
5650 * lto-streamer-out.c (write_symbol): Likewise.
5651 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5652 (lower_omp_1): Likewise.
5653 * predict.c (strip_predict_hints): Likewise.
5654 * print-tree.c (print_node): Likewise.
5655 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5656 * trans-mem.c (is_tm_irrevocable): Likewise.
5657 (is_tm_load): Likewise.
5658 (is_tm_simple_load): Likewise.
5659 (is_tm_store): Likewise.
5660 (is_tm_simple_store): Likewise.
5661 (is_tm_abort): Likewise.
5662 (tm_region_init_1): Likewise.
5663 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5664 * tree-cfg.c (verify_gimple_call): Likewise.
5665 (move_stmt_r): Likewise.
5666 (stmt_can_terminate_bb_p): Likewise.
5667 * tree-eh.c (lower_eh_constructs_2): Likewise.
5668 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5669 * tree-inline.c (remap_gimple_stmt): Likewise.
5670 (copy_bb): Likewise.
5671 (estimate_num_insns): Likewise.
5672 (fold_marked_statements): Likewise.
5673 * tree-sra.c (scan_function): Likewise.
5674 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5675 (optimize_stack_restore): Likewise.
5676 (pass_fold_builtins::execute): Likewise.
5677 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5678 (mark_all_reaching_defs_necessary_1): Likewise.
5679 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5680 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5681 (pass_forwprop::execute): Likewise.
5682 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5683 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5684 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5685 * tree-ssa-strlen.c (get_string_length): Likewise.
5686 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5687 (find_func_aliases_for_call): Likewise.
5688 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5689 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5690 * tree-tailcall.c (find_tail_calls): Likewise.
5691 * tree.c (need_assembler_name_p): Likewise.
5692 (free_lang_data_in_decl): Likewise.
5693 (get_call_combined_fn): Likewise.
5694 * ubsan.c (is_ubsan_builtin_p): Likewise.
5695 * varasm.c (incorporeal_function_p): Likewise.
5696 * tree.h (DECL_BUILT_IN): Remove and replace with
5697 fndecl_built_in_p.
5698 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5699 (fndecl_built_in_p): New.
5700
5701 2018-08-27 Martin Liska <mliska@suse.cz>
5702
5703 PR tree-optimization/86847
5704 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5705 Dump also subtree probability.
5706 (switch_decision_tree::do_jump_if_equal): New function.
5707 (switch_decision_tree::emit_case_nodes): Handle special
5708 situations in balanced tree that can be emitted much simpler.
5709 Fix calculation of probabilities that happen in tree expansion.
5710 * tree-switch-conversion.h (struct cluster): Add
5711 is_single_value_p.
5712 (struct simple_cluster): Likewise.
5713 (struct case_tree_node): Add new function has_child.
5714 (do_jump_if_equal): New.
5715
5716 2018-08-27 Martin Liska <mliska@suse.cz>
5717
5718 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5719 Add new argument to bit_test_cluster constructor.
5720 (bit_test_cluster::emit): Set bits really number of values
5721 handlel by a test.
5722 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5723 probability argument.
5724 * tree-switch-conversion.h (struct bit_test_cluster):
5725 Add m_handles_entire_switch.
5726
5727 2018-08-27 Martin Liska <mliska@suse.cz>
5728
5729 PR tree-optimization/86702
5730 * tree-switch-conversion.c (jump_table_cluster::emit):
5731 Make probabilities even for values in jump table
5732 according to number of cases handled.
5733 (switch_decision_tree::compute_cases_per_edge): Pass
5734 argument to reset_out_edges_aux function.
5735 (switch_decision_tree::analyze_switch_statement): Likewise.
5736 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5737 Make it static.
5738
5739 2018-08-27 Martin Liska <mliska@suse.cz>
5740
5741 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5742 cfun argument explicitly.
5743 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5744 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5745 function gimple_switch_default_bb.
5746 (convert_switch_statements):
5747 (expand_builtins):
5748 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5749 * stmt.c (label_to_block_fn): Use label_to_block and pass
5750 cfun argument explicitly and use gimple_switch_label_bb.
5751 (expand_case): Likewise.
5752 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5753 cfun argument explicitly. Likewise.
5754 (make_edges_bb): Likewise.
5755 (make_cond_expr_edges): Likewise.
5756 (get_cases_for_edge): Likewise.
5757 (make_gimple_switch_edges): Likewise.
5758 (label_to_block_fn): Likewise.
5759 (label_to_block): Likewise.
5760 (make_goto_expr_edges): Likewise.
5761 (make_gimple_asm_edges): Likewise.
5762 (main_block_label): Likewise.
5763 (group_case_labels_stmt): Likewise.
5764 (find_taken_edge_computed_goto): Likewise.
5765 (find_taken_edge_switch_expr): Likewise.
5766 (gimple_verify_flow_info): Likewise.
5767 (gimple_redirect_edge_and_branch): Likewise.
5768 (gimple_switch_label_bb): New function.
5769 (gimple_switch_default_bb): Likewise.
5770 (gimple_switch_edge): Likewise.
5771 (gimple_switch_default_edge): Likewise.
5772 * tree-cfg.h (label_to_block_fn): Remove and replace ...
5773 (label_to_block): ... with this.
5774 (gimple_switch_label_bb): New.
5775 (gimple_switch_default_bb): Likewise.
5776 (gimple_switch_edge): Likewise.
5777 (gimple_switch_default_edge): Likewise.
5778 * tree-cfgcleanup.c (convert_single_case_switch): Use
5779 new gimple functions and pass new argument to label_to_block.
5780 (cleanup_control_flow_bb):
5781 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5782 cfun argument explicitly.
5783 (make_eh_edges): Likewise.
5784 (redirect_eh_dispatch_edge): Likewise.
5785 (lower_resx): Likewise.
5786 (lower_eh_dispatch): Likewise.
5787 (maybe_remove_unreachable_handlers): Likewise.
5788 (unsplit_eh): Likewise.
5789 (cleanup_empty_eh): Likewise.
5790 (verify_eh_edges): Likewise.
5791 (verify_eh_dispatch_edge): Likewise.
5792 * tree-ssa-dom.c (record_edge_info): Likewise.
5793 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
5794 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
5795 (thread_through_normal_block): Likewise.
5796 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
5797 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
5798 * tree-switch-conversion.c (switch_conversion::collect): Use new
5799 gimple functions.
5800 (switch_conversion::check_final_bb): Likewise.
5801 (switch_conversion::gather_default_values): Pass new argument
5802 to label_to_block.
5803 (switch_conversion::build_constructors): Likewise.
5804 (switch_decision_tree::compute_cases_per_edge): Use new
5805 gimple_switch_edge function.
5806 (switch_decision_tree::analyze_switch_statement): Pass new argument
5807 to label_to_block.
5808 (switch_decision_tree::try_switch_expansion): Use
5809 gimple_switch_default_edge.
5810 * tree-vrp.c (find_switch_asserts): Pass new argument
5811 to label_to_block.
5812 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
5813 (vr_values::simplify_switch_using_ranges): Likewise.
5814
5815 2018-08-27 Richard Biener <rguenther@suse.de>
5816
5817 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
5818 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
5819
5820 * tree-ssa-sccvn.h (struct vn_pval): New structure.
5821 (struct vn_nary_op_s): Add unwind_to member. Add
5822 predicated_values flag and put result into a union together
5823 with a linked list of vn_pval.
5824 (struct vn_ssa_aux): Add name member to make maintaining
5825 a map of SSA name to vn_ssa_aux possible. Remove no longer
5826 needed info, dfsnum, low, visited, on_sccstack, use_processed
5827 and range_info_anti_range_p members.
5828 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
5829 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
5830 New functions.
5831 (vn_valueize): New global.
5832 (vn_context_bb): Likewise.
5833 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
5834 VN_INFO_PTR_INFO): Remove.
5835 * tree-ssa-sccvn.c: ... (rewrite)
5836 (pass_fre::execute): For -O2+ initialize loops and run
5837 RPO VN in optimistic mode (iterating). For -O1 and -Og
5838 run RPO VN in non-optimistic mode.
5839 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
5840 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
5841 * doc/invoke.texi (sccvn-max-scc-size): Remove.
5842 (rpo-vn-max-loop-depth): Document.
5843 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
5844 when valuezing the VUSE signals we walked out of the region.
5845 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
5846 (phi_translate): Set VN context block to use for availability
5847 lookup.
5848 (compute_avail): Likewise.
5849 (pre_valueize): New function.
5850 (pass_pre::execute): Adjust to the RPO VN API.
5851
5852 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
5853 (propagate_constants_for_unrolling): Remove.
5854 (tree_unroll_loops_completely): Perform value-numbering
5855 on the unrolled bodies loop parent.
5856
5857 2018-08-27 Richard Biener <rguenther@suse.de>
5858
5859 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
5860 for partial antic compute.
5861
5862 2018-08-27 Jakub Jelinek <jakub@redhat.com>
5863
5864 PR rtl-optimization/87065
5865 * combine.c (simplify_if_then_else): Formatting fix.
5866 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
5867 check.
5868 (known_cond): Don't return const_true_rtx for vector modes. Use
5869 CONST0_RTX instead of const0_rtx. Formatting fixes.
5870
5871 2018-08-27 Martin Liska <mliska@suse.cz>
5872
5873 PR gcov-profile/87069
5874 * gcov.c (process_file): Record files already processed
5875 and warn about a file being processed multiple times.
5876
5877 2018-08-27 Martin Liska <mliska@suse.cz>
5878
5879 PR driver/83193
5880 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5881 Set default values for x_aarch64_*_string strings.
5882 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
5883 prefix. For -mabi do not print '=ABI' in help and use
5884 <option_value> format for -msve-vector-bits and -moverride
5885 options.
5886
5887 2018-08-26 Jeff Law <law@redhat.com>
5888
5889 * config/mips/frame-header-opt.c: Include "backend.h" rather than
5890 "cfg.h"
5891
5892 2018-08-26 Marek Polacek <polacek@redhat.com>
5893
5894 PR c++/87029, Implement -Wredundant-move.
5895 * doc/invoke.texi: Document -Wredundant-move.
5896
5897 2018-08-25 Martin Sebor <msebor@redhat.com>
5898
5899 PR tree-optimization/87059
5900 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5901 to the same type as the other.
5902 * fold-const.c (fold_binary_loc): Assert expectation.
5903
5904 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
5905
5906 * config/darwin.c (machopic_legitimize_pic_address): Clean up
5907 extraneous parentheses, dead code section and formatting.
5908
5909 2018-08-24 David Malcolm <dmalcolm@redhat.com>
5910
5911 PR c++/87091
5912 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5913 wide enough for jumps in the line-numbering to be visible.
5914 (layout::print_gap_in_line_numbering): New member function.
5915 (layout::calculate_line_spans): When using line numbering, merge
5916 line spans that are only 1 line apart.
5917 (diagnostic_show_locus): When printing line numbers, show gaps in
5918 line numbering directly, rather than printing headers.
5919 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5920 line-numbering with multiple line spans.
5921 (selftest::test_fixit_insert_containing_newline_2): Add test of
5922 line-numbering, in which the spans are close enough to be merged.
5923
5924 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
5925
5926 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5927 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
5928 * tree-vrp.c (range_is_nonnull): Remove.
5929 (range_includes_zero_p): Accept value_range instead of min/max.
5930 (extract_range_from_binary_expr_1): Do not early bail on
5931 POINTER_PLUS_EXPR.
5932 Use range_includes_zero_p instead of range_is_nonnull.
5933 (extract_range_from_unary_expr): Use range_includes_zero_p instead
5934 of range_is_nonnull.
5935 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
5936 special case VR_ANTI_RANGE.
5937 (vrp_finalize): Same.
5938 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5939 instead of min/max.
5940 (range_is_nonnull): Remove.
5941 * vr-values.c (vrp_stmt_computes_nonzero): Use
5942 range_includes_zero_p instead of range_is_nonnull.
5943 (extract_range_basic): Pass value_range to range_includes_zero_p
5944 instead of range_is_nonnull.
5945
5946 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
5947
5948 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5949 * emit-rtl.h (rtl_data): Remove return_bnd.
5950 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5951 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5952 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5953 (POINTER_BOUNDS_MODE): Remove definition.
5954 (make_pointer_bounds_mode): Remove.
5955 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5956 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5957 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5958 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5959 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5960 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5961 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5962
5963 * config/i386/i386-modes.def (BND32, BND64): Remove.
5964 * config/i386/i386.c (dbx_register_map): Remove bound registers.
5965 (dbx64_register_map): Ditto.
5966 (svr4_dbx_register_map): Ditto.
5967 (indirect_thunk_bnd_needed): Remove.
5968 (indirect_thunks_bnd_used): Ditto.
5969 (indirect_return_bnd_needed): Ditto.
5970 (indirect_return_via_cx_bnd): Ditto.
5971 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5972 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5973 (output_indirect_thunk): Ditto. Remove need_prefix argument.
5974 (output_indirect_thunk_function): Remove handling of
5975 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5976 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5977 (ix86_save_reg): Remove handling of crtl->return_bnd.
5978 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5979 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5980 and UNSPEC_BNDLX_ADDR.
5981 (ix86_output_indirect_branch_via_reg): Remove handling of
5982 indirect_thunk_prefix_bnd.
5983 (ix86_output_indirect_branch_via_push): Ditto.
5984 (ix86_output_function_return): Ditto.
5985 (ix86_output_indirect_function_return): Ditto.
5986 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5987 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5988 (CALL_USED_REGISTERS): Ditto.
5989 (REG_ALLOC_ORDER): Update for removal of bound registers.
5990 (HI_REGISTER_NAMES): Ditto.
5991 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5992 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5993 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5994 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5995 (FIRST_PSEUDO_REG): Update.
5996 (BND): Remove mode iterator.
5997 * config/i386/predicates.md (bnd_mem_operator): Remove.
5998
5999 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6000
6001 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6002 vectors.
6003
6004 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6005
6006 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6007 the case in which the permute needs only a single element and
6008 repeats for every vector of the result. Extend that case to
6009 handle variable-length vectors.
6010 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6011
6012 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6013
6014 PR debug/79342
6015 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6016 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6017
6018 2018-08-24 Richard Biener <rguenther@suse.de>
6019
6020 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6021 bb_flags_allocated members.
6022 (auto_flag): New RAII class for allocating flags.
6023 (auto_edge_flag): New RAII class for allocating edge flags.
6024 (auto_bb_flag): New RAII class for allocating bb flags.
6025 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6026 flag dynamically.
6027 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6028 in favor of temporarily allocated BB flag.
6029 * hsa-brig.c: Re-order includes.
6030 * hsa-dump.c: Likewise.
6031 * hsa-regalloc.c: Likewise.
6032 * print-rtl.c: Likewise.
6033 * profile-count.c: Likewise.
6034
6035 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6036
6037 PR target/86989
6038 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6039 the TOC register.
6040
6041 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6042
6043 PR 87073/bootstrap
6044 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6045 from wide_int_range_multiplicative_op.
6046
6047 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6048
6049 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6050 "permutaion".
6051
6052 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6053
6054 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6055 to 'expanded'.
6056
6057 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6058
6059 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6060 full GENERIC expression used for replacement.
6061
6062 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6063
6064 * tree-vrp.c (abs_extent_range): Remove.
6065 (extract_range_into_wide_ints): Pass wide ints by reference.
6066 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6067 Pass wide ints by reference in all calls to
6068 extract_range_into_wide_ints.
6069 * wide-int-range.cc (wide_int_range_div): New.
6070 * wide-int-range.h (wide_int_range_div): New.
6071 (wide_int_range_includes_zero_p): New.
6072 (wide_int_range_zero_p): New.
6073
6074 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6075
6076 * config/aarch64/aarch64.md (arches): New enum.
6077 (arch): New enum attr.
6078 (arch_enabled): New attr.
6079 (enabled): Now uses arch_enabled only.
6080 (simd, sve, fp16): Removed attribute.
6081 (fp): Attr now defined in terms of 'arch'.
6082 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6083 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6084 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6085 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6086 attributes into 'arch'.
6087 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6088 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6089 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6090 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6091 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6092 'simd' attribute into 'arch'.
6093 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6094 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6095 Convert use of 'fp' attribute to 'arch'.
6096 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6097 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6098 into 'arch'.
6099 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6100 (different modes) Merge 'fp' and 'simd' into 'arch'.
6101 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6102 'simd' into 'arch'.
6103
6104 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6105
6106 PR rtl-optimization/87026
6107 * expmed.c (canonicalize_comparison): If we can no longer create
6108 pseudoregisters, don't.
6109
6110 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6111
6112 PR target/86951
6113 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6114 prototype.
6115 * config/arm/arm.c (speculation_barrier_libfunc): New static
6116 variable.
6117 (arm_init_libfuncs): Initialize it.
6118 (arm_emit_speculation_barrier): New function.
6119 * config/arm/arm.md (speculation_barrier): Call
6120 arm_emit_speculation_barrier for architectures that do not have
6121 DSB or ISB.
6122 (speculation_barrier_insn): Only match on Armv7 or later.
6123
6124 2018-08-23 Richard Biener <rguenther@suse.de>
6125
6126 PR middle-end/87024
6127 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6128 calls.
6129
6130 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6131
6132 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6133 of single-vector TBLs.
6134 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6135 one input is given.
6136
6137 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6138
6139 PR target/85910
6140 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6141 aarch64_evpc_tbl guard.
6142
6143 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6144
6145 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6146 behaviour.
6147
6148 2018-08-22 Martin Sebor <msebor@redhat.com>
6149
6150 PR middle-end/87052
6151 * tree-pretty-print.c (pretty_print_string): Add argument.
6152 (dump_generic_node): Call to pretty_print_string with string size.
6153
6154 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6155
6156 PR rtl-optimization/86771
6157 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6158 of two SETs into those two SETs, one to be placed at i2, if that SETs
6159 destination is modified between i2 and i3.
6160
6161 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6162
6163 PR tree-optimization/86725
6164 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6165 function.
6166 (vect_analyze_scalar_cycles_1): Check it.
6167
6168 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6169
6170 PR tree-optimization/86725
6171 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6172 an outer loop phi as a double reduction, make sure that the
6173 single user of the phi result is an inner loop phi.
6174
6175 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6176
6177 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6178 grouped stores with gaps to a strided group.
6179
6180 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6181
6182 * tree-vect-stmts.c (get_group_load_store_type)
6183 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6184 first statement in a group.
6185
6186 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6187
6188 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6189 the sequence used in gcc/gcc.c.
6190
6191 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6192
6193 PR other/704
6194 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6195 building it.
6196
6197 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6198
6199 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6200 Darwin10-specific unwinder-shim.
6201 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6202 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6203 New to cater for Darwin10 Rosetta.
6204
6205 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6206
6207 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6208 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6209
6210 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6211
6212 PR bootstrap/81033
6213 PR target/81733
6214 PR target/52795
6215 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6216 (dwarf2out_switch_text_section): Generate a local label for the
6217 second function sub-section and apply it as the second FDE start
6218 label.
6219 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6220 second sub-section start.
6221
6222 2018-08-22 Richard Biener <rguenther@suse.de>
6223
6224 PR tree-optimization/86988
6225 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6226
6227 2018-08-22 Richard Biener <rguenther@suse.de>
6228
6229 PR tree-optimization/86945
6230 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6231
6232 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6233
6234 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6235 a comment about how uses of r2 for .sdata2 come about.
6236
6237 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6238
6239 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6240
6241 2018-08-21 Marek Polacek <polacek@redhat.com>
6242
6243 PR c++/86981, Implement -Wpessimizing-move.
6244 * doc/invoke.texi: Document -Wpessimizing-move.
6245
6246 2018-08-21 Jan Hubicka <jh@suse.cz>
6247
6248 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6249 * tree.h (is_redundant_typedef): Remove.
6250 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6251
6252 2018-08-21 Jan Hubicka <jh@suse.cz>
6253
6254 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6255 when possible.
6256
6257 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6258
6259 * expmed.c (extract_low_bits): Reject invalid subregs early.
6260
6261 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6262
6263 PR middle-end/86121
6264 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6265 behaviour.
6266
6267 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6268
6269 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6270 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6271 * config/vxworks.c: Likewise.
6272
6273 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6274
6275 * config/vxworks.c: Set targetm.have_ctors_dtors
6276 if HAVE_INITFINI_ARRAY_SUPPORT.
6277 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6278 if HAVE_INITFINI_ARRAY_SUPPORT.
6279
6280 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6281
6282 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6283 default search path for VxWorks < 7.
6284
6285 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6286
6287 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6288 (get_format_string): Refer to c_getstr.
6289
6290 2018-08-21 Tom de Vries <tdevries@suse.de>
6291
6292 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6293 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6294 (debuginfo_early_stop): Declare.
6295 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6296 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6297 (debuginfo_early_stop): New function.
6298 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6299 and debuginfo_early_stop.
6300 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6301 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6302 (general_init): Call debuginfo_early_init.
6303 (finalize): Call debuginfo_fini.
6304 (do_compile): Call debuginfo_init.
6305 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6306 -fdump-early-debug.
6307 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6308
6309 2018-08-21 Tom de Vries <tdevries@suse.de>
6310
6311 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6312 flag_dump_noaddr and flag_dump_unnumbered.
6313
6314 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6315
6316 * wide-int-range.cc (wide_int_range_abs): New.
6317 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6318 * wide-int-range.h (wide_int_range_abs): New.
6319 (wide_int_range_min_max): New.
6320 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6321 case to call wide_int_range_abs.
6322 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6323 (extract_range_from_abs_expr): Delete.
6324
6325 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6326
6327 PR target/87033
6328 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6329 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6330 for indexed loads.
6331
6332 2018-08-20 Nathan Sidwell <nathan@acm.org>
6333 Jeff Law <law@redhat.com>
6334
6335 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6336 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6337
6338 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6339
6340 PR other/84889
6341 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6342 (decl_attributes): Likewise.
6343 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6344 instance.
6345 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6346 * diagnostic-core.h (class auto_diagnostic_group): New class.
6347 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6348 (diagnostic_report_diagnostic): Handle the first diagnostics within
6349 a group.
6350 (emit_diagnostic): Add auto_diagnostic_group instance.
6351 (inform): Likewise.
6352 (inform_n): Likewise.
6353 (warning): Likewise.
6354 (warning_at): Likewise.
6355 (warning_n): Likewise.
6356 (pedwarn): Likewise.
6357 (permerror): Likewise.
6358 (error): Likewise.
6359 (error_n): Likewise.
6360 (error_at): Likewise.
6361 (sorry): Likewise.
6362 (fatal_error): Likewise.
6363 (internal_error): Likewise.
6364 (internal_error_no_backtrace): Likewise.
6365 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6366 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6367 * diagnostic.h (struct diagnostic_context): Add fields
6368 "diagnostic_group_nesting_depth",
6369 "diagnostic_group_emission_count", "begin_group_cb",
6370 "end_group_cb".
6371 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6372 Add auto_diagnostic_group instance(s).
6373 (find_explicit_erroneous_behavior): Likewise.
6374 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6375 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6376 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6377 (gimplify_va_arg_expr): Likewise.
6378 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6379 (HSA_SORRY_AT): Likewise.
6380 * ipa-devirt.c (compare_virtual_tables): Likewise.
6381 (warn_odr): Likewise.
6382 * multiple_target.c (expand_target_clones): Likewise.
6383 * opts-common.c (cmdline_handle_error): Likewise.
6384 * reginfo.c (globalize_reg): Likewise.
6385 * substring-locations.c (format_warning_n_va): Likewise.
6386 * tree-inline.c (expand_call_inline): Likewise.
6387 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6388 * tree-ssa-loop-niter.c
6389 (do_warn_aggressive_loop_optimizations): Likewise.
6390 * tree-ssa-uninit.c (warn_uninit): Likewise.
6391 * tree.c (warn_deprecated_use): Likewise.
6392
6393 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6394
6395 PR target/87014
6396 * config/i386/i386.md (eh_return): Always update EH return
6397 address in word_mode.
6398
6399 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6400
6401 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6402 TARGET_SPLIT_COMPLEX_ARG is defined.
6403
6404 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6405
6406 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6407
6408 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6409
6410 PR target/86984
6411 * expr.c (expand_assignment): Assert that bitpos is positive.
6412 (store_field): Likewise
6413 (expand_expr_real_1): Make sure that bitpos is positive.
6414 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6415 integer overflow.
6416
6417 2018-08-20 Nathan Sidwell <nathan@acm.org>
6418
6419 * Makefile.in (CPP_ID_DATA_H): Delete.
6420 (CPP_INTERNAL_H): Don't add it.
6421 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6422 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6423
6424 2018-08-20 Richard Biener <rguenther@suse.de>
6425
6426 PR tree-optimization/78655
6427 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6428 pointer + offset nonnull if either operand is nonnull work.
6429
6430 2018-08-20 Tom de Vries <tdevries@suse.de>
6431
6432 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6433 unless the referenced die describes the added property using
6434 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6435 Otherwise, add a DW_AT_location to the referenced die.
6436
6437 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6438
6439 PR target/86994
6440 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6441 register_operand when calling ix86_set_reg_reg_cost.
6442 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6443 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6444 predicate and to 1 otherwise.
6445
6446 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6447
6448 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6449 emit a diagnostic that it is not supported and reset the option.
6450 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6451 supported and consume the option. (ASM_FINAL_SPEC): New.
6452
6453 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6454
6455 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6456 a sentence.
6457
6458 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6459
6460 C-SKY port: Documentation
6461
6462 * doc/extend.texi (C-SKY Function Attributes): New section.
6463 * doc/invoke.texi (Option Summary): Add C-SKY options.
6464 (C-SKY Options): New section.
6465 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6466
6467 2018-08-17 Jojo <jijie_rong@c-sky.com>
6468 Huibin Wang <huibin_wang@c-sky.com>
6469 Sandra Loosemore <sandra@codesourcery.com>
6470 Chung-Lin Tang <cltang@codesourcery.com>
6471
6472 C-SKY port: Backend implementation
6473
6474 * config/csky/*: New.
6475 * common/config/csky/*: New.
6476
6477 2018-08-17 Jojo <jijie_rong@c-sky.com>
6478 Huibin Wang <huibin_wang@c-sky.com>
6479 Sandra Loosemore <sandra@codesourcery.com>
6480 Chung-Lin Tang <cltang@codesourcery.com>
6481 Andrew Jenner <andrew@codesourcery.com>
6482
6483 C-SKY port: Configury
6484
6485 * config.gcc (csky-*-*): New.
6486 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6487 * configure: Regenerated.
6488
6489 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6490
6491 * dump-context.h: Include "dumpfile.h".
6492 (dump_context::dump_printf_va): Convert final param from va_list
6493 to va_list *. Convert from ATTRIBUTE_PRINTF to
6494 ATTRIBUTE_GCC_DUMP_PRINTF.
6495 (dump_context::dump_printf_loc_va): Likewise.
6496 * dumpfile.c: Include "stringpool.h".
6497 (make_item_for_dump_printf_va): Delete.
6498 (make_item_for_dump_printf): Delete.
6499 (class dump_pretty_printer): New class.
6500 (dump_pretty_printer::dump_pretty_printer): New ctor.
6501 (dump_pretty_printer::emit_items): New member function.
6502 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6503 function.
6504 (dump_pretty_printer::emit_item): New member function.
6505 (dump_pretty_printer::stash_item): New member function.
6506 (dump_pretty_printer::format_decoder_cb): New member function.
6507 (dump_pretty_printer::decode_format): New member function.
6508 (dump_context::dump_printf_va): Reimplement in terms of
6509 dump_pretty_printer.
6510 (dump_context::dump_printf_loc_va): Convert final param from va_list
6511 to va_list *.
6512 (dump_context::begin_scope): Reimplement call to
6513 make_item_for_dump_printf.
6514 (dump_printf): Update for change to dump_printf_va.
6515 (dump_printf_loc): Likewise.
6516 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6517 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6518 with %T, %E, and %G.
6519 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6520 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6521 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6522 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6523 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6524 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6525 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6526 within a dump_printf_loc call to "%wu".
6527 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6528 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6529 missing space after "=".
6530 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6531 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6532 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6533 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6534 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6535 duplicate "vectorized" from message.
6536
6537 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6538
6539 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6540 polyNxK_t element's TYPE_STRING_FLAG.
6541
6542 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6543
6544 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6545 (they were unnamed before). Fix comments.
6546
6547 2018-08-17 Nathan Sidwell <nathan@acm.org>
6548
6549 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6550
6551 2018-08-17 Richard Biener <rguenther@suse.de>
6552
6553 PR tree-optimization/86841
6554 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6555
6556 2018-08-17 Martin Liska <mliska@suse.cz>
6557
6558 * common.opt: Remove Warn, Init and Report for options with
6559 Ignore/Deprecated flag. Warning is done automatically for
6560 Deprecated flags.
6561 * config/i386/i386.opt: Likewise.
6562 * config/ia64/ia64.opt: Likewise.
6563 * config/rs6000/rs6000.opt: Likewise.
6564 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6565 Remove usage of flag_check_pointer_bounds.
6566 * lto-wrapper.c (merge_and_complain): Do not handle
6567 OPT_fcheck_pointer_bounds.
6568 (append_compiler_options): Likewise.
6569 * opt-functions.awk: Do not handle Deprecated.
6570 * optc-gen.awk: Check that Var, Report and Init are not
6571 used for an option with Ignore/Deprecated flag.
6572 * opts-common.c (decode_cmdline_option): Do not report
6573 CL_ERR_DEPRECATED.
6574 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6575 options.
6576 * opts.h (struct cl_option): Remove cl_deprecated flag.
6577 (CL_ERR_DEPRECATED): Remove error enum value.
6578
6579 2018-08-17 Richard Biener <rguenther@suse.de>
6580
6581 PR middle-end/86505
6582 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6583 across a va-arg-pack using call adjust its return value accordingly.
6584
6585 2018-08-16 Martin Sebor <msebor@redhat.com>
6586
6587 PR tree-optimization/86853
6588 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6589 (struct fmtresult): Add member and initialize it in ctors.
6590 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6591 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6592 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6593 (parse_directive): Handle %C same as %c.
6594 (sprintf_dom_walker::compute_format_length): Adjust.
6595 (is_call_safe): Adjust.
6596
6597 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6598
6599 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6600 for determining how to count the elements.
6601 * builtins.h (c_strlen): Adjust prototype.
6602 * expr.c (string_constant): Add new parameter mem_size.
6603 Set *mem_size appropriately.
6604 * expr.h (string_constant): Adjust protoype.
6605 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6606 * gimple-fold.h (get_range_strlen): Adjust prototype.
6607 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6608 (format_string): Call get_string_length with eltsize.
6609
6610 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6611
6612 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6613 to emit the span, rather than setting it as the prefix.
6614
6615 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6616
6617 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6618 "margin_char" parameter, defaulting to space. Use it in place
6619 of pp_space for the initial part of the margin.
6620 (layout::print_leading_fixits): Use '+' when filling the margin
6621 of line-insertion fix-it hints.
6622
6623 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6624
6625 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6626 Delete.
6627
6628 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6629
6630 * config/rs6000/altivec.md: Don't set length attribute to the default
6631 value.
6632 * config/rs6000/darwin.md: Ditto.
6633 * config/rs6000/dfp.md: Ditto.
6634 * config/rs6000/htm.md: Ditto.
6635 * config/rs6000/rs6000.md: Ditto.
6636 * config/rs6000/sync.md: Ditto.
6637 * config/rs6000/vsx.md: Ditto.
6638
6639 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6640
6641 * config/rs6000/altivec.md: Don't set length attribute to the default
6642 value, for branch instructions.
6643 * config/rs6000/darwin.md: Ditto.
6644 * config/rs6000/rs6000.md: Ditto.
6645
6646 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6647
6648 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6649 (unnamed conditional branch define_insn): Set length to 4 or 8
6650 depending on offset.
6651 (<bd>_<mode>): Similar, for alternative 0.
6652 (<bd>tf_<mode>): Ditto.
6653
6654 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6655
6656 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6657
6658 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6659
6660 * doc/rtl.texi: Replace old RTX class names with new names.
6661
6662
6663 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6664
6665 * expmed.h (canonicalize_comparison): New declaration.
6666 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6667 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6668 * optabs.c (prepare_cmp_insn): Likewise.
6669 * rtl.h (unsigned_condition_p): New function which checks if a
6670 comparison operator is unsigned.
6671
6672 2018-08-16 Nathan Sidwell <nathan@acm.org>
6673
6674 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6675 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6676
6677 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6678
6679 PR target/84711
6680 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6681 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6682 (mov<mov>): ..this and enable unconditionally.
6683
6684 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6685
6686 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6687
6688 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6689
6690 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6691 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6692 "Common" with "Target".
6693
6694 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6695
6696 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6697 * doc/invoke.texi (mmitigate-rop): Remove.
6698 * config/i386/i386.c: Do not include "regrename.h".
6699 (ix86_rop_should_change_byte_p, reg_encoded_number)
6700 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6701 Remove.
6702 (ix86_reorg): Remove call to ix86_mitigate_rop.
6703 * config/i386/i386.md (attr "modrm_class"): Remove.
6704 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6705 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6706 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6707
6708 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6709
6710 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6711 allow folding of mergeh() and mergel() for the float and double types.
6712 (fold_mergehl_helper): Rework to handle building a permute tree
6713 for float vectors.
6714
6715 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6716
6717 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6718 for TARGET_SSE.
6719
6720 2018-08-15 David Malcolm <dmalcolm@redhat.com>
6721
6722 * common.opt (fdiagnostics-show-labels): New option.
6723 * diagnostic-show-locus.c (class layout_range): Add field
6724 "m_label".
6725 (class layout): Add field "m_show_labels_p".
6726 (layout_range::layout_range): Add param "label" and use it to
6727 initialize m_label.
6728 (make_range): Pass in NULL for new "label" param of layout_range's
6729 ctor.
6730 (layout::layout): Initialize m_show_labels_p.
6731 (layout::maybe_add_location_range): Pass in loc_range->m_label
6732 when constructing layout_range instances.
6733 (struct line_label): New struct.
6734 (layout::print_any_labels): New member function.
6735 (layout::print_line): Call it if label-printing is enabled.
6736 (selftest::test_one_liner_labels): New test.
6737 (selftest::test_diagnostic_show_locus_one_liner): Call it.
6738 * diagnostic.c (diagnostic_initialize): Initialize
6739 context->show_labels_p.
6740 * diagnostic.h (struct diagnostic_context): Add field
6741 "show_labels_p".
6742 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6743 -fno-diagnostics-show-labels.
6744 * dwarf2out.c (gen_producer_string): Add
6745 OPT_fdiagnostics_show_labels to the ignored options.
6746 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6747 param.
6748 (gcc_rich_location::maybe_add_expr): Likewise.
6749 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6750 label" param, defaulting to NULL.
6751 (gcc_rich_location::add_expr): Add "label" param.
6752 (gcc_rich_location::maybe_add_expr): Likewise.
6753 (class text_range_label): New class.
6754 (class range_label_for_type_mismatch): New class.
6755 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6756 of format_warning_va.
6757 (fmtwarn_n): Likewise for new params of format_warning_n_va.
6758 * lto-wrapper.c (merge_and_complain): Add
6759 OPT_fdiagnostics_show_labels to the "pick one setting" options.
6760 (append_compiler_options): Likewise to the dropped options.
6761 (append_diag_options): Likewise to the passed-on options.
6762 * opts.c (common_handle_option): Handle the new option.
6763 * selftest-diagnostic.c
6764 (test_diagnostic_context::test_diagnostic_context): Enable
6765 show_labels_p.
6766 * substring-locations.c: Include "gcc-rich-location.h".
6767 (format_warning_n_va): Add "fmt_label" and "param_label" params
6768 and use them as appropriate.
6769 (format_warning_va): Add "fmt_label" and "param_label" params,
6770 passing them on to format_warning_n_va.
6771 (format_warning_at_substring): Likewise.
6772 (format_warning_at_substring_n): Likewise.
6773 * substring-locations.h (format_warning_va): Add "fmt_label" and
6774 "param_label" params.
6775 (format_warning_n_va): Likewise.
6776 (format_warning_at_substring): Likewise.
6777 (format_warning_at_substring_n): Likewise.
6778 * toplev.c (general_init): Initialize global_dc->show_labels_p.
6779
6780 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
6781
6782 PR testsuite/86519
6783 * builtins.c (expand_builtin_memcmp): Do not expand the call
6784 when overflow is detected.
6785
6786 2018-08-15 Martin Sebor <msebor@redhat.com>
6787
6788 PR tree-optimization/71625
6789 * config/aarch64/aarch64-builtins.c
6790 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
6791
6792 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
6793
6794 * config/s390/s390.c (s390_reorg): Remove loop.
6795
6796 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6797
6798 * config/darwin.c
6799 (darwin_function_switched_text_sections): Delete.
6800 * gcc/config/darwin.h
6801 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
6802
6803 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
6804
6805 PR target/81685
6806 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
6807 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
6808 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
6809
6810 2018-08-15 Martin Liska <mliska@suse.cz>
6811
6812 PR tree-optimization/86925
6813 * predict.c (expr_expected_value_1): When taking
6814 later predictor, assign also probability.
6815 Use fold_build2_initializer_loc in order to fold
6816 the expression in -frounding-math.
6817
6818 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
6819
6820 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
6821 patterns.
6822 (expand_vec_perm_1): Try the new method.
6823
6824 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
6825
6826 PR target/86547
6827 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
6828 Check whether lra_live_max_point is 0 before dividing.
6829
6830 2018-08-14 Martin Sebor <msebor@redhat.com>
6831
6832 PR tree-optimization/86650
6833 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
6834 (vrp_prop::check_mem_ref): Same.
6835
6836 2018-08-13 Liu Hao <lh_mouse@126.com>
6837
6838 * pretty-print.c (eat_esc_sequence): Swap the foreground and
6839 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
6840 and clear it thereafter, as it only works for DBCS.
6841
6842 2018-08-13 Liu Hao <lh_mouse@126.com>
6843
6844 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
6845 handle returned by _get_osf_handle().
6846
6847 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6848
6849 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
6850 for folding vec_perm.
6851
6852 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6853
6854 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
6855 Add support for gimple-folding of vec_pack() and vec_unpack()
6856 intrinsics.
6857
6858 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
6859
6860 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
6861 vec_xst variants to the list.
6862 (rs6000_gimple_fold_builtin): Add support for folding unaligned
6863 vector loads and stores.
6864
6865 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
6866
6867 * config.gcc (rs6000-ibm-aix4.x): Delete.
6868 (rs6000-ibm-aix5.1): Delete.
6869 (rs6000-ibm-aix5.2): Delete.
6870 (rs6000-ibm-aix5.3): Delete.
6871 * config/rs6000/aix43.h: Delete.
6872 * config/rs6000/aix51.h: Delete.
6873 * config/rs6000/aix52.h: Delete.
6874 * config/rs6000/t-aix43: Delete.
6875
6876 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
6877
6878 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6879 New function.
6880 (s390_decompose_address): Factor out constant pool ref
6881 decomposition.
6882
6883 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6884
6885 * config/nds32/nds32-predicates.c
6886 (nds32_can_use_bclr_p): Change return type as bool.
6887 (nds32_can_use_bset_p): Ditto.
6888 (nds32_can_use_btgl_p): Ditto.
6889 (nds32_can_use_bitci_p): Ditto.
6890 * config/nds32/nds32-protos.h
6891 (nds32_can_use_bclr_p): Change declaration.
6892 (nds32_can_use_bset_p): Ditto.
6893 (nds32_can_use_btgl_p): Ditto.
6894 (nds32_can_use_bitci_p): Ditto.
6895
6896 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6897
6898 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6899 Support -msched-prolog-epilog option.
6900 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6901
6902 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6903
6904 * common/config/nds32/nds32-common.c
6905 (nds32_option_optimization_table): Enalbe -malways-align.
6906
6907 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
6908
6909 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6910 extra_headers.
6911 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6912 OPT_misr_secure_ case.
6913 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6914 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6915 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6916 secure attribute.
6917 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6918 (nds32_isr_info): New field security_level.
6919 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6920 * config/nds32/nds32.md (return_internal): Consider critical attribute.
6921 * config/nds32/nds32.opt (misr-secure): New option.
6922 * config/nds32/nds32_init.inc: New file.
6923 * config/nds32/nds32_isr.h: New file.
6924
6925 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
6926
6927 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6928 Update comment for atomic instructions.
6929 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6930 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6931 Remove.
6932 (atomic_loaddi): Revise fence expansion to only emit fence prior to
6933 load for __ATOMIC_SEQ_CST model.
6934 (atomic_loaddi_1): Remove float register target.
6935 (atomic_storedi): Handle CONST_INT values.
6936 (atomic_storedi_1): Remove float register source. Add special case
6937 for zero value.
6938 (memory_barrier): New expander and insn.
6939
6940 2018-08-11 Jakub Jelinek <jakub@redhat.com>
6941
6942 PR tree-optimization/86835
6943 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6944 new_stmt after def_gsi, make sure to insert new_square_stmt after
6945 that stmt, not 2 stmts before it.
6946
6947 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
6948
6949 PR target/82418
6950 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6951 instead of SWI48.
6952
6953 2018-08-10 Martin Liska <mliska@suse.cz>
6954
6955 PR target/83610
6956 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6957 function type.
6958 * builtins.c (expand_builtin_expect_with_probability):
6959 New function.
6960 (expand_builtin_expect_with_probability): New function.
6961 (build_builtin_expect_predicate): Add new argumnet probability
6962 for BUILT_IN_EXPECT_WITH_PROBABILITY.
6963 (fold_builtin_expect):
6964 (fold_builtin_2):
6965 (fold_builtin_3):
6966 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6967 * builtins.h (fold_builtin_expect): Set new argument.
6968 * doc/extend.texi: Document __builtin_expect_with_probability.
6969 * doc/invoke.texi: Likewise.
6970 * gimple-fold.c (gimple_fold_call): Pass new argument.
6971 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6972 also BUILT_IN_EXPECT_WITH_PROBABILITY.
6973 * predict.c (get_predictor_value): New function.
6974 (expr_expected_value): Add new argument probability. Assume
6975 that predictor and probability are always non-null.
6976 (expr_expected_value_1): Likewise. For __builtin_expect and
6977 __builtin_expect_with_probability set probability. Handle
6978 combination in binary expressions.
6979 (tree_predict_by_opcode): Simplify code by simply calling
6980 get_predictor_value.
6981 (pass_strip_predict_hints::execute): Add handling of
6982 BUILT_IN_EXPECT_WITH_PROBABILITY.
6983 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6984 new predictor.
6985 * tree.h (DECL_BUILT_IN_P): New function.
6986
6987 2018-08-10 Martin Liska <mliska@suse.cz>
6988
6989 PR tree-optimization/85799
6990 * passes.def: Add argument for pass_strip_predict_hints.
6991 * predict.c (class pass_strip_predict_hints): Add new argument
6992 early_p.
6993 (strip_predictor_early): New function.
6994 (pass_strip_predict_hints::execute): Call the function to
6995 strip predictors.
6996 (strip_predict_hints): New function.
6997 * predict.def: Fix comment.
6998
6999 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7000
7001 * Makefile.in: Clarify which tm.texi to copy over to assert the
7002 right to grant a GFDL license for all.
7003
7004 2018-08-09 Jeff Law <law@redhat.com>
7005
7006 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7007 unused variable.
7008
7009 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7010
7011 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7012 prototype.
7013
7014 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7015
7016 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7017 reductions for variable-length vectors.
7018
7019 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7020
7021 PR other/84889
7022 * common.opt (fdiagnostics-show-line-numbers): New option.
7023 * diagnostic-show-locus.c (class layout): Add fields
7024 "m_show_line_numbers_p" and "m_linenum_width";
7025 (num_digits): New function.
7026 (test_num_digits): New function.
7027 (layout::layout): Initialize new fields. Update m_x_offset
7028 logic to handle any left margin.
7029 (layout::print_source_line): Print line number when requested.
7030 (layout::start_annotation_line): New member function.
7031 (layout::print_annotation_line): Call it.
7032 (layout::print_leading_fixits): Likewise.
7033 (layout::print_trailing_fixits): Likewise. Update calls to
7034 move_to_column for new parameter.
7035 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7036 it to potentially call start_annotation_line.
7037 (layout::show_ruler): Call start_annotation_line.
7038 (selftest::test_line_numbers_multiline_range): New selftest.
7039 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7040 and selftest::test_line_numbers_multiline_range.
7041 * diagnostic.c (diagnostic_initialize): Initialize
7042 show_line_numbers_p.
7043 * diagnostic.h (struct diagnostic_context): Add field
7044 "show_line_numbers_p".
7045 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7046 -fno-diagnostics-show-line-numbers.
7047 * dwarf2out.c (gen_producer_string): Add
7048 OPT_fdiagnostics_show_line_numbers to the ignored options.
7049 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7050 one setting" options.
7051 (append_compiler_options): Likewise to the dropped options.
7052 (append_diag_options): Likewise to the passed-on options.
7053 * opts.c (common_handle_option): Handle the new option.
7054 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7055
7056 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7057
7058 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7059 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7060 third argument of type "const signed char" to descriptions of
7061 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7062 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7063 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7064 __builtin_bcdsub_ov functions.
7065
7066 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7067
7068 PR tree-optimization/86858
7069 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7070 flow_bb_inside_loop_p calls.
7071
7072 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7073
7074 PR tree-optimization/86871
7075 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7076 instead of gimple_assign_lhs.
7077
7078 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7079
7080 PR target/86887
7081 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7082 register constraint to operand 0.
7083 (add<mode>3_carryinC): Likewise.
7084 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7085
7086 2018-08-09 Martin Liska <mliska@suse.cz>
7087
7088 PR c/86895
7089 * common.opt: Remove extra line.
7090
7091 2018-08-09 Martin Liska <mliska@suse.cz>
7092
7093 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7094 at the end of a line, make first letter capital and end up
7095 a sentence with a dot.
7096 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7097 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7098 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7099 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7100 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7101 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7102 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7103 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7104 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7105 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7106 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7107 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7108 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7109 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7110 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7111 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7112 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7113 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7114
7115 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7116
7117 PR target/84332
7118 * config/s390/s390.c (s390_option_override_internal): Reduce the
7119 stack-clash-protection-probe-interval param if it would be too big
7120 for z900.
7121
7122 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7123
7124 PR target/46179
7125 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7126 * config/m68k/m68k.c (handle_move_double): Don't call
7127 m68k_final_prescan_insn.
7128 (m68k_adjust_decorated_operand): Renamed from
7129 m68k_final_prescan_insn, remove first and third operand and
7130 simplify.
7131 (print_operand): Call it.
7132 (print_operand_address): Call it.
7133
7134 2018-08-08 Nathan Sidwell <nathan@acm.org>
7135
7136 * diagnostic.c (diagnostic_report_current_module): Use
7137 linemap_included_from & linemap_included_from_linemap.
7138
7139 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7140
7141 * config/aarch64/aarch64-cores.def: Add phecda core.
7142 * config/aarch64/aarch64-tune.md: Regenerate.
7143 * doc/invoke.texi: Add phecda core.
7144
7145 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7146
7147 PR target/85295
7148 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7149 definitions.
7150 * config/s390/s390.md ("movti"): Add more alternatives for
7151 constant to GPR copies.
7152
7153 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7154
7155 * config/s390/s390.c: Fix whitespace damage throughout the file.
7156 * config/s390/s390.h: Likewise.
7157 * config/s390/tpf.h: Likewise.
7158
7159 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7160
7161 * config/s390/s390.c (s390_loadrelative_operand_p):
7162 Remove TARGET_CPU_ZARCH usages.
7163 (s390_rtx_costs): Likewise.
7164 (s390_legitimate_constant_p): Likewise.
7165 (s390_cannot_force_const_mem): Likewise.
7166 (legitimate_reload_constant_p): Likewise.
7167 (s390_preferred_reload_class): Likewise.
7168 (legitimize_pic_address): Likewise.
7169 (legitimize_tls_address): Likewise.
7170 (s390_split_branches): Removed.
7171 (s390_add_execute): Removed.
7172 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7173 (s390_mainpool_start): Likewise.
7174 (s390_mainpool_finish): Likewise.
7175 (s390_mainpool_cancel): Removed.
7176 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7177 (s390_chunkify_cancel): Likewise.
7178 (s390_return_addr_rtx): Likewise.
7179 (s390_register_info): Remove split_branches_pending_p uages.
7180 (s390_optimize_register_info): Likewise.
7181 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7182 split_branches_pending_p usages.
7183 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7184 (s390_load_got): Likewise.
7185 (s390_expand_split_stack_prologue): Likewise.
7186 (output_asm_nops): Likewise.
7187 (s390_function_profiler): Likewise.
7188 (s390_emit_call): Likewise.
7189 (s390_conditional_register_usage): Likewise.
7190 (s390_optimize_prologue): Likewise.
7191 (s390_reorg): Remove TARGET_CPU_ZARCH and
7192 split_branches_pending_p usages.
7193 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7194 usages.
7195 (s390_output_indirect_thunk_function): Likewise.
7196 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7197 (TARGET_CPU_ZARCH_P): Removed.
7198 (struct machine_function): Remove split_branches_pending_p.
7199 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7200
7201 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7202
7203 * common/config/s390/s390-common.c (processor_flags_table):
7204 Remove flags.
7205 * config.gcc: Remove with_arch/with_tune support.
7206 * config/s390/2064.md: Remove cpu attribute comparisons.
7207 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7208 Remove MTN.
7209 * config/s390/linux.h (ASM_SPEC):
7210 Remove -march support.
7211 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7212 Use a table to get an arch level.
7213 * config/s390/s390-opts.h (enum processor_type):
7214 Remove enum values.
7215 * config/s390/s390.c
7216 (processor_table): Remove entries, add arch_level values.
7217 (s390_issue_rate): Remove cases.
7218 (s390_option_override): Adjust
7219 s390_option_override_internal() call.
7220 (s390_option_override_internal): Remove deprecation warning.
7221 (s390_valid_target_attribute_tree): Adjust
7222 s390_option_override_internal() call.
7223 * config/s390/s390.h (struct s390_processor):
7224 Share with s390-c.c, add arch_level field.
7225 * config/s390/s390.md:
7226 Remove occurrences in cpu attribute.
7227 * config/s390/s390.opt: Remove -march/-mtune support.
7228 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7229 * doc/invoke.texi: Remove deprecation warning.
7230
7231 2018-08-08 Luis Machado <luis.machado@linaro.org>
7232
7233 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7234 global.
7235 (qdf24xx_tunings): Set vector cost structure to
7236 qdf24xx_vector_cost.
7237
7238 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7239 <register_sextend>: Set to 3.
7240
7241 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7242
7243 PR target/86838
7244 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7245 * config/aarch64/aarch64-simd.md
7246 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7247 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7248 (aarch64_frecpx<mode>): ...this new pattern.
7249 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7250 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7251
7252 2018-08-07 Martin Liska <mliska@suse.cz>
7253
7254 PR middle-end/83023
7255 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7256 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7257 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7258 * doc/extend.texi: Document that malloc attribute adds
7259 hit to compiler.
7260
7261 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7262
7263 PR target/86785
7264 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7265 Define to speculation_safe_value_not_needed.
7266
7267 2018-08-06 Jeff Law <law@redhat.com>
7268
7269 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7270 the vr_values instance to cprop_into_stmt.
7271 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7272 (cprop_operand): Also query EVRP to determine if OP is a constant.
7273
7274 2018-08-06 Nathan Sidwell <nathan@acm.org>
7275
7276 * diagnostic.c (diagnostic_report_current_module): Reroll
7277 included-at loop. Translate text.
7278
7279 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7280
7281 * function-tests.c (selftest::test_expansion_to_rtl): Call
7282 free_after_compilation.
7283
7284 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7285
7286 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7287
7288 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7289
7290 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7291 loops with memory block operations from getting unrolled.
7292
7293 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7294
7295 PR target/86807
7296 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7297 Define to speculation_safe_value_not_needed.
7298
7299 2018-08-06 Jeff Law <law@redhat.com>
7300
7301 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7302 assert.
7303
7304 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7305
7306 PR target/86662
7307 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7308 with all enabled __intN types.
7309
7310 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7311
7312 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7313
7314 * alias.c (record_set): Check for clobber high.
7315 * cfgexpand.c (expand_gimple_stmt): Likewise.
7316 * combine-stack-adj.c (single_set_for_csa): Likewise.
7317 * combine.c (find_single_use_1): Likewise.
7318 (set_nonzero_bits_and_sign_copies): Likewise.
7319 (get_combine_src_dest): Likewise.
7320 (is_parallel_of_n_reg_sets): Likewise.
7321 (try_combine): Likewise.
7322 (record_dead_and_set_regs_1): Likewise.
7323 (reg_dead_at_p_1): Likewise.
7324 (reg_dead_at_p): Likewise.
7325 * dce.c (deletable_insn_p): Likewise.
7326 (mark_nonreg_stores_1): Likewise.
7327 (mark_nonreg_stores_2): Likewise.
7328 * df-scan.c (df_find_hard_reg_defs): Likewise.
7329 (df_uses_record): Likewise.
7330 (df_get_call_refs): Likewise.
7331 * dwarf2out.c (mem_loc_descriptor): Likewise.
7332 * haifa-sched.c (haifa_classify_rtx): Likewise.
7333 * ira-build.c (create_insn_allocnos): Likewise.
7334 * ira-costs.c (scan_one_insn): Likewise.
7335 * ira.c (equiv_init_movable_p): Likewise.
7336 (rtx_moveable_p): Likewise.
7337 (interesting_dest_for_shprep): Likewise.
7338 * jump.c (mark_jump_label_1): Likewise.
7339 * postreload-gcse.c (record_opr_changes): Likewise.
7340 * postreload.c (reload_cse_simplify): Likewise.
7341 (struct reg_use): Add source expr.
7342 (reload_combine): Check for clobber high.
7343 (reload_combine_note_use): Likewise.
7344 (reload_cse_move2add): Likewise.
7345 (move2add_note_store): Likewise.
7346 * print-rtl.c (print_pattern): Likewise.
7347 * recog.c (decode_asm_operands): Likewise.
7348 (store_data_bypass_p): Likewise.
7349 (if_test_bypass_p): Likewise.
7350 * regcprop.c (kill_clobbered_value): Likewise.
7351 (kill_set_value): Likewise.
7352 * reginfo.c (reg_scan_mark_refs): Likewise.
7353 * reload1.c (maybe_fix_stack_asms): Likewise.
7354 (eliminate_regs_1): Likewise.
7355 (elimination_effects): Likewise.
7356 (mark_not_eliminable): Likewise.
7357 (scan_paradoxical_subregs): Likewise.
7358 (forget_old_reloads_1): Likewise.
7359 * reorg.c (find_end_label): Likewise.
7360 (try_merge_delay_insns): Likewise.
7361 (redundant_insn): Likewise.
7362 (own_thread_p): Likewise.
7363 (fill_simple_delay_slots): Likewise.
7364 (fill_slots_from_thread): Likewise.
7365 (dbr_schedule): Likewise.
7366 * resource.c (update_live_status): Likewise.
7367 (mark_referenced_resources): Likewise.
7368 (mark_set_resources): Likewise.
7369 * rtl.c (copy_rtx): Likewise.
7370 * rtlanal.c (reg_referenced_p): Likewise.
7371 (single_set_2): Likewise.
7372 (noop_move_p): Likewise.
7373 (note_stores): Likewise.
7374 * sched-deps.c (sched_analyze_reg): Likewise.
7375 (sched_analyze_insn): Likewise.
7376
7377 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7378
7379 * cse.c (invalidate_reg): New function extracted from...
7380 (invalidate): ...here.
7381 (canonicalize_insn): Check for clobber high.
7382 (invalidate_from_clobbers): invalidate clobber highs.
7383 (invalidate_from_sets_and_clobbers): Likewise.
7384 (count_reg_usage): Check for clobber high.
7385 (insn_live_p): Likewise.
7386 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7387 (cselib_invalidate_regno): Check for clobber in setter.
7388 (cselib_invalidate_rtx): Pass through setter.
7389 (cselib_invalidate_rtx_note_stores):
7390 (cselib_process_insn): Check for clobber high.
7391 * cselib.h (cselib_invalidate_rtx): Add operand.
7392
7393 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7394
7395 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7396 (mark_not_eliminable): Likewise.
7397 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7398 * lra-lives.c (process_bb_lives): Check for clobber high.
7399 * lra.c (new_insn_reg): Remember clobber highs.
7400 (collect_non_operand_hard_regs): Check for clobber high.
7401 (lra_set_insn_recog_data): Likewise.
7402 (add_regs_to_insn_regno_info): Likewise.
7403 (lra_update_insn_regno_info): Likewise.
7404
7405 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7406
7407 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7408 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7409
7410 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7411
7412 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7413 (copy_insn_1): Likewise.
7414 (gen_hard_reg_clobber_high): New gen function.
7415 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7416 * genemit.c (gen_exp): Likewise.
7417 (gen_emit_seq): Pass through info.
7418 (gen_insn): Check for CLOBBER_HIGH.
7419 (gen_expand): Pass through info.
7420 (gen_split): Likewise.
7421 (output_add_clobbers): Likewise.
7422 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7423 (remove_clobbers): Likewise.
7424 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7425
7426 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7427
7428 * doc/rtl.texi (clobber_high): Add.
7429 (parallel): Add in clobber high
7430 * rtl.c (rtl_check_failed_code3): Add function.
7431 * rtl.def (CLOBBER_HIGH): Add expression.
7432 * rtl.h (RTL_CHECKC3): Add macro.
7433 (rtl_check_failed_code3): Add declaration.
7434 (XC3EXP): Add macro.
7435
7436 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7437
7438 PR target/86386
7439 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7440 cfun->machine->max_used_stack_alignment if needed.
7441
7442 2018-08-04 Martin Sebor <msebor@redhat.com>
7443
7444 PR tree-optimization/86571
7445 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7446 NaN output to 4.
7447
7448 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7449
7450 PR target/86799
7451 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7452 Define.
7453
7454 2018-08-03 Jeff Law <law@redhat.com>
7455
7456 PR target/86795
7457 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7458 Define to speculation_safe_value_not_needed.
7459
7460 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7461
7462 * doc/gcov.texi (-x): Remove duplicate "to".
7463 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7464 (-Wif-not-aligned): Remove duplicate "is".
7465 (-flto): Remove duplicate "the".
7466 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7467 duplicate "v5.00.b".
7468 (MSP430 Options): Remove duplicate "and" from the description
7469 of "-mgprel-sec=regexp".
7470 (x86 Options): Remove duplicate copies of "vmldLog102" and
7471 vmlsLog104 from description of "-mveclibabi=type".
7472
7473 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7474
7475 * internal-fn.h (first_commutative_argument): Declare.
7476 * internal-fn.c (first_commutative_argument): New function.
7477 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7478 restrictions for pattern statements. Use first_commutative_argument
7479 to look for commutative operands in calls to internal functions.
7480
7481 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7482
7483 * Makefile.in (wide-int-range.o): New.
7484 * tree-vrp.c: Move all the wide_int_* functions to...
7485 * wide-int-range.cc: ...here.
7486 * tree-vrp.h: Move all the wide_int_* prototypes to...
7487 * wide-int-range.h: ...here.
7488
7489 2018-08-03 Tom de Vries <tdevries@suse.de>
7490
7491 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7492 UI_NONE.
7493 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7494 * except.c (output_function_exception_table): Do early exit if
7495 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7496
7497 2018-08-03 Martin Liska <mliska@suse.cz>
7498
7499 * predict.c (dump_prediction): Change to 2 digits
7500 in fraction part.
7501
7502 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7503
7504 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7505 neon_dup_q to...
7506 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7507
7508 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7509
7510 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7511 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7512 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7513 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7514 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7515
7516 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7517
7518 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7519 pp_take_prefix when saving the existing prefix.
7520 * diagnostic.c (diagnostic_append_note): Likewise.
7521 * langhooks.c (lhd_print_error_function): Likewise.
7522 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7523 param's type. Free the existing prefix.
7524 (pp_take_prefix): New function.
7525 (pretty_printer::pretty_printer): Drop the prefix parameter.
7526 Rename the length parameter to match the comment.
7527 (pretty_printer::~pretty_printer): Free the prefix.
7528 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7529 parameter.
7530 (struct pretty_printer): Drop the "const" from "prefix" field's
7531 type and clarify memory management.
7532 (pp_set_prefix): Drop the "const" from the 2nd param.
7533 (pp_take_prefix): New decl.
7534
7535 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7536
7537 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7538 for word_mode_ok here instead of passing as argument.
7539 (expand_block_compare): Change select_block_compare_mode() call.
7540 (expand_strncmp_gpr_sequence): New function.
7541 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7542
7543 2018-08-02 Jeff Law <law@redhat.com>
7544
7545 PR target/86790
7546 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7547 Define to speculation_safe_value_not_needed.
7548
7549 PR target/86784
7550 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7551 Define to speculation_safe_value_not_needed.
7552
7553 2018-08-02 Tom de Vries <tdevries@suse.de>
7554
7555 PR target/86660
7556 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7557 function. Return UI_TARGET unconditionally.
7558 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7559 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7560
7561 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7562
7563 * genemit.c (print_overload_test): Fix typo.
7564
7565 2018-08-02 Richard Biener <rguenther@suse.de>
7566
7567 PR tree-optimization/86816
7568 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7569 which checks for value availability before querying it.
7570 (gvn_uses_equal): Use it.
7571 (same_succ_hash): Likewise.
7572 (gimple_equal_p): Likewise.
7573
7574 2018-08-02 Nick Clifton <nickc@redhat.com>
7575
7576 PR target/86813
7577 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7578 Define to speculation_safe_value_not_needed.
7579
7580 PR target/86810
7581 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7582 Define to speculation_safe_value_not_needed.
7583
7584 PR target/86810
7585 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7586 Define to speculation_safe_value_not_needed.
7587
7588 PR target/86803
7589 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7590 Define to speculation_safe_value_not_needed.
7591
7592 PR target/86797
7593 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7594 Define to speculation_safe_value_not_needed.
7595
7596 PR target/86791
7597 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7598 Define to speculation_safe_value_not_needed.
7599
7600 PR target/86789
7601 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7602 Define to speculation_safe_value_not_needed.
7603
7604 PR target/86787
7605 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7606 Define to speculation_safe_value_not_needed.
7607
7608 PR target/86782
7609 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7610 speculation_safe_value_not_needed.
7611
7612 PR target/86781
7613 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7614 to speculation_safe_value_not_needed.
7615
7616 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7617
7618 * doc/md.texi: Expand the documentation of instruction names
7619 to mention port-local uses. Document '@' in pattern names.
7620 * read-md.h (overloaded_instance, overloaded_name): New structs.
7621 (mapping): Declare.
7622 (md_reader::handle_overloaded_name): New member function.
7623 (md_reader::get_overloads): Likewise.
7624 (md_reader::m_first_overload): New member variable.
7625 (md_reader::m_next_overload_ptr): Likewise.
7626 (md_reader::m_overloads_htab): Likewise.
7627 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7628 m_next_overload_ptr and m_overloads_htab.
7629 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7630 (get_mode_token, get_code_token, get_int_token): New functions.
7631 (map_attr_string): Add an optional argument that passes back
7632 the associated iterator.
7633 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7634 (md_reader::handle_overloaded_name, add_overload_instance): New
7635 functions.
7636 (apply_iterators): Handle '@' names. Report an error if '@'
7637 is used without iterators.
7638 (initialize_iterators): Initialize the new iterator_group fields.
7639 * genopinit.c (handle_overloaded_code_for)
7640 (handle_overloaded_gen): New functions.
7641 (main): Use them to print declarations of maybe_code_for_* and
7642 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7643 * genemit.c (print_overload_arguments, print_overload_test)
7644 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7645 (main): Use it to print definitions of maybe_code_for_* and
7646 maybe_gen_* functions.
7647 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7648 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7649 instead of explicit mode checks.
7650 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7651 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7652 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7653 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7654 (aarch64_expand_compare_and_swap): Likewise
7655 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7656 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7657 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7658 (aarch64_constant_pool_reload_icode): Delete.
7659 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7660 instead of aarch64_constant_pool_reload_icode. Use
7661 code_for_aarch64_reload_mov instead of explicit mode checks.
7662 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7663 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7664 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7665 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7666 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7667 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7668 (aarch64_atomic_load_op_code): Delete.
7669 (aarch64_emit_atomic_load_op): Likewise.
7670 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7671 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7672 instead of aarch64_emit_atomic_load_op.
7673 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7674 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7675 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7676 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7677 character before the pattern name.
7678 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7679 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7680 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7681 (aarch64_frecps<mode>): Likewise.
7682 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7683 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7684 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7685 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7686 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7687
7688 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7689
7690 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7691 Allow HFmode constants if TARGET_FP_F16INST.
7692
7693 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7694
7695 PR target/86014
7696 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7697 No longer check last store for clobber of address register.
7698
7699 2018-08-02 Martin Liska <mliska@suse.cz>
7700
7701 PR gcov-profile/86817
7702 * gcov.c (process_all_functions): New function.
7703 (main): Call it.
7704 (process_file): Move functions processing to
7705 process_all_functions.
7706
7707 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7708
7709 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7710 "const" to the "gimple *" and "rtx_insn *" parameters.
7711 * dumpfile.h (dump_user_location_t::dump_user_location_t):
7712 Likewise.
7713 (dump_location_t::dump_location_t): Likewise.
7714
7715 2018-08-01 Martin Sebor <msebor@redhat.com>
7716
7717 PR tree-optimization/86650
7718 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7719 rather than a "gcall *". Directly pass the data of interest
7720 to percent_K_format, rather than building a temporary CALL_EXPR
7721 to hold it.
7722 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7723 (gimple_fold_builtin_strncat): Adjust.
7724 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7725 gcall* argument with gimple*.
7726 * gimple-ssa-warn-restrict.c (check_call): Same.
7727 (wrestrict_dom_walker::before_dom_children): Same.
7728 (builtin_access::builtin_access): Same.
7729 (check_bounds_or_overlap): Same
7730 (maybe_diag_overlap): Same.
7731 (maybe_diag_offset_bounds): Same.
7732 * tree-diagnostic.c (default_tree_printer): Move usage of
7733 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7734 to this callsite.
7735 * tree-pretty-print.c (percent_K_format): Add argument.
7736 * tree-pretty-print.h: Add argument.
7737 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7738 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7739 (maybe_diag_stxncpy_trunc): Same.
7740 (handle_builtin_stxncpy): Same.
7741 (handle_builtin_strcat): Same.
7742
7743 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7744
7745 * match.pd: Optimise pointer range checks.
7746
7747 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7748
7749 PR tree-optimization/86758
7750 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7751 to remove pattern statements.
7752
7753 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7754
7755 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7756 result of dfs_enumerate_from when constructing stmt_vec_infos,
7757 instead of additionally calling get_loop_body.
7758
7759 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7760
7761 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7762 parameter.
7763 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7764 When creating an iv, assert that the step is not known to be zero.
7765 (vect_setup_realignment): Update call accordingly.
7766 * tree-vect-stmts.c (vectorizable_store): Likewise.
7767 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
7768
7769 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7770
7771 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7772 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7773 (vectorizable_reduction): Likewise.
7774 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7775 (vect_detect_hybrid_slp_stmts): Likewise.
7776 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7777
7778 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
7779
7780 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7781 (wide_int_set_zero_nonzero_bits): ...this.
7782 (zero_nonzero_bits_from_vr): Rename to...
7783 (vrp_set_zero_nonzero_bits): ...this.
7784 (extract_range_from_multiplicative_op_1): Abstract wide int
7785 code...
7786 (wide_int_range_multiplicative_op): ...here.
7787 (extract_range_from_binary_expr_1): Extract wide int binary
7788 operations into their own functions.
7789 (wide_int_range_lshift): New.
7790 (wide_int_range_can_optimize_bit_op): New.
7791 (wide_int_range_shift_undefined_p): New.
7792 (wide_int_range_bit_xor): New.
7793 (wide_int_range_bit_ior): New.
7794 (wide_int_range_bit_and): New.
7795 (wide_int_range_trunc_mod): New.
7796 (extract_range_into_wide_ints): New.
7797 (vrp_shift_undefined_p): New.
7798 (extract_range_from_multiplicative_op): New.
7799 (vrp_can_optimize_bit_op): New.
7800 * tree-vrp.h (value_range::dump): New.
7801 (wide_int_range_multiplicative_op): New.
7802 (wide_int_range_lshift):New.
7803 (wide_int_range_shift_undefined_p): New.
7804 (wide_int_range_bit_xor): New.
7805 (wide_int_range_bit_ior): New.
7806 (wide_int_range_bit_and): New.
7807 (wide_int_range_trunc_mod): New.
7808 (zero_nonzero_bits_from_bounds): Rename to...
7809 (wide_int_set_zero_nonzero_bits): ...this.
7810 (zero_nonzero_bits_from_vr): Rename to...
7811 (vrp_set_zero_nonzero_bits): ...this.
7812 (range_easy_mask_min_max): Rename to...
7813 (wide_int_range_can_optimize_bit_op): this.
7814 * vr-values.c (simplify_bit_ops_using_ranges): Rename
7815 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
7816
7817 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7818
7819 * tree-vectorizer.h (vect_orig_stmt): New function.
7820 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
7821 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
7822 (vect_create_epilog_for_reduction): Likewise.
7823 (vectorizable_live_operation): Likewise.
7824 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7825 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
7826 * tree-vect-stmts.c (vectorizable_call): Likewise.
7827 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
7828
7829 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7830
7831 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
7832 argument.
7833 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
7834 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
7835 (vect_transform_loop): Likewise.
7836 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7837
7838 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7839
7840 * tree-vectorizer.h (vect_schedule_slp): Return void.
7841 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7842 (vect_schedule_slp): Likewise.
7843
7844 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7845
7846 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
7847 argument.
7848 (vect_transform_loop): Update calls accordingly. Schedule SLP
7849 instances before the main loop, if any exist.
7850
7851 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
7852
7853 PR tree-optimization/86749
7854 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
7855 If the lhs is used in a COND_EXPR, check that it is being used
7856 as the "then" or "else" value.
7857
7858 2018-08-01 Tom de Vries <tdevries@suse.de>
7859
7860 PR target/86800
7861 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7862 speculation_safe_value_not_needed.
7863
7864 2018-08-01 Richard Biener <rguenther@suse.de>
7865
7866 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
7867 as base and offset.
7868
7869 2018-08-01 Martin Liska <mliska@suse.cz>
7870
7871 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
7872 format how successful transformation is dumped.
7873 (gimple_mod_pow2_value_transform): Likewise.
7874 (gimple_mod_subtract_transform): Likewise.
7875 (gimple_stringops_transform): Likewise.
7876
7877 2018-08-01 Martin Liska <mliska@suse.cz>
7878
7879 PR value-prof/35543
7880 * value-prof.c (interesting_stringop_to_profile_p):
7881 Simplify the code and add BUILT_IN_MEMMOVE.
7882 (gimple_stringops_transform): Likewise.
7883
7884 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
7885
7886 * config/aarch64/aarch64-simd.md
7887 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
7888 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
7889 use GPI iterator instead of SI mode.
7890
7891 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7892
7893 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
7894 rs6000_speculation_barrier.
7895 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
7896 new barrier pattern name.
7897
7898 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
7899
7900 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7901 (speculation_barrier): New insn.
7902
7903 2018-08-01 Richard Biener <rguenther@suse.de>
7904
7905 PR bootstrap/86724
7906 * graphite.h: Include isl/id.h and isl/space.h to allow build
7907 with ISL 0.20.
7908
7909 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
7910
7911 PR target/86651
7912 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7913 mode for COFF targets.
7914 * defaults.h (TARGET_COFF): Define.
7915 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7916 TARGET_COFF): Define.
7917 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7918 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7919 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7920
7921 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7922
7923 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7924 * gimple-streamer-out.c (output_bb): Save it.
7925 * lto-streamer-in.c (input_struct_function_base): Restore
7926 instance discriminator if available. Create map on demand.
7927 * lto-streamer-out.c (output_struct_function_base): Save it if
7928 available.
7929 * final.c (decl_to_instance_map): Document LTO strategy.
7930
7931 2018-07-31 Alexandre Oliva <oliva@adacore.com>
7932 Olivier Hainque <hainque@adacore.com>
7933
7934 * debug.h (decl_to_instance_map_t): New type.
7935 (decl_to_instance_map): Declare.
7936 (maybe_create_decl_to_instance_map): New inline function.
7937 * final.c (bb_discriminator, last_bb_discriminator): New statics,
7938 to track basic block discriminators.
7939 (final_start_function_1): Initialize them.
7940 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7941 bb_discriminator.
7942 (decl_to_instance_map): New variable.
7943 (map_decl_to_instance, maybe_set_discriminator): New functions.
7944 (notice_source_line): Set discriminator.
7945
7946 2018-07-31 Ian Lance Taylor <iant@golang.org>
7947
7948 * targhooks.c (default_have_speculation_safe_value): Add
7949 ATTRIBUTE_UNUSED.
7950
7951 2018-07-31 David Malcolm <dmalcolm@redhat.com>
7952
7953 * dump-context.h: Include "pretty-print.h".
7954 (dump_context::refresh_dumps_are_enabled): New decl.
7955 (dump_context::emit_item): New decl.
7956 (class dump_context): Add fields "m_test_pp" and
7957 "m_test_pp_flags".
7958 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7959 (temp_dump_context::get_dumped_text): New decl.
7960 (class temp_dump_context): Add field "m_pp".
7961 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7962 (dump_context::refresh_dumps_are_enabled): ...and add a test for
7963 m_test_pp.
7964 (set_dump_file): Update for above change.
7965 (set_alt_dump_file): Likewise.
7966 (dump_loc): New overload, taking a pretty_printer *.
7967 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
7968 to any test pretty-printer.
7969 (make_item_for_dump_gimple_stmt): New function, adapted from
7970 optinfo::add_gimple_stmt.
7971 (dump_context::dump_gimple_stmt): Call it, and use the result,
7972 eliminating the direct usage of dump_file and alt_dump_file in
7973 favor of indirectly using them via emit_item.
7974 (make_item_for_dump_gimple_expr): New function, adapted from
7975 optinfo::add_gimple_expr.
7976 (dump_context::dump_gimple_expr): Call it, and use the result,
7977 eliminating the direct usage of dump_file and alt_dump_file in
7978 favor of indirectly using them via emit_item.
7979 (make_item_for_dump_generic_expr): New function, adapted from
7980 optinfo::add_tree.
7981 (dump_context::dump_generic_expr): Call it, and use the result,
7982 eliminating the direct usage of dump_file and alt_dump_file in
7983 favor of indirectly using them via emit_item.
7984 (make_item_for_dump_printf_va): New function, adapted from
7985 optinfo::add_printf_va.
7986 (make_item_for_dump_printf): New function.
7987 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7988 and use the result, eliminating the direct usage of dump_file and
7989 alt_dump_file in favor of indirectly using them via emit_item.
7990 (make_item_for_dump_dec): New function.
7991 (dump_context::dump_dec): Call it, and use the result,
7992 eliminating the direct usage of dump_file and alt_dump_file in
7993 favor of indirectly using them via emit_item.
7994 (make_item_for_dump_symtab_node): New function, adapted from
7995 optinfo::add_symtab_node.
7996 (dump_context::dump_symtab_node): Call it, and use the result,
7997 eliminating the direct usage of dump_file and alt_dump_file in
7998 favor of indirectly using them via emit_item.
7999 (dump_context::begin_scope): Reimplement, avoiding direct usage
8000 of dump_file and alt_dump_file in favor of indirectly using them
8001 via emit_item.
8002 (dump_context::emit_item): New member function.
8003 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8004 Set up test pretty-printer on the underlying context. Call
8005 refresh_dumps_are_enabled.
8006 (temp_dump_context::~temp_dump_context): Call
8007 refresh_dumps_are_enabled.
8008 (temp_dump_context::get_dumped_text): New member function.
8009 (selftest::verify_dumped_text): New function.
8010 (ASSERT_DUMPED_TEXT_EQ): New macro.
8011 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8012 and then without optinfo enabled. Add uses of
8013 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8014 * dumpfile.h: Update comment for the dump_* API.
8015 * optinfo-emit-json.cc
8016 (selftest::test_building_json_from_dump_calls): Update for new
8017 param for temp_dump_context ctor.
8018 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8019 and "m_owned" field.
8020 (optinfo_item::~optinfo_item): Likewise.
8021 (optinfo::add_item): New member function.
8022 (optinfo::emit): Update comment.
8023 (optinfo::add_string): Delete.
8024 (optinfo::add_printf): Delete.
8025 (optinfo::add_printf_va): Delete.
8026 (optinfo::add_gimple_stmt): Delete.
8027 (optinfo::add_gimple_expr): Delete.
8028 (optinfo::add_tree): Delete.
8029 (optinfo::add_symtab_node): Delete.
8030 (optinfo::add_dec): Delete.
8031 * optinfo.h (class dump_context): New forward decl.
8032 (optinfo::add_item): New decl.
8033 (optinfo::add_string): Delete.
8034 (optinfo::add_printf): Delete.
8035 (optinfo::add_printf_va): Delete.
8036 (optinfo::add_gimple_stmt): Delete.
8037 (optinfo::add_gimple_expr): Delete.
8038 (optinfo::add_tree): Delete.
8039 (optinfo::add_symtab_node): Delete.
8040 (optinfo::add_dec): Delete.
8041 (optinfo::add_poly_int): Delete.
8042 (optinfo_item::optinfo_item): Remove "owned" param.
8043 (class optinfo_item): Remove field "m_owned".
8044
8045 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8046
8047 PR middle-end/86705
8048 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8049 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8050 requested variable alignment.
8051 (expand_one_ssa_partition): Likewise.
8052 (expand_one_var): Likewise.
8053
8054 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8055
8056 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8057 to speculation_safe_value_not_needed.
8058
8059 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8060
8061 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8062 * targhooks.c (speculation_safe_value_not_needed): New function.
8063 * target.def (have_speculation_safe_value): Update documentation.
8064 * doc/tm.texi: Regenerated.
8065
8066 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8067
8068 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8069 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8070 expand.
8071 (despeculate_copy<ALLI:mode>_insn): New insn.
8072 (despeculate_copyti_insn): New insn.
8073 (despeculate_simple<ALLI:mode>): New insn
8074 (despeculate_simpleti): New insn.
8075 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8076 function.
8077 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8078 aarch64_speculation_safe_value.
8079 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8080
8081 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8082
8083 * config/aarch64/aarch64-speculation.cc: New file.
8084 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8085 before pass_reorder_blocks.
8086 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8087 prototype.
8088 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8089 X14 and X15 when tracking speculation.
8090 * config/aarch64/aarch64.md (register name constants): Add
8091 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8092 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8093 (speculation_barrier): New insn attribute.
8094 (cmp<mode>): Allow SP in comparisons.
8095 (speculation_tracker): New insn.
8096 (speculation_barrier): Add speculation_barrier attribute.
8097 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8098 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8099 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8100
8101 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8102
8103 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8104 aarch64_track_speculation is true.
8105 (tb<optab><mode>1): Likewise.
8106 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8107 generate CB[N]Z when tracking speculation.
8108 (aarch64_split_compare_and_swap): Likewise.
8109 (aarch64_split_atomic_op): Likewise.
8110
8111 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8112
8113 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8114
8115 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8116
8117 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8118 (speculation_barrier): New insn.
8119
8120 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8121
8122 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8123 * config/arm/arm.md (speculation_barrier): New expand.
8124 (speculation_barrier_insn): New pattern.
8125
8126 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8127
8128 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8129 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8130 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8131 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8132 list.
8133 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8134 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8135 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8136 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8137 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8138 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8139 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8140 * builtins.c (expand_speculation_safe_value): New function.
8141 (expand_builtin): Call it.
8142 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8143 * doc/extend.texi: Document __builtin_speculation_safe_value.
8144 * doc/md.texi: Document "speculation_barrier" pattern.
8145 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8146 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8147 * doc/tm.texi: Regenerated.
8148 * target.def (have_speculation_safe_value, speculation_safe_value): New
8149 hooks.
8150 * targhooks.c (default_have_speculation_safe_value): New function.
8151 (default_speculation_safe_value): New function.
8152 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8153 (default_speculation_safe_value): Add prototype.
8154
8155 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8156
8157 * dump-context.h (dump_context::dump_loc): New decl.
8158 * dumpfile.c (dump_context::dump_loc): New member function.
8159 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8160 and dump_gimple_stmt.
8161 (dump_context::dump_gimple_expr_loc): Likewise, using
8162 dump_gimple_expr.
8163 (dump_context::dump_generic_expr_loc): Likewise, using
8164 dump_generic_expr.
8165 (dump_context::dump_printf_loc_va): Likewise, using
8166 dump_printf_va.
8167 (dump_context::begin_scope): Explicitly using the global function
8168 "dump_loc", rather than the member function.
8169
8170 2018-07-31 Martin Sebor <msebor@redhat.com>
8171
8172 PR tree-optimization/86741
8173 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8174
8175 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8176
8177 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8178 depend on whether prefetch instructions will be emitted or not.
8179 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8180 will be emitted or not.
8181 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8182 (TARGET_SETMEM_PFD): New macros.
8183
8184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8185
8186 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8187 (NULL_STMT_VEC_INFO): Delete.
8188 (stmt_vec_info::operator*): Likewise.
8189 (stmt_vec_info::operator gimple *): Likewise.
8190 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8191 of NULL_STMT_VEC_INFO.
8192 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8193 (vect_reassociating_reduction_p): Likewise.
8194 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8195 (vectorizable_store): Likewise.
8196 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8197 (vec_info::free_stmt_vec_infos): Likewise.
8198
8199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8200
8201 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8202 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8203
8204 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8205
8206 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8207 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8208 (vec_info::free_stmt_vec_info): New private member functions.
8209 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8210 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8211 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8212 set_stmt_vec_info_vec and free_stmt_vec_infos.
8213 * tree-vect-loop.c (_loop_vec_info): Remove call to
8214 set_stmt_vec_info_vec.
8215 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8216 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8217 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8218 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8219 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8220 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8221 with the clearing in the xcalloc.
8222 (stmt_vec_info_vec): Delete.
8223 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8224 (vectorize_loops): Likewise.
8225 (vec_info::~vec_info): Remove argument from call to
8226 free_stmt_vec_infos.
8227 (vec_info::add_stmt): Remove vinfo argument from call to
8228 new_stmt_vec_info.
8229
8230 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8231
8232 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8233 rather than a gimple stmt.
8234 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8235 information for pattern statements when passed the original
8236 statement; instead wait to be passed the pattern statement itself.
8237 Don't call set_vinfo_for_stmt here.
8238 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8239 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8240 stmt_vec_infos here.
8241 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8242 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8243 stmt_vec_infos entry.
8244
8245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8246
8247 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8248 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8249 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8250 * tree-vect-stmts.c (vectorizable_call): Likewise.
8251 (vectorizable_simd_clone_call): Likewise.
8252
8253 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8254
8255 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8256 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8257 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8258 * tree-vect-loop.c (vect_transform_loop): Likewise.
8259 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8260 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8261
8262 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8263
8264 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8265 (vect_dr_stmt): Delete.
8266 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8267 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8268 of DR_VECT_AUX.
8269 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8270 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8271 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8272 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8273 (vect_analyze_data_refs): Likewise.
8274 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8275 argument.
8276 (vect_find_same_alignment_drs): Likewise.
8277 (vect_slp_analyze_node_dependences): Update calls accordingly.
8278 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8279 instead of DR_VECT_AUX.
8280 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8281 of a vector data references. Use vec_info::lookup_dr instead of
8282 DR_VECT_AUX.
8283 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8284 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8285 instead of DR_VECT_AUX.
8286
8287 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8288
8289 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8290 dr_vec_info.
8291 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8292 accordingly.
8293 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8294 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8295 (vect_gen_prolog_loop_niters): Likewise.
8296
8297 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8298
8299 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8300 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8301 (vect_known_alignment_in_bytes, vect_dr_behavior)
8302 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8303 instead of data_references. Update calls to other routines for
8304 which the same change has been made.
8305 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8306 dr_vec_infos instead of stmt_vec_infos.
8307 (vect_analyze_data_ref_dependence): Update call accordingly.
8308 (vect_slp_analyze_data_ref_dependence)
8309 (vect_record_base_alignments): Use DR_VECT_AUX.
8310 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8311 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8312 (vector_alignment_reachable_p, vect_get_data_access_cost)
8313 (vect_peeling_supportable, vect_analyze_group_access_1)
8314 (vect_analyze_group_access, vect_analyze_data_ref_access)
8315 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8316 (vect_compile_time_alias, vect_small_gap_p)
8317 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8318 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8319 instead of data_references. Update calls to other routines for
8320 which the same change has been made.
8321 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8322 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8323 (vect_slp_analyze_and_verify_node_alignment)
8324 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8325 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8326 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8327 above changes.
8328 (_vect_peel_info::dr): Replace with...
8329 (_vect_peel_info::dr_info): ...this new field.
8330 (vect_peeling_hash_get_most_frequent)
8331 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8332 (vect_peeling_hash_get_lowest_cost):
8333 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8334 routines for which the same change has been made.
8335 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8336 data_reference.
8337 * tree-vect-loop-manip.c (get_misalign_in_elems)
8338 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8339 above changes.
8340 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8341 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8342 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8343 (get_group_load_store_type, get_negative_load_store_type)
8344 (vect_get_data_ptr_increment, vectorizable_store)
8345 (vectorizable_load): Likewise.
8346 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8347 Update calls to other routines for which the same change has been made.
8348
8349 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8350
8351 * tree-vectorizer.h (vec_info::move_dr): New member function.
8352 (dataref_aux): Rename to...
8353 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8354 (_stmt_vec_info::dr_aux): Update accordingly.
8355 (_stmt_vec_info::data_ref_info): Delete.
8356 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8357 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8358 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8359 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8360 of data_ref.
8361 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8362 (STMT_VINFO_DR_INFO): New macro.
8363 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8364 (set_dr_misalignment): Update after rename of dataref_aux.
8365 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8366 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8367 initialization of STMT_VINFO_DATA_REF.
8368 * tree-vectorizer.c (vec_info::move_dr): New function.
8369 * tree-vect-patterns.c (vect_recog_bool_pattern)
8370 (vect_recog_mask_conversion_pattern)
8371 (vect_recog_gather_scatter_pattern): Use it.
8372 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8373 the "dr" and "stmt" fields of dr_vec_info instead of
8374 STMT_VINFO_DATA_REF.
8375
8376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8377
8378 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8379 (is_pattern_stmt_p): Use it.
8380 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8381 on pattern statements.
8382
8383 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8384
8385 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8386 original stmt as a stmt_vec_info rather than a gimple stmt.
8387 (vect_pattern_recog_1): Take the statement directly as a
8388 stmt_vec_info, rather than via a gimple_stmt_iterator.
8389 Update call to vect_mark_pattern_stmts.
8390 (vect_pattern_recog): Update calls accordingly.
8391
8392 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8393
8394 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8395 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8396 a vect_def_type for the first argument.
8397 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8398 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8399 operand if it isn't defined by a vectorized statement.
8400 (vect_build_gather_load_calls): Remove the mask_dt argument and
8401 update calls to vect_get_vec_def_for_stmt_copy.
8402 (vectorizable_bswap): Likewise the dt argument.
8403 (vectorizable_call): Update calls to vectorizable_bswap and
8404 vect_get_vec_def_for_stmt_copy.
8405 (vectorizable_simd_clone_call, vectorizable_assignment)
8406 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8407 (vectorizable_comparison): Update calls to
8408 vect_get_vec_def_for_stmt_copy.
8409 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8410 vect_is_simple_use.
8411 (vect_get_loop_based_defs): Remove dt argument and update call
8412 to vect_get_vec_def_for_stmt_copy.
8413 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8414 and vect_get_vec_def_for_stmt_copy.
8415 (vectorizable_load): Update calls to vect_build_gather_load_calls
8416 and vect_get_vec_def_for_stmt_copy.
8417 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8418 (vectorizable_reduction, vectorizable_live_operation): Update calls
8419 to vect_get_vec_def_for_stmt_copy.
8420
8421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8422
8423 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8424 and gimple stmt arguments with a stmt_vec_info.
8425 (vect_record_base_alignments): Update calls accordingly.
8426 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8427 and gimple stmt arguments with a stmt_vec_info.
8428 (vect_build_slp_tree_1): Remove vinfo argument and update call
8429 to vect_record_max_nunits.
8430 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8431 and vect_record_max_nunits.
8432
8433 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8434
8435 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8436 file and take a stmt_vec_info instead of a gimple stmt.
8437 (supportable_widening_operation, vect_finish_replace_stmt)
8438 (vect_finish_stmt_generation, vect_get_store_rhs)
8439 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8440 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8441 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8442 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8443 (vect_create_data_ref_ptr, bump_vector_ptr)
8444 (vect_permute_store_chain, vect_setup_realignment)
8445 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8446 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8447 (vectorizable_reduction, vectorizable_induction)
8448 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8449 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8450 than gimple stmts as arguments.
8451 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8452 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8453 (can_group_stmts_p, vect_check_gather_scatter)
8454 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8455 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8456 (vect_permute_load_chain, vect_shift_permute_load_chain)
8457 (vect_transform_grouped_load)
8458 (vect_record_grouped_load_vectors): Likewise.
8459 * tree-vect-loop.c (vect_fixup_reduc_chain)
8460 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8461 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8462 (vectorizable_reduction, vectorizable_induction)
8463 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8464 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8465 (vect_get_load_store_mask): Likewise.
8466 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8467 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8468 * tree-vect-stmts.c (vect_mark_relevant)
8469 (is_simple_and_all_uses_invariant)
8470 (exist_non_indexing_operands_for_use_p, process_use)
8471 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8472 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8473 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8474 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8475 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8476 (get_negative_load_store_type, get_load_store_type)
8477 (vect_check_load_store_mask, vect_check_store_rhs)
8478 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8479 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8480 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8481 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8482 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8483 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8484 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8485 (supportable_widening_operation): Likewise.
8486
8487 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8488
8489 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8490 a stmt_vec_info instead of a gcall.
8491 (vect_check_gather_scatter): Update call accordingly.
8492 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8493 of a gphi.
8494 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8495 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8496 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8497 instead of a gimple stmt.
8498 (vect_transform_loop): Update calls accordingly.
8499 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8500 stmt_vec_infos instead of gimple stmts.
8501 (vect_analyze_slp_instance): Update use accordingly.
8502 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8503 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8504 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8505 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8506 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8507 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8508 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8509 down to subroutines.
8510
8511 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8512
8513 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8514 of the worklist from a vector of gimple stmts to a vector of
8515 stmt_vec_infos.
8516 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8517 (vect_mark_stmts_to_be_vectorized): Likewise
8518
8519 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8520
8521 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8522 statement before passing it to vect_analyze_stmt.
8523 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8524 the chain of phi vector definitions. Track the exit phi via its
8525 stmt_vec_info.
8526 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8527 STMT_VINFO_REDUC_DEF.
8528 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8529 stmt_vec_infos to handle the statement chains.
8530 (vect_get_slp_defs): Record the first statement in the node
8531 using a stmt_vec_info.
8532 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8533 statements here and pass their stmt_vec_info down to subroutines.
8534 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8535 down to vect_finish_stmt_generation.
8536 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8537 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8538 stmt_vec_infos to subroutines.
8539 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8540 chains.
8541
8542 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8543
8544 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8545 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8546 (vect_permute_store_chain, vect_setup_realignment)
8547 (vect_permute_load_chain, vect_shift_permute_load_chain)
8548 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8549 stmts internally, and when passing values to other vectorizer routines.
8550 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8551 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8552 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8553 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8554 (vectorizable_reduction, vectorizable_induction)
8555 (vectorizable_live_operation, vect_transform_loop_stmt)
8556 (vect_transform_loop): Likewise.
8557 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8558 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8559 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8560 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8561 (vect_slp_analyze_node_operations_1): Likewise.
8562 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8563 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8564 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8565 (vect_finish_stmt_generation_1, get_group_load_store_type)
8566 (get_load_store_type, vect_build_gather_load_calls)
8567 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8568 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8569 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8570 (vectorizable_store, vectorizable_load, vectorizable_condition)
8571 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8572 (supportable_widening_operation): Likewise.
8573 (vect_get_vector_types_for_stmt): Likewise.
8574 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8575
8576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8577
8578 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8579 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8580 (vect_permute_store_chain, vect_permute_load_chain)
8581 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8582 repeated stmt_vec_info lookups.
8583 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8584 (vect_update_ivs_after_vectorizer): Likewise.
8585 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8586 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8587 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8588 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8589 (vect_bb_slp_scalar_cost): Likewise.
8590 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8591
8592 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8593
8594 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8595 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8596 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8597 to get gassigns and gcalls, rather than operating on generc gimple
8598 stmts.
8599 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8600 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8601 (vectorizable_load, vect_analyze_stmt): Likewise.
8602 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8603
8604 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8605
8606 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8607 return stmt_vec_infos rather than gimple stmts. Do not accept
8608 null arguments.
8609 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8610 of a gimple stmt.
8611 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8612 Update use of get_later_stmt.
8613 (vect_get_constant_vectors): Update call accordingly.
8614 (vect_schedule_slp_instance): Likewise
8615 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8616 (vect_slp_analyze_instance_dependence): Likewise.
8617 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8618
8619 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8620
8621 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8622 (stmt_info_for_cost::stmt_info): ...this new field.
8623 (add_stmt_costs): Update accordingly.
8624 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8625 (vect_get_known_peeling_cost): Likewise.
8626 (vect_estimate_min_profitable_iters): Likewise.
8627 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8628
8629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8630
8631 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8632 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8633 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8634 accordingly.
8635 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8636
8637 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8638
8639 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8640 a gimple stmt to a stmt_vec_info.
8641 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8642
8643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8644
8645 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8646 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8647 (_loop_vec_info::reduction_chains): Likewise.
8648 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8649 accordingly.
8650 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8651
8652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8653
8654 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8655 a gimple stmt to a stmt_vec_info.
8656 (_stmt_vec_info::next_element): Likewise.
8657 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8658 (vect_slp_analyze_and_verify_node_alignment)
8659 (vect_analyze_group_access_1, vect_analyze_group_access)
8660 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8661 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8662 (vect_supportable_dr_alignment): Update accordingly.
8663 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8664 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8665 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8666 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8667 * tree-vect-slp.c (vect_build_slp_tree_1)
8668 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8669 (vect_split_slp_store_group, vect_analyze_slp_instance)
8670 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8671 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8672 (get_group_load_store_type, get_load_store_type)
8673 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8674 (vect_transform_stmt, vect_remove_stores): Likewise.
8675
8676 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8677
8678 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8679 than a gimple stmt.
8680 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8681 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8682 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8683 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8684 (vector_alignment_reachable_p, vect_get_data_access_cost)
8685 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8686 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8687 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8688 (vect_analyze_group_access_1, vect_analyze_group_access)
8689 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8690 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8691 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8692 result of vect_dr_stmt and use the stmt_vec_info instead of
8693 the associated gimple stmt.
8694 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8695 (vect_gen_prolog_loop_niters): Likewise.
8696 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8697
8698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8699
8700 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8701 to a vec<stmt_vec_info>.
8702 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8703 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8704 vec<stmt_vec_info>.
8705 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8706 to a vec<stmt_vec_info>.
8707 (bst_traits::value_type, bst_traits::value_type): Likewise.
8708 (bst_traits::hash): Update accordingly.
8709 (vect_get_and_check_slp_defs): Change the stmts parameter from
8710 a vec<gimple *> to a vec<stmt_vec_info>.
8711 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8712 (vect_build_slp_tree): Likewise.
8713 (vect_build_slp_tree_2): Likewise. Update uses of
8714 SLP_TREE_SCALAR_STMTS.
8715 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8716 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8717 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8718 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8719 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8720 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8721 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8722 (vect_get_constant_vectors, vect_get_slp_defs)
8723 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8724 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8725 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8726 instead of gimple stmts.
8727 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8728 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8729 (vect_slp_analyze_instance_dependence): Update uses of
8730 SLP_TREE_SCALAR_STMTS.
8731 (vect_slp_analyze_and_verify_node_alignment): Likewise.
8732 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8733 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8734 (get_initial_defs_for_reduction): Likewise.
8735 (vect_create_epilog_for_reduction): Likewise.
8736 (vectorize_fold_left_reduction): Likewise.
8737 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8738 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8739 (can_vectorize_live_stmts): Likewise.
8740
8741 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8742
8743 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8744 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8745 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8746 than gimple stmts.
8747 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8748 of a gimple stmt.
8749 (gather_scalar_reductions): Update after above interface changes.
8750 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8751 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8752 than gimple stmts.
8753 (vect_force_simple_reduction): Likewise.
8754 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8755 LOOP_VINFO_REDUCTIONS.
8756 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8757
8758 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8759
8760 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8761 a gimple stmt to a stmt_vec_info.
8762 * tree-vect-loop.c (vect_active_double_reduction_p)
8763 (vect_force_simple_reduction, vectorizable_reduction): Update
8764 accordingly.
8765
8766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8767
8768 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8769 vec<gimple *> to a vec<stmt_vec_info>.
8770 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8771 the reduction_phis argument from a vec<gimple *> to a
8772 vec<stmt_vec_info>.
8773 (vectorizable_reduction): Likewise the phis local variable that
8774 is passed to vect_create_epilog_for_reduction. Update for new type
8775 of SLP_TREE_VEC_STMTS.
8776 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8777 (vectorizable_live_operation): Likewise.
8778 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8779 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8780
8781 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8782
8783 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
8784 a gimple stmt to a stmt_vec_info.
8785 (vectorizable_condition, vectorizable_live_operation)
8786 (vectorizable_reduction, vectorizable_induction): Pass back the
8787 vectorized statement as a stmt_vec_info.
8788 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
8789 use of STMT_VINFO_VEC_STMT.
8790 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
8791 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
8792 as stmt_vec_infos rather than gimple stmts.
8793 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
8794 to a stmt_vec_info.
8795 (vectorizable_live_operation): Likewise.
8796 (vectorizable_reduction, vectorizable_induction): Likewise,
8797 updating use of STMT_VINFO_VEC_STMT.
8798 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
8799 of STMT_VINFO_VEC_STMT.
8800 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
8801 (vectorizable_simd_clone_call, vectorizable_conversion)
8802 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8803 (vectorizable_store, vectorizable_load, vectorizable_condition)
8804 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
8805 from a gimple stmt to a stmt_vec_info.
8806 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
8807 pointer to a stmt_vec_info to the vectorizable_* routines.
8808
8809 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8810
8811 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
8812 a gimple stmt to a stmt_vec_info.
8813 (is_pattern_stmt_p): Update accordingly.
8814 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
8815 (vect_record_grouped_load_vectors): Likewise.
8816 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8817 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
8818 (vect_model_reduction_cost): Likewise.
8819 (vect_create_epilog_for_reduction): Likewise.
8820 (vectorizable_reduction, vectorizable_induction): Likewise.
8821 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8822 Return the stmt_vec_info for the pattern statement.
8823 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
8824 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
8825 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8826 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
8827 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8828 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
8829 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
8830 (free_stmt_vec_info, vect_is_simple_use): Likewise.
8831
8832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8833
8834 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
8835 (vect_finish_stmt_generation): Likewise.
8836 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8837 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
8838 (vect_build_gather_load_calls): Use the return value of the above
8839 functions instead of a separate call to vinfo_for_stmt. Use narrow
8840 scopes for the input gimple stmt and wider scopes for the associated
8841 stmt_vec_info. Use vec_info::lookup_def when setting these
8842 stmt_vec_infos from an SSA_NAME definition.
8843 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8844 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8845 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8846 (vectorizable_store, vectorizable_load, vectorizable_condition)
8847 (vectorizable_comparison): Likewise.
8848 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
8849 (vectorizable_reduction): Likewise.
8850
8851 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8852
8853 * tree-vectorizer.h (vect_is_simple_use): Add an optional
8854 stmt_vec_info * parameter before the optional gimple **.
8855 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8856 (process_use, vect_get_vec_def_for_operand_1): Update callers.
8857 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
8858 * tree-vect-loop.c (vectorizable_reduction): Likewise.
8859 (vectorizable_live_operation): Likewise.
8860 * tree-vect-patterns.c (type_conversion_p): Likewise.
8861 (vect_look_through_possible_promotion): Likewise.
8862 (vect_recog_rotate_pattern): Likewise.
8863 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8864
8865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8866
8867 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
8868 a typedef to a wrapper class.
8869 (NULL_STMT_VEC_INFO): New macro.
8870 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
8871 (stmt_vec_info::operator*): New function.
8872 (stmt_vec_info::operator gimple *): Likewise.
8873 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
8874 (add_stmt_costs): Likewise.
8875 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
8876 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8877 (vect_get_known_peeling_cost): Likewise.
8878 (vect_estimate_min_profitable_iters): Likewise.
8879 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8880 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
8881 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8882 (vectorizable_store, free_stmt_vec_infos): Likewise.
8883 (new_stmt_vec_info): Change return type of xcalloc to
8884 _stmt_vec_info *.
8885
8886 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8887
8888 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
8889 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
8890 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
8891 a single_imm_use-based sequence.
8892 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
8893
8894 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8895
8896 * tree-vectorizer.h (vec_info::lookup_def): Declare.
8897 * tree-vectorizer.c (vec_info::lookup_def): New function.
8898 * tree-vect-patterns.c (vect_get_internal_def): Use it.
8899 (vect_widened_op_tree): Likewise.
8900 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8901 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8902 (vectorizable_reduction): Likewise.
8903 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8904 of a gimple *.
8905 (vect_is_slp_reduction): Update calls accordingly. Use
8906 vec_info::lookup_def.
8907 (vect_is_simple_reduction): Likewise
8908 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8909
8910 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8911
8912 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8913 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8914 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8915 of vinfo_for_stmt.
8916 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8917 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8918 (vect_update_vf_for_slp, vect_analyze_loop_operations)
8919 (vect_is_slp_reduction, vectorizable_induction)
8920 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8921 * tree-vect-patterns.c (vect_init_pattern_stmt):
8922 (vect_determine_min_output_precision_1, vect_determine_precisions)
8923 (vect_pattern_recog): Likewise.
8924 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8925 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8926 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8927 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8928 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8929 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
8930 info field from a loop to a loop_vec_info.
8931
8932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8933
8934 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8935 (vec_info::add_stmt): Declare.
8936 * tree-vectorizer.c (vec_info::add_stmt): New function.
8937 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8938 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8939 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8940 (vectorizable_induction): Likewise.
8941 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8942 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8943 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8944 (vectorizable_load): Likewise.
8945 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8946 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8947 (vect_recog_gather_scatter_pattern): Likewise.
8948 (append_pattern_def_seq): Likewise. Remove a check that is
8949 performed by add_stmt itself.
8950
8951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8952
8953 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8954 which make_ssa_name was called with new_stmt before new_stmt
8955 had been created.
8956
8957 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8958
8959 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8960 split out from...
8961 (vect_is_slp_reduction): ...here...
8962 (vect_is_simple_reduction): ...and here. Remove repetition of tests
8963 that are already known to be false.
8964
8965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8966
8967 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8968 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
8969 STMT_VINFO_NUM_SLP_USES when it's true.
8970 (vect_free_slp_instance): Add a final_p parameter and pass it to
8971 vect_free_slp_tree.
8972 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8973 (vect_analyze_slp_instance): Likewise.
8974 (vect_slp_analyze_operations): Likewise.
8975 (vect_slp_analyze_bb_1): Likewise.
8976 * tree-vectorizer.c (vec_info): Likewise.
8977 * tree-vect-loop.c (vect_transform_loop): Likewise.
8978
8979 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8980
8981 * tree-vect-loop.c (vectorizable_reduction): Assert that the
8982 function is not called for second and subsequent members of
8983 a reduction group.
8984
8985 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8986
8987 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8988 cases for nested loops from here to ...
8989 (vect_create_epilog_for_reduction): ...here. Only call
8990 vect_is_simple_use for inner-loop reductions.
8991
8992 2018-07-31 Martin Liska <mliska@suse.cz>
8993
8994 PR gcov-profile/85338
8995 PR gcov-profile/85350
8996 PR gcov-profile/85372
8997 * profile.c (struct location_triplet): New.
8998 (struct location_triplet_hash): Likewise.
8999 (output_location): Do not output a BB that
9000 is already recorded for a line.
9001 (branch_prob): Use streamed_locations.
9002
9003 2018-07-31 Martin Liska <mliska@suse.cz>
9004
9005 PR gcov-profile/85370
9006 * coverage.c (coverage_begin_function): Do not mark target
9007 clones as artificial functions.
9008
9009 2018-07-31 Martin Liska <mliska@suse.cz>
9010
9011 PR gcov-profile/83813
9012 PR gcov-profile/84758
9013 PR gcov-profile/85217
9014 PR gcov-profile/85332
9015 * profile.c (branch_prob): Do not record GOTO expressions
9016 for GIMPLE statements which locations are already streamed.
9017
9018 2018-07-31 Olivier Hainque <hainque@adacore.com>
9019
9020 * gcc.c (handle_spec_function): Accept a soft_matched_part
9021 argument, as do_spec_1. Pass it down to ...
9022 (eval_spec_function): Accept a soft_matched_part argument,
9023 and pass it down to ...
9024 (do_spec_2): Accept a soft_matched_part argument, and pass
9025 it down to do_spec_1.
9026 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9027 (handle_braces): Update call to handle_spec_function.
9028 (driver::set_up_specs): Update calls to do_spec_2.
9029 (compare_debug_dump_opt_spec_function): Likewise.
9030 (compare_debug_self_opt_spec_function): Likewise.
9031
9032 2018-07-31 Olivier Hainque <hainque@adacore.com>
9033
9034 * common.opt (nolibc): New option.
9035 * doc/invoke.texi (Link Options): Document it.
9036 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9037 * config/alpha/linux.h: Likewise.
9038 * config/arc/elf.h: Likewise.
9039 * config/arm/uclinux-elf.h: Likewise.
9040 * config/arm/unknown-elf.h: Likewise.
9041 * config/avr/avrlibc.h: Likewise.
9042 * config/bfin/bfin.h: Likewise.
9043 * config/bfin/linux.h: Likewise.
9044 * config/bfin/uclinux.h: Likewise.
9045 * config/darwin.h: Likewise.
9046 * config/darwin10.h: Likewise.
9047 * config/darwin12.h: Likewise.
9048 * config/gnu-user.h: Likewise.
9049 * config/lm32/uclinux-elf.h: Likewise.
9050 * config/pa/pa-hpux11.h: Likewise.
9051 * config/pa/pa64-hpux.h: Likewise.
9052 * config/sparc/sparc.h: Likewise.
9053
9054 2018-07-31 Olivier Hainque <hainque@adacore.com>
9055
9056 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9057 undefined variables.
9058
9059 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9060
9061 PR target/86640
9062 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9063 instead of GEN_INT.
9064
9065 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9066
9067 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9068 terminated string literal.
9069
9070 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9071
9072 PR rtl-optimization/85160
9073 * combine.c (is_just_move): New function.
9074 (try_combine): Allow combining two instructions into two if neither of
9075 the original instructions was a move.
9076
9077 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9078
9079 PR target/86673
9080 * doc/extend.texi (Global Register Variables): Discourage use of type
9081 qualifiers.
9082 (Local Register Variables): Likewise.
9083
9084 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9085
9086 PR tree-optimization/86506
9087 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9088
9089 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9090
9091 PR target/86547
9092 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9093 hard_regno, make sure no insn between `from` and `to` clobbers it.
9094
9095 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9096 Tom de Vries <tdevries@suse.de>
9097
9098 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9099 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9100 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9101 PTX_DEFAULT_RUNTIME_DIM.
9102 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9103
9104 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9105
9106 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9107 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9108 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9109
9110 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9111
9112 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9113 used.
9114 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9115 predicate to reflect toc fusion has been deleted.
9116 (toc_fusion_mem_raw): Delete, no longer used.
9117 (toc_fusion_mem_wrapped): Likewise.
9118 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9119 fusion mask bit.
9120 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9121 Delete, no longer used.
9122 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9123 meant to be used for toc fusion.
9124 (rs6000_debug_print_mode): Delete toc fusion debugging.
9125 (rs6000_debug_reg_global): Likewise.
9126 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9127 fusion and secondary reload support that were never used.
9128 (rs6000_option_override_internal): Delete TOC fusion, that was only
9129 partially defined, and it did not work unless you also used the
9130 -mcmodel= switch.
9131 (rs6000_legitimate_address_p): Delete TOC fusion support.
9132 (rs6000_opt_masks): Likewise.
9133 (fusion_wrap_memory_address): Delete function, no longer used.
9134 (fusion_split_address); Delete TOC fusion support.
9135 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9136 longer used with toc fusion being deleted.
9137 (TARGET_TOC_FUSION_FP): Likewise.
9138 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9139 UNSPEC.
9140 (toc fusion spliter): Delete TOC fusion support.
9141 (toc_fusionload_<mode>): Likewise.
9142 (toc_fusionload_di): Likewise.
9143 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9144 longer needs to be named. Rename predicate to delete TOC fusion.
9145 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9146 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9147 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9148 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9149 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9150
9151 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9152
9153 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9154 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9155 __int128 in built-in function prototypes.
9156 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9157 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9158
9159 2018-07-27 Martin Sebor <msebor@redhat.com>
9160
9161 PR tree-optimization/86696
9162 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9163 types, including enums.
9164 (handle_char_store): Be prepared for the above function to fail.
9165
9166 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9167
9168 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9169 when optimization level is lower than 2 or optimize for size.
9170
9171 2018-07-26 Martin Sebor <msebor@redhat.com>
9172
9173 PR tree-optimization/86043
9174 PR tree-optimization/86042
9175 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9176 (get_string_cst_length): Rename...
9177 (get_min_string_length): ...to this. Add argument.
9178 (handle_char_store): Extend to handle multi-character stores by
9179 MEM_REF.
9180 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9181 * tree.h (initializer_zerop): Add argument.
9182
9183 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9184
9185 PR middle-end/86660
9186 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9187 declare target to variables if they have always,{to,from,tofrom} map
9188 kinds.
9189
9190 2018-07-26 Martin Liska <mliska@suse.cz>
9191
9192 PR lto/86548
9193 * lto-wrapper.c: Add linker_output as prefix
9194 for ltrans_output_file.
9195
9196 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9197
9198 PR rtl-optimization/85805
9199 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9200 value for hard registers if that was written in the same mode.
9201
9202 2018-07-26 Martin Liska <mliska@suse.cz>
9203
9204 PR gcov-profile/86536
9205 * gcov.c (format_gcov): Use printf format %.*f directly
9206 and do not handle special values.
9207
9208 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9209
9210 * common/config/arc/arc-common.c (arc_option_optimization_table):
9211 Update default optimizations for size.
9212
9213 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9214
9215 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9216 * config/arc/constraints.md (CfZ): New constraint.
9217 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9218 (subsf3_fpu): Likewise.
9219 (cmpsf_fpu): Likewise.
9220 (cmpsf_fpu_uneq): Likewise.
9221
9222 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9223
9224 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9225 accesses as well.
9226 (arc_is_uncached_mem_p): uncached applies to both the variable and
9227 the pointer.
9228
9229 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9230
9231 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9232 register names.
9233
9234 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9235
9236 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9237 field "m_scopes" from vec to auto_vec.
9238
9239 2018-07-25 Martin Liska <mliska@suse.cz>
9240
9241 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9242 return type.
9243
9244 2018-07-25 Richard Biener <rguenther@suse.de>
9245
9246 PR debug/86654
9247 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9248 special wrt context_die late.
9249 (gen_subprogram_die): Re-use DIEs in local scope.
9250
9251 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9252
9253 PR tree-optimization/86644
9254 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9255
9256 2018-07-25 Martin Liska <mliska@suse.cz>
9257
9258 PR middle-end/86645
9259 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9260 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9261
9262 2018-07-25 Martin Liska <mliska@suse.cz>
9263
9264 PR sanitizer/79635
9265 * params.def: Explain ASan abbreviation and provide
9266 a documentation link.
9267
9268 2018-07-24 Martin Sebor <msebor@redhat.com>
9269
9270 PR tree-optimization/86622
9271 PR tree-optimization/86532
9272 * builtins.h (string_length): Declare.
9273 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9274 (check_access): Be prepared for non-constant length ranges.
9275 (string_length): Make extern.
9276 * expr.c (string_constant): Only handle the minor non-constant
9277 array index. Use string_constant to compute the length of
9278 a generic string constant.
9279
9280 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9281
9282 PR tree-optimization/86618
9283 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9284 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9285
9286 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9287
9288 PR tree-optimization/86636
9289 * json.cc (json::object::set): Fix comment. Add assertions.
9290 (json::array::append): Move here from json.h. Add comment and an
9291 assertion.
9292 (json::string::string): Likewise.
9293 * json.h (json::array::append): Move to json.cc.
9294 (json::string::string): Likewise.
9295 * optinfo-emit-json.cc
9296 (optrecord_json_writer::impl_location_to_json): Assert that we
9297 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9298 wrapper around it. Expand the location once, rather than three
9299 times.
9300 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9301 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9302 wrappers.
9303 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9304 places. Fix some overlong lines.
9305
9306 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9307
9308 * config/aarch64/aarch64-simd.md
9309 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9310 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9311 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9312 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9313 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9314 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9315 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9316 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9317 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9318
9319 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9320
9321 PR middle-end/86627
9322 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9323 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9324 and abs_d == d, do the power of two handling if profitable.
9325
9326 2018-07-24 Richard Biener <rguenther@suse.de>
9327
9328 * match.pd: Add BIT_FIELD_REF canonicalizations.
9329
9330 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9331
9332 PR c/86617
9333 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9334
9335 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9336
9337 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9338 terminated STRING_CST object.
9339
9340 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9341
9342 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9343
9344 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9345
9346 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9347 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9348 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9349 the elements into a register.
9350 (rs6000_split_v4si_init_di_reg): Delete.
9351 (rs6000_split_v4si_init): Delete.
9352 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9353 (vsx_init_v4si): Rewrite as a define_expand.
9354
9355 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9356
9357 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9358 zero_extend argument from memory): New.
9359
9360 2018-07-22 Martin Sebor <msebor@redhat.com>
9361
9362 PR bootstrap/86621
9363 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9364 diagnosing calls with unknown arguments unless -Walloca-larger-than
9365 is restricted to less than PTRDIFF_MAX bytes.
9366
9367 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9368
9369 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9370
9371 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9372
9373 * pretty-print.c (text_info::set_location): Remove redundant
9374 "line_table" parameter from call to rich_location::set_range.
9375
9376 2018-07-20 Martin Sebor <msebor@redhat.com>
9377
9378 PR middle-end/82063
9379 * builtins.c (expand_builtin_alloca): Adjust.
9380 * calls.c (alloc_max_size): Simplify.
9381 * cgraphunit.c (cgraph_node::expand): Adjust.
9382 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9383 variables.
9384 (frame_larger_than_size): Same.
9385 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9386 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9387 Initialize.
9388 * doc/invoke.texi (GCC Command Options): Document option arguments.
9389 Explain byte-size arguments and suffixes.
9390 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9391 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9392 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9393 * doc/options.texi (UInteger): Expand.
9394 (Host_Wide_Int, ByteSize): Document new properties.
9395 * final.c (final_start_function_1): Include sizes in an error message.
9396 * function.c (frame_offset_overflow): Same.
9397 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9398 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9399 Diagnose unbounded alloca calls only for limits of less than
9400 PTRDIFF_MAX.
9401 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9402 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9403 for alloca(0).
9404 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9405 only for limits of less than PTRDIFF_MAX.
9406 * langhooks-def.h (lhd_handle_option): Change function argument
9407 to HOST_WIDE_INT.
9408 * langhooks.c (lhd_handle_option): Same.
9409 * langhooks.h (handle_option): Same.
9410 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9411 ByteSize flags.
9412 (var_type, var_type_struct): Same.
9413 (var_set): Handle ByteSize flag.
9414 * optc-gen.awk: Add comments to output to ease debugging. Make
9415 use of HOST_WIDE_INT where appropriate.
9416 * opts-gen-save.awk: Use %lx to format unsigned long.
9417 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9418 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9419 arguments. Parse bytes-size suffixes.
9420 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9421 (enum_value_to_arg): Same.
9422 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9423 (handle_option): Adjust.
9424 (generate_option): Change function argument to HOST_WIDE_INT.
9425 (cmdline_handle_error): Adjust.
9426 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9427 (set_option): Change function argument to HOST_WIDE_INT.
9428 (option_enabled): Handle cl_host_wide_int.
9429 (get_option_state): Handle CLVC_SIZE.
9430 (control_warning_option): Same.
9431 * opts.c (common_handle_option): Change function argument to
9432 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9433 OPT_Wvla_larger_than_.
9434 * opts.h (enum cl_var_type): Add an enumerator.
9435 * stor-layout.c (layout_decl): Print a more meaningful warning.
9436 * toplev.c (output_stack_usage): Adjust.
9437
9438 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9439
9440 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9441 call to inline_expand_builtin_string_cmp.
9442 (expand_builtin_strcmp): Likewise.
9443 (expand_builtin_strncmp): Likewise.
9444 (inline_string_cmp): Delete the last parameter, change char_type_node
9445 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9446 two operands.
9447 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9448 the inlining expansion on target where the type of the call has same or
9449 narrower precision than unsigned char.
9450
9451 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9452
9453 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9454 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9455 * common.opt (fsave-optimization-record): New option.
9456 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9457 * doc/invoke.texi (-fsave-optimization-record): New option.
9458 * dumpfile.c: Include "optinfo-emit-json.h".
9459 (struct kv_pair): Move to coretypes.h.
9460 (optgroup_options): Make non-static.
9461 (dump_context::end_scope): Call
9462 optimization_records_maybe_pop_dump_scope.
9463 * dumpfile.h (optgroup_options): New decl.
9464 * json.cc: New file.
9465 * json.h: New file.
9466 * optinfo-emit-json.cc: New file.
9467 * optinfo-emit-json.h: New file.
9468 * optinfo.cc: Include "optinfo-emit-json.h".
9469 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9470 (optinfo_enabled_p): Check optimization_records_enabled_p.
9471 (optinfo_wants_inlining_info_p): Likewise.
9472 * optinfo.h: Update comment.
9473 * profile-count.c (profile_quality_as_string): New function.
9474 * profile-count.h (profile_quality_as_string): New decl.
9475 (profile_count::quality): New accessor.
9476 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9477 and optinfo_emit_json_cc_tests.
9478 * selftest.h (selftest::json_cc_tests): New decl.
9479 (selftest::optinfo_emit_json_cc_tests): New decl.
9480 * toplev.c: Include "optinfo-emit-json.h".
9481 (compile_file): Call optimization_records_finish.
9482 (do_compile): Call optimization_records_start.
9483 * tree-ssa-live.c: Include optinfo.h.
9484 (remove_unused_scope_block_p): Retain inlining information if
9485 optinfo_wants_inlining_info_p returns true.
9486
9487 2018-07-20 Richard Biener <rguenther@suse.de>
9488
9489 PR debug/86585
9490 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9491 to cover -flto-partition=none.
9492
9493 2018-07-20 Martin Liska <mliska@suse.cz>
9494
9495 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9496 (get_decl_source_range): Remove unused function.
9497
9498 2018-07-20 Richard Biener <rguenther@suse.de>
9499
9500 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9501 (struct vn_phi_s): Likewise.
9502 (struct vn_reference_s): Likewise.
9503 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9504 for searching the slot of an entry known to be in the hash itself.
9505 (vn_phi_hasher::equal): Likewise.
9506 (vn_reference_hasher::equal): Likewise.
9507 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9508 globals.
9509 (optimistic_info, current_info): Remove, keeping only valid_info.
9510 (vn_reference_lookup_1): Remove fallback lookup.
9511 (vn_reference_lookup_2): Likewise.
9512 (vn_nary_op_lookup_1): Likewise.
9513 (vn_phi_lookup): Likewise.
9514 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9515 hash element.
9516 (vn_reference_insert): Adjust, chain the inserted hash element
9517 at last_inserted_ref.
9518 (vn_reference_insert_pieces): Likewise.
9519 (visit_reference_op_call): Likewise.
9520 (vn_nary_op_insert_into): Chain the inserted hash element at
9521 last_inserted_nary.
9522 (vn_nary_op_insert_pieces): Adjust.
9523 (vn_nary_op_insert): Likewise.
9524 (vn_nary_op_insert_stmt): Likewise.
9525 (vn_phi_insert): Adjust, chain the inserted hash element at
9526 last_inserted_phi.
9527 (process_scc): Remove clearing and copying the optimistic
9528 table. Instead remove elements inserted during an optimistic
9529 iteration from the single table we maintain.
9530 (init_scc_vn): Adjust.
9531 (free_scc_vn): Likewise.
9532 (sccvn_dom_walker::record_cond): Likewise.
9533 (sccvn_dom_walker::after_dom_children): Likewise.
9534
9535 2018-07-19 Martin Sebor <msebor@redhat.com>
9536
9537 PR tree-optimization/84047
9538 PR tree-optimization/83776
9539 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9540 (check_array_bounds): Call it.
9541
9542 2018-07-19 Martin Sebor <msebor@redhat.com>
9543
9544 * align.h (align_flags): Use member initialization.
9545
9546 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9547
9548 * Makefile.in (OBJS): Add optinfo.o.
9549 * coretypes.h (class symtab_node): New forward decl.
9550 (struct cgraph_node): New forward decl.
9551 (class varpool_node): New forward decl.
9552 * dump-context.h: New file.
9553 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9554 "tree-pass.h".
9555 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9556 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9557 (set_alt_dump_file): Likewise.
9558 (dump_context::~dump_context): New dtor.
9559 (dump_gimple_stmt): Move implementation to...
9560 (dump_context::dump_gimple_stmt): ...this new member function.
9561 Add the stmt to any pending optinfo, creating one if need be.
9562 (dump_gimple_stmt_loc): Move implementation to...
9563 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9564 Start a new optinfo and add the stmt to it.
9565 (dump_gimple_expr): Move implementation to...
9566 (dump_context::dump_gimple_expr): ...this new member function.
9567 Add the stmt to any pending optinfo, creating one if need be.
9568 (dump_gimple_expr_loc): Move implementation to...
9569 (dump_context::dump_gimple_expr_loc): ...this new member function.
9570 Start a new optinfo and add the stmt to it.
9571 (dump_generic_expr): Move implementation to...
9572 (dump_context::dump_generic_expr): ...this new member function.
9573 Add the tree to any pending optinfo, creating one if need be.
9574 (dump_generic_expr_loc): Move implementation to...
9575 (dump_context::dump_generic_expr_loc): ...this new member
9576 function. Add the tree to any pending optinfo, creating one if
9577 need be.
9578 (dump_printf): Move implementation to...
9579 (dump_context::dump_printf_va): ...this new member function. Add
9580 the text to any pending optinfo, creating one if need be.
9581 (dump_printf_loc): Move implementation to...
9582 (dump_context::dump_printf_loc_va): ...this new member function.
9583 Start a new optinfo and add the stmt to it.
9584 (dump_dec): Move implementation to...
9585 (dump_context::dump_dec): ...this new member function. Add the
9586 value to any pending optinfo, creating one if need be.
9587 (dump_context::dump_symtab_node): New member function.
9588 (dump_context::get_scope_depth): New member function.
9589 (dump_context::begin_scope): New member function.
9590 (dump_context::end_scope): New member function.
9591 (dump_context::ensure_pending_optinfo): New member function.
9592 (dump_context::begin_next_optinfo): New member function.
9593 (dump_context::end_any_optinfo): New member function.
9594 (dump_context::s_current): New global.
9595 (dump_context::s_default): New global.
9596 (dump_scope_depth): Delete global.
9597 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9598 (dump_symtab_node): New function.
9599 (get_dump_scope_depth): Reimplement in terms of dump_context.
9600 (dump_begin_scope): Likewise.
9601 (dump_end_scope): Likewise.
9602 (selftest::temp_dump_context::temp_dump_context): New ctor.
9603 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9604 (selftest::verify_item): New function.
9605 (ASSERT_IS_TEXT): New macro.
9606 (ASSERT_IS_TREE): New macro.
9607 (ASSERT_IS_GIMPLE): New macro.
9608 (selftest::test_capture_of_dump_calls): New test.
9609 (selftest::dumpfile_c_tests): Call it.
9610 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9611 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9612 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9613 descriptive comment.
9614 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9615 (dump_node, dump_bb): Move these unrelated decls.
9616 (class dump_manager): Add leading comment.
9617 * optinfo.cc: New file.
9618 * optinfo.h: New file.
9619
9620 2018-07-19 Michael Collison <michael.collison@arm.com>
9621 Richard Henderson <rth@redhat.com>
9622
9623 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9624 (subti): Handle op1 zero.
9625 (subvti4, usub4ti4): New.
9626 (*sub<GPI>3_compare1_imm): New.
9627 (sub<GPI>3_carryinCV): New.
9628 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9629 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9630
9631 2018-07-19 Michael Collison <michael.collison@arm.com>
9632 Richard Henderson <rth@redhat.com>
9633
9634 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9635 (addti3): Create simpler code if low part is already known to be 0.
9636 (addvti4, uaddvti4): New.
9637 (*add<GPI>3_compareC_cconly_imm): New.
9638 (*add<GPI>3_compareC_cconly): New.
9639 (*add<GPI>3_compareC_imm): New.
9640 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9641 handle constants within this pattern..
9642 (*add<GPI>3_compareV_cconly_imm): New.
9643 (*add<GPI>3_compareV_cconly): New.
9644 (*add<GPI>3_compareV_imm): New.
9645 (add<GPI>3_compareV): New.
9646 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9647 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9648 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9649 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9650 with 'comparison' operator.
9651 (*add<GPI>3_compareV_cconly_imm): Ditto.
9652 (*add<GPI>3_compareV_cconly): Ditto.
9653 (*add<GPI>3_compareV_imm): Ditto.
9654 (add<GPI>3_compareV): Ditto.
9655 (add<mode>3_carryinC): Ditto.
9656 (*add<mode>3_carryinC_zero): Ditto.
9657 (*add<mode>3_carryinC): Ditto.
9658 (add<mode>3_carryinV): Ditto.
9659 (*add<mode>3_carryinV_zero): Ditto.
9660 (*add<mode>3_carryinV): Ditto.
9661
9662 2018-07-19 Michael Collison <michael.collison@arm.com>
9663 Richard Henderson <rth@redhat.com>
9664
9665 * config/aarch64/aarch64-modes.def (CC_V): New.
9666 * config/aarch64/aarch64-protos.h
9667 (aarch64_addti_scratch_regs): Declare
9668 (aarch64_subvti_scratch_regs): Declare.
9669 (aarch64_expand_subvti): Declare.
9670 (aarch64_gen_unlikely_cbranch): Declare
9671 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9672 for signed overflow using CC_Vmode.
9673 (aarch64_get_condition_code_1): Handle CC_Vmode.
9674 (aarch64_gen_unlikely_cbranch): New function.
9675 (aarch64_addti_scratch_regs): New function.
9676 (aarch64_subvti_scratch_regs): New function.
9677 (aarch64_expand_subvti): New function.
9678
9679 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9680
9681 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9682 extension.
9683 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9684 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9685 extension.
9686
9687 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9688
9689 PR target/83009
9690 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9691 address check not strict.
9692
9693 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9694
9695 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9696 Umq with Umn.
9697 (store_pair_lanes<mode>): Likewise.
9698 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9699 enum value 'ADDR_QUERY_LDP_STP_N'.
9700 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9701 (aarch64_print_address_internal): Add declaration.
9702 (aarch64_print_ldpstp_address): Remove.
9703 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9704 (aarch64_print_operand): Change printing of 'y'.
9705 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9706 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9707 'true' rather than '1'.
9708 * config/aarch64/constraints.md (Uml): Likewise.
9709 (Uml): Rename to Umn.
9710 (Umq): Remove.
9711
9712 2018-07-19 Richard Biener <rguenther@suse.de>
9713
9714 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9715 a trailing array.
9716 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9717 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9718 (vn_reference_hasher): Likewise.
9719 (struct vn_tables_s): Remove obstack and alloc-pool members.
9720 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9721 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9722 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9723 (vn_reference_insert_pieces): Likewise.
9724 (alloc_vn_nary_op_noinit): Adjust.
9725 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9726 (vn_phi_eq): Adjust.
9727 (shared_lookup_phiargs): Remove.
9728 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9729 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9730 (visit_reference_op_call): Likewise.
9731 (copy_nary, copy_phi, copy_reference): Remove.
9732 (process_scc): Rewind the obstack when iterating. Do not
9733 copy the elements to valid_info but just move them from one
9734 hashtable to the other.
9735 (allocate_vn_table): Adjust.
9736 (free_vn_table): Likewise.
9737 (init_scc_vn): Likewise.
9738 (free_scc_vn): Likewise.
9739
9740 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
9741
9742 PR target/86560
9743 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9744 indirect_return as function type attribute.
9745 (ix86_attribute_table): Change indirect_return to function
9746 type attribute.
9747 * doc/extend.texi: Update indirect_return attribute.
9748
9749 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
9750
9751 * wide-int.h (widest2_int): New.
9752 * gimple-fold.c (arith_overflowed_p): Use it.
9753 * tree.h (widest2_int_cst): New.
9754 * tree-vrp.c (wide_int_binop_overflow): Rename from
9755 vrp_int_const_binop.
9756 Rewrite to work on trees.
9757 (extract_range_from_multiplicative_op_1): Abstract code to...
9758 (wide_int_range_min_max): ...here.
9759 (wide_int_range_cross_product): ...and here.
9760 (extract_range_from_binary_expr_1): Abstract overflow code to...
9761 (wide_int_range_mult_wrapping): ...here.
9762 * tree-vrp.h (wide_int_range_cross_product): New.
9763 (wide_int_range_mult_wrapping): New.
9764
9765 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
9766 Julia Koval <julia.koval@intel.com>
9767
9768 * config/i386/x86-tune-costs.h (skylake_memcpy,
9769 skylake_memset): Replace rep_prefix with unrolling for size 512.
9770
9771 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
9772
9773 PR middle-end/86544
9774 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9775 comparision with EQ_EXPR in last stmt.
9776
9777 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
9778
9779 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9780 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9781 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9782 previously known as "PowerPC AltiVec Built-in Functions". Move
9783 some material to new subsubsections "PowerPC AltiVec Built-in
9784 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
9785 ISA 2.07".
9786 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
9787 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
9788 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
9789 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
9790
9791 2018-07-18 Richard Biener <rguenther@suse.de>
9792
9793 PR tree-optimization/86557
9794 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
9795 EXACT_DIV_EXPR.
9796
9797 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
9798
9799 * config/s390/s390.c (s390_function_profiler): Generate CFI.
9800
9801 2018-07-17 Jeff Law <law@redhat.com>
9802
9803 * config/arm/arm.c (get_label_padding): Update for recent
9804 changes to label_to_alignment.
9805
9806 PR tree-optimization/86010
9807 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
9808
9809 * config/mips/mips.c (vr4130_align_insns): Update for recent
9810 changes to label_to_alignment.
9811
9812 * config/frv/frv.c (frv_label_align): Update for recent changes
9813 to label_to_alignment.
9814
9815 * config/nios2/nios2.c (nios2_label_align): Update for recent
9816 changes which dropped ALIGN_LABELS_LOG.
9817
9818 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
9819
9820 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
9821 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
9822
9823 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
9824
9825 * config/arc/arc.c (arc_label_align): Use align_labels instead of
9826 deprecated align_labels_log.
9827
9828 2018-07-17 Richard Biener <rguenther@suse.de>
9829
9830 PR lto/86456
9831 * dwarf2out.c (init_sections_and_labels): Always generate
9832 a debug_line_str_section for early LTO debug.
9833 (dwarf2out_finish): Reset debug_line_str_hash output early.
9834 Bump counter for extra dwarf5 .debug_loc labels to not conflict
9835 with fat LTO part.
9836 (dwarf2out_early_finish): Output debug_line_str.
9837
9838 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9839
9840 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
9841 index register on z196 or later.
9842
9843 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
9844
9845 * config/s390/s390.c (s390_default_align): Set default function
9846 alignment to 16.
9847 (s390_override_options_after_change): Call s390_default align.
9848 (s390_option_override_internal): Call s390_default_align.
9849 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
9850
9851 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9852
9853 PR middle-end/86542
9854 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
9855 to _looptemp_ clauses, other than the first two.
9856
9857 2018-07-17 Martin Liska <mliska@suse.cz>
9858
9859 * opts.c: Do not enable OPT_falign_* for -Os.
9860
9861 2018-07-17 Martin Liska <mliska@suse.cz>
9862
9863 * align.h (MAX_CODE_ALIGN): New.
9864 (MAX_CODE_ALIGN_VALUE): New.
9865 * common/config/i386/i386-common.c (ix86_handle_option):
9866 (MAX_CODE_ALIGN): Moved to align.h.
9867 * final.c (MAX_CODE_ALIGN): Likewise.
9868 * opts.c (parse_and_check_align_values):
9869 (MAX_CODE_ALIGN): Likewise.
9870 (MAX_CODE_ALIGN_VALUE): Likewise.
9871
9872 2018-07-17 Martin Liska <mliska@suse.cz>
9873
9874 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
9875 in order to fulfil coding style.
9876 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
9877 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9878 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9879 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
9880 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
9881 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
9882 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
9883 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
9884 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9885
9886 2018-07-17 Martin Liska <mliska@suse.cz>
9887
9888 * align.h: New file.
9889 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
9890 directly.
9891 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
9892 align_flags of label_to_alignment.
9893 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
9894 align_flags class.
9895 * config/m68k/m68k.c: Do not use removed align_labels_value and
9896 align_loops_value.
9897 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9898 (LOOP_ALIGN): Likewise.
9899 (LABEL_ALIGN): Likewise.
9900 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9901 Remove not used macro.
9902 (rs6000_loop_align): Change return type to align_flags.
9903 (rs6000_loop_align_max_skip): Remove.
9904 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9905 Change return type to align_flags.
9906 * config/rs6000/rs6000.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/rx/rx.h (JUMP_ALIGN): Wrap integer values
9911 * config/rx/rx-protos.h (rx_align_for_label): Make it
9912 static function.
9913 * config/rx/rx.c (rx_align_for_label): Change return type
9914 to align_flags.
9915 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9916 macro definitions.
9917 into align_flags class.
9918 (LABEL_ALIGN): Likewise.
9919 (LOOP_ALIGN): Likewise.
9920 * config/s390/s390.c (s390_label_align): Use align_flags
9921 class member.
9922 (s390_asm_output_function_label): Likewise.
9923 * config/sh/sh.c (sh_override_options_after_change):
9924 Use align_flags class directly without macros.
9925 (find_barrier): Likewise.
9926 (barrier_align): Likewise.
9927 (sh_loop_align): Likewise.
9928 * config/spu/spu.c (spu_option_override):
9929 Use align_flags_tuple::get_value instead of removed macros.
9930 (spu_sched_init): Likewise.
9931 * config/spu/spu.h (GTY): Likewise.
9932 * config/visium/visium.c (visium_option_override):
9933 Set "8" as default secondary alignment.
9934 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9935 in order to guarantee secondary alignment of 8.
9936 * coretypes.h: Include align.h header file.
9937 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9938 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9939 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9940 * doc/tm.texi.in: Likewise.
9941 * final.c (struct label_alignment): Remove not used structure.
9942 (LABEL_ALIGN): Change type to align_flags.
9943 (LOOP_ALIGN): Likewise.
9944 (JUMP_ALIGN): Likewise.
9945 (default_loop_align_max_skip): Remove.
9946 (default_label_align_max_skip): Likewise.
9947 (default_jump_align_max_skip): Likewise.
9948 (default_label_align_after_barrier_max_skip):
9949 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9950 (LABEL_TO_MAX_SKIP): Remove.
9951 (label_to_alignment): Return align_flags type instead of integer.
9952 (label_to_max_skip): Remove.
9953 (align_fuzz): Use align_flags type.
9954 (compute_alignments): Use align_flags type and use align_flags::max
9955 to combine multiple alignments.
9956 (grow_label_align): Grow vec instead of C array.
9957 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9958 (shorten_branches): Use align_flags type and use align_flags::max
9959 to combine multiple alignments.
9960 (final_scan_insn_1): Remove usage of secondary alignment that comes
9961 from label alignment, but instead use proper secondary alignment
9962 which is computed in grow_label_align.
9963 * flags.h (struct align_flags_tuple): Move to align.h.
9964 (struct align_flags): Likewise.
9965 (state_align_loops): Rename to align_loops.
9966 (state_align_jumps): Rename to align_jumps.
9967 (state_align_labels): Rename to align_labels.
9968 (state_align_functions): Rename to align_functions.
9969 (align_loops_log): Remove.
9970 (align_jumps_log): Remove.
9971 (align_labels_log): Remove.
9972 (align_functions_log): Remove.
9973 (align_loops_max_skip): Remove.
9974 (align_jumps_max_skip): Remove.
9975 (align_labels_max_skip): Remove.
9976 (align_functions_max_skip): Remove.
9977 (align_loops_value): Remove.
9978 (align_jumps_value): Remove.
9979 (align_labels_value): Remove.
9980 (align_functions_value): Remove.
9981 * output.h (label_to_alignment): Change return type to align_flags.
9982 (label_to_max_skip): Remove.
9983 * target.def: Remove loop_align_max_skip, label_align_max_skip,
9984 jump_align_max_skip macros.
9985 * targhooks.h (default_loop_align_max_skip): Remove.
9986 (default_label_align_max_skip): Likewise.
9987 (default_jump_align_max_skip): Likewise.
9988 (default_label_align_after_barrier_max_skip): Remove.
9989 * toplev.c (read_log_maxskip): Use ::normalize function.
9990 (parse_N_M): Remove not used argument and also call ::normalize.
9991 (parse_alignment_opts): Do not pass unused arguments.
9992 * varasm.c (assemble_start_function): Use directly align_functions
9993 instead of removed macros.
9994 * system.h: Do not poison removed macros.
9995
9996 2018-07-17 Jakub Jelinek <jakub@redhat.com>
9997
9998 PR middle-end/86539
9999 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10000 and cond temporaries don't have reference type if iterator has
10001 pointer type. For init use &for_pre_body instead of pre_p if
10002 for_pre_body is non-empty.
10003
10004 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10005
10006 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10007 double-double modes to SFmode directly directly.
10008 (trunc<mode>sf2_fprs): Delete.
10009
10010 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10011
10012 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10013 for conversions between IFmode and the decimal floating point modes.
10014 (init_float128_ieee): Use the correct names for conversions between
10015 KFmode and the decimal floating point modes.
10016
10017 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10018
10019 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10020 for the conversions between TDmode and IFmode.
10021 (init_float128_ieee): Use more correct names for the conversions
10022 between TDmode and KFmode.
10023
10024 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10025
10026 PR tree-optimization/86526
10027 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10028 (inline_expand_builtin_string_cmp): Likewise.
10029 (inline_string_cmp): Likewise. Use c_readstr instead of
10030 builtin_memcpy_read_str. Add unit_mode temporary.
10031
10032 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10033
10034 PR middle-end/86528
10035 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10036 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10037
10038 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10039
10040 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10041 Alphabetize prototypes of built-in functions, separating out
10042 built-in functions that are listed in this section but should be
10043 described elsewhere.
10044
10045 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10046
10047 PR target/86511
10048 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10049 conditional move when trapping comparison was split to a
10050 non-trapping one (and vice versa).
10051
10052 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10053
10054 * config/s390/s390.c (s390_function_profiler): Generate nops
10055 instead of profiler call sequences.
10056 * config/s390/s390.opt: Add the new option.
10057
10058 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10059
10060 * config/s390/s390.c (s390_function_profiler): Generate
10061 __mcount_loc section.
10062 * config/s390/s390.opt: Add the new option.
10063
10064 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10065
10066 * common.opt: Add the new warning.
10067 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10068 %r0,__fentry__" when -mfentry is specified.
10069 (s390_option_override_internal): Disallow -mfentry for 31-bit
10070 CPUs.
10071 * config/s390/s390.opt: Add the new option.
10072
10073 2018-07-16 Richard Biener <rguenther@suse.de>
10074
10075 PR lto/86523
10076 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10077 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10078
10079 2018-07-16 Martin Liska <mliska@suse.cz>
10080
10081 PR ipa/86529
10082 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10083 to ::get_create.
10084
10085 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10086
10087 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10088
10089 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10090
10091 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10092 for ARCHS4x.
10093 * config/arc/arc-cpus.def (hs4x): New cpu.
10094 (hs4xd): Likewise.
10095 * config/arc/arc-tables.opt: Regenerate.
10096 * config/arc/arc.c (arc_sched_issue_rate): New function.
10097 (TARGET_SCHED_ISSUE_RATE): Define.
10098 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10099 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10100 fpu_cvt.
10101 (attr tune): Add ARCHS4x tune values.
10102 (attr tune_dspmpy): Define.
10103 (*tst): Correct instruction type.
10104 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10105 * config/arc/arcHS4x.md: New file.
10106 * config/arc/fpu.md: Update instruction type attributes.
10107 * config/arc/t-multilib: Regenerate.
10108
10109 2018-07-16 Tom de Vries <tdevries@suse.de>
10110
10111 PR debug/86455
10112 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10113
10114 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10115
10116 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10117 early clobber.
10118
10119 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10120
10121 PR tree-optimization/86514
10122 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10123 conversion to a boolean type from a type with greater precision.
10124
10125 2018-07-16 Tom de Vries <tdevries@suse.de>
10126
10127 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10128 dump_flags request TDF_SLIM.
10129
10130 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10131
10132 * fold-const.c (int_const_binop_1): Abstract...
10133 (wide_int_binop): ...wide int code here.
10134 (poly_int_binop): ...poly int code here.
10135 Abstract the rest of int_const_binop_1 into int_const_binop.
10136 * fold-const.h (wide_int_binop): New.
10137 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10138 Remove useless PLUS/MINUS_EXPR case.
10139 (zero_nonzero_bits_from_vr): Move wide int code...
10140 (zero_nonzero_bits_from_bounds): ...here.
10141 (extract_range_from_binary_expr_1): Move mask optimization code...
10142 (range_easy_mask_min_max): ...here.
10143 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10144 (range_easy_mask_min_max): New.
10145
10146 2018-07-15 Jeff Law <law@redhat.com>
10147
10148 PR target/85993
10149 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10150 block.
10151
10152 2018-07-14 Jim Wilson <jimw@sifive.com>
10153
10154 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10155
10156 2018-07-14 Paul Koning <ni1d@arrl.net>
10157
10158 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10159
10160 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10161
10162 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10163 copying section.
10164
10165 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10166 Steve Munroe <munroesj52@gmail.com>
10167
10168 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10169 (_mm_andnot_si128): Likewise.
10170 (_mm_or_si128): Likewise.
10171 (_mm_xor_si128): Likewise.
10172
10173 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10174
10175 PR middle-end/78809
10176 * builtins.c (expand_builtin_memcmp): Inline the calls first
10177 when result_eq is false.
10178 (expand_builtin_strcmp): Inline the calls first.
10179 (expand_builtin_strncmp): Likewise.
10180 (inline_string_cmp): New routine. Expand a string compare
10181 call by using a sequence of char comparison.
10182 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10183 a call to str(n)cmp/memcmp.
10184 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10185 New option.
10186 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10187
10188 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10189
10190 * config/arm/driver-arm.c: Include arm-native.h.
10191 (host_detect_local_cpu): Use auto-generated data tables.
10192 (vendors, arm_cpu_table): Delete. Move part information to ...
10193 * config/arm/arm-cpus.in: ... here.
10194 * config/arm/parsecpu.awk (gen_native): New function.
10195 (vendor, part): New CPU fields.
10196 (END): Add support for building the native CPU detection tables.
10197 * config/arm/t-arm (arm-native.h): Add build rule.
10198 (driver-arm.o): Add dependency on arm-native.h.
10199
10200 2018-07-13 Richard Biener <rguenther@suse.de>
10201
10202 PR middle-end/85974
10203 * match.pd (addr1 - addr2): Allow either of the operand to
10204 have a conversion.
10205
10206 2018-07-13 Tom de Vries <tdevries@suse.de>
10207
10208 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10209 in remap_ssa_name.
10210
10211 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10212
10213 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10214 arrays instead of numbered variables.
10215
10216 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10217
10218 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10219 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10220
10221 2018-07-13 Richard Biener <rguenther@suse.de>
10222
10223 PR debug/86452
10224 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10225 instead of get_context_die.
10226
10227 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10228 Richard Biener <rguenther@suse.de>
10229
10230 PR middle-end/86489
10231 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10232 that the loop latch destination where phi is defined.
10233
10234 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10235
10236 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10237 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10238 (riscv_set_current_function): Extract getting interrupt type to new
10239 function.
10240 (riscv_get_interrupt_type): New function.
10241 (riscv_merge_decl_attributes): New function, checking interrupt type is
10242 same.
10243 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10244
10245 2018-07-12 Paul Koning <ni1d@arrl.net>
10246
10247 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10248 directive.
10249
10250 2018-07-12 Paul Koning <ni1d@arrl.net>
10251
10252 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10253 zero reference, add doloop_end instead.
10254 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10255 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10256 detail for doloop_end.
10257
10258 2018-07-12 Martin Sebor <msebor@redhat.com>
10259
10260 PR c/86453
10261 * attribs.c (decl_attributes): Reject conflicting attributes before
10262 calling attribute handlers.
10263
10264 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10265
10266 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10267 parameter.
10268 (gcc::dump_manager::get_dump_file_name): likewise.
10269 (dump_begin): Likewise.
10270 * dumpfile.h (dump_begin): Update prototype.
10271 (gcc::dump_manager::get_dump_file_name,
10272 gcc::dump_manager::get_dump_file_name): Update prototype.
10273
10274 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10275
10276 * internal-fn.h (vectorizable_internal_fn_p): New function.
10277 * tree-vect-slp.c (compatible_calls_p): Likewise.
10278 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10279 to internal functions.
10280 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10281
10282 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10283
10284 * fold-const.h (inverse_conditions_p): Declare.
10285 * fold-const.c (inverse_conditions_p): New function.
10286 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10287 that test the inverse condition of a conditional internal function.
10288 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10289 * internal-fn.c (internal_fn_mask_index): Handle conditional
10290 internal functions.
10291 (vectorized_internal_fn_supported_p): New function.
10292 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10293 (any_pred_load_store): Replace with...
10294 (need_to_predicate): ...this new variable.
10295 (redundant_ssa_names): New variable.
10296 (ifcvt_can_use_mask_load_store): Move initial checks to...
10297 (ifcvt_can_predicate): ...this new function. Handle tree codes
10298 for which a conditional internal function exists.
10299 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10300 instead of ifcvt_can_use_mask_load_store. Update after variable
10301 name change.
10302 (predicate_load_or_store): New function, split out from
10303 predicate_mem_writes.
10304 (check_redundant_cond_expr): New function.
10305 (value_available_p): Likewise.
10306 (predicate_rhs_code): Likewise.
10307 (predicate_mem_writes): Rename to...
10308 (predicate_statements): ...this. Use predicate_load_or_store
10309 and predicate_rhs_code.
10310 (combine_blocks, tree_if_conversion): Update after above name changes.
10311 (ifcvt_local_dce): Handle redundant_ssa_names.
10312 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10313 general conditional functions.
10314 * tree-vect-stmts.c (vectorizable_call): Likewise.
10315
10316 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10317 Alan Hayward <alan.hayward@arm.com>
10318 David Sherwood <david.sherwood@arm.com>
10319
10320 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10321 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10322 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10323 plus and minus and convert them into IFN_COND_FMA-based sequences.
10324 (convert_mult_to_fma): Handle conditional plus and minus.
10325
10326 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10327
10328 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10329 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10330 (cond_fnms_optab): New optabs.
10331 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10332 internal functions.
10333 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10334 * internal-fn.h (get_conditional_internal_fn): Declare.
10335 (get_unconditional_internal_fn): Likewise.
10336 * internal-fn.c (cond_ternary_direct): New macro.
10337 (expand_cond_ternary_optab_fn): Likewise.
10338 (direct_cond_ternary_optab_supported_p): Likewise.
10339 (FOR_EACH_COND_FN_PAIR): Likewise.
10340 (get_conditional_internal_fn): New function.
10341 (get_unconditional_internal_fn): Likewise.
10342 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10343 (gimple_match_op::gimple_match_op): Add a new overload for 5
10344 operands.
10345 (gimple_match_op::set_op): Likewise.
10346 (gimple_resimplify5): Declare.
10347 * genmatch.c (decision_tree::gen): Generate simplifications for
10348 5 operands.
10349 * gimple-match-head.c (gimple_simplify): Define an overload for
10350 5 operands. Handle calls with 5 arguments in the top-level overload.
10351 (convert_conditional_op): Handle conversions from unconditional
10352 internal functions to conditional ones.
10353 (gimple_resimplify5): New function.
10354 (build_call_internal): Pass a fifth operand.
10355 (maybe_push_res_to_seq): Likewise.
10356 (try_conditional_simplification): Try converting conditional
10357 internal functions to unconditional internal functions.
10358 Handle 3-operand unconditional forms.
10359 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10360 Define ternary equivalents of the current rules for binary conditional
10361 internal functions.
10362 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10363 ternary operations.
10364 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10365 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10366 (optab): Handle them.
10367 (SVE_COND_FP_TERNARY): New int iterator.
10368 (sve_fmla_op, sve_fmad_op): New int attributes.
10369 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10370 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10371 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10372
10373 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10374
10375 * target.def (preferred_else_value): New target hook.
10376 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10377 * doc/tm.texi: Regenerate.
10378 * targhooks.h (default_preferred_else_value): Declare.
10379 * targhooks.c (default_preferred_else_value): New function.
10380 * internal-fn.h (conditional_internal_fn_code): Declare.
10381 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10382 (get_conditional_internal_fn): Use it.
10383 (conditional_internal_fn_code): New function.
10384 * gimple-match.h (gimple_match_cond): New struct.
10385 (gimple_match_op): Add a cond member function.
10386 (gimple_match_op::gimple_match_op): Update all forms to take a
10387 gimple_match_cond.
10388 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10389 for the suboperation, but don't specify a particular else_value.
10390 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10391 (visit_nary_op, visit_reference_op_load): Pass
10392 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10393 * gimple-match-head.c: Include tree-eh.h
10394 (convert_conditional_op): New function.
10395 (maybe_resimplify_conditional_op): Likewise.
10396 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10397 (gimple_resimplify2): Likewise.
10398 (gimple_resimplify3): Likewise.
10399 (gimple_resimplify4): Likewise.
10400 (maybe_push_res_to_seq): Return null for conditional operations.
10401 (try_conditional_simplification): New function.
10402 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10403 constructor.
10404 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10405 IFN_COND_* call.
10406 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10407 function.
10408 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10409
10410 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10411
10412 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10413 DECL_FCONTEXT
10414 (hash_tree): Do not hash DECL_FCONTEXT
10415 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10416 Do not stream DECL_FCONTEXT.
10417 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10418 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10419
10420 2018-07-12 Richard Biener <rguenther@suse.de>
10421
10422 PR debug/86462
10423 * dwarf2out.c (gen_block_die): Only output blocks when they have
10424 at least one !DECL_IGNORED_P variable.
10425
10426 2018-07-12 Richard Biener <rguenther@suse.de>
10427
10428 PR target/84829
10429 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10430 Remove -mieee-fp handling.
10431
10432 2018-07-12 Richard Biener <rguenther@suse.de>
10433
10434 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10435 left-over from last patch.
10436
10437 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10438
10439 PR tree-optimization/86492
10440 * gimple-ssa-store-merging.c
10441 (imm_store_chain_info::coalesce_immediate_stores): Call
10442 check_no_overlap even for the merge_overlapping case. Formatting fix.
10443
10444 2018-07-12 Richard Biener <rguenther@suse.de>
10445
10446 PR middle-end/86479
10447 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10448 move possibly trapping operations into the conditional.
10449
10450 2018-07-12 Richard Biener <rguenther@suse.de>
10451
10452 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10453 (vn_lookup_simplify_result): Remove recursion limit applied
10454 here.
10455 (vn_nary_build_or_lookup_1): Adjust.
10456 (try_to_simplify): Likewise.
10457 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10458 here.
10459 (gimple_resimplify2): Likewise.
10460 (gimple_resimplify3): Likewise.
10461 (gimple_resimplify4): Likewise.
10462
10463 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10464
10465 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10466 Use __mmask64 type instead of __mmask8 for __M argument.
10467 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10468 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10469 __U argument.
10470 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10471 __mmask16 for __M argument.
10472 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10473 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10474 to __mmask16 instead of __mmask8.
10475 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10476 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10477 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10478 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10479 instead of __mmask16 for __U argument.
10480 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10481 __mmask16 instead of __mmask8 for __U argument.
10482 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10483 __U argument.
10484 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10485 __mmask16.
10486 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10487 argument.
10488 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10489 __U argument.
10490 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10491 __mmask16.
10492 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10493 of __mmask16.
10494 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10495 __U argument.
10496 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10497 __U argument.
10498 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10499 __U argument.
10500 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10501 __U argument.
10502 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10503 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10504 return type as well as __M argument type and all casts from __mmask8
10505 to __mmask32.
10506 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10507 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10508 return type as well as __M argument type and all casts from __mmask8
10509 to __mmask16.
10510 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10511 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10512 return type as well as __M argument type and all casts from __mmask8
10513 to __mmask32.
10514 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10515 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10516 return type as well as __M argument type and all casts from __mmask8
10517 to __mmask16.
10518 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10519 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10520 __mmask16.
10521
10522 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10523
10524 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10525 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10526 for __U argument.
10527
10528 2018-07-11 Paul Koning <ni1d@arrl.net>
10529
10530 * doc/md.texi (define_subst): Document how multiple occurrences of
10531 the same argument in the replacement pattern are handled.
10532
10533 2018-07-11 Paul Koning <ni1d@arrl.net>
10534
10535 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10536 alphabetical order.
10537 (Common Type Attributes): Add "mode" attribute.
10538
10539 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10540
10541 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10542 stream DECL_ORIGINAL_TYPE.
10543 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10544 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10545 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10546 Do not walk original type.
10547 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10548 external decls.
10549 (write_ts_decl_non_common_tree_pointers): Do not stream
10550 DECL_ORIGINAL_TYPE
10551 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10552 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10553
10554 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10555
10556 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10557 thread twice from the same starting edge.
10558
10559 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10560
10561 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10562 * gimple.c (gimple_call_nonnull_result_p): ...here...
10563 (gimple_call_nonnull_arg): ...and here.
10564 * gimple.h (gimple_call_nonnull_result_p): New.
10565 (gimple_call_nonnull_arg): New.
10566
10567 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10568
10569 * config/arm/arm-cpus.in: Move information from fpu field of each
10570 cpu definition to the isa field.
10571 * config/arm/parsecpu.awk (fpu): Delete match rule.
10572 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10573
10574 2018-07-11 Richard Biener <rguenther@suse.de>
10575
10576 PR debug/86457
10577 * dwarf2out.c (init_sections_and_labels): Use
10578 output_asm_line_debug_info consistently.
10579 (dwarf2out_early_finish): Likewise.
10580 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10581 type units.
10582
10583 2018-07-11 Richard Biener <rguenther@suse.de>
10584
10585 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10586 Rework father_bb setting in a way to avoid propagating constants
10587 multiple times on a loop body.
10588
10589 2018-07-10 Mark Wielaard <mark@klomp.org>
10590
10591 PR debug/86459
10592 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10593
10594 2018-07-10 Richard Biener <rguenther@suse.de>
10595
10596 * hash-map.h (hash_map::iterator::operator*): Return
10597 references to key and value.
10598
10599 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10600
10601 PR c++/86443
10602 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10603 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10604 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10605 (gimplify_omp_for): For composite loops, move outer
10606 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10607 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10608 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10609 TREE_LIST for both the original class iterator and the "last" helper
10610 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10611 loop, remember has_decl_expr from outer composite loops for the
10612 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10613
10614 2018-07-09 Martin Sebor <msebor@redhat.com>
10615
10616 PR middle-end/77357
10617 PR middle-end/86428
10618 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10619 accessing implicitly initialized array elements.
10620 * expr.c (string_constant): Handle string initializers of
10621 character arrays within aggregates.
10622 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10623 Store element offset. As a special case, handle zero size.
10624 (fold_nonarray_ctor_reference): Same.
10625 (fold_ctor_reference): Add argument. Store subobject offset.
10626 * gimple-fold.h (fold_ctor_reference): Add argument.
10627
10628 2018-07-09 Paul Koning <ni1d@arrl.net>
10629
10630 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10631 (pdp11_insn_cost): New function.
10632 (pdp11_md_asm_adjust): New function.
10633 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10634 (pdp11_rtx_costs): Update to match machine better.
10635 (output_addr_const_pdp11): Correct format mismatch warnings.
10636 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10637 * config/pdp11/pdp11.md: General change to add base_cost and/or
10638 length attributes for use by new pdp11_insn_cost function.
10639 (MIN_BRANCH): Correct definition.
10640 (MIN_SOB): Ditto.
10641 (doloop_end): Use standard pattern name for looping pattern.
10642 (doloop_end_nocc): New.
10643 (movsf): Add another constraint alternative.
10644 (zero_extendqihi2): Add constraint alternatives for not in place
10645 extend.
10646 (zero_extendhisi2): Remove.
10647 (shift patterns): Add CC handling variants.
10648 (bswaphi2): New.
10649 (bswapsi2): New.
10650 (rothi3): New.
10651 (define_peephole2): New peephole to recognize mov that sets CC for
10652 subsequent test.
10653
10654 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10655
10656 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10657 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10658 wi::add.
10659
10660 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10661
10662 PR c/86420
10663 * real.c (real_nextafter): Return true if result is denormal.
10664
10665 2018-07-09 Martin Liska <mliska@suse.cz>
10666
10667 * common.opt: Add back wrongly removed attribute.
10668
10669 2018-07-09 Richard Biener <rguenther@suse.de>
10670
10671 PR debug/86413
10672 * dwarf2out.c (gen_block_die): For an early generated DIE
10673 always output high/low PC attributes.
10674
10675 2018-07-09 Tom de Vries <tdevries@suse.de>
10676
10677 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10678 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10679 onto VAR_DECL with abstract origin.
10680
10681 2018-07-07 Jim Wilson <jimw@sifive.com>
10682
10683 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10684
10685 2018-07-07 Tom de Vries <tdevries@suse.de>
10686
10687 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10688
10689 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10690
10691 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10692 overflow_type.
10693 (combine_bound): Use wide-int overflow calculation instead of
10694 rolling our own.
10695 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10696 overflow_type.
10697 * fold-const.c (int_const_binop_2): Same.
10698 (extract_muldiv_1): Same.
10699 (fold_div_compare): Same.
10700 (fold_abs_const): Same.
10701 * match.pd: Same.
10702 * poly-int.h (add): Same.
10703 (sub): Same.
10704 (neg): Same.
10705 (mul): Same.
10706 * predict.c (predict_iv_comparison): Same.
10707 * profile-count.c (slow_safe_scale_64bit): Same.
10708 * simplify-rtx.c (simplify_const_binary_operation): Same.
10709 * tree-chrec.c (tree_fold_binomial): Same.
10710 * tree-data-ref.c (split_constant_offset_1): Same.
10711 * tree-if-conv.c (idx_within_array_bound): Same.
10712 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10713 * tree-ssa-phiopt.c (minmax_replacement): Same.
10714 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10715 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10716 * vr-values.c (vr_values::adjust_range_with_scev): Same.
10717 * wide-int.cc (wi::add_large): Same.
10718 (wi::mul_internal): Same.
10719 (wi::sub_large): Same.
10720 (wi::divmod_internal): Same.
10721 * wide-int.h: Change overflow type to overflow_type for neg, add,
10722 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10723 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10724 mul_internal, divmod_internal.
10725 (overflow_type): New enum.
10726 (accumulate_overflow): New.
10727
10728 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
10729
10730 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10731 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10732
10733 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10734
10735 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10736 argument is checked for zero before entering loop, avoid checking again.
10737
10738 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
10739
10740 * gimplify.h (generic_expr_could_trap_p): Set as global function.
10741 * gimplify.h (generic_expr_could_trap_p): Likwise.
10742 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10743
10744 2018-07-06 Jakub Jelinek <jakub@redhat.com>
10745
10746 PR tree-optimization/86401
10747 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10748 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10749 (fold_bit_and_mask): ... here. New helper function for match.pd.
10750 * fold-const.h (fold_bit_and_mask): Declare.
10751 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10752
10753 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
10754
10755 PR target/86324
10756 * target.def (translate_mode_attribute): New hook.
10757 * targhooks.h (default_translate_mode_attribute): Declare.
10758 * targhooks.c (default_translate_mode_attribute): New function.
10759 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10760 * doc/tm.texi: Regenerate.
10761 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10762 (rs6000_translate_mode_attribute): New function.
10763
10764 2018-07-06 Paul Koning <ni1d@arrl.net>
10765
10766 * doc/md.texi (define_split): Document DONE and FAIL.
10767 (define_peephole2): Ditto.
10768
10769 2018-07-05 Jeff Law <law@redhat.com>
10770
10771 PR tree-optimization/86010
10772 * tree-ssa-dse.c (compute_trims): More aggressively trim at
10773 both the head and tail of mem* and str* calls.
10774
10775 2018-07-05 Jim Wilson <jimw@sifive.com>
10776
10777 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10778
10779 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
10780
10781 * config/aarch64/aarch64-simd.md: correct flags text for
10782 MIN_EXPR replacement.
10783
10784 2018-07-05 James Clarke <jrtc27@jrtc27.com>
10785
10786 * configure: Regenerated.
10787
10788 2018-07-05 Carl Love <cel@us.ibm.com>
10789
10790 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
10791 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
10792 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
10793 VSX_BUILTIN_DOUBLEL_V4SF.
10794
10795 2018-07-05 Martin Sebor <msebor@redhat.com>
10796
10797 PR c++/86400
10798 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
10799 than its domain to compute its the upper bound of a char array.
10800
10801 2018-07-05 Nathan Sidwell <nathan@acm.org>
10802
10803 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
10804 * doc/cpp.texi: Update comment.
10805 * doc/tm.texi: Rebuilt.
10806 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
10807 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
10808 * doc/extend.texi (Backwards Compatibility): Clarify it is system
10809 headers affected by extern "C".
10810 * system.h: Poison NO_IMPLICIT_EXTERN_C.
10811 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
10812 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
10813 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
10814 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
10815 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
10816 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
10817 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
10818 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
10819 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
10820 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
10821 config/sparc/sp64-elf.h, config/spu/spu.h,
10822 config/stormy16/stormy16.h, config/v850/v850.h,
10823 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
10824 define NO_IMPLICIT_EXTERN_C.
10825 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
10826
10827 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10828
10829 PR target/84711
10830 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10831 instead of GET_MODE_SIZE when comparing Units.
10832
10833 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10834
10835 PR target/84711
10836 * rtlanal.c (set_noop_p): Constrain on mode change,
10837 include hard-reg-set.h
10838
10839 2018-07-05 Tamar Christina <tamar.christina@arm.com>
10840
10841 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
10842
10843 2018-07-05 Jakub Jelinek <jakub@redhat.com>
10844
10845 Revert
10846 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10847
10848 PR sanitizer/84250
10849 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10850 libasan.
10851 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10852
10853 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
10854
10855 PR sanitizer/84250
10856 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
10857 libasan.
10858 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
10859
10860 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
10861
10862 PR middle-end/86380
10863 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
10864
10865 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
10866
10867 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
10868 neg_*_op* variables.
10869
10870 2018-07-04 Martin Liska <mliska@suse.cz>
10871
10872 * tree-switch-conversion.c: Define
10873 max_ratio_for_speed and max_ratio_for_size constants.
10874
10875 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10876 Martin Liska <mliska@suse.cz>
10877
10878 PR middle-end/66240
10879 PR target/45996
10880 PR c/84100
10881 * common.opt: Rename align options with 'str_' prefix.
10882 * common/config/i386/i386-common.c (set_malign_value): New
10883 function.
10884 (ix86_handle_option): Use it to set -falign-* options/
10885 * config/aarch64/aarch64-protos.h (struct tune_params): Change
10886 type from int to string.
10887 * config/aarch64/aarch64.c: Update default values from int
10888 to string.
10889 * config/alpha/alpha.c (alpha_override_options_after_change):
10890 Likewise.
10891 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
10892 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10893 max skip conditionally.
10894 * config/i386/freebsd.h (SUBALIGN_LOG): New.
10895 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10896 max skip conditionally.
10897 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10898 max skip conditionally.
10899 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10900 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10901 max skip conditionally.
10902 * config/i386/i386.c (struct ptt): Change type from int to
10903 string.
10904 (ix86_default_align): Set default values.
10905 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10906 max skip conditionally.
10907 * config/i386/iamcu.h (SUBALIGN_LOG): New.
10908 (ASM_OUTPUT_MAX_SKIP_ALIGN):
10909 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10910 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10911 max skip conditionally.
10912 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10913 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10914 * config/i386/x86-64.h (SUBALIGN_LOG): New.
10915 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10916 max skip conditionally.
10917 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10918 * config/ia64/ia64.c (ia64_option_override): Set default values
10919 for alignment options.
10920 * config/m68k/m68k.c: Handle new str_align_* options.
10921 * config/mips/mips.c (mips_set_compression_mode): Change
10922 type of constants.
10923 (mips_option_override): Set default values for options.
10924 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10925 Likewise.
10926 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10927 Likewise.
10928 * config/rx/rx.c (rx_option_override): Likewise.
10929 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10930 (LABEL_ALIGN): Use align_labels_log.
10931 (LOOP_ALIGN): Use align_loops_align.
10932 * config/s390/s390.c (s390_asm_output_function_label): Use new
10933 macros.
10934 * config/sh/sh.c (sh_override_options_after_change):
10935 Change type of constants.
10936 * config/spu/spu.c (spu_sched_init): Likewise.
10937 * config/sparc/sparc.c (sparc_option_override): Set default
10938 values for options.
10939 * config/visium/visium.c (visium_option_override): Likewise.
10940 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10941 emit p2align format with last argument if it's not needed.
10942 * doc/invoke.texi: Document extended format of -falign-*.
10943 * final.c: Use align_labels alignment.
10944 * flags.h (struct target_flag_state): Change type to use
10945 align_flags.
10946 (struct align_flags_tuple): New.
10947 (struct align_flags): Likewise.
10948 (align_loops_log): Redefine macro to use new types.
10949 (align_loops_max_skip): Redefine macro to use new types.
10950 (align_jumps_log): Redefine macro to use new types.
10951 (align_jumps_max_skip): Redefine macro to use new types.
10952 (align_labels_log): Redefine macro to use new types.
10953 (align_labels_max_skip): Redefine macro to use new types.
10954 (align_functions_log): Redefine macro to use new types.
10955 (align_loops): Redefine macro to use new types.
10956 (align_jumps): Redefine macro to use new types.
10957 (align_labels): Redefine macro to use new types.
10958 (align_functions): Redefine macro to use new types.
10959 (align_functions_max_skip): Redefine macro to use new types.
10960 (align_loops_value): New macro.
10961 (align_jumps_value): New macro.
10962 (align_labels_value): New macro.
10963 (align_functions_value): New macro.
10964 * function.c (invoke_set_current_function_hook): Propagate
10965 alignment values from flags to global variables default in
10966 topleev.h.
10967 * ipa-icf.c (sem_function::equals_wpa): Use
10968 cl_optimization_option_eq instead of memcmp.
10969 * lto-streamer.h (cl_optimization_stream_out): Support streaming
10970 of string types.
10971 (cl_optimization_stream_in): Likewise.
10972 * optc-save-gen.awk: Support strings in cl_optimization.
10973 * opth-gen.awk: Likewise.
10974 * opts.c (finish_options): Remove error checking of invalid
10975 value ranges.
10976 (MAX_CODE_ALIGN): Remove.
10977 (MAX_CODE_ALIGN_VALUE): Likewise.
10978 (parse_and_check_align_values): New function.
10979 (check_alignment_argument): Likewise.
10980 (common_handle_option): Use check_alignment_argument.
10981 * opts.h (parse_and_check_align_values): Declare.
10982 * toplev.c (init_alignments): Remove.
10983 (read_log_maxskip): New.
10984 (parse_N_M): Likewise.
10985 (parse_alignment_opts): Likewise.
10986 (backend_init_target): Remove usage of init_alignments.
10987 * toplev.h (parse_alignment_opts): Declare.
10988 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10989 argument.
10990 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10991 * tree.c (cl_option_hasher::equal): New.
10992 * varasm.c: Use new global macros.
10993
10994 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
10995
10996 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10997 Use a simpler align directive also if MAXSKIP = ALIGN-1.
10998 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10999 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11000 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11001 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11002 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11003 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11004 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11005 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11006 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11007 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11008 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11009
11010 2018-07-04 Martin Liska <mliska@suse.cz>
11011 Jonathan Wakely <jwakely@redhat.com>
11012
11013 * coverage.c: Use correct type.
11014 * doc/invoke.texi: Language correction.
11015
11016 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11017
11018 PR target/85620
11019 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11020 ENDBRANCH for non-tail call which may return via indirect branch.
11021 * doc/extend.texi: Document indirect_return attribute.
11022
11023 2018-07-03 Martin Sebor <msebor@redhat.com>
11024
11025 PR tree-optimization/86274
11026 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11027 precondition.
11028 (format_floating): Correct handling of infinities and NaNs.
11029
11030 2018-07-03 Martin Sebor <msebor@redhat.com>
11031
11032 * print-tree.c (print_real_cst): New function.
11033 (print_node_brief): Call it.
11034 (print_node): Ditto.
11035
11036 2018-07-03 Jeff Law <law@redhat.com>
11037
11038 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11039 into a single pattern.
11040
11041 * config/h8300/h8300.md (ors code_iterator): New.
11042 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11043 a single pattern and single splitter.
11044 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11045 (iorqi3_1, xorqi3_1): Likewise.
11046 (iorqi3, xorqi3 expanders): Similarly.
11047
11048 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11049 (movmd_internal) into a single pattern using the P mode iterator.
11050 (movmd splitters): Similarly.
11051 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11052 (movsd splitters): Similarly.
11053
11054 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11055 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11056 right table based on the size of the operand.
11057 * config/h8300/h8300.md (length_table): Corresponding changes. All
11058 references to "addb", "addw" and "addl" changed to "add".
11059 (btst patterns): Merge two variants into a single pattern.
11060 (tstqi, tsthi): Likewise.
11061 (addhi3_incdec, addsi3_incdec): Likewise.
11062 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11063 (mulhi3, mulsi3): Likewise.
11064 (udivhi3, udivsi3): Likewise.
11065 (divhi3, divsi3): Likewise.
11066 (andorqi3, andorhi3, andorsi3): Likewise.
11067
11068 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11069
11070 PR target/85694
11071 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11072 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11073
11074 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11075
11076 PR tree-optimization/85694
11077 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11078 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11079 UNSPEC_URHADD.
11080 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11081 (<u>avg<mode>3_ceil): New patterns.
11082
11083 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11084
11085 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11086 scan-tree-dump directive.
11087 * gcc.dg/vect/slp-perm-2.c: Likewise.
11088 * gcc.dg/vect/slp-perm-3.c: Likewise.
11089 * gcc.dg/vect/slp-perm-5.c: Likewise.
11090 * gcc.dg/vect/slp-perm-6.c: Likewise.
11091 * gcc.dg/vect/slp-perm-7.c: Likewise.
11092 * gcc.dg/vect/slp-perm-8.c: Likewise.
11093
11094 2018-07-03 Marek Polacek <polacek@redhat.com>
11095
11096 PR middle-end/86202
11097 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11098
11099 2018-07-03 Richard Biener <rguenther@suse.de>
11100
11101 PR ipa/86389
11102 * tree-ssa-structalias.c (find_func_clobbers): Properly
11103 handle indirect calls.
11104
11105 2018-07-03 Jeff Law <law@redhat.com>
11106
11107 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11108 (shifts): New code iterator.
11109 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11110 expander. Fix HImode handling on H8/SX.
11111 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11112 (subqi3, subhi3, subsi3 expanders): Likewise.
11113 (andqi3, andhi3, andsi3 expanders): Likewise.
11114 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11115 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11116 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11117 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11118 (zero_extendqihi2, zero_extendqisi2): Likewise.
11119 (extendqihi2, extendqisi2): Likewise.
11120 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11121 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11122 (rotlqi3_1, rotlhi3_1): Likewise.
11123 (logicalhi3_sn, logicalsi3_sn): Likewise.
11124 (logicalhi3, logicalsi3): Likewise.
11125
11126 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11127
11128 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11129 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11130 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11131 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11132 type to append_pattern_def_seq instead of creating a stmt_vec_info
11133 directly.
11134 (build_mask_conversion): Likewise. Remove vinfo argument.
11135 (vect_add_conversion_to_patterm): Likewise, renaming to...
11136 (vect_add_conversion_to_pattern): ...this.
11137 (vect_recog_mask_conversion_pattern): Update call to
11138 build_mask_conversion. Pass the vector type to
11139 append_pattern_def_seq here too.
11140 (vect_recog_gather_scatter_pattern): Update call to
11141 vect_add_conversion_to_pattern.
11142
11143 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11144
11145 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11146 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11147 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11148 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11149 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11150 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11151 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11152 append_pattern_def_seq instead of new_pattern_def_seq.
11153 (vect_recog_divmod_pattern): Do both of the above.
11154 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11155 is null.
11156
11157 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11158
11159 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11160 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11161 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11162 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11163 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11164 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11165 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11166 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11167 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11168 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11169 parameter with a single stmt_vec_info.
11170 (vect_recog_func_ptr): Likewise.
11171 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11172 (vect_try_gather_scatter_pattern): ...this.
11173 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11174 the stmt_vec_info of the statement to be matched. Don't clear
11175 STMT_VINFO_RELATED_STMT.
11176 (vect_pattern_recog): Update call accordingly.
11177
11178 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11179
11180 PR tree-optimization/85694
11181 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11182 (uavgM3_ceil): Document new optabs.
11183 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11184 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11185 functions.
11186 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11187 (savg_ceil_optab): New optabs.
11188 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11189 (vect_vect_recog_func_ptrs): Add it.
11190 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11191 constant directly from the associated lhs.
11192
11193 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11194
11195 * tree-vect-patterns.c (vect_split_statement): New function.
11196 (vect_convert_input): Use it to try to split an existing cast.
11197
11198 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11199
11200 * poly-int.h (print_hex): New function.
11201 * dumpfile.h (dump_dec, dump_hex): Declare.
11202 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11203 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11204 min_input_precision, operation_precision and operation_sign.
11205 * tree-vect-patterns.c (vect_get_range_info): New function.
11206 (vect_same_loop_or_bb_p, vect_single_imm_use)
11207 (vect_operation_fits_smaller_type): Delete.
11208 (vect_look_through_possible_promotion): Add an optional
11209 single_use_p parameter.
11210 (vect_recog_over_widening_pattern): Rewrite to use new
11211 stmt_vec_info infomration. Handle one operation at a time.
11212 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11213 (vect_truncatable_operation_p, vect_set_operation_type)
11214 (vect_set_min_input_precision): New functions.
11215 (vect_determine_min_output_precision_1): Likewise.
11216 (vect_determine_min_output_precision): Likewise.
11217 (vect_determine_precisions_from_range): Likewise.
11218 (vect_determine_precisions_from_users): Likewise.
11219 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11220 (vect_vect_recog_func_ptrs): Put over_widening first.
11221 Add cast_forwprop.
11222 (vect_pattern_recog): Call vect_determine_precisions.
11223
11224 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11225
11226 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11227 statements that have been replaced by further pattern statements.
11228 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11229
11230 2018-07-03 Richard Biener <rguenther@suse.de>
11231
11232 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11233 always set *dt. Dump vectype in vectype overload.
11234 * dumpfile.h (dump_gimple_expr): New function.
11235 (dump_gimple_expr_loc): Likewise.
11236 * dumpfile.c (dump_gimple_expr): New function.
11237 (dump_gimple_expr_loc): Likewise.
11238
11239 2018-07-02 Jeff Law <law@redhat.com>
11240
11241 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11242 the H8/300, H8/300H and H8/S variants into a single pattern.
11243 (movhi_h8300, movqi_h8300hs): Similarly.
11244 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11245 (QHI mode iterator): New.
11246
11247 * config/h8300/h8300.md: Remove trailing whitespace.
11248
11249 2018-07-02 Jim Wilson <jimw@sifive.com>
11250
11251 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11252 instead of emit_insn for interrupt returns.
11253 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11254 (riscv_sret, riscv_uret): Likewise.
11255
11256 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11257
11258 * pretty-print.c (selftest::test_pp_format): Move save and restore
11259 of quotes to class auto_fix_quotes, and add an instance.
11260 * selftest.c: Include "intl.h".
11261 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11262 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11263 * selftest.h (selftest::auto_fix_quotes): New class.
11264
11265 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11266
11267 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11268 (aarch64_sve_prepare_conditional_op): Remove.
11269 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11270 Allow aarch64_simd_reg_or_zero as select operand; remove
11271 the aarch64_sve_prepare_conditional_op call.
11272 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11273 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11274 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11275 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11276 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11277 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11278 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11279 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11280 and a splitters to match all of the *_any patterns.
11281 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11282
11283 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11284 (SVE_COND_FP_BINARY_REV): Remove.
11285 (sve_int_op_rev, sve_fp_op_rev): New.
11286 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11287 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11288 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11289 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11290 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11291 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11292 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11293 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11294 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11295
11296 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11297 Remove match_dup 1 from the inner unspec.
11298 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11299
11300 * config/aarch64/aarch64.md (movprfx): New attr.
11301 (length): Default movprfx to 8.
11302 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11303 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11304 (*<su>mul<SVE_I>3_highpart): Likewise.
11305 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11306 (*v<ASHIFT><SVE_I>3): Likewise.
11307 (*<su><MAXMIN><SVE_I>3): Likewise.
11308 (*<su><MAXMIN><SVE_F>3): Likewise.
11309 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11310 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11311 (*div<SVE_F>4): Likewise.
11312
11313 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11314
11315 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11316 in dump string.
11317
11318 2018-07-02 Richard Biener <rguenther@suse.de>
11319
11320 PR tree-optimization/86363
11321 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11322 memset argument refers to a non-variable address.
11323
11324 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11325
11326 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11327 {PLUS,MINUS}_EXPR code to...
11328 (adjust_symbolic_bound): ...here,
11329 (combine_bound): ...here,
11330 (set_value_range_with_overflow): ...and here.
11331
11332 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11333
11334 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11335 code...
11336 (extract_range_from_abs_expr): ...here.
11337
11338 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11339
11340 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11341 -fno-omit-frame-pointer when not optimizing.
11342
11343 2018-07-02 Martin Liska <mliska@suse.cz>
11344
11345 PR ipa/86279
11346 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11347 (propagate_nothrow): Likewise.
11348
11349 2018-07-02 Martin Liska <mliska@suse.cz>
11350
11351 PR ipa/86323
11352 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11353
11354 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11355
11356 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11357 function in r262149, changing "loc" param from source_location to
11358 const dump_location_t &.
11359 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11360 declaration, as above.
11361
11362 2018-07-01 Paul Koning <ni1d@arrl.net>
11363
11364 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11365 -munit-asm, -mgnu-asm, -mdec-asm.
11366 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11367 (pdp11_output_labelref): New.
11368 (pdp11_output_def): New.
11369 (pdp11_output_addr_vec_elt): New.
11370 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11371 %# and %@ format codes.
11372 (pdp11_option_override): New.
11373 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11374 (pdp11_output_ident): New.
11375 (pdp11_asm_named_section): New.
11376 (pdp11_asm_init_sections): New.
11377 (pdp11_file_start): New.
11378 (pdp11_file_end): New.
11379 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11380 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11381 %o, like %c but octal.
11382 (pdp11_option_override): New.
11383 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11384 -mdec-asm.
11385 (DATA_SECTION_ASM_OP): Ditto.
11386 (READONLY_DATA_SECTION_ASM_OP): New.
11387 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11388 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11389 (ASM_OUTPUT_LABELREF): Ditto.
11390 (ASM_OUTPUT_DEF): Ditto.
11391 (ASM_OUTPUT_EXTERNAL): New.
11392 (ASM_OUTPUT_SOURCE_FILENAME): New.
11393 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11394 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11395 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11396 %# and %@ format codes.
11397 * config/pdp11/pdp11.opt (mgnu-asm): New.
11398 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11399 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11400 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11401
11402 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11403
11404 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11405 dereferencing path[] beyond its length.
11406 (debug_path): New.
11407 (debug_all_paths): New.
11408 (rewire_first_differing_edge): New.
11409 (adjust_paths_after_duplication): New.
11410 (duplicate_thread_path): Call adjust_paths_after_duplication.
11411 Add new argument.
11412 (thread_through_all_blocks): Add new argument to
11413 duplicate_thread_path.
11414
11415 2018-06-30 Jim Wilson <jimw@sifive.com>
11416
11417 * config/riscv/predicates.md (p2m1_shift_operand): New.
11418 (high_mask_shift_operand): New.
11419 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11420 pattern using p2m1_shift_operand.
11421 (lshsi3_zero_extend_3+2): New combiner pattern using
11422 high_mask_shift_operand.
11423
11424 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11425
11426 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11427 split out from...
11428 (vect_recog_rotate_pattern): ...here.
11429 (vect_convert_input): Try to insert casts of invariants in the
11430 preheader.
11431 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11432 preheader to be empty.
11433
11434 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11435
11436 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11437 vector type. If given, install it in the new statement's
11438 STMT_VINFO_VECTYPE.
11439 (vect_element_precision): New function.
11440 (vect_unpromoted_value): New struct.
11441 (vect_unpromoted_value::vect_unpromoted_value): New function.
11442 (vect_unpromoted_value::set_op): Likewise.
11443 (vect_look_through_possible_promotion): Likewise.
11444 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11445 (vect_widened_op_tree, vect_convert_input): Likewise.
11446 (vect_convert_inputs, vect_convert_output): Likewise.
11447 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11448 to handle the optional cast of the multiplication result and
11449 vect_widened_op_tree to detect the widened multiplication itself.
11450 Do not require the input and output of promotion casts to have
11451 the same sign, but base the signedness of the operation on the
11452 input rather than the result. If the pattern includes two
11453 promotions, check that those promotions have the same sign.
11454 Do not restrict the MULT_EXPR handling to a double-width result;
11455 handle quadruple-width results and wider. Use vect_convert_inputs
11456 to convert the inputs to the common type.
11457 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11458 to handle the optional cast of the ABS result. Also allow a sign
11459 change or a sign extension between the ABS and MINUS.
11460 Use vect_widened_op_tree to detect the widened subtraction and use
11461 vect_convert_inputs to convert the inputs to the common type.
11462 (vect_handle_widen_op_by_const): Delete.
11463 (vect_recog_widen_op_pattern): New function.
11464 (vect_recog_widen_mult_pattern): Use it.
11465 (vect_recog_widen_shift_pattern): Likewise.
11466 (vect_recog_widen_sum_pattern): Use
11467 vect_look_through_possible_promotion to handle the promoted
11468 PLUS_EXPR operand.
11469
11470 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11471
11472 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11473 the containing gimple_seq *.
11474 * gimple-iterator.h (gsi_for_stmt): Declare it.
11475 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11476 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11477 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11478 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11479 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11480 checks.
11481 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11482 split out from...
11483 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11484 statement being replaced is part of an existing pattern
11485 definition sequence, inserting the new pattern statements before
11486 the original one.
11487 (vect_pattern_recog_1): Don't return a bool. If the statement
11488 is already part of a pattern, instead apply pattern matching
11489 to the pattern definition statements. Don't clear the
11490 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11491 (vect_pattern_recog): Don't break after the first match;
11492 continue processing the pattern definition statements instead.
11493 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11494
11495 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11496
11497 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11498 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11499 (vect_recog_widen_sum_pattern): Use it.
11500
11501 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11502
11503 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11504 phi is not a pattern statement and has not been replaced by
11505 a pattern statement.
11506 * tree-vect-patterns.c (type_conversion_p): Don't check
11507 STMT_VINFO_IN_PATTERN_P.
11508 (vect_recog_vector_vector_shift_pattern): Likewise.
11509 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11510 the pattern statement rather than the original statement; check
11511 directly for a WIDEN_MULT_EXPR here.
11512 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11513 vect_is_simple_use to return the pattern statement rather
11514 than the original statement; use is_pattern_stmt_p to check
11515 for such a pattern statement.
11516 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11517 to return the pattern statement rather than the original statement;
11518 don't do the same transformation here.
11519 (vect_is_simple_use): If the defining statement has been replaced
11520 by a pattern statement, return the pattern statement instead.
11521 Remove the corresponding (local) transformation from the vectype
11522 overload.
11523
11524 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11525
11526 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11527 end and default to null.
11528 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11529 (vectorizable_reduction): Update calls accordingly, dropping the
11530 gimple ** argument if the passed-back statement isn't needed.
11531 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11532 (vect_recog_rotate_pattern): Likewise.
11533 (vect_recog_mask_conversion_pattern): Likewise.
11534 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11535 (vect_mask_constant_operand_p): Likewise.
11536 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11537 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11538 (get_group_load_store_type, get_load_store_type): Likewise.
11539 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11540 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11541 (vectorizable_conversion, vectorizable_assignment): Likewise.
11542 (vectorizable_shift, vectorizable_operation): Likewise.
11543 (vectorizable_store, vect_is_simple_cond): Likewise.
11544 (vectorizable_condition, vectorizable_comparison): Likewise.
11545 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11546 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11547 and move it to the end. Cope with null def_stmt_outs.
11548
11549 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11550
11551 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11552
11553 2018-06-29 Jeff Law <law@redhat.com>
11554
11555 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11556 displacements for TARGET_V850E2V3 and newer.
11557 (TARGET_LRA_P): Remove. Defaults to LRA now.
11558 * config/v850/v850.md (sign23byte_load): Remove.
11559 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11560 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11561
11562 2018-06-29 Martin Liska <mliska@suse.cz>
11563
11564 PR lto/85759
11565 * coverage.c (coverage_init): Mangle full path name.
11566 * doc/invoke.texi: Document the change.
11567 * gcov-io.c (mangle_path): New.
11568 * gcov-io.h (mangle_path): Likewise.
11569 * gcov.c (mangle_name): Use mangle_path for path mangling.
11570
11571 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11572
11573 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11574 if starting source register is not even.
11575
11576 2018-06-29 Martin Liska <mliska@suse.cz>
11577
11578 PR tree-optimization/86263
11579 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11580 Make edge redirection.
11581
11582 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11583
11584 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11585 (dump_scope_depth): New variable.
11586 (get_dump_scope_depth): New function.
11587 (dump_begin_scope): New function.
11588 (dump_end_scope): New function.
11589 * dumpfile.h (get_dump_scope_depth): New declaration.
11590 (dump_begin_scope): New declaration.
11591 (dump_end_scope): New declaration.
11592 (class auto_dump_scope): New class.
11593 (AUTO_DUMP_SCOPE): New macro.
11594 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11595 AUTO_DUMP_SCOPE.
11596
11597 2018-06-29 Richard Biener <rguenther@suse.de>
11598
11599 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11600 compute_all_dependences succeeds.
11601 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11602 exceed --param loop-max-datarefs-for-datadeps.
11603
11604 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11605
11606 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11607
11608 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11609
11610 PR target/86348
11611 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11612 alternative 0 in preferred_for_speed attribute.
11613
11614 2018-06-28 Paul Koning <ni1d@arrl.net>
11615
11616 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11617 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11618 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11619 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11620 for shift insn patterns.
11621
11622 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11623
11624 * cgraph.c (cgraph_node::get_body): Replace assignments to
11625 "dump_file" with calls to set_dump_file.
11626 * dumpfile.c (alt_dump_file): Make static, and group with...
11627 (alt_flags): ...this definition.
11628 (dumps_are_enabled): New variable.
11629 (refresh_dumps_are_enabled): New function.
11630 (set_dump_file): New function.
11631 (set_alt_dump_file): New function.
11632 (gcc::dump_manager::dump_start): Replace assignments to
11633 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11634 set_alt_dump_file.
11635 (gcc::dump_manager::dump_finish): Likewise.
11636 * dumpfile.h (alt_dump_file): Delete decl.
11637 (dumps_are_enabled): New variable decl.
11638 (set_dump_file): New function decl.
11639 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11640 global.
11641 * tree-nested.c (lower_nested_functions): Replace assignments to
11642 "dump_file" with calls to set_dump_file.
11643
11644 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11645
11646 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11647 goto_locus of each outgoing edge of each basic block.
11648
11649 2018-06-28 Richard Biener <rguenther@suse.de>
11650
11651 * dwarf2out.c (decl_scope_table): Remove.
11652 (push_decl_scope): Likewise.
11653 (pop_decl_scope): Likewise.
11654 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11655 (gen_struct_or_union_type_die): Likewise.
11656 (gen_tagged_type_die): Likewise.
11657 (dwarf2out_init): Do not initialize decl_scope_table.
11658 (dwarf2out_c_finalize): Do not free it.
11659
11660 2018-06-28 Richard Biener <rguenther@suse.de>
11661
11662 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11663 deciding whether to not re-use a DIE.
11664
11665 2018-06-28 Richard Biener <rguenther@suse.de>
11666
11667 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11668 DW_AT_abstract_origin attribute.
11669
11670 2018-06-28 Martin Liska <mliska@suse.cz>
11671
11672 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11673 Use newly introduced constants.
11674 * tree-switch-conversion.h (struct jump_table_cluster):
11675 Define max_ratio_for_size and max_ratio_for_speed.
11676
11677 2018-06-28 Martin Liska <mliska@suse.cz>
11678
11679 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11680 Add new checking assert to catch invalid state.
11681 (jump_table_cluster::can_be_handled): Handle single case
11682 clusters.
11683 (jump_table_cluster::is_beneficial): Bail out for such case.
11684 (bit_test_cluster::find_bit_tests):
11685 Add new checking assert to catch invalid state.
11686 (bit_test_cluster::can_be_handled): Handle single case
11687 clusters.
11688 (bit_test_cluster::is_beneficial): Bail out for such case.
11689 (switch_decision_tree::analyze_switch_statement):
11690 Fix comment.
11691
11692 2018-06-28 Martin Liska <mliska@suse.cz>
11693
11694 * common.opt: Introduce -completion option.
11695 * gcc.c (driver_handle_option): Handle it.
11696 (driver::main): Print completions if completion
11697 is set.
11698 * opt-suggestions.c (option_proposer::get_completions):
11699 New function.
11700 (option_proposer::suggest_completion): Likewise.
11701 (option_proposer::find_param_completions): Likewise.
11702 (verify_autocompletions): Likewise.
11703 (test_completion_valid_options): Likewise.
11704 (test_completion_valid_params): Likewise.
11705 (in_completion_p): Likewise.
11706 (empty_completion_p): Likewise.
11707 (test_completion_partial_match): Likewise.
11708 (test_completion_garbage): Likewise.
11709 (opt_proposer_c_tests): Likewise.
11710 * opt-suggestions.h: Declare new functions.
11711 * opts.c (common_handle_option): Handle OPT__completion_.
11712 * selftest-run-tests.c (selftest::run_tests): Add
11713 opt_proposer_c_tests.
11714 * selftest.c (assert_str_startswith): New.
11715 * selftest.h (assert_str_startswith): Likewise.
11716 (opt_proposer_c_tests): New.
11717 (ASSERT_STR_STARTSWITH): Likewise.
11718
11719 2018-06-28 Martin Liska <mliska@suse.cz>
11720
11721 * Makefile.in: Add opt-suggestions.o.
11722 * gcc-main.c: Include opt-suggestions.h.
11723 * gcc.c (driver::driver): Likewise.
11724 (driver::~driver): Remove m_option_suggestions.
11725 (driver::build_option_suggestions): Moved to option_proposer.
11726 (driver::suggest_option): Likewise.
11727 (driver::handle_unrecognized_options): Use option_proposer.
11728 * gcc.h (class driver): Add new memver m_option_proposer.
11729 * opt-suggestions.c: New file.
11730 * opt-suggestions.h: New file.
11731
11732 2018-06-28 Martin Liska <mliska@suse.cz>
11733
11734 * vec.h (class auto_string_vec): New (moved from auto_argvec).
11735 (auto_string_vec::~auto_string_vec): Likewise.
11736
11737 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11738
11739 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11740 prevent_decl_creation_for_types fields up and add reset_location field.
11741 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11742 statement if id->reset_location is true.
11743 (copy_edges_for_bb): Do not set goto_locus on the new edges if
11744 id->reset_location is true.
11745 (copy_phis_for_bb): Force input_location on the arguments if
11746 id->reset_location is true.
11747 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11748 is set on the function to be inlined.
11749
11750 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
11751
11752 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11753
11754 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
11755
11756 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11757 registers for Pmode.
11758 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11759 hard registers for the clobbered pseudo.
11760
11761 2018-06-27 Paul Koning <ni1d@arrl.net>
11762
11763 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11764 mutually exclusive options.
11765 * config/pdp11/constraints.md (h): New constraint.
11766 (O): Update definition to match shift code generation.
11767 (D): New constraint.
11768 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11769 (CCFP): Remove.
11770 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11771 function.
11772 (output_jump): Change arguments.
11773 (pdp11_fixed_cc_regs): New function.
11774 (pdp11_cc_mode): Ditto.
11775 (pdp11_expand_shift): Ditto.
11776 (pdp11_assemble_shift): Ditto.
11777 (pdp11_small_shift): Ditto.
11778 (pdp11_branch_cost): Remove.
11779 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11780 from output.
11781 (pdp11_register_move_cost): Update for CC registers.
11782 (pdp11_rtx_costs): Add case for LSHIFTRT.
11783 (pdp11_output_jump): Add CCNZ mode conditional branches.
11784 (notice_update_cc_on_set): Remove.
11785 (pdp11_cc_mode): New function.
11786 (simple_memory_operand): Correct pre/post decrement case.
11787 (no_side_effect_operand): New function.
11788 (pdp11_regno_reg_class): Add CC_REGS class.
11789 (pdp11_fixed_cc_regs): New function.
11790 (pdp11_small_shift): New function.
11791 (pdp11_expand_shift): New function to expand shift insns.
11792 (pdp11_assemble_shift): New function to output shifts.
11793 (pdp11_branch_cost): Remove.
11794 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
11795 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
11796 (WCHAR_TYPE): Ditto.
11797 (PTRDIFF_TYPE): Ditto.
11798 (ADJUST_INSN_LENGTH): New macro.
11799 (FIXED_REGISTERS): Add CC registers.
11800 (CALL_USED_REGISTERS): Ditto.
11801 (reg_class): Ditto.
11802 (REG_CLASS_NAMES): Ditto.
11803 (REG_CLASS_CONTENTS): Ditto.
11804 (SELECT_CC_MODE): Use new function.
11805 (TARGET_FLAGS_REGNUM): New macro.
11806 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
11807 (cc0_reg_rtx): Remove.
11808 (CC_STATUS_MDEP): Remove.
11809 (CC_STATUS_MDEFP_INIT): Remove.
11810 (CC_IN_FPU): Remove.
11811 (NOTICE_UPDATE_CC): Remove.
11812 (REGISTER_NAMES): Add CC registers.
11813 (BRANCH_COST): Change to constant 1.
11814 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
11815 handling.
11816 * config/pdp11/pdp11.opt (mbcopy): Remove.
11817 (mbcopy-builtin): Remove.
11818 (mbranch-cheap): Remove.
11819 (mbranch-expensive): Remove.
11820 * config/pdp11/predicates.md (expand_shift_operand): Update to
11821 match shift code generation.
11822 (ccnz_operator): New predicate.
11823 * doc/invoke.texi (PDP-11 Options): Remove deleted options
11824 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
11825 Remove non-existent option -mabshi, -mno-abshi. Document mutually
11826 exclusive options.
11827 * doc/md.texi (PDP-11): Document new D and h constraints. Update
11828 description of O constraint.
11829
11830 2018-06-27 Jeff Law <law@redhat.com>
11831 Austin Law <austinklaw@gmail.com>
11832
11833 * config/v850/v850.md (addsi3_set_flags): New pattern.
11834 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
11835 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
11836 (zero_extendhisi2_v850_set_flags): Likewise.
11837 (zero_extendqisi2_v850_set_flags): Likewise.
11838 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
11839 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
11840 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
11841
11842 * config/v850/v850-protos.h (notice_update_cc): Remove.
11843 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
11844 (v850_print_operand): Handle 'D' and "d".
11845 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
11846 Add handling of arithmetic/logical operations compared against zero.
11847 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
11848 Do not look at v850_compare_op, instead get mode from last argument.
11849 (v850_gen_compare): Remove
11850 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
11851 after reload for prologue insns.
11852 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
11853 patterns.
11854 (construct_save_jarl): Likewise.
11855 (TARGET_FLAGS_REGNUM): Define.
11856 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
11857 (NOTICE_UPDATE_CC): Remove.
11858 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
11859 than cc0. Conditionalize on reload_completed.
11860 (cmpsi_insn, setfcc_insn): Likewise.
11861 (tst1 splitter): Turn into define_and_split which sets the flags
11862 after reload.
11863 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
11864 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
11865 (cstoresf4, cstoredf4): Clobber the flags.
11866 (cmpsi, cmpsf, cmpdf): Remove expanders.
11867 (setf_insn): Remove pattern.
11868 (addsi3): Turn into define_and_split which clobbers the flags after
11869 reload and a suitable pattern (addsi3_clobber_flags) for use after
11870 reload.
11871 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
11872 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
11873 (ashrsi3, ashrsi3_v850e2): Likewise.
11874 (bins): Clobber the flags.
11875 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
11876 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
11877 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
11878 (call_value_internal_short, call_value_internal_long): Likewise.
11879 (callt_save_interrupt, callt_return_interrupt): Likewise.
11880 (save_interrupt, return_interrupt): Likewise.
11881 (callt_save_all_interrupt, save_all_interrupt): Likewise.
11882 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
11883 (restore_all_interrupt, _restore_all_interrupt): Likewise.
11884 (All FP comparisons): Only allow after reload has completed.
11885 (trfsr): Likewise.
11886 (divh, divhu): Tweak output template.
11887 (branch_z_normal, branch_z_invert): Remove
11888 (branch_nz_normal, branch_nz_invert): Likewise.
11889 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
11890
11891 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
11892 * config/v850/v850.c (notice_update_cc): Remove.
11893 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
11894 (CC_NO_CARRY): Likewise.
11895 (NOTICE_UPDATE_CC): Define to nothing.
11896 * config/v850/v850.md: Remove block comment on cc0 handling
11897 Remove "cc" attribute from all patterns. Remove cc_status handling
11898 from all patterns. Minor formatting fixes.
11899
11900 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11901
11902 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11903 (cortex-a76.cortex-a55): Likewise.
11904 * config/aarch64/aarch64-tune.md: Regenerate.
11905 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11906 cortex-a76.cortex-a55.
11907
11908 2018-06-27 Jeff Law <law@redhat.com>
11909
11910 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11911 (MULTILIB_DIRNAMES): Similarly.
11912
11913 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
11914
11915 * gimple.h (gimple_return_retbnd): Delete.
11916 (gimple_return_set_retbnd): Likewise.
11917 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11918 gimple_return_set_retbnd.
11919 * gimple-pretty-print.c (dump_gimple_return): Remove call to
11920 gimple_return_retbnd and adjust.
11921 * tree-inline.h (struct copy_body_data): Remove retbnd field.
11922 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11923 Explicitly return NULL in a couple more cases. Move assertion
11924 on debug statements and remove unreachable code.
11925 (reset_debug_binding): Do not test id->retbnd.
11926 (expand_call_inline): Do not set it.
11927
11928 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
11929
11930 * configure.ac: Add --disable-gcov option.
11931 * configure: Regenerate.
11932 * Makefile.in: Honour @enable_gcov@.
11933 * doc/install.texi: Document --disable-gcov.
11934
11935 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11936
11937 * config/arm/arm-cpus.in (cortex-a76): New entry.
11938 (cortex-a76.cortex-a55): Likewise.
11939 * config/arm/arm-tables.opt: Regenerate.
11940 * config/arm/arm-tune.md: Likewise.
11941 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11942 * doc/invoke.texi (ARM Options): Document cortex-a76 and
11943 cortex-a76.cortex-a55.
11944
11945 2018-06-27 Tamar Christina <tamar.christina@arm.com>
11946
11947 PR target/85769
11948 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11949
11950 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
11951
11952 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11953 comment.
11954 (EPILOGUE_USES): Likewise.
11955
11956 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
11957
11958 * tree-inline.c (remap_location): New function extracted from...
11959 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
11960 (copy_phis_for_bb): ...here. Call remap_location.
11961 (copy_cfg_body): Adjust call to copy_edges_for_bb.
11962
11963 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
11964
11965 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11966 unaligned vsx for 16B memset.
11967
11968 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
11969
11970 PR target/86285
11971 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11972 ieee128_float_type_node to long_double_type_node unless
11973 TARGET_LONG_DOUBLE_128 is set.
11974
11975 2018-06-26 David Malcolm <dmalcolm@redhat.com>
11976
11977 * cfgloop.c (get_loop_location): Convert return type from
11978 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11979 by implicit construction from rtx_insn *, and using
11980 dump_user_location_t::from_function_decl for the fallback case.
11981 * cfgloop.h (get_loop_location): Convert return type from
11982 location_t to dump_user_location_t.
11983 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11984 dump_printf_loc to pass in a dump_location_t rather than a
11985 location_t, via the gimple stmt.
11986 * coverage.c (get_coverage_counts): Update calls to
11987 dump_printf_loc to pass in dump_location_t rather than a
11988 location_t.
11989 * doc/optinfo.texi (Dump types): Convert example of
11990 dump_printf_loc from taking "locus" to taking "insn". Update
11991 description of the "_loc" calls to cover dump_location_t.
11992 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11993 "selftest.h".
11994 (dump_user_location_t::dump_user_location_t): New constructors,
11995 from gimple *stmt and rtx_insn *.
11996 (dump_user_location_t::from_function_decl): New function.
11997 (dump_loc): Make static.
11998 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11999 const dump_location_t &.
12000 (dump_generic_expr_loc): Delete.
12001 (dump_printf_loc): Convert param "loc" from location_t to
12002 const dump_location_t &.
12003 (selftest::test_impl_location): New function.
12004 (selftest::dumpfile_c_tests): New function.
12005 * dumpfile.h: Include "profile-count.h".
12006 (class dump_user_location_t): New class.
12007 (struct dump_impl_location_t): New struct.
12008 (class dump_location_t): New class.
12009 (dump_printf_loc): Convert 2nd param from source_location to
12010 const dump_location_t &.
12011 (dump_generic_expr_loc): Delete.
12012 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12013 const dump_location_t &.
12014 * gimple-fold.c (fold_gimple_assign): Update call to
12015 dump_printf_loc to pass in a dump_location_t rather than a
12016 location_t, via the gimple stmt.
12017 (gimple_fold_call): Likewise.
12018 * gimple-loop-interchange.cc
12019 (loop_cand::analyze_iloop_reduction_var): Update for change to
12020 check_reduction_path.
12021 (tree_loop_interchange::interchange): Update for change to
12022 find_loop_location.
12023 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12024 change in return-type of find_loop_location.
12025 (graphite_regenerate_ast_isl): Likewise.
12026 * graphite-optimize-isl.c (optimize_isl): Likewise.
12027 * graphite.c (graphite_transform_loops): Likewise.
12028 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12029 pass in a dump_location_t rather than a location_t, via the
12030 gimple stmt.
12031 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12032 * ipa.c (walk_polymorphic_call_targets): Likewise.
12033 * loop-unroll.c (report_unroll): Convert "locus" param from
12034 location_t to dump_location_t.
12035 (decide_unrolling): Update for change to get_loop_location's
12036 return type.
12037 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12038 location_t to dump_user_location_t.
12039 (grid_find_single_omp_among_assignments_1): Updates calls to
12040 dump_printf_loc to pass in a dump_location_t rather than a
12041 location_t, via the gimple stmt.
12042 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12043 location_t to dump_location_t. Updates calls to dump_printf_loc
12044 to pass in a dump_location_t rather than a location_t, via the
12045 gimple stmt.
12046 (grid_inner_loop_gridifiable_p): Likewise.
12047 (grid_dist_follows_simple_pattern): Likewise.
12048 (grid_gfor_follows_tiling_pattern): Likewise.
12049 (grid_target_follows_gridifiable_pattern): Likewise.
12050 (grid_attempt_target_gridification): Convert initialization
12051 of local "grid" from memset to zero-initialization; FIXME: does
12052 this require C++11? Update call to dump_printf_loc to pass in a
12053 optinfo_location rather than a location_t, via the gimple stmt.
12054 * profile.c (read_profile_edge_counts): Updates call to
12055 dump_printf_loc to pass in a dump_location_t rather than a
12056 location_t
12057 (compute_branch_probabilities): Likewise.
12058 * selftest-run-tests.c (selftest::run_tests): Call
12059 dumpfile_c_tests.
12060 * selftest.h (dumpfile_c_tests): New decl.
12061 * tree-loop-distribution.c (pass_loop_distribution::execute):
12062 Update for change in return type of find_loop_location.
12063 * tree-parloops.c (parallelize_loops): Likewise.
12064 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12065 "locus" from location_t to dump_user_location_t.
12066 (canonicalize_loop_induction_variables): Likewise.
12067 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12068 for change in return type of find_loop_location.
12069 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12070 to dump_printf_loc to pass in a dump_location_t rather than a
12071 location_t, via the stmt.
12072 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12073 Likewise.
12074 * tree-vect-loop-manip.c (find_loop_location): Convert return
12075 type from source_location to dump_user_location_t.
12076 (vect_do_peeling): Update for above change.
12077 (vect_loop_versioning): Update for change in type of
12078 vect_location.
12079 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12080 from location_t to dump_user_location_t.
12081 (vect_estimate_min_profitable_iters): Update for change in type
12082 of vect_location.
12083 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12084 location_t to dump_location_t.
12085 (vect_slp_bb): Update for change in type of vect_location.
12086 * tree-vectorizer.c (vect_location): Convert from source_location
12087 to dump_user_location_t.
12088 (try_vectorize_loop_1): Update for change in vect_location's type.
12089 (vectorize_loops): Likewise.
12090 (increase_alignment): Likewise.
12091 * tree-vectorizer.h (vect_location): Convert from source_location
12092 to dump_user_location_t.
12093 (find_loop_location): Convert return type from source_location to
12094 dump_user_location_t.
12095 (check_reduction_path): Convert 1st param from location_t to
12096 dump_user_location_t.
12097 * value-prof.c (check_counter): Update call to dump_printf_loc to
12098 pass in a dump_user_location_t rather than a location_t; update
12099 call to error_at for change in type of "locus".
12100 (check_ic_target): Update call to dump_printf_loc to
12101 pass in a dump_user_location_t rather than a location_t, via the
12102 call_stmt.
12103
12104 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12105
12106 * config/s390/s390.h (enum processor_flags): Do not use
12107 default tune parameter when -march was specified.
12108
12109 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12110
12111 PR target/86314
12112 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12113 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12114 operands.
12115
12116 2018-06-26 Richard Biener <rguenther@suse.de>
12117
12118 PR tree-optimization/86287
12119 PR bootstrap/86316
12120 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12121 (vect_analyze_loop): Initialize n_stmts.
12122
12123 2018-06-26 Richard Biener <rguenther@suse.de>
12124
12125 PR middle-end/86271
12126 * fold-const.c (fold_convertible_p): Pointer extension
12127 isn't valid.
12128
12129 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12130
12131 PR debug/86064
12132 * dwarf2out.c (loc_list_has_views): Adjust comments.
12133 (dw_loc_list): Split single cross-partition range with
12134 nonzero locview.
12135
12136 2018-06-25 Jeff Law <law@redhat.com>
12137
12138 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12139 on -mbig-switch by default.
12140
12141 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12142 test.
12143 (const_float_0_operand): Remove unused predicate.
12144 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12145 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12146 (recipsf2): New expander. Original pattern now called
12147 (recipsf2_insn).
12148 (recipdf2, recipdf2_insn): Similarly.
12149 (rsqrtsf2, rsqrtsf2_insn): Similarly
12150 (rsqrtdf2, rsqrtdf2_insn): Similarly
12151
12152 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12153
12154 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12155 Simplify logic for FreeBSD (twice).
12156
12157 2018-06-25 Martin Sebor <msebor@redhat.com>
12158
12159 PR tree-optimization/86204
12160 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12161 a strnlen result if it's less than the length of the string.
12162
12163 2018-06-25 Martin Sebor <msebor@redhat.com>
12164
12165 PR tree-optimization/85700
12166 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12167 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12168 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12169
12170 2018-06-25 Martin Sebor <msebor@redhat.com>
12171
12172 * doc/extend.texi (Zero-length arrays): Update and clarify.
12173
12174 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12175
12176 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12177 added IEEE/IBM long double multilib support on PowerPC little
12178 endian Linux systems.
12179 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12180 (MULTILIB_DEFAULTS): Likewise.
12181 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12182 Likewise.
12183 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12184 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12185 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12186
12187 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12188
12189 PR middle-end/86311
12190 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12191 (REORDER_45): Likewise.
12192
12193 2018-06-25 Jeff Law <law@redhat.com>
12194
12195 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12196 dividend to 32 bits. Adjust length.
12197 (udivmodhi4): Cleanup output template. Fix length.
12198
12199 2018-06-25 Carl Love <cel@us.ibm.com>
12200
12201 * config/rs6000/vsx.md: Change word selector to prefered location.
12202
12203 2018-06-25 Richard Biener <rguenther@suse.de>
12204
12205 PR tree-optimization/86304
12206 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12207 epilogue-if-converted loops as well.
12208
12209 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12210
12211 * lto-section-out.c (lto_begin_section): Do not print section
12212 name for noaddr and unnumbered dumps.
12213
12214 2018-06-25 Richard Biener <rguenther@suse.de>
12215
12216 * tree-vectorizer.h (struct vec_info_shared): New structure
12217 with parts split out from struct vec_info and loop_nest from
12218 struct _loop_vec_info.
12219 (struct vec_info): Adjust accordingly.
12220 (struct _loop_vec_info): Likewise.
12221 (LOOP_VINFO_LOOP_NEST): Adjust.
12222 (LOOP_VINFO_DATAREFS): Likewise.
12223 (LOOP_VINFO_DDRS): Likewise.
12224 (struct _bb_vec_info): Likewise.
12225 (BB_VINFO_DATAREFS): Likewise.
12226 (BB_VINFO_DDRS): Likewise.
12227 (struct _stmt_vec_info): Add dr_aux member.
12228 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12229 (DR_MISALIGNMENT_UNINITIALIZED): New.
12230 (set_dr_misalignment): Adjust.
12231 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12232 (vect_analyze_loop): Adjust prototype.
12233 (vect_analyze_loop_form): Likewise.
12234 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12235 Compute dependences lazily.
12236 (vect_record_base_alignments): Use shared datarefs/ddrs.
12237 (vect_verify_datarefs_alignment): Likewise.
12238 (vect_analyze_data_refs_alignment): Likewise.
12239 (vect_analyze_data_ref_accesses): Likewise.
12240 (vect_analyze_data_refs): Likewise.
12241 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12242 constructor parameter for shared part.
12243 (vect_analyze_loop_form): Pass in shared part and adjust.
12244 (vect_analyze_loop_2): Pass in storage for the number of
12245 stmts. Move loop nest finding to the caller. Compute
12246 datarefs lazily.
12247 (vect_analyze_loop): Pass in shared part.
12248 (vect_transform_loop): Verify shared datarefs are unchanged.
12249 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12250 constructor parameter for shared part.
12251 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12252 (vect_slp_bb): Verify shared datarefs are unchanged before
12253 transform.
12254 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12255 change.
12256 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12257 DR_MISALIGNMENT_UNINITIALIZED.
12258 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12259 parameter for shared part.
12260 (vec_info::~vec_info): Adjust.
12261 (vec_info_shared::vec_info_shared): New.
12262 (vec_info_shared::~vec_info_shared): Likewise.
12263 (vec_info_shared::save_datarefs): Likewise.
12264 (vec_info_shared::check_datarefs): Likewise.
12265 (try_vectorize_loop_1): Construct shared part live for analyses
12266 of a single loop for multiple vector sizes.
12267 * tree-parloops.c (gather_scalar_reductions): Adjust.
12268
12269 2018-06-25 Richard Biener <rguenther@suse.de>
12270
12271 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12272 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12273 (vect_analyze_data_refs): Remove similar code from here and
12274 simplify accordingly.
12275
12276 2018-06-25 Richard Biener <rguenther@suse.de>
12277
12278 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12279 for reverse storage order accesses rather than asserting
12280 they cannot happen here.
12281
12282 2018-06-25 Tom de Vries <tdevries@suse.de>
12283
12284 PR debug/86257
12285 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12286 Use data16 instead of .byte for insn prefix.
12287
12288 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12289
12290 PR C++/86082
12291 * parser.c (make_char_string_pack): Pass this literal chars
12292 through cpp_interpret_string.
12293 (cp_parser_userdef_numeric_literal): Check the result of
12294 make_char_string_pack.
12295
12296 2018-06-24 Maya Rashish <coypu@sdf.org>
12297
12298 * ginclude/stddef.h: Simplify conditions around avoiding
12299 re-definition of __size_t.
12300
12301 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12302
12303 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12304 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12305
12306 2018-06-22 Maya Rashish <coypu@sdf.org>
12307
12308 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12309 made to OpenBSD and NetBSD through the years.
12310
12311 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12312
12313 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12314 behavior of vec_pack (vector double, vector double) to match
12315 behavior of vec_float2 (vector double, vector double).
12316
12317 2018-06-22 Olivier Hainque <hainque@adacore.com>
12318
12319 * gimplify.c (gimplify_function_tree): Prevent creation
12320 of a trampoline for the address of the current function
12321 passed to entry/exit instrumentation hooks.
12322
12323 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12324
12325 PR target/86222
12326 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12327 correctly.
12328
12329 2018-06-22 Martin Liska <mliska@suse.cz>
12330
12331 PR tree-optimization/86263
12332 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12333 Bail out if is_enabled is false.
12334 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12335 New declaration.
12336 (jump_table_cluster::is_enabled): New function.
12337
12338 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12339
12340 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12341 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12342 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12343 (lto_input_ts_binfo_tree_pointers): Likewise.
12344 * tree-streamer-out.c (streamer_write_tree_bitfields,
12345 write_ts_binfo_tree_pointers): Likewise.
12346 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12347
12348 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12349
12350 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12351
12352 2018-06-22 Martin Liska <mliska@suse.cz>
12353
12354 * symbol-summary.h (get): Make it pure and inline move
12355 functionality from ::get function.
12356 (get): Remove and inline into ::get and ::get_create.
12357 (get_create): Move code from ::get function.
12358
12359 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12360
12361 PR target/85994
12362 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12363 -x assembler-with-cpp.
12364
12365 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12366
12367 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12368 _FILE_OFFSET_BITS=64 for C++.
12369
12370 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12371
12372 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12373 conversion insn that shows up when pr85657-3.c is compiled using
12374 IEEE 128-bit long double.
12375 (neg<mode>2_internal): Use the correct mode to check whether the
12376 mode is IBM extended.
12377 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12378 multiply and divide external functions from being created more
12379 than once.
12380
12381 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12382
12383 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12384 functions.
12385 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12386 the edge can be forwarded.
12387 (cfg_layout_merge_blocks): Likewise.
12388
12389 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12390
12391 * except.c (finish_eh_generation): Commit edge insertions only after
12392 the EH edges have been redirected from post-landing to landing pads.
12393
12394 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12395
12396 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12397 create_tmp_var_for to create the FRAME decl.
12398 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12399
12400 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12401
12402 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12403 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12404 debug statement when resetting its value.
12405 (expand_call_inline): Copy the locus of the call onto the assignment
12406 of the return value, if any. Use local variable in more cases.
12407
12408 2018-06-21 Martin Liska <mliska@suse.cz>
12409
12410 * ipa-pure-const.c (propagate_nothrow): Use
12411 funct_state_summaries->get.
12412 (dump_malloc_lattice): Likewise.
12413 (propagate_malloc): Likewise.
12414
12415 2018-06-21 Richard Biener <rguenther@suse.de>
12416
12417 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12418 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12419 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12420 comment.
12421 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12422 BLOCK_ABSTRACT_ORIGIN unconditionally.
12423
12424 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12425
12426 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12427 deleting it.
12428 * ipa-reference.c (ipa_reference_c_finalize): Delete
12429 ipa_ref_opt_sum_summaries and set it to NULL.
12430
12431 2018-06-21 Tom de Vries <tdevries@suse.de>
12432
12433 PR tree-optimization/85859
12434 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12435 test with comment from bb_no_side_effects_p.
12436
12437 2018-06-21 Richard Biener <rguenther@suse.de>
12438
12439 PR tree-optimization/86232
12440 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12441 max for constant niter.
12442
12443 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12444
12445 * config/aarch64/aarch64-simd.md
12446 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12447
12448 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12449
12450 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12451 Make opernads of the unspec commutative.
12452
12453 2018-06-21 Richard Biener <rguenther@suse.de>
12454
12455 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12456 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12457 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12458 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12459 NULL DR_STEP.
12460 (vect_record_base_alignments): Do not record base alignment
12461 for gathers or scatters.
12462 (vect_compute_data_ref_alignment): Drop return value that is always
12463 true. Bail out early for gathers or scatters.
12464 (vect_enhance_data_refs_alignment): Bail out early for gathers
12465 or scatters.
12466 (vect_find_same_alignment_drs): Likewise.
12467 (vect_analyze_data_refs_alignment): Remove dead code.
12468 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12469 (vect_analyze_data_refs): For possible gathers or scatters do
12470 not create an alternate DR, just check their possible validity
12471 and mark them. Adjust DECL_NONALIASED handling to not rely
12472 on DR_BASE_ADDRESS.
12473 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12474 update inits of gathers or scatters.
12475 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12476 Also copy gather/scatter flag to pattern vinfo.
12477
12478 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12479
12480 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12481 behavior of vec_packsu (vector unsigned long long, vector unsigned
12482 long long) to match behavior of vec_packs with same signature.
12483
12484 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12485 Thomas Schwinge <thomas@codesourcery.com>
12486 Cesar Philippidis <cesar@codesourcery.com>
12487
12488 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12489 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12490 (gimplify_adjust_omp_clauses): Likewise.
12491 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12492 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12493 (gimplify_omp_target_update): Update handling of acc update and
12494 enter/exit data.
12495 * omp-low.c (install_var_field): Remove unused parameter
12496 base_pointers_restrict.
12497 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12498 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12499 FINALIZE}
12500 (omp_target_base_pointers_restrict_p): Delete.
12501 (scan_omp_target): Update call to scan_sharing_clauses.
12502 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12503 FINALIZE}.
12504 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12505 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12506 (convert_local_omp_clauses): Likewise.
12507 * tree-pretty-print.c (dump_omp_clause): Likewise.
12508 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12509 FINALIZE}.
12510 (omp_clause_code_name): Likewise.
12511
12512 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12513
12514 PR debug/86194
12515 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12516 be narrowed.
12517
12518 PR tree-optimization/86231
12519 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12520 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12521
12522 2018-06-20 Tom de Vries <tdevries@suse.de>
12523
12524 PR tree-optimization/86097
12525 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12526 iv type if signedness of iv type is not the same as that of *nit.
12527
12528 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12529
12530 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12531 EDGE_EH edges, verify they are all EDGE_EH.
12532
12533 2018-06-20 Maya Rashish <coypu@sdf.org>
12534
12535 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12536
12537 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12538
12539 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12540 * config/aarch64/aarch64.c (xgene1_tunings): Add
12541 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12542 (aarch64_mode_valid_for_sched_fusion_p):
12543 Allow 16-byte modes.
12544 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12545 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12546 128-bit modes.
12547 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12548 New pattern.
12549 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12550 * config/aarch64/iterators.md (VQ2): New mode iterator.
12551
12552 2018-06-20 Martin Liska <mliska@suse.cz>
12553
12554 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12555 Change default ratio from 10 to 8.
12556
12557 2018-06-20 Martin Liska <mliska@suse.cz>
12558
12559 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12560 New.
12561 (bit_test_cluster::find_bit_tests): Likewise.
12562 (switch_decision_tree::analyze_switch_statement): Find clusters.
12563 * tree-switch-conversion.h (struct jump_table_cluster): Document
12564 hierarchy.
12565
12566 2018-06-20 Martin Liska <mliska@suse.cz>
12567
12568 * tree-switch-conversion.c (switch_conversion::collect):
12569 Record m_uniq property.
12570 (switch_conversion::expand): Bail out for special conditions.
12571 (group_cluster::~group_cluster): New.
12572 (group_cluster::group_cluster): Likewise.
12573 (group_cluster::dump): Likewise.
12574 (jump_table_cluster::emit): New.
12575 (switch_decision_tree::fix_phi_operands_for_edges): New.
12576 (struct case_node): Remove struct.
12577 (jump_table_cluster::can_be_handled): New.
12578 (case_values_threshold): Moved to header.
12579 (reset_out_edges_aux): Likewise.
12580 (jump_table_cluster::is_beneficial): New.
12581 (bit_test_cluster::can_be_handled): Likewise.
12582 (add_case_node): Remove.
12583 (bit_test_cluster::is_beneficial): New.
12584 (case_bit_test::cmp): New.
12585 (bit_test_cluster::emit): New.
12586 (expand_switch_as_decision_tree_p): Remove.
12587 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12588 (fix_phi_operands_for_edge): Likewise.
12589 (switch_decision_tree::analyze_switch_statement): New.
12590 (compute_cases_per_edge): Move ...
12591 (switch_decision_tree::compute_cases_per_edge): ... here.
12592 (try_switch_expansion): Likewise.
12593 (switch_decision_tree::try_switch_expansion): Likewise.
12594 (record_phi_operand_mapping): Likewise.
12595 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12596 (emit_case_decision_tree): Likewise.
12597 (switch_decision_tree::emit): Likewise.
12598 (balance_case_nodes): Likewise.
12599 (switch_decision_tree::balance_case_nodes): Likewise.
12600 (dump_case_nodes): Likewise.
12601 (switch_decision_tree::dump_case_nodes): Likewise.
12602 (emit_jump): Likewise.
12603 (switch_decision_tree::emit_jump): Likewise.
12604 (emit_cmp_and_jump_insns): Likewise.
12605 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12606 (emit_case_nodes): Likewise.
12607 (switch_decision_tree::emit_case_nodes): Likewise.
12608 (conditional_probability): Remove.
12609 * tree-switch-conversion.h (enum cluster_type): New.
12610 (PRINT_CASE): New.
12611 (struct cluster): Likewise.
12612 (cluster::cluster): Likewise.
12613 (struct simple_cluster): Likewise.
12614 (simple_cluster::simple_cluster): Likewise.
12615 (struct group_cluster): Likewise.
12616 (struct jump_table_cluster): Likewise.
12617 (struct bit_test_cluster): Likewise.
12618 (struct min_cluster_item): Likewise.
12619 (struct case_tree_node): Likewise.
12620 (case_tree_node::case_tree_node): Likewise.
12621 (jump_table_cluster::case_values_threshold): Likewise.
12622 (struct case_bit_test): Likewise.
12623 (struct switch_decision_tree): Likewise.
12624 (struct switch_conversion): Likewise.
12625 (switch_decision_tree::reset_out_edges_aux): Likewise.
12626
12627 2018-06-20 Martin Liska <mliska@suse.cz>
12628
12629 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12630 (hoist_edge_and_branch_if_true): Likewise.
12631 (expand_switch_using_bit_tests_p): Likewise.
12632 (struct case_bit_test): Likewise.
12633 (case_bit_test_cmp): Likewise.
12634 (emit_case_bit_tests): Likewise.
12635 (switch_conversion::switch_conversion): New class.
12636 (struct switch_conv_info): Remove old struct.
12637 (collect_switch_conv_info): More to ...
12638 (switch_conversion::collect): ... this.
12639 (check_range): Likewise.
12640 (switch_conversion::check_range): Likewise.
12641 (check_all_empty_except_final): Likewise.
12642 (switch_conversion::check_all_empty_except_final): Likewise.
12643 (check_final_bb): Likewise.
12644 (switch_conversion::check_final_bb): Likewise.
12645 (create_temp_arrays): Likewise.
12646 (switch_conversion::create_temp_arrays): Likewise.
12647 (free_temp_arrays): Likewise.
12648 (gather_default_values): Likewise.
12649 (switch_conversion::gather_default_values): Likewise.
12650 (build_constructors): Likewise.
12651 (switch_conversion::build_constructors): Likewise.
12652 (constructor_contains_same_values_p): Likewise.
12653 (switch_conversion::contains_same_values_p): Likewise.
12654 (array_value_type): Likewise.
12655 (switch_conversion::array_value_type): Likewise.
12656 (build_one_array): Likewise.
12657 (switch_conversion::build_one_array): Likewise.
12658 (build_arrays): Likewise.
12659 (switch_conversion::build_arrays): Likewise.
12660 (gen_def_assigns): Likewise.
12661 (switch_conversion::gen_def_assigns): Likewise.
12662 (prune_bbs): Likewise.
12663 (switch_conversion::prune_bbs): Likewise.
12664 (fix_phi_nodes): Likewise.
12665 (switch_conversion::fix_phi_nodes): Likewise.
12666 (gen_inbound_check): Likewise.
12667 (switch_conversion::gen_inbound_check): Likewise.
12668 (process_switch): Use the newly created class.
12669 (switch_conversion::expand): New.
12670 (switch_conversion::~switch_conversion): New.
12671 * tree-switch-conversion.h: New file.
12672
12673 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12674
12675 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12676 tree-vect-patterns.c.
12677 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12678 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12679 (vect_recog_sad_pattern): Likewise.
12680 (vect_recog_widen_sum_pattern): Likewise.
12681 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12682 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12683 (vect_recog_rotate_pattern): Likewise.
12684 (vect_recog_mult_pattern): Likewise.
12685 (vect_recog_vector_vector_shift_pattern): Likewise.
12686 (vect_recog_divmod_pattern): Likewise.
12687 (vect_recog_mixed_size_cond_pattern): Likewise.
12688 (vect_recog_bool_pattern): Likewise.
12689 (vect_recog_mask_conversion_pattern): Likewise.
12690 (vect_try_gather_scatter_pattern): Likewise.
12691 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12692 (vect_recog_over_widening_pattern): Likewise.
12693 (vect_recog_gather_scatter_pattern): Likewise.
12694 (vect_recog_func_ptr): Move from tree-vectorizer.h
12695 (vect_vect_recog_func_ptrs): Move further down the file.
12696 (vect_recog_func): Likewise. Remove the third argument.
12697 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12698 (vect_pattern_recog_1): Expect the pattern function to do any
12699 necessary target tests. Also expect it to provide a vector type.
12700 Remove the type_in handling.
12701
12702 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12703
12704 * tree-vect-patterns.c (vect_pattern_detected): New function.
12705 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12706 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12707 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12708 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12709 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12710 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12711 (vect_recog_mask_conversion_pattern)
12712 (vect_try_gather_scatter_pattern): Likewise.
12713
12714 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12715
12716 * tree-vect-patterns.c (vect_get_internal_def): New function.
12717 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12718 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12719 (search_type_for_mask_1): Use it.
12720
12721 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12722
12723 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12724 redundant WIDEN_SUM_EXPR handling.
12725 (vect_recog_sad_pattern): Likewise.
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 check that the types of a PLUS_EXPR or MULT_EXPR agree.
12731 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12732 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12733 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12734
12735 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12736
12737 * tree-vect-stmts.c (vectorizable_call): Make sure that we
12738 use the stmt_vec_info of the original bb statement for the
12739 new zero assignment, even if the call is part of a pattern.
12740
12741 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12742
12743 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12744 that the sequence is attached to the original statement rather
12745 than the pattern statement.
12746 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12747 PATTERN_DEF_SEQ from the original statement rather than
12748 the main pattern statement.
12749 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12750 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12751 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12752
12753 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12754
12755 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12756 definition statements before the early exit for statements that aren't
12757 live or relevant.
12758 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12759 split out from...
12760 (vect_transform_loop): ...here. Process pattern definition
12761 statements without first checking whether the main pattern
12762 statement is live or relevant.
12763
12764 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12765
12766 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12767 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12768
12769 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
12770
12771 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12772 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12773 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12774 (expand_block_compare): Change select_block_compare_mode call.
12775 (expand_strncmp_align_check): Use new functions, fix comment.
12776 (emit_final_str_compare_gpr): New function.
12777 (expand_strn_compare): Refactor and clean up code.
12778 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12779
12780 2018-06-19 Tony Reix <tony.reix@atos.com>
12781 Damien Bergamini <damien.bergamini@atos.com>
12782 David Edelsohn <dje.gcc@gmail.com>
12783
12784 * collect2.c (static_obj): New variable.
12785 (static_libs): New variable.
12786 (is_in_list): Uncomment declaration.
12787 (main): Track AIX libraries linked statically.
12788 (is_in_list): Uncomment definition.
12789 (scan_prog_file): Don't add AIX shared libraries initializer
12790 to constructor list if linking statically.
12791
12792 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
12793
12794 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
12795 constant.
12796 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
12797
12798 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
12799
12800 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
12801 blocks.
12802
12803 2018-06-19 Martin Liska <mliska@suse.cz>
12804
12805 * config/i386/i386.c (ix86_can_inline_p): Do not use
12806 ipa_fn_summaries::get_create.
12807 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
12808 get.
12809 (devirtualization_time_bonus): Likewise.
12810 (ipcp_propagate_stage): Likewise.
12811 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12812 (edge_set_predicate): Likewise.
12813 (evaluate_conditions_for_known_args): Likewise.
12814 (evaluate_properties_for_edge): Likewise.
12815 (ipa_call_summary::reset): Tranform to ...
12816 (ipa_call_summary::~ipa_call_summary): ... this.
12817 (ipa_fn_summary::reset): Transform to ...
12818 (ipa_fn_summary::~ipa_fn_summary): ... this.
12819 (ipa_fn_summary_t::remove): Rename to ...
12820 (ipa_fn_summary_t::remove_callees): ... this.
12821 (ipa_fn_summary_t::duplicate): Use placement new
12822 instead of memory copy.
12823 (ipa_call_summary_t::duplicate): Likewise.
12824 (ipa_call_summary_t::remove): Remove.
12825 (dump_ipa_call_summary): Change get_create to get.
12826 (ipa_dump_fn_summary): Dump only when summary exists.
12827 (analyze_function_body): Use symbol_summary::get instead
12828 of get_create.
12829 (compute_fn_summary): Likewise.
12830 (estimate_edge_devirt_benefit): Likewise.
12831 (estimate_edge_size_and_time): Likewise.
12832 (inline_update_callee_summaries): Likewise.
12833 (remap_edge_change_prob): Likewise.
12834 (remap_edge_summaries): Likewise.
12835 (ipa_merge_fn_summary_after_inlining): Likewise.
12836 (write_ipa_call_summary): Likewise.
12837 (ipa_fn_summary_write): Likewise.
12838 (ipa_free_fn_summary): Likewise.
12839 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
12840 (struct ipa_call_summary): Likewise.
12841 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
12842 of get_create.
12843 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
12844 (estimate_size_after_inlining): Likewise.
12845 (estimate_growth): Likewise.
12846 (growth_likely_positive): Likewise.
12847 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12848 (inline_call): Likewise.
12849 * ipa-inline.c (caller_growth_limits): Likewise.
12850 (can_inline_edge_p): Likewise.
12851 (can_inline_edge_by_limits_p): Likewise.
12852 (compute_uninlined_call_time): Likewise.
12853 (compute_inlined_call_time): Likewise.
12854 (want_inline_small_function_p): Likewise.
12855 (edge_badness): Likewise.
12856 (update_caller_keys): Likewise.
12857 (update_callee_keys): Likewise.
12858 (inline_small_functions): Likewise.
12859 (inline_to_all_callers_1): Likewise.
12860 (dump_overall_stats): Likewise.
12861 (early_inline_small_functions): Likewise.
12862 (early_inliner): Likewise.
12863 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12864 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12865 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12866 * ipa-split.c (execute_split_functions): Likewise.
12867 * symbol-summary.h: Likewise.
12868 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12869
12870 2018-06-19 Richard Biener <rguenther@suse.de>
12871
12872 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
12873 (vectorize_loops): ... here. Fix dbgcnt handling.
12874 (try_vectorize_loop): Wrap try_vectorize_loop_1.
12875
12876 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
12877
12878 PR target/86197
12879 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
12880 ieee128 argument takes up only one (vector) register, not two (floating
12881 point) registers.
12882
12883 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
12884
12885 * gimplify.c (gimplify_init_constructor): Really never clear for an
12886 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
12887
12888 2018-06-19 Richard Biener <rguenther@suse.de>
12889
12890 PR tree-optimization/86179
12891 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
12892 after failed recognition.
12893
12894 2018-06-18 Martin Sebor <msebor@redhat.com>
12895
12896 PR middle-end/85602
12897 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12898 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12899 Handle integer subtraction.
12900 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12901 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12902
12903 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12904
12905 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12906 param from rtx to rtx_insn *.
12907 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12908 param.
12909 (frv_ifcvt_modify_insn): Likwise.
12910 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12911 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
12912 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12913 as_a <rtx_insn *> cast to local "unprotected_region" once
12914 it's been established that it's not NULL or pc_rtx.
12915 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12916 param "sethi" from rtx to rtx_insn *.
12917 (nds32_group_float_insns): Likewise for param "insn".
12918 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12919 param.
12920 (vax_output_int_subtract): Likewise.
12921 * config/vax/vax.c (vax_output_int_add): Likewise for param
12922 "insn".
12923 (vax_output_int_subtract): Likewise.
12924 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12925 (emit_pattern_after): Likewise for param "after".
12926 (emit_insn_after): Likewise.
12927 (emit_jump_insn_after): Likewise.
12928 (emit_call_insn_after): Likewise.
12929 (emit_debug_insn_after): Likewise.
12930 (emit_pattern_before): Likewise for param "before".
12931 (emit_insn_before): Likewise.
12932 (emit_jump_insn_before): Likewise.
12933 * final.c (get_insn_template): Likewise for param "insn", removing
12934 a cast.
12935 * output.h (get_insn_template): Likewise for 2nd param.
12936 * rtl.h (emit_insn_before): Likewise.
12937 (emit_jump_insn_before): Likewise.
12938 (emit_debug_insn_before_noloc): Likewise.
12939 (emit_insn_after): Likewise.
12940 (emit_jump_insn_after): Likewise.
12941 (emit_call_insn_after): Likewise.
12942 (emit_debug_insn_after): Likewise.
12943 (set_insn_deleted): Likewise for param.
12944
12945 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
12946
12947 PR target/85358
12948 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12949 floating point modes, so that IFmode is numerically greater than
12950 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12951 to declare the ordering. This prevents IFmode from being
12952 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12953 machine. Include rs6000-modes.h to share the fractional values
12954 between genmodes* and the rest of the compiler.
12955 (IFmode): Likewise.
12956 (KFmode): Likewise.
12957 (TFmode): Likewise.
12958 * config/rs6000/rs6000-modes.h: New file.
12959 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12960 meaning of rs6000_long_double_size so that 126..128 selects an
12961 appropriate 128-bit floating point type.
12962 (rs6000_option_override_internal): Likewise.
12963 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12964 (TARGET_LONG_DOUBLE_128): Change the meaning of
12965 rs6000_long_double_size so that 126..128 selects an appropriate
12966 128-bit floating point type.
12967 (LONG_DOUBLE_TYPE_SIZE): Update comment.
12968 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12969 source and destination to match the standard usage.
12970 (truncifkf2): Likewise.
12971 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12972 ISA 2.07 to use an explicit clobber, instead of passing in a
12973 temporary.
12974 (copysign<mode>3_soft): Likewise.
12975
12976 2018-06-18 David Malcolm <dmalcolm@redhat.com>
12977
12978 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12979 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12980 (vect_slp_analyze_instance_dependence): Likewise.
12981 (vect_enhance_data_refs_alignment): Likewise.
12982 (vect_analyze_data_refs_alignment): Likewise.
12983 (vect_slp_analyze_and_verify_instance_alignment
12984 (vect_analyze_data_ref_accesses): Likewise.
12985 (vect_prune_runtime_alias_test_list): Likewise.
12986 (vect_analyze_data_refs): Likewise.
12987 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12988 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12989 (vect_analyze_scalar_cycles_1): Likewise.
12990 (vect_get_loop_niters): Likewise.
12991 (vect_analyze_loop_form_1): Likewise.
12992 (vect_update_vf_for_slp): Likewise.
12993 (vect_analyze_loop_operations): Likewise.
12994 (vect_analyze_loop): Likewise.
12995 (vectorizable_induction): Likewise.
12996 (vect_transform_loop): Likewise.
12997 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12998 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12999 (vect_make_slp_decision): Likewise.
13000 (vect_detect_hybrid_slp): Likewise.
13001 (vect_slp_analyze_operations): Likewise.
13002 (vect_slp_bb): Likewise.
13003 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13004 (vectorizable_bswap): Likewise.
13005 (vectorizable_call): Likewise.
13006 (vectorizable_simd_clone_call): Likewise.
13007 (vectorizable_conversion): Likewise.
13008 (vectorizable_assignment): Likewise.
13009 (vectorizable_shift): Likewise.
13010 (vectorizable_operation): Likewise.
13011 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13012
13013 2018-06-18 Martin Sebor <msebor@redhat.com>
13014
13015 PR tree-optimization/81384
13016 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13017 * builtins.c (expand_builtin_strnlen): New function.
13018 (expand_builtin): Call it.
13019 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13020 * builtins.def (BUILT_IN_STRNLEN): New.
13021 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13022 Warn for bounds in excess of maximum object size.
13023 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13024 single-value ranges. Handle strnlen.
13025 (handle_builtin_strlen): Handle strnlen.
13026 (strlen_check_and_optimize_stmt): Same.
13027 * doc/extend.texi (Other Builtins): Document strnlen.
13028
13029 2018-06-18 Maya Rashish <coypu@sdf.org>
13030
13031 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13032 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13033 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13034
13035 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13036 here to ...
13037 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13038
13039 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13040
13041 * tree.c (escaped_string::escape): Replace cast to char * by
13042 const_cast<char *> (unescaped).
13043
13044 2018-06-18 Nick Clifton <nickc@redhat.com>
13045
13046 PR 84195
13047 * tree.c (escaped_string): New class. Converts an unescaped
13048 string into its escaped equivalent.
13049 (warn_deprecated_use): Use the new class to convert the
13050 deprecation message, if present.
13051 (test_escaped_strings): New self test.
13052 (test_c_tests): Add test_escaped_strings.
13053 * doc/extend.texi (deprecated): Add a note that the
13054 deprecation message is affected by the -fmessage-length
13055 option, and that control characters will be escaped.
13056 (#pragma GCC error): Document this pragma.
13057 (#pragma GCC warning): Likewise.
13058 * doc/invoke.texi (-fmessage-length): Document this option's
13059 effect on the #warning and #error preprocessor directives and
13060 the deprecated attribute.
13061
13062 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13063
13064 * tree.c (decl_value_expr_lookup): Revert latest change.
13065 (decl_value_expr_insert): Likewise.
13066
13067 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13068
13069 * gimplify.c (nonlocal_vlas): Delete.
13070 (nonlocal_vla_vars): Likewise.
13071 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13072 referenced VLAs.
13073 (gimplify_body): Do not create and destroy nonlocal_vlas.
13074 * tree-nested.c: Include diagnostic.h.
13075 (use_pointer_in_frame): Tweak.
13076 (lookup_field_for_decl): Add assertion and declare the transformation.
13077 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13078 internal error when the reference is in a wrong context. Do not
13079 create a debug decl by default.
13080 (note_nonlocal_block_vlas): Delete.
13081 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13082 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13083 create a debug decl by default.
13084 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13085 call is in a wrong context.
13086 (fixup_vla_decls): New function.
13087 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13088 debug variables were created.
13089 * tree.c (decl_value_expr_lookup): Add checking assertion.
13090 (decl_value_expr_insert): Likewise.
13091
13092 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13093
13094 PR middle-end/82479
13095 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13096 * tree-scalar-evolution.c (interpret_expr): Likewise.
13097 (expression_expensive_p): Likewise.
13098 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13099 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13100 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13101 (ssa_defined_by_minus_one_stmt_p): New.
13102
13103 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13104
13105 PR middle-end/64946
13106 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13107 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13108 * dojump.c (do_jump): Likewise.
13109 * expr.c (expand_expr_real_2): Check operand type's sign.
13110 * fold-const.c (const_unop): Handle ABSU_EXPR.
13111 (fold_abs_const): Likewise.
13112 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13113 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13114 (strip_sign_op_1): Likesise.
13115 * match.pd: Add new pattern to generate ABSU_EXPR.
13116 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13117 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13118 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13119 * tree-inline.c (estimate_operator_cost): Likewise.
13120 * tree-pretty-print.c (dump_generic_node): Likewise.
13121 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13122 * tree.def (ABSU_EXPR): New.
13123
13124 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13125
13126 PR middle-end/86095
13127 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13128 documented as preserved for backward compatibility only.
13129 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13130
13131 PR rtl-optimization/86108
13132 * bb-reorder.c (create_forwarder_block): Renamed to ...
13133 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13134 jump from new landing pad to the second part.
13135 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13136 Adjust callers.
13137
13138 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13139
13140 PR middle-end/85878
13141 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13142 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13143 Only call store_expr for halves if the mode is the same.
13144
13145 PR middle-end/86123
13146 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13147 Fix up comment formatting.
13148
13149 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13150
13151 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13152 (typed_splay_tree::closure,
13153 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13154 (typed_splay_tree::typed_splay_tree,
13155 typed_splay_tree::operator =): Declared private.
13156 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13157 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13158 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13159 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13160 typed_splay_tree::splay_tree_splay,
13161 typed_splay_tree::splay_tree_foreach_helper,
13162 typed_splay_tree::splay_tree_insert,
13163 typed_splay_tree::splay_tree_remove,
13164 typed_splay_tree::splay_tree_lookup,
13165 typed_splay_tree::splay_tree_predecessor,
13166 typed_splay_tree::splay_tree_successor,
13167 typed_splay_tree::splay_tree_min,
13168 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13169 (typed_splay_tree::root, typed_splay_tree::comp,
13170 typed_splay_tree::delete_key,
13171 typed_splay_tree::delete_value): New data members.
13172 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13173 typed_splay_tree::remove.
13174
13175 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13176
13177 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13178 -mginv and -mno-ginv to the assembler.
13179 * config/mips/mips.opt (-mcrc): New option.
13180 (-mginv): Likewise.
13181 * doc/invoke.text (-mcrc): Document.
13182 (-mginv): Likewise.
13183
13184 2018-06-15 Nick Clifton <nickc@redhat.com>
13185
13186 PR 84195
13187 * tree.c (escaped_string): New class. Converts an unescaped
13188 string into its escaped equivalent.
13189 (warn_deprecated_use): Use the new class to convert the
13190 deprecation message, if present.
13191 (test_escaped_strings): New self test.
13192 (test_c_tests): Add test_escaped_strings.
13193 * doc/extend.texi (deprecated): Add a note that the
13194 deprecation message is affected by the -fmessage-length
13195 option, and that control characters will be escaped.
13196 (#pragma GCC error): Document this pragma.
13197 (#pragma GCC warning): Likewise.
13198 * doc/invoke.texi (-fmessage-length): Document this option's
13199 effect on the #warning and #error preprocessor directives and
13200 the deprecated attribute.
13201
13202 2018-06-15 Richard Biener <rguenther@suse.de>
13203
13204 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13205 here, also noting vector size used.
13206 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13207 size used in MSG_OPTIMIZED_LOCATIONS dump.
13208 (pass_slp_vectorize::execute): Adjust.
13209
13210 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13211
13212 PR target/85968
13213 * config/arc/arc.c (arc_return_address_register): Fix
13214 if-condition.
13215
13216 2018-06-15 Richard Biener <rguenther@suse.de>
13217
13218 PR middle-end/86159
13219 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13220 leave useless conversion stripping to force_gimple_operand_gsi.
13221 (gimplify_build2): Likewise.
13222 (gimplify_build1): Likewise.
13223
13224 2018-06-15 Richard Biener <rguenther@suse.de>
13225
13226 PR middle-end/86076
13227 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13228 before adjusting their block.
13229
13230 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13231
13232 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13233 multilibs for *-*-rtems*.
13234 * config/riscv/t-rtems: New file.
13235
13236 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13237
13238 PR middle-end/86122
13239 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13240 unsigned_type_for returns NULL.
13241
13242 PR target/85945
13243 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13244 subregs of multi-word pseudos unless the float mode has word size.
13245
13246 2018-06-14 Richard Biener <rguenther@suse.de>
13247
13248 PR middle-end/86139
13249 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13250 duplicate and harmful type_hash_canon.
13251 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13252
13253 2018-06-14 Richard Biener <rguenther@suse.de>
13254
13255 PR ipa/86124
13256 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13257 NULL cgraph_node.
13258
13259 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13260
13261 * config/rtems.h (STDINT_LONG32): Define.
13262
13263 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13264 Prachi Godbole <prachi.godbole@imgtec.com>
13265
13266 * config/mips/mips-cpus.def: Define P6600.
13267 * config/mips/mips-tables.opt: Regenerate.
13268 * config/mips/mips.c (mips_ucbranch_type): New enum.
13269 (mips_rtx_cost_data): Add support for P6600.
13270 (mips_issue_rate): Likewise.
13271 (mips_multipass_dfa_lookahead): Likewise.
13272 (mips_avoid_hazard): Likewise.
13273 (mips_reorg_process_insns): Likewise.
13274 (mips_classify_branch_p6600): New function.
13275 * config/mips/mips.h (TUNE_P6600): New define.
13276 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13277 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13278 * config/mips/mips.md: Include p6600.md.
13279 (processor): Add p6600.
13280 * config/mips/p6600.md: New file.
13281 * doc/invoke.texi: Add p6600 to supported architectures.
13282
13283 2018-06-13 Martin Sebor <msebor@redhat.com>
13284
13285 PR tree-optimization/86114
13286 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13287 of integer types.
13288 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13289
13290 2018-06-13 Richard Biener <rguenther@suse.de>
13291
13292 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13293 Properly set vector type of the intermediate stmt.
13294 * tree-vect-stmts.c (vectorizable_operation): The destination
13295 var always has vectype_out type.
13296
13297 2018-06-13 Jeff Law <law@redhat.com>
13298
13299 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13300 integer 0 for argument to print_rtl_with_bb.
13301 (rl78_reorg): Likewise.
13302
13303 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13304
13305 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13306 from rtx to rtx_insn *.
13307 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13308 "label".
13309 (add_sched_insns_for_speculation): Likewise for local "target",
13310 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13311 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13312 from rtx_insn ** to rtx_code_label **.
13313 (reorg_emit_nops): Likewise.
13314 (c6x_reorg): Likewise for local "call_labels".
13315 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13316 rtx to rtx_insn *.
13317 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13318 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13319 the loops over LABEL_REFS.
13320 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13321 braf_label.
13322 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13323 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13324 (split_branches): Strengthen local "olabel" from rtx to
13325 rtx_insn *, adding a safe_as_a cast.
13326 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13327 to "rtx_insn *".
13328 (add_insn_after): Likewise for first two params.
13329 (add_insn_before): Likewise.
13330 (remove_insn): Likewise for param.
13331 (emit_pattern_before_noloc): Likewise for second and third params.
13332 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13333 (emit_call_insn_before_noloc): Likewise.
13334 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13335 to "rtx_insn *".
13336 (emit_barrier_before): Likewise.
13337 (emit_label_before): Strengthen "label" param from "rtx" to
13338 "rtx_code_label *". Strengthen "before" param from "rtx" to
13339 "rtx_insn *".
13340 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13341 "rtx_insn *".
13342 (emit_pattern_after_noloc): Likewise.
13343 (emit_insn_after_noloc): Likewise.
13344 (emit_jump_insn_after_noloc): Likewise.
13345 (emit_call_insn_after_noloc): Likewise.
13346 (emit_debug_insn_after_noloc): Likewise.
13347 (emit_barrier_after): Likewise.
13348 (emit_label_after): Likewise for both params.
13349 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13350 "loc" param from "int" to "location_t".
13351 (emit_insn_after_setloc): Likewise.
13352 (emit_jump_insn_after_setloc): Likewise.
13353 (emit_call_insn_after_setloc): Likewise.
13354 (emit_debug_insn_after_setloc): Likewise.
13355 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13356 "loc" param from "int" to "location_t".
13357 (emit_pattern_before): Convert NULL_RTX to NULL.
13358 (emit_insn_before_setloc): Convert "loc" param from "int" to
13359 "location_t".
13360 (emit_jump_insn_before_setloc): Likewise.
13361 (emit_call_insn_before_setloc): Likewise.
13362 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13363 rtx_insn *. Convert "loc" param from "int" to "location_t".
13364 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13365 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13366 Convert 3rd param from "int" to "location_t".
13367 (emit_barrier_before, emit_barrier_after, next_real_insn):
13368 Strengthen param from rtx to rtx_insn *.
13369 (emit_label_before): Strengthen 1st param from "rtx" to
13370 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13371 "rtx_insn *".
13372 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13373 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13374 Strengthen 2nd param from "rtx" to "rtx_insn *".
13375 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13376 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13377 Likewise. Convert 3rd param from "int" to "location_t".
13378 (emit_label_after): Strengthen 1st param from "rtx" to
13379 "rtx_code_label *".
13380 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13381 "rtx_insn *".
13382 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13383 from "rtx" to "rtx_insn *".
13384
13385 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13386
13387 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13388 bodies streamed in with -Q.
13389 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13390 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13391 * gimple-streamer-out.c: Include gimple-pretty-print.h
13392 (output_bb): Dump stmts streamed.
13393 * lto-section-out.c: Include print-tree.h
13394 (lto_begin_section): Dump sections created.
13395 (lto_output_decl_index): Dump decl encoded.
13396 * lto-streamer-out.c: Include print-tree.h
13397 (create_output_block): Dump output block created.
13398 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13399 (output_function): Dump function output.
13400 (output_constructor): Dump constructor streamed.
13401 (write_global_stream): Output indexes encoded.
13402 (produce_asm_for_decls): Dump streams encoded.
13403 * lto-streamer.c (streamer_dump_file): New global var.
13404 * lto-streamer.h (streamer_dump_file): Declare.
13405 * passes.c (ipa_write_summaries): Initialize streamer dump.
13406 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13407 in.
13408
13409 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13410
13411 PR target/86048
13412 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13413 offsets for register save directives. Emit a second batch of save
13414 directives, if need be, when the function accesses prior frames.
13415
13416 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13417
13418 * config/arc/fpu.md (fmasf4): Force operand to register.
13419 (fnmasf4): Likewise.
13420
13421 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13422
13423 * config/arc/arc-protos.h (arc_pad_return): Remove.
13424 * config/arc/arc.c (machine_function): Remove force_short_suffix
13425 and size_reason.
13426 (arc_print_operand): Adjust printing of '&'.
13427 (arc_verify_short): Remove conditional printing of short suffix.
13428 (arc_final_prescan_insn): Remove reference to size_reason.
13429 (pad_return): New function.
13430 (arc_reorg): Call pad_return.
13431 (arc_pad_return): Remove.
13432 (arc_init_machine_status): Remove reference to force_short_suffix.
13433 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13434 (attr length): When attribute iscompact is true force to 2
13435 regardless; in the case of maybe check if we want to force the
13436 instruction to have 4 bytes length.
13437 (nopv): Change it to generate 4 byte long nop as well.
13438 (blockage): New pattern.
13439 (simple_return): Remove call to arc_pad_return.
13440 (p_return_i): Likewise.
13441
13442 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13443
13444 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13445
13446 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13447
13448 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13449 ARC cores.
13450
13451 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13452
13453 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13454 for ARC700 and ARCv2.
13455
13456 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13457
13458 PR target/86076
13459 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13460 operands[2] instead of operands[1].
13461
13462
13463 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13464
13465 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13466 case, check whether the outer register overlaps an unallocatable
13467 register, not just whether it fits the required class.
13468
13469 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13470
13471 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13472 are poly_ints.
13473 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13474 (memrefs_conflict_p): Likewise.
13475 (init_alias_analysis): Likewise.
13476 * cfgexpand.c (expand_debug_expr): Likewise.
13477 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13478 * cse.c (fold_rtx): Likewise.
13479 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13480 * expr.c (emit_block_move_hints): Likewise.
13481 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13482 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13483 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13484 (emit_group_store): Likewise.
13485 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13486 to read the PRE/POST_MODIFY increment.
13487 * calls.c (store_one_arg): Use strip_offset.
13488 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13489 poly_int_rtx_p.
13490 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13491 by a VEC_SELECT.
13492 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13493 (simplify_binary_operation_1): Extend CONST_INT handling to
13494 poly_int_rtx_p.
13495 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13496 than a HOST_WIDE_INT.
13497 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13498 poly_int64.
13499 (adjust_mems, add_stores): Update accodingly.
13500 (vt_canonicalize_addr): Track polynomial offsets.
13501 (emit_note_insn_var_location): Likewise.
13502 (vt_add_function_parameter): Likewise.
13503 (vt_initialize): Likewise.
13504
13505 2018-06-12 Jeff Law <law@redhat.com>
13506
13507 * config.gcc (alpha*-*-freebsd*): Remove.
13508 * config/alpha/freebsd.h: Remove.
13509
13510 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13511
13512 PR other/69968
13513 * spellcheck-tree.c (levenshtein_distance): Rename to...
13514 (get_edit_distance): ...this, and update for underlying renaming.
13515 * spellcheck-tree.h (levenshtein_distance): Rename to...
13516 (get_edit_distance): ...this.
13517 * spellcheck.c (levenshtein_distance): Rename to...
13518 (get_edit_distance): ...this. Convert from Levenshtein distance
13519 to Damerau-Levenshtein distance by supporting transpositions of
13520 adjacent characters. Rename "v1" to "v_next" and "v0" to
13521 "v_one_ago".
13522 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13523 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13524 update for underlying renaming.
13525 (selftest::levenshtein_distance_unit_test): Rename to...
13526 (selftest::test_get_edit_distance_unit): ...this, and update for
13527 underlying renaming.
13528 (selftest::test_find_closest_string): Add example from PR 69968
13529 where transposition helps
13530 (selftest::test_metric_conditions): Update for renaming.
13531 (selftest::test_metric_conditions): Likewise.
13532 (selftest::spellcheck_c_tests): Likewise.
13533 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13534 (get_edit_distance): ...this.
13535 (best_match::consider): Update for renaming.
13536
13537 2018-06-12 Martin Sebor <msebor@redhat.com>
13538
13539 PR tree-optimization/85259
13540 * builtins.c (compute_objsize): Handle constant offsets.
13541 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13542 true iff a warning has been issued.
13543 * gimple.h (gimple_nonartificial_location): New function.
13544 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13545 gimple_nonartificial_location and handle -Wno-system-headers.
13546 (handle_builtin_stxncpy): Same.
13547
13548 2018-06-12 Martin Sebor <msebor@redhat.com>
13549
13550 PR c/85931
13551 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13552
13553 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13554
13555 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13556 BUILTIN_VEC_XST entries for pointer to double and long long.
13557
13558 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13559
13560 PR target/85990
13561 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13562 Update comments.
13563 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13564 Likewise.
13565
13566 2018-06-12 Martin Liska <mliska@suse.cz>
13567
13568 * doc/options.texi: Document IntegerRange.
13569
13570 2018-06-12 Martin Liska <mliska@suse.cz>
13571
13572 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13573 * opt-functions.awk: Handle Deprecated flag.
13574 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13575 and report error.
13576 (read_cmdline_option): Report warning for a deprecated option.
13577 * opts.h (struct cl_option): Add new field cl_deprecated.
13578 (CL_ERR_DEPRECATED): New.
13579
13580 2018-06-12 Martin Liska <mliska@suse.cz>
13581
13582 * doc/options.texi: Document Deprecated option flag.
13583
13584 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13585
13586 * config/arc/arc-arch.h (arc_extras): New enum.
13587 (arc_cpu_t):Add field extra.
13588 (arc_cpu_types): Consider the extras.
13589 * config/arc/arc-cpus.def: Add extras info.
13590 * config/arc/arc-opts.h (processor_type): Consider extra field.
13591 * config/arc/arc.c (arc_override_options): Handle extra field.
13592
13593 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13594
13595 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13596 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13597 field.
13598 * config/arc/arc.c (arc_init): Update pic warning.
13599 (irq_range): Update irq range parsing warnings.
13600 (arc_override_options): Update various warning messages.
13601 (arc_handle_aux_attribute): Likewise.
13602
13603 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13604
13605 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13606
13607 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13608
13609 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13610 compiler messages directives.
13611
13612 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13613
13614 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13615 * config/mips/mips-tables.opt: Regenerate.
13616 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13617 mips64r6.
13618 * doc/invoke.texi: Document -march=i6500.
13619
13620 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13621
13622 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13623 (i6400_gpmul): Add cpu_unit.
13624 (i6400_gpdiv): Likewise.
13625 (i6400_msa_add_d): Update reservations.
13626 (i6400_msa_int_add) Likewise.
13627 (i6400_msa_short_logic3) Likewise.
13628 (i6400_msa_short_logic2) Likewise.
13629 (i6400_msa_short_logic) Likewise.
13630 (i6400_msa_move) Likewise.
13631 (i6400_msa_cmp) Likewise.
13632 (i6400_msa_short_float2) Likewise.
13633 (i6400_msa_div_d) Likewise.
13634 (i6400_msa_long_logic1) Likewise.
13635 (i6400_msa_long_logic2) Likewise.
13636 (i6400_msa_mult) Likewise.
13637 (i6400_msa_long_float2) Likewise.
13638 (i6400_msa_long_float4) Likewise.
13639 (i6400_msa_long_float5) Likewise.
13640 (i6400_msa_long_float8) Likewise.
13641 (i6400_fpu_fadd): Include frint type.
13642 (i6400_fpu_store): New define_insn_reservation.
13643 (i6400_fpu_load): Likewise.
13644 (i6400_fpu_move): Likewise.
13645 (i6400_fpu_fcmp): Likewise.
13646 (i6400_fpu_fmadd): Likewise.
13647 (i6400_int_mult): Include imul3nc type and update reservation.
13648 (i6400_int_div): Include idiv3 type and update reservation.
13649 (i6400_int_load): Update to check type not move_type.
13650 (i6400_int_store): Likewise.
13651 (i6400_int_prefetch): Set zero latency.
13652
13653 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13654
13655 * gcc.c: Document new %@{...} sequence.
13656 (LINK_COMMAND_SPEC): Use it for the -L switches.
13657 (cpp_unique_options): Use it for the -I switches.
13658 (at_file_argbuf): New global variable.
13659 (in_at_file): Likewise.
13660 (alloc_args): Create at_file_argbuf.
13661 (clear_args): Truncate at_file_argbuf.
13662 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13663 (open_at_file): New function.
13664 (close_at_file): Likewise.
13665 (create_at_file): Delete.
13666 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13667 <'o'>: Likewise.
13668 <'@'>: New case.
13669 (validate_switches_from_spec): Deal with %@{...} sequence.
13670 (validate_switches): Likewise.
13671 (driver::finalize): Call clear_args.
13672
13673 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13674
13675 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13676
13677 2018-06-11 Martin Sebor <msebor@redhat.com>
13678
13679 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13680 (Wno-class-memaccess): Add @opindex.
13681 (Wno-templates, Wno-multiple-inheritance): Same.
13682 (Wno-virtual-inheritance, Wno-namespaces): Same.
13683 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13684 (Wno-format-overflow, Wno-format-truncation): Same.
13685 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13686 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13687 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13688 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13689 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13690 (Wno-misspelled-isr): Same.
13691
13692 2018-06-11 Martin Sebor <msebor@redhat.com>
13693
13694 * PR tree-optimization/86083
13695 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13696
13697 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13698
13699 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13700
13701 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13702
13703 PR target/85755
13704 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13705 on the correct operand.
13706 (*movdi_internal64): Ditto.
13707
13708 2018-06-11 Martin Liska <mliska@suse.cz>
13709
13710 PR tree-optimization/86089
13711 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13712
13713 2018-06-11 Julia Koval <julia.koval@intel.com>
13714
13715 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13716 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13717 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13718
13719 2018-06-11 Olivier Hainque <hainque@adacore.com>
13720
13721 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13722 for Ada with strict dwarf2.
13723
13724 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
13725
13726 PR target/85755
13727 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13728 addresses.
13729
13730 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
13731
13732 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13733
13734 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
13735
13736 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13737 TARGET_ELF.
13738
13739 2018-06-08 Martin Liska <mliska@suse.cz>
13740
13741 * tree-cfg.h (debug_function): Fix argument type to match
13742 implementation.
13743
13744 2018-06-08 Martin Liska <mliska@suse.cz>
13745
13746 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13747 Remove usage of MPX-related (and removed) fields.
13748 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13749
13750 2018-06-08 David Malcolm <dmalcolm@redhat.com>
13751
13752 * cfg.c (debug): Use TDF_NONE rather than 0.
13753 * cfghooks.c (debug): Likewise.
13754 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13755 (struct dump_option_value_info): Convert to...
13756 (struct kv_pair): ...this template type.
13757 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13758 rather than 0.
13759 (optinfo_verbosity_options): Likewise.
13760 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13761 OPTGROUP_NONE.
13762 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13763 than int for "optgroup_flags" param.
13764 (dump_generic_expr_loc): Use dump_flags_t rather than int for
13765 "dump_kind" param.
13766 (dump_dec): Likewise.
13767 (dump_finish): Use TDF_NONE rather than 0.
13768 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13769 rather than int for "optgroup_flags" param. Use TDF_NONE rather
13770 than 0. Update for change to option_ptr.
13771 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13772 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
13773 0. Update for changes to optinfo_verbosity_options and
13774 optgroup_options.
13775 (opt_info_switch_p): Convert optgroup_flags from int to
13776 optgroup_flags_t.
13777 (dump_basic_block): Use dump_flags_t rather than int
13778 for "dump_kind" param.
13779 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13780 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13781 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13782 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
13783 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
13784 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
13785 TDF_NONE): Convert from macros to...
13786 (enum dump_flag): ...this new enum.
13787 (dump_flags_t): Update to use enum.
13788 (operator|, operator&, operator~, operator|=, operator&=):
13789 Implement for dump_flags_t.
13790 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
13791 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
13792 Convert from macros to...
13793 (enum optgroup_flag): ...this new enum.
13794 (optgroup_flags_t): New typedef.
13795 (operator|, operator|=): Implement for optgroup_flags_t.
13796 (struct dump_file_info): Convert field "alt_flags" to
13797 dump_flags_t. Convert field "optgroup_flags" to
13798 optgroup_flags_t.
13799 (dump_basic_block): Use dump_flags_t rather than int for param.
13800 (dump_generic_expr_loc): Likewise.
13801 (dump_dec): Likewise.
13802 (dump_register): Convert param "optgroup_flags" to
13803 optgroup_flags_t.
13804 (opt_info_enable_passes): Likewise.
13805 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
13806 than 0.
13807 * gimple-pretty-print.c (debug): Likewise.
13808 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
13809 (merged_store_group::apply_stores): Likewise.
13810 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
13811 * gimple.c (verify_gimple_pp): Likewise.
13812 * graphite-poly.c (print_pbb_body): Likewise.
13813 * passes.c (pass_manager::register_one_dump_file): Convert
13814 local "optgroup_flags" to optgroup_flags_t.
13815 * print-tree.c (print_node): Use TDF_NONE rather than 0.
13816 (debug): Likewise.
13817 (debug_body): Likewise.
13818 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
13819 to optgroup_flags_t.
13820 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
13821 than 0.
13822 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
13823 (convert_mult_to_fma): Likewise.
13824 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
13825 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
13826 * tree-vect-data-refs.c (dump_lower_bound): Convert param
13827 "dump_kind" to dump_flags_t.
13828
13829 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13830
13831 * config/rs6000/rs6000.c (min, max): Delete.
13832
13833 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
13834
13835 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
13836 -mabi=spe and -mabi=no-spe.
13837
13838 2018-06-08 Martin Liska <mliska@suse.cz>
13839
13840 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
13841 where we expect an existing summary.
13842
13843 2018-06-08 Martin Liska <mliska@suse.cz>
13844
13845 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
13846 * ipa-inline.h (estimate_edge_growth): Likewise.
13847
13848 2018-06-08 Martin Liska <mliska@suse.cz>
13849
13850 * cgraph.c (function_version_hasher::hash): Use
13851 cgraph_node::get_uid ().
13852 (function_version_hasher::equal):
13853 * cgraph.h (cgraph_node::get_uid): New method.
13854 * ipa-inline.c (update_caller_keys): Use
13855 cgraph_node::get_uid ().
13856 (update_callee_keys): Likewise.
13857 * ipa-utils.c (searchc): Likewise.
13858 (ipa_reduced_postorder): Likewise.
13859 * lto-cgraph.c (input_node): Likewise.
13860 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
13861 * symbol-summary.h (symtab_insertion): Likewise.
13862 (symtab_removal): Likewise.
13863 (symtab_duplication): Likewise.
13864 * tree-pretty-print.c (dump_function_header): Likewise.
13865 * tree-sra.c (convert_callers_for_node): Likewise.
13866
13867 2018-06-08 Martin Liska <mliska@suse.cz>
13868
13869 * cgraph.c (symbol_table::create_edge): Always assign a new
13870 unique number.
13871 (symbol_table::free_edge): Do not recycle numbers.
13872 * cgraph.h (cgraph_edge::get): New method.
13873 * symbol-summary.h (symtab_removal): Use it.
13874 (symtab_duplication): Likewise.
13875 (call_summary::hashable_uid): Remove.
13876
13877 2018-06-08 Martin Liska <mliska@suse.cz>
13878
13879 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
13880 (initialize_growth_caches): Remove.
13881 (free_growth_caches): Likewise.
13882 (do_estimate_edge_time): Use edge_growth_cache.
13883 (do_estimate_edge_size): Likewise.
13884 (do_estimate_edge_hints): Likewise.
13885 * ipa-inline.c (reset_edge_caches): Likewise.
13886 (recursive_inlining): Likewise.
13887 (inline_small_functions): Likewise.
13888 * ipa-inline.h (initialize_growth_caches): Remove.
13889 (estimate_edge_size): Likewise.
13890 (estimate_edge_time): Likewise.
13891 (estimate_edge_hints): Likewise.
13892 (reset_edge_growth_cache): Likewise.
13893 * symbol-summary.h (call_summary::remove): New method.
13894
13895 2018-06-08 Martin Liska <mliska@suse.cz>
13896
13897 * ipa-cp.c (class edge_clone_summary): New summary.
13898 (grow_edge_clone_vectors): Remove.
13899 (ipcp_edge_duplication_hook): Remove.
13900 (class edge_clone_summary_t): New call_summary class.
13901 (ipcp_edge_removal_hook): Remove.
13902 (edge_clone_summary_t::duplicate): New function.
13903 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13904 (create_specialized_node): Likewise.
13905 (ipcp_driver): Initialize edge_clone_summaries and do not
13906 register hooks.
13907
13908 2018-06-08 Martin Liska <mliska@suse.cz>
13909
13910 * symbol-summary.h (get): New function.
13911 (call_summary::m_initialize_when_cloning): New class member.
13912
13913 2018-06-08 Martin Liska <mliska@suse.cz>
13914
13915 * cgraph.c (cgraph_node::remove): Do not recycle uid.
13916 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13917 (symbol_table::allocate_cgraph_symbol): Do not set uid.
13918 * passes.c (uid_hash_t): Record removed_nodes by their uids.
13919 (remove_cgraph_node_from_order): Use the removed_nodes set.
13920 (do_per_function_toporder): Likwise.
13921 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13922 instead of summary_uid.
13923 (symtab_removal): Likewise.
13924 (symtab_duplication): Likewise.
13925
13926 2018-06-08 Martin Liska <mliska@suse.cz>
13927
13928 * ipa-cp.c (ipcp_store_bits_results): Use
13929 ipcp_transformation_sum.
13930 (ipcp_store_vr_results): Likewise.
13931 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13932 to ...
13933 (ipcp_transformation_initialize): ... this.
13934 (ipa_set_node_agg_value_chain):
13935 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13936 (write_ipcp_transformation_info): Likewise.
13937 (read_ipcp_transformation_info): Likewise.
13938 (ipcp_update_bits): Likewise.
13939 (ipcp_update_vr): Likewise.
13940 (ipcp_transform_function): Likewise.
13941 * ipa-prop.h: Rename ipcp_transformation_summary to
13942 ipcp_transformation.
13943 (class ipcp_transformation_t): New function summary.
13944 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13945 (ipa_get_agg_replacements_for_node): Likewise.
13946
13947 2018-06-08 Martin Liska <mliska@suse.cz>
13948
13949 * ipa-pure-const.c (struct funct_state_d): Do it class instead
13950 of struct.
13951 (class funct_state_summary_t): New function_summary class.
13952 (has_function_state): Remove.
13953 (get_function_state): Likewise.
13954 (set_function_state): Likewise.
13955 (add_new_function): Likewise.
13956 (funct_state_summary_t::insert): New function.
13957 (duplicate_node_data): Remove.
13958 (remove_node_data): Remove.
13959 (funct_state_summary_t::duplicate): New function.
13960 (register_hooks): Create new funct_state_summaries.
13961 (pure_const_generate_summary): Use it.
13962 (pure_const_write_summary): Likewise.
13963 (pure_const_read_summary): Likewise.
13964 (propagate_pure_const): Likewise.
13965 (propagate_nothrow): Likewise.
13966 (dump_malloc_lattice): Likewise.
13967 (propagate_malloc): Likewise.
13968 (execute): Do not register hooks, just remove summary
13969 instead.
13970 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13971 constructor.
13972
13973 2018-06-08 Martin Liska <mliska@suse.cz>
13974
13975 * ipa-reference.c (remove_node_data): Remove.
13976 (duplicate_node_data): Likewise.
13977 (class ipa_ref_var_info_summary_t): New class.
13978 (class ipa_ref_opt_summary_t): Likewise.
13979 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13980 (get_reference_optimization_summary): Use
13981 ipa_ref_opt_sum_summaries.
13982 (set_reference_vars_info): Remove.
13983 (set_reference_optimization_summary): Likewise.
13984 (ipa_init): Create summaries.
13985 (init_function_info): Use function summary.
13986 (ipa_ref_opt_summary_t::duplicate): New function.
13987 (ipa_ref_opt_summary_t::remove): New function.
13988 (get_read_write_all_from_node): Fix GNU coding style.
13989 (propagate): Use function summary.
13990 (write_node_summary_p): Fix GNU coding style.
13991 (stream_out_bitmap): Likewise.
13992 (ipa_reference_read_optimization_summary): Use function summary.
13993 (ipa_reference_c_finalize): Do not release hooks.
13994
13995 2018-06-08 Martin Liska <mliska@suse.cz>
13996
13997 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13998 (analyze_function_body): Extract multiple calls of get_create.
13999 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14000 * ipa-inline.c (recursive_inlining): Use ::get method.
14001 * ipa-inline.h (estimate_edge_growth): Likewise.
14002
14003 2018-06-08 Martin Liska <mliska@suse.cz>
14004
14005 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14006 HSA_INVALID.
14007 (hsa_function_summary::hsa_function_summary): Use the new enum
14008 value.
14009 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14010 * hsa-gen.c (hsa_get_host_function): Likewise.
14011 (get_brig_function_name): Likewise.
14012 * ipa-hsa.c (process_hsa_functions): Likewise.
14013 (ipa_hsa_write_summary): Likewise.
14014 * symbol-summary.h (symtab_duplication): Use ::get function/
14015 (get): New function.
14016
14017 2018-06-08 Martin Liska <mliska@suse.cz>
14018
14019 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14020 of get.
14021 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14022 (hsa_register_kernel): Likewise.
14023 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14024 * hsa-gen.c (hsa_get_host_function): Likewise.
14025 (get_brig_function_name): Likewise.
14026 (generate_hsa): Likewise.
14027 (pass_gen_hsail::execute): Likewise.
14028 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14029 (devirtualization_time_bonus): Likewise.
14030 (ipcp_propagate_stage): Likewise.
14031 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14032 (edge_set_predicate): Likewise.
14033 (evaluate_conditions_for_known_args): Likewise.
14034 (evaluate_properties_for_edge): Likewise.
14035 (ipa_fn_summary::reset): Likewise.
14036 (ipa_fn_summary_t::duplicate): Likewise.
14037 (dump_ipa_call_summary): Likewise.
14038 (ipa_dump_fn_summary): Likewise.
14039 (analyze_function_body): Likewise.
14040 (compute_fn_summary): Likewise.
14041 (estimate_edge_devirt_benefit): Likewise.
14042 (estimate_edge_size_and_time): Likewise.
14043 (estimate_calls_size_and_time): Likewise.
14044 (estimate_node_size_and_time): Likewise.
14045 (inline_update_callee_summaries): Likewise.
14046 (remap_edge_change_prob): Likewise.
14047 (remap_edge_summaries): Likewise.
14048 (ipa_merge_fn_summary_after_inlining): Likewise.
14049 (ipa_update_overall_fn_summary): Likewise.
14050 (read_ipa_call_summary): Likewise.
14051 (inline_read_section): Likewise.
14052 (write_ipa_call_summary): Likewise.
14053 (ipa_fn_summary_write): Likewise.
14054 (ipa_free_fn_summary): Likewise.
14055 * ipa-hsa.c (process_hsa_functions): Likewise.
14056 (ipa_hsa_write_summary): Likewise.
14057 (ipa_hsa_read_section): Likewise.
14058 * ipa-icf.c (sem_function::merge): Likewise.
14059 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14060 (do_estimate_edge_time): Likewise.
14061 (estimate_size_after_inlining): Likewise.
14062 (estimate_growth): Likewise.
14063 (growth_likely_positive): Likewise.
14064 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14065 (inline_call): Likewise.
14066 * ipa-inline.c (caller_growth_limits): Likewise.
14067 (can_inline_edge_p): Likewise.
14068 (can_inline_edge_by_limits_p): Likewise.
14069 (compute_uninlined_call_time): Likewise.
14070 (compute_inlined_call_time): Likewise.
14071 (want_inline_small_function_p): Likewise.
14072 (edge_badness): Likewise.
14073 (update_caller_keys): Likewise.
14074 (update_callee_keys): Likewise.
14075 (recursive_inlining): Likewise.
14076 (inline_small_functions): Likewise.
14077 (inline_to_all_callers_1): Likewise.
14078 (dump_overall_stats): Likewise.
14079 (early_inline_small_functions): Likewise.
14080 (early_inliner): Likewise.
14081 * ipa-inline.h (estimate_edge_growth): Likewise.
14082 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14083 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14084 * ipa-prop.h (IPA_NODE_REF): Likewise.
14085 (IPA_EDGE_REF): Likewise.
14086 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14087 (propagate_malloc): Likewise.
14088 * ipa-split.c (execute_split_functions): Likewise.
14089 * symbol-summary.h: Rename get to get_create.
14090 (get): Likewise.
14091 (get_create): Likewise.
14092 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14093
14094 2018-06-08 Martin Liska <mliska@suse.cz>
14095
14096 * symbol-summary.h (release): Move definition out of class
14097 declaration.
14098 (symtab_removal): Likewise.
14099 (symtab_duplication): Likewise.
14100
14101 2018-06-08 Martin Liska <mliska@suse.cz>
14102
14103 * symbol-summary.h (function_summary): Move constructor
14104 implementation out of class declaration.
14105 (release): Likewise.
14106 (symtab_insertion): Likewise.
14107 (symtab_removal): Likewise.
14108 (symtab_duplication): Likewise.
14109 (get): Likewise.
14110
14111 2018-06-08 Martin Liska <mliska@suse.cz>
14112
14113 * Makefile.in: Remove support for MPX (macros, related functions,
14114 fields in cgraph_node, ...).
14115 * builtin-types.def (BT_BND): Likewise.
14116 (BT_FN_BND_CONST_PTR): Likewise.
14117 (BT_FN_CONST_PTR_BND): Likewise.
14118 (BT_FN_VOID_PTR_BND): Likewise.
14119 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14120 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14121 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14122 (expand_builtin_mempcpy_with_bounds): Likewise.
14123 (expand_builtin_memset_with_bounds): Likewise.
14124 (expand_builtin_memset_args): Likewise.
14125 (std_expand_builtin_va_start): Likewise.
14126 (expand_builtin): Likewise.
14127 (expand_builtin_with_bounds): Likewise.
14128 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14129 (DEF_LIB_BUILTIN_CHKP): Likewise.
14130 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14131 (DEF_CHKP_BUILTIN): Likewise.
14132 (BUILT_IN_MEMCPY): Likewise.
14133 (BUILT_IN_MEMMOVE): Likewise.
14134 (BUILT_IN_MEMPCPY): Likewise.
14135 (BUILT_IN_MEMSET): Likewise.
14136 (BUILT_IN_STPCPY): Likewise.
14137 (BUILT_IN_STRCAT): Likewise.
14138 (BUILT_IN_STRCHR): Likewise.
14139 (BUILT_IN_STRCPY): Likewise.
14140 (BUILT_IN_STRLEN): Likewise.
14141 (BUILT_IN_MEMCPY_CHK): Likewise.
14142 (BUILT_IN_MEMMOVE_CHK): Likewise.
14143 (BUILT_IN_MEMPCPY_CHK): Likewise.
14144 (BUILT_IN_MEMSET_CHK): Likewise.
14145 (BUILT_IN_STPCPY_CHK): Likewise.
14146 (BUILT_IN_STRCAT_CHK): Likewise.
14147 (BUILT_IN_STRCPY_CHK): Likewise.
14148 * calls.c (store_bounds): Likewise.
14149 (emit_call_1): Likewise.
14150 (special_function_p): Likewise.
14151 (maybe_warn_nonstring_arg): Likewise.
14152 (initialize_argument_information): Likewise.
14153 (finalize_must_preallocate): Likewise.
14154 (compute_argument_addresses): Likewise.
14155 (expand_call): Likewise.
14156 * cfgexpand.c (expand_call_stmt): Likewise.
14157 (expand_return): Likewise.
14158 (expand_gimple_stmt_1): Likewise.
14159 (pass_expand::execute): Likewise.
14160 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14161 (cgraph_node::remove): Likewise.
14162 (cgraph_node::dump): Likewise.
14163 (cgraph_node::verify_node): Likewise.
14164 * cgraph.h (chkp_function_instrumented_p): Likewise.
14165 (symtab_node::get_alias_target): Likewise.
14166 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14167 (cgraph_local_p): Likewise.
14168 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14169 (cgraph_edge::rebuild_references): Likewise.
14170 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14171 (walk_polymorphic_call_targets): Likewise.
14172 (cgraph_node::expand_thunk): Likewise.
14173 (symbol_table::output_weakrefs): Likewise.
14174 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14175 (ix86_handle_option): Likewise.
14176 * config/i386/constraints.md: Likewise.
14177 * config/i386/i386-builtin-types.def (BND): Likewise.
14178 (VOID): Likewise.
14179 (PVOID): Likewise.
14180 (ULONG): Likewise.
14181 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14182 (BDESC_FIRST): Likewise.
14183 (BDESC): Likewise.
14184 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14185 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14186 * config/i386/i386.c (enum reg_class): Likewise.
14187 (ix86_target_string): Likewise.
14188 (ix86_option_override_internal): Likewise.
14189 (ix86_conditional_register_usage): Likewise.
14190 (ix86_valid_target_attribute_inner_p): Likewise.
14191 (ix86_set_indirect_branch_type): Likewise.
14192 (ix86_set_current_function): Likewise.
14193 (ix86_function_arg_regno_p): Likewise.
14194 (init_cumulative_args): Likewise.
14195 (ix86_function_arg_advance): Likewise.
14196 (ix86_function_arg): Likewise.
14197 (ix86_pass_by_reference): Likewise.
14198 (ix86_function_value_regno_p): Likewise.
14199 (ix86_function_value_1): Likewise.
14200 (ix86_function_value_bounds): Likewise.
14201 (ix86_return_in_memory): Likewise.
14202 (ix86_setup_incoming_vararg_bounds): Likewise.
14203 (ix86_va_start): Likewise.
14204 (indirect_thunk_need_prefix): Likewise.
14205 (print_reg): Likewise.
14206 (ix86_print_operand): Likewise.
14207 (ix86_expand_call): Likewise.
14208 (ix86_output_function_return): Likewise.
14209 (reg_encoded_number): Likewise.
14210 (BDESC_VERIFYS): Likewise.
14211 (ix86_init_mpx_builtins): Likewise.
14212 (ix86_init_builtins): Likewise.
14213 (ix86_emit_cmove): Likewise.
14214 (ix86_emit_move_max): Likewise.
14215 (ix86_expand_builtin): Likewise.
14216 (ix86_builtin_mpx_function): Likewise.
14217 (ix86_get_arg_address_for_bt): Likewise.
14218 (ix86_load_bounds): Likewise.
14219 (ix86_store_bounds): Likewise.
14220 (ix86_load_returned_bounds): Likewise.
14221 (ix86_store_returned_bounds): Likewise.
14222 (ix86_class_likely_spilled_p): Likewise.
14223 (ix86_hard_regno_mode_ok): Likewise.
14224 (x86_order_regs_for_local_alloc): Likewise.
14225 (ix86_mitigate_rop): Likewise.
14226 (ix86_bnd_prefixed_insn_p): Likewise.
14227 (ix86_mpx_bound_mode): Likewise.
14228 (ix86_make_bounds_constant): Likewise.
14229 (ix86_initialize_bounds): Likewise.
14230 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14231 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14232 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14233 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14234 (TARGET_CHKP_BOUND_MODE): Likewise.
14235 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14236 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14237 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14238 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14239 * config/i386/i386.h (TARGET_MPX): Likewise.
14240 (TARGET_MPX_P): Likewise.
14241 (VALID_BND_REG_MODE): Likewise.
14242 (FIRST_BND_REG): Likewise.
14243 (LAST_BND_REG): Likewise.
14244 (enum reg_class): Likewise.
14245 (BND_REG_P): Likewise.
14246 (BND_REGNO_P): Likewise.
14247 (BNDmode): Likewise.
14248 (ADJUST_INSN_LENGTH): Likewise.
14249 * config/i386/i386.md: Likewise.
14250 * config/i386/i386.opt: Likewise.
14251 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14252 (defined): Likewise.
14253 (LINK_MPX): Likewise.
14254 (MPX_SPEC): Likewise.
14255 (LIBMPX_SPEC): Likewise.
14256 (LIBMPXWRAPPERS_SPEC): Likewise.
14257 (CHKP_SPEC): Likewise.
14258 * config/i386/predicates.md: Likewise.
14259 * dbxout.c (dbxout_type): Likewise.
14260 * doc/extend.texi: Likewise.
14261 * doc/invoke.texi: Likewise.
14262 * doc/md.texi: Likewise.
14263 * doc/tm.texi: Likewise.
14264 * doc/tm.texi.in: Likewise.
14265 * dwarf2out.c (is_base_type): Likewise.
14266 (gen_formal_types_die): Likewise.
14267 (gen_subprogram_die): Likewise.
14268 (gen_type_die_with_usage): Likewise.
14269 (gen_decl_die): Likewise.
14270 (dwarf2out_late_global_decl): Likewise.
14271 * expr.c (expand_assignment): Likewise.
14272 (emit_storent_insn): Likewise.
14273 (store_expr_with_bounds): Likewise.
14274 (store_expr): Likewise.
14275 (expand_expr_real_1): Likewise.
14276 * expr.h (store_expr_with_bounds): Likewise.
14277 * function.c (use_register_for_decl): Likewise.
14278 (struct bounds_parm_data): Likewise.
14279 (assign_parms_augmented_arg_list): Likewise.
14280 (assign_parm_find_entry_rtl): Likewise.
14281 (assign_parm_is_stack_parm): Likewise.
14282 (assign_parm_load_bounds): Likewise.
14283 (assign_bounds): Likewise.
14284 (assign_parms): Likewise.
14285 (expand_function_start): Likewise.
14286 * gcc.c (CHKP_SPEC): Likewise.
14287 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14288 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14289 (wrestrict_dom_walker::check_call): Likewise.
14290 * gimple.c (gimple_build_call_from_tree): Likewise.
14291 * gimple.h (enum gf_mask): Likewise.
14292 (gimple_call_with_bounds_p): Likewise.
14293 (gimple_call_set_with_bounds): Likewise.
14294 * gimplify.c (gimplify_init_constructor): Likewise.
14295 * ipa-cp.c (initialize_node_lattices): Likewise.
14296 (propagate_constants_across_call): Likewise.
14297 (find_more_scalar_values_for_callers_subset): Likewise.
14298 * ipa-hsa.c (process_hsa_functions): Likewise.
14299 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14300 * ipa-icf.c (sem_function::merge): Likewise.
14301 * ipa-inline.c (early_inliner): Likewise.
14302 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14303 (warn_function_cold): Likewise.
14304 (propagate_pure_const): Likewise.
14305 * ipa-ref.h (enum GTY): Likewise.
14306 * ipa-split.c (find_retbnd): Likewise.
14307 (consider_split): Likewise.
14308 (split_function): Likewise.
14309 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14310 * ipa.c (walk_polymorphic_call_targets): Likewise.
14311 (symbol_table::remove_unreachable_nodes): Likewise.
14312 (process_references): Likewise.
14313 (cgraph_build_static_cdtor_1): Likewise.
14314 * lto-cgraph.c (lto_output_node): Likewise.
14315 (output_refs): Likewise.
14316 (compute_ltrans_boundary): Likewise.
14317 (input_overwrite_node): Likewise.
14318 (input_node): Likewise.
14319 (input_cgraph_1): Likewise.
14320 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14321 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14322 (class pass_chkp_instrumentation_passes): Likewise.
14323 (make_pass_chkp_instrumentation_passes): Likewise.
14324 * passes.def: Likewise.
14325 * rtl.h (struct GTY): Likewise.
14326 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14327 * stor-layout.c (layout_type): Likewise.
14328 * symtab.c: Likewise.
14329 * target.def: Likewise.
14330 * targhooks.c (default_chkp_bound_type): Likewise.
14331 (default_chkp_bound_mode): Likewise.
14332 (default_builtin_chkp_function): Likewise.
14333 (default_chkp_function_value_bounds): Likewise.
14334 (default_chkp_make_bounds_constant): Likewise.
14335 (default_chkp_initialize_bounds): Likewise.
14336 * targhooks.h (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 * toplev.c (compile_file): Likewise.
14343 (process_options): Likewise.
14344 * tree-core.h (DEF_BUILTIN): Likewise.
14345 (DEF_BUILTIN_CHKP): Likewise.
14346 * tree-inline.c (declare_return_variable): Likewise.
14347 (remap_gimple_stmt): Likewise.
14348 (copy_bb): Likewise.
14349 (initialize_inlined_parameters): Likewise.
14350 (expand_call_inline): Likewise.
14351 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14352 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14353 (make_pass_ipa_chkp_produce_thunks): Likewise.
14354 (make_pass_chkp): Likewise.
14355 (make_pass_chkp_opt): Likewise.
14356 (make_pass_chkp_instrumentation_passes): Likewise.
14357 * tree-pretty-print.c (dump_generic_node): Likewise.
14358 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14359 * tree-ssa-dce.c (propagate_necessity): Likewise.
14360 (eliminate_unnecessary_stmts): Likewise.
14361 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14362 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14363 * tree-ssa-sccvn.h: Likewise.
14364 * tree-ssa-strlen.c (get_string_length): Likewise.
14365 (valid_builtin_call): Likewise.
14366 (adjust_last_stmt): Likewise.
14367 (handle_builtin_strchr): Likewise.
14368 (handle_builtin_strcpy): Likewise.
14369 (handle_builtin_stxncpy): Likewise.
14370 (handle_builtin_memcpy): Likewise.
14371 (handle_builtin_strcat): Likewise.
14372 (strlen_check_and_optimize_stmt): Likewise.
14373 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14374 * tree-streamer-in.c: Likewise.
14375 * tree-streamer.c (record_common_node): Likewise.
14376 * tree.c (tree_code_size): Likewise.
14377 (wide_int_to_tree_1): Likewise.
14378 (type_contains_placeholder_1): Likewise.
14379 (build_common_tree_nodes): Likewise.
14380 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14381 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14382 (POINTER_BOUNDS_P): Likewise.
14383 (BOUNDED_TYPE_P): Likewise.
14384 (BOUNDED_P): Likewise.
14385 (CALL_WITH_BOUNDS_P): Likewise.
14386 (pointer_bounds_type_node): Likewise.
14387 * value-prof.c (gimple_ic): Likewise.
14388 * var-tracking.c (vt_add_function_parameters): Likewise.
14389 * varasm.c (make_decl_rtl): Likewise.
14390 (assemble_start_function): Likewise.
14391 (output_constant): Likewise.
14392 (maybe_assemble_visibility): Likewise.
14393 * varpool.c (ctor_for_folding): Likewise.
14394 * chkp-builtins.def: Remove.
14395 * ipa-chkp.c: Remove.
14396 * ipa-chkp.h: Remove.
14397 * rtl-chkp.c: Remove.
14398 * rtl-chkp.h: Remove.
14399 * tree-chkp-opt.c: Remove.
14400 * tree-chkp.c: Remove.
14401 * tree-chkp.h: Remove.
14402
14403 2018-06-07 Carl Love <cel@us.ibm.com>
14404
14405 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14406 vextract_fp_from_shortl): Add BE support.
14407
14408 2018-06-07 Paul Koning <ni1d@arrl.net>
14409
14410 * compare-elim.c (try_merge_compare): Don't merge compare if
14411 address contains a side effect.
14412 (try_eliminate_compare): Likewise.
14413
14414 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14415
14416 * config.gcc: Support "tremont".
14417 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14418 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14419 PROCESSOR_TREMONT.
14420 * config/i386/i386.c (m_TREMONT): Define.
14421 (processor_target_table): Add "tremont".
14422 (PTA_TREMONT): Define.
14423 (ix86_lea_outperforms): Add TARGET_TREMONT.
14424 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14425 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14426 and M_INTEL_GOLDMONT_PLUS.
14427 (fold_builtin_cpu): Add "tremont".
14428 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14429 (ix86_option_override_internal): Add "tremont".
14430 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14431 (processor_type): Add PROCESSOR_TREMONT.
14432 * config/i386/x86-tune.def: Add m_TREMONT.
14433 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14434
14435 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14436
14437 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14438 symbol defined for msp430i* devices to be lower case.
14439
14440 2018-06-07 Richard Biener <rguenther@suse.de>
14441
14442 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14443 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14444 Properly wrap signed arithmetic if overflow wraps.
14445
14446 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14447
14448 PR tree-optimization/69615
14449 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14450 of a cast from a same precision integral SSA_NAME in a bb dominated
14451 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14452 cast to utype if rhs2 has already a compatible type.
14453
14454 2018-06-07 Richard Biener <rguenther@suse.de>
14455
14456 PR tree-optimization/85935
14457 * graphite-scop-detection.c (find_params_in_bb): Analyze
14458 condition operands with respect to the correct loop. Assert
14459 the analysis doesn't fail.
14460
14461 2018-06-04 Carl Love <cel@us.ibm.com>
14462
14463 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14464 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14465 as it is slightly cheaper.
14466 (first_match_or_eos_index_<mode>):
14467 Calculate index using natural element order.
14468 (first_match_index_<mode>):
14469 Calculate index using natural element order.
14470 (first_match_or_eos_index_<mode>):
14471 Calculate index using natural order.
14472 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14473 for BE and LE modes.
14474 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14475 P9V_BUILTIN_VCLZLSBB_V16QI.
14476 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14477 specific.
14478
14479 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14480
14481 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14482 indentation and line wrap for many prototypes. Add missing
14483 @smallexample directives around block of prototypes for vec_xl and
14484 vec_xst.
14485
14486 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14487
14488 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14489 track if we pass or return IEEE 128-bit floating point.
14490 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14491 C++ mangling that is compatible with GCC 8.1.
14492 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14493 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14494 floating point types.
14495 (rs6000_function_arg_advance_1): Likewise.
14496 (rs6000_mangle_type): Optionally generate mangled names that match
14497 what GCC 8.1 generated for IEEE 128-bit floating point types.
14498 (rs6000_globalize_decl_name): If we have an external function that
14499 passes or returns IEEE 128-bit types, generate a weak reference
14500 from the mangled name used in GCC 8.1 to the current mangled
14501 name.
14502 (rs6000_init_builtins): Make __ibm128 use the long double type if
14503 long double is IBM extended double. Make __float128 use the long
14504 double type if long double is IEEE 128-bit.
14505
14506 PR target/85657
14507 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14508 macro for __ibm128 built-in functions.
14509 (PACK_IF): Add __ibm128 pack/unpack functions.
14510 (UNPACK_IF): Likewise.
14511 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14512 enable long double built-in functions if long double is IEEE
14513 128-bit floating point.
14514 (rs6000_invalid_builtin): Update long double built-in function
14515 error message.
14516 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14517 functions, adjust the built-in function to use the long double
14518 built-in function if __ibm128 and long double are the same type.
14519 * doc/extend.texi (PowerPC builtins): Update documention for
14520 __builtin_{,un}pack_longdouble. Add documentation for
14521 __builtin_{,un}pack_ibm128.
14522
14523 2018-06-06 Jim Wilson <jimw@sifive.com>
14524
14525 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14526 (struct machine_function): New field interrupt_mode.
14527 (riscv_handle_type_attribute): New function. Add forward declaration.
14528 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14529 (riscv_expand_epilogue): Check interrupt_mode field.
14530 (riscv_set_current_function): Check interrupt attribute args and
14531 set interrupt_mode field.
14532 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14533 (riscv_sret, riscv_uret): New.
14534 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14535 new arguments to interrupt attribute.
14536
14537 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14538
14539 PR target/63177
14540 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14541 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14542
14543 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14544
14545 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14546 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14547 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14548 several redundant entries.
14549
14550 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14551
14552 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14553 type from "rtx" to "rtx_insn *".
14554 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14555 for local "call_insn", removing cast.
14556 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14557
14558 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14559
14560 PR tree-optimization/86066
14561 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14562 for BIT_INSERT_EXPR stores.
14563
14564 2018-06-06 Richard Biener <rguenther@suse.de>
14565
14566 PR tree-optimization/86062
14567 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14568 component refs ontop
14569 of to be offsetted base.
14570
14571 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14572
14573 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14574 to be static and remove check on interrupt attribute name.
14575
14576 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14577
14578 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14579 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14580
14581 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14582
14583 PR target/79924
14584 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14585 second argument.
14586 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14587 Remove second argument, change how error is called.
14588 (aarch64_layout_arg): Remove second argument from
14589 aarch64_err_no_fpadvsimd call.
14590 (aarch64_init_cumulative_args): Ditto.
14591 (aarch64_gimplify_va_arg_expr): Ditto.
14592 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14593
14594 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14595
14596 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14597 (*simple_return_indirect_internal<mode>): Rename from
14598 simple_return_indirect_internal. Use W mode iterator.
14599 (rstorssp): New expander.
14600 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14601 (clrssbsy): New expander.
14602 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14603
14604 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14605
14606 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14607 __typeof__.
14608 (cmse_check_pointed_object): Likewise.
14609
14610 2018-06-05 Martin Liska <mliska@suse.cz>
14611
14612 PR gcov-profile/47618
14613 * doc/invoke.texi: Document how -fprofile-dir format
14614 is extended.
14615
14616 2018-06-05 Richard Biener <rguenther@suse.de>
14617
14618 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14619 removal pretend DOM info isn't available so we do not update
14620 it and only remove edges, not dominated blocks. Actually free
14621 DOM info in case we removed something. Remove unreachable blocks.
14622 (mfb_keep_latches): Work with either DOM info or marked backedges.
14623 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14624 first. Mark backedges if DOM info isn't available.
14625 (Re-)compute DOM info after cleanup_control_flow_pre.
14626
14627 2018-06-05 Richard Biener <rguenther@suse.de>
14628
14629 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14630 (locus_discrim_hasher::hash): Adjust.
14631 (locus_discrim_hasher::equal): Likewise.
14632 (next_discriminator_for_locus): Work on line directly.
14633 (same_line_p): Pass in expanded locus1 as well.
14634 (assign_discriminators): Avoid redundant location expansions.
14635
14636 2018-06-05 Richard Biener <rguenther@suse.de>
14637
14638 PR tree-optimization/86046
14639 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14640 if required after clearing TREE_ADDRESSABLE.
14641
14642 2018-06-05 Richard Biener <rguenther@suse.de>
14643
14644 PR tree-optimization/86047
14645 * tree-ssa-loop.c (for_each_index): Glob handling of all
14646 decls and constants and really handle all of them.
14647
14648 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14649
14650 PR target/81497
14651 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14652 qualifier_void_pointer and qualifier_const_void_pointer.
14653 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14654 (arm_init_builtins): Handle the above.
14655 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14656 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14657 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14658 void intrinsics.
14659
14660 2018-06-05 Martin Liska <mliska@suse.cz>
14661
14662 * auto-profile.c (read_autofdo_file): Do not use
14663 gcov_ctr_summary struct.
14664 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14665 * coverage.c (struct counts_entry): Likewise.
14666 (read_counts_file): Read just single summary entry.
14667 (get_coverage_counts): Use gcov_summary struct.
14668 * coverage.h (get_coverage_counts): Likewise.
14669 * gcov-dump.c (dump_working_sets): Likewise.
14670 (tag_summary): Dump just single summary.
14671 * gcov-io.c (gcov_write_summary): Write just histogram
14672 summary.
14673 (gcov_read_summary): Read just single summary.
14674 (compute_working_sets): Use gcov_summary struct.
14675 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14676 of GCOV_COUNTERS_SUMMABLE.
14677 (GCOV_COUNTERS_SUMMABLE): Remove.
14678 (GCOV_FIRST_VALUE_COUNTER): Replace with
14679 GCOV_COUNTER_V_INTERVAL.
14680 (struct gcov_ctr_summary): Remove.
14681 (struct gcov_summary): Directly use fields of former
14682 gcov_ctr_summary.
14683 (compute_working_sets): Use gcov_summary struct.
14684 * gcov.c (read_count_file): Do not use ctrs fields.
14685 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14686 struct.
14687 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14688 struct.
14689 * profile.c: Likewise.
14690 * profile.h: Likewise.
14691
14692 2018-06-05 Martin Liska <mliska@suse.cz>
14693
14694 PR gcov-profile/84846
14695 * gcov.c (output_lines): Print working directory only
14696 in intermediate format.
14697
14698 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14699
14700 * config/s390/s390-builtin-types.def: Add void function type.
14701 * config/s390/s390-builtins.def: Use the function type for the
14702 tbeginc builtin.
14703
14704 2018-06-04 Jim Wilson <jimw@sifive.com>
14705
14706 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14707 to int.
14708 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14709 and maybe_eh_return. Change regno to unsigned int. Use new args to
14710 handle EH_RETURN_DATA_REGNO registers properly.
14711 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14712 (riscv_expand_epilogue): Update comment. Change argument name and
14713 type. Update code to use new name and type. Pass new args to
14714 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
14715 EXCEPTION_RETURN.
14716 * config/riscv/riscv.md (NORMAL_RETURN): New.
14717 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14718 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14719 (eh_return): Call gen_eh_return_internal and emit barrier.
14720 (eh_return_internal): Call riscv_expand_epilogue.
14721
14722 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
14723
14724 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14725 bit_insertion field and declare can_be_merged_into method.
14726 (merged_store_group::can_be_merged_into): New method.
14727 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14728 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
14729 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14730
14731 2018-06-04 Richard Biener <rguenther@suse.de>
14732
14733 PR tree-optimization/85955
14734 * builtins.c (fold_builtin_sincos): Convert pointers to
14735 destination to appropriate type before dereferencing.
14736
14737 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
14738
14739 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14740
14741 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
14742
14743 * expr.c (expand_expr_real_1): Force the operand into memory if
14744 its TYPE_MODE is BLKmode and if there is no integer mode for
14745 the number of bits being extracted.
14746
14747 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14748
14749 PR target/85832
14750 PR target/86036
14751 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14752 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14753
14754 2018-06-04 Richard Biener <rguenther@suse.de>
14755
14756 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14757 (cleanup_tree_cfg_noloop): ... single caller. Do
14758 start_recording_case_labels later.
14759
14760 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
14761
14762 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14763 to _IMMINTRIN_H_INCLUDED.
14764 * config/i386/pconfigintrin.h: Ditto.
14765 * config/i386/waitpkgintrin.h: Ditto.
14766 * config/i386/immintrin.h: Add includes for sgxintrin.h,
14767 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14768 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14769 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14770 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14771 waitpkgintrin.h and cldemoteintrin.h.
14772
14773 2018-06-04 Richard Biener <rguenther@suse.de>
14774
14775 PR tree-optimization/86038
14776 * tracer.c (find_best_successor): Check probability for
14777 being initialized, bail out if not.
14778
14779 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
14780
14781 PR target/86003
14782 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
14783 of bits to ignore when comparing architectures.
14784
14785 2018-06-04 Jakub Jelinek <jakub@redhat.com>
14786
14787 PR tree-optimization/69615
14788 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
14789 maximum or minimum of the type, try to merge it also as if
14790 range1 is + [-, x - 1] or + [x + 1, -].
14791
14792 PR c++/86025
14793 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
14794
14795 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
14796
14797 PR tree-optimization/86034
14798 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
14799 the unsigned bitfield type in a bit insertion sequence if it does not
14800 have a larger precision than the bitfield size.
14801 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
14802
14803 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
14804
14805 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
14806
14807 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14808
14809 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
14810 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
14811 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
14812 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
14813
14814 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
14815
14816 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
14817 Disable -fdelete-null-pointer-checks for ELF toolchain.
14818
14819 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14820 Kito Cheng <kito.cheng@gmail.com>
14821
14822 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
14823 (nds32le-*-*, nds32be-*-*): Integrate checking process.
14824 (nds32*-*-*): Add glibc and uclibc conditions.
14825 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
14826 (TARGET_EXCEPT_UNWIND_INFO): Define.
14827 * config/nds32/elf.h: New file.
14828 * config/nds32/linux.h: New file.
14829 * config/nds32/nds32-elf.opt: New file.
14830 * config/nds32/nds32-linux.opt: New file.
14831 * config/nds32/nds32-fp-as-gp.c
14832 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
14833 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
14834 TARGET_LINUX_ABI.
14835 (nds32_asm_file_end): Ditto.
14836 (nds32_print_operand): Ditto.
14837 (nds32_insert_attributes): Ditto.
14838 (nds32_init_libfuncs): New function.
14839 (TARGET_HAVE_TLS): Define.
14840 (TARGET_INIT_LIBFUNCS): Define.
14841 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
14842 spec content.
14843 (TARGET_ELF): Apply different mcmodel setting.
14844 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
14845 been migrated into elf.h and linux.h files.
14846 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
14847 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
14848 (mcmodel): The content has been migrated into nds32-elf.opt and
14849 nds32-linux.opt files.
14850 * config/nds32/t-elf: New file.
14851 * config/nds32/t-linux: New file.
14852
14853 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
14854 Shiva Chen <shiva0217@gmail.com>
14855
14856 * config/nds32/constants.md (unspec_volatile_element): Add
14857 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
14858 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
14859 optimization.
14860 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
14861 (make_pass_nds32_fp_as_gp): Declare.
14862 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
14863 optmization pass.
14864 (nds32_asm_function_end_prologue): Remove unused asm output.
14865 (nds32_asm_function_begin_epilogue): Remove unused asm output.
14866 (nds32_asm_file_start): Output necessary fp_as_gp information.
14867 (nds32_option_override): Adjust register usage.
14868 (nds32_expand_prologue): Consider fp_as_gp situation.
14869 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
14870 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
14871 (epilogue): Ditto.
14872 (return): Ditto.
14873 (simple_return): Ditto.
14874 (omit_fp_begin): Output special directive for fp_as_gp.
14875 (omit_fp_end): Output special directive for fp_as_gp.
14876 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
14877 mforbid-fp-as-gp): New options.
14878
14879 2018-06-01 Mark Wielaard <mark@klomp.org>
14880
14881 * dwarf2out.c (dwarf2out_finish): Remove generation of
14882 DW_AT_loclists_base.
14883
14884 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
14885
14886 * gimple-ssa-store-merging.c: Include gimple-fold.h.
14887 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
14888 (struct merged_store_group): Add bit_insertion field.
14889 (dump_char_array): Use standard hexadecimal format.
14890 (merged_store_group::merged_store_group): Set bit_insertion to false.
14891 (merged_store_group::apply_stores): Use optimal buffer size. Deal
14892 with BIT_INSERT_EXPR stores. Move up code updating the mask and
14893 also print the mask in the dump file.
14894 (pass_store_merging::gate): Minor tweak.
14895 (imm_store_chain_info::coalesce_immediate): Fix wrong association
14896 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
14897 stores with INTEGER_CST stores.
14898 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14899 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14900 and use it throughout. Generate bit insertion sequences if need be.
14901 (pass_store_merging::process_store): Remove redundant condition.
14902 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14903
14904 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
14905
14906 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14907 the 128-bit floating point types. Fix function comment.
14908
14909 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14910
14911 * config/aarch64/aarch64-simd.md
14912 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14913 mnemonics.
14914 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14915 mnemonics.
14916
14917 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14918
14919 PR tree-optimization/85989
14920 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14921 variable.
14922 (backprop::intersect_uses): Check it when deciding whether this
14923 is a backedge reference.
14924 (backprop::process_block): Add each phi to m_visited_phis
14925 after visiting it, then clear it at the end.
14926
14927 2018-06-01 Richard Biener <rguenther@suse.de>
14928
14929 * tree-vectorizer.h (vect_dr_stmt): New function.
14930 (vect_get_load_cost): Adjust.
14931 (vect_get_store_cost): Likewise.
14932 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14933 Use vect_dr_stmt instead of DR_SMTT.
14934 (vect_record_base_alignments): Likewise.
14935 (vect_calculate_target_alignment): Likewise.
14936 (vect_compute_data_ref_alignment): Likewise and make static.
14937 (vect_update_misalignment_for_peel): Likewise.
14938 (vect_verify_datarefs_alignment): Likewise.
14939 (vector_alignment_reachable_p): Likewise.
14940 (vect_get_data_access_cost): Likewise. Pass down
14941 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14942 (vect_get_peeling_costs_all_drs): Likewise.
14943 (vect_peeling_hash_get_lowest_cost): Likewise.
14944 (vect_enhance_data_refs_alignment): Likewise.
14945 (vect_find_same_alignment_drs): Likewise.
14946 (vect_analyze_data_refs_alignment): Likewise.
14947 (vect_analyze_group_access_1): Likewise.
14948 (vect_analyze_group_access): Likewise.
14949 (vect_analyze_data_ref_access): Likewise.
14950 (vect_analyze_data_ref_accesses): Likewise.
14951 (vect_vfa_segment_size): Likewise.
14952 (vect_small_gap_p): Likewise.
14953 (vectorizable_with_step_bound_p): Likewise.
14954 (vect_prune_runtime_alias_test_list): Likewise.
14955 (vect_analyze_data_refs): Likewise.
14956 (vect_supportable_dr_alignment): Likewise.
14957 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14958 (vect_gen_prolog_loop_niters): Likewise.
14959 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14960 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14961 modify DR_STMT.
14962 (vect_recog_mask_conversion_pattern): Likewise.
14963 (vect_try_gather_scatter_pattern): Likewise.
14964 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14965 to vect_get_store_cost.
14966 (vect_get_store_cost): Get stmt_info instead of DR.
14967 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14968 (vect_get_load_cost): Get stmt_info instead of DR.
14969
14970 2018-06-01 Richard Biener <rguenther@suse.de>
14971
14972 PR middle-end/86017
14973 * gimple-fold.c (var_decl_component_p): Also allow offsetted
14974 vars wrapped in MEM_REFs.
14975
14976 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
14977
14978 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14979 Fix subreg tests so that we only return a choice between
14980 GENERAL_REGS and FP_REGS if the original classes included both.
14981
14982 2018-06-01 Richard Biener <rguenther@suse.de>
14983
14984 PR ipa/85960
14985 * tree-ssa-structalias.c (get_function_part_constraint):
14986 Handle NULL fi->decl.
14987 (find_func_aliases_for_call): Properly handle indirect
14988 fi from direct call.
14989 (find_func_clobbers): Likewise.
14990 (ipa_pta_execute): Likewise.
14991 (create_variable_info_for): For functions that are ifunc_resolver
14992 resolve to a varinfo that contains the result of the resolver call.
14993 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14994 aliases.
14995
14996 2018-05-31 Michael Collison <michael.collison@arm.com>
14997
14998 * config/aarch64/aarch64.md:
14999 (*fix_to_zero_extenddfdi2): New pattern.
15000 * gcc.target/aarch64/fix_extend1.c: New testcase.
15001
15002 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15003
15004 PR middle-end/78809
15005 PR middle-end/83026
15006 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15007 and BUILT_IN_STRNCMP_EQ.
15008 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15009 BUILT_IN_STRNCMP_EQ.
15010 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15011 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15012 (gimple_fold_builtin): Likewise.
15013 * tree-ssa-strlen.c (compute_string_length): New function.
15014 (determine_min_obsize): New function.
15015 (handle_builtin_string_cmp): New function to handle calls to
15016 string compare functions.
15017 (strlen_optimize_stmt): Add handling to builtin string compare
15018 calls.
15019 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15020 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15021 * tree.c (build_common_builtin_nodes): Add new defines of
15022 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15023
15024 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15025
15026 PR target/85984
15027 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15028 functions with naked attribute.
15029
15030 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15031
15032 * config/i386/sse.md (avx_vec_concat<mode>):
15033 Substitute concat_tg_mode mode attribute with xtg_mode.
15034 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15035 (concat_tg_mode): Remove mode attribute.
15036
15037 2018-05-31 Martin Sebor <msebor@redhat.com>
15038
15039 PR c/82063
15040 * calls.c (alloc_max_size): Correct a logic error/typo.
15041 Treat excessive arguments as infinite. Warn for invalid arguments.
15042 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15043
15044 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15045
15046 PR target/85829
15047 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15048 and movx for Haswell.
15049
15050 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15051 Cesar Philippidis <cesar@codesourcery.com>
15052
15053 PR middle-end/85879
15054 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15055 when emitting error on private/firstprivate reductions.
15056 * omp-low.c (lower_omp_target): Avoid reference-type processing
15057 on pointers for firstprivate clause.
15058
15059 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15060
15061 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15062 (st1x2): Likewise.
15063 (st1x3): Likewise.
15064 * config/aarch64/aarch64-simd.md
15065 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15066 (aarch64_ld1_x3_<mode>): Likewise
15067 (aarch64_st1x2<VALLDIF:mode>): Likewise
15068 (aarch64_st1_x2_<mode>): Likewise
15069 (aarch64_st1x3<VALLDIF:mode>): Likewise
15070 (aarch64_st1_x3_<mode>): Likewise
15071 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15072 (vld1_s8_x3): Likewise.
15073 (vld1_u16_x3): Likewise.
15074 (vld1_s16_x3): Likewise.
15075 (vld1_u32_x3): Likewise.
15076 (vld1_s32_x3): Likewise.
15077 (vld1_u64_x3): Likewise.
15078 (vld1_s64_x3): Likewise.
15079 (vld1_f16_x3): Likewise.
15080 (vld1_f32_x3): Likewise.
15081 (vld1_f64_x3): Likewise.
15082 (vld1_p8_x3): Likewise.
15083 (vld1_p16_x3): Likewise.
15084 (vld1_p64_x3): Likewise.
15085 (vld1q_u8_x3): Likewise.
15086 (vld1q_s8_x3): Likewise.
15087 (vld1q_u16_x3): Likewise.
15088 (vld1q_s16_x3): Likewise.
15089 (vld1q_u32_x3): Likewise.
15090 (vld1q_s32_x3): Likewise.
15091 (vld1q_u64_x3): Likewise.
15092 (vld1q_s64_x3): Likewise.
15093 (vld1q_f16_x3): Likewise.
15094 (vld1q_f32_x3): Likewise.
15095 (vld1q_f64_x3): Likewise.
15096 (vld1q_p8_x3): Likewise.
15097 (vld1q_p16_x3): Likewise.
15098 (vld1q_p64_x3): Likewise.
15099 (vst1_s64_x2): Likewise.
15100 (vst1_u64_x2): Likewise.
15101 (vst1_f64_x2): Likewise.
15102 (vst1_s8_x2): Likewise.
15103 (vst1_p8_x2): Likewise.
15104 (vst1_s16_x2): Likewise.
15105 (vst1_p16_x2): Likewise.
15106 (vst1_s32_x2): Likewise.
15107 (vst1_u8_x2): Likewise.
15108 (vst1_u16_x2): Likewise.
15109 (vst1_u32_x2): Likewise.
15110 (vst1_f16_x2): Likewise.
15111 (vst1_f32_x2): Likewise.
15112 (vst1_p64_x2): Likewise.
15113 (vst1q_s8_x2): Likewise.
15114 (vst1q_p8_x2): Likewise.
15115 (vst1q_s16_x2): Likewise.
15116 (vst1q_p16_x2): Likewise.
15117 (vst1q_s32_x2): Likewise.
15118 (vst1q_s64_x2): Likewise.
15119 (vst1q_u8_x2): Likewise.
15120 (vst1q_u16_x2): Likewise.
15121 (vst1q_u32_x2): Likewise.
15122 (vst1q_u64_x2): Likewise.
15123 (vst1q_f16_x2): Likewise.
15124 (vst1q_f32_x2): Likewise.
15125 (vst1q_f64_x2): Likewise.
15126 (vst1q_p64_x2): Likewise.
15127 (vst1_s64_x3): Likewise.
15128 (vst1_u64_x3): Likewise.
15129 (vst1_f64_x3): Likewise.
15130 (vst1_s8_x3): Likewise.
15131 (vst1_p8_x3): Likewise.
15132 (vst1_s16_x3): Likewise.
15133 (vst1_p16_x3): Likewise.
15134 (vst1_s32_x3): Likewise.
15135 (vst1_u8_x3): Likewise.
15136 (vst1_u16_x3): Likewise.
15137 (vst1_u32_x3): Likewise.
15138 (vst1_f16_x3): Likewise.
15139 (vst1_f32_x3): Likewise.
15140 (vst1_p64_x3): Likewise.
15141 (vst1q_s8_x3): Likewise.
15142 (vst1q_p8_x3): Likewise.
15143 (vst1q_s16_x3): Likewise.
15144 (vst1q_p16_x3): Likewise.
15145 (vst1q_s32_x3): Likewise.
15146 (vst1q_s64_x3): Likewise.
15147 (vst1q_u8_x3): Likewise.
15148 (vst1q_u16_x3): Likewise.
15149 (vst1q_u32_x3): Likewise.
15150 (vst1q_u64_x3): Likewise.
15151 (vst1q_f16_x3): Likewise.
15152 (vst1q_f32_x3): Likewise.
15153 (vst1q_f64_x3): Likewise.
15154 (vst1q_p64_x3): Likewise.
15155
15156 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15157
15158 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15159 user_label_prefix to name.
15160
15161 * tree-core.h: Update comment about the format of NAME string
15162 passed to handler in attribute_spec.
15163
15164 * config/msp430/msp430.md: Remove erroneous subreg expression from
15165 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15166 zero_extend{q,h}isi2.
15167
15168 2018-05-30 Borislav Petkov <bp@suse.de>
15169
15170 * doc/extend.texi: Document some architecture specific
15171 constraints and sort entries.
15172
15173 2018-05-30 Martin Sebor <msebor@redhat.com>
15174
15175 PR middle-end/85369
15176 * builtins.c (expand_builtin_stpcpy_1): New function.
15177 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15178 only if the former succeeds.
15179
15180 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15181
15182 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15183 in saphira.
15184
15185 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15186
15187 * doc/invoke.texi (-flinker-output): Document
15188
15189 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15190
15191 * passes.c (ipa_write_summaries): Only modify statements if body
15192 is in memory.
15193 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15194 incrementally linking.
15195 (ipa_passes): Likewise.
15196 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15197 pass down resolution info.
15198 * common.opt (flag_incremental_link): Update info.
15199 * gcc.c (plugin specs): Turn flinker-output=* to
15200 -plugin-opt=-linker-output-known
15201 * toplev.c (compile_file): Also cut compilation when doing incremental
15202 link.
15203 * flag-types. (enum lto_partition_model): Add
15204 LTO_LINKER_OUTPUT_NOLTOREL.
15205 (invoke.texi): Add -flinker-output docs.
15206 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15207 link same way as WPA; do not stream in dead initializers.
15208
15209 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15210 darf2out_register_external_decl): Support incremental link.
15211
15212 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15213
15214 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15215
15216 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15217
15218 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15219 it down to simple_object_copy_lto_debug_sections.
15220 (run_gcc): Determine incremental LTO link time and configure
15221 lto1 into non-wpa mode, disable renaming of debug sections.
15222
15223 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15224
15225 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15226 descriptions of various incorrectly documented functions.
15227
15228 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15229
15230 Revert:
15231 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15232 address check not strict.
15233
15234 2018-05-30 Richard Biener <rguenther@suse.de>
15235
15236 PR tree-optimization/85964
15237 * tracer.c (better_p): Drop initialized count check, we only
15238 call the function with initialized counts now.
15239 (find_best_successor): Do find a best edge if one
15240 has uninitialized count.
15241 (find_best_predecessor): Likewise. Do BB frequency check only
15242 if count is initialized.
15243
15244 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15245
15246 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15247 (aarch64_ldrstr_offset_compare): New.
15248 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15249 load/store orderings.
15250 (aarch64_gen_adjusted_ldpstp): Likewise.
15251
15252 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15253
15254 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15255 Check for subset of GENERAL_REGS and FP_REGS.
15256 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15257 r=w alternative.
15258
15259 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15260
15261 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15262 and wi::to_poly_offset. Add the current offset and then check
15263 whether the sum fits, rather than using an unchecked addition of
15264 a checked term. Check for a shwi rather than a uhwi.
15265 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15266 (store_constructor): Use poly_int_tree_p.
15267 (expand_expr_real_1): Likewise.
15268 * function.c (assign_temp): Likewise.
15269 * fold-const.c (const_binop): Use poly_int_tree_p and
15270 wi::to_poly_offset.
15271 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15272 division.
15273 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15274 to_poly_offset for MEM offsets.
15275 * ipa-icf.c (sem_variable::equals): Likewise.
15276 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15277 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15278 wi::to_poly_offset for BIT_FIELD_REF offsets.
15279 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15280 wi::to_poly_offset.
15281 * var-tracking.c (emit_note_insn_var_location): Use
15282 tree_to_poly_uint64.
15283
15284 2018-05-29 Jim Wilson <jimw@sifive.com>
15285
15286 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15287
15288 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15289
15290 PR target/85950
15291 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15292 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15293 sequence.
15294 (sse4_1_round<mode>2): Use nonimmediate_operand
15295 for operand 1 predicate.
15296
15297 2018-05-29 Martin Sebor <msebor@redhat.com>
15298 Richard Biener <rguenther@suse.de>
15299
15300 PR testsuite/85888
15301 * calls.c (get_size_range): Call determine_value_range instead
15302 of get_value_range..
15303 * tree-vrp.h (determine_value_range): Declared new function.
15304 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15305
15306 2018-05-29 Richard Biener <rguenther@suse.de>
15307
15308 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15309 sure to use non-pattern stmts for get_earlier_stmt arguments.
15310 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15311 called on pattern stmts.
15312 (get_later_stmt): Likewise.
15313
15314 2018-05-29 Martin Liska <mliska@suse.cz>
15315
15316 PR gcov-profile/85759
15317 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15318 env variables.
15319
15320 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15321
15322 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15323 VEC_UNPACK_*_EXPR.
15324 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15325 VEC_PACK_*_EXPR.
15326
15327 PR target/85918
15328 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15329 VEC_PACK_FLOAT_EXPR): New tree codes.
15330 * tree-pretty-print.c (op_code_prio): Handle
15331 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15332 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15333 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15334 * tree-inline.c (estimate_operator_cost): Likewise.
15335 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15336 * fold-const.c (const_binop): Likewise.
15337 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15338 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15339 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15340 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15341 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15342 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15343 * expr.c (expand_expr_real_2): Likewise.
15344 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15345 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15346 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15347 optabs.
15348 * optabs.c (expand_widen_pattern_expr): For
15349 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15350 sign from result type rather than operand's type.
15351 (expand_binop_directly): For vec_packu_float_optab and
15352 vec_packs_float_optab allow result type to be different from operand's
15353 type.
15354 * optabs-tree.c (optab_for_tree_code): Handle
15355 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15356 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15357 * tree-vect-generic.c (expand_vector_operations_1): Handle
15358 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15359 VEC_PACK_FLOAT_EXPR.
15360 * tree-vect-stmts.c (supportable_widening_operation): Handle
15361 FIX_TRUNC_EXPR.
15362 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15363 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15364 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15365 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15366 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15367 mode attributes.
15368 (vec_pack<floatprefix>_float_<mode>): New expander.
15369 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15370 attributes.
15371 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15372 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15373 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15374 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15375 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15376 Document.
15377 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15378 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15379 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15380 VEC_PACK_FLOAT_EXPR): Document.
15381
15382 2018-05-29 Richard Biener <rguenther@suse.de>
15383
15384 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15385 member.
15386 (stmt_vec_info_vec): Make pointer.
15387 (init_stmt_vec_info_vec): Remove.
15388 (free_stmt_vec_info_vec): Likewise.
15389 (set_stmt_vec_info_vec): New function.
15390 (free_stmt_vec_infos): Likewise.
15391 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15392 (set_vinfo_for_stmt): Likewise.
15393 (get_earlier_stmt): Likewise.
15394 (get_later_stmt): Likewise.
15395 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15396 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15397 (vec_info::~vec_info): Free stmt_vec_infos.
15398 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15399 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15400 (pass_slp_vectorize::execute): Likewise.
15401 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15402 (free_stmt_vec_info_vec): Likewise.
15403 (set_stmt_vec_info_vec): New function.
15404 (free_stmt_vec_infos): Likewise.
15405 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15406 the global stmt_vec_info_vec.
15407 * tree-parloops.c (gather_scalar_reductions): Use
15408 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15409 vector.
15410
15411 2018-05-29 Richard Biener <rguenther@suse.de>
15412
15413 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15414
15415 2018-05-29 Martin Liska <mliska@suse.cz>
15416 David Malcolm <dmalcolm@redhat.com>
15417
15418 * vec.c (test_reverse): New.
15419 (vec_c_tests): Add new test.
15420 * vec.h (vl_ptr>::reverse): New function.
15421
15422 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15423
15424 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15425
15426 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15427 and later.
15428
15429 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15430
15431 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15432
15433 2018-05-28 Richard Biener <rguenther@suse.de>
15434
15435 PR tree-optimization/85933
15436 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15437 look at stmts marked as vectorizable.
15438
15439 2018-05-28 Richard Biener <rguenther@suse.de>
15440
15441 PR tree-optimization/85934
15442 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15443 vector boolean check before scalar optimization.
15444
15445 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15446
15447 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15448 for armv5te.
15449
15450 2018-05-28 Mark Wielaard <mark@klomp.org>
15451
15452 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15453 if it is an expression containing a minus sign.
15454
15455 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15456
15457 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15458
15459 2018-05-27 Paul Koning <ni1d@arrl.net>
15460
15461 * config/pdp11/pdp11.md (truncsihi2): Remove.
15462
15463 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15464 Chung-Ju Wu <jasonwucj@gmail.com>
15465
15466 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15467 implementation.
15468 (unaligned_store_dw): Ditto.
15469 * config/nds32/nds32-memory-manipulation.c
15470 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15471 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15472 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15473 (emit_setmem_word_loop): Rename to ...
15474 (emit_setmem_doubleword_loop): ... this.
15475 (nds32_gen_dup_4_byte_to_word_value): New function.
15476 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15477 (nds32_expand_setmem_loop): Refine implementation.
15478 (nds32_expand_setmem_loop_v3m): Ditto.
15479 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15480 pattern.
15481
15482 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15483
15484 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15485
15486 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15487
15488 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15489 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15490 machine->attr_no_prologue_p.
15491 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15492 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15493 (nds32_expand_epilogue): Consider attr_naked_p.
15494 (nds32_expand_epilogue_v3pop): Likewise.
15495 (nds32_can_use_return_insn): Likewise.
15496 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15497 attr_no_prologue_p fields.
15498 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15499
15500 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15501
15502 PR target/85918
15503 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15504 attributes.
15505 * config/i386/sse.md
15506 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15507 Rename to ...
15508 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15509 ... this.
15510 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15511 Rename to ...
15512 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15513 ... this.
15514 (*<floatsuffix>floatv2div2sf2): Rename to ...
15515 (*float<floatunssuffix>v2div2sf2): ... this.
15516 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15517 (float<floatunssuffix>v2div2sf2_mask): ... this.
15518 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15519 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15520 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15521 to ...
15522 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15523 ... this.
15524 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15525 Rename to ...
15526 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15527 ... this.
15528 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15529 Rename to ...
15530 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15531 ... this.
15532 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15533 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15534 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15535 gen_ufix_truncv8dfv8si2.
15536 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15537 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15538 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15539 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15540 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15541 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15542 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15543 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15544
15545 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15546
15547 PR target/85900
15548 PR target/85345
15549 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15550
15551 2018-05-25 Jim Wilson <jimw@sifive.com>
15552
15553 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15554 * config/riscv/riscv.c (struct machine_function): Add
15555 interrupt_handler_p and attribute_checked_p fields.
15556 (riscv_attribute_table): Add interrupt.
15557 (riscv_interrupt_type_p): New.
15558 (riscv_save_reg_p): Save extra regs for interrupt handler.
15559 (riscv_use_save_libcall): Return false for interrupt handler.
15560 (riscv_first_stack_step): Add forward declaration.
15561 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15562 for interrupt handler with large frame. Use it for saved reg list.
15563 (riscv_expand_prologue): Move flag_stack_usage_info support to
15564 eliminate duplication.
15565 (riscv_expand_epilogue): Generate mret for interrupt handler.
15566 (riscv_epilogue_uses): New.
15567 (riscv_can_use_return_insn): Return false for interrupt handler.
15568 (riscv_function_ok_for_sibcall): Likewise.
15569 (riscv_set_current_function): Add interrupt handler support.
15570 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15571 * config/riscv/riscv.md (UNSPECV_MRET): New.
15572 (GP_REGNUM): New.
15573 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15574 (riscv_mret): New.
15575 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15576
15577 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15578
15579 PR tree-optimization/85712
15580 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15581 this candidate has already been replaced in-situ by a copy.
15582
15583 2018-05-25 Jason Merrill <jason@redhat.com>
15584
15585 PR c++/80485 - inline function non-zero address.
15586 * symtab.c (nonzero_address): Check DECL_COMDAT.
15587
15588 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15589
15590 PR target/83628
15591 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15592 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15593 extension of SImode operation. Use const123_operand predicate.
15594 (*saddsi_1): Remove.
15595 (*saddl_se_1): Ditto.
15596 (*ssubsi_1): Ditto.
15597 (*ssubl_se_1): Ditto.
15598 * config/alpha/predicates.md (const123_operand): New predicate.
15599 * config/alpha/constraints.md (P): Use IN_RANGE.
15600
15601 2018-05-25 Richard Biener <rguenther@suse.de>
15602
15603 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15604 defaulted to true.
15605 (ref_maybe_used_by_stmt_p): Likewise.
15606 (stmt_may_clobber_ref_p): Likewise.
15607 (stmt_may_clobber_ref_p_1): Likewise.
15608 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15609 and pass it along.
15610 (ref_maybe_used_by_stmt_p): Likewise.
15611 (stmt_may_clobber_ref_p): Likewise.
15612 (stmt_may_clobber_ref_p_1): Likewise.
15613 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15614 the alias oracle to disambiguate DRs with stmts DR analysis
15615 couldn't handle.
15616 (vect_analyze_data_refs): Do not give up on not analyzable
15617 DRs for BB vectorization. Remove code truncating the dataref
15618 vector.
15619
15620 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15621
15622 PR target/85832
15623 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15624 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15625 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15626
15627 2018-05-25 Richard Biener <rguenther@suse.de>
15628
15629 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15630 function, combining stmt data ref gathering and fatal analysis
15631 parts.
15632 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15633 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15634 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15635 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15636 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15637
15638 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15639
15640 PR tree-optimization/85720
15641 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15642 SCC if all partitions are builtins.
15643 (version_loop_by_alias_check): New parameter. Generate cancelable
15644 runtime alias check if all partitions are builtins.
15645 (distribute_loop): Update call to above function.
15646
15647 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15648
15649 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15650 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15651 (parm_default_def_partition_arg): Ditto.
15652 (set_parm_default_def_partition): Ditto.
15653 (get_parm_default_def_partitions): Ditto and make it static.
15654 (get_undefined_value_partitions): Ditto and make it static.
15655 (remove_ssa_form): Refactor call to init_var_map here.
15656 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15657 computation for loop region.
15658 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15659 (register_default_def): Delete.
15660 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15661 (parm_default_def_partition_arg): Ditto.
15662 (set_parm_default_def_partition): Ditto.
15663 (get_parm_default_def_partitions): Ditto and make it static.
15664 (get_undefined_value_partitions): Ditto and make it static.
15665 (coalesce_with_default, coalesce_with_default): Update comment.
15666 (create_coalesce_list_for_region): New func factored out from
15667 create_outofssa_var_map.
15668 (populate_coalesce_list_for_outofssa): New func factored out from
15669 create_outofssa_var_map and coalesce_ssa_name.
15670 (create_outofssa_var_map): Delete.
15671 (coalesce_ssa_name): Refactor to support live range computation.
15672 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15673 (get_parm_default_def_partitions): Delete.
15674 (get_undefined_value_partitions): Ditto.
15675 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15676 computation for loop region.
15677 (new_tree_live_info, loe_visit_block): Ditto.
15678 (live_worklist, set_var_live_on_entry): Ditto.
15679 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15680 * tree-ssa-live.h (struct _var_map): New fields.
15681 (init_var_map): Change decl.
15682 (region_contains_p): New.
15683
15684 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15685
15686 * tree-ssa-live.h (live_merge_and_clear): Delete.
15687
15688 2018-05-25 Richard Biener <rguenther@suse.de>
15689
15690 PR c++/85912
15691 * tree-dump.c (dequeue_and_dump): Remove access to removed
15692 operand 2 of a SWITCH_EXPR.
15693
15694 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15695
15696 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15697 multiplication and division.
15698 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15699 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15700 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15701 (cond_udiv_optab, cond_umod_optab): New optabs.
15702 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15703 (IFN_COND_RDIV): New internal functions.
15704 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15705 TRUNC_MOD_EXPR and RDIV_EXPR.
15706 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15707 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15708 New unspecs.
15709 (SVE_INT_BINARY): Include mult.
15710 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15711 (optab, sve_int_op): Handle mult.
15712 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15713 UNSPEC_COND_DIV.
15714 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15715 for SVE_INT_BINARY_SD.
15716
15717 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15718
15719 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15720 (optab, sve_int_op): Handle div and udiv.
15721 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15722 for SVE_INT_BINARY_SD.
15723 (*<optab><mode>3): New insn for the same.
15724
15725 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15726
15727 * tree-vect-patterns.c: Include predict.h.
15728 (vect_recog_divmod_pattern): Restrict check for division support
15729 to when optimizing for size.
15730
15731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15732
15733 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15734 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15735 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15736 (gimple_match_op::set_op): Likewise.
15737 (gimple_resimplify4): Declare.
15738 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15739 (expr::gen_transform): Likewise.
15740 (decision_tree::gen): Generate a simplification routine for 4 operands.
15741 * gimple-match-head.c (gimple_simplify): Add an overload for
15742 4 operands. In the top-level function, handle up to 4 call
15743 arguments and call gimple_resimplify4.
15744 (gimple_resimplify4): New function.
15745 (build_call_internal): Pass a fourth operand.
15746 (maybe_push_to_seq): Likewise.
15747 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15748 Fold VEC_COND_EXPRs of an operation and a default value into
15749 an IFN_COND_* function if possible.
15750 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15751 New unspecs.
15752 (SVE_COND_FP_BINARY): Include them.
15753 (optab, sve_fp_op): Handle them.
15754 (SVE_INT_BINARY_REV): New code iterator.
15755 (SVE_COND_FP_BINARY_REV): New int iterator.
15756 (commutative): New int attribute.
15757 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15758 Declare.
15759 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15760 function.
15761 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15762 (*cond_<optab><mode>): New patterns for reversed operands.
15763
15764 2018-05-25 Richard Biener <rguenther@suse.de>
15765
15766 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15767 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15768 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15769 (STMT_VINFO_GROUPED_ACCESS): Adjust.
15770 * tree-vect-data-refs.c (everywhere): Adjust users.
15771 * tree-vect-loop.c (everywhere): Likewise.
15772 * tree-vect-slp.c (everywhere): Likewise.
15773 * tree-vect-stmts.c (everywhere): Likewise.
15774 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15775
15776 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15777
15778 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15779 Rename to...
15780 (gcc_cv_as_section_exclude): ... this.
15781 Try Solaris as #exclude syntax.
15782 * configure: Regenerate.
15783 * config.in: Regenerate.
15784 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
15785 SECTION_EXCLUDE.
15786 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
15787 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
15788
15789 * varasm.c (default_elf_asm_named_section): Don't check if
15790 HAVE_GAS_SECTION_EXCLUDE is defined.
15791
15792 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15793
15794 * doc/md.texi: Update the documentation of the cond_* optabs
15795 to mention the new final operand. Fix GET_MODE_NUNITS call.
15796 Describe the scalar case too.
15797 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
15798 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
15799 instead of 2.
15800 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
15801 (get_conditional_internal_fn): Update comment.
15802 * tree-vect-loop.c (vectorizable_reduction): Pass the original
15803 accumulator value as a final argument to conditional functions.
15804 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
15805 a define_expand and add an "else" operand. Assert for now that
15806 the else operand is equal to operand 2. Use SVE_INT_BINARY and
15807 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
15808 (*cond_<optab><mode>): New patterns.
15809 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
15810 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15811 (UNSPEC_COND_EOR): Delete.
15812 (optab): Remove associated mappings.
15813 (SVE_INT_BINARY): New code iterator.
15814 (sve_int_op): Remove int attribute and add "minus" to the code
15815 attribute.
15816 (SVE_COND_INT_OP): Delete.
15817 (SVE_COND_FP_OP): Rename to...
15818 (SVE_COND_FP_BINARY): ...this.
15819
15820 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15821
15822 * optabs.c (can_reuse_operands_p): New function.
15823 (maybe_legitimize_operands): Try to reuse the results for
15824 earlier operands.
15825
15826 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15827
15828 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
15829 Add {q} suffix to insn mnemonic.
15830
15831 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15832
15833 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
15834 (msp430_warn_func_return): New.
15835
15836 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
15837
15838 * fold-const.c (tree_nonzero_bits): New function.
15839 * fold-const.h (tree_nonzero_bits): Likewise.
15840 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
15841 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
15842
15843 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15844
15845 PR target/85900
15846 PR target/85345
15847 * varasm.c (assemble_alias): Check ifunc_resolver only on
15848 FUNCTION_DECL.
15849
15850 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
15851
15852 PR target/85903
15853 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
15854 when memory input operand is handled.
15855
15856 2018-05-24 Luis Machado <luis.machado@linaro.org>
15857
15858 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
15859 global.
15860 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
15861
15862 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15863
15864 * match.pd: Delay FMA folds until after vectorization.
15865
15866 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
15867
15868 PR target/83009
15869 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15870 address check not strict.
15871
15872 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
15873
15874 * gimple-match.h (gimple_match_op): New class.
15875 (mprts_hook): Replace parameters with a gimple_match_op *.
15876 (maybe_build_generic_op): Likewise.
15877 (gimple_simplified_result_is_gimple_val): Replace parameters with
15878 a const gimple_match_op *.
15879 (gimple_simplify): Replace code_helper * and tree * parameters with
15880 a gimple_match_op * parameter.
15881 (gimple_resimplify1): Replace code_helper *, tree and tree *
15882 parameters with a gimple_match_op * parameter.
15883 (gimple_resimplify2): Likewise.
15884 (gimple_resimplify3): Likewise.
15885 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
15886 parameters with a gimple_match_op * parameter.
15887 * gimple-match-head.c (gimple_simplify): Change prototypes of
15888 auto-generated functions to take a gimple_match_op * instead of
15889 separate code_helper * and tree * parameters. Make the same
15890 change in the top-level overload and update calls to the
15891 gimple_resimplify routines. Update calls to the auto-generated
15892 functions and to maybe_push_res_to_seq in the publicly-facing
15893 operation-specific gimple_simplify overloads.
15894 (gimple_match_op::MAX_NUM_OPS): Define.
15895 (gimple_resimplify1): Replace rcode and ops with a single res_op
15896 parameter. Update call to gimple_simplify.
15897 (gimple_resimplify2): Likewise.
15898 (gimple_resimplify3): Likewise.
15899 (mprts_hook): Replace parameters with a gimple_match_op *.
15900 (maybe_build_generic_op): Likewise.
15901 (build_call_internal): Replace type, nargs and ops with
15902 a gimple_match_op *.
15903 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15904 with a single gimple_match_op *. Update calls to mprts_hook,
15905 build_call_internal and gimple_simplified_result_is_gimple_val.
15906 Factor out code that is common to the tree_code and combined_fn cases.
15907 * genmatch.c (expr::gen_transform): Replace tem_code and
15908 tem_ops with a gimple_match_op called tem_op. Update calls
15909 to the gimple_resimplify functions and maybe_push_res_to_seq.
15910 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15911 res_ops. Update call to the gimple_resimplify functions.
15912 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15913 (decision_tree::gen): Make the functions take a gimple_match_op *
15914 called res_op instead of separate res_code and res_ops parameters.
15915 Update call accordingly.
15916 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15917 and ops with a single res_op parameter. Update calls to
15918 maybe_build_generic_op and maybe_push_res_to_seq.
15919 (fold_stmt_1): Update calls to gimple_simplify and
15920 replace_stmt_with_simplification.
15921 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15922 and gimple_simplified_result_is_gimple_val.
15923 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15924 gimple_simplify.
15925 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15926 with a gimple_match_op *.
15927 (vn_nary_build_or_lookup): Likewise. Update call to
15928 vn_nary_build_or_lookup_1.
15929 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15930 gimple_match_op *. Update calls to the gimple_resimplify routines
15931 and to gimple_simplified_result_is_gimple_val.
15932 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15933 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15934 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15935 (visit_nary_op): Likewise.
15936 (visit_reference_op_load): Likewise.
15937
15938 2018-05-23 Luis Machado <luis.machado@linaro.org>
15939
15940 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15941 modifier for printing the step amount.
15942
15943 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15944
15945 PR target/78849
15946 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15947 types.
15948
15949 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
15950
15951 * doc/sourcebuild.texi (Endianness): New subsubsection.
15952
15953 2018-05-23 Luis Machado <luis.machado@linaro.org>
15954
15955 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15956 <prefetch_dynamic_strides>: New const bool field.
15957 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15958 prefetch_dynamic_strides.
15959 (exynosm1_prefetch_tune): Likewise.
15960 (thunderxt88_prefetch_tune): Likewise.
15961 (thunderx_prefetch_tune): Likewise.
15962 (thunderx2t99_prefetch_tune): Likewise.
15963 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15964 false.
15965 (aarch64_override_options_internal): Update to set
15966 PARAM_PREFETCH_DYNAMIC_STRIDES.
15967 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15968 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15969 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15970 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15971 prefetch-dynamic-strides setting.
15972
15973 2018-05-23 Luis Machado <luis.machado@linaro.org>
15974
15975 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15976 <minimum_stride>: New const int field.
15977 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15978 minimum_stride field defaulting to -1.
15979 (exynosm1_prefetch_tune): Likewise.
15980 (thunderxt88_prefetch_tune): Likewise.
15981 (thunderx_prefetch_tune): Likewise.
15982 (thunderx2t99_prefetch_tune): Likewise.
15983 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15984 <default_opt_level>: Set to 3.
15985 (aarch64_override_options_internal): Update to set
15986 PARAM_PREFETCH_MINIMUM_STRIDE.
15987 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15988 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15989 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15990 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15991 stride is constant and is below the minimum stride threshold.
15992
15993 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15994
15995 * config/arm/arm-cpus.in (mode26): Delete.
15996 (armv4): Delete mode26 reference.
15997 * config/arm/arm.c (arm_configure_build_target): Delete use of
15998 isa_bit_mode26.
15999
16000 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16001
16002 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16003 New insn pattern.
16004 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16005 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16006 for non-SSE modes.
16007 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16008 (floatunsdidf2): Ditto.
16009
16010 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16011
16012 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16013 (fixuns_trunc<mode>si2_avx512f): Ditto.
16014 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16015 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16016 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16017
16018 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16019
16020 PR rtl-optimization/79985
16021 * df-scan.c (df_insn_refs_collect): Remove special case for
16022 global registers and asm statements.
16023
16024 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16025
16026 * extend.texi (Global Register Variables): Rewrite the bullet list.
16027 Note that the register is available for allocation. Note that access
16028 via inline asm must use constraints. Add note about async-signal
16029 handlers. Remove paragraph about automagic register selection.
16030
16031 2018-05-23 Richard Biener <rguenther@suse.de>
16032
16033 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16034 of fixed offset from memset VN.
16035
16036 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16037
16038 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16039 first_interp field.
16040 (alloc_cand_and_find_basis): Initialize first_interp field.
16041 (slsr_process_mul): Modify first_interp field.
16042 (slsr_process_add): Likewise.
16043 (slsr_process_cast): Modify first_interp field for each new
16044 interpretation.
16045 (slsr_process_copy): Likewise.
16046 (dump_candidate): Dump first_interp field.
16047 (replace_mult_candidate): Process all interpretations, not just
16048 subsequent ones.
16049 (replace_rhs_if_not_dup): Likewise.
16050 (replace_one_candidate): Likewise.
16051
16052 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16053
16054 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16055 Add new boolean.
16056 (aarch64_needs_frame_chain): New function.
16057 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16058
16059 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16060
16061 PR target/84882
16062 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16063 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16064 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16065 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16066 as true for strict-align.
16067 (aarch64_can_inline_p): Perform checks even when callee has no
16068 attributes to check for strict alignment.
16069 * doc/extend.texi (AArch64 Function Attributes): Document
16070 no-strict-align.
16071 * doc/invoke.texi: (AArch64 Options): Likewise.
16072
16073 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16074
16075 PR tree-optimization/85853
16076 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16077 the handling of the root of the node to...
16078 (vect_slp_analyze_node_operations_1): ...this new function,
16079 and run the whole thing with the child nodes' def types
16080 set according to their SLP node's def type.
16081
16082 2018-05-23 Richard Biener <rguenther@suse.de>
16083
16084 PR middle-end/85874
16085 * tree-data-ref.c (create_runtime_alias_checks): Defer
16086 and ignore overflow warnings.
16087
16088 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16089
16090 PR tree-optimization/85822
16091 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16092 constants.
16093
16094 2018-05-23 Richard Biener <rguenther@suse.de>
16095
16096 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16097 memset constants via native_interpret_expr.
16098
16099 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16100
16101 PR target/85345
16102 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16103 attribute.
16104 (cgraph_node::create_alias): Likewise.
16105 (cgraph_node::get_availability): Check ifunc_resolver instead
16106 of looking up ifunc attribute.
16107 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16108 * varasm.c (do_assemble_alias): Likewise.
16109 (assemble_alias): Likewise.
16110 (default_binds_local_p_3): Likewise.
16111 * cgraph.h (cgraph_node): Add ifunc_resolver.
16112 (cgraph_node::only_called_directly_or_aliased_p): Return false
16113 for IFUNC resolver.
16114 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16115 attribute.
16116 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16117 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16118 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16119 instead of looking up ifunc attribute.
16120
16121 2018-05-22 Luis Machado <luis.machado@linaro.org>
16122
16123 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16124
16125 2018-05-22 Martin Sebor <msebor@redhat.com>
16126
16127 PR middle-end/85359
16128 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16129 only when expasion succeeds.
16130 (expand_builtin_strcmp): Same.
16131 (expand_builtin_strncmp): Same.
16132
16133 2018-05-22 Martin Sebor <msebor@redhat.com>
16134
16135 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16136
16137 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16138 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16139
16140 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16141 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16142 code.
16143 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16144 Add check for legitimate_address.
16145 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16146 (aarch64_swap_ldrstr_operands): New.
16147 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16148 Define prototype.
16149
16150 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16151 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16152
16153 * config/aarch64/aarch64.md: New patterns to generate stp
16154 and ldp.
16155 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16156 single words and double words.
16157 (load_pair_sw, load_pair_dw): Likewise.
16158 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16159 Delete.
16160 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16161 Delete.
16162 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16163 for different mode ldpstp and add peephole for merged zero stores.
16164 Likewise for loads.
16165 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16166 Add size check.
16167 (aarch64_gen_store_pair): Rename calls to match new patterns.
16168 (aarch64_gen_load_pair): Rename calls to match new patterns.
16169 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16170 (load_pair<DREG:mode><DREG2:mode>): ... This.
16171 (store_pair<mode>): Rename to...
16172 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16173 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16174 New mode iterators.
16175 (V_INT_EQUIV): Handle SImode.
16176 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16177 New predicate.
16178
16179 2018-05-22 Martin Sebor <msebor@redhat.com>
16180
16181 PR c/85623
16182 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16183 or ajust the presumed bound on an operation to avoid unnecessary
16184 warnings.
16185
16186 2018-05-22 Martin Sebor <msebor@redhat.com>
16187
16188 PR tree-optimization/85826
16189 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16190 assuming that a DECL necesarily has a constant size.
16191
16192 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16193
16194 PR middle-end/85862
16195 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16196
16197 2018-05-22 Richard Biener <rguenther@suse.de>
16198
16199 PR tree-optimization/85834
16200 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16201 non-constant and non-zero memset arguments.
16202
16203 2018-05-22 Martin Liska <mliska@suse.cz>
16204
16205 PR ipa/85607
16206 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16207
16208 2018-05-22 Richard Biener <rguenther@suse.de>
16209
16210 PR tree-optimization/85863
16211 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16212 comparisons when vectype is specified.
16213 (vectorizable_condition): Do not specify vectype for
16214 vect_is_simple_cond when SLP vectorizing.
16215
16216 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16217
16218 PR target/85657
16219 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16220 define __ibm128 as long double.
16221 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16222 as a distinct type when IEEE 128-bit support is enabled.
16223 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16224 128-bit types to use the correct functions.
16225 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16226 convert between 128-bit floating point types that have different
16227 modes but the same representation, instead of using gen_lowpart to
16228 makean alias.
16229 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16230 KFmode.
16231 (IFKF_reg): New attributes to give the register constraints for
16232 IFmode and KFmode.
16233 (extend<mode>tf2_internal): New insns to mark an explicit
16234 conversion between 128-bit floating point types that have a
16235 different mode but share the same representation.
16236
16237 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16238
16239 PR tree-optimization/85814
16240 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16241 a null return from get_strinfo when unsharing the next
16242 strinfo in the chain.
16243
16244 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16245
16246 PR gcc/84923
16247 * varasm.c (weak_finish): Clean up weak_decls.
16248
16249 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16250
16251 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16252 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16253 UNSPEC_UADALP values.
16254 * config/aarch64/iterators.md (ABAL): New int iterator.
16255 (ABDL2): Likewise.
16256 (ADALP): Likewise.
16257 (sur): Add mappings for the above.
16258 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16259 New define_insn.
16260 (aarch64_<sur>abal<mode>_4): Likewise.
16261 (aarch64_<sur>adalp<mode>_3): Likewise.
16262 (<sur>sadv16qi): New define_expand.
16263
16264 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16265
16266 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16267 (*movdf_internal): Ditto.
16268 (*rcpsf2_sse): Ditto.
16269 (*rsqrtsf2_sse): Ditto.
16270 (*sqrt<mode>2_sse): Ditto.
16271
16272 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16273
16274 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16275 eor3q<mode>4.
16276 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16277 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16278 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16279 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16280 vbcaxq_s64): New.
16281 * config/aarch64/arm_neon.h: Likewise.
16282 * config/aarch64/iterators.md (VQ_I): New.
16283
16284 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16285
16286 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16287 arc*-*-linux*.
16288 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16289 MULTILIB_DIRNAMES
16290
16291 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16292
16293 * config/nds32/constraints.md (S): New constraint.
16294 * config/nds32/nds32.md (call_internal): Use constraint S.
16295 (call_value_internal): Likewise.
16296 (sibcall_internal): Likewise.
16297 (sibcall_value_internal): Likewise.
16298
16299 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16300 Chung-Ju Wu <jasonwucj@gmail.com>
16301
16302 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16303 into consideration.
16304
16305 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16306 Chung-Ju Wu <jasonwucj@gmail.com>
16307
16308 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16309 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16310 (nds32_rtx_costs_impl): Simplify.
16311 (nds32_address_cost_impl): Simplify.
16312 (nds32_init_rtx_costs): New function.
16313 (nds32_rtx_costs_speed_prefer): Likewise.
16314 (nds32_rtx_costs_size_prefer): Likewise.
16315 (nds32_address_cost_speed_prefer): Likewise.
16316 (nds32_address_cost_speed_fwprop): Likewise.
16317 (nds32_address_cost_size_prefer): Likewise.
16318 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16319 * config/nds32/nds32.c (nds32_option_override): Use
16320 nds32_init_rtx_costs function.
16321
16322 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16323
16324 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16325 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16326 (TARGET_PIPELINE_N8): Likewise.
16327 (TARGET_PIPELINE_N10): Likewise.
16328 (TARGET_PIPELINE_N13): Likewise.
16329 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16330
16331 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16332
16333 * config/nds32/nds32-fpu.md: Update copyright year.
16334
16335 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16336
16337 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16338
16339 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16340
16341 * config/nds32/nds32.c
16342 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16343 * config/nds32/nds32.opt (minline-asm-r15): New option.
16344
16345 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16346
16347 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16348 MASK_HW_ABS.
16349 * config/nds32/nds32.md (abssi2): New pattern.
16350
16351 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16352
16353 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16354 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16355 Merge insn pattern from sse_cvtsi2ss<round_name> and
16356 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16357 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16358 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16359 using SWI48 mode iterator.
16360 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16361 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16362 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16363 pattern from sse_cvttss2si<round_saeonly_name>
16364 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16365 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16366 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16367 using SWI48 mode iterator.
16368 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16369 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16370 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16371 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16372 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16373 using SWI48 mode iterator.
16374 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16375 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16376 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16377 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16378 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16379 SWI48 mode iterator.
16380 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16381 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16382 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16383 pattern from sse_cvttsd2si<round_saeonly_name>
16384 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16385
16386 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16387
16388 * config/nds32/nds32-md-auxiliary.c
16389 (nds32_valid_smw_lwm_base_p): Refine.
16390 (nds32_output_smw_single_word): Refine.
16391 (nds32_output_smw_double_word): New.
16392 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16393
16394 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16395
16396 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16397 (nds32_output_stack_pop): Refine.
16398 (nds32_expand_unaligned_load): Refine.
16399 (nds32_expand_unaligned_store): Refine.
16400
16401 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16402 Chung-Ju Wu <jasonwucj@gmail.com>
16403
16404 * config/nds32/constants.md: Add TP_REGNUM constant.
16405 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16406 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16407 UNSPEC_ADD32.
16408 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16409 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16410 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16411 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16412 and PIC code generation.
16413 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16414 code generation.
16415 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16416 optimization.
16417 * config/nds32/nds32.md: Support TLS and PIC.
16418 * config/nds32/nds32.c: Support TLS and PIC.
16419 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16420 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16421 predicate.
16422
16423 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16424
16425 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16426 mode with E_ prefix.
16427
16428 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16429 Chung-Ju Wu <jasonwucj@gmail.com>
16430
16431 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16432 * config/nds32/nds32-md-auxiliary.c
16433 (symbolic_reference_mentioned_p): New.
16434 (nds32_legitimize_ict_address): New.
16435 (nds32_expand_ict_move): New.
16436 (nds32_indirect_call_referenced_p): New.
16437 (nds32_symbol_binds_local_p): Delete.
16438 (nds32_long_call_p): Modify.
16439 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16440 * config/nds32/nds32-protos.h
16441 (symbolic_reference_mentioned_p): Declare.
16442 (nds32_legitimize_ict_address): Declare.
16443 (nds32_expand_ict_move): Declare.
16444 (nds32_indirect_call_referenced_p): Declare.
16445 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16446 (nds32_relax_group): Use nds32_ict_const_p as condition.
16447 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16448 (nds32_asm_file_start): Output ict_model directive in asm code.
16449 (nds32_legitimate_address_p): Consider indirect call.
16450 (nds32_print_operand): Consider indirect call.
16451 (nds32_print_operand_address): Consider indirect call.
16452 (nds32_insert_attributes): Handle "indirect_call" attribute.
16453 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16454 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16455 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16456 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16457 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16458 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16459 (TARGET_ICT_MODEL_SMALL): Define.
16460 (TARGET_ICT_MODEL_LARGE): Define.
16461 * config/nds32/nds32.md (movsi): Consider ict model.
16462 (call, call_value): Consider ict model.
16463 (sibcall, sibcall_value): Consider ict model.
16464 * config/nds32/nds32.opt (mict-model): New option.
16465 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16466 model.
16467
16468 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16469 Monk Chiang <sh.chiang04@gmail.com>
16470 Jim Wilson <jimw@sifive.com>
16471
16472 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16473 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16474 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16475 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16476 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16477 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16478 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16479 compute save_libcall_adjustment properly.
16480 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16481 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16482 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16483 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16484 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16485 (ABI_SPEC): Handle mabi=ilp32e.
16486 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16487 (RVE): Add RVE mask.
16488 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16489 <-march>: Add rv32e as an example.
16490
16491 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16492
16493 PR c++/82899
16494 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16495 (intra_create_variable_infos): Handle C++ constructors.
16496
16497 2018-05-18 Martin Liska <mliska@suse.cz>
16498
16499 * passes.def: Remove a redundant pass.
16500
16501 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16502
16503 PR bootstrap/85838
16504 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16505
16506 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16507
16508 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16509 (ARMv4): Update.
16510 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16511 (ARMv6m): Update.
16512 (armv2, armv2a, armv3, armv3m): Delete architectures.
16513 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16514 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16515 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16516 Delete cpus.
16517 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16518 (*mulsidi3adddi): Likewise.
16519 (mulsidi3): Likewise.
16520 (*mulsidi3_nov6): Likewise.
16521 (umulsidi3): Likewise.
16522 (umulsidi3_nov6): Likewise.
16523 (umaddsidi4): Likewise.
16524 (*umulsidi3adddi): Likewise.
16525 (smulsi3_highpart): Likewise.
16526 (*smulsi3_highpart_nov6): Likewise.
16527 (umulsi3_highpart): Likewise.
16528 (*umulsi3_highpart_nov6): Likewise.
16529 * config/arm/arm.h (arm_arch3m): Delete.
16530 * config/arm/arm.c (arm_arch3m): Delete.
16531 (arm_option_override_internal): Update armv3-related comment.
16532 (arm_configure_build_target): Delete use of isa_bit_mode32.
16533 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16534 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16535 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16536 (mulsa3): Likewise.
16537 (mulusa3): Likewise.
16538 * config/arm/arm-protos.h (arm_arch3m): Delete.
16539 * config/arm/arm-tables.opt: Regenerate.
16540 * config/arm/arm-tune.md: Likewise.
16541 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16542 deleted architectures.
16543
16544 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16545
16546 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16547 (armv5t, armv5te): New features.
16548 (ARMv5, ARMv5e): Delete fgroups.
16549 (ARMv5t, ARMv5te): Adjust for above changes.
16550 (ARMv6m): Likewise.
16551 (armv5, armv5e): Delete arches.
16552 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16553 arm_arch5.
16554 (*call_reg_arm): Likewise.
16555 (*call_value_reg_armv5): Likewise.
16556 (*call_value_reg_arm): Likewise.
16557 (*call_symbol): Likewise.
16558 (*call_value_symbol): Likewise.
16559 (*sibcall_insn): Likewise.
16560 (*sibcall_value_insn): Likewise.
16561 (clzsi2): Likewise.
16562 (prefetch): Likewise.
16563 (define_split and define_peephole2 dependent on arm_arch5):
16564 Likewise.
16565 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16566 arm_arch5e.
16567 (TARGET_ARM_QBIT): Likewise.
16568 (TARGET_DSP_MULTIPLY): Likewise.
16569 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16570 (arm_arch5, arm_arch5e): Delete.
16571 (arm_arch5t, arm_arch5te): Declare.
16572 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16573 (arm_arch5t): Declare.
16574 (arm_option_reconfigure_globals): Update for the above.
16575 (arm_options_perform_arch_sanity_checks): Update comment, replace
16576 use of arm_arch5 with arm_arch5t.
16577 (use_return_insn): Likewise.
16578 (arm_emit_call_insn): Likewise.
16579 (output_return_instruction): Likewise.
16580 (arm_final_prescan_insn): Likewise.
16581 (arm_coproc_builtin_available): Likewise.
16582 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16583 arm_arch5e with arm_arch5t and arm_arch5te.
16584 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16585 (arm_arch5t, arm_arch5te): Declare.
16586 * config/arm/arm-tables.opt: Regenerate.
16587 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16588 * config/arm/t-multilib: Likewise.
16589 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16590 instead of arm_arch5.
16591 (*call_reg_thumb1): Likewise.
16592 (*call_value_reg_thumb1_v5): Likewise.
16593 (*call_value_reg_thumb1): Likewise.
16594 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16595 unreachable path.
16596 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16597
16598 2018-05-18 Martin Liska <mliska@suse.cz>
16599
16600 PR gcov-profile/84846
16601 * doc/gcov.texi: Document -t option of gcov tool.
16602
16603 2018-05-18 Martin Liska <mliska@suse.cz>
16604
16605 PR gcov-profile/84846
16606 * gcov.c (print_usage): Add new -t option.
16607 (process_args): Handle the option.
16608 (generate_results): Use stdout as output when requested by
16609 the option.
16610
16611 2018-05-18 Martin Liska <mliska@suse.cz>
16612
16613 PR gcov-profile/84846
16614 * coverage.c (coverage_init): Write PWD to .gcno file.
16615 * doc/gcov.texi: Document how working directory is printed.
16616 * gcov-dump.c (dump_gcov_file): Print PWD.
16617 * gcov.c (output_intermediate_file): Likewise.
16618 (read_graph_file): Read PWD string.
16619 (output_lines): Print PWD.
16620
16621 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16622
16623 PR middle-end/85817
16624 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16625 for retval and return false if all args to phi are zero.
16626
16627 2018-05-18 Richard Biener <rguenther@suse.de>
16628
16629 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16630 method.
16631 (evrp_dom_walker::before_dom_children): Call it.
16632
16633 2018-05-18 Richard Biener <rguenther@suse.de>
16634
16635 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16636 results when processing array refs with variable index.
16637
16638 2018-05-18 Toon Moene <toon@moene.org>
16639
16640 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16641 directly after that of -floop-interchange. Indicate that both
16642 options are enabled by default when specifying -O3.
16643
16644 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16645
16646 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16647 iterator. Delete separate integer-mode vec_set<mode> expander.
16648 (aarch64_simd_vec_setv2di): Delete.
16649 (vec_setv2di): Delete.
16650 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16651 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16652 the "w, r" alternative.
16653
16654 2018-05-18 Martin Liska <mliska@suse.cz>
16655
16656 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16657 * tree-pass.h (make_pass_lower_switch_O0): New function.
16658 * tree-switch-conversion.c (node_has_low_bound): Remove.
16659 (node_has_high_bound): Likewise.
16660 (node_is_bounded): Likewise.
16661 (class pass_lower_switch): Make it a template type and create
16662 two instances.
16663 (pass_lower_switch::execute): Add template argument.
16664 (make_pass_lower_switch): New function.
16665 (make_pass_lower_switch_O0): New function.
16666 (do_jump_if_equal): Remove.
16667 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16668 all the hard work to tree optimization passes.
16669
16670 2018-05-18 Martin Liska <mliska@suse.cz>
16671
16672 * dbgcnt.c (limit_low): Renamed from limit.
16673 (limit_high): New variable.
16674 (dbg_cnt_is_enabled): Check for upper limit.
16675 (dbg_cnt): Adjust dumping.
16676 (dbg_cnt_set_limit_by_index): Add new argument for high
16677 value.
16678 (dbg_cnt_set_limit_by_name): Likewise.
16679 (dbg_cnt_process_single_pair): Parse new format.
16680 (dbg_cnt_process_opt): Use strtok.
16681 (dbg_cnt_list_all_counters): Remove 'value' and add
16682 'limit_high'.
16683 * doc/invoke.texi: Document changes.
16684
16685 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16686
16687 * doc/sourcebuild.texi (scalar_all_fma): Document.
16688 * tree.def (FMA_EXPR): Delete.
16689 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16690 * internal-fn.c (ternary_direct): New macro.
16691 (expand_ternary_optab_fn): Likewise.
16692 (direct_ternary_optab_supported_p): Likewise.
16693 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16694 * builtins.c (fold_builtin_fma): Delete.
16695 (fold_builtin_3): Don't call it.
16696 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16697 * expr.c (expand_expr_real_2): Likewise.
16698 * fold-const.c (operand_equal_p): Likewise.
16699 (fold_ternary_loc): Likewise.
16700 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16701 * gimple.c (DEFTREECODE): Likewise.
16702 * gimplify.c (gimplify_expr): Likewise.
16703 * optabs-tree.c (optab_for_tree_code): Likewise.
16704 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16705 * tree-eh.c (operation_could_trap_p): Likewise.
16706 (stmt_could_throw_1_p): Likewise.
16707 * tree-inline.c (estimate_operator_cost): Likewise.
16708 * tree-pretty-print.c (dump_generic_node): Likewise.
16709 (op_code_prio): Likewise.
16710 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16711 * tree-ssa-operands.c (get_expr_operands): Likewise.
16712 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16713 * fold-const-call.h (fold_fma): Delete.
16714 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16715 CFN_FNMA and CFN_FNMS.
16716 (fold_fma): Delete.
16717 * genmatch.c (combined_fn): New enum.
16718 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16719 (commutative_op): New function.
16720 (commutate): Use it. Handle more than 2 operands.
16721 (dt_operand::gen_gimple_expr): Use commutative_op.
16722 (parser::parse_expr): Allow :c to be used with non-binary
16723 operators if the commutative operand is known.
16724 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16725 CFN_FMS, CFN_FNMA and CFN_FNMS.
16726 (backprop::process_assign_use): Remove FMA_EXPR handling.
16727 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16728 (gen_hsa_fma): New function.
16729 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16730 IFN_FNMA and IFN_FNMS.
16731 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16732 * gimple-fold.h (follow_all_ssa_edges): Declare.
16733 * gimple-fold.c (follow_all_ssa_edges): New function.
16734 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16735 gimple_build interface and use follow_all_ssa_edges to fold the result.
16736 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16737 instead of checking for optabs directly.
16738 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16739 rather than FMA_EXPRs.
16740 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16741 call to IFN_FMA instead of an FMA_EXPR.
16742
16743 2018-05-17 Jim Wilson <jimw@sifive.com>
16744
16745 * expr.c (do_tablejump): When converting index to Pmode, if we have a
16746 sign extended promoted subreg, and the range does not have the sign bit
16747 set, then do a sign extend.
16748
16749 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16750 test, check for sign extended subreg and/or constant operands, and
16751 do a sign extend in that case.
16752
16753 2018-05-17 Steve Ellcey <sellcey@cavium.com>
16754
16755 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16756 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16757 Add untyped.
16758 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16759 Change logics_shift_reg to logics_shift_imm.
16760 (thunderx2t99_fp_loadpair_basic): Delete.
16761 (thunderx2t99_fp_storepair_basic): Delete.
16762 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16763 (thunderx2t99_asimd_polynomial): Delete.
16764 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16765 and neon_fp_mul_d_scalar_q.
16766 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16767 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16768 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16769 (thunderx2t99_asimd_lut): Add missing tbl types.
16770 (thunderx2t99_asimd_ext): Delete.
16771 (thunderx2t99_asimd_load1_1_mult): Delete.
16772 (thunderx2t99_asimd_load1_2_mult): Delete.
16773 (thunderx2t99_asimd_load1_ldp): New.
16774 (thunderx2t99_asimd_load1): New.
16775 (thunderx2t99_asimd_load2): Add missing *load2* types.
16776 (thunderx2t99_asimd_load3): New.
16777 (thunderx2t99_asimd_load4): New.
16778 (thunderx2t99_asimd_store1_1_mult): Delete.
16779 (thunderx2t99_asimd_store1_2_mult): Delete.
16780 (thunderx2t99_asimd_store2_mult): Delete.
16781 (thunderx2t99_asimd_store2_onelane): Delete.
16782 (thunderx2t99_asimd_store_stp): New.
16783 (thunderx2t99_asimd_store1): New.
16784 (thunderx2t99_asimd_store2): New.
16785 (thunderx2t99_asimd_store3): New.
16786 (thunderx2t99_asimd_store4): New.
16787
16788 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
16789
16790 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
16791 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
16792
16793 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
16794 Segher Boessenkool <segher@kernel.crashing.org>
16795
16796 PR target/85698
16797 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
16798 operand.
16799
16800 2018-05-17 Richard Biener <rguenther@suse.de>
16801
16802 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
16803 for pruning loop and prune defs feeding only already visited PHIs.
16804
16805 2018-05-17 Richard Biener <rguenther@suse.de>
16806
16807 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
16808
16809 2018-05-17 Bin Cheng <bin.cheng@arm.com>
16810 Richard Biener <rguenther@suse.de>
16811
16812 PR tree-optimization/85793
16813 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
16814 for VMAT_ELEMENTWISE.
16815
16816 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16817
16818 * internal-fn.h (lookup_internal_fn): Declare
16819 * internal-fn.c (lookup_internal_fn): New function.
16820 * gimple.c (gimple_build_call_from_tree): Handle calls to
16821 internal functions.
16822 * gimple-pretty-print.c (dump_gimple_call): Print "." before
16823 internal function names.
16824 * tree-pretty-print.c (dump_generic_node): Likewise.
16825 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
16826
16827 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
16828
16829 * gimple-fold.h (gimple_build): Make the function forms take
16830 combined_fn rather than built_in_function.
16831 (gimple_simplify): Likewise.
16832 * gimple-match-head.c (gimple_simplify): Likewise.
16833 * gimple-fold.c (gimple_build): Likewise.
16834 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
16835 rather than gimple_build_call_internal.
16836 (get_initial_defs_for_reduction): Likewise.
16837 (vect_create_epilog_for_reduction): Likewise.
16838 (vectorizable_live_operation): Likewise.
16839
16840 2018-05-17 Martin Liska <mliska@suse.cz>
16841
16842 * gimple-ssa-sprintf.c (format_directive): Do not use
16843 space in between 'G_' and '('.
16844
16845 2018-05-17 Jakub Jelinek <jakub@redhat.com>
16846
16847 PR target/85323
16848 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
16849 even if the mask is not all ones.
16850
16851 PR target/85323
16852 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
16853 vector.
16854 (ix86_gimple_fold_builtin): Likewise.
16855
16856 PR target/85323
16857 * config/i386/i386.c: Include tree-vector-builder.h.
16858 (ix86_vector_shift_count): New function.
16859 (ix86_fold_builtin): Fold shift builtins by scalar count.
16860 (ix86_gimple_fold_builtin): Likewise.
16861
16862 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
16863 _mm512_setzero): New intrinsics.
16864
16865 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
16866 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16867
16868 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
16869 code generation for cases where splatting a value is not useful.
16870 * simplify-rtx.c (simplify_ternary_operation): Simplify
16871 vec_merge across a vec_duplicate and a paradoxical subreg forming
16872 a vector mode to a vec_concat.
16873
16874 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
16875
16876 * config.gcc: Support "goldmont-plus".
16877 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16878 "goldmont-plus".
16879 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16880 PROCESSOR_GOLDMONT_PLUS.
16881 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
16882 (processor_target_table): Add "goldmont-plus".
16883 (PTA_GOLDMONT_PLUS): Define.
16884 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
16885 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
16886 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
16887 (fold_builtin_cpu): Add "goldmont-plus".
16888 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
16889 (ix86_option_override_internal): Add "goldmont-plus".
16890 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
16891 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
16892 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
16893 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
16894
16895 2018-05-17 Richard Biener <rguenther@suse.de>
16896
16897 PR tree-optimization/85757
16898 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16899 remove defs that only feed that PHI from further processing.
16900
16901 2018-05-16 Jim Wilson <jimw@sifive.com>
16902
16903 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16904 asterisk to name.
16905 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16906
16907 2018-05-16 Mark Wielaard <mark@klomp.org>
16908
16909 * dwarf2out.c (count_index_strings): New function.
16910 (output_indirect_strings): Call count_index_strings and generate
16911 header for dwarf_version >= 5.
16912
16913 2018-05-16 Mark Wielaard <mark@klomp.org>
16914
16915 * dwarf2out.c (dwarf_FORM): New function.
16916 (set_indirect_string): Use dwarf_FORM.
16917 (reset_indirect_string): Likewise.
16918 (size_of_die): Likewise.
16919 (value_format): Likewise.
16920 (output_die): Likewise.
16921 (add_skeleton_AT_string): Likewise.
16922 (output_macinfo_op): Likewise.
16923 (index_string): Likewise.
16924 (output_index_string_offset): Likewise.
16925 (output_index_string): Likewise.
16926 (count_index_strings): Likewise.
16927
16928 2018-05-16 Carl Love <cel@us.ibm.com>
16929
16930 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16931 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16932
16933 2018-05-16 Martin Jambor <mjambor@suse.cz>
16934
16935 * ipa-prop.c (ipa_free_all_edge_args): Remove.
16936 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16937
16938 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
16939
16940 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16941 (fnma<mode>4): Likewise.
16942 (fms<mode>4): Likewise.
16943 (fnms<mode>4): Likewise.
16944 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16945 (aarch64_fnma<mode>4): Likewise.
16946 (aarch64_fms<mode>4): Likewise.
16947 (aarch64_fnms<mode>4): Likewise.
16948 (aarch64_fnmadd<mode>4): Likewise.
16949
16950 2018-05-16 Jason Merrill <jason@redhat.com>
16951
16952 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
16953
16954 2018-05-16 Richard Biener <rguenther@suse.de>
16955
16956 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16957 (dump_stmt_cost): Declare.
16958 (add_stmt_cost): Dump cost we add.
16959 (add_stmt_costs): New function.
16960 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16961 No longer exported.
16962 (vect_analyze_stmt): Adjust prototype.
16963 (vectorizable_condition): Likewise.
16964 (vectorizable_live_operation): Likewise.
16965 (vectorizable_reduction): Likewise.
16966 (vectorizable_induction): Likewise.
16967 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16968 cost vector to pass to vectorizable_ and record afterwards.
16969 (vect_model_reduction_cost): Take cost vector argument and adjust.
16970 (vect_model_induction_cost): Likewise.
16971 (vectorizable_reduction): Likewise.
16972 (vectorizable_induction): Likewise.
16973 (vectorizable_live_operation): Likewise.
16974 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16975 SLP_TREE_NUMBER_OF_VEC_STMTS.
16976 (vect_analyze_slp_cost_1): Remove.
16977 (vect_analyze_slp_cost): Likewise.
16978 (vect_slp_analyze_node_operations): Take visited args and
16979 a target cost vector. Avoid processing already visited stmt sets.
16980 (vect_slp_analyze_operations): Use a local cost vector to gather
16981 costs and register those of non-discarded instances.
16982 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16983 (vect_schedule_slp_instance): Remove copying of
16984 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
16985 zero.
16986 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16987 adding cost. Record cost entry location.
16988 (vect_prologue_cost_for_slp_op): Function to compute cost of
16989 a constant or invariant generated for SLP vect in the prologue,
16990 split out from vect_analyze_slp_cost_1.
16991 (vect_model_simple_cost): Make static. Adjust for SLP costing.
16992 (vect_model_promotion_demotion_cost): Likewise.
16993 (vect_model_store_cost): Likewise, make static.
16994 (vect_model_load_cost): Likewise.
16995 (vectorizable_bswap): Add cost vector arg and adjust.
16996 (vectorizable_call): Likewise.
16997 (vectorizable_simd_clone_call): Likewise.
16998 (vectorizable_conversion): Likewise.
16999 (vectorizable_assignment): Likewise.
17000 (vectorizable_shift): Likewise.
17001 (vectorizable_operation): Likewise.
17002 (vectorizable_store): Likewise.
17003 (vectorizable_load): Likewise.
17004 (vectorizable_condition): Likewise.
17005 (vectorizable_comparison): Likewise.
17006 (can_vectorize_live_stmts): Likewise.
17007 (vect_analyze_stmt): Likewise.
17008 (vect_transform_stmt): Adjust calls to vectorizable_*.
17009 * tree-vectorizer.c: Include gimple-pretty-print.h.
17010 (dump_stmt_cost): New function.
17011
17012 2018-05-16 Richard Biener <rguenther@suse.de>
17013
17014 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17015 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17016 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17017 (check_name): New callback.
17018 (dse_classify_store): Track cycles via a visited bitmap of PHI
17019 defs and simplify handling of in-loop and across loop dead stores
17020 and properly fail for loop-variant refs. Handle byte-tracking with
17021 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17022 limiting the walk.
17023
17024 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17025
17026 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17027 (vect_get_mask_type_for_stmt): Likewise.
17028 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17029 split out from...
17030 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17031 to determine the statement's vector type and the vector type that
17032 should be used for calculating nunits. Deal with cases in which
17033 the type has to be deferred.
17034 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17035 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17036 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17037 (vect_determine_vf_for_stmt): New functions, split out from...
17038 (vect_determine_vectorization_factor): ...here.
17039 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17040 (vect_get_mask_type_for_stmt): New functions, split out from
17041 vect_determine_vectorization_factor.
17042
17043 2018-05-16 Richard Biener <rguenther@suse.de>
17044
17045 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17046 verify the [VEC_]COND_EXPR embedded comparison.
17047
17048 2018-05-15 Martin Sebor <msebor@redhat.com>
17049
17050 PR tree-optimization/85753
17051 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17052 RECORD_TYPE in addition to ARRAY_TYPE.
17053
17054 2018-05-15 Martin Sebor <msebor@redhat.com>
17055
17056 PR middle-end/85643
17057 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17058
17059 2018-05-15 Richard Biener <rguenther@suse.de>
17060
17061 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17062 add by_clobber_p one. Change algorithm to collect all defs
17063 representing uses we need to walk and try reducing them to
17064 a single one before failing.
17065 (dse_dom_walker::dse_optimize_stmt): Adjust.
17066
17067 2018-05-13 Mark Wielaard <mark@klomp.org>
17068
17069 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17070 (size_of_loc_descr): Likewise.
17071 (output_loc_operands): Likewise.
17072 (output_loc_operands_raw): Likewise.
17073 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17074 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17075 (hash_loc_operands): Likewise.
17076 (compare_loc_operands): Likewise.
17077
17078 2018-05-14 Mark Wielaard <mark@klomp.org>
17079
17080 * dwarf2out.c (count_index_addrs): New function.
17081 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17082
17083 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17084
17085 PR tree-optimization/83648
17086 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17087 return value as malloc candidate.
17088
17089 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17090
17091 PR ipa/85734
17092 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17093 param as true in call to suggest_attribute.
17094
17095 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17096
17097 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17098 -mreadonly-in-sdata.
17099
17100 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17101
17102 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17103 New pattern.
17104 (aarch64_crypto_aesd_fused): Likewise.
17105
17106 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17107
17108 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17109 (movsi_aarch64): Likewise.
17110 (load_pairsi): Likewise.
17111 (load_pairdi): Likewise.
17112 (store_pairsi): Likewise.
17113 (store_pairdi): Likewise.
17114 (load_pairsf): Likewise.
17115 (load_pairdf): Likewise.
17116 (store_pairsf): Likewise.
17117 (store_pairdf): Likewise.
17118 (zero_extend): Likewise.
17119 (trunc): Swap alternatives.
17120 (fcvt_target): Add '?' to prefer w over r.
17121
17122 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17123
17124 PR target/85756
17125 * config/i386/i386.md: Disallow non-commutative arithmetics in
17126 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17127 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17128 in the peephole2 before it.
17129
17130 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17131
17132 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17133 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17134 (ix86_handle_option): Handle -mcldemote.
17135 * config.gcc: New header.
17136 * config/i386/cldemoteintrin.h: New file.
17137 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17138 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17139 -mcldemote.
17140 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17141 OPTION_MASK_ISA_CLDEMOTE.
17142 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17143 (ix86_valid_target_attribute_inner_p): Ditto.
17144 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17145 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17146 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17147 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17148 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17149 (cldemote): New.
17150 * config/i386/i386.opt: Add -mcldemote.
17151 * config/i386/x86intrin.h: New header.
17152 * doc/invoke.texi: Add -mcldemote.
17153
17154 2018-05-14 Richard Biener <rguenther@suse.de>
17155
17156 * doc/match-and-simplify.texi: Adjust :s documentation.
17157
17158 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17159
17160 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17161 intended memcpy size.
17162 (REORDER_45): Likewise.
17163
17164 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17165
17166 * sort.cc: New file.
17167 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17168 * vec.c (qsort_chk): Use gcc_qsort.
17169 * Makefile.in (OBJS-libcommon): Add sort.o.
17170 (build/sort.o): New target. Use it...
17171 (BUILD_RTL): ... here, and...
17172 (build/gencfn-macros): ... here, and...
17173 (build/genmatch): ... here.
17174
17175 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17176 Chung-Ju Wu <jasonwucj@gmail.com>
17177
17178 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17179 * config/nds32/nds32-graywolf.md: New file.
17180 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17181 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17182 pipeline.
17183 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17184 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17185 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17186 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17187 * config/nds32/pipelines.md: Include n15 settings.
17188
17189 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17190 Chung-Ju Wu <jasonwucj@gmail.com>
17191
17192 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17193 * config/nds32/nds32-n13.md: New file.
17194 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17195 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17196 pipeline.
17197 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17198 * config/nds32/nds32.md (pipeline_model): Add n13.
17199 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17200 * config/nds32/pipelines.md: Include n13 settings.
17201
17202 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17203 Chung-Ju Wu <jasonwucj@gmail.com>
17204
17205 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17206 * config/nds32/nds32-n10.md: New file.
17207 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17208 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17209 pipeline.
17210 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17211 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17212 * config/nds32/nds32.md (pipeline_model): Add n10.
17213 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17214 * config/nds32/pipelines.md: Include n10 settings.
17215
17216 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17217 Kito Cheng <kito.cheng@gmail.com>
17218 Chung-Ju Wu <jasonwucj@gmail.com>
17219
17220 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17221 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17222 Add enum values for DSP extension instructions.
17223 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17224 New constraints.
17225 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17226 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17227 New code iterators.
17228 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17229 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17230 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17231 * config/nds32/nds32-intrinsic.md: Likewise.
17232 * config/nds32/nds32_intrinsic.h: Likewise.
17233 * config/nds32/nds32-md-auxiliary.c: Likewise.
17234 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17235 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17236 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17237 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17238 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17239 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17240 TYPE_DMAC in switch statement.
17241 * config/nds32/nds32.c: New checking and implementation for DSP
17242 extension instructions.
17243 * config/nds32/nds32.h: Likewise.
17244 * config/nds32/nds32.md: Likewise.
17245 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17246 * config/nds32/predicates.md: Implement new predicates for DSP
17247 extension.
17248
17249 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17250
17251 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17252 Reformat alternatives and attributes so it is easier to identify
17253 which constraints/attributes go with which instruction.
17254 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17255 (mov<mode>_softfloat32, FMOVE64): Likewise.
17256 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17257 (mov<mode>_softfloat64, FMOVE64): Likewise.
17258
17259 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17260
17261 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17262 subsection.
17263 (Basic PowerPC Built-in Functions): The new name of the
17264 subsection previously known as "PowerPC Built-in Functions".
17265 (Basic PowerPC Built-in Functions Available on all Configurations):
17266 New subsubsection.
17267 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17268 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17269 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17270 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17271
17272 2018-05-11 Martin Jambor <mjambor@suse.cz>
17273
17274 PR ipa/85655
17275 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17276 single const.
17277
17278 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17279
17280 PR target/85733
17281 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17282
17283 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17284
17285 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17286 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17287 (ix86_handle_option): Handle -mwaitpkg.
17288 * config.gcc: New header.
17289 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17290 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17291 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17292 function type.
17293 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17294 OPTION_MASK_ISA_WAITPKG.
17295 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17296 (ix86_option_override_internal): Add PTA_WAITPKG.
17297 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17298 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17299 IX86_BUILTIN_TPAUSE.
17300 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17301 __builtin_ia32_umwait and __builtin_ia32_tpause.
17302 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17303 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17304 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17305 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17306 UNSPECV_TPAUSE): New.
17307 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17308 * config/i386/i386.opt: Add -mwaitpkg.
17309 * config/i386/waitpkgintrin.h: New file.
17310 * config/i386/x86intrin.h: New header.
17311 * doc/invoke.texi: Add -mwaitpkg.
17312
17313 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17314
17315 PR target/85606
17316 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17317 equivalent.
17318 (cortex-m0): Use armv6s-m isa.
17319 (cortex-m0plus): Likewise.
17320 (cortex-m1): Likewise.
17321 (cortex-m0.small-multiply): Likewise.
17322 (cortex-m0plus.small-multiply): Likewise.
17323 (cortex-m1.small-multiply): Likewise.
17324
17325 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17326 Jakub Jelinek <jakub@redhat.com>
17327
17328 PR tree-optimization/85692
17329 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17330 source permute as well.
17331
17332 2018-05-11 Martin Liska <mliska@suse.cz>
17333
17334 PR sanitizer/85556
17335 * doc/extend.texi: Document LLVM style format for no_sanitize
17336 attribute.
17337
17338 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17339
17340 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17341 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17342 (mode_supports_vsx_dform_quad): Likewise.
17343 (mode_supports_vmx_dform): Move these functions to be next to the
17344 other mode_supports functions.
17345 (mode_supports_dq_form): Likewise.
17346 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17347 mode_supports_dq_form.
17348 (reg_offset_addressing_ok_p): Likewise.
17349 (offsettable_ok_by_alignment): Likewise.
17350 (rs6000_legitimate_offset_address_p): Likewise.
17351 (legitimate_lo_sum_address_p): Likewise.
17352 (rs6000_legitimize_address): Likewise.
17353 (rs6000_legitimize_reload_address): Likewise.
17354 (rs6000_secondary_reload_inner): Likewise.
17355 (rs6000_preferred_reload_class): Likewise.
17356 (rs6000_output_move_128bit): Likewise.
17357
17358 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17359
17360 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17361 Generate SImode target register for null target.
17362 <case IX86_BUILTIN_XGETBV>: Ditto.
17363 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17364 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17365
17366 2018-05-10 Carl Love <cel@us.ibm.com>
17367
17368 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17369 dcbtt and dcbtstt if operands[2] is 0.
17370
17371 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17372
17373 PR target/85693
17374 * config/i386/sse.md (usadv64qi): New expander.
17375
17376 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17377
17378 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17379 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17380 -maltivec=be support.
17381 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17382 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17383 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17384 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17385 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17386 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17387 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17388 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17389 altivec_vsumsws): Adjust.
17390 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17391 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17392 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17393 support.
17394 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17395 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17396 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17397 (altivec_lve<VI_char>x): Delete expand.
17398 (*altivec_lve<VI_char>x_internal): Rename to...
17399 (altivec_lve<VI_char>x): ... this.
17400 (altivec_lvxl_<mode>): Delete expand.
17401 (*altivec_lvxl_<mode>_internal): Rename to ...
17402 (altivec_lvxl_<mode>): ... this.
17403 (altivec_stvxl_<mode>): Delete expand.
17404 (*altivec_stvxl_<mode>_internal): Rename to ...
17405 (altivec_stvxl_<mode>): ... this.
17406 (altivec_stve<VI_char>x): Delete expand.
17407 (*altivec_stve<VI_char>x_internal): Rename to ...
17408 (altivec_stve<VI_char>x): ... this.
17409 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17410 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17411 reduc_plus_scal_<mode>): Adjust.
17412 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17413 comment.
17414 (rs6000_cpu_cpp_builtins): Adjust.
17415 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17416 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17417 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17418 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17419 -maltivec=be support.
17420 (rs6000_split_vec_extract_var): Adjust.
17421 (rs6000_split_v4si_init): Adjust.
17422 (swap_selector_for_mode): Delete.
17423 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17424 altivec_expand_stvex_be): Delete.
17425 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17426 -maltivec=be support.
17427 (rs6000_gimple_fold_builtin): Ditto.
17428 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17429 Adjust.
17430 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17431 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17432 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17433 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17434 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17435 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17436 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17437 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17438 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17439 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17440 anonymous split): Adjust.
17441 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17442 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17443
17444 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17445
17446 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17447 when --with-gxx-include-dir is also specified.
17448 * configure: Regenerate.
17449
17450 2018-05-09 Jim Wilson <jimw@sifive.com>
17451
17452 PR target/84797
17453 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17454 * config/riscv/t-withmultilib: New.
17455 * config/riscv/withmultilib.h: New.
17456 * doc/install.texi: Document RISC-V --with-multilib-list support.
17457
17458 2018-05-09 Richard Biener <rguenther@suse.de>
17459
17460 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17461 vector.
17462 (vect_bb_vectorization_profitable_p): Adjust. Compute
17463 actual scalar cost using the cost vector and the add_stmt_cost
17464 machinery.
17465
17466 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17467
17468 PR rtl-optimization/85645
17469 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17470 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17471
17472 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17473
17474 PR rtl-optimization/85645
17475 * shrink-wrap.c (spread_components): Return a boolean saying if
17476 anything was changed.
17477 (try_shrink_wrapping_separate): Iterate spread_components until
17478 nothing changes anymore.
17479
17480 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17481
17482 PR rtl-optimization/85645
17483 * regrename.c (build_def_use): Also kill the chains that include the
17484 destination of a REG_CFA_REGISTER note.
17485
17486 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17487
17488 PR rtl-optimization/85645
17489 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17490 insn that has a REG_CFA_REGISTER note.
17491
17492 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17493
17494 * cfgexpand.c (expand_clobber): New function.
17495 (expand_gimple_stmt_1): Use it.
17496 * tree-vect-stmts.c (vect_clobber_variable): New function,
17497 split out from...
17498 (vectorizable_simd_clone_call): ...here.
17499 (vectorizable_store): Emit a clobber either side of an
17500 IFN_STORE_LANES sequence.
17501 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17502
17503 2018-05-09 Tom de Vries <tom@codesourcery.com>
17504
17505 PR target/85626
17506 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17507 (define_insn "trap_if_false"): Add exit after trap.
17508
17509 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17510
17511 PR rtl-optimization/85638
17512 * bb-reorder.c: Include common/common-target.h.
17513 (create_forwarder_block): New function extracted from...
17514 (fix_up_crossing_landing_pad): ...here. Rename into...
17515 (dw2_fix_up_crossing_landing_pad): ...this.
17516 (sjlj_fix_up_crossing_landing_pad): New function.
17517 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17518 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17519 from both partitions and exit the loop after one iteration.
17520
17521 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17522
17523 Revert:
17524 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17525 subsection.
17526 (Basic PowerPC Built-in Functions): The new name of the
17527 subsection previously known as "PowerPC Built-in Functions".
17528 (Basic PowerPC Built-in Functions Available on all Configurations):
17529 New subsubsection.
17530 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17531 subsubsection.
17532 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17533 subsubsection.
17534 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17535 subsubsection.
17536 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17537 subsubsection.
17538
17539 2018-05-08 Jim Wilson <jimw@sifive.com>
17540
17541 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17542 (LD_EMUL_SUFFIX): New.
17543 (LINK_SPEC): Use it.
17544
17545 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17546
17547 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17548 subsection.
17549 (Basic PowerPC Built-in Functions): The new name of the
17550 subsection previously known as "PowerPC Built-in Functions".
17551 (Basic PowerPC Built-in Functions Available on all Configurations):
17552 New subsubsection.
17553 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17554 subsubsection.
17555 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17556 subsubsection.
17557 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17558 subsubsection.
17559 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17560 subsubsection.
17561
17562 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17563
17564 PR target/85683
17565 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17566 after cmpelim optimization.
17567
17568 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17569
17570 * config.gcc: Support "goldmont".
17571 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17572 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17573 PROCESSOR_GOLDMONT.
17574 * config/i386/i386.c (m_GOLDMONT): Define.
17575 (processor_target_table): Add "goldmont".
17576 (PTA_GOLDMONT): Define.
17577 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17578 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17579 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17580 (fold_builtin_cpu): Add "goldmont".
17581 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17582 (ix86_option_override_internal): Add "goldmont".
17583 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17584 (processor_type): Add PROCESSOR_GOLDMONT.
17585 * config/i386/i386.md: Add CPU "glm".
17586 * config/i386/glm.md: New file.
17587 * config/i386/x86-tune.def: Add m_GOLDMONT.
17588 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17589
17590 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17591
17592 PR target/85572
17593 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17594 E_V4DImode.
17595 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17596 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17597 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17598
17599 PR target/85317
17600 * config/i386/i386.c (ix86_fold_builtin): Handle
17601 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17602
17603 PR target/85480
17604 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17605 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17606
17607 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17608
17609 PR target/85658
17610 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17611 (check_arch): Likewise.
17612 (check_fpu): Return the result rather than printing it.
17613 (end arch): Fix operator precedence.
17614 (end cpu): Likewise.
17615 (END): Print the result from check_fpu.
17616
17617 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17618 Alan Hayward <alan.hayward@arm.com>
17619 David Sherwood <david.sherwood@arm.com>
17620
17621 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17622 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17623 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17624 (*fcmuo<mode>_and): New patterns.
17625
17626 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17627
17628 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17629 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17630 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17631 (cmp_op, sve_imm_con): New code attributes.
17632 (SVE_COND_INT_CMP, imm_con): Delete.
17633 (cmp_op): Remove above unspecs from int attribute.
17634 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17635 to...
17636 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17637 comparison-specific unspecs.
17638 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17639 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17640 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17641 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17642 (*vec_fcm<cmp_op><mode>): Rename to...
17643 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17644 (*vec_fcmuo<mode>): Rename to...
17645 (*fcmuo<mode>): ...this and adjust likewise.
17646 (*pred_fcm<cmp_op><mode>): New pattern.
17647 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17648 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17649 functions.
17650 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17651 and UNORDERED.
17652 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17653 (aarch64_emit_sve_predicated_cond): New function.
17654 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17655 (aarch64_emit_unspec_cond_or): Replace with...
17656 (aarch64_emit_sve_or_conds): ...this new function. Use
17657 aarch64_emit_sve_ptrue_op for the individual comparisons and
17658 aarch64_emit_binop to OR them together.
17659 (aarch64_emit_inverted_unspec_cond): Replace with...
17660 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17661 aarch64_emit_sve_ptrue_op for the comparison and
17662 aarch64_emit_unop to invert the result.
17663 (aarch64_expand_sve_vec_cmp_float): Update after the above
17664 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17665
17666 2018-05-07 Nathan Sidwell <nathan@acm.org>
17667
17668 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17669 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17670 (Backwards Compatibility): Likewise.
17671
17672 2018-05-07 Luis Machado <luis.machado@linaro.org>
17673
17674 PR bootstrap/85681
17675 Revert:
17676 2018-05-07 Luis Machado <luis.machado@linaro.org>
17677
17678 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17679 <prefetch_dynamic_strides>: New const bool field.
17680 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17681 prefetch_dynamic_strides.
17682 (exynosm1_prefetch_tune): Likewise.
17683 (thunderxt88_prefetch_tune): Likewise.
17684 (thunderx_prefetch_tune): Likewise.
17685 (thunderx2t99_prefetch_tune): Likewise.
17686 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17687 to false.
17688 (aarch64_override_options_internal): Update to set
17689 PARAM_PREFETCH_DYNAMIC_STRIDES.
17690 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17691 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17692 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17693 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17694 prefetch-dynamic-strides setting.
17695
17696 2018-05-07 Luis Machado <luis.machado@linaro.org>
17697
17698 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17699 <minimum_stride>: New const int field.
17700 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17701 minimum_stride field.
17702 (exynosm1_prefetch_tune): Likewise.
17703 (thunderxt88_prefetch_tune): Likewise.
17704 (thunderx_prefetch_tune): Likewise.
17705 (thunderx2t99_prefetch_tune): Likewise.
17706 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17707 (aarch64_override_options_internal): Update to set
17708 PARAM_PREFETCH_MINIMUM_STRIDE.
17709 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17710 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17711 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17712 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17713 stride is constant and is below the minimum stride threshold.
17714
17715 2018-05-07 Luis Machado <luis.machado@linaro.org>
17716
17717 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17718 to 512.
17719
17720 2018-05-07 Luis Machado <luis.machado@linaro.org>
17721
17722 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17723 <prefetch_dynamic_strides>: New const bool field.
17724 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17725 prefetch_dynamic_strides.
17726 (exynosm1_prefetch_tune): Likewise.
17727 (thunderxt88_prefetch_tune): Likewise.
17728 (thunderx_prefetch_tune): Likewise.
17729 (thunderx2t99_prefetch_tune): Likewise.
17730 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17731 to false.
17732 (aarch64_override_options_internal): Update to set
17733 PARAM_PREFETCH_DYNAMIC_STRIDES.
17734 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17735 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17736 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17737 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17738 prefetch-dynamic-strides setting.
17739
17740 2018-05-07 Luis Machado <luis.machado@linaro.org>
17741
17742 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17743 <minimum_stride>: New const int field.
17744 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17745 minimum_stride field.
17746 (exynosm1_prefetch_tune): Likewise.
17747 (thunderxt88_prefetch_tune): Likewise.
17748 (thunderx_prefetch_tune): Likewise.
17749 (thunderx2t99_prefetch_tune): Likewise.
17750 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17751 (aarch64_override_options_internal): Update to set
17752 PARAM_PREFETCH_MINIMUM_STRIDE.
17753 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17754 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17755 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17756 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17757 stride is constant and is below the minimum stride threshold.
17758
17759 2018-05-06 Jakub Jelinek <jakub@redhat.com>
17760
17761 PR c++/85659
17762 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17763 the type is addressable. Don't force op into register if it has
17764 BLKmode.
17765
17766 2018-05-05 Roland McGrath <mcgrathr@google.com>
17767
17768 PR other/77609
17769 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17770 any section for which we don't know a specific type it should have,
17771 regardless of name. Previously this was done only for the exact
17772 names ".init_array", ".fini_array", and ".preinit_array".
17773 (default_elf_asm_named_section): Add comment about
17774 relationship with default_section_type_flags and SECTION_NOTYPE.
17775 (get_section): Don't consider it a type conflict if one side has
17776 SECTION_NOTYPE and the other doesn't, as long as neither has the
17777 SECTION_BSS et al used in the default_section_type_flags logic.
17778
17779 2018-05-05 Tom de Vries <tom@codesourcery.com>
17780
17781 PR target/85653
17782 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
17783 (workaround_barsyncs): New function.
17784 (nvptx_reorg): Use workaround_barsyncs.
17785 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17786 (define_expand "nvptx_membar_cta"): New define_expand.
17787 (define_insn "*nvptx_membar_cta"): New insn.
17788
17789 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
17790
17791 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
17792 To improve optimization opportunities.
17793 * builtin-types.def: The new needed builtin types for the above.
17794
17795 2018-05-04 Richard Biener <rguenther@suse.de>
17796
17797 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
17798 * gimple-ssa-store-merging.c
17799 (imm_store_chain_info::output_merged_store): Remove redundant create,
17800 release split_store vector contents on failure.
17801 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
17802 scalar stmt vector on cache hit.
17803
17804 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
17805
17806 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17807 Xilinx FP support.
17808 * config.gcc (powerpc-xilinx-eabi*): Remove.
17809 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
17810 support.
17811 (fusion_addis_mem_combo_load): Ditto.
17812 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
17813 FP support.
17814 (rs6000_cpu_cpp_builtins): Ditto.
17815 * config/rs6000/rs6000-linux.c
17816 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
17817 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
17818 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
17819 support.
17820 (rs6000_setup_reg_addr_masks): Ditto.
17821 (rs6000_init_hard_regno_mode_ok): Ditto.
17822 (rs6000_option_override_internal): Ditto.
17823 (legitimate_lo_sum_address_p): Ditto.
17824 (rs6000_legitimize_address): Ditto.
17825 (rs6000_legitimize_reload_address): Ditto.
17826 (rs6000_legitimate_address_p): Ditto.
17827 (abi_v4_pass_in_fpr): Ditto.
17828 (setup_incoming_varargs): Ditto.
17829 (rs6000_gimplify_va_arg): Ditto.
17830 (rs6000_split_multireg_move): Ditto.
17831 (rs6000_savres_strategy): Ditto.
17832 (rs6000_emit_prologue_components): Ditto.
17833 (rs6000_emit_epilogue_components): Ditto.
17834 (rs6000_emit_prologue): Ditto.
17835 (rs6000_emit_epilogue): Ditto.
17836 (rs6000_elf_file_end): Ditto.
17837 (rs6000_function_value): Ditto.
17838 (rs6000_libcall_value): Ditto.
17839 * config/rs6000/rs6000.h: Ditto.
17840 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
17841 (TARGET_MINMAX): ... this. New.
17842 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
17843 * config/rs6000/rs6000.md: Remove Xilinx FP support.
17844 (*movsi_internal1_single): Delete.
17845 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
17846 mfpu=, mxilinx-fpu): Delete.
17847 * config/rs6000/singlefp.h: Delete.
17848 * config/rs6000/sysv4.h: Remove Xilinx FP support.
17849 * config/rs6000/t-rs6000: Ditto.
17850 * config/rs6000/t-xilinx: Delete.
17851 * config/rs6000/titan.md: Adjust for fp_type removal.
17852 * config/rs6000/vsx.md: Remove Xilinx FP support.
17853 (VStype_simple): Delete.
17854 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
17855 * config/rs6000/xfpu.h: Delete.
17856 * config/rs6000/xfpu.md: Delete.
17857 * config/rs6000/xilinx.h: Delete.
17858 * config/rs6000/xilinx.opt: Delete.
17859 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
17860 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
17861
17862 2018-05-04 Tom de Vries <tom@codesourcery.com>
17863
17864 PR libgomp/85639
17865 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
17866 if ignore == 0.
17867
17868 2018-05-04 Richard Biener <rguenther@suse.de>
17869
17870 PR middle-end/85627
17871 * tree-complex.c (update_complex_assignment): We are always in SSA form.
17872 (expand_complex_div_wide): Likewise.
17873 (expand_complex_operations_1): Likewise.
17874 (expand_complex_libcall): Preserve EH info of the original stmt.
17875 (tree_lower_complex): Handle removed blocks.
17876 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
17877 on complex multiplication and division libcall builtins.
17878
17879 2018-05-04 Richard Biener <rguenther@suse.de>
17880
17881 PR middle-end/85574
17882 * fold-const.c (negate_expr_p): Restrict negation of operand
17883 zero of a division to when we know that can happen without
17884 overflow.
17885 (fold_negate_expr_1): Likewise.
17886
17887 2018-05-04 Jakub Jelinek <jakub@redhat.com>
17888
17889 PR libstdc++/85466
17890 * real.h (real_nextafter): Declare.
17891 * real.c (real_nextafter): New function.
17892 * fold-const-call.c (fold_const_nextafter): New function.
17893 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
17894 CASE_CFN_NEXTTOWARD.
17895 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
17896 even when arg1_mode is different from arg0_mode.
17897
17898 2018-05-03 Nathan Sidwell <nathan@acm.org>
17899
17900 * doc/extend.texi (Deprecated Features): Remove
17901 -ffriend-injection.
17902 (Backwards Compatibility): Likewise.
17903 * doc/invoke.texi (C++ Language Options): Likewise.
17904 (C++ Dialect Options): Likewise.
17905
17906 2018-05-03 Jakub Jelinek <jakub@redhat.com>
17907
17908 PR target/85530
17909 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17910 _mm512_mask_mullox_epi64): New intrinsics.
17911
17912 2018-05-03 Tom de Vries <tom@codesourcery.com>
17913
17914 PR testsuite/85106
17915 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17916 dump files): Add offload-tree.
17917
17918 2018-05-03 Richard Biener <rguenther@suse.de>
17919
17920 PR tree-optimization/85615
17921 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17922 to loops not nested in BBs loop father to avoid creating multi-entry
17923 loops.
17924
17925 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17926
17927 PR tree-optimization/70291
17928 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17929 arguments. Change return type to tree. Emit libcall as a new
17930 statement rather than replacing existing one when inplace_p is true.
17931 (expand_complex_multiplication_components): New function.
17932 (expand_complex_multiplication): Expand floating-point complex
17933 multiplication using the above.
17934 (expand_complex_division): Rename inner_type parameter to type.
17935 Update expand_complex_libcall call-site.
17936 (expand_complex_operations_1): Update expand_complex_multiplication
17937 and expand_complex_division call-sites.
17938
17939 2018-05-02 Jakub Jelinek <jakub@redhat.com>
17940
17941 PR target/85582
17942 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17943 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17944 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17945 the highest significant bit of the shift count mask is clear. In
17946 check whether and[sq]i3 is needed verify that all significant bits
17947 of the shift count other than the highest are set.
17948
17949 2018-05-02 Tom de Vries <tom@codesourcery.com>
17950
17951 PR libgomp/82428
17952 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17953 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17954 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17955 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17956 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17957 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17958 __builtin_goacc_parlevel_size.
17959
17960 2018-05-02 Richard Biener <rguenther@suse.de>
17961
17962 PR tree-optimization/85597
17963 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17964 do not use split vect_get_vec_defs call but call vect_get_slp_defs
17965 directly.
17966
17967 2018-05-02 Tom de Vries <tom@codesourcery.com>
17968
17969 PR testsuite/85106
17970 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17971 dump files): Add ltrans-tree.
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 wpa-ipa.
17978
17979 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
17980
17981 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
17982 powerpc*-*-linux*paired* target.
17983 * config/rs6000/750cl.h: Delete.
17984 * config/rs6000/paired.h: Delete.
17985 * config/rs6000/paired.md: Delete.
17986 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17987 float support.
17988 * config/rs6000/rs6000-builtin.def: Remove paired float support.
17989 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17990 comment. Remove paired float support.
17991 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17992 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17993 VECTOR_PAIRED.
17994 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17995 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17996 declarations.
17997 * config/rs6000/rs6000.c: Remove paired float support.
17998 (paired_expand_vector_init, paired_expand_vector_move,
17999 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18000 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18001 paired_expand_builtin, paired_expand_predicate_builtin,
18002 paired_init_builtins): Delete.
18003 * config/rs6000/rs6000.h: Remove paired float support.
18004 * config/rs6000/rs6000.md: Remove paired float support.
18005 (move_from_CR_ov_bit): Delete.
18006 * config/rs6000/rs6000.opt (mpaired): Delete.
18007 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18008 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18009
18010 2018-05-02 Richard Biener <rguenther@suse.de>
18011
18012 PR middle-end/85567
18013 * gimplify.c (gimplify_save_expr): When in SSA form allow
18014 SAVE_EXPRs to compute to SSA vars.
18015
18016 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18017
18018 PR target/85582
18019 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18020 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18021 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18022 clobber operands[2], instead use a new pseudo. Formatting fixes.
18023
18024 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18025
18026 PR tree-optimization/85586
18027 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18028 exit early for statements in the same group if the accesses are
18029 not strided.
18030
18031 2018-05-02 Tom de Vries <tom@codesourcery.com>
18032
18033 PR lto/85451
18034 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18035 error message.
18036
18037 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18038
18039 PR tree-optimization/85143
18040 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18041
18042 2018-05-01 Tom de Vries <tom@codesourcery.com>
18043
18044 PR lto/85451
18045 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18046 not found" error message.
18047
18048 2018-05-01 Tom de Vries <tom@codesourcery.com>
18049
18050 PR other/83786
18051 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18052 * vec.c (test_ordered_remove_if): New function.
18053 (vec_c_tests): Call test_ordered_remove_if.
18054 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18055 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18056 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18057 VEC_ORDERED_REMOVE_IF.
18058
18059 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18060
18061 PR tree-optimization/82665
18062 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18063 pointer subtraction where arguments come from a memchr call.
18064
18065 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18066
18067 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18068 --push-state --as-needed and --pop-state instead of --as-needed and
18069 --no-as-needed if ld supports it.
18070 * configure: Regenerated.
18071
18072 PR web/85578
18073 * doc/install.texi2html: Replace _002d with - and _002a with * in
18074 generated html files using sed.
18075
18076 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18077
18078 PR c++/85523
18079 * gcc-rich-location.c (blank_line_before_p): New function.
18080 (use_new_line): New function.
18081 (gcc_rich_location::add_fixit_insert_formatted): New function.
18082 * gcc-rich-location.h
18083 (gcc_rich_location::add_fixit_insert_formatted): New function.
18084
18085 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18086
18087 * selftest.c (assert_streq): Rename "expected" and "actual" to
18088 "val1" and "val2". Extend NULL-handling to cover both inputs
18089 symmetrically, while still requiring both to be non-NULL for a pass.
18090 * selftest.h (assert_streq): Rename "expected" and "actual" to
18091 "val1" and "val2".
18092 (ASSERT_EQ): Likewise.
18093 (ASSERT_EQ_AT): Likewise.
18094 (ASSERT_KNOWN_EQ): Likewise.
18095 (ASSERT_KNOWN_EQ_AT): Likewise.
18096 (ASSERT_NE): Likewise.
18097 (ASSERT_MAYBE_NE): Likewise.
18098 (ASSERT_MAYBE_NE_AT): Likewise.
18099 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18100 the assertion to pass.
18101 (ASSERT_STREQ_AT): Likewise.
18102
18103 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18104
18105 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18106 interaction with -pie.
18107
18108 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18109
18110 * selftest.h: Fix alphabetization of per-source-file selftest
18111 declarations.
18112
18113 2018-04-30 Jason Merrill <jason@redhat.com>
18114
18115 PR c++/61982 - dead stores to destroyed objects.
18116 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18117 of clobber.
18118
18119 2018-04-30 Jason Merrill <jason@redhat.com>
18120
18121 * tree.c (build_clobber): New.
18122 * tree.h: Declare it.
18123 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18124
18125 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18126
18127 * diagnostic-show-locus.c (layout::layout): Update for
18128 location_get_source_line returning a char_span.
18129 (struct char_span): Move to input.h.
18130 (struct correction): Update for fields in char_span becoming
18131 private.
18132 (struct source_line): Update for location_get_source_line
18133 returning a char_span.
18134 (layout::print_line): Likewise.
18135 * edit-context.c (edited_file::print_content): Likewise.
18136 (edited_file::print_diff_hunk): Likewise.
18137 (edited_file::print_run_of_changed_lines): Likewise.
18138 (edited_file::get_num_lines): Likewise.
18139 (edited_line::edited_line): Likewise.
18140 * final.c (asm_show_source): Likewise.
18141 * input.c (location_get_source_line): Convert return type
18142 from const char * to char_span, losing the final "line_len"
18143 param.
18144 (dump_location_info): Update for the above.
18145 (get_substring_ranges_for_loc): Likewise. Use a char_span
18146 when handling the literal within the line.
18147 (test_reading_source_line): Update for location_get_source_line
18148 returning a char_span.
18149 * input.h (class char_span): Move here from
18150 diagnostic-show-locus.c, converting from a struct to a class.
18151 Make data members private.
18152 (char_span::operator bool): New.
18153 (char_span::length): New.
18154 (char_span::get_buffer): New.
18155 (char_span::operator[]): New.
18156 (char_span::subspan): Make const.
18157 (char_span::xstrdup): New.
18158 (location_get_source_line): Convert return type from const char *
18159 to char_span, losing the final "line_size" param.
18160
18161 2018-04-30 Jan Hubicka <jh@suse.cz>
18162
18163 * lto-wrapper.c (ltrans_priorities): New static var.
18164 (cmp_priority): New.
18165 (run_gcc): Read priorities and if doing parallel build order
18166 the Makefile by them.
18167
18168 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18169
18170 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18171
18172 2018-04-30 Richard Biener <rguenther@suse.de>
18173
18174 * tree-cfg.c (verify_address): Remove base argument, add
18175 flag whether to check TREE_ADDRESSABLE and do that.
18176 (verify_expr): Remove.
18177 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18178 (verify_gimple_assign_single): Likewise.
18179 (verify_gimple_switch): Likewise.
18180 (verify_expr_location_1): Dereference tp once. Add (disabled)
18181 piece from verify_expr.
18182 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18183
18184 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18185
18186 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18187
18188 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18189
18190 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18191 (small_data_pattern): Likewise.
18192 (arc_rewrite_small_data): Likewise.
18193 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18194 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18195 (get_symbol_alignment): New function.
18196 (legitimate_small_data_address_p): Likewise.
18197 (legitimate_scaled_address): Update, call
18198 legitimate_small_data_address_p.
18199 (output_sdata): New static variable.
18200 (arc_print_operand): Update how we handle small data operands.
18201 (arc_print_operand_address): Likewise.
18202 (arc_legitimate_address_p): Update, use
18203 legitimate_small_data_address_p.
18204 (arc_rewrite_small_data_p): Remove.
18205 (arc_rewrite_small_data_1): Likewise.
18206 (arc_rewrite_small_data): Likewise.
18207 (small_data_pattern): Likewise.
18208 (compact_sda_memory_operand): Update to use
18209 legitimate_small_data_address_p and get_symbol_alignment.
18210 (prepare_move_operands): Don't rewite sdata pattern.
18211 (prepare_extend_operands): Remove.
18212 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18213 pattern.
18214 (zero_extendqisi2): Likewise.
18215 (zero_extendhisi2): Likewise.
18216 (extendqihi2): Likewise.
18217 (extendqisi2): Likewise.
18218 (extendhisi2): Likewise.
18219 (addsi3): Likewise.
18220 (subsi3): Likewise.
18221 (andsi3): Likewise.
18222 * config/arc/constraints.md (Usd): Change it to memory constraint.
18223
18224 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18225
18226 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18227 as source of std instructions.
18228 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18229 allow 6-bit constants as source for store instructions.
18230 (movdi_insn): Update instruction pattern to allow 6-bit constants
18231 as source for store instructions.
18232
18233 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18234
18235 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18236
18237 2018-04-30 Nathan Sidwell <nathan@acm.org>
18238 Sandra Loosemore <sandra@codesourcery.com>
18239
18240 * dumpfile.c (dump_open): Allow '-' for stdout.
18241 * doc/invoke.texi (Developer Options): Document dump filename
18242 determination early. Document stdin/stdout selection.
18243
18244 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18245
18246 Microblaze Target: PIC data text relative
18247
18248 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18249 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18250 Add declaration.
18251 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18252 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18253 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18254 New addressing mode for data-text relative position indepenedent code.
18255 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18256 'ADDRESS_SYMBOLIC_TXT_REL'.
18257 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18258 (microblaze_legitimate_pic_operand): Exclude function calls from
18259 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18260 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18261 addresses cases.
18262 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18263 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18264 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18265 for 'address + offset'.
18266 (microblaze_expand_prologue): Add new function prologue call for
18267 'r20' assignation.
18268 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18269 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18270 table in case of TARGET_PIC_DATA_TEXT_REL.
18271 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18272 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18273 Add new macros 'UNSPEC_TEXT',
18274 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18275 + exclude function calls from 'UNSPEC_PLT' in case of data text
18276 relative mode.
18277 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18278 new target hook for generating address diff vector tables in case of
18279 flag_pic.
18280 * doc/tm.texi : Regenerate.
18281 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18282 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18283 of addr diff vector generation.
18284 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18285 target hook definition.
18286 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18287 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18288 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18289 option for data text relative.
18290
18291 2018-04-30 Richard Biener <rguenther@suse.de>
18292
18293 * tree-chrec.h (evolution_function_is_constant_p): Remove
18294 redundant check.
18295 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18296
18297 2018-04-30 Richard Biener <rguenther@suse.de>
18298
18299 PR bootstrap/85571
18300 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18301
18302 2018-04-30 Richard Biener <rguenther@suse.de>
18303
18304 PR tree-optimization/28364
18305 PR tree-optimization/85275
18306 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18307 copying first exit test.
18308
18309 2018-04-28 Mark Wielaard <mark@klomp.org>
18310
18311 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18312 dwarf_version >= 5.
18313 (dwarf_AT): Handle DW_AT_addr_base.
18314 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18315
18316 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18317
18318 PR target/84431
18319 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18320 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18321 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18322 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18323
18324 2018-04-28 Richard Biener <rguenther@suse.de>
18325
18326 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18327 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18328 to reflect use. Only add interesting stmts.
18329
18330 2018-04-27 Martin Jambor <mjambor@suse.cz>
18331
18332 PR ipa/85549
18333 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18334 the jump function allows for passing through aggregate values.
18335
18336 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18337
18338 * input.h (in_system_header_at): Convert from macro to inline
18339 function.
18340 (from_macro_expansion_at): Likewise.
18341 (from_macro_definition_at): Likewise.
18342
18343 2018-04-27 Jeff Law <law@redhat.com>
18344
18345 * config.gcc: Mark tile* targets as deprecated/obsolete.
18346
18347 2018-04-27 Richard Biener <rguenther@suse.de>
18348
18349 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18350 fix for ILP32.
18351
18352 2018-04-27 Richard Biener <rguenther@suse.de>
18353
18354 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18355
18356 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18357
18358 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18359 with Yd constraint. Set "preferred_for_speed" attribute from
18360 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18361 with Yd constraint.
18362 (*movdi_internal): Ditto.
18363 (movti_interunit splitters): Remove
18364 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18365 (movdi_interunit splitters): Ditto.
18366 * config/i386/constraints.md (Ye): Remove.
18367 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18368
18369 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18370
18371 PR target/85512
18372 * config/aarch64/constraints.md (Usg): Limit to 31.
18373 (Usj): Limit to 63.
18374
18375 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18376
18377 PR tree-optimization/85529
18378 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18379 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18380 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18381 zero extension or masking of the MSB bit.
18382 (optimize_range_tests): Add FIRST_BB argument, pass it through
18383 to optimize_range_tests_var_bound.
18384 (maybe_optimize_range_tests, reassociate_bb): Adjust
18385 optimize_range_tests callers.
18386
18387 2018-04-26 Richard Biener <rguenther@suse.de>
18388 Jakub Jelinek <jakub@redhat.com>
18389
18390 * cgraph.h (symbol_table): Just declare debug method here.
18391 * symtab.c (symbol_table::debug): Define.
18392
18393 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18394
18395 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18396
18397 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18398
18399 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18400 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18401 (*movdi_internal): Substitute Yi and Yj constraint with x
18402 and Ym and Yn constraint with y constraint. Update "isa"
18403 attribute and set "preferred_for_speed" attribute from
18404 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18405 (*movsi_internal): Ditto.
18406 (*movdf_internal): Ditto.
18407 (*movsf_internal): Ditto.
18408 (*zero_extendsidi2): Ditto.
18409 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18410 (sse2_loadld): Ditto.
18411 (*vec_extract<ssevecmodelower>_0): Ditto.
18412 (*vec_extractv4si_0_zext_sse4): Ditto.
18413 (vec_concatv2di): Ditto.
18414 (*vec_dup<mode>): Ditto.
18415 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18416 * config/i386/constraints.md (Yi): Remove.
18417 (Yj): Remove.
18418 (Ym): Remove.
18419 (Yn): Remove.
18420
18421 2018-04-26 Nathan Sidwell <nathan@acm.org>
18422
18423 * dumpfile.c (dump_open): New.
18424 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18425 (dump_finish): Detect stdio/stderr by value not name.
18426
18427 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18428
18429 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18430
18431 2018-04-26 Tom de Vries <tom@codesourcery.com>
18432
18433 PR target/84952
18434 * config/nvptx/nvptx.c (verify_neutering_jumps)
18435 (verify_neutering_labels): New function
18436 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18437
18438 2018-04-26 Tom de Vries <tom@codesourcery.com>
18439
18440 PR target/84025
18441 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18442 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18443 need neutering.
18444
18445 2018-04-26 Richard Biener <rguenther@suse.de>
18446 Tom de Vries <tom@codesourcery.com>
18447
18448 PR lto/85422
18449 * lto-streamer-out.c (output_function): Fixup loops if required to match
18450 discovery done in the reader.
18451
18452 2018-04-26 Richard Biener <rguenther@suse.de>
18453
18454 PR tree-optimization/85116
18455 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18456 have a loop exit from the single latch predecessor. Remove
18457 case of header with just condition.
18458 (ch_base::copy_headers): Exclude infinite loops from any
18459 processing.
18460 (pass_ch::execute): Record exits.
18461
18462 2018-04-26 Richard Biener <rguenther@suse.de>
18463
18464 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18465 prologue cost vector and pass it to vect_get_load_cost.
18466 (vect_get_peeling_costs_all_drs): Likewise.
18467 (vect_peeling_hash_get_lowest_cost): Likewise.
18468 (vect_enhance_data_refs_alignment): Likewise.
18469
18470 2018-04-26 Richard Biener <rguenther@suse.de>
18471
18472 PR middle-end/85450
18473 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18474 checking of integer<->pointer conversions.
18475 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18476 sign-/zero-extending pointer types.
18477 (expand_omp_for_static_chunk): Likewise.
18478
18479 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18480 Jean Lee <xiaoyur347@gmail.com>
18481
18482 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18483 (TARGET_ASAN_SHADOW_OFFSET): Define.
18484 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18485 true for -fsanitize=address.
18486
18487 2018-04-25 Mark Wielaard <mark@klomp.org>
18488
18489 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18490 shorter ones.
18491
18492 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18493
18494 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18495 than "alu", remove explicit "memory" and "imm_disp" attributes.
18496 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18497
18498 PR middle-end/85414
18499 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18500 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18501 gen_lowpart_no_emit.
18502
18503 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18504
18505 PR target/85473
18506 * config/i386/i386.c (ix86_expand_builtin): Change memory
18507 operand to XI, extend p0 to Pmode.
18508 * config/i386/i386.md: Change unspec volatile and operand
18509 1 mode to XI, change operand 0 mode to P.
18510
18511 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18512
18513 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18514 GET_MODE_MASK before any checking.
18515 (nds32_can_use_bset_p): Likewise.
18516 (nds32_can_use_btgl_p): Likewise.
18517
18518 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18519
18520 * config/nds32/nds32-doubleword.md: New define_split pattern for
18521 illegal register number.
18522
18523 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18524
18525 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18526
18527 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18528
18529 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18530
18531 2018-04-25 Richard Biener <rguenther@suse.de>
18532
18533 * lto-streamer.h (LTO_major_version): Bump to 8.
18534
18535 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18536
18537 * BASE-VER: Set to 9.0.0.
18538
18539 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18540
18541 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18542 in __abskf2 and __powikf2.
18543
18544 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18545
18546 PR target/85512
18547 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18548 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18549 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18550 Use the above on operand 2. Reindent.
18551 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18552
18553 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18554
18555 PR target/85485
18556 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18557 handle OPT_mcet.
18558 * config/i386/i386.opt (mcet): Removed.
18559 * doc/install.texi: Remove -mcet documentation.
18560 * doc/invoke.texi: Likewise.
18561
18562 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18563
18564 PR target/85485
18565 * doc/install.texi: Remove -mcet from bootstrap-cet.
18566
18567 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18568
18569 PR target/85511
18570 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18571 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18572 if TARGET_64BIT.
18573
18574 PR target/85503
18575 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18576 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18577 containing a CONST_VECTOR.
18578
18579 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18580
18581 * doc/install.texi: Update newlib dependency for nvptx.
18582
18583 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18584
18585 PR target/85508
18586 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18587 instead of INTVAL when shifting x left.
18588
18589 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18590
18591 PR tree-optimization/85478
18592 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18593 vect_grouped_store_supported for single element vectors.
18594
18595 2018-04-24 Richard Biener <rguenther@suse.de>
18596
18597 PR target/85491
18598 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18599 load cost increase to the case of non-constant step.
18600
18601 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18602
18603 PR target/84828
18604 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18605 destination if any_malformed_asm.
18606
18607 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18608
18609 PR middle-end/85496
18610 * expr.c (store_field): In the bitfield case, if the value comes from
18611 a function call and is returned in registers by means of a PARALLEL,
18612 do not change the mode of the temporary unless BLKmode and VOIDmode.
18613
18614 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18615
18616 PR rtl-optimization/85423
18617 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18618 dependencies to debug insns when the previous insn is non-debug.
18619
18620 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18621
18622 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18623 enums into a single definition.
18624 (fls): Fix predicates and printing.
18625 (seti): Likewise.
18626
18627 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18628
18629 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18630 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18631 and short u6 immediate.
18632 (check_if_valid_sleep_operand): Remove.
18633 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18634
18635 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18636
18637 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18638 flag_always_save_lp condition.
18639 * config/nds32/nds32.opt (malways-save-lp): New option.
18640
18641 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18642
18643 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18644 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18645 * config/nds32/nds32.h
18646 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18647 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18648
18649 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18650
18651 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18652 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18653
18654 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18655 Chung-Ju Wu <jasonwucj@gmail.com>
18656
18657 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18658 Declare.
18659 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18660 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18661
18662 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18663
18664 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18665
18666 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18667
18668 * config/nds32/nds32-protos.h (nds32_data_alignment,
18669 nds32_local_alignment): Declare.
18670 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18671 nds32_local_alignment): New functions.
18672 (TARGET_CONSTANT_ALIGNMENT): Define.
18673 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18674
18675 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18676
18677 * config/nds32/nds32.c
18678 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18679 (TARGET_MODES_TIEABLE_P): Likewise.
18680
18681 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18682
18683 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18684 level Ofast and Og.
18685
18686 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18687 Chung-Ju Wu <jasonwucj@gmail.com>
18688
18689 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18690 for unaligned access.
18691 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18692 unaligned access.
18693 * config/nds32/nds32-intrinsic.md: Likewise.
18694 * config/nds32/nds32_intrinsic.h: Likewise.
18695 * config/nds32/nds32.h (nds32_builtins): Likewise.
18696 * config/nds32/nds32.opt (munaligned-access): New option.
18697 * config/nds32/nds32.c (nds32_asm_file_start): Display
18698 flag_unaligned_access status.
18699
18700 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18701
18702 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18703 -mno-relax is present.
18704 * config/riscv/linux.h (LINK_SPEC): Ditto.
18705
18706 2018-04-20 Martin Sebor <msebor@redhat.com>
18707
18708 PR c/85365
18709 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18710 for null pointers.
18711 (gimple_fold_builtin_stxcpy_chk): Same.
18712 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18713
18714 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
18715
18716 PR target/85456
18717 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18718 __powikf2 when long double is IEEE 128-bit.
18719
18720 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18721
18722 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18723 step to make sure stack always aligned.
18724
18725 2018-04-20 Carl Love <cel@us.ibm.com>
18726
18727 PR target/83402
18728 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18729 size check for arg0.
18730
18731 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
18732 Tom de Vries <tom@codesourcery.com>
18733
18734 PR target/85445
18735 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18736 Emit insns for calls too.
18737 (nvptx_find_par): Always look for worker-level predecessor insn.
18738 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
18739 calls.
18740 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18741 (nvptx_process_pars): Propagate frames for calls.
18742
18743 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
18744
18745 PR target/85469
18746 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18747 Removed.
18748 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18749 (ix86_handle_option): Don't handle OPT_mibt.
18750 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18751 __SHSTK__.
18752 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18753 has_ibt and ibt.
18754 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18755 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18756 (ix86_target_macros): Define __CET__ with flag_cf_protection
18757 for -fcf-protection.
18758 * config/i386/i386.c (isa2_opts): Remove -mibt.
18759 * config/i386/i386.h (TARGET_IBT): Removed.
18760 (TARGET_IBT_P): Likewise.
18761 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18762 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18763 * config/i386/i386.opt (mcet): Update help message.
18764 (mshstk): Likewise.
18765 (mibt): Removed.
18766 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
18767 -mcet as an alias for -mshstk.
18768
18769 2018-04-20 Richard Biener <rguenther@suse.de>
18770
18771 PR middle-end/85475
18772 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18773 complexity by forcing a single use of the multiply operand.
18774
18775 2018-04-20 Martin Jambor <mjambor@suse.cz>
18776
18777 ipa/85449
18778 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18779 recursion dependency to only apply to non-clones.
18780
18781 2018-04-20 Martin Jambor <mjambor@suse.cz>
18782
18783 ipa/85447
18784 * ipa-cp.c (create_specialized_node): Check that clones of
18785 self-recursive edges exist during IPA-CP.
18786
18787 2018-04-19 Toon Moene <toon@moene.org>
18788
18789 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
18790 by -O3.
18791
18792 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18793
18794 PR tree-optimization/85467
18795 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
18796 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
18797 VECTOR_CST element to type.
18798
18799 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18800
18801 PR target/85397
18802 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
18803 * config/i386/i386.md (builtin_setjmp_setup): Removed.
18804 (builtin_longjmp): Likewise.
18805 (save_stack_nonlocal): New pattern.
18806 (restore_stack_nonlocal): Likewise.
18807
18808 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18809
18810 PR target/85404
18811 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18812 Replace ASM_OUTPUT_LABEL with fprintf.
18813
18814 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
18815
18816 PR target/85417
18817 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
18818 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
18819 * config/i386/i386-c.c (ix86_target_macros_internal): Also
18820 define __IBT__ and __SHSTK__ for -fcf-protection.
18821 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
18822 TARGET_IBT.
18823 (ix86_trampoline_init): Likewise.
18824 (x86_output_mi_thunk): Likewise.
18825 (ix86_notrack_prefixed_insn_p): Likewise.
18826 (ix86_option_override_internal): Don't disallow -fcf-protection.
18827 * config/i386/i386.md (rdssp<mode>): Also enable for
18828 -fcf-protection.
18829 (incssp<mode>): Likewise.
18830 (nop_endbr): Likewise.
18831 * config/i386/i386.opt (mcet): Change help message to built-in
18832 functions only.
18833 (mibt): Likewise.
18834 (mshstk): Likewise.
18835 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
18836 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
18837 enable CET built-in functions.
18838
18839 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
18840
18841 * common/config/i386/i386-common.c
18842 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
18843 OPTION_MASK_ISA_MOVDIRI_UNSET,
18844 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
18845 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
18846 * config.gcc (movdirintrin.h): New header.
18847 * config/i386/cpuid.h (bit_MOVDIRI,
18848 bit_MOVDIR64B): New bits.
18849 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
18850 and -mmvodir64b.
18851 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
18852 (VOID, PVOID, PCVOID)): New function types.
18853 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
18854 __builtin_ia32_directstoreu_u64,
18855 __builtin_ia32_movdir64b): New builtins.
18856 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
18857 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
18858 and -mmovdiri.
18859 (ix86_valid_target_attribute_inner_p): Ditto.
18860 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
18861 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
18862 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
18863 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
18864 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
18865 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
18866 (movdiri<mode>, movdir64b_<mode>): New.
18867 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
18868 * config/i386/immintrin.h: Include movdirintrin.h.
18869 * config/i386/movdirintrin.h: New file.
18870 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
18871
18872 2018-04-19 Richard Biener <rguenther@suse.de>
18873
18874 PR middle-end/85455
18875 * cfg.c (clear_bb_flags): When loop state says we have
18876 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
18877
18878 2018-04-19 Richard Biener <rguenther@suse.de>
18879
18880 PR tree-optimization/84737
18881 * tree-vect-data-refs.c (vect_copy_ref_info): New function
18882 copying restrict info.
18883 (vect_setup_realignment): Use it.
18884 * tree-vectorizer.h (vect_copy_ref_info): Declare.
18885 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
18886 the first DR to all generated stores.
18887 (vectorizable_load): Likewise for loads.
18888
18889 2018-04-19 Jakub Jelinek <jakub@redhat.com>
18890
18891 PR tree-optimization/85446
18892 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
18893 the integral and pointer types to have the same precision.
18894
18895 * doc/install.texi: Document --disable-cet being the default and
18896 --enable-cet=auto.
18897
18898 2018-04-18 Martin Liska <mliska@suse.cz>
18899
18900 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18901 style.
18902
18903 2018-04-18 Martin Liska <mliska@suse.cz>
18904
18905 Revert
18906 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
18907
18908 PR ipa/83983
18909 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18910 arguments if they are comparable.
18911
18912 2018-04-18 Martin Liska <mliska@suse.cz>
18913
18914 Revert
18915 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
18916
18917 PR lto/84805
18918 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18919 incomplete types.
18920
18921 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
18922
18923 PR target/85388
18924 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18925 ENDBR after calling __morestack.
18926
18927 2018-04-18 David Malcolm <dmalcolm@redhat.com>
18928
18929 PR jit/85384
18930 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18931 by using gcc_base_ver to generate a gcc_driver_version, and use
18932 it when generating GCC_DRIVER_NAME.
18933 * configure: Regenerate.
18934
18935 2018-04-18 Jakub Jelinek <jakub@redhat.com>
18936
18937 PR target/81084
18938 * config.gcc: Obsolete powerpc*-*-*spe*.
18939
18940 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18941
18942 PR debug/84637
18943 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18944 (stabstr_D): Change type of unum from unsigned int to
18945 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
18946 type.
18947
18948 2018-04-17 Jim Wilson <jimw@sifive.com>
18949
18950 PR 84856
18951 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18952 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18953 Set arg_pointer_offset after using pretend_args_size.
18954
18955 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18956
18957 PR rtl-optimization/85431
18958 * dse.c (record_store): Ignore zero width stores.
18959
18960 PR sanitizer/85230
18961 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
18962 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18963 __builtin_stack_restore rather than after it.
18964 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18965 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18966 argument instead of virtual_dynamic_stack_rtx.
18967
18968 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
18969
18970 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18971 New prototype.
18972 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18973 Add note to error message to explain internal mapping of overloaded
18974 built-in function name to non-overloaded built-in function name.
18975 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18976 function.
18977
18978 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
18979
18980 PR target/85424
18981 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18982 where the inputs overlap with the output.
18983
18984 2018-04-17 Jakub Jelinek <jakub@redhat.com>
18985
18986 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18987 (=v, v) alternative and explicit "memory" attribute.
18988 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
18989 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18990 attributes.
18991 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18992 "sselog1" type instead of "sselog".
18993 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18994 "sselog". Remove explicit "memory" attribute.
18995 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18996 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18997 attributes.
18998 (vec_extract_hi_v32hi): Merge all alternatives into one, use
18999 "sselog1" type instead of "sselog". Remove explicit "memory"
19000 attribute.
19001 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19002 use "sselog1" type instead of "sselog". Remove explicit "memory"
19003 attribute.
19004 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19005 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19006 attributes.
19007 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19008 "sselog1" type instead of "sselog". Remove explicit "memory"
19009 attribute.
19010 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19011 use "sselog1" type instead of "sselog". Remove explicit "memory"
19012 attribute.
19013
19014 PR target/85430
19015 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19016
19017 PR middle-end/85414
19018 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19019 on a SUBREG.
19020
19021 2018-04-17 Martin Jambor <mjambor@suse.cz>
19022
19023 PR ipa/85421
19024 * ipa-cp.c (create_specialized_node): Call
19025 expand_all_artificial_thunks if necessary.
19026
19027 2018-04-17 Martin Liska <mliska@suse.cz>
19028
19029 PR lto/85405
19030 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19031 in message, remote space in between '_G' and '('.
19032
19033 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19034
19035 PR target/85281
19036 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19037 avx512f_vmcmp<mode>3<round_saeonly_name>,
19038 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19039 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19040 avx512f_rndscale<mode><round_saeonly_name>,
19041 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19042 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19043 Use %<iptr>2 instead of %2 for -masm=intel.
19044 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19045 avx512f_vcvttss2usi<round_saeonly_name>,
19046 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19047 -masm=intel.
19048 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19049 avx512f_vcvttsd2usi<round_saeonly_name>,
19050 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19051 Use %q1 instead of %1 for -masm=intel.
19052 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19053 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19054 of %3 for -masm=intel.
19055 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19056 -masm=intel.
19057 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19058 -masm=intel.
19059 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19060 -masm=intel.
19061 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19062 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19063 %g1.
19064 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19065 -masm=intel.
19066 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19067 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19068 %g1 and one with %0 and %1.
19069 (avx512er_vmrcp28<mode><round_saeonly_name>,
19070 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19071 %1 for -masm=intel.
19072 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19073 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19074 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19075 of %0 and %{%4%} for -masm=intel.
19076 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19077 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19078 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19079 order of %0 and %{%5%}%{z%} for -masm=intel.
19080
19081 2018-04-17 Jan Hubicka <jh@suse.cz>
19082
19083 PR lto/85405
19084 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19085
19086 2018-04-17 Martin Liska <mliska@suse.cz>
19087
19088 PR ipa/85329
19089 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19090 for target_clone error message. Make default implementation
19091 clone to be a local declaration.
19092 (separate_attrs): Add new argument and check for an empty
19093 string.
19094 (expand_target_clones): Handle it.
19095 (ipa_target_clone): Make redirection just for target_clones
19096 functions.
19097
19098 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19099 Tom de Vries <tom@codesourcery.com>
19100
19101 PR middle-end/84955
19102 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19103 tiled basic blocks without omp continue statements.
19104
19105 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19106
19107 PR target/83660
19108 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19109 vec_extract expression as having side effects to make sure it gets
19110 a cleanup point.
19111
19112 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19113
19114 PR target/85403
19115 * config/i386/i386.c (get_builtin_code_for_version): Check
19116 error_mark_node.
19117
19118 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19119
19120 PR target/84331
19121 * config.gcc: Support "skylake".
19122 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19123 PROCESSOR_SKYLAKE.
19124 * config/i386/i386.c (m_SKYLAKE): Define.
19125 (processor_target_table): Add "skylake".
19126 (ix86_option_override_internal): Add "skylake".
19127 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19128 PROCESSOR_CANNONLAKE.
19129 (get_builtin_code_for_version): Fix priority for
19130 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19131 PROCESSOR_SKYLAKE-AVX512.
19132 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19133 (processor_type): Add PROCESSOR_SKYLAKE.
19134
19135 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19136 Jason Merrill <jason@redhat.com>
19137
19138 PR c++/85112
19139 * convert.c (convert_to_integer_1): Use direct recursion for
19140 enumeral types and types with a precision less than the number
19141 of bits in their mode.
19142
19143 2018-04-16 Julia Koval <julia.koval@intel.com>
19144
19145 PR target/84413
19146 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19147 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19148
19149 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19150
19151 PR target/85293
19152 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19153 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19154 and -mno-direct-move.
19155
19156 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19157
19158 PR target/83402
19159 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19160 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19161 Ensure negative shifts result in {0}.
19162
19163 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19164
19165 PR rtl-optimization/79916
19166 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19167 regs (if any) to define how to gnerate SD moves when LRA is in
19168 progress.
19169
19170 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19171
19172 PR rtl-optimization/85393
19173 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19174 * except.c (expand_dw2_landing_pad_for_region): Make static.
19175 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19176 a label and unconditional jump to old_bb, rather than
19177 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19178 basic block.
19179
19180 PR rtl-optimization/85376
19181 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19182 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19183 instead of a specific value.
19184
19185 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19186 Bin Cheng <bin.cheng@arm.com>
19187
19188 PR tree-optimization/82965
19189 PR tree-optimization/83991
19190 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19191 by_profile_only parameter.
19192 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19193 information if the loop was predicted to iterate too many times.
19194 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19195
19196 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19197
19198 PR lto/71991
19199 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19200 always inline.
19201
19202 2018-04-13 Martin Liska <mliska@suse.cz>
19203 Jakub Jelinek <jakub@redhat.com>
19204
19205 PR middle-end/81657
19206 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19207 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19208 * builtins.c (expand_builtin_memory_copy_args): Use
19209 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19210 handle dest_addr == pc_rtx.
19211
19212 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19213
19214 PR target/85291
19215 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19216 asked to not generate direct moves.
19217 (fix_trunc<mode>si2_stfiwx): Similar.
19218 (fix_trunc<mode>si2_internal): Similar.
19219
19220 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19221
19222 PR debug/83157
19223 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19224 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19225 lookup if dest in some wider mode is known to be const0_rtx and
19226 if so, record permanent equivalence for it to be ZERO_EXTEND of
19227 the narrower mode destination.
19228
19229 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19230
19231 * lto-streamer-out.c (output_function): Revert 259346.
19232 * omp-expand.c (expand_oacc_for): Likewise.
19233
19234 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19235
19236 PR rtl-optimization/85354
19237 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19238 * sel-sched.c (sel_global_init): ... here.
19239
19240 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19241
19242 PR target/85238
19243 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19244 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19245 mode for PE-COFF targets.
19246 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19247 (i386_pe_asm_lto_end): Likewise.
19248 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19249 (TARGET_ASM_LTO_END): Likewise.
19250 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19251 (i386_pe_asm_lto_start): New function.
19252 (i386_pe_asm_lto_end): Likewise.
19253
19254 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19255 Richard Biener <rguenther@suse.de>
19256
19257 PR middle-end/84955
19258 * lto-streamer-out.c (output_function): Fix CFG loop state before
19259 streaming out.
19260 * omp-expand.c (expand_oacc_for): Handle calls to internal
19261 functions like regular functions.
19262
19263 2018-04-12 Richard Biener <rguenther@suse.de>
19264
19265 PR lto/85371
19266 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19267 for the early LTO debug to properly generate references to it
19268 during DIE emission. Do not re-use that for the skeleton for
19269 split-dwarf.
19270 (dwarf2out_early_finish): Likewise.
19271
19272 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19273
19274 PR target/85328
19275 * config/i386/sse.md
19276 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19277 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19278 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19279 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19280 and output is a reg, avoid creating invalid lowpart subreg, but
19281 instead split into a 512-bit move. Don't split if not AVX512VL,
19282 input is xmm16+ reg and output is a mem.
19283 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19284 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19285 xmm16+ reg and output is a mem.
19286
19287 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19288
19289 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19290 also for flag_dwarf2_cfi_asm.
19291
19292 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19293
19294 PR rtl-optimization/85342
19295 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19296 a bool scalar var inside of the loop instead. Don't try to update
19297 recog_data.operand after failed apply_change_group.
19298
19299 2018-04-12 Tom de Vries <tom@codesourcery.com>
19300
19301 PR target/85296
19302 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19303 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19304 array with flexible array member as array without given dimension.
19305 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19306 argument for undefined param to true.
19307
19308 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19309
19310 PR target/85321
19311 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19312 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19313 from PowerPC section.
19314 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19315 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19316 help text that is too long.
19317 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19318 help text that is too long.
19319 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19320 help text that is too long.
19321
19322 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19323
19324 * config/alpha/alpha.md (stack_probe_internal): Rename
19325 from "probe_stack". Update all callers.
19326
19327 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19328
19329 PR rtl-optimization/84566
19330 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19331 sched_macro_fuse_insns.
19332
19333 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19334
19335 PR target/84301
19336 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19337 (compute_block_dependences): ... from here.
19338
19339 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19340
19341 PR tree-optimization/85331
19342 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19343 from int to HOST_WIDE_INT.
19344
19345 2018-04-11 Martin Jambor <mjambor@suse.cz>
19346
19347 PR ipa/84149
19348 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19349 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19350 not the same as the source val.
19351 (cgraph_edge_brings_value_p): New parameter.
19352 (gather_edges_for_value): Pass destination value to
19353 cgraph_edge_brings_value_p.
19354 (perhaps_add_new_callers): Likewise.
19355 (get_info_about_necessary_edges): Likewise and exclude values brought
19356 only by self-recursive edges.
19357 (create_specialized_node): Redirect only clones of self-calling edges.
19358 (+self_recursive_pass_through_p): New function.
19359 (find_more_scalar_values_for_callers_subset): Use it.
19360 (find_aggregate_values_for_callers_subset): Likewise.
19361 (known_aggs_to_agg_replacement_list): Removed.
19362 (decide_whether_version_node): Re-calculate known constants for all
19363 remaining context clones.
19364
19365 2018-04-11 Richard Biener <rguenther@suse.de>
19366
19367 PR lto/85339
19368 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19369 from early DWARF output.
19370 (dwarf2out_early_finish): Output line info unconditionally into
19371 early DWARF and add reference to it.
19372
19373 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19374
19375 PR target/85281
19376 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19377 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19378 other than V2DFmode using iptr mode attribute.
19379 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19380
19381 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19382
19383 PR rtl-optimization/84659
19384 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19385
19386 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19387
19388 PR debug/85302
19389 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19390 SIZEP is NULL.
19391 (output_loc_list): Pass address of a dummy size variable even in the
19392 locview handling loop.
19393 (index_location_lists): Add comment on why skip_loc_list_entry can't
19394 call size_of_locs.
19395
19396 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19397
19398 PR target/85261
19399 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19400 into register.
19401
19402 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19403
19404 PR target/85321
19405 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19406 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19407 and -mstring-compare-inline-limit.
19408
19409 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19410
19411 PR target/85287
19412 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19413 for stack clash protection in a register whenever we need it to be in
19414 a register.
19415
19416 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19417
19418 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19419 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19420
19421 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19422
19423 PR target/85321
19424 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19425 the help text.
19426 (mlong-double-): Ditto.
19427 * config/rs6000/sysv4.opt (msdata=): Ditto.
19428 (mtls-size=): Ditto.
19429
19430 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19431
19432 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19433 erroneous entries for
19434 "vector int vec_ldl (int, long int *)", and
19435 "vector unsigned int vec_ldl (int, unsigned long int *)".
19436 Add comments and entries for
19437 "vector bool char vec_ldl (int, bool char *)",
19438 "vector bool short vec_ldl (int, bool short *)",
19439 "vector bool int vec_ldl (int, bool int *)",
19440 "vector bool long long vec_ldl (int, bool long long *)",
19441 "vector pixel vec_ldl (int, pixel *)",
19442 "vector long long vec_ldl (int, long long *)",
19443 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19444 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19445 type tree bool_long_long_type_node and correct definition of
19446 bool_V2DI_type_node to make reference to this new type tree.
19447 (rs6000_mangle_type): Replace erroneous reference to
19448 bool_long_type_node with bool_long_long_type_node.
19449 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19450 comments to emphasize sign distinctions for char and int types and
19451 replace RS6000_BTI_bool_long constant with
19452 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19453 use of RS6000_BTI_pixel.
19454 (bool_long_type_node): Remove this macro definition.
19455 (bool_long_long_type_node): New macro definition
19456
19457 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19458
19459 PR rtl-optimization/85300
19460 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19461 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19462 simplify_unary_operation fails.
19463
19464 2018-04-10 Martin Liska <mliska@suse.cz>
19465
19466 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19467 cgraph_edge and ipa_ref.
19468
19469 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19470
19471 PR target/85177
19472 PR target/85255
19473 * config/i386/sse.md
19474 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19475 computation of the VEC_MERGE selector from mask.
19476 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19477 Fix decoding of the VEC_MERGE selector into mask.
19478
19479 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19480
19481 PR tree-optimization/85286
19482 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19483
19484 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19485
19486 * final.c (final_1): Set insn_last_address as well as
19487 insn_current_address.
19488
19489 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19490
19491 PR target/85173
19492 * explow.c (emit_stack_probe): Call validize_mem on memory location
19493 before passing it to gen_probe_stack. Create address operand and
19494 legitimize it for the probe_stack_address case.
19495
19496 2018-04-09 Jan Hubicka <jh@suse.cz>
19497
19498 PR lto/85078
19499 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19500 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19501 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19502 walk basetypes.
19503 (free_lang_data): Rebuild type inheritance graph.
19504
19505 2018-04-09 Martin Sebor <msebor@redhat.com>
19506
19507 * invoke.texi (-finline-small-functions): Mention other optimization
19508 options.
19509 (-findirect-inlining, -fpartial-inlining): Same.
19510 (-finline-functions-called-once): Same.
19511 (-freorder-blocks-and-partition): Same.
19512
19513 2018-04-09 Jan Hubicka <jh@suse.cz>
19514
19515 PR rtl/84058
19516 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19517 jumps; choose last target that matches the criteria (i.e.
19518 no partition changes for non-crossing jumps).
19519 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19520 support for redirecting crossing jumps to non-crossing.
19521
19522 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19523
19524 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19525 also for naked functions.
19526
19527 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19528
19529 * config/arc/arc.md (add_shift): New pattern.
19530 (add_shift2): Likewise.
19531 (sub_shift): Likewise.
19532 (sub_shift_cmp0_noout): Likewise.
19533 (compare_si_ashiftsi): Likewise.
19534 (xbfu_cmp0_noout): New combine pattern.
19535 (xbfu_cmp0"): Likewise.
19536 (movsi_set_cc_insn): Place the predicable variant first.
19537 (commutative_binary_cmp0_noout): Remove clobber.
19538 (commutative_binary_cmp0): New pattern.
19539 (noncommutative_binary_cmp0): Likewise.
19540 (noncommutative_binary_cmp0_noout): Likewise.
19541 (noncommutative_binary_comparison_result_used): Removed.
19542 (rsub_cmp0): New pattern.
19543 (rsub_cmp0_noout): Likewise.
19544 (extzvsi): Changed, keep only meaningful variants.
19545 (SQH, SEZ): New iterators.
19546 (SQH_postfix): New mode attribute.
19547 (SEZ_prefix): New code attribute.
19548 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19549 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19550 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19551 of numerical value.
19552 (noncommutative_operator): Check the availability of barrel
19553 shifter option.
19554
19555 2018-04-09 Richard Biener <rguenther@suse.de>
19556
19557 PR tree-optimization/85284
19558 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19559 Only use the niter constraining form of simple_iv when the exit
19560 is always executed.
19561
19562 2018-04-09 Tom de Vries <tom@codesourcery.com>
19563
19564 PR target/84041
19565 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19566 (define_expand "*memory_barrier"): New define_expand.
19567 (define_insn "memory_barrier"): New insn.
19568
19569 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19570
19571 PR rtl-optimization/80463
19572 PR rtl-optimization/83972
19573 PR rtl-optimization/83480
19574
19575 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19576 correct producer for the insn.
19577 (tidy_control_flow): Fixup seqnos in case of debug insns.
19578
19579 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19580
19581 PR rtl-optimization/83913
19582
19583 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19584 different sched-times when merging exprs.
19585
19586 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19587
19588 PR rtl-optimization/83962
19589
19590 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19591 tidy_fallthru_edge and tidy_control_flow.
19592
19593 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19594
19595 PR rtl-optimization/83530
19596
19597 * sel-sched.c (force_next_insn): New global variable.
19598 (remove_insn_for_debug): When force_next_insn is true, also leave only
19599 next insn in the ready list.
19600 (sel_sched_region): When the region wasn't scheduled, make another pass
19601 over it with force_next_insn set to 1.
19602
19603 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19604
19605 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19606 into tm_file.
19607 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19608 for interrupt control.
19609 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19610 functions for interrupt control.
19611 * config/nds32/nds32-intrinsic.md: Likewise.
19612 * config/nds32/nds32_intrinsic.h: Likewise.
19613 * config/nds32/nds32.h (nds32_builtins): Likewise.
19614
19615 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19616
19617 * config/nds32/nds32.c (nds32_init_machine_status,
19618 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19619 strict_aligned_p field.
19620 (nds32_expand_to_rtl_hook): New function.
19621 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19622 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19623
19624 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19625 Chung-Ju Wu <jasonwucj@gmail.com>
19626
19627 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19628 * config/nds32/nds32-n7.md: New file.
19629 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19630 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19631 pipeline.
19632 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19633 * config/nds32/nds32.md (pipeline_model): Add n7.
19634 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19635 * config/nds32/pipelines.md: Include n7 settings.
19636
19637 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19638 Chung-Ju Wu <jasonwucj@gmail.com>
19639
19640 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19641 * config/nds32/nds32-e8.md: New file.
19642 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19643 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19644 pipeline.
19645 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19646 * config/nds32/nds32.md (pipeline_model): Add e8.
19647 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19648 * config/nds32/pipelines.md: Include e8 settings.
19649
19650 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19651 Chung-Ju Wu <jasonwucj@gmail.com>
19652
19653 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19654 * config/nds32/nds32-n8.md: New file.
19655 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19656 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19657 pipeline.
19658 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19659 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19660 * config/nds32/nds32.md (pipeline_model): Add n8.
19661 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19662 * config/nds32/pipelines.md: Include n8 settings.
19663
19664 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19665 Chung-Ju Wu <jasonwucj@gmail.com>
19666
19667 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19668 * config/nds32/nds32-n9-2r1w.md: New file.
19669 * config/nds32/nds32-n9-3r2w.md: New file.
19670 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19671 nds32_register_ports): New or modify for cpu n9.
19672 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19673 pipeline.
19674 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19675 * config/nds32/nds32-utils.c: New file.
19676 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19677 TARGET_MUL_SLOW): Define.
19678 * config/nds32/nds32.md (pipeline_model): New attribute.
19679 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19680 New options that support cpu n9.
19681 * config/nds32/pipelines.md: Include n9 settings.
19682 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19683
19684 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19685
19686 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19687 information if necessary.
19688 (output_cond_branch_compare_zero): Likewise.
19689 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19690 (nds32_target_alignment): Refine for alignment.
19691 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19692 (FUNCTION_BOUNDARY): Modify.
19693 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19694 align case.
19695 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19696
19697 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19698
19699 * config/nds32/constants.md (unspec_volatile_element): Add values for
19700 TLB operation and data prefetch.
19701 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19702 functions for TLB operation and data prefetch.
19703 * config/nds32/nds32-intrinsic.md: Likewise.
19704 * config/nds32/nds32_intrinsic.h: Likewise.
19705 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19706 (nds32_print_operand): Likewise.
19707 * config/nds32/nds32.h (nds32_builtins): Likewise.
19708
19709 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19710 Andrew Pinski <pinsika@gcc.gnu.org>
19711
19712 PR middle-end/82976
19713 * match.pd: Use constant_boolean_node of correct type instead of
19714 boolean_true_node or boolean_false_node for simplifying
19715 pointer comparisons to zero.
19716
19717 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19718
19719 PR tree-optimization/80021
19720 * tree.c (verify_type_variant): Make error call in verify_variant_match
19721 translatable and remove final full stop.
19722
19723 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19724
19725 * config/nds32/constants.md (unspec_volatile_element): Add
19726 UNSPEC_VOLATILE_EH_RETURN.
19727 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19728 nds32_output_stack_pop): Support dwarf exception handling process.
19729 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19730 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19731 exception handling process.
19732 (nds32_compute_stack_frame): Likewise.
19733 (nds32_return_addr_rtx): Likewise.
19734 (nds32_initial_elimination_offset): Likewise.
19735 (nds32_expand_prologue): Likewise.
19736 (nds32_expand_epilogue): Likewise.
19737 (nds32_dynamic_chain_address): New function.
19738 * config/nds32/nds32.h (machine_function): Add fields for dwarf
19739 exception handling.
19740 (DYNAMIC_CHAIN_ADDRESS): Define.
19741 (EH_RETURN_DATA_REGNO): Define.
19742 (EH_RETURN_STACKADJ_RTX): Define.
19743 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19744 patterns for dwarf exception handling.
19745
19746 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19747
19748 * config/nds32/nds32.h: Clean up obsolete macros.
19749
19750 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19751
19752 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19753 Add enum values for particular instructions.
19754 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19755 particular intrinsic functions.
19756 * config/nds32/nds32-intrinsic.md: Likewise.
19757 * config/nds32/nds32_intrinsic.h: Likewise.
19758 * config/nds32/nds32.h (nds32_builtins): Likewise.
19759 * config/nds32/nds32.md (type): Add pbsad and pbsada.
19760 (btst, ave): New patterns for particular instructions.
19761
19762 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19763
19764 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19765 Add enum values for atomic load/store and memory sync.
19766 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19767 and memory sync.
19768 * config/nds32/nds32-intrinsic.md: Likewise.
19769 * config/nds32/nds32_intrinsic.h: Likewise.
19770 * config/nds32/nds32.h (nds32_builtins): Likewise.
19771
19772 2018-04-07 Jakub Jelinek <jakub@redhat.com>
19773
19774 PR tree-optimization/85257
19775 * fold-const.c (native_encode_vector): If not all elts could fit
19776 and off is -1, return 0 rather than offset.
19777 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19778 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19779 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
19780 adjust buffer in native_interpret_expr call.
19781
19782 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19783
19784 * config/nds32/constants.md (unspec_volatile_element): Add cache
19785 control enum values.
19786 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
19787 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
19788 * config/nds32/nds32.c (nds32_cctl_names): New.
19789 (nds32_print_operand): Handle cache control register names.
19790 * config/nds32/nds32.h (nds32_builtins): New enum values.
19791 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
19792 macros.
19793 * config/nds32/nds32.md (type): Add mmu.
19794 * config/nds32/pipelines.md (simple_insn): Add mmu.
19795
19796 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19797
19798 * config/nds32/nds32.md (type): Remove call.
19799 * config/nds32/pipelines.md (simple_insn): Likewise.
19800
19801 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19802
19803 * config/nds32/constants.md (unspec_volatile_element): Add
19804 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
19805 UNSPEC_VOLATILE_FMFCFG.
19806 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
19807 description for fmfcfg and fmfcsr.
19808 (bdesc_1arg): Add fmtcsr.
19809 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
19810 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
19811 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
19812 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
19813 unspec_fmfcfg): New patterns.
19814 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
19815 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
19816 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
19817 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
19818 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
19819 __nds32__fmfcfg): Define.
19820
19821 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
19822
19823 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
19824 intrinsic register names.
19825 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
19826 intrinsic register enum values and macros.
19827
19828 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
19829
19830 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
19831 for load/store addressing form.
19832 (nds32_print_operand_address): Likewise.
19833
19834 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
19835
19836 PR target/85196
19837 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
19838 based on LABEL_REF. Remove useless assertion.
19839 (pic_address_needs_scratch): Fix formatting.
19840 (sparc_legitimize_pic_address): Minor tweaks.
19841 (sparc_delegitimize_address): Adjust assertion accordingly.
19842 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
19843 into symbolic_operand.
19844 (movsi_high_pic_label_ref): Likewise.
19845 (movsi_lo_sum_pic_label_ref): Likewise.
19846 (movdi_pic_label_ref): Likewise.
19847 (movdi_high_pic_label_ref): Likewise.
19848 (movdi_lo_sum_pic_label_ref): Likewise.
19849
19850 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
19851
19852 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
19853 custom LIB_SPEC setup.
19854
19855 2018-04-06 Ruslan Bukin <br@bsdpad.com>
19856 Kito Cheng <kito.cheng@gmail.com>
19857
19858 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
19859 * config/riscv/freebsd.h: New.
19860
19861 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19862
19863 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
19864 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
19865 file.
19866
19867 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19868 Kito Cheng <kito.cheng@gmail.com>
19869
19870 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
19871 nds32_output_call, nds32_symbol_binds_local_p): New functions.
19872 * config/nds32/nds32-protos.h (nds32_output_call,
19873 nds32_output_return): Declare.
19874 * config/nds32/nds32.md: Refine all the call and return patterns.
19875
19876 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19877
19878 PR debug/85252
19879 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
19880 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
19881
19882 PR rtl-optimization/84872
19883 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
19884 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
19885 EDGE_CROSSING edge.
19886
19887 2018-04-06 Tamar Christina <tamar.christina@arm.com>
19888
19889 * expr.c (copy_blkmode_to_reg): Revert 254862.
19890 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
19891
19892 2018-04-06 Richard Biener <rguenther@suse.de>
19893
19894 PR middle-end/85244
19895 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
19896 after seeing a component reference with an adjacent field. Treat
19897 refs to arrays at struct end of external decls similar to
19898 refs to unconstrained commons.
19899
19900 2018-04-06 Jakub Jelinek <jakub@redhat.com>
19901
19902 PR sanitizer/85213
19903 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19904 look through SAVE_EXPRs with non-side-effects argument. Adjust
19905 recursive calls.
19906 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19907 save_p here.
19908
19909 2018-04-06 Richard Biener <rguenther@suse.de>
19910
19911 PR middle-end/85180
19912 * alias.c (find_base_term): New wrapper around find_base_term
19913 unwinding CSELIB_VAL_PTR changes.
19914 (find_base_term): Do not restore CSELIB_VAL_PTR during the
19915 recursion.
19916
19917 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19918
19919 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19920 instructions.
19921 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19922 constant definitions.
19923 ("nop"): lr 0,0 -> nopr r0
19924 ("nop_lr0", "nop_lr1"): New insn definitions.
19925
19926 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
19927
19928 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19929 NDS32_V3PUSH_AVAILABLE_P macro.
19930
19931 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
19932 Chung-Ju Wu <jasonwucj@gmail.com>
19933
19934 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19935 (nds32*-*-*): Add float and fpu_config into supported_defaults.
19936 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19937 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19938 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19939 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19940 * config/nds32/constraints.md: New constraints and checking for hard
19941 float configuration.
19942 * config/nds32/iterators.md: New mode iterator and attribute for hard
19943 float configuration.
19944 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19945 patterns.
19946 * config/nds32/nds32-fpu.md: New file.
19947 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19948 deal with hard float code generation.
19949 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19950 ARCH_V3S.
19951 (abi_type, float_reg_number): New enum type.
19952 * config/nds32/nds32-predicates.c: New predicates for hard float.
19953 * config/nds32/nds32-protos.h: Declare functions for hard float.
19954 * config/nds32/nds32.c: Implementation for hard float configuration.
19955 * config/nds32/nds32.h: Definitions for hard float configuration.
19956 * config/nds32/nds32.md: Include hard float machine description and
19957 modify patterns for hard float configuration.
19958 * config/nds32/nds32.opt: New options for hard float configuration.
19959 * config/nds32/predicates.md: New predicates for hard float
19960 configuration.
19961
19962 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
19963
19964 * common/config/nds32/nds32-common.c
19965 (nds32_option_optimization_table): Enable -mreleax-hint by default.
19966
19967 2018-04-05 Jakub Jelinek <jakub@redhat.com>
19968
19969 PR middle-end/85195
19970 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19971 CONSTRUCTOR_ELT (ctor, ...)->value.
19972
19973 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
19974
19975 PR target/85193
19976 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19977
19978 2018-04-05 Tom de Vries <tom@codesourcery.com>
19979
19980 PR target/85204
19981 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19982 cond jump.
19983
19984 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19985 Kito Cheng <kito.cheng@gmail.com>
19986
19987 * config/nds32/constraints.md (U33): Fine-tune checking condition.
19988 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19989 * config/nds32/nds32.h (nds32_16bit_address_type): Add
19990 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19991
19992 2018-04-05 Shiva Chen <shiva0217@gmail.com>
19993 Kito Cheng <kito.cheng@gmail.com>
19994
19995 * config/nds32/constraints.md (Ufe): New memory constraint.
19996 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19997 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19998 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19999 operands.
20000 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20001 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20002
20003 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20004
20005 * config/nds32/nds32.md: Use optimize_size in the condition for
20006 alu-shift instructions.
20007
20008 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20009
20010 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20011
20012 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20013
20014 * config/nds32/nds32.md (negsi2): Refine pattern.
20015
20016 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20017 Chung-Ju Wu <jasonwucj@gmail.com>
20018
20019 * config/nds32/iterators.md (shift_rotate): New code iterator.
20020 (shift): New code attribute.
20021 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20022 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20023 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20024 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20025 bit-wise operations.
20026 (andsi3, *andsi3): Ditto.
20027 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20028 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20029 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20030 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20031 nds32_ior_operand, nds32_xor_operand): New predicates.
20032
20033 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20034
20035 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20036 (addsi3, subsi3): ... this.
20037
20038 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20039
20040 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20041
20042 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20043
20044 * config/nds32/nds32.md: Adjust indention.
20045
20046 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20047
20048 * config/nds32/nds32.md (feature): New attribute.
20049
20050 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20051
20052 * config/nds32/nds32.md (subtype): New attribute.
20053
20054 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20055
20056 PR target/85203
20057 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20058 expansion to perform a bitwise AND of the argument followed by a
20059 boolean negation of the result.
20060
20061 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20062
20063 PR rtl-optimization/84878
20064 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20065 the basic block. Assert the use reference is not artificial and that
20066 it has an associated insn.
20067
20068 2018-04-04 Michael Matz <matz@suse.de>
20069
20070 * builtins.c (compute_objsize): Pass correct operand
20071 to array_at_struct_end_p.
20072
20073 2018-04-04 Richard Biener <rguenther@suse.de>
20074
20075 PR lto/85176
20076 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20077 from contexts for DINFO_LEVEL_TERSE and below.
20078
20079 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20080
20081 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20082 resiter_operand condition.
20083 * config/nds32/nds32.md (*move<mode>): Ditto.
20084
20085 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20086 Monk Chiang <sh.chiang04@gmail.com>
20087
20088 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20089
20090 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20091
20092 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20093
20094 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20095 Kito Cheng <kito.cheng@gmail.com>
20096
20097 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20098 nds32_cond_code_str, output_cond_branch,
20099 output_cond_branch_compare_zero, nds32_expand_cbranch,
20100 nds32_expand_cstore, nds32_expand_movcc,
20101 nds32_output_cbranchsi4_equality_zero,
20102 nds32_output_cbranchsi4_equality_reg,
20103 nds32_output_cbranchsi4_equality_reg_or_const_int,
20104 nds32_output_cbranchsi4_greater_less_zero: New functions.
20105 * config/nds32/nds32-protos.h (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): Declare.
20111 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20112 nds32_rimm11s_operand): New predicates.
20113 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20114 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20115 patterns.
20116
20117 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20118
20119 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20120 * config/nds32/nds32.md: Ditto.
20121 * config/nds32/pipelines.md: Ditto.
20122
20123 2018-04-04 Richard Biener <rguenther@suse.de>
20124
20125 PR tree-optimization/85168
20126 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20127 propagating abnormals.
20128
20129 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20130
20131 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20132
20133 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20134 Kito Cheng <kito.cheng@gmail.com>
20135
20136 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20137 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20138 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20139 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20140 * config/nds32/nds32.md (sibcall_internal): New.
20141 (sibcall_register): Remove.
20142 (sibcall_immediate): Remove.
20143 (sibcall_value_internal): New.
20144 (sibcall_value_register): Remove.
20145 (sibcall_value_immediate): Remove.
20146 * config/nds32/predicates.md (nds32_general_register_operand): New.
20147 (nds32_call_address_operand): New.
20148
20149 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20150
20151 PR rtl-optimization/85167
20152 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20153 bb_defs if *split_p, instead preinitialize it to NULL.
20154
20155 PR tree-optimization/85156
20156 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20157 evaluating the argument multiple times.
20158
20159 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20160
20161 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20162 than vector.
20163 (_mm_cvtpd_ps): Likewise.
20164 (_mm_cvttpd_epi32): Likewise.
20165 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20166 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20167 vector, pixel, and bool following altivec.h include.
20168
20169 2018-04-03 Martin Sebor <msebor@redhat.com>
20170
20171 * doc/extend.texi (Common Function Attributes): Clarify.
20172 (const attribute): Likewise.
20173 (pure attribute): Likewise.
20174
20175 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20176
20177 PR target/85169
20178 * config/i386/i386.c (ix86_expand_vector_set): Use
20179 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20180
20181 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20182
20183 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20184 instructions when changing rounding bits to preserve precision bits
20185 in the x87 control word.
20186
20187 2018-04-03 Martin Liska <mliska@suse.cz>
20188
20189 PR tree-optimization/82491
20190 * rtl.h (strip_offset_and_add): Replace += suboffset with
20191 poly_uint64 () + suboffset.
20192
20193 2018-03-29 Martin Liska <mliska@suse.cz>
20194 Martin Jambor <mjambor@suse.cz>
20195
20196 PR ipa/84947
20197 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20198 param_type is not an integral or pointer type.
20199
20200 2018-04-03 Richard Biener <rguenther@suse.de>
20201
20202 * sese.h (recompute_all_dominators): Remove.
20203
20204 2018-04-02 Martin Sebor <msebor@redhat.com>
20205
20206 * doc/invoke.texi (-Wrestrict): Fix typos.
20207
20208 2018-04-02 Jim Wilson <jimw@sifive.com>
20209
20210 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20211 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20212 (<optab>di3, <optab>si3_extend): Likewise.
20213 (<optab>si3_mask, <optab>si3_mask_1): New.
20214 (<optab>di3_mask, <optab>di3_mask_1): New.
20215 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20216 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20217 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20218
20219 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20220
20221 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20222 example.
20223
20224 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20225
20226 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20227 (nds32_canonicalize_comparison): New function.
20228
20229 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20230 Kito Cheng <kito.cheng@gmail.com>
20231 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20232
20233 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20234 * config/nds32/constants.md (unspec_volatile_element): Add
20235 UNSPEC_VOLATILE_RELAX_GROUP.
20236 * config/nds32/nds32-relax-opt.c: New file.
20237 * config/nds32/nds32-predicates.c
20238 (nds32_symbol_load_store_p): New function.
20239 * config/nds32/nds32-protos.h
20240 (nds32_symbol_load_store_p): Declare function.
20241 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20242 * config/nds32/nds32.c
20243 (nds32_register_pass): New function to register pass.
20244 (nds32_register_passes): New function to register passes.
20245 * config/nds32/nds32.md (relax_group): New pattern.
20246 * config/nds32/nds32.opt (mrelax-hint): New option.
20247 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20248
20249 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20250
20251 * config/nds32/t-nds32: Modify files dependency.
20252
20253 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20254
20255 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20256 (PROFILE_HOOK): Define its implementation.
20257
20258 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20259
20260 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20261 type and 32-bit size.
20262
20263 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20264
20265 PR middle-end/85090
20266 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20267 (V_128_256): New mode iterator.
20268 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20269 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20270 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20271 of V.
20272 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20273 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20274
20275 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20276
20277 PR target/83315
20278 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20279 NaN inputs correctly.
20280
20281 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20282
20283 PR target/80546
20284 * config/rs6000/vsx.md (??r): New mode attribute.
20285 (*vsx_mov<mode>_64bit): Use it.
20286 (*vsx_mov<mode>_32bit): Likewise.
20287
20288 2018-03-30 Martin Sebor <msebor@redhat.com>
20289
20290 PR tree-optimization/84818
20291 * builtins.c (check_access): Use warning_n.
20292
20293 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20294
20295 PR target/83822
20296 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20297 condition.
20298 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20299 condition.
20300
20301 2018-03-30 Julia Koval <julia.koval@intel.com>
20302
20303 PR target/84413
20304 * x86-tune.def (movx, partial_reg_dependency): Enable for
20305 m_SKYLAKE_AVX512.
20306
20307 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20308
20309 PR inline-asm/84985
20310 * lra-constraints.c (process_alt_operands): Move setting
20311 this_alternative_matches below.
20312
20313 2018-03-29 Martin Liska <mliska@suse.cz>
20314
20315 PR lto/84995.
20316 * doc/invoke.texi: Document how LTO works with debug info.
20317 Describe auto-load support of binutils. Mention 'x86-64'
20318 as valid option value of -march option.
20319
20320 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20321
20322 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20323
20324 PR c/85094
20325 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20326 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20327 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20328 checking.
20329
20330 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20331
20332 PR target/84912
20333 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20334 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20335 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20336 for RS6000_BTM_POWERPC64.
20337 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20338 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20339 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20340 definition.
20341 (DIVDE): Use it.
20342 (DIVDEU): Likewise.
20343
20344 2018-03-28 Carl Love <cel@us.ibm.com>
20345
20346 Revert
20347 2017-09-27 Carl Love <cel@us.ibm.com>
20348
20349 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20350 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20351 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20352 fctiw instruction.
20353
20354 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20355
20356 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20357 instead of __vector bool.
20358 (_mm_max_pu8): Likewise.
20359 (_mm_min_pi16): Likewise.
20360
20361 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20362
20363 PR target/84912
20364 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20365 (DIVWEUO): Likewise.
20366 (DIVDEO): Likewise.
20367 (DIVDEUO): Likewise.
20368 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20369 DIVWEUO and DIVDEUO.
20370 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20371 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20372 (div_extend): Likewise.
20373 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20374 builtin function.
20375 (__builtin_divweuo): Likewise.
20376 (__builtin_divdeo): Likewise.
20377 (__builtin_divdeuo): Likewise.
20378
20379 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20380
20381 PR target/85095
20382 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20383 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20384
20385 PR tree-optimization/82004
20386 * gimple-match-head.c (optimize_pow_to_exp): New function.
20387 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20388 Don't fold to exp if optimize_pow_to_exp is false.
20389
20390 2018-03-28 Martin Liska <mliska@suse.cz>
20391
20392 PR other/84819
20393 * calls.c (initialize_argument_information): Fix trailing space.
20394 * common.opt: Fix typo and provide better explanation for
20395 -fsanitize-coverage option.
20396 * config/i386/i386.opt: Fix typo.
20397
20398 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20399 Martin Liska <mliska@suse.cz>
20400
20401 PR sanitizer/85081
20402 * gimplify.c (asan_poison_variable): Don't do the check for
20403 gimplify_omp_ctxp here.
20404 (gimplify_decl_expr): Do it here.
20405 (gimplify_target_expr): Likewise.
20406
20407 2018-03-28 Martin Liska <mliska@suse.cz>
20408
20409 PR target/84988
20410 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20411 chkp_type_bounds_count if MPX is not enabled.
20412
20413 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20414
20415 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20416
20417 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20418
20419 PR target/84914
20420 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20421 function to create the function decl for complex long double
20422 multiply and divide for -mabi=ieeelongdouble.
20423 (init_float128_ieee): Call it.
20424
20425 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20426
20427 PR target/85044
20428 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20429 -fcf-protection=branch -mibt.
20430 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20431
20432 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20433
20434 PR target/81863
20435 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20436 arm_word_relocations.
20437
20438 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20439
20440 PR target/85056
20441 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20442 extern array declarations.
20443
20444 2018-03-27 Richard Biener <rguenther@suse.de>
20445
20446 PR middle-end/84067
20447 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20448 explicit single_use checks.
20449
20450 2018-03-27 Richard Biener <rguenther@suse.de>
20451
20452 PR tree-optimization/85082
20453 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20454 Valueize the VUSE.
20455
20456 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20457
20458 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20459 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20460 Turn on fasynchronous-unwind-tables and funwind-tables.
20461
20462 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20463
20464 PR target/85073
20465 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20466 (*bmi_blsr_<mode>_ccz): Ditto.
20467
20468 2018-03-26 Tom de Vries <tom@codesourcery.com>
20469
20470 PR tree-optimization/85063
20471 * omp-general.c (offloading_function_p): New function. Factor out
20472 of ...
20473 * omp-offload.c (pass_omp_target_link::gate): ... here.
20474 * omp-general.h (offloading_function_p): Declare.
20475 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20476 with attribute omp declare target for offloading functions.
20477
20478 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20479
20480 PR tree-optimization/84005
20481 * tree-data-ref.h (get_base_for_alignment): Declare.
20482 * tree-data-ref.c (get_base_for_alignment_1): New function.
20483 (get_base_for_alignment): Likewise.
20484 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20485 get_base_for_alignment to find a suitable base object, instead
20486 of always using drb->base_address.
20487
20488 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20489
20490 PR inline-asm/85022
20491 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20492 known size by default.
20493
20494 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20495
20496 PR inline-asm/85030
20497 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20498 and non BLKmode operands.
20499
20500 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20501
20502 PR target/85026
20503 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20504 Clean up attributes.
20505
20506 2018-03-23 Richard Biener <rguenther@suse.de>
20507
20508 PR debug/85020
20509 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20510 we are going to emit early debug for LTO.
20511
20512 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20513
20514 PR inline-asm/85034
20515 * function.c (match_asm_constraints_1): Don't optimize if input
20516 doesn't satisfy general_operand predicate for output's mode.
20517
20518 PR inline-asm/85022
20519 * alias.c (write_dependence_p): Don't require for x_canonicalized
20520 non-VOIDmode if x has VOIDmode.
20521
20522 PR sanitizer/85029
20523 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20524 just don't try to optimize it rather than assert it never happens.
20525
20526 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20527
20528 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20529 macro expansions for definition of ST_INTERNAL_<mode> and
20530 LD_INTERNAL_<mode> builtins.
20531 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20532 Remove prototype.
20533 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20534 function.
20535 (altivec_expand_st_builtin): Likewise.
20536 (altivec_expand_builtin): Remove calls to deleted functions.
20537 (rs6000_address_for_altivec): Delete this function.
20538 * config/rs6000/vector.md: Remove expands for
20539 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20540
20541 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20542
20543 PR target/84826
20544 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20545 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20546 re-computing once computed.
20547 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20548 (arm_init_machine_status): Initialize
20549 machine->static_chain_stack_bytes.
20550
20551 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20552
20553 PR target/84760
20554 * doc/extend.texi: Add four new prototypes for vec_ld.
20555 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20556 definitions for more logical presentation.
20557 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20558 entries for V1TI variants of __builtin_altivec_ld builtin.
20559 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20560 handling of V1TI variant of LVX icode pattern.
20561 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20562 (rs6000_gimple_fold_builtin): Likewise.
20563 (altivec_init_builtins): Add code to define
20564 __builtin_altivec_lvx_v1ti function.
20565
20566 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20567
20568 PR inline-asm/84941
20569 * function.c (match_asm_constraints_1): Don't do the optimization
20570 if input isn't a REG, SUBREG, MEM or constant.
20571
20572 2018-03-22 Tom de Vries <tom@codesourcery.com>
20573
20574 PR tree-optimization/84956
20575 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20576 bb_has_abnormal_pred.
20577
20578 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20579
20580 PR sanitizer/85018
20581 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20582 DECL_INITIAL (decl) to decl at the end.
20583 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20584 adjust the comment.
20585
20586 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20587
20588 * doc/extend.texi (__builtin_tgmath): Document when complex
20589 integer types are treated as _Complex _Float64.
20590
20591 2018-03-21 Tom de Vries <tom@codesourcery.com>
20592
20593 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20594
20595 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20596
20597 PR tree-optimization/84960
20598 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20599 if it is ENTRY block, move them into single succ of ENTRY in that case.
20600
20601 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20602
20603 PR tree-optimization/84811
20604 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20605 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20606 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20607 (known_subrange_p): Update accordingly. Cast each value involved
20608 in the size comparison, rather than casting the result of the
20609 subtraction.
20610
20611 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20612
20613 PR tree-optimization/84982
20614 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20615 by flipping the least significant bit rather than all bits from
20616 bitpos to bitpos + bitsize - 1.
20617
20618 2018-03-21 Nathan Sidwell <nathan@acm.org>
20619
20620 * doc/extend.texi (Deprecated Features): Remove mention of
20621 long-deleted deprecations.
20622
20623 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20624
20625 PR jit/84288
20626 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20627 * configure: Regenerate.
20628
20629 2018-03-21 Tom de Vries <tom@codesourcery.com>
20630
20631 PR tree-optimization/83126
20632 * tree-parloops.c (num_phis): New function.
20633 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20634
20635 2018-03-21 Nathan Sidwell <nathan@acm.org>
20636
20637 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20638 mention anon-struct/union members and trailing attributes.
20639
20640 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20641
20642 PR tree-optimization/84969
20643 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20644 builtin memset partitions if they set different rhs values.
20645
20646 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20647
20648 PR rtl-optimization/84989
20649 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20650 VEC_DUPLICATE with scalar result mode.
20651
20652 2018-03-21 Martin Liska <mliska@suse.cz>
20653
20654 PR ipa/84963
20655 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20656 not intended return statement.
20657
20658 2018-03-21 Martin Liska <mliska@suse.cz>
20659
20660 PR target/84988
20661 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20662 (chkp_find_bound_slots_1): Limit number of iterations.
20663
20664 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20665
20666 PR target/84838
20667 * Minor grammar fixes for x86 options.
20668
20669 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20670
20671 PR debug/84875
20672 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20673 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20674
20675 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20676
20677 PR target/83789
20678 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20679 (altivec_lvx_<mode>_1op): Likewise.
20680 (altivec_stvx_<mode>_2op): Likewise.
20681 (altivec_stvx_<mode>_1op): Likewise.
20682 (altivec_lvx_<VM2:mode>): New define_expand.
20683 (altivec_stvx_<VM2:mode>): Likewise.
20684 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20685 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20686 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20687 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20688 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20689 (rs6000_gen_lvx): Likewise.
20690 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20691 (altivec_expand_stv_builtin): Likewise.
20692 (altivec_expand_builtin): Likewise.
20693 * config/rs6000/vector.md: Likewise.
20694
20695 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20696
20697 PR target/82518
20698 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20699 BYTES_BIG_ENDIAN.
20700
20701 2018-03-20 Richard Biener <rguenther@suse.de>
20702
20703 PR target/84986
20704 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20705 sign-conversions as zero, fall back to standard scalar_stmt
20706 cost for the rest.
20707
20708 2018-03-20 Martin Liska <mliska@suse.cz>
20709
20710 PR ipa/84825
20711 * predict.c (rebuild_frequencies): Handle case when we have
20712 PROFILE_ABSENT, but flag_guess_branch_prob is false.
20713
20714 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20715
20716 PR target/84990
20717 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20718 flag_section_anchors.
20719 * varasm.c (use_blocks_for_decl_p): Remove hack for
20720 dw2_force_const_mem.
20721
20722 PR target/84845
20723 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20724 to ...
20725 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
20726 be created, use lowpart_subreg of operands[0] rather than operands[0]
20727 itself.
20728 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20729 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20730 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20731 and n constraint instead of aarch64_shift_imm_di and Usd.
20732 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20733 (*aarch64_<optab>_reg_minus<mode>3): ... this.
20734
20735 2018-03-20 Sudakshina Das <sudi.das@arm.com>
20736
20737 PR target/82989
20738 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20739 to favor GPR over NEON registers.
20740 (<shift>di3_neon): Likewise.
20741
20742 2018-03-20 Tom de Vries <tom@codesourcery.com>
20743
20744 PR target/84952
20745 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20746 (nvptx_process_pars): Emit bar.sync asap and alap.
20747
20748 2018-03-20 Tom de Vries <tom@codesourcery.com>
20749
20750 PR target/84954
20751 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20752 seen_label if seen_label is already set.
20753
20754 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20755
20756 PR target/84945
20757 * config/i386/i386.c (fold_builtin_cpu): For features above 31
20758 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20759 Use 1U instead of 1. Formatting fixes.
20760
20761 PR c/84953
20762 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20763 instead of TREE_TYPE (s1) for the return value.
20764
20765 2018-03-19 Jakub Jelinek <jakub@redhat.com>
20766
20767 PR tree-optimization/84946
20768 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20769 bitsize + bitsize in poly_uint64 rather than poly_int64.
20770
20771 PR sanitizer/78651
20772 * dwarf2asm.c: Include fold-const.c.
20773 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20774 of decl rather than decl itself.
20775
20776 PR rtl-optimization/84643
20777 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20778
20779 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
20780
20781 PR sanitizer/78651
20782 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
20783 calling assemble_variable.
20784
20785 2018-03-19 Sudakshina Das <sudi.das@arm.com>
20786
20787 PR target/81647
20788 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
20789 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
20790
20791 2018-03-19 Jim Wilson <jimw@sifive.com>
20792
20793 PR bootstrap/84856
20794 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
20795 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
20796 (riscv_first_stack_step): Likewise.
20797 (riscv_option_override): Use STACK_BOUNDARY instead of
20798 MIN_STACK_BOUNDARY.
20799 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
20800 MIN_STACK_BOUNDARY.
20801 (BIGGEST_ALIGNMENT): Set to 128.
20802 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
20803 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
20804 STACK_BOUNDARY.
20805
20806 2018-03-19 Richard Biener <rguenther@suse.de>
20807
20808 PR tree-optimization/84933
20809 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
20810 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
20811
20812 2018-03-19 Richard Biener <rguenther@suse.de>
20813
20814 PR tree-optimization/84859
20815 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
20816 (cond_if_else_store_replacement): Perform sinking operation on
20817 single-store BBs regardless of MAX_STORES_TO_SINK setting.
20818 Generalize what a BB with a single eligible store is.
20819
20820 2018-03-19 Richard Biener <rguenther@suse.de>
20821
20822 PR tree-optimization/84929
20823 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
20824 chrec_is_positive against non-chrec arg.
20825
20826 2018-03-19 Tamar Christina <tamar.christina@arm.com>
20827
20828 PR target/84711
20829 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
20830
20831 2018-03-18 Martin Liska <mliska@suse.cz>
20832
20833 PR rtl-optimization/84635
20834 * regrename.c (build_def_use): Use matches_mode only when
20835 matches >= 0.
20836
20837 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
20838
20839 PR tree-optimization/84913
20840 * tree-vect-loop.c (vectorizable_reduction): Don't try to
20841 vectorize chains of COND_EXPRs.
20842
20843 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20844
20845 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
20846
20847 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20848
20849 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
20850
20851 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
20852
20853 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
20854
20855 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20856 Kito Cheng <kito.cheng@gmail.com>
20857
20858 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
20859 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
20860 (nds32_adjust_reg_alloc_order): New function.
20861 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
20862
20863 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
20864
20865 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
20866 nds32_print_operand, nds32_print_operand_address): Use
20867 HOST_WIDE_INT_PRINT_DEC instead.
20868
20869 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
20870
20871 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
20872
20873 2018-03-17 Jakub Jelinek <jakub@redhat.com>
20874
20875 PR target/84902
20876 * config/i386/i386.c (initial_ix86_tune_features,
20877 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
20878 unsigned long long.
20879 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
20880 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
20881 rather than 1u << ix86_tune. Formatting fix.
20882 (ix86_option_override_internal): Change ix86_arch_mask from
20883 unsigned int to unsigned HOST_WIDE_INT, initialize to
20884 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
20885 (ix86_function_specific_restore): Likewise.
20886
20887 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20888
20889 PR target/84899
20890 * postreload.c (reload_combine_recognize_pattern): Perform
20891 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
20892 truncate_int_for_mode the result for the destination's mode.
20893
20894 PR c/84909
20895 * hsa-gen.c (mem_type_for_type): Fix comment typo.
20896 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
20897 Likewise.
20898 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20899 Likewise.
20900
20901 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
20902
20903 PR target/84876
20904 * lra-assigns.c (lra_split_hard_reg_for): Don't use
20905 regno_allocno_class_array and sorted_pseudos.
20906 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20907 insns where regno is used.
20908
20909 2018-03-16 Martin Liska <mliska@suse.cz>
20910
20911 PR ipa/84833
20912 * multiple_target.c (create_dispatcher_calls): Redirect
20913 reference in the symbol table.
20914
20915 2018-03-16 Martin Liska <mliska@suse.cz>
20916
20917 PR ipa/84722
20918 * multiple_target.c (create_dispatcher_calls): Redirect also
20919 an alias.
20920
20921 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20922
20923 PR c++/79937
20924 PR c++/82410
20925 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20926 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20927 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20928
20929 2018-03-16 Julia Koval <julia.koval@intel.com>
20930
20931 * doc/invoke.texi (Skylake Server): Add CLWB.
20932 Cannonlake): Remove CLWB.
20933
20934 2018-03-16 Jakub Jelinek <jakub@redhat.com>
20935
20936 PR tree-optimization/84841
20937 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20938 1 << 3.
20939 (FLOAT_ONE_CONST_TYPE): Define.
20940 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20941 (sort_by_operand_rank): Put entries with higher constant_type last
20942 rather than first to match comments.
20943
20944 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
20945
20946 * config/nios2/nios2.md (movsi_internal): Fix thinko in
20947 split predicate.
20948
20949 2018-03-15 Jakub Jelinek <jakub@redhat.com>
20950
20951 PR c++/79085
20952 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20953 check and use address of target always.
20954
20955 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
20956
20957 PR target/84574
20958 * config/i386/i386.c (indirect_thunk_needed): Update comments.
20959 (indirect_thunk_bnd_needed): Likewise.
20960 (indirect_thunks_used): Likewise.
20961 (indirect_thunks_bnd_used): Likewise.
20962 (indirect_return_needed): New.
20963 (indirect_return_bnd_needed): Likewise.
20964 (output_indirect_thunk_function): Add a bool argument for
20965 function return.
20966 (output_indirect_thunk_function): Don't generate alias for
20967 function return thunk.
20968 (ix86_code_end): Call output_indirect_thunk_function to generate
20969 function return thunks.
20970 (ix86_output_function_return): Set indirect_return_bnd_needed
20971 and indirect_return_needed instead of indirect_thunk_bnd_needed
20972 and indirect_thunk_needed.
20973
20974 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
20975
20976 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20977 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20978 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20979
20980 2018-03-15 David Malcolm <dmalcolm@redhat.com>
20981 Paul Hua <paul.hua.gm@gmail.com>
20982
20983 PR c/84852
20984 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20985
20986 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
20987
20988 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20989 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20990 resp. SFmode cases.
20991
20992 2018-03-15 Tamar Christina <tamar.christina@arm.com>
20993
20994 PR target/84711
20995 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20996 instead of GET_MODE_SIZE when comparing Units.
20997
20998 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20999
21000 PR target/68256
21001 * varasm.c (hash_section): Return an unchangeble hash value
21002 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21003 Return !aarch64_can_use_per_function_literal_pools_p ().
21004
21005 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21006
21007 PR target/84860
21008 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21009 rather than address of cmode as last argument to prepare_cmp_insn.
21010
21011 2018-03-15 Julia Koval <julia.koval@intel.com>
21012
21013 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21014 F_AVX512VNNI, F_AVX512BITALG): New.
21015
21016 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21017
21018 PR target/83451
21019 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21020 insn for floating-point loads and stores.
21021
21022 2018-03-14 Carl Love <cel@us.ibm.com>
21023
21024 * config/rs6000/rs6000-c.c: Add macro definitions for
21025 ALTIVEC_BUILTIN_VEC_PERMXOR.
21026 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21027 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21028 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21029 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21030 UNSPEC_VPERMXOR.
21031 * config/doc/extend.texi: Add prototypes for vec_permxor.
21032
21033 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21034
21035 PR c/84852
21036 * diagnostic-show-locus.c (class layout_point): Convert m_line
21037 from int to linenum_type.
21038 (line_span::comparator): Use linenum "compare" function when
21039 comparing line numbers.
21040 (test_line_span): New function.
21041 (layout_range::contains_point): Convert param "row" from int to
21042 linenum_type.
21043 (layout_range::intersects_line_p): Likewise.
21044 (layout::will_show_line_p): Likewise.
21045 (layout::print_source_line): Likewise.
21046 (layout::should_print_annotation_line_p): Likewise.
21047 (layout::print_annotation_line): Likewise.
21048 (layout::print_leading_fixits): Likewise.
21049 (layout::annotation_line_showed_range_p): Likewise.
21050 (struct line_corrections): Likewise for field m_row.
21051 (line_corrections::line_corrections): Likewise for param "row".
21052 (layout::print_trailing_fixits): Likewise.
21053 (layout::get_state_at_point): Likewise.
21054 (layout::get_x_bound_for_row): Likewise.
21055 (layout::print_line): Likewise.
21056 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21057 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21058 * input.c (selftest::test_linenum_comparisons): New function.
21059 (selftest::input_c_tests): Call it.
21060 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21061 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21062 * selftest.h (ASSERT_GT): New macro.
21063 (ASSERT_GT_AT): New macro.
21064 (ASSERT_LT): New macro.
21065 (ASSERT_LT_AT): New macro.
21066
21067 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21068
21069 PR rtl-optimization/84780
21070 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21071
21072 2018-03-14 Martin Liska <mliska@suse.cz>
21073
21074 * tree.c (record_node_allocation_statistics): Use
21075 get_stats_node_kind.
21076 (get_stats_node_kind): New function extracted from
21077 record_node_allocation_statistics.
21078 (free_node): Use get_stats_node_kind.
21079
21080 2018-03-14 Richard Biener <rguenther@suse.de>
21081
21082 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21083 that the value-set of ANTIC_IN doesn't grow.
21084
21085 Revert
21086 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21087 member.
21088 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21089 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21090
21091 2018-03-14 Julia Koval <julia.koval@intel.com>
21092
21093 * config.gcc (icelake-client, icelake-server): New.
21094 (icelake): Remove.
21095 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21096 (initial_ix86_arch_features): Ditto.
21097 (PTA_SKYLAKE): Add SGX.
21098 (PTA_ICELAKE): Remove.
21099 (PTA_ICELAKE_CLIENT): New.
21100 (PTA_ICELAKE_SERVER): New.
21101 (ix86_option_override_internal): Split up icelake on icelake client and
21102 icelake server.
21103 (get_builtin_code_for_version): Ditto.
21104 (fold_builtin_cpu): Ditto.
21105 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21106 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21107 * config/i386/i386.h (processor_type): Ditto.
21108 * doc/invoke.texi: Ditto.
21109
21110 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21111
21112 PR sanitizer/83392
21113 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21114 INTEGER_CST offset, add it together with bitpos / 8 and
21115 sign extend based on POINTER_SIZE.
21116
21117 PR target/84844
21118 Revert
21119 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21120
21121 PR target/78090
21122 * config/i386/constraints.md (Yc): New register constraint.
21123 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21124 Use Yc constraint for alternative 2 of operand 0. Remove
21125 preferred_for_speed attribute.
21126
21127 2018-03-14 Richard Biener <rguenther@suse.de>
21128
21129 PR tree-optimization/84830
21130 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21131 with the old one to avoid oscillations.
21132
21133 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21134
21135 PR target/83712
21136 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21137 pseudos.
21138 (assign_by_spills): Return a flag of reload assignment failure.
21139 Do not process the reload assignment failures. Do not spill other
21140 reload pseudos if they has the same reg class. Update n if
21141 necessary.
21142 (lra_assign): Add a return arg. Set up from the result of
21143 assign_by_spills call.
21144 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21145 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21146 usage_insns if it is not NULL.
21147 (spill_hard_reg_in_range): New function.
21148 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21149 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21150 function prototypes.
21151 (lra_assign): Change prototype.
21152 * lra.c (lra): Add code to deal with fails by splitting hard reg
21153 live ranges.
21154
21155 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21156
21157 * config/riscv/riscv.opt (mrelax): New option.
21158 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21159 "norelax" when riscv_mrelax is disabled.
21160 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21161
21162 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21163
21164 PR target/84743
21165 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21166 reassociation for int modes.
21167
21168 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21169
21170 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21171 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21172 for big-endian.
21173 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21174 * config/aarch64/aarch64-sve.md
21175 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21176 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21177 (*extend<mode><Vwide>2): Rename to...
21178 (aarch64_sve_extend<mode><Vwide>2): ...this.
21179 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21180 renaming the old pattern to...
21181 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21182 unsigned packs.
21183 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21184 define_expand, renaming the old pattern to...
21185 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21186 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21187 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21188 account when deciding which SVE instruction the optab should use.
21189 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21190
21191 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21192
21193 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21194 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21195 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21196 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21197 (tlsdesc_small_<mode>): Turn a define_expand and use
21198 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21199 (tlsdesc_small_advsimd_<mode>): ...this.
21200 (tlsdesc_small_sve_<mode>): New pattern.
21201
21202 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21203
21204 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21205 (UNSPEC_UMUL_HIGHPART): New constants.
21206 (MUL_HIGHPART): New int iteraor.
21207 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21208 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21209 define_expand.
21210 (*<su>mul<mode>3_highpart): New define_insn.
21211
21212 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21213
21214 PR lto/84805
21215 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21216 incomplete types.
21217
21218 2018-03-13 Martin Liska <mliska@suse.cz>
21219
21220 PR ipa/84658.
21221 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21222 vector.
21223 (sem_item_optimizer::~sem_item_optimizer): Release it.
21224 (sem_item_optimizer::merge_classes): Register variable aliases.
21225 (sem_item_optimizer::fixup_pt_set): New function.
21226 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21227 * ipa-icf.h: Declare new variables and functions.
21228
21229 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21230
21231 PR middle-end/84834
21232 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21233 integer_pow2p@2 and test integer_pow2p in condition.
21234 (A < 0 ? C : 0): Similarly for @1.
21235
21236 PR middle-end/84831
21237 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21238 characters starting at p contain '\0' character, don't look beyond
21239 that.
21240
21241 PR target/84827
21242 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21243 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21244
21245 PR target/84828
21246 * reg-stack.c (change_stack): Change update_end var from int to
21247 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21248 also call set_block_for_insn on the newly added insns and rescan.
21249
21250 PR target/84786
21251 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21252 on the last operand.
21253
21254 PR c++/84704
21255 * tree.c (stabilize_reference_1): Return save_expr (e) for
21256 STATEMENT_LIST even if it doesn't have side-effects.
21257
21258 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21259
21260 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21261
21262 2018-03-12 Renlin Li <renlin.li@arm.com>
21263
21264 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21265 aarch64_output_scalar_simd_mov_immediate.
21266
21267 2018-03-12 Martin Sebor <msebor@redhat.com>
21268
21269 PR tree-optimization/83456
21270 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21271 for perfectly overlapping calls to memcpy.
21272 (gimple_fold_builtin_memory_chk): Same.
21273 (gimple_fold_builtin_strcpy): Handle no-warning.
21274 (gimple_fold_builtin_stxcpy_chk): Same.
21275 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21276
21277 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21278
21279 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21280 parameter. Use it for SFmode.
21281 (rs6000_function_arg_advance_1): Adjust.
21282 (rs6000_function_arg): Adjust.
21283 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21284
21285 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21286
21287 PR rtl-optimization/84169
21288 PR rtl-optimization/84780
21289 * combine.c (can_combine_p): Check for a 2-insn combination whether
21290 the destination register is used between the two insns, too.
21291
21292 2018-03-12 Richard Biener <rguenther@suse.de>
21293
21294 PR tree-optimization/84803
21295 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21296 for refs DR analysis didn't process.
21297
21298 2018-03-12 Richard Biener <rguenther@suse.de>
21299
21300 PR tree-optimization/84777
21301 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21302 force-vectorize loops ignore whether we are optimizing for size.
21303
21304 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21305
21306 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21307 (TARGET_MD_ASM_ADJUST): Define.
21308
21309 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21310 Kito Cheng <kito.cheng@gmail.com>
21311 Chung-Ju Wu <jasonwucj@gmail.com>
21312
21313 * config/nds32/nds32.c (nds32_compute_stack_frame,
21314 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21315 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21316 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21317 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21318 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21319 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21320 * config/nds32/nds32.md (prologue, epilogue): Use macro
21321 NDS32_V3PUSH_AVAILABLE_P to do checking.
21322
21323 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21324
21325 PR debug/58150
21326 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21327 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21328 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21329 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21330 addition of most attributes on !orig_type_die or the attribute not
21331 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21332
21333 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21334 Chung-Ju Wu <jasonwucj@gmail.com>
21335
21336 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21337 __NDS32_VH__ macro.
21338 * config/nds32/nds32.opt (mvh): New option.
21339
21340 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21341 Chung-Ju Wu <jasonwucj@gmail.com>
21342
21343 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21344 function.
21345 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21346 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21347 definition.
21348
21349 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21350 Chung-Ju Wu <jasonwucj@gmail.com>
21351
21352 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21353 function.
21354 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21355 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21356
21357 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21358 Kito Cheng <kito.cheng@gmail.com>
21359 Chung-Ju Wu <jasonwucj@gmail.com>
21360
21361 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21362 UNSPEC_FFMISM and UNSPEC_FLMISM.
21363 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21364 for ffb, ffmism and flmism.
21365 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21366 (unspec_ffmism): Ditto.
21367 (unspec_flmism): Ditto.
21368 (nds32_expand_builtin_impl): Check if string extension is available.
21369 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21370 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21371
21372 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21373
21374 Reverting patch:
21375 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21376
21377 PR target/83712
21378 * lra-assigns.c (assign_by_spills): Return a flag of reload
21379 assignment failure. Do not process the reload assignment
21380 failures. Do not spill other reload pseudos if they has the same
21381 reg class.
21382 (lra_assign): Add a return arg. Set up from the result of
21383 assign_by_spills call.
21384 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21385 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21386 usage_insns if it is not NULL.
21387 (spill_hard_reg_in_range): New function.
21388 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21389 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21390 function prototypes.
21391 (lra_assign): Change prototype.
21392 * lra.c (lra): Add code to deal with fails by splitting hard reg
21393 live ranges.
21394
21395 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21396
21397 PR target/84807
21398 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21399
21400 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21401
21402 PR debug/84620
21403 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21404 (dw_val_node): Add val_symbolic_view.
21405 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21406 (symview_upper_bound): New.
21407 (new_line_info_table): Initialize symviews_since_reset.
21408 (dwarf2out_source_line): Count symviews_since_reset and set
21409 symview_upper_bound.
21410 (dw_val_equal_p): Handle symview.
21411 (add_AT_symview): New.
21412 (print_dw_val): Handle symview.
21413 (attr_checksum, attr_checksum_ordered): Likewise.
21414 (same_dw_val_p, size_of_die): Likewise.
21415 (value_format, output_die): Likewise.
21416 (add_high_low_attributes): Use add_AT_symview for entry_view.
21417 (dwarf2out_finish): Reset symview_upper_bound, clear
21418 zero_view_p.
21419
21420 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21421
21422 PR target/83969
21423 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21424 Add strict argument and use it.
21425 (rs6000_split_multireg_move): Update for new strict argument.
21426 (mem_operand_gpr): Disallow all non-offsettable addresses.
21427 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21428
21429 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21430
21431 PR target/84772
21432 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21433 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21434 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21435
21436 PR c++/84767
21437 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21438 decl, use remap_type if we want to use the type.
21439
21440 2018-03-09 Martin Sebor <msebor@redhat.com>
21441
21442 PR tree-optimization/84526
21443 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21444 Remove dead code.
21445 (builtin_access::generic_overlap): Be prepared to handle non-array
21446 base objects.
21447
21448 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21449
21450 PR rtl-optimization/84682
21451 * lra-constraints.c (process_address_1): Check is_address flag
21452 for address constraints.
21453 (process_alt_operands): Likewise.
21454 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21455 preprocess_constraints.
21456 * recog.h (preprocess_constraints): Add oploc parameter.
21457 Adjust callers.
21458 * recog.c (preprocess_constraints): Test address_operand for
21459 CT_ADDRESS constraints.
21460
21461 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21462
21463 PR target/83712
21464 * lra-assigns.c (assign_by_spills): Return a flag of reload
21465 assignment failure. Do not process the reload assignment
21466 failures. Do not spill other reload pseudos if they has the same
21467 reg class.
21468 (lra_assign): Add a return arg. Set up from the result of
21469 assign_by_spills call.
21470 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21471 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21472 usage_insns if it is not NULL.
21473 (spill_hard_reg_in_range): New function.
21474 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21475 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21476 function prototypes.
21477 (lra_assign): Change prototype.
21478 * lra.c (lra): Add code to deal with fails by splitting hard reg
21479 live ranges.
21480
21481 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21482
21483 PR target/83193
21484 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21485 Accept complain bool parameter. Only emit errors if it is true.
21486 (arm_parse_cpu_option_name): Likewise.
21487 (arm_target_thumb_only): Adjust callers of the above.
21488 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21489 prototype to take a default true bool parameter.
21490 (arm_parse_arch_option_name): Likewise.
21491
21492 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21493 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21494
21495 PR jit/64089
21496 PR jit/84288
21497 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21498 * configure: Regenerate.
21499 * configure.ac ("linker --version-script option"): New.
21500 ("linker soname option"): New.
21501
21502 2018-03-09 Richard Biener <rguenther@suse.de>
21503
21504 PR tree-optimization/84775
21505 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21506 immediate uses of predicate stmts and mark them modified.
21507
21508 Revert
21509 PR tree-optimization/84178
21510 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21511 to caller.
21512 (version_loop_for_if_conversion): Delay update_ssa call.
21513 (tree_if_conversion): Delay update_ssa until after predicate
21514 insertion.
21515
21516 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21517
21518 PR target/84763
21519 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21520 when the function accesses prior frames.
21521
21522 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21523
21524 PR debug/84456
21525 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21526 gen_llsym, otherwise call maybe_gen_llsym.
21527
21528 PR inline-asm/84742
21529 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21530 has ',' character inside of it.
21531
21532 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21533
21534 PR target/84748
21535 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21536 as clobbering CC_REGNUM.
21537
21538 2018-03-08 Richard Biener <rguenther@suse.de>
21539
21540 PR middle-end/84552
21541 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21542 (follow_copies_to_constant): Do not follow SSA names registered
21543 for update.
21544
21545 2018-03-08 Richard Biener <rguenther@suse.de>
21546
21547 PR tree-optimization/84178
21548 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21549 to caller.
21550 (version_loop_for_if_conversion): Delay update_ssa call.
21551 (tree_if_conversion): Delay update_ssa until after predicate
21552 insertion.
21553
21554 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21555
21556 PR tree-optimization/84178
21557 * tree-if-conv.c (release_bb_predicate): Remove the
21558 the assertion that the stmts have NULL use_ops.
21559 Discard the statements, asserting that they haven't
21560 yet been added to a BB.
21561
21562 2018-03-08 Richard Biener <rguenther@suse.de>
21563
21564 PR tree-optimization/84746
21565 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21566 (phi_translate): Pass in destination ANTIC_OUT set.
21567 (phi_translate_1): Likewise. For a simplified result lookup
21568 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21569 (phi_translate_set): Adjust.
21570 (do_pre_regular_insertion): Likewise.
21571 (do_pre_partial_partial_insertion): Likewise.
21572
21573 2018-03-08 Martin Liska <mliska@suse.cz>
21574
21575 PR gcov-profile/84735
21576 * doc/gcov.texi: Document usage of profile files.
21577 * gcov-io.h: Document changes in the format.
21578
21579 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21580
21581 PR debug/84404
21582 PR debug/84408
21583 * dwarf2out.c (struct dw_line_info_table): Update comments for
21584 view == -1.
21585 (FORCE_RESET_NEXT_VIEW): New.
21586 (FORCE_RESETTING_VIEW_P): New.
21587 (RESETTING_VIEW_P): Check for -1 too.
21588 (ZERO_VIEW_P): Likewise.
21589 (new_line_info_table): Force-reset next view.
21590 (dwarf2out_begin_function): Likewise.
21591 (dwarf2out_source_line): Simplify zero_view_p initialization.
21592 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21593 view directly. Omit view when omitting .loc at line 0.
21594
21595 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21596
21597 PR tree-optimization/84740
21598 * tree-switch-conversion.c (process_switch): Call build_constructors
21599 only if info.phi_count is non-zero.
21600
21601 PR tree-optimization/84739
21602 * tree-tailcall.c (find_tail_calls): Check call arguments against
21603 DECL_ARGUMENTS (current_function_decl) rather than
21604 DECL_ARGUMENTS (func) when checking for tail recursion.
21605
21606 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21607
21608 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21609 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21610 Volker Reichelt's entry and add entries for people that perform
21611 GCC fuzzy testing and report numerous bugs.
21612
21613 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21614
21615 PR target/82411
21616 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21617 readonly data in sdata, if that is disabled.
21618 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21619 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21620 -mreadonly-in-sdata option.
21621
21622 2018-03-07 Martin Sebor <msebor@redhat.com>
21623
21624 PR tree-optimization/84468
21625 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21626 basic block when looking for nul assignment.
21627
21628 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21629
21630 PR target/84277
21631 * except.h (output_function_exception_table): Adjust prototype.
21632 * except.c (output_function_exception_table): Remove FNNAME parameter
21633 and add SECTION parameter. Ouput one part of the table at a time.
21634 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21635 the first part of the exception table and emit unwind directives.
21636 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21637 (i386_pe_seh_cold_init): Likewise.
21638 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21639 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21640 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21641 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21642 * config/i386/winnt.c: Include except.h.
21643 (struct seh_frame_state): Add reg_offset, after_prologue and
21644 in_cold_section fields.
21645 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21646 (i386_pe_seh_cold_init): New function.
21647 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21648 to seh->in_cold_section.
21649 (seh_emit_push): Record the offset of the push.
21650 (seh_emit_save): Record the offet of the save.
21651 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21652 Test seh->after_prologue to disregard the epilogue.
21653 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21654 (i386_pe_end_cold_function): New function.
21655
21656 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21657
21658 PR fortran/84565
21659 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21660 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21661
21662 PR c++/84704
21663 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21664 on tmp_var.
21665 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21666 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21667
21668 PR middle-end/84723
21669 * multiple_target.c: Include tree-inline.h and intl.h.
21670 (expand_target_clones): Diagnose and fail if node->definition and
21671 !tree_versionable_function_p (node->decl).
21672
21673 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21674
21675 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21676 sprint_ul.
21677 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21678 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21679 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21680
21681 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21682
21683 PR target/84710
21684 * combine.c (try_combine): Use reg_or_subregno instead of handling
21685 just paradoxical SUBREGs and REGs.
21686
21687 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21688
21689 * config/arc/arc.c (arc_finalize_pic): Remove function.
21690 (arc_must_save_register): We use single base PIC register, remove
21691 checks to save/restore the PIC register.
21692 (arc_expand_prologue): Likewise.
21693 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21694 Remove.
21695 (arc_verify_short): Likewise.
21696 (arc_attr_type): Likewise.
21697 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21698 (walk_stores): Likewise.
21699 (arc_address_cost): Make it static.
21700 (arc_verify_short): Likewise.
21701 (branch_dest): Likewise.
21702 (arc_attr_type): Likewise.
21703 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21704 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21705 (arc_final_prescan_insn): Remove inserting the nops due to
21706 hardware hazards. It is done in reorg step.
21707 (insn_length_variant_t): Remove.
21708 (insn_length_parameters_t): Likewise.
21709 (arc_insn_length_parameters): Likewise.
21710 (arc_get_insn_variants): Likewise.
21711 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21712
21713 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21714
21715 PR inline-asm/84683
21716 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21717 assertion failure.
21718
21719 PR tree-optimization/84687
21720 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21721 on new_node->decl.
21722 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21723
21724 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21725
21726 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21727 Rename to ppc_speculation_barrier.
21728 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21729 __builtin_ppc_speculation_barrier.
21730
21731 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21732
21733 PR target/84700
21734 * combine.c (combine_simplify_rtx): Don't try to simplify if
21735 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21736 are equal to x.
21737
21738 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
21739
21740 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21741 to 32 bytes when compiling for POWER9.
21742
21743 2018-03-05 Jakub Jelinek <jakub@redhat.com>
21744
21745 PR target/84564
21746 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21747 regparm >= 3 with no arg reg available also for calls with
21748 flag_force_indirect_call. Pass decl to ix86_function_regparm.
21749
21750 PR target/84524
21751 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21752 orig,vex.
21753 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
21754
21755 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
21756
21757 PR target/84264
21758 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21759
21760 2018-03-05 Richard Biener <rguenther@suse.de>
21761
21762 PR tree-optimization/84486
21763 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21764 When inserting a __builtin_assume_aligned call set the LHS
21765 SSA name alignment info accordingly.
21766
21767 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
21768
21769 PR tree-optimization/84114
21770 * config/aarch64/aarch64.c (aarch64_reassociation_width)
21771 Avoid reassociation of FLOAT_MODE addition.
21772
21773 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
21774
21775 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21776 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21777 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21778 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21779 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21780 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21781 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21782 and -mwbnoinvd.
21783 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
21784 __builtin_ia32_wbinvd): New builtins.
21785 (SPECIAL_ARGS2): New.
21786 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
21787 (SPECIAL_ARGS2): New.
21788 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
21789 (ix86_valid_target_attribute_inner_p): Ditto.
21790 (ix86_init_mmx_sse_builtins): Add special_args2.
21791 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
21792 TARGET_WBNOINVD_P): New.
21793 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
21794 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
21795 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
21796 * config/i386/immintrin.h (_wbinvd): New intrinsic.
21797 * config/i386/pconfigintrin.h: New file.
21798 * config/i386/wbnoinvdintrin.h: Ditto.
21799 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
21800 wbnoinvdintrin.h.
21801 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
21802
21803 2018-03-05 Richard Biener <rguenther@suse.de>
21804
21805 PR tree-optimization/84670
21806 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21807 member.
21808 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21809 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21810 (compute_antic_aux): Only assert the number of values in ANTIC_IN
21811 doesn't grow if all successors (recursively) were visited at least
21812 once.
21813
21814 2018-03-05 Richard Biener <rguenther@suse.de>
21815
21816 PR tree-optimization/84650
21817 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
21818 if executed in the loop pipeline.
21819
21820 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
21821
21822 * doc/configfiles.texi (Configuration Files): Move info about
21823 conditionalizing $target-protos.h to...
21824 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
21825 differs from $target-protos.h.
21826
21827 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
21828 Chung-Ju Wu <jasonwucj@gmail.com>
21829
21830 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
21831 * config/nds32/nds32-multiple.md (setmemsi): Define.
21832 * config/nds32/nds32-memory-manipulation.c
21833 (nds32_gen_dup_4_byte_to_word_value): New.
21834 (emit_setmem_word_loop): New.
21835 (emit_setmem_byte_loop): New.
21836 (nds32_expand_setmem_loop): New.
21837 (nds32_expand_setmem_loop_v3m): New.
21838 (nds32_expand_setmem_unroll): New.
21839 (nds32_expand_setmem): New.
21840
21841 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21842 Chung-Ju Wu <jasonwucj@gmail.com>
21843
21844 * config/nds32/nds32-memory-manipulation.c
21845 (nds32_emit_load_store): New.
21846 (nds32_emit_post_inc_load_store): New.
21847 (nds32_emit_mem_move): New.
21848 (nds32_emit_mem_move_block): New.
21849 (nds32_expand_movmemsi_loop_unknown_size): New.
21850 (nds32_expand_movmemsi_loop_known_size): New.
21851 (nds32_expand_movmemsi_loop): New.
21852 (nds32_expand_movmemsi_unroll): New.
21853 (nds32_expand_movmemqi): Rename ...
21854 (nds32_expand_movmemsi): ... to this.
21855 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
21856 (movmemsi): ... to this.
21857 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
21858 (nds32_expand_movmemsi): ... to this.
21859
21860 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21861 Monk Chiang <sh.chiang04@gmail.com>
21862 Chung-Ju Wu <jasonwucj@gmail.com>
21863
21864 * config/nds32/nds32-protos.h
21865 (nds32_expand_load_multiple): New arguments.
21866 (nds32_expand_store_multiple): Ditto.
21867 (nds32_valid_multiple_load_store): Rename ...
21868 (nds32_valid_multiple_load_store_p): ... to this.
21869 * config/nds32/nds32-memory-manipulation.c
21870 (nds32_expand_load_multiple): Refine implementation.
21871 (nds32_expand_store_multiple): Ditto.
21872 * config/nds32/nds32-multiple.md
21873 (load_multiple): Update nds32_expand_load_multiple interface.
21874 (store_multiple): Update nds32_expand_store_multiple interface.
21875 * config/nds32/nds32-predicates.c
21876 (nds32_valid_multiple_load_store): Rename ...
21877 (nds32_valid_multiple_load_store_p): ... to this and refine
21878 implementation.
21879 * config/nds32/predicates.md
21880 (nds32_load_multiple_and_update_address_operation): New predicate.
21881 (nds32_store_multiple_and_update_address_operation): New predicate.
21882
21883 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
21884 Chung-Ju Wu <jasonwucj@gmail.com>
21885
21886 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
21887 (combo): New attribute.
21888 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
21889
21890 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
21891
21892 * config/nds32/nds32.opt: Change -mcmodel= default value.
21893
21894 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
21895 Monk Chiang <sh.chiang04@gmail.com>
21896 Chung-Ju Wu <jasonwucj@gmail.com>
21897
21898 * config/nds32/constants.md (unspec_element): New enum.
21899 * config/nds32/constraints.md (Umw): New constraint.
21900 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21901 * config/nds32/nds32-intrinsic.md: Likewise.
21902 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21903 (nds32_valid_smw_lwm_base_p): New.
21904 (nds32_output_smw_single_word): New.
21905 (nds32_output_lmw_single_word): New.
21906 (nds32_expand_unaligned_load): New.
21907 (nds32_expand_unaligned_store): New.
21908 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21909 (nds32_output_smw_single_word): Declare.
21910 (nds32_output_lmw_single_word): Declare.
21911 (nds32_expand_unaligned_load): Declare.
21912 (nds32_expand_unaligned_store): Declare.
21913 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21914 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21915 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21916 NDS32_BUILTIN_UASTORE_DW.
21917 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21918 predicate.
21919
21920 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
21921 Kito Cheng <kito.cheng@gmail.com>
21922 Chung-Ju Wu <jasonwucj@gmail.com>
21923
21924 * config/nds32/nds32-intrinsic.c
21925 (nds32_expand_builtin_null_ftype_reg): Delete.
21926 (nds32_expand_builtin_reg_ftype_imm): Ditto.
21927 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21928 (nds32_read_argument): New.
21929 (nds32_legitimize_target): Ditto.
21930 (nds32_legitimize_argument): Ditto.
21931 (nds32_check_constant_argument): Ditto.
21932 (nds32_expand_unop_builtin): Ditto.
21933 (nds32_expand_unopimm_builtin): Ditto.
21934 (nds32_expand_binop_builtin): Ditto.
21935 (nds32_builtin_decl_impl): Ditto.
21936 (builtin_description): Ditto.
21937 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21938 (nds32_init_builtins_impl): Ditto.
21939 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21940 (nds32_builtin_decl): New.
21941 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21942 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21943
21944 2018-03-02 Jeff Law <law@redhat.com>
21945
21946 * reorg.c (stop_search_p): Handle DEBUG_INSN.
21947 (redundant_insn, fill_simple_delay_slots): Likewise.
21948 (fill_slots_from_thread): Likewise.
21949 * resource.c (mark_referenced_resources): Likewise.
21950 (mark_set_resources, find_dead_or_set_registers): Likewise.
21951
21952 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21953
21954 * substring-locations.h (format_warning_va): Formatting fix for
21955 ATTRIBUTE_GCC_DIAG.
21956 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21957 argument.
21958 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21959 * substring-locations.c: Include intl.h.
21960 (format_warning_va): Turned into small wrapper around
21961 format_warning_n_va, renamed to ...
21962 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21963 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21964 use ngettext.
21965 (format_warning_at_substring_n): New function.
21966 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21967 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
21968 format_warning_at_substring with just a shorter name instead of
21969 const function pointer.
21970 (fmtwarn_n): New function.
21971 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21972 appropriate, get rid of all the fmtstr temporaries, move conditionals
21973 with G_() wrapped string literals directly into fmtwarn arguments,
21974 cast dir.len to (int), formatting fixes.
21975
21976 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
21977
21978 * doc/invoke.texi: Remove "Cilk Plus" references.
21979
21980 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21981 Richard Biener <rguenther@suse.de>
21982
21983 PR ipa/84628
21984 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21985 for error or warning attributes if CALL_FROM_THUNK_P is set.
21986 Formatting fixes.
21987
21988 2018-03-02 Jakub Jelinek <jakub@redhat.com>
21989
21990 PR target/56540
21991 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21992 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21993
21994 PR target/56540
21995 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21996 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21997
21998 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21999 instead of -1U in last predictors element's probability member.
22000
22001 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22002
22003 PR ipa/83983
22004 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22005 arguments if they are comparable.
22006
22007 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22008
22009 PR tree-optimization/84634
22010 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22011 masks and masked_loop_p with a single loop_masks, making sure it's
22012 null for bb vectorization.
22013
22014 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22015
22016 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22017 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22018 loop->force_vectorize to check whether there is no alias.
22019
22020 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22021
22022 PR target/84614
22023 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22024 prototypes.
22025 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22026 comments.
22027 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22028 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22029 instead of a loop around prev_real_insn.
22030 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22031 prev_real_insn.
22032
22033 PR inline-asm/84625
22034 * config/i386/i386.c (ix86_print_operand): Use conditional
22035 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22036 zero vector.
22037
22038 2018-03-02 Richard Biener <rguenther@suse.de>
22039
22040 PR tree-optimization/84427
22041 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22042 (bitmap_set_subtract_values): Rewrite to handle multiple
22043 exprs per value.
22044 (clean): Likewise.
22045 (prune_clobbered_mems): Likewise.
22046 (phi_translate): Take edge instead of pred/phiblock.
22047 (phi_translate_1): Likewise.
22048 (phi_translate_set): Likewise. Insert all translated
22049 exprs for a value into the set, keeping possibly multiple
22050 expressions per value.
22051 (compute_antic_aux): Adjust for phi_translate changes.
22052 When intersecting union the expressions and prune those
22053 not in the final value set, keeping possibly multiple
22054 expressions per value. Do not use value-insertion
22055 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22056 all expressions. Add verification that the value-sets
22057 only shrink during iteration.
22058 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22059 (do_pre_regular_insertion): Likewise.
22060 (do_pre_partial_partial_insertion): Likewise.
22061
22062 2018-03-02 Richard Biener <rguenther@suse.de>
22063
22064 PR target/82005
22065 * config/darwin.c (saved_debug_info_level): New static global.
22066 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22067 (darwin_asm_lto_end): Restore debug info generation settings.
22068
22069 2018-03-01 Martin Liska <mliska@suse.cz>
22070
22071 PR sanitizer/82484
22072 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22073 volatile arguments.
22074
22075 2018-03-01 Richard Biener <rguenther@suse.de>
22076
22077 PR debug/84645
22078 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22079 type annotation with LTO when debug was disabled at compile-time.
22080
22081 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22082
22083 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22084 XINT with INTVAL.
22085 (mips_final_postscan_insn): Likewise.
22086
22087 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22088
22089 PR rtl-optimization/84528
22090 * alias.c (init_alias_target): Add commentary.
22091 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22092 a unique base value if the frame pointer is not eliminated
22093 to the stack pointer.
22094
22095 2018-03-01 Tom de Vries <tom@codesourcery.com>
22096
22097 PR rtl-optimization/83327
22098 * lra-int.h (hard_regs_spilled_into): Declare.
22099 * lra.c (hard_regs_spilled_into): Define.
22100 (init_reg_info): Init hard_regs_spilled_into.
22101 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22102 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22103 (process_bb_lives): Handle hard_regs_spilled_into.
22104 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22105 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22106
22107 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22108
22109 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22110 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22111 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22112 * config/rs6000/aix72.h: New file.
22113
22114 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22115
22116 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22117 instead of warning_at with conditional singular and plural messages
22118 where possible.
22119
22120 PR target/52991
22121 * stor-layout.c (update_alignment_for_field): For
22122 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22123 && !DECL_PACKED (field), do the alignment update, just use
22124 only desired_align instead of MAX (type_align, desired_align)
22125 as the alignment.
22126 (place_field): Don't do known_align < desired_align handling
22127 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22128 is non-NULL, instead do it after rli->prev_field handling and
22129 only if not within a bitfield word. For DECL_PACKED (field)
22130 use type_align of BITS_PER_UNIT.
22131
22132 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22133
22134 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22135 superfluous parentheses and trailing spaces.
22136
22137 2018-02-28 Richard Biener <rguenther@suse.de>
22138
22139 PR tree-optimization/84584
22140 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22141 SCoPs with fake exit edge.
22142
22143 2018-02-28 Martin Liska <mliska@suse.cz>
22144
22145 PR testsuite/84597
22146 * timevar.c (timer::print): Fix format to properly print 100%
22147 values.
22148
22149 2018-02-28 Richard Biener <rguenther@suse.de>
22150
22151 PR middle-end/84607
22152 * genmatch.c (capture_info::walk_match): Do not mark
22153 captured expressions without operands as expr_p given
22154 they act more like predicates and should be subject to
22155 "lost tail" side-effect preserving.
22156
22157 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22158
22159 PR rtl-optimization/81611
22160 * auto-inc-dec.c (attempt_change): Move dead note from
22161 mem_insn if it's the next use of regno
22162 (find_address): Take address use of reg holding
22163 non-incremented value. Add parm to limit search to the named
22164 reg only.
22165 (merge_in_block): Attempt to use a mem insn that is the next
22166 use of the original regno.
22167
22168 2018-02-27 Martin Sebor <msebor@redhat.com>
22169
22170 PR c++/83871
22171 * doc/invoke.texi (-Wmissing-attributes): New option.
22172 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22173
22174 2018-02-27 Martin Sebor <msebor@redhat.com>
22175
22176 PR translation/84207
22177 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22178 n argument to unsigned HOST_WIDE_INT.
22179 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22180 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22181 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22182 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22183
22184 2018-02-27 Richard Biener <rguenther@suse.de>
22185
22186 PR tree-optimization/84512
22187 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22188 Do not use the estimate returned from record_stmt_cost for
22189 the scalar iteration cost but sum properly using add_stmt_cost.
22190
22191 2018-02-27 Richard Biener <rguenther@suse.de>
22192
22193 PR tree-optimization/84466
22194 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22195 Adjust last change to less strictly validate use operands.
22196
22197 2018-02-27 Martin Liska <mliska@suse.cz>
22198
22199 PR gcov-profile/84548
22200 * gcov.c (process_file): Allow partial overlap and consider it
22201 also as group functions.
22202 (output_lines): Properly calculate range of lines for a group.
22203
22204 2018-02-27 Martin Liska <mliska@suse.cz>
22205
22206 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22207 'ggc' suffixes. Change first column width.
22208 (timer::print): Fix formatting of the column.
22209
22210 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22211
22212 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22213 preserve inline entry blocks for the sake of debug inline
22214 entry point markers alone.
22215 (remove_unused_locals): Suggest in comments a better place to
22216 force the preservation of inline entry blocks that are
22217 otherwise unused, but do not preserve them.
22218
22219 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22220
22221 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22222
22223 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22224
22225 PR target/84039
22226 * config/i386/constraints.md (Bs): Replace
22227 ix86_indirect_branch_register with
22228 TARGET_INDIRECT_BRANCH_REGISTER.
22229 (Bw): Likewise.
22230 * config/i386/i386.md (indirect_jump): Likewise.
22231 (tablejump): Likewise.
22232 (*sibcall_memory): Likewise.
22233 (*sibcall_value_memory): Likewise.
22234 Peepholes of indirect call and jump via memory: Likewise.
22235 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22236 (*sibcall_value_GOT_32): Likewise.
22237 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22238 (GOT_memory_operand): Likewise.
22239 (call_insn_operand): Likewise.
22240 (sibcall_insn_operand): Likewise.
22241 (GOT32_symbol_operand): Likewise.
22242 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22243
22244 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22245
22246 PR rtl-optimization/83496
22247 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22248 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22249 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22250 redundant insn, if any.
22251 (relax_delay_slots): Likewise.
22252 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22253
22254 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22255
22256 PR tree-optimization/83965
22257 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22258 that grouped statements are part of a reduction chain. Return
22259 true if the statement is not marked as a reduction itself but
22260 is part of a group.
22261 (vect_recog_dot_prod_pattern): Don't check whether the statement
22262 is part of a group here.
22263 (vect_recog_sad_pattern): Likewise.
22264 (vect_recog_widen_sum_pattern): Likewise.
22265
22266 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22267
22268 PR debug/84545
22269 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22270
22271 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22272
22273 PR target/84530
22274 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22275 the bool argument.
22276 (ix86_output_indirect_function_return): New prototype.
22277 (ix86_split_simple_return_pop_internal): Likewise.
22278 * config/i386/i386.c (indirect_return_via_cx): New.
22279 (indirect_return_via_cx_bnd): Likewise.
22280 (indirect_thunk_name): Handle return va CX_REG.
22281 (output_indirect_thunk_function): Create alias for
22282 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22283 (ix86_output_indirect_jmp): Remove the bool argument.
22284 (ix86_output_indirect_function_return): New function.
22285 (ix86_split_simple_return_pop_internal): Likewise.
22286 * config/i386/i386.md (*indirect_jump): Don't pass false
22287 to ix86_output_indirect_jmp.
22288 (*tablejump_1): Likewise.
22289 (simple_return_pop_internal): Change it to define_insn_and_split.
22290 Call ix86_split_simple_return_pop_internal to split it for
22291 -mfunction-return=.
22292 (simple_return_indirect_internal): Call
22293 ix86_output_indirect_function_return instead of
22294 ix86_output_indirect_jmp.
22295
22296 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22297
22298 PR bootstrap/84405
22299 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22300 memset and value initialization afterwards.
22301
22302 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22303
22304 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22305
22306 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22307
22308 PR target/84521
22309 * common/config/aarch64/aarch64-common.c
22310 (aarch_option_optimization_table[]): Switch
22311 off fomit-frame-pointer
22312
22313 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22314 Chung-Ju Wu <jasonwucj@gmail.com>
22315
22316 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22317 volatile memory.
22318 (store_multiple): Ditto.
22319
22320 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22321
22322 * config.gcc: Add --with-cpu support for nds32 target.
22323 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22324 * config/nds32/nds32.opt: Add -mcpu= option.
22325
22326 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22327
22328 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22329 isel=yes): Warn for these deprecated options.
22330
22331 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22332
22333 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22334 ISA_2_5_MASKS_EMBEDDED.
22335
22336 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22337
22338 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22339 p->max as pointers rather than using iterative_hash_expr.
22340
22341 2018-02-23 Carl Love <cel@us.ibm.com>
22342
22343 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22344 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22345 BU_P8V_OVERLOAD_2.
22346 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22347 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22348 P8V_BUILTIN_VEC_VUNSIGNED2.
22349
22350 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22351
22352 PR target/81572
22353 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22354 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22355 LRA_UNKNOWN_ALT.
22356 * lra-constraints.c (curr_insn_transform): Set up
22357 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22358 LRA_UNKNOWN_ALT.
22359 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22360 * lra-eliminations.c (spill_pseudos): Ditto.
22361 (process_insn_for_elimination): Ditto.
22362 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22363 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22364 LRA_NON_CLOBBERED_ALT.
22365
22366 2018-02-22 Martin Sebor <msebor@redhat.com>
22367
22368 PR tree-optimization/84480
22369 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22370 to maybe_diag_stxncpy_trunc. Call it.
22371 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22372 from gimple_fold_builtin_strcpy. Print inlining stack.
22373 (handle_builtin_stxncpy): Print inlining stack.
22374 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22375
22376 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22377
22378 PR target/84176
22379 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22380 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22381 and -fcheck-pointer-bounds are used together.
22382 (indirect_thunk_prefix): New enum.
22383 (indirect_thunk_need_prefix): New function.
22384 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22385 "_nt" instead of "_bnd" for NOTRACK prefix.
22386 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22387 (output_indirect_thunk_function): Likewise.
22388 (): Likewise.
22389 (ix86_code_end): Update output_indirect_thunk_function calls.
22390 (ix86_output_indirect_branch_via_reg): Replace
22391 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22392 (ix86_output_indirect_branch_via_push): Likewise.
22393 (ix86_output_function_return): Likewise.
22394 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22395 incompatible with -fcf-protection=branch and
22396 -fcheck-pointer-bounds.
22397
22398 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22399
22400 PR target/83335
22401 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22402 Change gcc_assert call to output_operand_lossage.
22403
22404 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22405
22406 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22407
22408 2018-02-22 DJ Delorie <dj@redhat.com>
22409 Sebastian Perta <sebastian.perta@renesas.com>
22410 Oleg Endo <olegendo@gcc.gnu.org>
22411
22412 * config/rx/rx.c (rx_rtx_costs): New function.
22413 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22414
22415 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22416
22417 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22418
22419 2018-02-22 Martin Liska <mliska@suse.cz>
22420
22421 PR driver/83193
22422 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22423 Add "native" as a possible value.
22424
22425 2018-02-22 Martin Liska <mliska@suse.cz>
22426
22427 PR driver/83193
22428 * config/i386/i386.c (ix86_option_override_internal):
22429 Add "native" as a possible value for -march and -mtune.
22430
22431 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22432
22433 PR target/84502
22434 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22435 to all type variants.
22436
22437 PR tree-optimization/84503
22438 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22439 width as info->bitpos + info->bitsize - start.
22440 (merged_store_group::merge_overlapping): Simplify width computation.
22441 (check_no_overlap): New function.
22442 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22443 start + width and last_order of the group, fail if check_no_overlap
22444 fails.
22445 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22446 to group if check_no_overlap fails.
22447
22448 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22449
22450 * config/rs6000/altivec.md: Delete contraint arguments to
22451 define_expand, define_split, and define_peephole2, and in
22452 define_insn_and_split if always unused.
22453 * config/rs6000/darwin.md: Ditto.
22454 * config/rs6000/dfp.md: Ditto.
22455 * config/rs6000/rs6000.md: Ditto.
22456 * config/rs6000/sync.md: Ditto.
22457 * config/rs6000/vector.md: Ditto.
22458 * config/rs6000/vsx.md: Ditto.
22459
22460 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22461
22462 * config/rs6000/altivec.md: Write output control strings as braced
22463 blocks instead of double-quoted strings.
22464 * config/rs6000/darwin.md: Ditto.
22465 * config/rs6000/rs6000.md: Ditto.
22466 * config/rs6000/vector.md: Ditto.
22467 * config/rs6000/vsx.md: Ditto.
22468
22469 2018-02-21 Jason Merrill <jason@redhat.com>
22470
22471 PR c++/84314 - ICE with templates and fastcall attribute.
22472 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22473
22474 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22475
22476 * ipa-cp.c (determine_versionability): Fix comment typos.
22477
22478 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22479
22480 PR c/84229
22481 * ipa-cp.c (determine_versionability): Do not version functions caling
22482 va_arg_pack.
22483
22484 2018-02-21 Martin Liska <mliska@suse.cz>
22485
22486 PR driver/83193
22487 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22488 Add "native" as a possible value.
22489 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22490 the macro when native cpu detection is available.
22491
22492 2018-02-21 Martin Liska <mliska@suse.cz>
22493
22494 PR driver/83193
22495 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22496 Add "native" as a possible value.
22497 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22498 when native cpu detection is available.
22499
22500 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22501 Martin Sebor <msebor@redhat.com>
22502
22503 PR tree-optimization/84478
22504 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22505 false.
22506 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22507 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22508 support which is conservatively correct, for 2 only stay conservative
22509 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22510 argument to the 2 argument get_range_strlen, adjust 6 arg
22511 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22512 false.
22513 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22514 (gimple_fold_builtin_strlen): Pass true as last argument to
22515 get_range_strlen.
22516
22517 2018-02-20 Martin Sebor <msebor@redhat.com>
22518
22519 PR middle-end/84095
22520 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22521 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22522 (builtin_memref::builtin_memref): Factor out parts into
22523 set_base_and_offset and call it.
22524
22525 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22526
22527 PR middle-end/84406
22528 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22529 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22530 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22531 search at the associated MODE_INT.
22532
22533 2018-02-20 Jeff Law <law@redhat.com>
22534
22535 PR middle-end/82123
22536 PR tree-optimization/81592
22537 PR middle-end/79257
22538 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22539 for range data rather than using global data.
22540 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22541 range data rather than using global data.
22542 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22543 pass it to children as needed.
22544 (struct directive::fmtresult): Similarly.
22545 (struct directive::set_width): Similarly.
22546 (struct directive::set_precision): Similarly.
22547 (format_integer, format_directive, parse_directive): Similarly.
22548 (format_none): Accept unnamed vr_values parameter.
22549 (format_percent, format_floating, format_character): Similarly.
22550 (format_string, format_plain): Similarly.
22551 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22552 the EVRP range analyzer for range data rather than using global data.
22553 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22554 gimple-ssa-evrp-analyze.h
22555 (class sprintf_dom_walker): Add after_dom_children member function.
22556 Add evrp_range_analyzer member.
22557 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22558 range analyzer as needed.
22559 (sprintf_dom_walker::after_dom_children): New member function.
22560 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22561 if not optimizing.
22562 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22563 (evrp_range_analyzer::pop_to_marker): Likewise.
22564
22565 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22566
22567 PR tree-optimization/84419
22568 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22569 with the required type if its current type is compatible but
22570 different.
22571
22572 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22573
22574 PR middle-end/82004
22575 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22576 after vectorization.
22577
22578 2018-02-20 Martin Liska <mliska@suse.cz>
22579
22580 PR driver/83193
22581 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22582 possible values if we don't have a hint.
22583
22584 2018-02-20 Martin Liska <mliska@suse.cz>
22585
22586 PR c/84310
22587 PR target/79747
22588 * final.c (shorten_branches): Build align_tab array with one
22589 more element.
22590 * opts.c (finish_options): Add alignment option limit check.
22591 (MAX_CODE_ALIGN): Likewise.
22592 (MAX_CODE_ALIGN_VALUE): Likewise.
22593 * doc/invoke.texi: Document maximum allowed option value for
22594 all -falign-* options.
22595
22596 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22597
22598 PR target/84146
22599 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22600 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22601 * var-tracking.c (emit_note_insn_var_location): Remove all references
22602 to NOTE_INSN_CALL_ARG_LOCATION.
22603 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22604 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22605 Use copy_rtx_if_shared.
22606 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22607 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22608 (dwarf2out_var_location): Remove handling of
22609 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22610 on call_insn.
22611 * final.c (final_scan_insn): Remove all references to
22612 NOTE_INSN_CALL_ARG_LOCATION.
22613 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22614 before dumping final insns.
22615 * except.c (emit_note_eh_region_end): Remove all references to
22616 NOTE_INSN_CALL_ARG_LOCATION.
22617 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22618 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22619 * config/arc/arc.c (hwloop_optimize): Likewise.
22620 * config/arm/arm.c (create_fix_barrier): Likewise.
22621 * config/s390/s390.c (s390_chunkify_start): Likewise.
22622 * config/sh/sh.c (find_barrier): Likewise.
22623 * config/i386/i386.c (rest_of_insert_endbranch,
22624 ix86_seh_fixup_eh_fallthru): Likewise.
22625 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22626 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22627 * config/frv/frv.c (frv_function_prologue): Likewise.
22628 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22629 reg note.
22630 (note_outside_basic_block_p): Remove all references to
22631 NOTE_INSN_CALL_ARG_LOCATION.
22632 * gengtype.c (adjust_field_rtx_def): Likewise.
22633 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22634 Likewise.
22635 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22636 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22637
22638 PR c++/84444
22639 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22640 is ADDR_EXPR.
22641
22642 PR tree-optimization/84452
22643 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22644 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22645 is NULL.
22646
22647 2018-02-19 Martin Liska <mliska@suse.cz>
22648
22649 PR sanitizer/82183
22650 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22651
22652 2018-02-19 Martin Liska <mliska@suse.cz>
22653 Richard Sandiford <richard.sandiford@linaro.org>
22654
22655 PR tree-optimization/82491
22656 * gimple-fold.c (get_base_constructor): Make earlier bail out
22657 to prevent ubsan.
22658
22659 2018-02-19 Carl Love <cel@us.ibm.com>
22660
22661 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22662 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22663 BU_P8V_OVERLOAD_1.
22664 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22665 P8V_BUILTIN_VEC_NEG.
22666
22667 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22668
22669 * config/rl78/rl78.md (movdf): New define expand.
22670
22671 2018-02-19 Martin Liska <mliska@suse.cz>
22672
22673 PR other/80589
22674 * doc/invoke.texi: Fix typo.
22675 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22676
22677 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22678
22679 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22680 handle rs6000_single_float and rs6000_double_float specially for
22681 e500 family CPUs.
22682
22683 2018-02-16 Jeff Law <law@redhat.com>
22684
22685 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22686 (pop_regs): Use it.
22687
22688 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22689
22690 PR ipa/84425
22691 * ipa-inline.c (inline_small_functions): Fix a typo.
22692
22693 2018-02-16 Nathan Sidwell <nathan@acm.org>
22694
22695 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22696
22697 2018-02-16 Carl Love <cel@us.ibm.com>
22698
22699 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22700 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22701 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22702 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22703 expansion to P8V_BUILTIN_VEC_FLOAT2.
22704
22705 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22706
22707 PR rtl-optimization/70023
22708 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22709 src_regno into account.
22710
22711 2018-02-16 Carl Love <cel@us.ibm.com>
22712
22713 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22714 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22715 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22716 * config/rs6000/rs6000.c: Remove case statements for
22717 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22718 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22719 and P9V_BUILTIN_VEC_VINSERT4B.
22720 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22721 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22722 * config/rs6000/vsx.md:
22723 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22724 vec_insert4b.
22725
22726 2018-02-16 Carl Love <cel@us.ibm.com>
22727
22728 * config/rs6000/altivec.h: Add builtin names vec_extract4b
22729 vec_insert4b.
22730 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22731 definitions.
22732 * config/rs6000/rs6000-c.c: Add the definitions for
22733 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22734 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22735 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22736 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
22737 definition for insert4b and define insn *insert3b_internal.
22738 * doc/extend.texi: Add documentation for vec_extract4b.
22739
22740 2018-02-16 Nathan Sidwell <nathan@acm.org>
22741
22742 * doc/extend.texi (Backwards Compatibility): Mention friend
22743 injection. Note for-scope is deprecated.
22744 * doc/invoke.texi (-ffriend-injection): Deprecate.
22745
22746 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
22747
22748 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22749 that moved to I2, also allow destinations that are a paradoxical
22750 subreg (instead of a normal reg).
22751
22752 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
22753
22754 PR target/83831
22755 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22756 to QImode.
22757
22758 2018-02-16 Richard Biener <rguenther@suse.de>
22759
22760 PR tree-optimization/84037
22761 PR tree-optimization/84016
22762 PR target/82862
22763 * config/i386/i386.c (ix86_builtin_vectorization_cost):
22764 Adjust vec_construct for the fact we need additional higher latency
22765 128bit inserts for AVX256 and AVX512 vector builds.
22766 (ix86_add_stmt_cost): Scale vector construction cost for
22767 elementwise loads.
22768
22769 2018-02-16 Richard Biener <rguenther@suse.de>
22770
22771 PR tree-optimization/84417
22772 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22773 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22774 (non_rewritable_lvalue_p): Likewise, use poly-ints.
22775
22776 2018-02-16 Martin Liska <mliska@suse.cz>
22777
22778 PR sanitizer/84307
22779 * internal-fn.def (ASAN_CHECK): Set proper flags.
22780 (ASAN_MARK): Likewise.
22781
22782 2018-02-16 Julia Koval <julia.koval@intel.com>
22783
22784 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
22785 from PTA_CANNONLAKE.
22786
22787 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22788
22789 PR target/84272
22790 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
22791 Use ++iter rather than iter++ for std::list iterators.
22792 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
22793 defer deleting them until all nodes in the forest are processed. Do
22794 free even leaf nodes. Change to_process into auto_vec.
22795
22796 PR bootstrap/84405
22797 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
22798 * vec.h (vec_default_construct): Use memset instead of placement new
22799 if BROKEN_VALUE_INITIALIZATION is defined.
22800 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
22801 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
22802 is defined.
22803
22804 PR rtl-optimization/83723
22805 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
22806 * lra.c (lra_substitute_pseudo): Likewise. If true, use
22807 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
22808 recursive calls.
22809 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
22810 callers.
22811 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
22812
22813 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
22814
22815 PR rtl-optimization/81443
22816 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
22817 from inner REGs to paradoxical SUBREGs.
22818
22819 2018-02-16 Richard Biener <rguenther@suse.de>
22820
22821 PR tree-optimization/84399
22822 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22823 For operands we can analyze at their definition make sure we can
22824 analyze them at each use as well.
22825
22826 2018-02-16 Richard Biener <rguenther@suse.de>
22827
22828 PR tree-optimization/84190
22829 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
22830 volatile accesses if the decl isn't volatile.
22831
22832 2018-02-15 Jason Merrill <jason@redhat.com>
22833
22834 PR c++/84314 - ICE with templates and fastcall attribute.
22835 * attribs.c (build_type_attribute_qual_variant): Don't clobber
22836 TYPE_CANONICAL on an existing type.
22837
22838 2018-02-15 Jakub Jelinek <jakub@redhat.com>
22839
22840 PR tree-optimization/84383
22841 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
22842 dstoff nor call operand_equal_p if dstbase is NULL.
22843
22844 PR tree-optimization/84334
22845 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
22846 also a CONSTANT_CLASS_P, punt.
22847
22848 2018-02-14 Jim Wilson <jimw@sifive.com>
22849
22850 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
22851 first SMALL_OPERAND check. New local min_second_step. Move assert
22852 to where locals are set. Add TARGET_RVC support.
22853 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
22854
22855 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
22856
22857 * doc/invoke.texi: Correct -Wformat-overflow code sample.
22858
22859 2018-02-14 Martin Sebor <msebor@redhat.com>
22860
22861 PR tree-optimization/83698
22862 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
22863 arrays constrain the offset range to their bounds.
22864 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
22865 (builtin_access::overlap): Avoid setting the size of overlap if it's
22866 already been set.
22867 (maybe_diag_overlap): Also consider arrays when deciding what values
22868 of offsets to include in diagnostics.
22869
22870 2018-02-14 Martin Sebor <msebor@redhat.com>
22871
22872 PR c/84108
22873 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
22874 that correspond to the kind of a declaration.
22875
22876 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
22877
22878 PR target/83984
22879 * config/pa/pa.md: Load address of PIC label using the linkage table
22880 if the label is nonlocal.
22881
22882 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
22883
22884 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
22885 warning message if user requests -maltivec=be.
22886 * doc/invoke.texi: Document deprecation of -maltivec=be.
22887
22888 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
22889
22890 PR target/84220
22891 * config/rs6000/rs6000-c.c: Update definitions for
22892 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
22893 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
22894
22895 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22896
22897 PR target/84239
22898 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22899 add _get_ssp intrinsics. Remove argument from
22900 __builtin_ia32_rdssp[d|q].
22901 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22902 * config/i386/i386-builtin.def: Remove argument from
22903 __builtin_ia32_rdssp[d|q].
22904 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22905 ix86_expand_special_args_builtin for _rdssp[d|q].
22906 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22907 Clear register before usage.
22908 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22909 Add documentation for new _get_ssp and _inc_ssp intrinsics.
22910
22911 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
22912
22913 PR tree-optimization/84357
22914 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22915 operand 1 of an ARRAY_REF too.
22916
22917 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
22918
22919 PR target/83831
22920 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22921 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22922 declarations.
22923 (set_of_reg): New struct.
22924 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22925 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22926 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22927 functions.
22928 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22929 Split into bitclr, bitset, bitinvert patterns if appropriate.
22930 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22931 use rx_fuse_in_memory_bitop.
22932 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22933 to named insn, correct maximum insn length.
22934
22935 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
22936
22937 PR target/79242
22938 * machmode.def: Define a complex mode for PARTIAL_INT.
22939 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22940 MODE_PARTIAL_INT.
22941 * doc/rtl.texi: Document CSPImode.
22942 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22943 handling.
22944 (msp430_hard_regno_nregs_with_padding): Likewise.
22945
22946 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
22947
22948 PR target/84279
22949 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22950
22951 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
22952
22953 PR rtl-optimization/84169
22954 * combine.c (try_combine): New variable split_i2i3. Set it to true if
22955 we generated a parallel as new i3 and we split that to new i2 and i3
22956 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
22957 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
22958 those to i2, not i1. Partially rewrite this scan code.
22959
22960 2018-02-13 Jakub Jelinek <jakub@redhat.com>
22961
22962 PR c/82210
22963 * stor-layout.c (place_field): For variable length fields, adjust
22964 offset_align afterwards not just based on the field's alignment,
22965 but also on the size.
22966
22967 PR middle-end/84309
22968 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22969 of exps and logs in the use_exp2 case.
22970
22971 2018-02-13 Jeff Law <law@redhat.com>
22972
22973 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22974 entry for "vector".
22975
22976 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22977 ARGS as unused.
22978
22979 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
22980
22981 PR debug/84342
22982 PR debug/84319
22983 * common.opt (gas-loc-support, gas-locview-support): New.
22984 (ginline-points, ginternal-reset-location-views): New.
22985 * doc/invoke.texi: Document them. Use @itemx where intended.
22986 (gvariable-location-views): Adjust.
22987 * target.def (reset_location_view): New.
22988 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22989 (TARGET_RESET_LOCATION_VIEW): New.
22990 * doc/tm.texi: Rebuilt.
22991 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22992 (dwarf2out_default_as_locview_support): New.
22993 (output_asm_line_debug_info): Use option variables.
22994 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22995 (output_loc_list): Likewise.
22996 (add_high_low_attributes): Check option variables.
22997 Don't output entry view attribute in strict mode.
22998 (gen_inlined_subroutine_die): Check option variables.
22999 (dwarf2out_inline_entry): Likewise.
23000 (init_sections_and_labels): Likewise.
23001 (dwarf2out_early_finish): Likewise.
23002 (maybe_reset_location_view): New, from...
23003 (dwarf2out_var_location): ... here. Call it.
23004 * debug.h (dwarf2out_default_as_loc_support): Declare.
23005 (dwarf2out_default_as_locview_support): Declare.
23006 * hooks.c (hook_int_rtx_insn_0): New.
23007 * hooks.h (hook_int_rtx_insn_0): Declare.
23008 * toplev.c (process_options): Take -gas-loc-support and
23009 -gas-locview-support from dwarf2out. Enable
23010 -gvariable-location-views by default only with locview
23011 assembler support. Enable -ginternal-reset-location-views by
23012 default only if the target defines the corresponding hook.
23013 Enable -ginline-points by default if location views are
23014 enabled; force it disabled if statement frontiers are
23015 disabled.
23016 * tree-inline.c (expand_call_inline): Check option variables.
23017 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23018
23019 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23020
23021 PR tree-optimization/84321
23022 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23023 handling. Also check whether the anti-range contains any values
23024 that satisfy the mask; switch to a VR_RANGE if not.
23025
23026 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23027
23028 PR sanitizer/84340
23029 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23030
23031 2018-02-13 Martin Jambor <mjambor@suse.cz>
23032
23033 PR c++/83990
23034 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23035 of call statements, also set location of a load to a temporary.
23036
23037 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23038
23039 * config/rl78/rl78.c (add_vector_labels): New function.
23040 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23041 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23042 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23043 which checks that no arguments are passed.
23044 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23045 * doc/extend.texi: Documentation for the new attribute.
23046
23047 2018-02-13 Andreas Schwab <schwab@suse.de>
23048
23049 * config/riscv/linux.h (CPP_SPEC): Define.
23050
23051 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23052
23053 PR target/84335
23054 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23055 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23056 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23057 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23058 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23059 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23060 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23061 temporarily for AES and PCLMUL builtins.
23062
23063 PR tree-optimization/84339
23064 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23065 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23066 Formatting fixes.
23067
23068 PR middle-end/84309
23069 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23070 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23071 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23072 inline function.
23073 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23074 inline function.
23075 * omp-simd-clone.h: New file.
23076 * omp-simd-clone.c: Include omp-simd-clone.h.
23077 (expand_simd_clones): No longer static.
23078 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23079 cgraph.h and omp-simd-clone.h.
23080 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23081 (vect_recog_widen_shift_pattern): Formatting fix.
23082 (vect_pattern_recog_1): Don't check optab for calls.
23083
23084 PR target/84336
23085 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23086 operands[2] into a REG before using gen_lowpart on it.
23087
23088 2018-02-12 Jeff Law <law@redhat.com>
23089
23090 PR target/83760
23091 * config/sh/sh.c (find_barrier): Consider a sibling call
23092 a barrier as well.
23093
23094 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23095 successfully back substituting a reg.
23096
23097 2018-02-12 Richard Biener <rguenther@suse.de>
23098
23099 PR tree-optimization/84037
23100 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23101 parameter, move visited init to caller.
23102 (vect_slp_analyze_operations): Separate cost from validity
23103 check, initialize visited once for all instances.
23104 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23105 for all instances.
23106 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23107 out an assert.
23108 (vect_model_promotion_demotion_cost): Likewise.
23109 (vectorizable_bswap): Guard cost modeling with !slp_node
23110 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23111 SLP stmts.
23112 (vectorizable_call): Likewise.
23113 (vectorizable_conversion): Likewise.
23114 (vectorizable_assignment): Likewise.
23115 (vectorizable_shift): Likewise.
23116 (vectorizable_operation): Likewise.
23117 (vectorizable_store): Likewise.
23118 (vectorizable_load): Likewise.
23119 (vectorizable_condition): Likewise.
23120 (vectorizable_comparison): Likewise.
23121
23122 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23123
23124 PR sanitizer/84307
23125 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23126 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23127 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23128
23129 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23130
23131 PR middle-end/83665
23132 * params.def (inline-min-speedup): Increase from 8 to 15.
23133 (max-inline-insns-auto): Decrease from 40 to 30.
23134 * ipa-split.c (consider_split): Add some buffer for function to
23135 be considered inlining candidate.
23136 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23137 default values.
23138
23139 2018-02-12 Richard Biener <rguenther@suse.de>
23140
23141 PR tree-optimization/84037
23142 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23143 matched stmts if we cannot swap the non-matched ones.
23144
23145 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23146
23147 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23148 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23149 _mm_maskz_scalef_round_ss): New intrinsics.
23150 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23151 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23152 __builtin_ia32_scalefss_round): Remove.
23153 (__builtin_ia32_scalefsd_mask_round,
23154 __builtin_ia32_scalefss_mask_round): New intrinsics.
23155 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23156 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23157 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23158 "<round_constraint>")): Changed to ...
23159 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23160 "<round_scalar_constraint>")): ... this.
23161 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23162 %0, %1, %2<round_op3>}"): Changed to ...
23163 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23164 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23165 %2<round_scalar_mask_op3>}"): ... this.
23166 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23167
23168 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23169
23170 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23171 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23172 (_mm_maskz_sqrt_round_ss): New intrinsics.
23173 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23174 (__builtin_ia32_sqrtsd_mask_round)
23175 (__builtin_ia32_sqrtss_mask_round): New builtins.
23176 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23177 (__builtin_ia32_sqrtss_round): Remove.
23178 (__builtin_ia32_sqrtsd_mask_round)
23179 (__builtin_ia32_sqrtss_mask_round): New builtins.
23180 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23181 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23182 ((match_operand:VF_128 1 "vector_operand"
23183 "xBm,<round_constraint>")): Changed to ...
23184 ((match_operand:VF_128 1 "vector_operand"
23185 "xBm,<round_scalar_constraint>")): ... this.
23186 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23187 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23188 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23189 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23190 %<iptr>1<round_scalar_mask_op3>}): ... this.
23191 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23192 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23193
23194 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23195
23196 PR target/84266
23197 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23198 Cast vec_cmpeq result to correct type.
23199 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23200 Cast vec_cmpgt result to correct type.
23201
23202 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23203
23204 * final.c (final_scan_insn_1): Renamed from...
23205 (final_scan_insn): ... this. New wrapper, to recover
23206 seen from the outermost call in recursive ones.
23207 * config/sparc/sparc.c (output_return): Drop seen from call.
23208 (output_sibcall): Likewise.
23209 * config/visium/visium.c (output_branch): Likewise.
23210
23211 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23212
23213 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23214 function label.
23215
23216 2018-02-10 Alan Modra <amodra@gmail.com>
23217
23218 PR target/84300
23219 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23220 Specify LR as an input.
23221
23222 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23223
23224 PR sanitizer/83987
23225 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23226 remove_member_access_dummy_vars): New functions.
23227 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23228 lower_omp_1, execute_lower_omp): Use them.
23229
23230 PR rtl-optimization/84308
23231 * shrink-wrap.c (spread_components): Release todo vector.
23232
23233 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23234
23235 PR rtl-optimization/57193
23236 * ira-color.c (struct allocno_color_data): Add member
23237 conflict_allocno_hard_prefs.
23238 (update_conflict_allocno_hard_prefs): New.
23239 (bucket_allocno_compare_func): Add a preference based on
23240 conflict_allocno_hard_prefs.
23241 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23242 (color_allocnos): Remove a dead code. Initiate
23243 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23244
23245 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23246
23247 PR target/84226
23248 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23249 constraint from =wa to wa. Avoid a subreg on the output operand,
23250 instead use a pseudo and subreg it in a move.
23251 (p9_xxbrd_<mode>): Changed to ...
23252 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23253 (p9_xxbrd_v2df): New expander.
23254 (p9_xxbrw_<mode>): Changed to ...
23255 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23256 (p9_xxbrw_v4sf): New expander.
23257
23258 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23259
23260 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23261
23262 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23263
23264 PR target/83926
23265 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23266 multiply in 32-bit mode.
23267 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23268 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23269 mode.
23270
23271 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23272
23273 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23274 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23275 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23276 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23277
23278 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23279
23280 PR lto/84213
23281 * dwarf2out.c (is_trivial_indirect_ref): New function.
23282 (dwarf2out_late_global_decl): Do not generate a location
23283 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23284 and that are not defined in the current unit.
23285
23286 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23287
23288 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23289 instead of a libcall for UNORDERED.
23290
23291 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23292
23293 PR target/82641
23294 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23295 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23296
23297 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23298
23299 PR target/PR84295
23300 * config/s390/s390.c (s390_set_current_function): Invoke
23301 s390_indirect_branch_settings also if fndecl didn't change.
23302
23303 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23304
23305 * config/rs6000/rs6000.md (blockage): Set length to zero.
23306
23307 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23308
23309 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23310
23311 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23312
23313 PR sanitizer/84285
23314 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23315 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23316 -static-lib*san.
23317
23318 PR debug/84252
23319 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23320 PARALLEL incoming that failed vt_get_decl_and_offset check.
23321
23322 PR middle-end/84237
23323 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23324 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23325 TREE_READONLY bit.
23326 (get_variable_section): For decls in named .bss* sections pass true as
23327 second argument to bss_initializer_p.
23328
23329 2018-02-09 Marek Polacek <polacek@redhat.com>
23330 Jakub Jelinek <jakub@redhat.com>
23331
23332 PR c++/83659
23333 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23334 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23335 Sync some changes from cxx_fold_indirect_ref.
23336
23337 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23338
23339 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23340 markers.
23341 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23342 (BLOCK_INLINE_ENTRY_LABEL): New.
23343 (dwarf2out_var_location): Disregard inline entry markers.
23344 (inline_entry_data): New struct.
23345 (inline_entry_data_hasher): New hashtable type.
23346 (inline_entry_data_hasher::hash): New.
23347 (inline_entry_data_hasher::equal): New.
23348 (inline_entry_data_table): New variable.
23349 (add_high_low_attributes): Add DW_AT_entry_pc and
23350 DW_AT_GNU_entry_view attributes if a pending entry is found
23351 in inline_entry_data_table. Add old entry_pc attribute only
23352 if debug nonbinding markers are disabled.
23353 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23354 markers are enabled.
23355 (block_within_block_p, dwarf2out_inline_entry): New.
23356 (dwarf2out_finish): Check that no entries remained in
23357 inline_entry_data_table.
23358 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23359 (final_scan_insn, notice_source_line): Likewise.
23360 (rest_of_clean_state): Skip inline entry markers.
23361 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23362 markers.
23363 * gimple.c (gimple_build_debug_inline_entry): New.
23364 * gimple.h (enum gimple_debug_subcode): Add
23365 GIMPLE_DEBUG_INLINE_ENTRY.
23366 (gimple_build_debug_inline_entry): Declare.
23367 (gimple_debug_inline_entry_p): New.
23368 (gimple_debug_nonbind_marker_p): Adjust.
23369 * insn-notes.def (INLINE_ENTRY): New.
23370 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23371 inline entry marker notes.
23372 (print_insn): Likewise.
23373 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23374 (INSN_DEBUG_MARKER_KIND): Likewise.
23375 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23376 * tree-inline.c (expand_call_inline): Build and insert
23377 debug_inline_entry stmt.
23378 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23379 inline entry blocks early, if nonbind markers are enabled.
23380 (dump_scope_block): Dump fragment info.
23381 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23382 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23383 (gimple_build_debug_inline_entry): New.
23384 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23385 Enable/disable inline entry points too.
23386 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23387 (DEBUG_INSN): Describe inline entry markers.
23388
23389 * common.opt (gvariable-location-views): New.
23390 (gvariable-location-views=incompat5): New.
23391 * config.in: Rebuilt.
23392 * configure: Rebuilt.
23393 * configure.ac: Test assembler for view support.
23394 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23395 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23396 * dwarf2out.c (var_loc_view): New typedef.
23397 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23398 (dwarf2out_locviews_in_attribute): New.
23399 (dwarf2out_locviews_in_loclist): New.
23400 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23401 (enum dw_line_info_opcode): Add LI_adv_address.
23402 (struct dw_line_info_table): Add view.
23403 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23404 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23405 (zero_view_p): New variable.
23406 (ZERO_VIEW_P): New macro.
23407 (output_asm_line_debug_info): New.
23408 (struct var_loc_node): Add view.
23409 (add_AT_view_list, AT_loc_list): New.
23410 (add_var_loc_to_decl): Add view param. Test it against last.
23411 (new_loc_list): Add view params. Record them.
23412 (AT_loc_list_ptr): Handle loc and view lists.
23413 (view_list_to_loc_list_val_node): New.
23414 (print_dw_val): Handle dw_val_class_view_list.
23415 (size_of_die): Likewise.
23416 (value_format): Likewise.
23417 (loc_list_has_views): New.
23418 (gen_llsym): Set vl_symbol too.
23419 (maybe_gen_llsym, skip_loc_list_entry): New.
23420 (dwarf2out_maybe_output_loclist_view_pair): New.
23421 (output_loc_list): Output view list or entries too.
23422 (output_view_list_offset): New.
23423 (output_die): Handle dw_val_class_view_list.
23424 (output_dwarf_version): New.
23425 (output_compilation_unit_header): Use it.
23426 (output_skeleton_debug_sections): Likewise.
23427 (output_rnglists, output_line_info): Likewise.
23428 (output_pubnames, output_aranges): Update version comments.
23429 (output_one_line_info_table): Output view numbers in asm comments.
23430 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23431 Call maybe_gen_llsym.
23432 (loc_list_from_tree_1): Adjust.
23433 (add_AT_location_description): Create view list attribute if
23434 needed, check it's absent otherwise.
23435 (convert_cfa_to_fb_loc_list): Adjust.
23436 (maybe_emit_file): Call output_asm_line_debug_info for test.
23437 (dwarf2out_var_location): Reset views as needed. Precompute
23438 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23439 attribute. Set view.
23440 (new_line_info_table): Reset next view.
23441 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23442 (dwarf2out_source_line): Likewise. Output view resets and labels to
23443 the assembler, or select appropriate line info opcodes.
23444 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23445 (optimize_string_length): Catch it. Adjust.
23446 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23447 dw_val_class_view_list, and remove it if no longer needed.
23448 (hash_loc_list): Hash view numbers.
23449 (loc_list_hasher::equal): Compare them.
23450 (optimize_location_lists): Check whether a view list symbol is
23451 needed, and whether the locview attribute is present, and
23452 whether they match. Remove the locview attribute if no longer
23453 needed.
23454 (index_location_lists): Call skip_loc_list_entry for test.
23455 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23456 Use output_dwarf_version.
23457 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23458 (struct dw_val_node): Add val_view_list.
23459 * final.c (SEEN_NEXT_VIEW): New.
23460 (set_next_view_needed): New.
23461 (clear_next_view_needed): New.
23462 (maybe_output_next_view): New.
23463 (final_start_function): Rename to...
23464 (final_start_function_1): ... this. Take pointer to FIRST,
23465 add SEEN parameter. Emit param bindings in the initial view.
23466 (final_start_function): Reintroduce SEEN-less interface.
23467 (final): Rename to...
23468 (final_1): ... this. Take SEEN parameter. Output final pending
23469 next view at the end.
23470 (final): Reintroduce seen-less interface.
23471 (final_scan_insn): Output pending next view before switching
23472 sections or ending a block. Mark the next view as needed when
23473 outputting variable locations. Notify debug backend of section
23474 changes, and of location view changes.
23475 (rest_of_handle_final): Adjust.
23476 * toplev.c (process_options): Autodetect value for debug variable
23477 location views option. Warn on incompat5 without -gdwarf-5.
23478 * doc/invoke.texi (gvariable-location-views): New.
23479 (gvariable-location-views=incompat5): New.
23480 (gno-variable-location-views): New.
23481
23482 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23483
23484 PR tree-optimization/84136
23485 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23486 that the result of find_edge is non-NULL.
23487
23488 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23489
23490 PR target/83008
23491 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23492 storing integer register in SImode. Fix cost of 256 and 512
23493 byte aligned SSE register store.
23494
23495 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23496
23497 * config/i386/i386.c (ix86_multiplication_cost): Fix
23498 multiplication cost for TARGET_AVX512DQ.
23499
23500 2018-02-08 Marek Polacek <polacek@redhat.com>
23501
23502 PR tree-optimization/84238
23503 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23504 get_range_strlen.
23505
23506 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23507
23508 PR tree-optimization/84265
23509 * tree-vect-stmts.c (vectorizable_store): Don't treat
23510 VMAT_CONTIGUOUS accesses as grouped.
23511 (vectorizable_load): Likewise.
23512
23513 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23514
23515 PR tree-optimization/81635
23516 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23517 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23518 (test_round_for_mask): New functions.
23519 (wide_int_cc_tests): Call test_round_for_mask.
23520 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23521 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23522 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23523 range returned by get_range_info.
23524
23525 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23526
23527 PR ipa/81360
23528 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23529 * symtab.c: Include builtins.h
23530 (symtab_node::output_to_lto_symbol_table_p): Move here
23531 from lto-streamer-out.c:output_symbol_p.
23532 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23533 (output_symbol_p): Move all logic to symtab.c
23534 (produce_symtab): Update.
23535
23536 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23537
23538 * config/s390/s390-opts.h (enum indirect_branch): Define.
23539 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23540 (s390_indirect_branch_via_thunk)
23541 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23542 (enum s390_indirect_branch_type): Define.
23543 * config/s390/s390.c (struct s390_frame_layout, struct
23544 machine_function): Remove.
23545 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23546 (indirect_branch_table_label_no, indirect_branch_table_name):
23547 Define variables.
23548 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23549 (enum s390_indirect_branch_option): Define.
23550 (s390_return_addr_from_memory): New function.
23551 (s390_handle_string_attribute): New function.
23552 (s390_attribute_table): Add new attribute handler.
23553 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23554 (s390_indirect_branch_via_thunk): New function.
23555 (s390_indirect_branch_via_inline_thunk): New function.
23556 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23557 sibling call optimization for non z10 compiles.
23558 (s390_emit_call): Force indirect branch target to be a single
23559 register. Add r1 clobber for non-z10 compiles.
23560 (s390_emit_epilogue): Emit return jump via return_use expander.
23561 (s390_reorg): Handle JUMP_INSNs as execute targets.
23562 (s390_option_override_internal): Perform validity checks for the
23563 new command line options.
23564 (s390_indirect_branch_attrvalue): New function.
23565 (s390_indirect_branch_settings): New function.
23566 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23567 (s390_output_indirect_thunk_function): New function.
23568 (s390_code_end): Implement target hook.
23569 (s390_case_values_threshold): Implement target hook.
23570 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23571 macros.
23572 * config/s390/s390.h (struct s390_frame_layout)
23573 (struct machine_function): Move here from s390.c.
23574 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23575 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23576 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23577 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23578 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23579 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23580 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23581 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23582 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23583 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23584 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23585 (mnemonic attribute): Add values which aren't recognized
23586 automatically.
23587 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23588 pattern for branch conversion. Fix mnemonic attribute.
23589 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23590 indirect branch via thunk if requested.
23591 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23592 ("*indirect_jump"): Disable for branch conversion using out of
23593 line thunks.
23594 ("indirect_jump_via_thunk<mode>_z10")
23595 ("indirect_jump_via_thunk<mode>")
23596 ("indirect_jump_via_inlinethunk<mode>_z10")
23597 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23598 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23599 ("casesi_jump_via_inlinethunk<mode>_z10")
23600 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23601 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23602 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23603 ("*indirect2_jump"): Disable for branch conversion.
23604 ("casesi_jump"): Turn into expander and expand patterns for branch
23605 conversion.
23606 ("return_use"): New expander.
23607 ("*return"): Emit return via thunk and rename it to ...
23608 ("*return<mode>"): ... this one.
23609 * config/s390/s390.opt: Add new options and and enum for the
23610 option values.
23611
23612 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23613
23614 * lra-constraints.c (match_reload): Unconditionally use
23615 gen_lowpart_SUBREG, rather than selecting between that
23616 and equivalent gen_rtx_SUBREG code.
23617
23618 2018-02-08 Richard Biener <rguenther@suse.de>
23619
23620 PR tree-optimization/84233
23621 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23622 changed flag instead of boguously re-using phi_inserted.
23623
23624 2018-02-08 Martin Jambor <mjambor@suse.cz>
23625
23626 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23627 static local variables.
23628
23629 2018-02-08 Richard Biener <rguenther@suse.de>
23630
23631 PR tree-optimization/84278
23632 * tree-vect-stmts.c (vectorizable_store): When looking for
23633 smaller vector types to perform grouped strided loads/stores
23634 make sure the mode is supported by the target.
23635 (vectorizable_load): Likewise.
23636
23637 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23638
23639 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23640 Increase LDP/STP opportunities by adding adjacent callee-saves.
23641
23642 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23643
23644 PR rtl-optimization/84068
23645 PR rtl-optimization/83459
23646 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23647
23648 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23649
23650 PR tree-optimization/84224
23651 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23652 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23653 non-zero arguments.
23654
23655 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23656
23657 PR target/84113
23658 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23659 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23660 count, remove one USE.
23661
23662 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23663
23664 * doc/install.texi (Configuration): Document the
23665 --with-long-double-format={ibm,ieee} PowerPC configuration
23666 options.
23667
23668 PR target/84154
23669 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23670 Convert from define_expand to be define_insn_and_split. Rework
23671 float/double/_Float128 conversions to QI/HI/SImode to work with
23672 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23673 conversions to QI/HImode types did a store and then a load to
23674 truncate the value. For conversions to VSX registers, don't split
23675 the insn, instead emit the code directly. Use the code iterator
23676 any_fix to combine signed and unsigned conversions.
23677 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23678 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23679 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23680 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23681 (fix_<mode>di2_hw): Likewise.
23682 (fixuns_<mode>di2_hw): Likewise.
23683 (fix_<mode>si2_hw): Likewise.
23684 (fixuns_<mode>si2_hw): Likewise.
23685 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23686 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23687 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23688 fix<uns>_trunc<SFDF:mode>si2_p8.
23689 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23690 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23691 (fix<uns>_<mode>_mem): Likewise.
23692 (fctiw<u>z_<mode>_mem): Likewise.
23693 (fix<uns>_<mode>_mem): Likewise.
23694 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23695 the register allocator from doing a direct move to the GPRs to do
23696 a store, and instead use the ISA 3.0 store byte/half-word from
23697 vector register instruction. For IEEE 128-bit floating point,
23698 also optimize stores of 32-bit ints.
23699 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23700
23701 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23702
23703 * genextract.c (push_pathstr_operand): New function to support
23704 [a-zA-Z].
23705 (walk_rtx): Call push_pathstr_operand.
23706 (print_path): Support [a-zA-Z].
23707
23708 2018-02-07 Richard Biener <rguenther@suse.de>
23709
23710 PR tree-optimization/84037
23711 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23712 (cse_and_gimplify_to_preheader): Declare.
23713 (vect_get_place_in_interleaving_chain): Likewise.
23714 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23715 ivexpr_map.
23716 (_loop_vec_info::~_loop_vec_info): Delete it.
23717 (cse_and_gimplify_to_preheader): New function.
23718 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23719 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23720 (vectorizable_load): Likewise. For grouped stores always base
23721 the IV on the first element.
23722 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23723 condition before gimplifying.
23724
23725 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23726
23727 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23728 *DIV_EXPR and *MOD_EXPR.
23729
23730 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
23731
23732 PR target/84248
23733 * config/i386/i386.c (ix86_option_override_internal): Mask out
23734 the CF_SET bit when checking -fcf-protection.
23735
23736 2018-02-07 Tom de Vries <tom@codesourcery.com>
23737
23738 PR libgomp/84217
23739 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23740 enough.
23741
23742 2018-02-07 Richard Biener <rguenther@suse.de>
23743
23744 PR tree-optimization/84204
23745 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23746 this place.
23747
23748 PR tree-optimization/84205
23749 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23750 special-case isl_ast_op_zdiv_r.
23751
23752 PR tree-optimization/84223
23753 * graphite-scop-detection.c (gather_bbs::before_dom_children):
23754 Only add conditions from within the region.
23755 (gather_bbs::after_dom_children): Adjust.
23756
23757 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
23758
23759 PR target/84209
23760 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23761 * config/avr/avr.md: Only post-reload split REG-REG moves if
23762 either register is GENERAL_REG_P.
23763
23764 2018-02-07 Jakub Jelinek <jakub@redhat.com>
23765
23766 PR tree-optimization/84235
23767 * tree-ssa-scopedtables.c
23768 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23769 if the subtraction is performed in floating point type where NaNs are
23770 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23771 build 1. Formatting fix.
23772
23773 2018-02-06 Jakub Jelinek <jakub@redhat.com>
23774
23775 PR target/84146
23776 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23777 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23778 and skip it regardless of bb boundaries. Use CALL_P macro,
23779 don't test INSN_P (insn) together with CALL_P or JUMP_P check
23780 unnecessarily, formatting fix.
23781
23782 2018-02-06 Michael Collison <michael.collison@arm.com>
23783
23784 * config/arm/thumb2.md:
23785 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
23786 (*thumb_mov_notscc): Ditto.
23787
23788 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
23789
23790 PR target/84154
23791 * config/rs6000/rs6000.md (su code attribute): Use "u" for
23792 unsigned_fix, not "s".
23793
23794 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
23795
23796 * configure.ac (gcc_fn_eh_frame_ro): New function.
23797 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
23798 correct .eh_frame permissions.
23799 * configure: Regenerate.
23800
23801 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
23802
23803 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
23804 irrelevant options.
23805
23806 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23807
23808 * config/rs6000/rs6000.c (rs6000_option_override_internal):
23809 Display warning message for -mno-speculate-indirect-jumps.
23810
23811 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
23812
23813 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
23814 Undocumented.
23815 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
23816
23817 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
23818
23819 PR tree-optimization/84225
23820 * tree-eh.c (find_trapping_overflow): Only call
23821 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
23822
23823 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23824
23825 PR target/84145
23826 * config/i386/i386.c: Reimplement the check of possible options
23827 -mibt/-mshstk conbination. Change error messages.
23828 * doc/invoke.texi: Fix a typo: remove extra '='.
23829
23830 2018-02-06 Marek Polacek <polacek@redhat.com>
23831
23832 PR tree-optimization/84228
23833 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
23834
23835 2018-02-06 Tamar Christina <tamar.christina@arm.com>
23836
23837 PR target/82641
23838 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
23839 emitted arch directives.
23840 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
23841 __ARM_FEATURE_COPROC before changing architectures.
23842
23843 2018-02-06 Richard Biener <rguenther@suse.de>
23844
23845 * config/i386/i386.c (print_reg): Fix typo.
23846 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
23847
23848 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
23849
23850 * configure: Regenerate.
23851
23852 2018-02-05 Martin Sebor <msebor@redhat.com>
23853
23854 PR tree-optimization/83369
23855 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
23856 inlining context.
23857
23858 2018-02-05 Martin Liska <mliska@suse.cz>
23859
23860 * doc/invoke.texi: Cherry-pick upstream r323995.
23861
23862 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
23863
23864 * ira.c (ira_init_register_move_cost): Adjust comment.
23865
23866 2018-02-05 Martin Liska <mliska@suse.cz>
23867
23868 PR gcov-profile/84137
23869 * doc/gcov.texi: Fix typo in documentation.
23870
23871 2018-02-05 Martin Liska <mliska@suse.cz>
23872
23873 PR gcov-profile/83879
23874 * doc/gcov.texi: Document necessity of --dynamic-list-data when
23875 using dlopen functionality.
23876
23877 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
23878
23879 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
23880 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
23881 _mm_maskz_range_ss, _mm_mask_range_round_ss,
23882 _mm_maskz_range_round_ss): New intrinsics.
23883 (__builtin_ia32_rangesd128_round)
23884 (__builtin_ia32_rangess128_round): Remove.
23885 (__builtin_ia32_rangesd128_mask_round,
23886 __builtin_ia32_rangess128_mask_round): New builtins.
23887 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
23888 __builtin_ia32_rangess128_round): Remove.
23889 (__builtin_ia32_rangesd128_mask_round,
23890 __builtin_ia32_rangess128_mask_round): New builtins.
23891 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
23892 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
23893 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
23894 "<round_saeonly_constraint>")): Changed to ...
23895 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
23896 "<round_saeonly_scalar_constraint>")): ... this.
23897 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23898 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23899 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23900 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23901 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23902
23903 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
23904
23905 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23906 options.
23907 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23908 Remove all values except native, 8540 and 8548.
23909
23910 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
23911
23912 * config/i386/i386.c (ix86_output_function_return): Pass
23913 INVALID_REGNUM, instead of -1, as invalid register number to
23914 indirect_thunk_name and output_indirect_thunk.
23915
23916 2018-02-02 Julia Koval <julia.koval@intel.com>
23917
23918 * config.gcc: Add -march=icelake.
23919 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23920 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23921 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23922 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23923 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23924 (processor_target_table): Add icelake.
23925 (ix86_option_override_internal): Handle new PTAs.
23926 (get_builtin_code_for_version): Handle icelake.
23927 (M_INTEL_COREI7_ICELAKE): New.
23928 (fold_builtin_cpu): Handle icelake.
23929 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23930 * doc/invoke.texi: Add -march=icelake.
23931
23932 2018-02-02 Julia Koval <julia.koval@intel.com>
23933
23934 * config/i386/i386.c (ix86_option_override_internal): Change flags type
23935 to wide_int_bitmask.
23936 * wide-int-bitmask.h: New.
23937
23938 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23939
23940 PR target/84066
23941 * config/i386/i386.md: Replace Pmode with word_mode in
23942 builtin_setjmp_setup and builtin_longjmp to support x32.
23943
23944 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
23945
23946 PR target/56010
23947 PR target/83743
23948 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23949 #include "opts.h".
23950 (rs6000_supported_cpu_names): New static variable.
23951 (linux_cpu_translation_table): Likewise.
23952 (elf_platform) <cpu>: Define new static variable and use it.
23953 Translate kernel AT_PLATFORM name to canonical name if needed.
23954 Error if platform name is unknown.
23955
23956 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
23957
23958 PR target/84089
23959 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23960
23961 2018-02-01 Jeff Law <law@redhat.com>
23962
23963 PR target/84128
23964 * config/i386/i386.c (release_scratch_register_on_entry): Add new
23965 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
23966 the scratch if RELEASE_VIA_POP is false.
23967 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23968 If we have to save a temporary register, decrement SIZE appropriately.
23969 Pass new arguments to release_scratch_register_on_entry.
23970 (ix86_adjust_stack_and_probe): Likewise.
23971 (ix86_emit_probe_stack_range): Pass new arguments to
23972 release_scratch_register_on_entry.
23973
23974 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
23975
23976 PR rtl-optimization/84157
23977 * combine.c (change_zero_ext): Use REG_P predicate in
23978 front of HARD_REGISTER_P predicate.
23979
23980 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
23981
23982 * config/avr/avr.c (avr_option_override): Move disabling of
23983 -fdelete-null-pointer-checks to...
23984 * common/config/avr/avr-common.c (avr_option_optimization_table):
23985 ...here.
23986
23987 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
23988
23989 PR tree-optimization/81635
23990 * tree-data-ref.c (split_constant_offset_1): For types that
23991 wrap on overflow, try to use range info to prove that wrapping
23992 cannot occur.
23993
23994 2018-02-01 Renlin Li <renlin.li@arm.com>
23995
23996 PR target/83370
23997 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23998 TAILCALL_ADDR_REGS.
23999 (aarch64_register_move_cost): Likewise.
24000 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24001 TAILCALL_ADDR_REGS.
24002 (REG_CLASS_NAMES): Likewise.
24003 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24004 TAILCALL_ADDR_REGS. Remove IP registers.
24005 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24006
24007 2018-02-01 Richard Biener <rguenther@suse.de>
24008
24009 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24010 for specifying RPO order and allow NULL for that.
24011 * domwalk.c (dom_walker::dom_walker): Likewise.
24012 (dom_walker::walk): Handle NULL RPO order.
24013 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24014 in RPO order.
24015 (rewrite_update_dom_walker): Likewise.
24016 (mark_def_dom_walker): Likewise.
24017
24018 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24019
24020 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24021 (aarch64_maybe_expand_sve_subreg_move): Declare.
24022 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24023 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24024 predicate.
24025 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24026 that are semantically a reverse operation.
24027 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24028 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24029 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24030 functions.
24031 (aarch64_can_change_mode_class): For big-endian, forbid changes
24032 between two SVE modes if they have different element sizes.
24033
24034 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24035
24036 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24037 the TImode handling for big-endian targets.
24038
24039 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24040
24041 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24042 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24043 not just bytes.
24044 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24045 Remove BSWAP handing for big-endian targets and use the form of
24046 LD1RQ appropariate for the mode.
24047
24048 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24049
24050 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24051 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24052 duplicated element.
24053
24054 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24055
24056 PR tearget/83845
24057 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24058 check for operands that need to go through aarch64_sve_reload_be.
24059
24060 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24061
24062 PR tree-optimization/81661
24063 PR tree-optimization/84117
24064 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24065 * tree-eh.c: Include gimplify.h.
24066 (find_trapping_overflow, replace_trapping_overflow,
24067 rewrite_to_non_trapping_overflow): New functions.
24068 * tree-vect-loop.c: Include tree-eh.h.
24069 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24070 * tree-data-ref.c: Include tree-eh.h.
24071 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24072
24073 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24074
24075 PR rtl-optimization/84123
24076 * combine.c (change_zero_ext): Check if hard register satisfies
24077 can_change_dest_mode before calling gen_lowpart_SUBREG.
24078
24079 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24080
24081 PR target/82444
24082 * ira.c (ira_init_register_move_cost): Remove assert.
24083
24084 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24085
24086 PR rtl-optimization/84071
24087 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24088 * doc/tm.texi: Regenerate.
24089
24090 2018-01-31 Richard Biener <rguenther@suse.de>
24091
24092 PR tree-optimization/84132
24093 * tree-data-ref.c (analyze_miv_subscript): Properly
24094 check whether evolution_function_is_affine_multivariate_p
24095 before calling gcd_of_steps_may_divide_p.
24096
24097 2018-01-31 Julia Koval <julia.koval@intel.com>
24098
24099 PR target/83618
24100 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24101 * config/i386/i386.md (rdpid_rex64) New.
24102 (rdpid): Make 32bit only.
24103
24104 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24105
24106 PR lto/84105
24107 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24108 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24109
24110 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24111
24112 Revert
24113 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24114
24115 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24116
24117 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24118
24119 PR rtl-optimization/84071
24120 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24121 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24122
24123 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24124
24125 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24126 (arc_attribute_table): Add 'aux' attribute.
24127 (arc_in_small_data_p): Consider aux like variables.
24128 (arc_is_aux_reg_p): New function.
24129 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24130 (arc_get_aux_arg): New function.
24131 (prepare_move_operands): Handle aux-register access.
24132 (arc_handle_aux_attribute): New function.
24133 * doc/extend.texi (ARC Variable attributes): Add subsection.
24134
24135 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24136
24137 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24138 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24139 (arc_attribute_table): Add 'uncached' attribute.
24140 (arc_print_operand): Print '.di' flag for uncached memory
24141 accesses.
24142 (arc_in_small_data_p): Do not consider for small data the uncached
24143 types.
24144 (arc_is_uncached_mem_p): New function.
24145 * config/arc/predicates.md (compact_store_memory_operand): Check
24146 for uncached memory accesses.
24147 (nonvol_nonimm_operand): Likewise.
24148 * doc/extend.texi (ARC Type Attribute): New subsection.
24149
24150 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24151
24152 PR c/84100
24153 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24154 falign-loops=): Add Optimization flag.
24155
24156 2018-01-30 Jeff Law <law@redhat.com>
24157
24158 PR target/84064
24159 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24160 INT_REGISTERS_SAVED. Check it prior to calling
24161 get_scratch_register_on_entry.
24162 (ix86_adjust_stack_and_probe): Similarly.
24163 (ix86_emit_probe_stack_range): Similarly.
24164 (ix86_expand_prologue): Corresponding changes.
24165
24166 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24167
24168 PR target/40411
24169 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24170 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24171
24172 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24173
24174 PR target/84112
24175 * lra-constraints.c (curr_insn_transform): Process AND in the
24176 address.
24177
24178 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24179
24180 PR rtl-optimization/83986
24181 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24182 dependence against last_pending_memory_flush in addition to
24183 pending_jump_insns.
24184
24185 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24186
24187 PR tree-optimization/81611
24188 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24189 copies.
24190
24191 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24192
24193 PR target/83758
24194 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24195 a reg rtx.
24196
24197 2018-01-30 Richard Biener <rguenther@suse.de>
24198 Jakub Jelinek <jakub@redhat.com>
24199
24200 PR tree-optimization/84111
24201 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24202 inner loops added during recursion, as they don't have up-to-date
24203 SSA form.
24204
24205 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24206
24207 PR ipa/81360
24208 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24209 (can_inline_edge_by_limits_p): ... here.
24210 (can_early_inline_edge_p, check_callers,
24211 update_caller_keys, update_callee_keys, recursive_inlining,
24212 add_new_edges_to_heap, speculation_useful_p,
24213 inline_small_functions,
24214 inline_small_functions, flatten_function,
24215 inline_to_all_callers_1): Update.
24216
24217 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24218
24219 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24220 zeros correctly.
24221
24222 2018-01-30 Richard Biener <rguenther@suse.de>
24223
24224 PR tree-optimization/83008
24225 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24226 invariant and constant vector uses in stmts when they need
24227 more than one stmt.
24228
24229 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24230
24231 PR bootstrap/84017
24232 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24233 * configure: Regenerate.
24234
24235 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24236
24237 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24238 pattern.
24239 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24240 Use gen_rtx_REG rather than gen_lowpart.
24241
24242 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24243
24244 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24245 rather than 0 when creating partial subregs.
24246
24247 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24248
24249 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24250 of usage.
24251
24252 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24253
24254 PR target/81550
24255 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24256 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24257 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24258 flags. This restores the settings used before the 2017-07-24.
24259 Turning off pre increment/decrement/modify allows IVOPTS to
24260 optimize DF/SF loops where the index is an int.
24261
24262 2018-01-29 Richard Biener <rguenther@suse.de>
24263 Kelvin Nilsen <kelvin@gcc.gnu.org>
24264
24265 PR bootstrap/80867
24266 * tree-vect-stmts.c (vectorizable_call): Don't call
24267 targetm.vectorize_builtin_md_vectorized_function if callee is
24268 NULL.
24269
24270 2018-01-22 Carl Love <cel@us.ibm.com>
24271
24272 * doc/extend.tex: Fix typo in second arg in
24273 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24274
24275 2018-01-29 Richard Biener <rguenther@suse.de>
24276
24277 PR tree-optimization/84086
24278 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24279 (flush_ssaname_freelist): When SSA names were released reset
24280 the SCEV hash table.
24281
24282 2018-01-29 Richard Biener <rguenther@suse.de>
24283
24284 PR tree-optimization/84057
24285 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24286 removed paths when removing edges.
24287
24288 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24289
24290 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24291 -mfunction-return=@var{choice}.
24292
24293 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24294
24295 PR diagnostic/84034
24296 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24297 Handle CR like TAB.
24298 (layout::print_source_line): Likewise.
24299 (test_get_line_width_without_trailing_whitespace): Add test cases.
24300
24301 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24302
24303 PR middle-end/84040
24304 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24305 debug insns.
24306
24307 2018-01-26 Jim Wilson <jimw@sifive.com>
24308
24309 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24310
24311 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24312 specified.
24313
24314 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24315
24316 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24317 and CMP + SUB-immediate -> SUBS.
24318
24319 2018-01-26 Martin Sebor <msebor@redhat.com>
24320
24321 PR tree-optimization/83896
24322 * tree-ssa-strlen.c (get_string_len): Rename...
24323 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24324 Avoid assuming length is constant.
24325 (handle_char_store): Use HOST_WIDE_INT for string length.
24326
24327 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24328
24329 PR target/81763
24330 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24331 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24332
24333 2018-01-26 Richard Biener <rguenther@suse.de>
24334
24335 PR rtl-optimization/84003
24336 * dse.c (record_store): Only record redundant stores when
24337 the earlier store aliases at least all accesses the later one does.
24338
24339 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24340
24341 PR rtl-optimization/83985
24342 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24343 REG_CFA_RESTORE insns.
24344 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24345 REG_CFA_RESTORE insns here.
24346
24347 PR c/83989
24348 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24349 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24350
24351 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24352
24353 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24354 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24355 (arc_init): Likewise.
24356 (arc_override_options): Likewise.
24357 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24358 value.
24359 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24360 support.
24361 * config/arc/arc.h (TARGET_DBNZ): Define.
24362 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24363 properly set the tune attribute.
24364 (dbnz): Use TARGET_DBNZ guard.
24365 * config/arc/arc.opt (mtune): Add core3 option.
24366
24367 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24368
24369 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24370 recognize new pic like addresses.
24371 (arc_delegitimize_address): Clean up.
24372
24373 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24374
24375 * config/arc/arc-arches.def: Option mrf16 valid for all
24376 architectures.
24377 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24378 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24379 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24380 * config/arc/arc-tables.opt: Regenerate.
24381 * config/arc/arc.c (arc_conditional_register_usage): Handle
24382 reduced register file case.
24383 (arc_file_start): Set must have build attributes.
24384 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24385 mrf16 option value.
24386 * config/arc/arc.opt (mrf16): Add new option.
24387 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24388 * config/arc/genmultilib.awk: Handle new mrf16 option.
24389 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24390 * config/arc/t-multilib: Regenerate.
24391 * doc/invoke.texi (ARC Options): Document mrf16 option.
24392
24393 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24394
24395 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24396 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24397 (arc_attribute_table): Add 'secure_call' attribute.
24398 (arc_print_operand): Print secure call operand.
24399 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24400 secure.
24401 (arc_is_secure_call_p): New function. * config/arc/arc.md
24402 (call_i): Add support for sjli instruction.
24403 (call_value_i): Likewise.
24404 * config/arc/constraints.md (Csc): New constraint.
24405
24406 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24407 John Eric Martin <John.Martin@emmicro-us.com>
24408
24409 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24410 * config/arc/arc.c (_arc_jli_section): New struct.
24411 (arc_jli_section): New type.
24412 (rc_jli_sections): New static variable.
24413 (arc_handle_jli_attribute): New function.
24414 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24415 (arc_file_end): New function.
24416 (TARGET_ASM_FILE_END): Define.
24417 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24418 (arc_add_jli_section): New function.
24419 (jli_call_scan): Likewise.
24420 (arc_reorg): Call jli_call_scan.
24421 (arc_output_addsi): Remove 'S' from printing asm operand.
24422 (arc_is_jli_call_p): New function.
24423 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24424 operand.
24425 (movhi_insn): Likewise.
24426 (movsi_insn): Likewise.
24427 (movsi_set_cc_insn): Likewise.
24428 (loadqi_update): Likewise.
24429 (load_zeroextendqisi_update): Likewise.
24430 (load_signextendqisi_update): Likewise.
24431 (loadhi_update): Likewise.
24432 (load_zeroextendhisi_update): Likewise.
24433 (load_signextendhisi_update): Likewise.
24434 (loadsi_update): Likewise.
24435 (loadsf_update): Likewise.
24436 (movsicc_insn): Likewise.
24437 (bset_insn): Likewise.
24438 (bxor_insn): Likewise.
24439 (bclr_insn): Likewise.
24440 (bmsk_insn): Likewise.
24441 (bicsi3_insn): Likewise.
24442 (cmpsi_cc_c_insn): Likewise.
24443 (movsi_ne): Likewise.
24444 (movsi_cond_exec): Likewise.
24445 (clrsbsi2): Likewise.
24446 (norm_f): Likewise.
24447 (normw): Likewise.
24448 (swap): Likewise.
24449 (divaw): Likewise.
24450 (flag): Likewise.
24451 (sr): Likewise.
24452 (kflag): Likewise.
24453 (ffs): Likewise.
24454 (ffs_f): Likewise.
24455 (fls): Likewise.
24456 (call_i): Remove 'S' asm letter, add jli instruction.
24457 (call_value_i): Likewise.
24458 * config/arc/arc.op (mjli-always): New option.
24459 * config/arc/constraints.md (Cji): New constraint.
24460 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24461 operand.
24462 (subsf3_fpx): Likewise.
24463 (mulsf3_fpx): Likewise.
24464 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24465 asm operand.
24466 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24467 function attrbutes.
24468 * doc/invoke.texi (ARC): Document mjli-always option.
24469
24470 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24471
24472 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24473 avoid addition with 0 and use incw and decw where possible.
24474
24475 2018-01-26 Richard Biener <rguenther@suse.de>
24476
24477 PR tree-optimization/81082
24478 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24479 association if it requires casting to unsigned.
24480 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24481 from fold_plusminus_mult_expr to catch important cases late when
24482 range info is available.
24483
24484 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24485
24486 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24487 * configure.ac (hidden_linkonce): New test.
24488 * configure: Regenerate.
24489 * config.in: Regenerate.
24490
24491 2018-01-26 Julia Koval <julia.koval@intel.com>
24492
24493 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24494 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24495 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24496 _mm_mask_bitshuffle_epi64_mask): Fix type.
24497 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24498 USI_FTYPE_V4DI_V4DI_USI): Remove.
24499 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24500 __builtin_ia32_vpshufbitqmb256_mask,
24501 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24502 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24503 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24504
24505 2018-01-26 Alan Modra <amodra@gmail.com>
24506
24507 PR target/84033
24508 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24509 UNSPEC_VBPERMQ. Sort other unspecs.
24510
24511 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24512
24513 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24514
24515 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24516
24517 PR middle-end/83055
24518 * predict.c (drop_profile): Do not push/pop cfun; update also
24519 node->count.
24520 (handle_missing_profiles): Fix logic looking for zero profiles.
24521
24522 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24523
24524 PR middle-end/83977
24525 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24526 on functions with #pragma omp declare simd or functions with simd
24527 attribute.
24528 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24529 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24530 Remove trailing \n from warning_at calls.
24531
24532 2018-01-25 Tom de Vries <tom@codesourcery.com>
24533
24534 PR target/84028
24535 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24536 for neutered workers.
24537
24538 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24539
24540 PR target/68467
24541 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24542 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24543
24544 2018-01-24 Jeff Law <law@redhat.com>
24545
24546 PR target/83994
24547 * i386.c (get_probe_interval): Move to earlier point.
24548 (ix86_compute_frame_layout): If -fstack-clash-protection and
24549 the frame is larger than the probe interval, then use pushes
24550 to save registers rather than reg->mem moves.
24551 (ix86_expand_prologue): Remove conditional for int_registers_saved
24552 assertion.
24553
24554 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24555
24556 PR target/84014
24557 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24558 min/max for never referenced object.
24559
24560 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24561
24562 PR middle-end/83977
24563 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24564 here.
24565 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24566 attributes from DECL_ATTRIBUTES (decl) without affecting
24567 DECL_ATTRIBUTES (current_function_decl).
24568 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24569 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24570
24571 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24572
24573 PR tree-optimization/83979
24574 * fold-const.c (fold_comparison): Use constant_boolean_node
24575 instead of boolean_{true,false}_node.
24576
24577 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24578
24579 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24580 with zero counts.
24581
24582 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24583
24584 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24585 Simplify the clause that sets the length attribute.
24586 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24587 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24588 clause that sets the length attribute.
24589 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24590
24591 2018-01-24 Tom de Vries <tom@codesourcery.com>
24592
24593 PR target/83589
24594 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24595 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24596 Add strict parameter.
24597 (prevent_branch_around_nothing): Insert dummy insn between branch to
24598 label and label with no ptx insn inbetween.
24599 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24600
24601 2018-01-24 Tom de Vries <tom@codesourcery.com>
24602
24603 PR target/81352
24604 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24605 for neutered threads in warp.
24606 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24607
24608 2018-01-24 Richard Biener <rguenther@suse.de>
24609
24610 PR tree-optimization/83176
24611 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24612 operands.
24613
24614 2018-01-24 Richard Biener <rguenther@suse.de>
24615
24616 PR tree-optimization/82819
24617 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24618 code generating pluses that are no-ops in the target precision.
24619
24620 2018-01-24 Richard Biener <rguenther@suse.de>
24621
24622 PR middle-end/84000
24623 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24624
24625 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24626
24627 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24628 to merge probabilities.
24629 * predict.c (probably_never_executed): Also mark as cold functions
24630 with global 0 profile and guessed local profile.
24631 * profile-count.c (profile_probability::combine_with_count): New
24632 member function.
24633 * profile-count.h (profile_probability::operator*,
24634 profile_probability::operator*=, profile_probability::operator/,
24635 profile_probability::operator/=): Reduce precision to adjusted
24636 and set value to guessed on contradictory divisions.
24637 (profile_probability::combine_with_freq): Remove.
24638 (profile_probability::combine_wiht_count): Declare.
24639 (profile_count::force_nonzero):: Set to adjusted.
24640 (profile_count::probability_in):: Set quality to adjusted.
24641 * tree-ssa-tail-merge.c (replace_block_by): Use
24642 combine_with_count.
24643
24644 2018-01-23 Andrew Waterman <andrew@sifive.com>
24645 Jim Wilson <jimw@sifive.com>
24646
24647 * config/riscv/riscv.c (riscv_stack_boundary): New.
24648 (riscv_option_override): Set riscv_stack_boundary. Handle
24649 riscv_preferred_stack_boundary_arg.
24650 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24651 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24652 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24653 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24654 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24655 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24656
24657 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24658
24659 PR target/83905
24660 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24661 of struct ix86_frame.
24662 (ix86_expand_epilogue): Likewise. Add a local variable for
24663 the reg_save_offset field in struct ix86_frame.
24664
24665 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24666
24667 PR tree-optimization/82604
24668 * tree-loop-distribution.c (enum partition_kind): New enum item
24669 PKIND_PARTIAL_MEMSET.
24670 (partition_builtin_p): Support above new enum item.
24671 (generate_code_for_partition): Ditto.
24672 (compute_access_range): Differentiate cases that equality can be
24673 proven at all loops, the innermost loops or no loops.
24674 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24675 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24676 (finalize_partitions, distribute_loop): Don't fuse partition of
24677 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24678 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24679 parloop is enabled.
24680
24681 2018-01-23 Martin Liska <mliska@suse.cz>
24682
24683 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24684 order to ignore the predictor.
24685 (PRED_POLYMORPHIC_CALL): Likewise.
24686 (PRED_RECURSIVE_CALL): Likewise.
24687
24688 2018-01-23 Martin Liska <mliska@suse.cz>
24689
24690 * tree-profile.c (tree_profiling): Print function header to
24691 aware reader which function we are working on.
24692 * value-prof.c (gimple_find_values_to_profile): Do not print
24693 not interesting value histograms.
24694
24695 2018-01-23 Martin Liska <mliska@suse.cz>
24696
24697 * profile-count.h (enum profile_quality): Add
24698 profile_uninitialized as the first value. Do not number values
24699 as they are zero based.
24700 (profile_count::verify): Update sanity check.
24701 (profile_probability::verify): Likewise.
24702
24703 2018-01-23 Nathan Sidwell <nathan@acm.org>
24704
24705 * doc/invoke.texi (ffor-scope): Deprecate.
24706
24707 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24708
24709 PR tree-optimization/83510
24710 * domwalk.c (set_all_edges_as_executable): New function.
24711 (dom_walker::dom_walker): Convert bool param
24712 "skip_unreachable_blocks" to enum reachability. Move setup of
24713 edge flags to set_all_edges_as_executable and only do it when
24714 reachability is REACHABLE_BLOCKS.
24715 * domwalk.h (enum dom_walker::reachability): New enum.
24716 (dom_walker::dom_walker): Convert bool param
24717 "skip_unreachable_blocks" to enum reachability.
24718 (set_all_edges_as_executable): New decl.
24719 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
24720 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24721 "reachability".
24722 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24723 but converting true to REACHABLE_BLOCKS.
24724 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24725 * tree-vrp.c
24726 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24727 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24728 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24729 REACHABLE_BLOCKS.
24730 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24731 if check_all_array_refs will be called.
24732
24733 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24734
24735 * tree.c (selftest::test_location_wrappers): Add more test
24736 coverage.
24737
24738 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24739
24740 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24741 (selftest::test_bit_in_range): Likewise.
24742
24743 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24744
24745 PR testsuite/83888
24746 * doc/sourcebuild.texi (vect_float): Say that the selector
24747 only describes the situation when -funsafe-math-optimizations is on.
24748 (vect_float_strict): Document.
24749
24750 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
24751
24752 PR tree-optimization/83965
24753 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24754 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24755 instead of checking only for a reduction.
24756 (vect_recog_widen_sum_pattern): Likewise.
24757
24758 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24759
24760 * predict.c (probably_never_executed): Only use precise profile info.
24761 (compute_function_frequency): Skip after inlining hack since we now
24762 have quality checking.
24763
24764 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24765
24766 * profile-count.h (profile_probability::very_unlikely,
24767 profile_probability::unlikely, profile_probability::even): Set
24768 precision to guessed.
24769
24770 2018-01-23 Richard Biener <rguenther@suse.de>
24771
24772 PR tree-optimization/83963
24773 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24774 Properly terminate dominator walk when crossing the exit edge not
24775 when visiting its source block.
24776
24777 2018-01-23 Jakub Jelinek <jakub@redhat.com>
24778
24779 PR c++/83918
24780 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24781 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
24782
24783 2018-01-22 Jakub Jelinek <jakub@redhat.com>
24784
24785 PR tree-optimization/83957
24786 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
24787 semicolon after for body surrounded by braces.
24788
24789 PR tree-optimization/83081
24790 * profile-count.h (profile_probability::split): New method.
24791 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
24792 Use profile_probability::split.
24793 (do_compare_rtx_and_jump): Fix adjustment of probabilities
24794 when splitting a single conditional jump into 2.
24795
24796 2018-01-22 David Malcolm <dmalcolm@redhat.com>
24797
24798 PR tree-optimization/69452
24799 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
24800 decl.
24801
24802 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24803
24804 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
24805 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
24806 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
24807
24808 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24809
24810 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
24811 declaration.
24812 * config/rl78/rl78.md (movdi): New define_expand.
24813 * config/rl78/rl78.c (rl78_split_movdi): New function.
24814
24815 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
24816
24817 PR target/83862
24818 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
24819 no longer used.
24820 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
24821 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
24822 128-bit to produce an UNSPEC move to get the double word with the
24823 signbit and then a shift directly to do signbit.
24824 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
24825 implementation with a new version that just does either a direct
24826 move or a regular move. Move memory interface to separate insns.
24827 Move insns so they are next to the expander.
24828 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
24829 with signbit move. Split big and little endian case.
24830 (signbit<mode>2_dm_mem_le): Likewise.
24831 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
24832 (signbit<mode>2_dm2): Likewise.
24833
24834 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24835
24836 * config/rl78/rl78.md (anddi3): New define_expand.
24837
24838 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24839
24840 * config/rl78/rl78.md (umindi3): New define_expand.
24841
24842 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24843
24844 * config/rl78/rl78.md (smindi3): New define_expand.
24845
24846 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24847
24848 * config/rl78/rl78.md (smaxdi3): New define_expand.
24849
24850 2018-01-22 Carl Love <cel@us.ibm.com>
24851
24852 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
24853 LVX_V1TI): Add macro expansion.
24854 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
24855 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
24856 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
24857 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
24858 Change check to determine if the instruction is a byte reversing
24859 entry. Fix typo in comment.
24860 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
24861 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
24862 Add def_builtin calls for new builtins.
24863 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
24864 Add define_insn expansion.
24865
24866 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24867
24868 * config/rl78/rl78.md (umaxdi3): New define_expand.
24869
24870 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
24871
24872 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
24873 for non-QImode registers.
24874
24875 2018-01-22 Richard Biener <rguenther@suse.de>
24876
24877 PR tree-optimization/83963
24878 * graphite-scop-detection.c (scop_detection::get_sese): Delay
24879 including the loop exit block.
24880 (scop_detection::merge_sese): Likewise.
24881 (scop_detection::add_scop): Do it here instead.
24882
24883 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24884
24885 * doc/sourcebuild.texi (arm_softfloat): Document.
24886
24887 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
24888
24889 PR gcc/77734
24890 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
24891 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
24892 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
24893
24894 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24895 David Edelsohn <dje.gcc@gmail.com>
24896
24897 PR target/83946
24898 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24899 Change "crset eq" to "crset 2".
24900 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24901 (*call_indirect_aix<mode>_nospec): Likewise.
24902 (*call_value_indirect_aix<mode>_nospec): Likewise.
24903 (*call_indirect_elfv2<mode>_nospec): Likewise.
24904 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24905 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24906 change assembly output from . to $.
24907 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24908 (indirect_jump<mode>_nospec): Change assembly output from . to $.
24909 (*tablejump<mode>_internal1_nospec): Likewise.
24910
24911 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
24912
24913 PR target/80870
24914 * config/sh/sh_optimize_sett_clrt.cc:
24915 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24916
24917 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
24918
24919 PR tree-optimization/83940
24920 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24921 offset_dt to vect_constant_def rather than vect_unknown_def_type.
24922 (vect_check_load_store_mask): Add a mask_dt_out parameter and
24923 use it to pass back the definition type.
24924 (vect_check_store_rhs): Likewise rhs_dt_out.
24925 (vect_build_gather_load_calls): Add a mask_dt argument and use
24926 it instead of a call to vect_is_simple_use.
24927 (vectorizable_store): Update calls to vect_check_load_store_mask
24928 and vect_check_store_rhs. Use the dt returned by the latter instead
24929 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
24930 instead of calls to vect_is_simple_use. Pass the scalar rather
24931 than the vector operand to vect_is_simple_use when handling
24932 second and subsequent copies of an rhs value.
24933 (vectorizable_load): Update calls to vect_check_load_store_mask
24934 and vect_build_gather_load_calls. Use the cached mask_dt and
24935 gs_info.offset_dt instead of calls to vect_is_simple_use.
24936
24937 2018-01-20 Jakub Jelinek <jakub@redhat.com>
24938
24939 PR middle-end/83945
24940 * tree-emutls.c: Include gimplify.h.
24941 (lower_emutls_2): New function.
24942 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24943 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24944 it before further processing.
24945
24946 PR target/83930
24947 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24948 UINTVAL (trueop1) instead of INTVAL (op1).
24949
24950 2018-01-19 Jakub Jelinek <jakub@redhat.com>
24951
24952 PR debug/81570
24953 PR debug/83728
24954 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24955 INCOMING_FRAME_SP_OFFSET if not defined.
24956 (scan_trace): Add ENTRY argument. If true and
24957 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24958 emit a note to adjust the CFA offset.
24959 (create_cfi_notes): Adjust scan_trace callers.
24960 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24961 INCOMING_FRAME_SP_OFFSET in the CIE.
24962 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24963 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24964 Likewise.
24965 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24966 * doc/tm.texi: Regenerated.
24967
24968 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24969
24970 PR rtl-optimization/83147
24971 * lra-constraints.c (remove_inheritance_pseudos): Use
24972 lra_substitute_pseudo_within_insn.
24973
24974 2018-01-19 Tom de Vries <tom@codesourcery.com>
24975 Cesar Philippidis <cesar@codesourcery.com>
24976
24977 PR target/83920
24978 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24979
24980 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
24981
24982 PR target/83790
24983 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24984 spaces for function labels.
24985
24986 2018-01-19 Martin Liska <mliska@suse.cz>
24987
24988 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24989 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24990 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24991 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24992 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24993 (PRED_CONST_RETURN): Change from 69 to 65.
24994 (PRED_NULL_RETURN): Change from 91 to 71.
24995 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24996 (PRED_LOOP_GUARD): Change from 66 to 73.
24997
24998 2018-01-19 Martin Liska <mliska@suse.cz>
24999
25000 * predict.c (predict_insn_def): Add new assert.
25001 (struct branch_predictor): Change type to signed integer.
25002 (test_prediction_value_range): Amend test to cover
25003 PROB_UNINITIALIZED.
25004 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25005 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25006 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25007 (PRED_LOOP_IV_COMPARE): Likewise.
25008 * predict.h (PROB_UNINITIALIZED): Define new constant.
25009
25010 2018-01-19 Martin Liska <mliska@suse.cz>
25011
25012 * predict.c (dump_prediction): Add new format for
25013 analyze_brprob.py script which is enabled with -details
25014 suboption.
25015 * profile-count.h (precise_p): New function.
25016
25017 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25018
25019 PR tree-optimization/83922
25020 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25021 there are no statements that need masking.
25022 (vect_active_double_reduction_p): New function.
25023 (vect_analyze_loop_operations): Use it when handling phis that
25024 are not in the loop header.
25025
25026 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25027
25028 PR tree-optimization/83914
25029 * tree-vect-loop.c (vectorizable_induction): Don't convert
25030 init_expr or apply the peeling adjustment for inductions
25031 that are nested within the vectorized loop.
25032
25033 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25034
25035 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25036 instead of NEG.
25037
25038 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25039
25040 PR sanitizer/81715
25041 PR testsuite/83882
25042 * function.h (gimplify_parameters): Add gimple_seq * argument.
25043 * function.c: Include gimple.h and options.h.
25044 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25045 for the added local temporaries if needed.
25046 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25047 if there are any parameter cleanups, wrap whole body into a
25048 try/finally with the cleanups.
25049
25050 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25051
25052 PR target/82964
25053 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25054 Use GET_MODE_CLASS for scalar floating point.
25055
25056 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25057
25058 PR ipa/82256
25059 patch by PaX Team
25060 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25061 Fix call of call_cgraph_insertion_hooks.
25062
25063 2018-01-18 Martin Sebor <msebor@redhat.com>
25064
25065 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25066
25067 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25068
25069 PR ipa/83619
25070 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25071 frequencies.
25072
25073 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25074
25075 PR other/70268
25076 * common.opt: (-ffile-prefix-map): New option.
25077 * opts.c (common_handle_option): Defer it.
25078 * opts-global.c (handle_common_deferred_options): Handle it.
25079 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25080 * file-prefix-map.h: New file.
25081 (remap_debug_filename, add_debug_prefix_map): ...here.
25082 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25083 * final.c (debug_prefix_map, add_debug_prefix_map
25084 remap_debug_filename): Move to...
25085 * file-prefix-map.c: New file.
25086 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25087 generalize, get rid of alloca(), use strrchr() instead of strchr().
25088 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25089 Implement in terms of add_prefix_map().
25090 (remap_macro_filename, remap_debug_filename): Implement in term of
25091 remap_filename().
25092 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25093 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25094 * dbxout.c: Include file-prefix-map.h.
25095 * varasm.c: Likewise.
25096 * vmsdbgout.c: Likewise.
25097 * xcoffout.c: Likewise.
25098 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25099 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25100 * doc/invoke.texi (-ffile-prefix-map): Document.
25101 (-fdebug-prefix-map): Update description.
25102
25103 2018-01-18 Martin Liska <mliska@suse.cz>
25104
25105 * config/i386/i386.c (indirect_thunk_name): Document that also
25106 lfence is emitted.
25107 (output_indirect_thunk): Document why both instructions
25108 (pause and lfence) are generated.
25109
25110 2018-01-18 Richard Biener <rguenther@suse.de>
25111
25112 PR tree-optimization/83887
25113 * graphite-scop-detection.c
25114 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25115 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25116 (scop_detection::merge_sese): Re-implement with a flood-fill
25117 algorithm that properly finds a SESE region if it exists.
25118
25119 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25120
25121 PR c/61240
25122 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25123 pointer_diff optimizations use view_convert instead of convert.
25124
25125 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25126
25127 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25128 Generate different code for -mno-speculate-indirect-jumps.
25129 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25130 (*call_indirect_aix<mode>): Disable for
25131 -mno-speculate-indirect-jumps.
25132 (*call_indirect_aix<mode>_nospec): New define_insn.
25133 (*call_value_indirect_aix<mode>): Disable for
25134 -mno-speculate-indirect-jumps.
25135 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25136 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25137 -mno-speculate-indirect-jumps.
25138 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25139
25140 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25141
25142 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25143 long double type, set the flags for noting the default long double
25144 type, even if we don't pass or return a long double type.
25145
25146 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25147
25148 PR ipa/83051
25149 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25150 failure.
25151
25152 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25153
25154 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25155 support for merge[hl].
25156 (fold_mergehl_helper): New helper function.
25157 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25158 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25159 (altivec_vmrglw_direct): Add xxmrglw insn.
25160
25161 2018-01-17 Andrew Waterman <andrew@sifive.com>
25162
25163 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25164 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25165
25166 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25167
25168 PR lto/83121
25169 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25170 call the lto_location_cache before reading the
25171 DECL_SOURCE_LOCATION of the types.
25172
25173 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25174 Richard Sandiford <richard.sandiford@linaro.org>
25175
25176 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25177 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25178 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25179 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25180 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25181 Add declaration.
25182 * config/aarch64/constraints.md (aarch64_movti_operand):
25183 Limit immediates.
25184 * config/aarch64/predicates.md (Uti): Add new constraint.
25185
25186 2018-01-17 Carl Love <cel@us.ibm.com>
25187
25188 * config/rs6000/vsx.md (define_expand xl_len_r,
25189 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25190 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25191 lxvll.
25192 (define_expand, define_insn): Move the shift left from the
25193 define_insn to the define_expand for lxvl and stxvl instructions.
25194 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25195 and XL_LEN_R definitions to PURE.
25196
25197 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25198
25199 * config/i386/i386.c (indirect_thunk_name): Declare regno
25200 as unsigned int. Compare regno with INVALID_REGNUM.
25201 (output_indirect_thunk): Ditto.
25202 (output_indirect_thunk_function): Ditto.
25203 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25204 in the call to output_indirect_thunk_function.
25205
25206 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25207
25208 PR middle-end/83884
25209 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25210 rather than the size of inner_type to determine the stack slot size
25211 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25212
25213 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25214
25215 PR target/83546
25216 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25217 to PTA_SILVERMONT.
25218
25219 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25220
25221 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25222 endian Linux systems to optionally enable multilibs for selecting
25223 the long double type if the user configured an explicit type.
25224 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25225 have no long double multilibs if not defined.
25226 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25227 warn if the user used -mabi={ieee,ibm}longdouble and we built
25228 multilibs for long double.
25229 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25230 appropriate multilib option.
25231 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25232 multilib options.
25233 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25234 for building long double multilibs.
25235 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25236
25237 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25238
25239 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25240 copies.
25241
25242 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25243 64 bits.
25244 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25245 128 bits.
25246
25247 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25248 variables.
25249
25250 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25251 return value.
25252
25253 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25254
25255 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25256 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25257
25258 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25259
25260 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25261 different rtl trees depending on TARGET_64BIT.
25262 (rs6000_gen_lvx): Likewise.
25263
25264 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25265
25266 * config/visium/visium.md (nop): Tweak comment.
25267 (hazard_nop): Likewise.
25268
25269 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25270
25271 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25272 -mspeculate-indirect-jumps.
25273 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25274 for -mno-speculate-indirect-jumps.
25275 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25276 (*call_value_indirect_elfv2<mode>): Disable for
25277 -mno-speculate-indirect-jumps.
25278 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25279 (indirect_jump): Emit different RTL for
25280 -mno-speculate-indirect-jumps.
25281 (*indirect_jump<mode>): Disable for
25282 -mno-speculate-indirect-jumps.
25283 (*indirect_jump<mode>_nospec): New define_insn.
25284 (tablejump): Emit different RTL for
25285 -mno-speculate-indirect-jumps.
25286 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25287 (tablejumpsi_nospec): New define_expand.
25288 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25289 (tablejumpdi_nospec): New define_expand.
25290 (*tablejump<mode>_internal1): Disable for
25291 -mno-speculate-indirect-jumps.
25292 (*tablejump<mode>_internal1_nospec): New define_insn.
25293 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25294 option.
25295
25296 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25297
25298 * caller-save.c (insert_save): Drop unnecessary parameter. All
25299 callers updated.
25300
25301 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25302 Richard Biener <rguenth@suse.de>
25303
25304 PR libgomp/83590
25305 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25306 return early, inline manually is_gimple_sizepos. Make sure if we
25307 call gimplify_expr we don't end up with a gimple constant.
25308 * tree.c (variably_modified_type_p): Don't return true for
25309 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25310 * gimplify.h (is_gimple_sizepos): Remove.
25311
25312 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25313
25314 PR tree-optimization/83857
25315 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25316 vectorizable_live_operation for pure SLP statements.
25317 (vectorizable_live_operation): Handle PHIs.
25318
25319 2018-01-16 Richard Biener <rguenther@suse.de>
25320
25321 PR tree-optimization/83867
25322 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25323 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25324
25325 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25326
25327 PR c/83844
25328 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25329 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25330 If off is not INTEGER_CST, issue a may not be aligned warning
25331 rather than isn't aligned. Use isn%'t rather than isn't.
25332 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25333 into MULT_EXPR.
25334 <case MULT_EXPR>: Improve the case when bottom and one of the
25335 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25336 operand, in that case check if the other operand is multiple of
25337 bottom divided by the INTEGER_CST operand.
25338
25339 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25340
25341 PR target/83858
25342 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25343 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25344 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25345 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25346 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25347 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25348 (pa_function_arg_size): New function.
25349
25350 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25351
25352 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25353 in a separate statement.
25354
25355 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25356
25357 PR tree-optimization/83847
25358 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25359 group gathers and scatters.
25360
25361 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25362
25363 PR rtl-optimization/86620
25364 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25365
25366 PR rtl-optimization/83213
25367 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25368 to last if both are JUMP_INSNs.
25369
25370 PR tree-optimization/83843
25371 * gimple-ssa-store-merging.c
25372 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25373 store_immediate_info for bswap/nop orig_stores.
25374
25375 2018-01-15 Andrew Waterman <andrew@sifive.com>
25376
25377 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25378 !TARGET_MUL.
25379 <UDIV>: Increase cost if !TARGET_DIV.
25380
25381 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25382
25383 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25384 (define_attr "cr_logical_3op"): New.
25385 (cceq_ior_compare): Adjust.
25386 (cceq_ior_compare_complement): Adjust.
25387 (*cceq_rev_compare): Adjust.
25388 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25389 (is_cracked_insn): Adjust.
25390 (insn_must_be_first_in_group): Adjust.
25391 * config/rs6000/40x.md: Adjust.
25392 * config/rs6000/440.md: Adjust.
25393 * config/rs6000/476.md: Adjust.
25394 * config/rs6000/601.md: Adjust.
25395 * config/rs6000/603.md: Adjust.
25396 * config/rs6000/6xx.md: Adjust.
25397 * config/rs6000/7450.md: Adjust.
25398 * config/rs6000/7xx.md: Adjust.
25399 * config/rs6000/8540.md: Adjust.
25400 * config/rs6000/cell.md: Adjust.
25401 * config/rs6000/e300c2c3.md: Adjust.
25402 * config/rs6000/e500mc.md: Adjust.
25403 * config/rs6000/e500mc64.md: Adjust.
25404 * config/rs6000/e5500.md: Adjust.
25405 * config/rs6000/e6500.md: Adjust.
25406 * config/rs6000/mpc.md: Adjust.
25407 * config/rs6000/power4.md: Adjust.
25408 * config/rs6000/power5.md: Adjust.
25409 * config/rs6000/power6.md: Adjust.
25410 * config/rs6000/power7.md: Adjust.
25411 * config/rs6000/power8.md: Adjust.
25412 * config/rs6000/power9.md: Adjust.
25413 * config/rs6000/rs64.md: Adjust.
25414 * config/rs6000/titan.md: Adjust.
25415
25416 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25417
25418 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25419 ix86_indirect_branch_register logic.
25420
25421 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25422
25423 * config/i386/constraints.md (Bs): Update
25424 ix86_indirect_branch_register check. Don't check
25425 ix86_indirect_branch_register with GOT_memory_operand.
25426 (Bw): Likewise.
25427 * config/i386/predicates.md (GOT_memory_operand): Don't check
25428 ix86_indirect_branch_register here.
25429 (GOT32_symbol_operand): Likewise.
25430
25431 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25432
25433 * config/i386/predicates.md (constant_call_address_operand):
25434 Rewrite ix86_indirect_branch_register logic.
25435 (sibcall_insn_operand): Likewise.
25436
25437 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25438
25439 * config/i386/constraints.md (Bs): Replace
25440 ix86_indirect_branch_thunk_register with
25441 ix86_indirect_branch_register.
25442 (Bw): Likewise.
25443 * config/i386/i386.md (indirect_jump): Likewise.
25444 (tablejump): Likewise.
25445 (*sibcall_memory): Likewise.
25446 (*sibcall_value_memory): Likewise.
25447 Peepholes of indirect call and jump via memory: Likewise.
25448 * config/i386/i386.opt: Likewise.
25449 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25450 (GOT_memory_operand): Likewise.
25451 (call_insn_operand): Likewise.
25452 (sibcall_insn_operand): Likewise.
25453 (GOT32_symbol_operand): Likewise.
25454
25455 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25456
25457 PR middle-end/83837
25458 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25459 type rather than type addr's type points to.
25460 (expand_omp_atomic_mutex): Likewise.
25461 (expand_omp_atomic): Likewise.
25462
25463 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25464
25465 PR target/83839
25466 * config/i386/i386.c (output_indirect_thunk_function): Use
25467 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25468 for __x86_return_thunk.
25469
25470 2018-01-15 Richard Biener <rguenther@suse.de>
25471
25472 PR middle-end/83850
25473 * expmed.c (extract_bit_field_1): Fix typo.
25474
25475 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25476
25477 PR target/83687
25478 * config/arm/iterators.md (VF): New mode iterator.
25479 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25480 Remove integer-related logic from pattern.
25481 (neon_vabd<mode>_3): Likewise.
25482
25483 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25484
25485 PR middle-end/82694
25486 * common.opt (fstrict-overflow): No longer an alias.
25487 (fwrapv-pointer): New option.
25488 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25489 also for pointer types based on flag_wrapv_pointer.
25490 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25491 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25492 opts->x_flag_wrapv got set.
25493 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25494 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25495 POINTER_TYPE_OVERFLOW_UNDEFINED.
25496 * match.pd: Likewise in address comparison pattern.
25497 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25498
25499 2018-01-15 Richard Biener <rguenther@suse.de>
25500
25501 PR lto/83804
25502 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25503 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25504 Reset type names to their identifier if their TYPE_DECL doesn't
25505 have linkage (and thus is used for ODR and devirt).
25506 (save_debug_info_for_decl): Remove.
25507 (save_debug_info_for_type): Likewise.
25508 (add_tree_to_fld_list): Adjust.
25509 * tree-pretty-print.c (dump_generic_node): Make dumping of
25510 type names more robust.
25511
25512 2018-01-15 Richard Biener <rguenther@suse.de>
25513
25514 * BASE-VER: Bump to 8.0.1.
25515
25516 2018-01-14 Martin Sebor <msebor@redhat.com>
25517
25518 PR other/83508
25519 * builtins.c (check_access): Avoid warning when the no-warning bit
25520 is set.
25521
25522 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25523
25524 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25525 * ira-color (allocno_hard_regs_compare): Likewise.
25526
25527 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25528
25529 PR target/83013
25530 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25531 Use .pushsection/.popsection.
25532
25533 2018-01-14 Martin Sebor <msebor@redhat.com>
25534
25535 PR c++/81327
25536 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25537
25538 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25539
25540 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25541 entry from extra_headers.
25542 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25543 extra_headers, make the list bitwise identical to the i?86-*-* one.
25544
25545 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25546
25547 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25548 -mcmodel=large with -mindirect-branch=thunk,
25549 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25550 -mfunction-return=thunk-extern.
25551 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25552 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25553 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25554
25555 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25556
25557 * config/i386/i386.c (print_reg): Print the name of the full
25558 integer register without '%'.
25559 (ix86_print_operand): Handle 'V'.
25560 * doc/extend.texi: Document 'V' modifier.
25561
25562 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25563
25564 * config/i386/constraints.md (Bs): Disallow memory operand for
25565 -mindirect-branch-register.
25566 (Bw): Likewise.
25567 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25568 (GOT_memory_operand): Likewise.
25569 (call_insn_operand): Likewise.
25570 (sibcall_insn_operand): Likewise.
25571 (GOT32_symbol_operand): Likewise.
25572 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25573 for -mindirect-branch-register.
25574 (tablejump): Likewise.
25575 (*sibcall_memory): Likewise.
25576 (*sibcall_value_memory): Likewise.
25577 Disallow peepholes of indirect call and jump via memory for
25578 -mindirect-branch-register.
25579 (*call_pop): Replace m with Bw.
25580 (*call_value_pop): Likewise.
25581 (*sibcall_pop_memory): Replace m with Bs.
25582 * config/i386/i386.opt (mindirect-branch-register): New option.
25583 * doc/invoke.texi: Document -mindirect-branch-register option.
25584
25585 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25586
25587 * config/i386/i386-protos.h (ix86_output_function_return): New.
25588 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25589 set function_return_type.
25590 (indirect_thunk_name): Add ret_p to indicate thunk for function
25591 return.
25592 (output_indirect_thunk_function): Pass false to
25593 indirect_thunk_name.
25594 (ix86_output_indirect_branch_via_reg): Likewise.
25595 (ix86_output_indirect_branch_via_push): Likewise.
25596 (output_indirect_thunk_function): Create alias for function
25597 return thunk if regno < 0.
25598 (ix86_output_function_return): New function.
25599 (ix86_handle_fndecl_attribute): Handle function_return.
25600 (ix86_attribute_table): Add function_return.
25601 * config/i386/i386.h (machine_function): Add
25602 function_return_type.
25603 * config/i386/i386.md (simple_return_internal): Use
25604 ix86_output_function_return.
25605 (simple_return_internal_long): Likewise.
25606 * config/i386/i386.opt (mfunction-return=): New option.
25607 (indirect_branch): Mention -mfunction-return=.
25608 * doc/extend.texi: Document function_return function attribute.
25609 * doc/invoke.texi: Document -mfunction-return= option.
25610
25611 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25612
25613 * config/i386/i386-opts.h (indirect_branch): New.
25614 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25615 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25616 with local indirect jump when converting indirect call and jump.
25617 (ix86_set_indirect_branch_type): New.
25618 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25619 (indirectlabelno): New.
25620 (indirect_thunk_needed): Likewise.
25621 (indirect_thunk_bnd_needed): Likewise.
25622 (indirect_thunks_used): Likewise.
25623 (indirect_thunks_bnd_used): Likewise.
25624 (INDIRECT_LABEL): Likewise.
25625 (indirect_thunk_name): Likewise.
25626 (output_indirect_thunk): Likewise.
25627 (output_indirect_thunk_function): Likewise.
25628 (ix86_output_indirect_branch_via_reg): Likewise.
25629 (ix86_output_indirect_branch_via_push): Likewise.
25630 (ix86_output_indirect_branch): Likewise.
25631 (ix86_output_indirect_jmp): Likewise.
25632 (ix86_code_end): Call output_indirect_thunk_function if needed.
25633 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25634 needed.
25635 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25636 (ix86_attribute_table): Add indirect_branch.
25637 * config/i386/i386.h (machine_function): Add indirect_branch_type
25638 and has_local_indirect_jump.
25639 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25640 to true.
25641 (tablejump): Likewise.
25642 (*indirect_jump): Use ix86_output_indirect_jmp.
25643 (*tablejump_1): Likewise.
25644 (simple_return_indirect_internal): Likewise.
25645 * config/i386/i386.opt (mindirect-branch=): New option.
25646 (indirect_branch): New.
25647 (keep): Likewise.
25648 (thunk): Likewise.
25649 (thunk-inline): Likewise.
25650 (thunk-extern): Likewise.
25651 * doc/extend.texi: Document indirect_branch function attribute.
25652 * doc/invoke.texi: Document -mindirect-branch= option.
25653
25654 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25655
25656 PR ipa/83051
25657 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25658
25659 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25660
25661 * ipa-inline.c (want_inline_small_function_p): Return false if
25662 inlining has already failed with CIF_FINAL_ERROR.
25663 (update_caller_keys): Call want_inline_small_function_p before
25664 can_inline_edge_p.
25665 (update_callee_keys): Likewise.
25666
25667 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25668
25669 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25670 New function.
25671 (rs6000_quadword_masked_address_p): Likewise.
25672 (quad_aligned_load_p): Likewise.
25673 (quad_aligned_store_p): Likewise.
25674 (const_load_sequence_p): Add comment to describe the outer-most loop.
25675 (mimic_memory_attributes_and_flags): New function.
25676 (rs6000_gen_stvx): Likewise.
25677 (replace_swapped_aligned_store): Likewise.
25678 (rs6000_gen_lvx): Likewise.
25679 (replace_swapped_aligned_load): Likewise.
25680 (replace_swapped_load_constant): Capitalize argument name in
25681 comment describing this function.
25682 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25683 and stores that access quad-word aligned addresses and replace
25684 with stvx or lvx instructions when appropriate.
25685 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25686 New function prototype.
25687 (rs6000_quadword_masked_address_p): Likewise.
25688 (rs6000_gen_lvx): Likewise.
25689 (rs6000_gen_stvx): Likewise.
25690 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25691 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25692 when memory address is aligned.
25693 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25694 this split to select lvx instruction when memory address is aligned.
25695 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25696 instruction when memory address is aligned.
25697 (*vsx_le_perm_load_v16qi): Likewise.
25698 (four unnamed splitters): Modify to select the stvx instruction
25699 when memory is aligned.
25700
25701 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25702
25703 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25704 which appears in the queue multiple times.
25705
25706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25707 Alan Hayward <alan.hayward@arm.com>
25708 David Sherwood <david.sherwood@arm.com>
25709
25710 * tree-vectorizer.h (vec_lower_bound): New structure.
25711 (_loop_vec_info): Add check_nonzero and lower_bounds.
25712 (LOOP_VINFO_CHECK_NONZERO): New macro.
25713 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25714 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25715 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25716 fields. Make seg_len the distance travelled, not including the
25717 access size.
25718 (dr_direction_indicator): Declare.
25719 (dr_zero_step_indicator): Likewise.
25720 (dr_known_forward_stride_p): Likewise.
25721 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25722 tree-ssanames.h.
25723 (runtime_alias_check_p): Allow runtime alias checks with
25724 variable strides.
25725 (operator ==): Compare access_size and align.
25726 (prune_runtime_alias_test_list): Rework for new distinction between
25727 the access_size and seg_len.
25728 (create_intersect_range_checks_index): Likewise. Cope with polynomial
25729 segment lengths.
25730 (get_segment_min_max): New function.
25731 (create_intersect_range_checks): Use it.
25732 (dr_step_indicator): New function.
25733 (dr_direction_indicator): Likewise.
25734 (dr_zero_step_indicator): Likewise.
25735 (dr_known_forward_stride_p): Likewise.
25736 * tree-loop-distribution.c (data_ref_segment_size): Return
25737 DR_STEP * (niters - 1).
25738 (compute_alias_check_pairs): Update call to the dr_with_seg_len
25739 constructor.
25740 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25741 (vect_preserves_scalar_order_p): New function, split out from...
25742 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
25743 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25744 (vect_vfa_access_size): New function.
25745 (vect_vfa_align): Likewise.
25746 (vect_compile_time_alias): Take access_size_a and access_b arguments.
25747 (dump_lower_bound): New function.
25748 (vect_check_lower_bound): Likewise.
25749 (vect_small_gap_p): Likewise.
25750 (vectorizable_with_step_bound_p): Likewise.
25751 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25752 depencies if the vectorization factor is 1. Convert the checks
25753 for nonzero steps into checks on the bounds of DR_STEP. Try using
25754 a bunds check for variable steps if the minimum required step is
25755 relatively small. Update calls to the dr_with_seg_len
25756 constructor and to vect_compile_time_alias.
25757 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25758 function.
25759 (vect_loop_versioning): Call it.
25760 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25761 when retrying.
25762 (vect_estimate_min_profitable_iters): Account for any bounds checks.
25763
25764 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25765 Alan Hayward <alan.hayward@arm.com>
25766 David Sherwood <david.sherwood@arm.com>
25767
25768 * doc/sourcebuild.texi (vect_scatter_store): Document.
25769 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25770 optabs.
25771 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25772 Document.
25773 * genopinit.c (main): Add supports_vec_scatter_store and
25774 supports_vec_scatter_store_cached to target_optabs.
25775 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25776 IFN_MASK_SCATTER_STORE.
25777 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25778 functions.
25779 * internal-fn.h (internal_store_fn_p): Declare.
25780 (internal_fn_stored_value_index): Likewise.
25781 * internal-fn.c (scatter_store_direct): New macro.
25782 (expand_scatter_store_optab_fn): New function.
25783 (direct_scatter_store_optab_supported_p): New macro.
25784 (internal_store_fn_p): New function.
25785 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
25786 IFN_MASK_SCATTER_STORE.
25787 (internal_fn_mask_index): Likewise.
25788 (internal_fn_stored_value_index): New function.
25789 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
25790 for scatter stores.
25791 * optabs-query.h (supports_vec_scatter_store_p): Declare.
25792 * optabs-query.c (supports_vec_scatter_store_p): New function.
25793 * tree-vectorizer.h (vect_get_store_rhs): Declare.
25794 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
25795 true for scatter stores.
25796 (vect_gather_scatter_fn_p): Handle scatter stores too.
25797 (vect_check_gather_scatter): Consider using scatter stores if
25798 supports_vec_scatter_store_p.
25799 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
25800 scatter stores too.
25801 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25802 internal_fn_stored_value_index.
25803 (check_load_store_masking): Handle scatter stores too.
25804 (vect_get_store_rhs): Make public.
25805 (vectorizable_call): Use internal_store_fn_p.
25806 (vectorizable_store): Handle scatter store internal functions.
25807 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
25808 when deciding whether the end of the group has been reached.
25809 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
25810 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
25811 (mask_scatter_store<mode>): New insns.
25812
25813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25814 Alan Hayward <alan.hayward@arm.com>
25815 David Sherwood <david.sherwood@arm.com>
25816
25817 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
25818 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
25819 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
25820 function.
25821 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
25822 Use vect_truncate_gather_scatter_offset if we can't treat the
25823 operation as a normal gather load or scatter store.
25824 (get_group_load_store_type): Take the gather_scatter_info
25825 as argument. Try using a gather load or scatter store for
25826 single-element groups.
25827 (get_load_store_type): Update calls to get_group_load_store_type
25828 and vect_use_strided_gather_scatters_p.
25829
25830 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25831 Alan Hayward <alan.hayward@arm.com>
25832 David Sherwood <david.sherwood@arm.com>
25833
25834 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
25835 optional tree argument.
25836 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
25837 null target hooks.
25838 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
25839 but continue to use the current value as a fallback.
25840 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
25841 to compare the updates.
25842 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
25843 (get_load_store_type): Use it when handling a strided access.
25844 (vect_get_strided_load_store_ops): New function.
25845 (vect_get_data_ptr_increment): Likewise.
25846 (vectorizable_load): Handle strided gather loads. Always pass
25847 a step to vect_create_data_ref_ptr and bump_vector_ptr.
25848
25849 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25850 Alan Hayward <alan.hayward@arm.com>
25851 David Sherwood <david.sherwood@arm.com>
25852
25853 * doc/md.texi (gather_load@var{m}): Document.
25854 (mask_gather_load@var{m}): Likewise.
25855 * genopinit.c (main): Add supports_vec_gather_load and
25856 supports_vec_gather_load_cached to target_optabs.
25857 * optabs-tree.c (init_tree_optimization_optabs): Use
25858 ggc_cleared_alloc to allocate target_optabs.
25859 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
25860 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
25861 functions.
25862 * internal-fn.h (internal_load_fn_p): Declare.
25863 (internal_gather_scatter_fn_p): Likewise.
25864 (internal_fn_mask_index): Likewise.
25865 (internal_gather_scatter_fn_supported_p): Likewise.
25866 * internal-fn.c (gather_load_direct): New macro.
25867 (expand_gather_load_optab_fn): New function.
25868 (direct_gather_load_optab_supported_p): New macro.
25869 (direct_internal_fn_optab): New function.
25870 (internal_load_fn_p): Likewise.
25871 (internal_gather_scatter_fn_p): Likewise.
25872 (internal_fn_mask_index): Likewise.
25873 (internal_gather_scatter_fn_supported_p): Likewise.
25874 * optabs-query.c (supports_at_least_one_mode_p): New function.
25875 (supports_vec_gather_load_p): Likewise.
25876 * optabs-query.h (supports_vec_gather_load_p): Declare.
25877 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
25878 and memory_type field.
25879 (NUM_PATTERNS): Bump to 15.
25880 * tree-vect-data-refs.c: Include internal-fn.h.
25881 (vect_gather_scatter_fn_p): New function.
25882 (vect_describe_gather_scatter_call): Likewise.
25883 (vect_check_gather_scatter): Try using internal functions for
25884 gather loads. Recognize existing calls to a gather load function.
25885 (vect_analyze_data_refs): Consider using gather loads if
25886 supports_vec_gather_load_p.
25887 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
25888 (vect_get_gather_scatter_offset_type): Likewise.
25889 (vect_convert_mask_for_vectype): Likewise.
25890 (vect_add_conversion_to_patterm): Likewise.
25891 (vect_try_gather_scatter_pattern): Likewise.
25892 (vect_recog_gather_scatter_pattern): New pattern recognizer.
25893 (vect_vect_recog_func_ptrs): Add it.
25894 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
25895 internal_fn_mask_index and internal_gather_scatter_fn_p.
25896 (check_load_store_masking): Take the gather_scatter_info as an
25897 argument and handle gather loads.
25898 (vect_get_gather_scatter_ops): New function.
25899 (vectorizable_call): Check internal_load_fn_p.
25900 (vectorizable_load): Likewise. Handle gather load internal
25901 functions.
25902 (vectorizable_store): Update call to check_load_store_masking.
25903 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25904 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25905 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25906 (aarch64_gather_scale_operand_d): New predicates.
25907 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25908 (mask_gather_load<mode>): New insns.
25909
25910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25911 Alan Hayward <alan.hayward@arm.com>
25912 David Sherwood <david.sherwood@arm.com>
25913
25914 * optabs.def (fold_left_plus_optab): New optab.
25915 * doc/md.texi (fold_left_plus_@var{m}): Document.
25916 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25917 * internal-fn.c (fold_left_direct): Define.
25918 (expand_fold_left_optab_fn): Likewise.
25919 (direct_fold_left_optab_supported_p): Likewise.
25920 * fold-const-call.c (fold_const_fold_left): New function.
25921 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25922 * tree-parloops.c (valid_reduction_p): New function.
25923 (gather_scalar_reductions): Use it.
25924 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25925 (vect_finish_replace_stmt): Declare.
25926 * tree-vect-loop.c (fold_left_reduction_fn): New function.
25927 (needs_fold_left_reduction_p): New function, split out from...
25928 (vect_is_simple_reduction): ...here. Accept reductions that
25929 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25930 (vect_force_simple_reduction): Also store the reduction type in
25931 the assignment's STMT_VINFO_REDUC_TYPE.
25932 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25933 (merge_with_identity): New function.
25934 (vect_expand_fold_left): Likewise.
25935 (vectorize_fold_left_reduction): Likewise.
25936 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
25937 scalar phi in place for it. Check for target support and reject
25938 cases that would reassociate the operation. Defer the transform
25939 phase to vectorize_fold_left_reduction.
25940 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25941 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25942 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25943
25944 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25945
25946 * tree-if-conv.c (predicate_mem_writes): Remove redundant
25947 call to ifc_temp_var.
25948
25949 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25950 Alan Hayward <alan.hayward@arm.com>
25951 David Sherwood <david.sherwood@arm.com>
25952
25953 * target.def (legitimize_address_displacement): Take the original
25954 offset as a poly_int.
25955 * targhooks.h (default_legitimize_address_displacement): Update
25956 accordingly.
25957 * targhooks.c (default_legitimize_address_displacement): Likewise.
25958 * doc/tm.texi: Regenerate.
25959 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25960 as an argument, moving assert of ad->disp == ad->disp_term to...
25961 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
25962 Try calling targetm.legitimize_address_displacement before expanding
25963 the address rather than afterwards, and adjust for the new interface.
25964 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25965 Match the new hook interface. Handle SVE addresses.
25966 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25967 new hook interface.
25968
25969 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25970
25971 * Makefile.in (OBJS): Add early-remat.o.
25972 * target.def (select_early_remat_modes): New hook.
25973 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25974 * doc/tm.texi: Regenerate.
25975 * targhooks.h (default_select_early_remat_modes): Declare.
25976 * targhooks.c (default_select_early_remat_modes): New function.
25977 * timevar.def (TV_EARLY_REMAT): New timevar.
25978 * passes.def (pass_early_remat): New pass.
25979 * tree-pass.h (make_pass_early_remat): Declare.
25980 * early-remat.c: New file.
25981 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25982 function.
25983 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25984
25985 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25986 Alan Hayward <alan.hayward@arm.com>
25987 David Sherwood <david.sherwood@arm.com>
25988
25989 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25990 vfm1 with a bound_epilog parameter.
25991 (vect_do_peeling): Update calls accordingly, and move the prologue
25992 call earlier in the function. Treat the base bound_epilog as 0 for
25993 fully-masked loops and retain vf - 1 for other loops. Add 1 to
25994 this base when peeling for gaps.
25995 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25996 with fully-masked loops.
25997 (vect_estimate_min_profitable_iters): Handle the single peeled
25998 iteration in that case.
25999
26000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26001 Alan Hayward <alan.hayward@arm.com>
26002 David Sherwood <david.sherwood@arm.com>
26003
26004 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26005 single-element interleaving even if the size is not a power of 2.
26006 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26007 accesses for single-element interleaving if the group size is
26008 not a power of 2.
26009
26010 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26011 Alan Hayward <alan.hayward@arm.com>
26012 David Sherwood <david.sherwood@arm.com>
26013
26014 * doc/md.texi (fold_extract_last_@var{m}): Document.
26015 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26016 * optabs.def (fold_extract_last_optab): New optab.
26017 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26018 * internal-fn.c (fold_extract_direct): New macro.
26019 (expand_fold_extract_optab_fn): Likewise.
26020 (direct_fold_extract_optab_supported_p): Likewise.
26021 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26022 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26023 EXTRACT_LAST_REDUCTION.
26024 (get_initial_def_for_reduction): Do not create an initial vector
26025 for EXTRACT_LAST_REDUCTION reductions.
26026 (vectorizable_reduction): Leave the scalar phi in place for
26027 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26028 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26029 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26030 transform phase to vectorizable_condition.
26031 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26032 split out from...
26033 (vect_finish_stmt_generation): ...here.
26034 (vect_finish_replace_stmt): New function.
26035 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26036 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26037 pattern.
26038 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26039
26040 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26041 Alan Hayward <alan.hayward@arm.com>
26042 David Sherwood <david.sherwood@arm.com>
26043
26044 * doc/md.texi (extract_last_@var{m}): Document.
26045 * optabs.def (extract_last_optab): New optab.
26046 * internal-fn.def (EXTRACT_LAST): New internal function.
26047 * internal-fn.c (cond_unary_direct): New macro.
26048 (expand_cond_unary_optab_fn): Likewise.
26049 (direct_cond_unary_optab_supported_p): Likewise.
26050 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26051 loops using EXTRACT_LAST.
26052 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26053 (extract_last_<mode>): ...this optab.
26054 (vec_extract<mode><Vel>): Update accordingly.
26055
26056 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26057 Alan Hayward <alan.hayward@arm.com>
26058 David Sherwood <david.sherwood@arm.com>
26059
26060 * target.def (empty_mask_is_expensive): New hook.
26061 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26062 * doc/tm.texi: Regenerate.
26063 * targhooks.h (default_empty_mask_is_expensive): Declare.
26064 * targhooks.c (default_empty_mask_is_expensive): New function.
26065 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26066 if the target says that empty masks are expensive.
26067 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26068 New function.
26069 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26070
26071 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26072 Alan Hayward <alan.hayward@arm.com>
26073 David Sherwood <david.sherwood@arm.com>
26074
26075 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26076 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26077 (vect_use_loop_mask_for_alignment_p): New function.
26078 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26079 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26080 niters_skip argument. Make sure that the first niters_skip elements
26081 of the first iteration are inactive.
26082 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26083 Update call to vect_set_loop_masks_directly.
26084 (get_misalign_in_elems): New function, split out from...
26085 (vect_gen_prolog_loop_niters): ...here.
26086 (vect_update_init_of_dr): Take a code argument that specifies whether
26087 the adjustment should be added or subtracted.
26088 (vect_update_init_of_drs): Likewise.
26089 (vect_prepare_for_masked_peels): New function.
26090 (vect_do_peeling): Skip prologue peeling if we're using a mask
26091 instead. Update call to vect_update_inits_of_drs.
26092 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26093 mask_skip_niters.
26094 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26095 alignment. Do not include the number of peeled iterations in
26096 the minimum threshold in that case.
26097 (vectorizable_induction): Adjust the start value down by
26098 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26099 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26100 Take the number of skipped iterations into account when calculating
26101 the loop bounds.
26102 * tree-vect-stmts.c (vect_gen_while_not): New function.
26103
26104 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26105 Alan Hayward <alan.hayward@arm.com>
26106 David Sherwood <david.sherwood@arm.com>
26107
26108 * doc/sourcebuild.texi (vect_fully_masked): Document.
26109 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26110 default value to 0.
26111 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26112 split out from...
26113 (vect_analyze_loop_2): ...here. Don't check the vectorization
26114 factor against the number of loop iterations if the loop is
26115 fully-masked.
26116
26117 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26118 Alan Hayward <alan.hayward@arm.com>
26119 David Sherwood <david.sherwood@arm.com>
26120
26121 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26122 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26123 (dump_groups): Update accordingly.
26124 (iv_use::mem_type): New member variable.
26125 (address_p): New function.
26126 (record_use): Add a mem_type argument and initialize the new
26127 mem_type field.
26128 (record_group_use): Add a mem_type argument. Use address_p.
26129 Remove obsolete null checks of base_object. Update call to record_use.
26130 (find_interesting_uses_op): Update call to record_group_use.
26131 (find_interesting_uses_cond): Likewise.
26132 (find_interesting_uses_address): Likewise.
26133 (get_mem_type_for_internal_fn): New function.
26134 (find_address_like_use): Likewise.
26135 (find_interesting_uses_stmt): Try find_address_like_use before
26136 calling find_interesting_uses_op.
26137 (addr_offset_valid_p): Use the iv mem_type field as the type
26138 of the addressed memory.
26139 (add_autoinc_candidates): Likewise.
26140 (get_address_cost): Likewise.
26141 (split_small_address_groups_p): Use address_p.
26142 (split_address_groups): Likewise.
26143 (add_iv_candidate_for_use): Likewise.
26144 (autoinc_possible_for_pair): Likewise.
26145 (rewrite_groups): Likewise.
26146 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26147 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26148 (get_alias_ptr_type_for_ptr_address): New function.
26149 (rewrite_use_address): Rewrite address uses in calls that were
26150 identified by find_address_like_use.
26151
26152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26153 Alan Hayward <alan.hayward@arm.com>
26154 David Sherwood <david.sherwood@arm.com>
26155
26156 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26157 TARGET_MEM_REFs.
26158 * gimple-expr.h (is_gimple_addressable: Likewise.
26159 * gimple-expr.c (is_gimple_address): Likewise.
26160 * internal-fn.c (expand_call_mem_ref): New function.
26161 (expand_mask_load_optab_fn): Use it.
26162 (expand_mask_store_optab_fn): Likewise.
26163
26164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26165 Alan Hayward <alan.hayward@arm.com>
26166 David Sherwood <david.sherwood@arm.com>
26167
26168 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26169 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26170 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26171 (cond_umax@var{mode}): Document.
26172 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26173 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26174 (cond_umin_optab, cond_umax_optab): New optabs.
26175 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26176 (COND_IOR, COND_XOR): New internal functions.
26177 * internal-fn.h (get_conditional_internal_fn): Declare.
26178 * internal-fn.c (cond_binary_direct): New macro.
26179 (expand_cond_binary_optab_fn): Likewise.
26180 (direct_cond_binary_optab_supported_p): Likewise.
26181 (get_conditional_internal_fn): New function.
26182 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26183 Cope with reduction statements that are vectorized as calls rather
26184 than assignments.
26185 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26186 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26187 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26188 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26189 (UNSPEC_COND_EOR): New unspecs.
26190 (optab): Add mappings for them.
26191 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26192 (sve_int_op, sve_fp_op): New int attributes.
26193
26194 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26195 Alan Hayward <alan.hayward@arm.com>
26196 David Sherwood <david.sherwood@arm.com>
26197
26198 * optabs.def (while_ult_optab): New optab.
26199 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26200 * internal-fn.def (WHILE_ULT): New internal function.
26201 * internal-fn.h (direct_internal_fn_supported_p): New override
26202 that takes two types as argument.
26203 * internal-fn.c (while_direct): New macro.
26204 (expand_while_optab_fn): New function.
26205 (convert_optab_supported_p): Likewise.
26206 (direct_while_optab_supported_p): New macro.
26207 * wide-int.h (wi::udiv_ceil): New function.
26208 * tree-vectorizer.h (rgroup_masks): New structure.
26209 (vec_loop_masks): New typedef.
26210 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26211 and fully_masked_p.
26212 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26213 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26214 (vect_max_vf): New function.
26215 (slpeel_make_loop_iterate_ntimes): Delete.
26216 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26217 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26218 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26219 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26220 internal-fn.h, stor-layout.h and optabs-query.h.
26221 (vect_set_loop_mask): New function.
26222 (add_preheader_seq): Likewise.
26223 (add_header_seq): Likewise.
26224 (interleave_supported_p): Likewise.
26225 (vect_maybe_permute_loop_masks): Likewise.
26226 (vect_set_loop_masks_directly): Likewise.
26227 (vect_set_loop_condition_masked): Likewise.
26228 (vect_set_loop_condition_unmasked): New function, split out from
26229 slpeel_make_loop_iterate_ntimes.
26230 (slpeel_make_loop_iterate_ntimes): Rename to..
26231 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26232 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26233 (vect_do_peeling): Update call accordingly.
26234 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26235 loops.
26236 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26237 mask_compare_type, can_fully_mask_p and fully_masked_p.
26238 (release_vec_loop_masks): New function.
26239 (_loop_vec_info): Use it to free the loop masks.
26240 (can_produce_all_loop_masks_p): New function.
26241 (vect_get_max_nscalars_per_iter): Likewise.
26242 (vect_verify_full_masking): Likewise.
26243 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26244 retries, and free the mask rgroups before retrying. Check loop-wide
26245 reasons for disallowing fully-masked loops. Make the final decision
26246 about whether use a fully-masked loop or not.
26247 (vect_estimate_min_profitable_iters): Do not assume that peeling
26248 for the number of iterations will be needed for fully-masked loops.
26249 (vectorizable_reduction): Disable fully-masked loops.
26250 (vectorizable_live_operation): Likewise.
26251 (vect_halve_mask_nunits): New function.
26252 (vect_double_mask_nunits): Likewise.
26253 (vect_record_loop_mask): Likewise.
26254 (vect_get_loop_mask): Likewise.
26255 (vect_transform_loop): Handle the case in which the final loop
26256 iteration might handle a partial vector. Call vect_set_loop_condition
26257 instead of slpeel_make_loop_iterate_ntimes.
26258 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26259 (check_load_store_masking): New function.
26260 (prepare_load_store_mask): Likewise.
26261 (vectorizable_store): Handle fully-masked loops.
26262 (vectorizable_load): Likewise.
26263 (supportable_widening_operation): Use vect_halve_mask_nunits for
26264 booleans.
26265 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26266 (vect_gen_while): New function.
26267 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26268 (aarch64_uqdec<mode>): New insn.
26269
26270 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26271 Alan Hayward <alan.hayward@arm.com>
26272 David Sherwood <david.sherwood@arm.com>
26273
26274 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26275 (reduc_xor_scal_optab): New optabs.
26276 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26277 (reduc_xor_scal_@var{m}): Document.
26278 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26279 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26280 internal functions.
26281 * fold-const-call.c (fold_const_call): Handle them.
26282 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26283 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26284 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26285 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26286 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26287 (UNSPEC_XORV): New unspecs.
26288 (optab): Add entries for them.
26289 (BITWISEV): New int iterator.
26290 (bit_reduc_op): New int attributes.
26291
26292 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26293 Alan Hayward <alan.hayward@arm.com>
26294 David Sherwood <david.sherwood@arm.com>
26295
26296 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26297 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26298 * optabs.def (vec_shl_insert_optab): New optab.
26299 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26300 (duplicate_and_interleave): Likewise.
26301 * tree-vect-loop.c: Include internal-fn.h.
26302 (neutral_op_for_slp_reduction): New function, split out from
26303 get_initial_defs_for_reduction.
26304 (get_initial_def_for_reduction): Handle option 2 for variable-length
26305 vectors by loading the neutral value into a vector and then shifting
26306 the initial value into element 0.
26307 (get_initial_defs_for_reduction): Replace the code argument with
26308 the neutral value calculated by neutral_op_for_slp_reduction.
26309 Use gimple_build_vector for constant-length vectors.
26310 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26311 but the first group_size elements have a neutral value.
26312 Use duplicate_and_interleave otherwise.
26313 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26314 Update call to get_initial_defs_for_reduction. Handle SLP
26315 reductions for variable-length vectors by creating one vector
26316 result for each scalar result, with the elements associated
26317 with other scalar results stubbed out with the neutral value.
26318 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26319 Require IFN_VEC_SHL_INSERT for double reductions on
26320 variable-length vectors, or SLP reductions that have
26321 a neutral value. Require can_duplicate_and_interleave_p
26322 support for variable-length unchained SLP reductions if there
26323 is no neutral value, such as for MIN/MAX reductions. Also require
26324 the number of vector elements to be a multiple of the number of
26325 SLP statements when doing variable-length unchained SLP reductions.
26326 Update call to vect_create_epilog_for_reduction.
26327 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26328 and remove initial values.
26329 (duplicate_and_interleave): Make public.
26330 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26331 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26332
26333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26334 Alan Hayward <alan.hayward@arm.com>
26335 David Sherwood <david.sherwood@arm.com>
26336
26337 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26338 (can_duplicate_and_interleave_p): New function.
26339 (vect_get_and_check_slp_defs): Take the vector of statements
26340 rather than just the current one. Remove excess parentheses.
26341 Restriction rejectinon of vect_constant_def and vect_external_def
26342 for variable-length vectors to boolean types, or types for which
26343 can_duplicate_and_interleave_p is false.
26344 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26345 (duplicate_and_interleave): New function.
26346 (vect_get_constant_vectors): Use gimple_build_vector for
26347 constant-length vectors and suitable variable-length constant
26348 vectors. Use duplicate_and_interleave for other variable-length
26349 vectors. Don't defer the update when inserting new statements.
26350
26351 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26352 Alan Hayward <alan.hayward@arm.com>
26353 David Sherwood <david.sherwood@arm.com>
26354
26355 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26356 min_profitable_iters doesn't go negative.
26357
26358 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26359 Alan Hayward <alan.hayward@arm.com>
26360 David Sherwood <david.sherwood@arm.com>
26361
26362 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26363 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26364 * optabs.def (vec_mask_load_lanes_optab): New optab.
26365 (vec_mask_store_lanes_optab): Likewise.
26366 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26367 (MASK_STORE_LANES): Likewise.
26368 * internal-fn.c (mask_load_lanes_direct): New macro.
26369 (mask_store_lanes_direct): Likewise.
26370 (expand_mask_load_optab_fn): Handle masked operations.
26371 (expand_mask_load_lanes_optab_fn): New macro.
26372 (expand_mask_store_optab_fn): Handle masked operations.
26373 (expand_mask_store_lanes_optab_fn): New macro.
26374 (direct_mask_load_lanes_optab_supported_p): Likewise.
26375 (direct_mask_store_lanes_optab_supported_p): Likewise.
26376 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26377 parameter.
26378 (vect_load_lanes_supported): Likewise.
26379 * tree-vect-data-refs.c (strip_conversion): New function.
26380 (can_group_stmts_p): Likewise.
26381 (vect_analyze_data_ref_accesses): Use it instead of checking
26382 for a pair of assignments.
26383 (vect_store_lanes_supported): Take a masked_p parameter.
26384 (vect_load_lanes_supported): Likewise.
26385 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26386 vect_store_lanes_supported and vect_load_lanes_supported.
26387 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26388 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26389 parameter. Don't allow gaps for masked accesses.
26390 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26391 and vect_load_lanes_supported.
26392 (get_load_store_type): Take a masked_p parameter and update
26393 call to get_group_load_store_type.
26394 (vectorizable_store): Update call to get_load_store_type.
26395 Handle IFN_MASK_STORE_LANES.
26396 (vectorizable_load): Update call to get_load_store_type.
26397 Handle IFN_MASK_LOAD_LANES.
26398
26399 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26400 Alan Hayward <alan.hayward@arm.com>
26401 David Sherwood <david.sherwood@arm.com>
26402
26403 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26404 modes for SVE.
26405 * config/aarch64/aarch64-protos.h
26406 (aarch64_sve_struct_memory_operand_p): Declare.
26407 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26408 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26409 (VPRED, vpred): Handle SVE structure modes.
26410 * config/aarch64/constraints.md (Utx): New constraint.
26411 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26412 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26413 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26414 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26415 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26416 structure modes. Split into pieces after RA.
26417 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26418 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26419 New patterns.
26420 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26421 SVE structure modes.
26422 (aarch64_classify_address): Likewise.
26423 (sizetochar): Move earlier in file.
26424 (aarch64_print_operand): Handle SVE register lists.
26425 (aarch64_array_mode): New function.
26426 (aarch64_sve_struct_memory_operand_p): Likewise.
26427 (TARGET_ARRAY_MODE): Redefine.
26428
26429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26430 Alan Hayward <alan.hayward@arm.com>
26431 David Sherwood <david.sherwood@arm.com>
26432
26433 * target.def (array_mode): New target hook.
26434 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26435 * doc/tm.texi: Regenerate.
26436 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26437 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26438 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26439 targetm.array_mode.
26440 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26441 type sizes.
26442
26443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26444 Alan Hayward <alan.hayward@arm.com>
26445 David Sherwood <david.sherwood@arm.com>
26446
26447 * fold-const.c (fold_binary_loc): Check the argument types
26448 rather than the result type when testing for a vector operation.
26449
26450 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26451
26452 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26453 * doc/tm.texi: Regenerate.
26454
26455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26456 Alan Hayward <alan.hayward@arm.com>
26457 David Sherwood <david.sherwood@arm.com>
26458
26459 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26460 (sve): Document new AArch64 extension.
26461 * doc/md.texi (w): Extend the description of the AArch64
26462 constraint to include SVE vectors.
26463 (Upl, Upa): Document new AArch64 predicate constraints.
26464 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26465 enum.
26466 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26467 (msve-vector-bits=): New option.
26468 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26469 SVE when these are disabled.
26470 (sve): New extension.
26471 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26472 modes. Adjust their number of units based on aarch64_sve_vg.
26473 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26474 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26475 aarch64_addr_query_type.
26476 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26477 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26478 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26479 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26480 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26481 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26482 (aarch64_simd_imm_zero_p): Delete.
26483 (aarch64_check_zero_based_sve_index_immediate): Declare.
26484 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26485 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26486 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26487 (aarch64_sve_float_mul_immediate_p): Likewise.
26488 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26489 rather than an rtx.
26490 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26491 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26492 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26493 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26494 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26495 (aarch64_regmode_natural_size): Likewise.
26496 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26497 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26498 left one place.
26499 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26500 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26501 for VG and the SVE predicate registers.
26502 (V_ALIASES): Add a "z"-prefixed alias.
26503 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26504 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26505 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26506 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26507 (REG_CLASS_NAMES): Add entries for them.
26508 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26509 and the predicate registers.
26510 (aarch64_sve_vg): Declare.
26511 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26512 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26513 (REGMODE_NATURAL_SIZE): Define.
26514 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26515 SVE macros.
26516 * config/aarch64/aarch64.c: Include cfgrtl.h.
26517 (simd_immediate_info): Add a constructor for series vectors,
26518 and an associated step field.
26519 (aarch64_sve_vg): New variable.
26520 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26521 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26522 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26523 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26524 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26525 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26526 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26527 (aarch64_get_mask_mode): New functions.
26528 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26529 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26530 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26531 predicate modes and predicate registers. Explicitly restrict
26532 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26533 to store a vector mode if it is recognized by
26534 aarch64_classify_vector_mode.
26535 (aarch64_regmode_natural_size): New function.
26536 (aarch64_hard_regno_caller_save_mode): Return the original mode
26537 for predicates.
26538 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26539 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26540 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26541 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26542 functions.
26543 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26544 does not overlap dest if the function is frame-related. Handle
26545 SVE constants.
26546 (aarch64_split_add_offset): New function.
26547 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26548 them aarch64_add_offset.
26549 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26550 and update call to aarch64_sub_sp.
26551 (aarch64_add_cfa_expression): New function.
26552 (aarch64_expand_prologue): Pass extra temporary registers to the
26553 functions above. Handle the case in which we need to emit new
26554 DW_CFA_expressions for registers that were originally saved
26555 relative to the stack pointer, but now have to be expressed
26556 relative to the frame pointer.
26557 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26558 functions above.
26559 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26560 IP0 and IP1 values for SVE frames.
26561 (aarch64_expand_vec_series): New function.
26562 (aarch64_expand_sve_widened_duplicate): Likewise.
26563 (aarch64_expand_sve_const_vector): Likewise.
26564 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26565 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26566 into the register, rather than emitting a SET directly.
26567 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26568 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26569 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26570 (offset_9bit_signed_scaled_p): New functions.
26571 (aarch64_replicate_bitmask_imm): New function.
26572 (aarch64_bitmask_imm): Use it.
26573 (aarch64_cannot_force_const_mem): Reject expressions involving
26574 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26575 (aarch64_classify_index): Handle SVE indices, by requiring
26576 a plain register index with a scale that matches the element size.
26577 (aarch64_classify_address): Handle SVE addresses. Assert that
26578 the mode of the address is VOIDmode or an integer mode.
26579 Update call to aarch64_classify_symbol.
26580 (aarch64_classify_symbolic_expression): Update call to
26581 aarch64_classify_symbol.
26582 (aarch64_const_vec_all_in_range_p): New function.
26583 (aarch64_print_vector_float_operand): Likewise.
26584 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26585 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26586 and the FP immediates 1.0 and 0.5.
26587 (aarch64_print_address_internal): Handle SVE addresses.
26588 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26589 (aarch64_regno_regclass): Handle predicate registers.
26590 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26591 data modes.
26592 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26593 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26594 (aarch64_convert_sve_vector_bits): New function.
26595 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26596 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26597 rather than an rtx.
26598 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26599 Handle SVE vector and predicate modes. Accept VL-based constants
26600 that need only one temporary register, and VL offsets that require
26601 no temporary registers.
26602 (aarch64_conditional_register_usage): Mark the predicate registers
26603 as fixed if SVE isn't available.
26604 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26605 Return true for SVE vector and predicate modes.
26606 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26607 rather than an unsigned int. Handle SVE modes.
26608 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26609 SVE modes.
26610 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26611 if SVE is enabled.
26612 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26613 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26614 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26615 (aarch64_sve_float_mul_immediate_p): New functions.
26616 (aarch64_sve_valid_immediate): New function.
26617 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26618 Explicitly reject structure modes. Check for INDEX constants.
26619 Handle PTRUE and PFALSE constants.
26620 (aarch64_check_zero_based_sve_index_immediate): New function.
26621 (aarch64_simd_imm_zero_p): Delete.
26622 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26623 vector modes. Accept constants in the range of CNT[BHWD].
26624 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26625 ask for an Advanced SIMD mode.
26626 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26627 (aarch64_simd_vector_alignment): Handle SVE predicates.
26628 (aarch64_vectorize_preferred_vector_alignment): New function.
26629 (aarch64_simd_vector_alignment_reachable): Use it instead of
26630 the vector size.
26631 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26632 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26633 functions.
26634 (MAX_VECT_LEN): Delete.
26635 (expand_vec_perm_d): Add a vec_flags field.
26636 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26637 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26638 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26639 for SVE modes.
26640 (aarch64_evpc_rev): Rename to...
26641 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26642 (aarch64_evpc_rev_global): New function.
26643 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26644 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26645 MAX_VECT_LEN.
26646 (aarch64_evpc_sve_tbl): New function.
26647 (aarch64_expand_vec_perm_const_1): Update after rename of
26648 aarch64_evpc_rev. Handle SVE permutes too, trying
26649 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26650 than aarch64_evpc_tbl.
26651 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26652 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26653 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26654 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26655 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26656 (aarch64_expand_sve_vcond): New functions.
26657 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26658 of aarch64_vector_mode_p.
26659 (aarch64_dwarf_poly_indeterminate_value): New function.
26660 (aarch64_compute_pressure_classes): Likewise.
26661 (aarch64_can_change_mode_class): Likewise.
26662 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26663 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26664 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26665 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26666 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26667 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26668 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26669 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26670 constraints.
26671 (Dn, Dl, Dr): Accept const as well as const_vector.
26672 (Dz): Likewise. Compare against CONST0_RTX.
26673 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26674 of "vector" where appropriate.
26675 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26676 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26677 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26678 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26679 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26680 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26681 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26682 (v_int_equiv): Extend to SVE modes.
26683 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26684 mode attributes.
26685 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26686 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26687 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26688 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26689 (SVE_COND_FP_CMP): New int iterators.
26690 (perm_hilo): Handle the new unpack unspecs.
26691 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26692 attributes.
26693 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26694 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26695 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26696 (aarch64_equality_operator, aarch64_constant_vector_operand)
26697 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26698 (aarch64_sve_nonimmediate_operand): Likewise.
26699 (aarch64_sve_general_operand): Likewise.
26700 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26701 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26702 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26703 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26704 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26705 (aarch64_sve_float_arith_immediate): Likewise.
26706 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26707 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26708 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26709 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26710 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26711 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26712 (aarch64_sve_float_arith_operand): Likewise.
26713 (aarch64_sve_float_arith_with_sub_operand): Likewise.
26714 (aarch64_sve_float_mul_operand): Likewise.
26715 (aarch64_sve_vec_perm_operand): Likewise.
26716 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26717 (aarch64_mov_operand): Accept const_poly_int and const_vector.
26718 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26719 as well as const_vector.
26720 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26721 in file. Use CONST0_RTX and CONSTM1_RTX.
26722 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
26723 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26724 Use aarch64_simd_imm_zero.
26725 * config/aarch64/aarch64-sve.md: New file.
26726 * config/aarch64/aarch64.md: Include it.
26727 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26728 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26729 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26730 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26731 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26732 (sve): New attribute.
26733 (enabled): Disable instructions with the sve attribute unless
26734 TARGET_SVE.
26735 (movqi, movhi): Pass CONST_POLY_INT operaneds through
26736 aarch64_expand_mov_immediate.
26737 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26738 CNT[BHSD] immediates.
26739 (movti): Split CONST_POLY_INT moves into two halves.
26740 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26741 Split additions that need a temporary here if the destination
26742 is the stack pointer.
26743 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26744 (*add<mode>3_poly_1): New instruction.
26745 (set_clobber_cc): New expander.
26746
26747 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26748
26749 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26750 parameter and use it instead of GET_MODE_SIZE (innermode). Use
26751 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26752 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26753 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
26754 Change innermode from fixed_mode_size to machine_mode.
26755 (simplify_subreg): Update call accordingly. Handle a constant-sized
26756 subreg of a variable-length CONST_VECTOR.
26757
26758 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26759 Alan Hayward <alan.hayward@arm.com>
26760 David Sherwood <david.sherwood@arm.com>
26761
26762 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26763 (add_offset_to_base): New function, split out from...
26764 (create_mem_ref): ...here. When handling a scale other than 1,
26765 check first whether the address is valid without the offset.
26766 Add it into the base if so, leaving the index and scale as-is.
26767
26768 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26769
26770 PR c++/83778
26771 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26772 fold_for_warn before checking if arg2 is INTEGER_CST.
26773
26774 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
26775
26776 * config/rs6000/predicates.md (load_multiple_operation): Delete.
26777 (store_multiple_operation): Delete.
26778 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26779 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26780 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26781 guarded by TARGET_STRING.
26782 (rs6000_output_load_multiple): Delete.
26783 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26784 OPTION_MASK_STRING / TARGET_STRING handling.
26785 (print_operand) <'N', 'O'>: Add comment that these are unused now.
26786 (const rs6000_opt_masks) <"string">: Change mask to 0.
26787 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
26788 (MASK_STRING): Delete.
26789 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
26790 parts. Simplify.
26791 (load_multiple): Delete.
26792 (*ldmsi8): Delete.
26793 (*ldmsi7): Delete.
26794 (*ldmsi6): Delete.
26795 (*ldmsi5): Delete.
26796 (*ldmsi4): Delete.
26797 (*ldmsi3): Delete.
26798 (store_multiple): Delete.
26799 (*stmsi8): Delete.
26800 (*stmsi7): Delete.
26801 (*stmsi6): Delete.
26802 (*stmsi5): Delete.
26803 (*stmsi4): Delete.
26804 (*stmsi3): Delete.
26805 (movmemsi_8reg): Delete.
26806 (corresponding unnamed define_insn): Delete.
26807 (movmemsi_6reg): Delete.
26808 (corresponding unnamed define_insn): Delete.
26809 (movmemsi_4reg): Delete.
26810 (corresponding unnamed define_insn): Delete.
26811 (movmemsi_2reg): Delete.
26812 (corresponding unnamed define_insn): Delete.
26813 (movmemsi_1reg): Delete.
26814 (corresponding unnamed define_insn): Delete.
26815 * config/rs6000/rs6000.opt (mno-string): New.
26816 (mstring): Replace by deprecation warning stub.
26817 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
26818
26819 2018-01-12 Jakub Jelinek <jakub@redhat.com>
26820
26821 * regrename.c (regrename_do_replace): If replacing the same
26822 reg multiple times, try to reuse last created gen_raw_REG.
26823
26824 PR debug/81155
26825 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
26826 main to workaround a bug in GDB.
26827
26828 2018-01-12 Tom de Vries <tom@codesourcery.com>
26829
26830 PR target/83737
26831 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
26832
26833 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
26834
26835 PR rtl-optimization/80481
26836 * ira-color.c (get_cap_member): New function.
26837 (allocnos_conflict_by_live_ranges_p): Use it.
26838 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
26839 (setup_slot_coalesced_allocno_live_ranges): Ditto.
26840
26841 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
26842
26843 PR target/83628
26844 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
26845 (*saddl_se_1): Ditto.
26846 (*ssubsi_1): Ditto.
26847 (*ssubl_se_1): Ditto.
26848
26849 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26850
26851 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
26852 rather than wi::to_widest for DR_INITs.
26853 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
26854 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
26855 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
26856 INTEGER_CSTs.
26857 (vect_analyze_group_access_1): Note that here.
26858
26859 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26860
26861 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
26862 polynomial type sizes.
26863
26864 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
26865
26866 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
26867 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
26868 (gimple_add_tmp_var): Likewise.
26869
26870 2018-01-12 Martin Liska <mliska@suse.cz>
26871
26872 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
26873 (gimple_alloc_sizes): Likewise.
26874 (dump_gimple_statistics): Use PRIu64 in printf format.
26875 * gimple.h: Change uint64_t to int.
26876
26877 2018-01-12 Martin Liska <mliska@suse.cz>
26878
26879 * tree-core.h: Use uint64_t instead of int.
26880 * tree.c (tree_node_counts): Likewise.
26881 (tree_node_sizes): Likewise.
26882 (dump_tree_statistics): Use PRIu64 in printf format.
26883
26884 2018-01-12 Martin Liska <mliska@suse.cz>
26885
26886 * Makefile.in: As qsort_chk is implemented in vec.c, add
26887 vec.o to linkage of gencfn-macros.
26888 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
26889 passing the info to record_node_allocation_statistics.
26890 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
26891 and pass the info.
26892 * ggc-common.c (struct ggc_usage): Add operator== and use
26893 it in operator< and compare function.
26894 * mem-stats.h (struct mem_usage): Likewise.
26895 * vec.c (struct vec_usage): Remove operator< and compare
26896 function. Can be simply inherited.
26897
26898 2018-01-12 Martin Jambor <mjambor@suse.cz>
26899
26900 PR target/81616
26901 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26902 * tree-ssa-math-opts.c: Include domwalk.h.
26903 (convert_mult_to_fma_1): New function.
26904 (fma_transformation_info): New type.
26905 (fma_deferring_state): Likewise.
26906 (cancel_fma_deferring): New function.
26907 (result_of_phi): Likewise.
26908 (last_fma_candidate_feeds_initial_phi): Likewise.
26909 (convert_mult_to_fma): Added deferring logic, split actual
26910 transformation to convert_mult_to_fma_1.
26911 (math_opts_dom_walker): New type.
26912 (math_opts_dom_walker::after_dom_children): New method, body moved
26913 here from pass_optimize_widening_mul::execute, added deferring logic
26914 bits.
26915 (pass_optimize_widening_mul::execute): Moved most of code to
26916 math_opts_dom_walker::after_dom_children.
26917 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26918 * config/i386/i386.c (ix86_option_override_internal): Added
26919 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26920
26921 2018-01-12 Richard Biener <rguenther@suse.de>
26922
26923 PR debug/83157
26924 * dwarf2out.c (gen_variable_die): Do not reset old_die for
26925 inline instance vars.
26926
26927 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
26928
26929 PR target/81819
26930 * config/rx/rx.c (rx_is_restricted_memory_address):
26931 Handle SUBREG case.
26932
26933 2018-01-12 Richard Biener <rguenther@suse.de>
26934
26935 PR tree-optimization/80846
26936 * target.def (split_reduction): New target hook.
26937 * targhooks.c (default_split_reduction): New function.
26938 * targhooks.h (default_split_reduction): Declare.
26939 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26940 target requests first reduce vectors by combining low and high
26941 parts.
26942 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26943 (get_vectype_for_scalar_type_and_size): Export.
26944 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26945 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26946 * doc/tm.texi: Regenerate.
26947 * config/i386/i386.c (ix86_split_reduction): Implement
26948 TARGET_VECTORIZE_SPLIT_REDUCTION.
26949
26950 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26951
26952 PR target/83368
26953 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26954 in PIC mode except for TARGET_VXWORKS_RTP.
26955 * config/sparc/sparc.c: Include cfgrtl.h.
26956 (TARGET_INIT_PIC_REG): Define.
26957 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26958 (sparc_pic_register_p): New predicate.
26959 (sparc_legitimate_address_p): Use it.
26960 (sparc_legitimize_pic_address): Likewise.
26961 (sparc_delegitimize_address): Likewise.
26962 (sparc_mode_dependent_address_p): Likewise.
26963 (gen_load_pcrel_sym): Remove 4th parameter.
26964 (load_got_register): Adjust call to above. Remove obsolete stuff.
26965 (sparc_expand_prologue): Do not call load_got_register here.
26966 (sparc_flat_expand_prologue): Likewise.
26967 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26968 (sparc_use_pseudo_pic_reg): New function.
26969 (sparc_init_pic_reg): Likewise.
26970 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26971 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26972
26973 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
26974
26975 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26976 Add item for branch_cost.
26977
26978 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26979
26980 PR rtl-optimization/83565
26981 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26982 not extend the result to a larger mode for rotate operations.
26983 (num_sign_bit_copies1): Likewise.
26984
26985 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26986
26987 PR target/40411
26988 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26989 -symbolic.
26990 Use values-Xc.o for -pedantic.
26991 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26992
26993 2018-01-12 Martin Liska <mliska@suse.cz>
26994
26995 PR ipa/83054
26996 * ipa-devirt.c (final_warning_record::grow_type_warnings):
26997 New function.
26998 (possible_polymorphic_call_targets): Use it.
26999 (ipa_devirt): Likewise.
27000
27001 2018-01-12 Martin Liska <mliska@suse.cz>
27002
27003 * profile-count.h (enum profile_quality): Use 0 as invalid
27004 enum value of profile_quality.
27005
27006 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27007
27008 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27009 -mext-string options.
27010
27011 2018-01-12 Richard Biener <rguenther@suse.de>
27012
27013 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27014 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27015 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27016 Likewise.
27017 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27018
27019 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27020
27021 * configure.ac (--with-long-double-format): Add support for the
27022 configuration option to change the default long double format on
27023 PowerPC systems.
27024 * config.gcc (powerpc*-linux*-*): Likewise.
27025 * configure: Regenerate.
27026 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27027 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27028 used without modification.
27029
27030 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27031
27032 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27033 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27034 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27035 MISC_BUILTIN_SPEC_BARRIER.
27036 (rs6000_init_builtins): Likewise.
27037 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27038 enum value.
27039 (speculation_barrier): New define_insn.
27040 * doc/extend.texi: Document __builtin_speculation_barrier.
27041
27042 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27043
27044 PR target/83203
27045 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27046 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27047 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27048 iterators.
27049 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27050 integral modes instead of "ss" and "sd".
27051 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27052 vectors with 32-bit and 64-bit elements.
27053 (vecdupssescalarmodesuffix): New mode attribute.
27054 (vec_dup<mode>): Use it.
27055
27056 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27057
27058 PR target/83330
27059 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27060 frame if argument is passed on stack.
27061
27062 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27063
27064 PR target/82682
27065 * ree.c (combine_reaching_defs): Optimize also
27066 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27067 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27068
27069 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27070
27071 PR middle-end/83189
27072 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27073
27074 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27075
27076 PR middle-end/83718
27077 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27078 after they are computed.
27079
27080 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27081
27082 PR tree-optimization/83695
27083 * gimple-loop-linterchange.cc
27084 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27085 reset cached scev information after interchange.
27086 (pass_linterchange::execute): Remove call to scev_reset_htab.
27087
27088 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27089
27090 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27091 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27092 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27093 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27094 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27095 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27096 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27097 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27098 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27099 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27100 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27101 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27102 (V_lane_reg): Likewise.
27103 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27104 New define_expand.
27105 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27106 (vfmal_lane_low<mode>_intrinsic,
27107 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27108 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27109 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27110 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27111 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27112 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27113
27114 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27115
27116 * config/arm/arm-cpus.in (fp16fml): New feature.
27117 (ALL_SIMD): Add fp16fml.
27118 (armv8.2-a): Add fp16fml as an option.
27119 (armv8.3-a): Likewise.
27120 (armv8.4-a): Add fp16fml as part of fp16.
27121 * config/arm/arm.h (TARGET_FP16FML): Define.
27122 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27123 when appropriate.
27124 * config/arm/arm-modes.def (V2HF): Define.
27125 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27126 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27127 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27128 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27129 vfmsl_low, vfmsl_high): New set of builtins.
27130 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27131 (vfml_op): New code attribute.
27132 (VFMLHALVES): New int iterator.
27133 (VFML, VFMLSEL): New mode attributes.
27134 (V_reg): Define mapping for V2HF.
27135 (V_hi, V_lo): New mode attributes.
27136 (VF_constraint): Likewise.
27137 (vfml_half, vfml_half_selector): New int attributes.
27138 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27139 define_expand.
27140 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27141 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27142 New define_insn.
27143 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27144 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27145 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27146 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27147 documentation.
27148 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27149 Document new effective target and option set.
27150
27151 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27152
27153 * config/arm/arm-cpus.in (armv8_4): New feature.
27154 (ARMv8_4a): New fgroup.
27155 (armv8.4-a): New arch.
27156 * config/arm/arm-tables.opt: Regenerate.
27157 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27158 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27159 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27160 Add matching rules for -march=armv8.4-a and extensions.
27161 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27162
27163 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27164
27165 PR target/81821
27166 * config/rx/rx.md (BW): New mode attribute.
27167 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27168
27169 2018-01-11 Richard Biener <rguenther@suse.de>
27170
27171 PR tree-optimization/83435
27172 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27173 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27174 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27175
27176 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27177 Alan Hayward <alan.hayward@arm.com>
27178 David Sherwood <david.sherwood@arm.com>
27179
27180 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27181 field.
27182 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27183 (aarch64_print_address_internal): Use it to check for a zero offset.
27184
27185 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27186 Alan Hayward <alan.hayward@arm.com>
27187 David Sherwood <david.sherwood@arm.com>
27188
27189 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27190 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27191 Return a poly_int64 rather than a HOST_WIDE_INT.
27192 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27193 rather than a HOST_WIDE_INT.
27194 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27195 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27196 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27197 final_offset from HOST_WIDE_INT to poly_int64.
27198 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27199 to_constant when getting the number of units in an Advanced SIMD
27200 mode.
27201 (aarch64_builtin_vectorized_function): Check for a constant number
27202 of units.
27203 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27204 GET_MODE_SIZE.
27205 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27206 attribute instead of GET_MODE_NUNITS.
27207 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27208 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27209 GET_MODE_SIZE for fixed-size registers.
27210 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27211 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27212 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27213 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27214 (aarch64_print_operand, aarch64_print_address_internal)
27215 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27216 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27217 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27218 Handle polynomial GET_MODE_SIZE.
27219 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27220 wider than SImode without modification.
27221 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27222 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27223 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27224 passing and returning SVE modes.
27225 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27226 rather than GEN_INT.
27227 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27228 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27229 (aarch64_allocate_and_probe_stack_space): Likewise.
27230 (aarch64_layout_frame): Cope with polynomial offsets.
27231 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27232 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27233 polynomial offsets.
27234 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27235 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27236 poly_int64 rather than a HOST_WIDE_INT.
27237 (aarch64_get_separate_components, aarch64_process_components)
27238 (aarch64_expand_prologue, aarch64_expand_epilogue)
27239 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27240 (aarch64_anchor_offset): New function, split out from...
27241 (aarch64_legitimize_address): ...here.
27242 (aarch64_builtin_vectorization_cost): Handle polynomial
27243 TYPE_VECTOR_SUBPARTS.
27244 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27245 GET_MODE_NUNITS.
27246 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27247 number of elements from the PARALLEL rather than the mode.
27248 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27249 rather than GET_MODE_BITSIZE.
27250 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27251 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27252 (aarch64_expand_vec_perm_const_1): Handle polynomial
27253 d->perm.length () and d->perm elements.
27254 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27255 Apply to_constant to d->perm elements.
27256 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27257 polynomial CONST_VECTOR_NUNITS.
27258 (aarch64_move_pointer): Take amount as a poly_int64 rather
27259 than an int.
27260 (aarch64_progress_pointer): Avoid temporary variable.
27261 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27262 the mode attribute instead of GET_MODE.
27263
27264 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27265 Alan Hayward <alan.hayward@arm.com>
27266 David Sherwood <david.sherwood@arm.com>
27267
27268 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27269 x exists before using it.
27270 (aarch64_add_constant_internal): Rename to...
27271 (aarch64_add_offset_1): ...this. Replace regnum with separate
27272 src and dest rtxes. Handle the case in which they're different,
27273 including when the offset is zero. Replace scratchreg with an rtx.
27274 Use 2 additions if there is no spare register into which we can
27275 move a 16-bit constant.
27276 (aarch64_add_constant): Delete.
27277 (aarch64_add_offset): Replace reg with separate src and dest
27278 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27279 Use aarch64_add_offset_1.
27280 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27281 an rtx rather than an int. Take the delta as a poly_int64
27282 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27283 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27284 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27285 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27286 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27287 and aarch64_add_sp.
27288 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27289 aarch64_add_constant.
27290
27291 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27292
27293 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27294 Use scalar_float_mode.
27295
27296 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27297
27298 * config/aarch64/aarch64-simd.md
27299 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27300 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27301 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27302 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27303 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27304 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27305 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27306 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27307 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27308 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27309
27310 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27311
27312 PR target/83514
27313 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27314 targ_options->x_arm_arch_string is non NULL.
27315
27316 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27317
27318 * config/aarch64/aarch64.h
27319 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27320
27321 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27322
27323 PR target/82096
27324 * expmed.c (emit_store_flag_force): Swap if const op0
27325 and change VOIDmode to mode of op0.
27326
27327 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27328
27329 PR rtl-optimization/83761
27330 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27331 than bytes to mode_for_size.
27332
27333 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27334
27335 PR middle-end/83189
27336 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27337 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27338 profile.
27339
27340 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27341
27342 PR middle-end/83575
27343 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27344 when in layout mode.
27345 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27346 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27347 partition fixup.
27348
27349 2018-01-10 Michael Collison <michael.collison@arm.com>
27350
27351 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27352 * config/aarch64/aarch64-option-extension.def: Add
27353 AARCH64_OPT_EXTENSION of 'fp16fml'.
27354 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27355 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27356 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27357 * config/aarch64/constraints.md (Ui7): New constraint.
27358 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27359 (VFMLA_SEL_W): Ditto.
27360 (f16quad): Ditto.
27361 (f16mac1): Ditto.
27362 (VFMLA16_LOW): New int iterator.
27363 (VFMLA16_HIGH): Ditto.
27364 (UNSPEC_FMLAL): New unspec.
27365 (UNSPEC_FMLSL): Ditto.
27366 (UNSPEC_FMLAL2): Ditto.
27367 (UNSPEC_FMLSL2): Ditto.
27368 (f16mac): New code attribute.
27369 * config/aarch64/aarch64-simd-builtins.def
27370 (aarch64_fmlal_lowv2sf): Ditto.
27371 (aarch64_fmlsl_lowv2sf): Ditto.
27372 (aarch64_fmlalq_lowv4sf): Ditto.
27373 (aarch64_fmlslq_lowv4sf): Ditto.
27374 (aarch64_fmlal_highv2sf): Ditto.
27375 (aarch64_fmlsl_highv2sf): Ditto.
27376 (aarch64_fmlalq_highv4sf): Ditto.
27377 (aarch64_fmlslq_highv4sf): Ditto.
27378 (aarch64_fmlal_lane_lowv2sf): Ditto.
27379 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27380 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27381 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27382 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27383 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27384 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27385 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27386 (aarch64_fmlal_lane_highv2sf): Ditto.
27387 (aarch64_fmlsl_lane_highv2sf): Ditto.
27388 (aarch64_fmlal_laneq_highv2sf): Ditto.
27389 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27390 (aarch64_fmlalq_lane_highv4sf): Ditto.
27391 (aarch64_fmlsl_lane_highv4sf): Ditto.
27392 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27393 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27394 * config/aarch64/aarch64-simd.md:
27395 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27396 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27397 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27398 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27399 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27400 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27401 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27402 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27403 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27404 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27405 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27406 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27407 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27408 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27409 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27410 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27411 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27412 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27413 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27414 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27415 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27416 (vfmlsl_low_u32): Ditto.
27417 (vfmlalq_low_u32): Ditto.
27418 (vfmlslq_low_u32): Ditto.
27419 (vfmlal_high_u32): Ditto.
27420 (vfmlsl_high_u32): Ditto.
27421 (vfmlalq_high_u32): Ditto.
27422 (vfmlslq_high_u32): Ditto.
27423 (vfmlal_lane_low_u32): Ditto.
27424 (vfmlsl_lane_low_u32): Ditto.
27425 (vfmlal_laneq_low_u32): Ditto.
27426 (vfmlsl_laneq_low_u32): Ditto.
27427 (vfmlalq_lane_low_u32): Ditto.
27428 (vfmlslq_lane_low_u32): Ditto.
27429 (vfmlalq_laneq_low_u32): Ditto.
27430 (vfmlslq_laneq_low_u32): Ditto.
27431 (vfmlal_lane_high_u32): Ditto.
27432 (vfmlsl_lane_high_u32): Ditto.
27433 (vfmlal_laneq_high_u32): Ditto.
27434 (vfmlsl_laneq_high_u32): Ditto.
27435 (vfmlalq_lane_high_u32): Ditto.
27436 (vfmlslq_lane_high_u32): Ditto.
27437 (vfmlalq_laneq_high_u32): Ditto.
27438 (vfmlslq_laneq_high_u32): Ditto.
27439 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27440 (AARCH64_FL_FOR_ARCH8_4): New.
27441 (AARCH64_ISA_F16FML): New ISA flag.
27442 (TARGET_F16FML): New feature flag for fp16fml.
27443 (doc/invoke.texi): Document new fp16fml option.
27444
27445 2018-01-10 Michael Collison <michael.collison@arm.com>
27446
27447 * config/aarch64/aarch64-builtins.c:
27448 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27449 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27450 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27451 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27452 (AARCH64_ISA_SHA3): New ISA flag.
27453 (TARGET_SHA3): New feature flag for sha3.
27454 * config/aarch64/iterators.md (sha512_op): New int attribute.
27455 (CRYPTO_SHA512): New int iterator.
27456 (UNSPEC_SHA512H): New unspec.
27457 (UNSPEC_SHA512H2): Ditto.
27458 (UNSPEC_SHA512SU0): Ditto.
27459 (UNSPEC_SHA512SU1): Ditto.
27460 * config/aarch64/aarch64-simd-builtins.def
27461 (aarch64_crypto_sha512hqv2di): New builtin.
27462 (aarch64_crypto_sha512h2qv2di): Ditto.
27463 (aarch64_crypto_sha512su0qv2di): Ditto.
27464 (aarch64_crypto_sha512su1qv2di): Ditto.
27465 (aarch64_eor3qv8hi): Ditto.
27466 (aarch64_rax1qv2di): Ditto.
27467 (aarch64_xarqv2di): Ditto.
27468 (aarch64_bcaxqv8hi): Ditto.
27469 * config/aarch64/aarch64-simd.md:
27470 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27471 (aarch64_crypto_sha512su0qv2di): Ditto.
27472 (aarch64_crypto_sha512su1qv2di): Ditto.
27473 (aarch64_eor3qv8hi): Ditto.
27474 (aarch64_rax1qv2di): Ditto.
27475 (aarch64_xarqv2di): Ditto.
27476 (aarch64_bcaxqv8hi): Ditto.
27477 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27478 (vsha512h2q_u64): Ditto.
27479 (vsha512su0q_u64): Ditto.
27480 (vsha512su1q_u64): Ditto.
27481 (veor3q_u16): Ditto.
27482 (vrax1q_u64): Ditto.
27483 (vxarq_u64): Ditto.
27484 (vbcaxq_u16): Ditto.
27485 * config/arm/types.md (crypto_sha512): New type attribute.
27486 (crypto_sha3): Ditto.
27487 (doc/invoke.texi): Document new sha3 option.
27488
27489 2018-01-10 Michael Collison <michael.collison@arm.com>
27490
27491 * config/aarch64/aarch64-builtins.c:
27492 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27493 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27494 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27495 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27496 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27497 (AARCH64_ISA_SM4): New ISA flag.
27498 (TARGET_SM4): New feature flag for sm4.
27499 * config/aarch64/aarch64-simd-builtins.def
27500 (aarch64_sm3ss1qv4si): Ditto.
27501 (aarch64_sm3tt1aq4si): Ditto.
27502 (aarch64_sm3tt1bq4si): Ditto.
27503 (aarch64_sm3tt2aq4si): Ditto.
27504 (aarch64_sm3tt2bq4si): Ditto.
27505 (aarch64_sm3partw1qv4si): Ditto.
27506 (aarch64_sm3partw2qv4si): Ditto.
27507 (aarch64_sm4eqv4si): Ditto.
27508 (aarch64_sm4ekeyqv4si): Ditto.
27509 * config/aarch64/aarch64-simd.md:
27510 (aarch64_sm3ss1qv4si): Ditto.
27511 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27512 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27513 (aarch64_sm4eqv4si): Ditto.
27514 (aarch64_sm4ekeyqv4si): Ditto.
27515 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27516 (sm3part_op): Ditto.
27517 (CRYPTO_SM3TT): Ditto.
27518 (CRYPTO_SM3PART): Ditto.
27519 (UNSPEC_SM3SS1): New unspec.
27520 (UNSPEC_SM3TT1A): Ditto.
27521 (UNSPEC_SM3TT1B): Ditto.
27522 (UNSPEC_SM3TT2A): Ditto.
27523 (UNSPEC_SM3TT2B): Ditto.
27524 (UNSPEC_SM3PARTW1): Ditto.
27525 (UNSPEC_SM3PARTW2): Ditto.
27526 (UNSPEC_SM4E): Ditto.
27527 (UNSPEC_SM4EKEY): Ditto.
27528 * config/aarch64/constraints.md (Ui2): New constraint.
27529 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27530 * config/arm/types.md (crypto_sm3): New type attribute.
27531 (crypto_sm4): Ditto.
27532 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27533 (vsm3tt1aq_u32): Ditto.
27534 (vsm3tt1bq_u32): Ditto.
27535 (vsm3tt2aq_u32): Ditto.
27536 (vsm3tt2bq_u32): Ditto.
27537 (vsm3partw1q_u32): Ditto.
27538 (vsm3partw2q_u32): Ditto.
27539 (vsm4eq_u32): Ditto.
27540 (vsm4ekeyq_u32): Ditto.
27541 (doc/invoke.texi): Document new sm4 option.
27542
27543 2018-01-10 Michael Collison <michael.collison@arm.com>
27544
27545 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27546 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27547 (AARCH64_FL_FOR_ARCH8_4): New.
27548 (AARCH64_FL_V8_4): New flag.
27549 (doc/invoke.texi): Document new armv8.4-a option.
27550
27551 2018-01-10 Michael Collison <michael.collison@arm.com>
27552
27553 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27554 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27555 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27556 * config/aarch64/aarch64-option-extension.def: Add
27557 AARCH64_OPT_EXTENSION of 'sha2'.
27558 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27559 (crypto): Disable sha2 and aes if crypto disabled.
27560 (crypto): Enable aes and sha2 if enabled.
27561 (simd): Disable sha2 and aes if simd disabled.
27562 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27563 New flags.
27564 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27565 (TARGET_SHA2): New feature flag for sha2.
27566 (TARGET_AES): New feature flag for aes.
27567 * config/aarch64/aarch64-simd.md:
27568 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27569 conditional on TARGET_AES.
27570 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27571 (aarch64_crypto_sha1hsi): Make pattern conditional
27572 on TARGET_SHA2.
27573 (aarch64_crypto_sha1hv4si): Ditto.
27574 (aarch64_be_crypto_sha1hv4si): Ditto.
27575 (aarch64_crypto_sha1su1v4si): Ditto.
27576 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27577 (aarch64_crypto_sha1su0v4si): Ditto.
27578 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27579 (aarch64_crypto_sha256su0v4si): Ditto.
27580 (aarch64_crypto_sha256su1v4si): Ditto.
27581 (doc/invoke.texi): Document new aes and sha2 options.
27582
27583 2018-01-10 Martin Sebor <msebor@redhat.com>
27584
27585 PR tree-optimization/83781
27586 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27587 as string arrays.
27588
27589 2018-01-11 Martin Sebor <msebor@gmail.com>
27590 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27591
27592 PR tree-optimization/83501
27593 PR tree-optimization/81703
27594
27595 * tree-ssa-strlen.c (get_string_cst): Rename...
27596 (get_string_len): ...to this. Handle global constants.
27597 (handle_char_store): Adjust.
27598
27599 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27600 Jim Wilson <jimw@sifive.com>
27601
27602 * config/riscv/riscv-protos.h (riscv_output_return): New.
27603 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27604 (riscv_attribute_table, riscv_output_return),
27605 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27606 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27607 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27608 function.
27609 (riscv_expand_prologue): Add early return for naked function.
27610 (riscv_expand_epilogue): Likewise.
27611 (riscv_function_ok_for_sibcall): Return false for naked function.
27612 (riscv_set_current_function): New.
27613 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27614 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27615 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27616 * doc/extend.texi (RISC-V Function Attributes): New.
27617
27618 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27619
27620 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27621 check for 128-bit long double before checking TCmode.
27622 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27623 128-bit long doubles before checking TFmode or TCmode.
27624 (FLOAT128_IBM_P): Likewise.
27625
27626 2018-01-10 Martin Sebor <msebor@redhat.com>
27627
27628 PR tree-optimization/83671
27629 * builtins.c (c_strlen): Unconditionally return zero for the empty
27630 string.
27631 Use -Warray-bounds for warnings.
27632 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27633 for non-constant array indices with COMPONENT_REF, arrays of
27634 arrays, and pointers to arrays.
27635 (gimple_fold_builtin_strlen): Determine and set length range for
27636 non-constant character arrays.
27637
27638 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27639
27640 PR middle-end/81897
27641 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27642 empty blocks.
27643
27644 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27645
27646 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27647
27648 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27649
27650 PR target/83399
27651 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27652 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27653 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27654 indexed_or_indirect_operand predicate.
27655 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27656 (*vsx_le_perm_load_v8hi): Likewise.
27657 (*vsx_le_perm_load_v16qi): Likewise.
27658 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27659 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27660 (*vsx_le_perm_store_v8hi): Likewise.
27661 (*vsx_le_perm_store_v16qi): Likewise.
27662 (eight unnamed splitters): Likewise.
27663
27664 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27665
27666 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27667 * config/rs6000/emmintrin.h: Likewise.
27668 * config/rs6000/mmintrin.h: Likewise.
27669 * config/rs6000/xmmintrin.h: Likewise.
27670
27671 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27672
27673 PR c++/43486
27674 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27675 "public_flag".
27676 * tree.c (tree_nop_conversion): Return true for location wrapper
27677 nodes.
27678 (maybe_wrap_with_location): New function.
27679 (selftest::check_strip_nops): New function.
27680 (selftest::test_location_wrappers): New function.
27681 (selftest::tree_c_tests): Call it.
27682 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27683 (maybe_wrap_with_location): New decl.
27684 (EXPR_LOCATION_WRAPPER_P): New macro.
27685 (location_wrapper_p): New inline function.
27686 (tree_strip_any_location_wrapper): New inline function.
27687
27688 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27689
27690 PR target/83735
27691 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27692 stack_realign_offset for the largest alignment of stack slot
27693 actually used.
27694 (ix86_find_max_used_stack_alignment): New function.
27695 (ix86_finalize_stack_frame_flags): Use it. Set
27696 max_used_stack_alignment if we don't realign stack.
27697 * config/i386/i386.h (machine_function): Add
27698 max_used_stack_alignment.
27699
27700 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27701
27702 * config/arm/arm.opt (-mbranch-cost): New option.
27703 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27704 account.
27705
27706 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27707
27708 PR target/83629
27709 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27710 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27711
27712 2018-01-10 Richard Biener <rguenther@suse.de>
27713
27714 PR debug/83765
27715 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27716 early out so it also covers the case where we have a non-NULL
27717 origin.
27718
27719 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27720
27721 PR tree-optimization/83753
27722 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27723 for non-strided grouped accesses if the number of elements is 1.
27724
27725 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27726
27727 PR target/81616
27728 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27729 * i386.h (TARGET_USE_GATHER): Define.
27730 * x86-tune.def (X86_TUNE_USE_GATHER): New.
27731
27732 2018-01-10 Martin Liska <mliska@suse.cz>
27733
27734 PR bootstrap/82831
27735 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27736 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27737 partitioning.
27738 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27739 CLEANUP_NO_PARTITIONING is not set.
27740
27741 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
27742
27743 * doc/rtl.texi: Remove documentation of (const ...) wrappers
27744 for vectors, as a partial revert of r254296.
27745 * rtl.h (const_vec_p): Delete.
27746 (const_vec_duplicate_p): Don't test for vector CONSTs.
27747 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27748 * expmed.c (make_tree): Likewise.
27749
27750 Revert:
27751 * common.md (E, F): Use CONSTANT_P instead of checking for
27752 CONST_VECTOR.
27753 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27754 checking for CONST_VECTOR.
27755
27756 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27757
27758 PR middle-end/83575
27759 * predict.c (force_edge_cold): Handle in more sane way edges
27760 with no prediction.
27761
27762 2018-01-09 Carl Love <cel@us.ibm.com>
27763
27764 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27765 V4SI, V4SF types.
27766 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27767 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27768 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27769 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
27770 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27771 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
27772 * config/rs6000/rs6000-protos.h: Add extern defition for
27773 rs6000_generate_float2_double_code.
27774 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27775 function.
27776 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27777 (float2_v2df): Add define_expand.
27778
27779 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
27780
27781 PR target/83628
27782 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
27783 op_mode in the force_to_mode call.
27784
27785 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27786
27787 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
27788 instead of checking each element individually.
27789 (aarch64_evpc_uzp): Likewise.
27790 (aarch64_evpc_zip): Likewise.
27791 (aarch64_evpc_ext): Likewise.
27792 (aarch64_evpc_rev): Likewise.
27793 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
27794 instead of checking each element individually. Return true without
27795 generating rtl if
27796 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
27797 whether all selected elements come from the same input, instead of
27798 checking each element individually. Remove calls to gen_rtx_REG,
27799 start_sequence and end_sequence and instead assert that no rtl is
27800 generated.
27801
27802 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27803
27804 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
27805 order of HIGH and CONST checks.
27806
27807 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
27808
27809 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
27810 if the destination isn't an SSA_NAME.
27811
27812 2018-01-09 Richard Biener <rguenther@suse.de>
27813
27814 PR tree-optimization/83668
27815 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
27816 move prologue...
27817 (canonicalize_loop_form): ... here, renamed from ...
27818 (canonicalize_loop_closed_ssa_form): ... this and amended to
27819 swap successor edges for loop exit blocks to make us use
27820 the RPO order we need for initial schedule generation.
27821
27822 2018-01-09 Joseph Myers <joseph@codesourcery.com>
27823
27824 PR tree-optimization/64811
27825 * match.pd: When optimizing comparisons with Inf, avoid
27826 introducing or losing exceptions from comparisons with NaN.
27827
27828 2018-01-09 Martin Liska <mliska@suse.cz>
27829
27830 PR sanitizer/82517
27831 * asan.c (shadow_mem_size): Add gcc_assert.
27832
27833 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
27834
27835 Don't save registers in main().
27836
27837 PR target/83738
27838 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
27839 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
27840 * config/avr/avr.c (avr_set_current_function): Don't error if
27841 naked, OS_task or OS_main are specified at the same time.
27842 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
27843 OS_main.
27844 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
27845 attribute.
27846 * common/config/avr/avr-common.c (avr_option_optimization_table):
27847 Switch on -mmain-is-OS_task for optimizing compilations.
27848
27849 2018-01-09 Richard Biener <rguenther@suse.de>
27850
27851 PR tree-optimization/83572
27852 * graphite.c: Include cfganal.h.
27853 (graphite_transform_loops): Connect infinite loops to exit
27854 and remove fake edges at the end.
27855
27856 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27857
27858 * ipa-inline.c (edge_badness): Revert accidental checkin.
27859
27860 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
27861
27862 PR ipa/80763
27863 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
27864 symbols; not inline clones.
27865
27866 2018-01-09 Jakub Jelinek <jakub@redhat.com>
27867
27868 PR target/83507
27869 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
27870 hard registers. Formatting fixes.
27871
27872 PR preprocessor/83722
27873 * gcc.c (try_generate_repro): Pass
27874 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
27875 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
27876 do_report_bug.
27877
27878 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
27879 Kito Cheng <kito.cheng@gmail.com>
27880
27881 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
27882 (riscv_leaf_function_p): Delete.
27883 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
27884
27885 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27886
27887 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
27888 function.
27889 (do_ifelse): New function.
27890 (do_isel): New function.
27891 (do_sub3): New function.
27892 (do_add3): New function.
27893 (do_load_mask_compare): New function.
27894 (do_overlap_load_compare): New function.
27895 (expand_compare_loop): New function.
27896 (expand_block_compare): Call expand_compare_loop() when appropriate.
27897 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27898 option description.
27899 (-mblock-compare-inline-loop-limit): New option.
27900
27901 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27902
27903 PR target/83677
27904 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27905 Reverse order of second and third operands in first alternative.
27906 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27907 of first and second elements in UNSPEC_VPERMR vector.
27908 (altivec_expand_vec_perm_le): Likewise.
27909
27910 2018-01-08 Jeff Law <law@redhat.com>
27911
27912 PR rtl-optimizatin/81308
27913 * tree-switch-conversion.c (cfg_altered): New file scoped static.
27914 (process_switch): If group_case_labels makes a change, then set
27915 cfg_altered.
27916 (pass_convert_switch::execute): If a switch is converted, then
27917 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
27918
27919 PR rtl-optimization/81308
27920 * recog.c (split_all_insns): Conditionally cleanup the CFG after
27921 splitting insns.
27922
27923 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
27924
27925 PR target/83663 - Revert r255946
27926 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27927 generation for cases where splatting a value is not useful.
27928 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27929 across a vec_duplicate and a paradoxical subreg forming a vector
27930 mode to a vec_concat.
27931
27932 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27933
27934 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27935 -march=armv8.3-a variants.
27936 * config/arm/t-multilib: Likewise.
27937 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
27938
27939 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27940
27941 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27942 to generate rtl.
27943 (cceq_ior_compare_complement): Give it a name so I can use it, and
27944 change boolean_or_operator predicate to boolean_operator so it can
27945 be used to generate a crand.
27946 (eqne): New code iterator.
27947 (bd/bd_neg): New code_attrs.
27948 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27949 a single define_insn.
27950 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27951 decrement (bdnzt/bdnzf/bdzt/bdzf).
27952 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27953 with the new names of the branch decrement patterns, and added the
27954 names of the branch decrement conditional patterns.
27955
27956 2018-01-08 Richard Biener <rguenther@suse.de>
27957
27958 PR tree-optimization/83563
27959 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27960 cache.
27961
27962 2018-01-08 Richard Biener <rguenther@suse.de>
27963
27964 PR middle-end/83713
27965 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27966
27967 2018-01-08 Richard Biener <rguenther@suse.de>
27968
27969 PR tree-optimization/83685
27970 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27971 references to abnormals.
27972
27973 2018-01-08 Richard Biener <rguenther@suse.de>
27974
27975 PR lto/83719
27976 * dwarf2out.c (output_indirect_strings): Handle empty
27977 skeleton_debug_str_hash.
27978 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27979
27980 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27981
27982 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27983 (emit_store_direct): Likewise.
27984 (arc_trampoline_adjust_address): Likewise.
27985 (arc_asm_trampoline_template): New function.
27986 (arc_initialize_trampoline): Use asm_trampoline_template.
27987 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27988 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27989 * config/arc/arc.md (flush_icache): Delete pattern.
27990
27991 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
27992
27993 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27994 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27995 munaligned-access.
27996
27997 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
27998
27999 PR target/83681
28000 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28001 by not USED_FOR_TARGET.
28002 (make_pass_resolve_sw_modes): Likewise.
28003
28004 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28005
28006 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28007 USED_FOR_TARGET.
28008
28009 2018-01-08 Richard Biener <rguenther@suse.de>
28010
28011 PR middle-end/83580
28012 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28013
28014 2018-01-08 Richard Biener <rguenther@suse.de>
28015
28016 PR middle-end/83517
28017 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28018
28019 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28020
28021 PR middle-end/81897
28022 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28023 basic blocks with a small number of successors.
28024 (convert_control_dep_chain_into_preds): Improve handling of
28025 forwarder blocks.
28026 (dump_predicates): Split apart into...
28027 (dump_pred_chain): ...here...
28028 (dump_pred_info): ...and here.
28029 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28030 (can_chain_union_be_invalidated_p): Improve check for invalidation
28031 of paths.
28032 (uninit_uses_cannot_happen): Avoid unnecessary if
28033 convert_control_dep_chain_into_preds yielded nothing.
28034
28035 2018-01-06 Martin Sebor <msebor@redhat.com>
28036
28037 PR tree-optimization/83640
28038 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28039 subtracting negative offset from size.
28040 (builtin_access::overlap): Adjust offset bounds of the access to fall
28041 within the size of the object if possible.
28042
28043 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28044
28045 PR rtl-optimization/83699
28046 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28047 extract_bit_field_as_subreg to cases in which the extracted
28048 value is also a vector.
28049
28050 * lra-constraints.c (process_alt_operands): Test for the equivalence
28051 substitutions when detecting a possible reload cycle.
28052
28053 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28054
28055 PR debug/83480
28056 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28057 by default if flag_selective_schedling{,2}. Formatting fixes.
28058
28059 PR rtl-optimization/83682
28060 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28061 if it has non-VECTOR_MODE element mode.
28062 (vec_duplicate_p): Likewise.
28063
28064 PR middle-end/83694
28065 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28066 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28067
28068 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28069
28070 PR target/83604
28071 * config/i386/i386-builtin.def
28072 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28073 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28074 Require also OPTION_MASK_ISA_AVX512F in addition to
28075 OPTION_MASK_ISA_GFNI.
28076 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28077 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28078 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28079 to OPTION_MASK_ISA_GFNI.
28080 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28081 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28082 OPTION_MASK_ISA_AVX512BW.
28083 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28084 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28085 addition to OPTION_MASK_ISA_GFNI.
28086 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28087 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28088 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28089 to OPTION_MASK_ISA_GFNI.
28090 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28091 a requirement for all ISAs rather than any of them with a few
28092 exceptions.
28093 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28094 processing.
28095 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28096 bitmasks to be enabled with 3 exceptions, instead of requiring any
28097 enabled ISA with lots of exceptions.
28098 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28099 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28100 Change avx512bw in isa attribute to avx512f.
28101 * config/i386/sgxintrin.h: Add license boilerplate.
28102 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28103 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28104 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28105 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28106 defined.
28107 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28108 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28109 temporarily sse2 rather than sse if not enabled already.
28110
28111 PR target/83604
28112 * config/i386/sse.md (VI248_VLBW): Rename to ...
28113 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28114 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28115 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28116 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28117 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28118 mode iterator instead of VI248_VLBW.
28119
28120 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28121
28122 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28123 (record_modified): Skip clobbers; add debug output.
28124 (param_change_prob): Use sreal frequencies.
28125
28126 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28127
28128 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28129 punt for user-aligned variables.
28130
28131 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28132
28133 * tree-chrec.c (chrec_contains_symbols): Return true for
28134 POLY_INT_CST.
28135
28136 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28137
28138 PR target/82439
28139 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28140 of (x|y) == x for BICS pattern.
28141
28142 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28143
28144 PR tree-optimization/83605
28145 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28146 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28147 can throw.
28148
28149 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28150
28151 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28152 * config/epiphany/rtems.h: New file.
28153
28154 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28155 Uros Bizjak <ubizjak@gmail.com>
28156
28157 PR target/83554
28158 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28159 QIreg_operand instead of register_operand predicate.
28160 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28161 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28162 comments instead of -fmitigate[-_]rop.
28163
28164 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28165
28166 PR bootstrap/81926
28167 * cgraphunit.c (symbol_table::compile): Switch to text_section
28168 before calling assembly_start debug hook.
28169 * run-rtl-passes.c (run_rtl_passes): Likewise.
28170 Include output.h.
28171
28172 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28173
28174 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28175 range_int_cst_p rather than !symbolic_range_p before calling
28176 extract_range_from_multiplicative_op_1.
28177
28178 2018-01-04 Jeff Law <law@redhat.com>
28179
28180 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28181 redundant test in assertion.
28182
28183 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28184
28185 * doc/rtl.texi: Document machine_mode wrapper classes.
28186
28187 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28188
28189 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28190 using tree_to_uhwi.
28191
28192 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28193
28194 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28195 the VEC_PERM_EXPR fold to fail.
28196
28197 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28198
28199 PR debug/83585
28200 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28201 to switched_sections.
28202
28203 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28204
28205 PR target/83680
28206 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28207 test for d.testing.
28208
28209 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28210
28211 PR target/83387
28212 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28213 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28214
28215 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28216
28217 PR debug/83666
28218 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28219 is BLKmode and bitpos not zero or mode change is needed.
28220
28221 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28222
28223 PR target/83675
28224 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28225 TARGET_VIS2.
28226
28227 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28228
28229 PR target/83628
28230 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28231 instead of MULT rtx. Update all corresponding splitters.
28232 (*saddl_se): Ditto.
28233 (*ssub<modesuffix>): Ditto.
28234 (*ssubl_se): Ditto.
28235 (*cmp_sadd_di): Update split patterns.
28236 (*cmp_sadd_si): Ditto.
28237 (*cmp_sadd_sidi): Ditto.
28238 (*cmp_ssub_di): Ditto.
28239 (*cmp_ssub_si): Ditto.
28240 (*cmp_ssub_sidi): Ditto.
28241 * config/alpha/predicates.md (const23_operand): New predicate.
28242 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28243 Look for ASHIFT, not MULT inner operand.
28244 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28245
28246 2018-01-04 Martin Liska <mliska@suse.cz>
28247
28248 PR gcov-profile/83669
28249 * gcov.c (output_intermediate_file): Add version to intermediate
28250 gcov file.
28251 * doc/gcov.texi: Document new field 'version' in intermediate
28252 file format. Fix location of '-k' option of gcov command.
28253
28254 2018-01-04 Martin Liska <mliska@suse.cz>
28255
28256 PR ipa/82352
28257 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28258
28259 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28260
28261 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28262
28263 2018-01-03 Martin Sebor <msebor@redhat.com>
28264
28265 PR tree-optimization/83655
28266 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28267 checking calls with invalid arguments.
28268
28269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28270
28271 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28272 (vectorizable_mask_load_store): Delete.
28273 (vectorizable_call): Return false for masked loads and stores.
28274 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28275 instead of gimple_assign_rhs1.
28276 (vectorizable_load): Handle IFN_MASK_LOAD.
28277 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28278
28279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28280
28281 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28282 split out from..,
28283 (vectorizable_mask_load_store): ...here.
28284 (vectorizable_load): ...and here.
28285
28286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28287
28288 * tree-vect-stmts.c (vect_build_all_ones_mask)
28289 (vect_build_zero_merge_argument): New functions, split out from...
28290 (vectorizable_load): ...here.
28291
28292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28293
28294 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28295 split out from...
28296 (vectorizable_mask_load_store): ...here.
28297 (vectorizable_store): ...and here.
28298
28299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28300
28301 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28302 split out from...
28303 (vectorizable_mask_load_store): ...here.
28304
28305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28306
28307 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28308 (vect_model_store_cost): Take a vec_load_store_type instead of a
28309 vect_def_type.
28310 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28311 (vect_model_store_cost): Take a vec_load_store_type instead of a
28312 vect_def_type.
28313 (vectorizable_mask_load_store): Update accordingly.
28314 (vectorizable_store): Likewise.
28315 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28316
28317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28318
28319 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28320 IFN_MASK_LOAD calls here rather than...
28321 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28322
28323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28324 Alan Hayward <alan.hayward@arm.com>
28325 David Sherwood <david.sherwood@arm.com>
28326
28327 * expmed.c (extract_bit_field_1): For vector extracts,
28328 fall back to extract_bit_field_as_subreg if vec_extract
28329 isn't available.
28330
28331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28332 Alan Hayward <alan.hayward@arm.com>
28333 David Sherwood <david.sherwood@arm.com>
28334
28335 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28336 they are variable or constant sized.
28337 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28338 slots for constant-sized data.
28339
28340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28341 Alan Hayward <alan.hayward@arm.com>
28342 David Sherwood <david.sherwood@arm.com>
28343
28344 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28345 handling COND_EXPRs with boolean comparisons, try to find a better
28346 basis for the mask type than the boolean itself.
28347
28348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28349
28350 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28351 is calculated and how it can be overridden.
28352 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28353 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28354 if defined.
28355 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28356 if nonzero.
28357
28358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28359 Alan Hayward <alan.hayward@arm.com>
28360 David Sherwood <david.sherwood@arm.com>
28361
28362 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28363 Remove the mode argument.
28364 (aarch64_simd_valid_immediate): Remove the mode and inverse
28365 arguments.
28366 * config/aarch64/iterators.md (bitsize): New iterator.
28367 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28368 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28369 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28370 aarch64_simd_valid_immediate.
28371 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28372 (aarch64_reg_or_bic_imm): Likewise.
28373 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28374 with an insn_type enum and msl with a modifier_type enum.
28375 Replace element_width with a scalar_mode. Change the shift
28376 to unsigned int. Add constructors for scalar_float_mode and
28377 scalar_int_mode elements.
28378 (aarch64_vect_float_const_representable_p): Delete.
28379 (aarch64_can_const_movi_rtx_p)
28380 (aarch64_simd_scalar_immediate_valid_for_move)
28381 (aarch64_simd_make_constant): Update call to
28382 aarch64_simd_valid_immediate.
28383 (aarch64_advsimd_valid_immediate_hs): New function.
28384 (aarch64_advsimd_valid_immediate): Likewise.
28385 (aarch64_simd_valid_immediate): Remove mode and inverse
28386 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28387 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28388 and aarch64_float_const_representable_p on the result.
28389 (aarch64_output_simd_mov_immediate): Remove mode argument.
28390 Update call to aarch64_simd_valid_immediate and use of
28391 simd_immediate_info.
28392 (aarch64_output_scalar_simd_mov_immediate): Update call
28393 accordingly.
28394
28395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28396 Alan Hayward <alan.hayward@arm.com>
28397 David Sherwood <david.sherwood@arm.com>
28398
28399 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28400 (mode_nunits): Likewise CONST_MODE_NUNITS.
28401 * machmode.def (ADJUST_NUNITS): Document.
28402 * genmodes.c (mode_data::need_nunits_adj): New field.
28403 (blank_mode): Update accordingly.
28404 (adj_nunits): New variable.
28405 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28406 parameter.
28407 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28408 listed in adj_nunits.
28409 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28410 listed in adj_nunits. Don't emit case statements for such modes.
28411 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28412 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28413 nothing if adj_nunits is nonnull.
28414 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28415 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28416 (emit_mode_fbit): Update use of print_maybe_const_decl.
28417 (emit_move_size): Likewise. Treat the array as non-const
28418 if adj_nunits.
28419 (emit_mode_adjustments): Handle adj_nunits.
28420
28421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28422
28423 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28424 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28425 (VECTOR_MODES): Use it.
28426 (make_vector_modes): Take the prefix as an argument.
28427
28428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28429 Alan Hayward <alan.hayward@arm.com>
28430 David Sherwood <david.sherwood@arm.com>
28431
28432 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28433 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28434 for MODE_VECTOR_BOOL.
28435 * machmode.def (VECTOR_BOOL_MODE): Document.
28436 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28437 (make_vector_bool_mode): New function.
28438 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28439 MODE_VECTOR_BOOL.
28440 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28441 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28442 Likewise.
28443 * stor-layout.c (int_mode_for_mode): Likewise.
28444 * tree.c (build_vector_type_for_mode): Likewise.
28445 * varasm.c (output_constant_pool_2): Likewise.
28446 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28447 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28448 for MODE_VECTOR_BOOL.
28449 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28450 of mode class checks.
28451 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28452 instead of a list of mode class checks.
28453 (expand_vector_scalar_condition): Likewise.
28454 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28455
28456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28457 Alan Hayward <alan.hayward@arm.com>
28458 David Sherwood <david.sherwood@arm.com>
28459
28460 * machmode.h (mode_size): Change from unsigned short to
28461 poly_uint16_pod.
28462 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28463 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28464 or if measurement_type is not polynomial.
28465 (fixed_size_mode::includes_p): Check for constant-sized modes.
28466 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28467 return a poly_uint16 rather than an unsigned short.
28468 (emit_mode_size): Change the type of mode_size from unsigned short
28469 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28470 (emit_mode_adjustments): Cope with polynomial vector sizes.
28471 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28472 for GET_MODE_SIZE.
28473 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28474 for GET_MODE_SIZE.
28475 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28476 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28477 * caller-save.c (setup_save_areas): Likewise.
28478 (replace_reg_with_saved_mem): Likewise.
28479 * calls.c (emit_library_call_value_1): Likewise.
28480 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28481 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28482 (gen_lowpart_for_combine): Likewise.
28483 * convert.c (convert_to_integer_1): Likewise.
28484 * cse.c (equiv_constant, cse_insn): Likewise.
28485 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28486 (cselib_subst_to_values): Likewise.
28487 * dce.c (word_dce_process_block): Likewise.
28488 * df-problems.c (df_word_lr_mark_ref): Likewise.
28489 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28490 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28491 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28492 (rtl_for_decl_location): Likewise.
28493 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28494 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28495 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28496 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28497 (expand_expr_real_1): Likewise.
28498 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28499 (pad_below): Likewise.
28500 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28501 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28502 * ira.c (get_subreg_tracking_sizes): Likewise.
28503 * ira-build.c (ira_create_allocno_objects): Likewise.
28504 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28505 (ira_sort_regnos_for_alter_reg): Likewise.
28506 * ira-costs.c (record_operand_costs): Likewise.
28507 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28508 (resolve_simple_move): Likewise.
28509 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28510 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28511 (lra_constraints): Likewise.
28512 (CONST_POOL_OK_P): Reject variable-sized modes.
28513 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28514 (add_pseudo_to_slot, lra_spill): Likewise.
28515 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28516 * optabs-query.c (get_best_extraction_insn): Likewise.
28517 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28518 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28519 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28520 * recog.c (offsettable_address_addr_space_p): Likewise.
28521 * regcprop.c (maybe_mode_change): Likewise.
28522 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28523 * regrename.c (build_def_use): Likewise.
28524 * regstat.c (dump_reg_info): Likewise.
28525 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28526 (find_reloads, find_reloads_subreg_address): Likewise.
28527 * reload1.c (eliminate_regs_1): Likewise.
28528 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28529 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28530 (simplify_binary_operation_1, simplify_subreg): Likewise.
28531 * targhooks.c (default_function_arg_padding): Likewise.
28532 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28533 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28534 (verify_gimple_assign_ternary): Likewise.
28535 * tree-inline.c (estimate_move_cost): Likewise.
28536 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28537 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28538 (get_address_cost_ainc): Likewise.
28539 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28540 (vect_supportable_dr_alignment): Likewise.
28541 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28542 (vectorizable_reduction): Likewise.
28543 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28544 (vectorizable_operation, vectorizable_load): Likewise.
28545 * tree.c (build_same_sized_truth_vector_type): Likewise.
28546 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28547 * var-tracking.c (emit_note_insn_var_location): Likewise.
28548 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28549 (ADDR_VEC_ALIGN): Likewise.
28550
28551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28552 Alan Hayward <alan.hayward@arm.com>
28553 David Sherwood <david.sherwood@arm.com>
28554
28555 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28556 unsigned short.
28557 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28558 or if measurement_type is polynomial.
28559 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28560 * combine.c (make_extraction): Likewise.
28561 * dse.c (find_shift_sequence): Likewise.
28562 * dwarf2out.c (mem_loc_descriptor): Likewise.
28563 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28564 (extract_bit_field, extract_low_bits): Likewise.
28565 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28566 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28567 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28568 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28569 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28570 * reload.c (find_reloads): Likewise.
28571 * reload1.c (alter_reg): Likewise.
28572 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28573 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28574 * tree-if-conv.c (predicate_mem_writes): Likewise.
28575 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28576 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28577 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28578 * valtrack.c (dead_debug_insert_temp): Likewise.
28579 * varasm.c (mergeable_constant_section): Likewise.
28580 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28581
28582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28583 Alan Hayward <alan.hayward@arm.com>
28584 David Sherwood <david.sherwood@arm.com>
28585
28586 * expr.c (expand_assignment): Cope with polynomial mode sizes
28587 when assigning to a CONCAT.
28588
28589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28590 Alan Hayward <alan.hayward@arm.com>
28591 David Sherwood <david.sherwood@arm.com>
28592
28593 * machmode.h (mode_precision): Change from unsigned short to
28594 poly_uint16_pod.
28595 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28596 short.
28597 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28598 or if measurement_type is not polynomial.
28599 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28600 in which the mode is already known to be a scalar_int_mode.
28601 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28602 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28603 initializer.
28604 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28605 for GET_MODE_PRECISION.
28606 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28607 for GET_MODE_PRECISION.
28608 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28609 as polynomial.
28610 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28611 (expand_field_assignment, make_extraction): Likewise.
28612 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28613 (get_last_value): Likewise.
28614 * convert.c (convert_to_integer_1): Likewise.
28615 * cse.c (cse_insn): Likewise.
28616 * expr.c (expand_expr_real_1): Likewise.
28617 * lra-constraints.c (simplify_operand_subreg): Likewise.
28618 * optabs-query.c (can_atomic_load_p): Likewise.
28619 * optabs.c (expand_atomic_load): Likewise.
28620 (expand_atomic_store): Likewise.
28621 * ree.c (combine_reaching_defs): Likewise.
28622 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28623 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28624 * tree.h (type_has_mode_precision_p): Likewise.
28625 * ubsan.c (instrument_si_overflow): Likewise.
28626
28627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28628 Alan Hayward <alan.hayward@arm.com>
28629 David Sherwood <david.sherwood@arm.com>
28630
28631 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28632 polynomial numbers of units.
28633 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28634 (valid_vector_subparts_p): New function.
28635 (build_vector_type): Remove temporary shim and take the number
28636 of units as a poly_uint64 rather than an int.
28637 (build_opaque_vector_type): Take the number of units as a
28638 poly_uint64 rather than an int.
28639 * tree.c (build_vector_from_ctor): Handle polynomial
28640 TYPE_VECTOR_SUBPARTS.
28641 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28642 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28643 (build_vector_from_val): If the number of units is variable,
28644 use build_vec_duplicate_cst for constant operands and
28645 VEC_DUPLICATE_EXPR otherwise.
28646 (make_vector_type): Remove temporary is_constant ().
28647 (build_vector_type, build_opaque_vector_type): Take the number of
28648 units as a poly_uint64 rather than an int.
28649 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28650 VECTOR_CST_NELTS.
28651 * cfgexpand.c (expand_debug_expr): Likewise.
28652 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28653 (store_constructor, expand_expr_real_1): Likewise.
28654 (const_scalar_mask_from_tree): Likewise.
28655 * fold-const-call.c (fold_const_reduction): Likewise.
28656 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28657 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28658 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28659 (fold_relational_const): Likewise.
28660 (native_interpret_vector): Likewise. Change the size from an
28661 int to an unsigned int.
28662 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28663 TYPE_VECTOR_SUBPARTS.
28664 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28665 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28666 duplicating a non-constant operand into a variable-length vector.
28667 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28668 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28669 * ipa-icf.c (sem_variable::equals): Likewise.
28670 * match.pd: Likewise.
28671 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28672 * print-tree.c (print_node): Likewise.
28673 * stor-layout.c (layout_type): Likewise.
28674 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28675 * tree-cfg.c (verify_gimple_comparison): Likewise.
28676 (verify_gimple_assign_binary): Likewise.
28677 (verify_gimple_assign_ternary): Likewise.
28678 (verify_gimple_assign_single): Likewise.
28679 * tree-pretty-print.c (dump_generic_node): Likewise.
28680 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28681 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28682 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28683 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28684 (vect_shift_permute_load_chain): Likewise.
28685 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28686 (expand_vector_condition, optimize_vector_constructor): Likewise.
28687 (lower_vec_perm, get_compute_type): Likewise.
28688 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28689 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28690 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28691 (vect_recog_mask_conversion_pattern): Likewise.
28692 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28693 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28694 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28695 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28696 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28697 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28698 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28699 (supportable_widening_operation): Likewise.
28700 (supportable_narrowing_operation): Likewise.
28701 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28702 Likewise.
28703 * varasm.c (output_constant): Likewise.
28704
28705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28706 Alan Hayward <alan.hayward@arm.com>
28707 David Sherwood <david.sherwood@arm.com>
28708
28709 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28710 so that both the length == 3 and length != 3 cases set up their
28711 own permute vectors. Add comments explaining why we know the
28712 number of elements is constant.
28713 (vect_permute_load_chain): Likewise.
28714
28715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28716 Alan Hayward <alan.hayward@arm.com>
28717 David Sherwood <david.sherwood@arm.com>
28718
28719 * machmode.h (mode_nunits): Change from unsigned char to
28720 poly_uint16_pod.
28721 (ONLY_FIXED_SIZE_MODES): New macro.
28722 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28723 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28724 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28725 New typedefs.
28726 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28727 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28728 or if measurement_type is not polynomial.
28729 * genmodes.c (ZERO_COEFFS): New macro.
28730 (emit_mode_nunits_inline): Make mode_nunits_inline return a
28731 poly_uint16.
28732 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28733 Use ZERO_COEFFS when emitting initializers.
28734 * data-streamer.h (bp_pack_poly_value): New function.
28735 (bp_unpack_poly_value): Likewise.
28736 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28737 for GET_MODE_NUNITS.
28738 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28739 for GET_MODE_NUNITS.
28740 * tree.c (make_vector_type): Remove temporary shim and make
28741 the real function take the number of units as a poly_uint64
28742 rather than an int.
28743 (build_vector_type_for_mode): Handle polynomial nunits.
28744 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28745 * emit-rtl.c (const_vec_series_p_1): Likewise.
28746 (gen_rtx_CONST_VECTOR): Likewise.
28747 * fold-const.c (test_vec_duplicate_folding): Likewise.
28748 * genrecog.c (validate_pattern): Likewise.
28749 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28750 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28751 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28752 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28753 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28754 * rtlanal.c (subreg_get_info): Likewise.
28755 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28756 (vect_grouped_load_supported): Likewise.
28757 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28758 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28759 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28760 (simplify_const_unary_operation, simplify_binary_operation_1)
28761 (simplify_const_binary_operation, simplify_ternary_operation)
28762 (test_vector_ops_duplicate, test_vector_ops): Likewise.
28763 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28764 instead of CONST_VECTOR_NUNITS.
28765 * varasm.c (output_constant_pool_2): Likewise.
28766 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28767 explicit-encoded elements in the XVEC for variable-length vectors.
28768
28769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28770
28771 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28772
28773 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28774 Alan Hayward <alan.hayward@arm.com>
28775 David Sherwood <david.sherwood@arm.com>
28776
28777 * coretypes.h (fixed_size_mode): Declare.
28778 (fixed_size_mode_pod): New typedef.
28779 * builtins.h (target_builtins::x_apply_args_mode)
28780 (target_builtins::x_apply_result_mode): Change type to
28781 fixed_size_mode_pod.
28782 * builtins.c (apply_args_size, apply_result_size, result_vector)
28783 (expand_builtin_apply_args_1, expand_builtin_apply)
28784 (expand_builtin_return): Update accordingly.
28785
28786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28787
28788 * cse.c (hash_rtx_cb): Hash only the encoded elements.
28789 * cselib.c (cselib_hash_rtx): Likewise.
28790 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
28791 CONST_VECTOR encoding.
28792
28793 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28794 Jeff Law <law@redhat.com>
28795
28796 PR target/83641
28797 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
28798 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
28799 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
28800 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
28801
28802 PR target/83641
28803 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
28804 explicitly probe *sp in a noreturn function if there were any callee
28805 register saves or frame pointer is needed.
28806
28807 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28808
28809 PR debug/83621
28810 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
28811 BLKmode for ternary, binary or unary expressions.
28812
28813 PR debug/83645
28814 * var-tracking.c (delete_vta_debug_insn): New inline function.
28815 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
28816 insns from get_insns () to NULL instead of each bb separately.
28817 Use delete_vta_debug_insn. No longer static.
28818 (vt_debug_insns_local, variable_tracking_main_1): Adjust
28819 delete_vta_debug_insns callers.
28820 * rtl.h (delete_vta_debug_insns): Declare.
28821 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
28822 instead of variable_tracking_main.
28823
28824 2018-01-03 Martin Sebor <msebor@redhat.com>
28825
28826 PR tree-optimization/83603
28827 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
28828 arguments past the endof the argument list in functions declared
28829 without a prototype.
28830 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
28831 Avoid checking when arguments are null.
28832
28833 2018-01-03 Martin Sebor <msebor@redhat.com>
28834
28835 PR c/83559
28836 * doc/extend.texi (attribute const): Fix a typo.
28837 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
28838 issuing -Wsuggest-attribute for void functions.
28839
28840 2018-01-03 Martin Sebor <msebor@redhat.com>
28841
28842 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
28843 offset_int::from instead of wide_int::to_shwi.
28844 (maybe_diag_overlap): Remove assertion.
28845 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
28846 * gimple-ssa-sprintf.c (format_directive): Same.
28847 (parse_directive): Same.
28848 (sprintf_dom_walker::compute_format_length): Same.
28849 (try_substitute_return_value): Same.
28850
28851 2018-01-03 Jeff Law <law@redhat.com>
28852
28853 PR middle-end/83654
28854 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
28855 non-constant residual for zero at runtime and avoid probing in
28856 that case. Reorganize code for trailing problem to mirror handling
28857 of the residual.
28858
28859 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28860
28861 PR tree-optimization/83501
28862 * tree-ssa-strlen.c (get_string_cst): New.
28863 (handle_char_store): Call get_string_cst.
28864
28865 2018-01-03 Martin Liska <mliska@suse.cz>
28866
28867 PR tree-optimization/83593
28868 * tree-ssa-strlen.c: Include tree-cfg.h.
28869 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
28870 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
28871 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
28872 to false.
28873 (strlen_dom_walker::before_dom_children): Call
28874 gimple_purge_dead_eh_edges. Dump tranformation with details
28875 dump flags.
28876 (strlen_dom_walker::before_dom_children): Update call by adding
28877 new argument cleanup_eh.
28878 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
28879
28880 2018-01-03 Martin Liska <mliska@suse.cz>
28881
28882 PR ipa/83549
28883 * cif-code.def (VARIADIC_THUNK): New enum value.
28884 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
28885 thunks.
28886
28887 2018-01-03 Jan Beulich <jbeulich@suse.com>
28888
28889 * sse.md (mov<mode>_internal): Tighten condition for when to use
28890 vmovdqu<ssescalarsize> for TI and OI modes.
28891
28892 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28893
28894 Update copyright years.
28895
28896 2018-01-03 Martin Liska <mliska@suse.cz>
28897
28898 PR ipa/83594
28899 * ipa-visibility.c (function_and_variable_visibility): Skip
28900 functions with noipa attribure.
28901
28902 2018-01-03 Jakub Jelinek <jakub@redhat.com>
28903
28904 * gcc.c (process_command): Update copyright notice dates.
28905 * gcov-dump.c (print_version): Ditto.
28906 * gcov.c (print_version): Ditto.
28907 * gcov-tool.c (print_version): Ditto.
28908 * gengtype.c (create_file): Ditto.
28909 * doc/cpp.texi: Bump @copying's copyright year.
28910 * doc/cppinternals.texi: Ditto.
28911 * doc/gcc.texi: Ditto.
28912 * doc/gccint.texi: Ditto.
28913 * doc/gcov.texi: Ditto.
28914 * doc/install.texi: Ditto.
28915 * doc/invoke.texi: Ditto.
28916
28917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28918
28919 * vector-builder.h (vector_builder::m_full_nelts): Change from
28920 unsigned int to poly_uint64.
28921 (vector_builder::full_nelts): Update prototype accordingly.
28922 (vector_builder::new_vector): Likewise.
28923 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28924 (vector_builder::operator ==): Likewise.
28925 (vector_builder::finalize): Likewise.
28926 * int-vector-builder.h (int_vector_builder::int_vector_builder):
28927 Take the number of elements as a poly_uint64 rather than an
28928 unsigned int.
28929 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28930 from unsigned int to poly_uint64.
28931 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28932 (vec_perm_indices::new_vector): Likewise.
28933 (vec_perm_indices::length): Likewise.
28934 (vec_perm_indices::nelts_per_input): Likewise.
28935 (vec_perm_indices::input_nelts): Likewise.
28936 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28937 number of elements per input as a poly_uint64 rather than an
28938 unsigned int. Use the original encoding for variable-length
28939 vectors, rather than clamping each individual element.
28940 For the second and subsequent elements in each pattern,
28941 clamp the step and base before clamping their sum.
28942 (vec_perm_indices::series_p): Handle polynomial element counts.
28943 (vec_perm_indices::all_in_range_p): Likewise.
28944 (vec_perm_indices_to_tree): Likewise.
28945 (vec_perm_indices_to_rtx): Likewise.
28946 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28947 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28948 (tree_vector_builder::new_binary_operation): Handle polynomial
28949 element counts. Return false if we need to know the number
28950 of elements at compile time.
28951 * fold-const.c (fold_vec_perm): Punt if the number of elements
28952 isn't known at compile time.
28953
28954 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28955
28956 * vec-perm-indices.h (vec_perm_builder): Change element type
28957 from HOST_WIDE_INT to poly_int64.
28958 (vec_perm_indices::element_type): Update accordingly.
28959 (vec_perm_indices::clamp): Handle polynomial element_types.
28960 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28961 (vec_perm_indices::all_in_range_p): Likewise.
28962 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28963 than shwi trees.
28964 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28965 polynomial vec_perm_indices element types.
28966 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28967 * fold-const.c (fold_vec_perm): Likewise.
28968 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28969 * tree-vect-generic.c (lower_vec_perm): Likewise.
28970 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28971 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28972 element type to HOST_WIDE_INT.
28973
28974 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28975 Alan Hayward <alan.hayward@arm.com>
28976 David Sherwood <david.sherwood@arm.com>
28977
28978 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28979 rather than an int. Use plus_constant.
28980 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28981 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28982
28983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28984 Alan Hayward <alan.hayward@arm.com>
28985 David Sherwood <david.sherwood@arm.com>
28986
28987 * calls.c (emit_call_1, expand_call): Change struct_value_size from
28988 a HOST_WIDE_INT to a poly_int64.
28989
28990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28991 Alan Hayward <alan.hayward@arm.com>
28992 David Sherwood <david.sherwood@arm.com>
28993
28994 * calls.c (load_register_parameters): Cope with polynomial
28995 mode sizes. Require a constant size for BLKmode parameters
28996 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
28997 forces a parameter to be padded at the lsb end in order to
28998 fill a complete number of words, require the parameter size
28999 to be ordered wrt UNITS_PER_WORD.
29000
29001 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29002 Alan Hayward <alan.hayward@arm.com>
29003 David Sherwood <david.sherwood@arm.com>
29004
29005 * reload1.c (spill_stack_slot_width): Change element type
29006 from unsigned int to poly_uint64_pod.
29007 (alter_reg): Treat mode sizes as polynomial.
29008
29009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29010 Alan Hayward <alan.hayward@arm.com>
29011 David Sherwood <david.sherwood@arm.com>
29012
29013 * reload.c (complex_word_subreg_p): New function.
29014 (reload_inner_reg_of_subreg, push_reload): Use it.
29015
29016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29017 Alan Hayward <alan.hayward@arm.com>
29018 David Sherwood <david.sherwood@arm.com>
29019
29020 * lra-constraints.c (process_alt_operands): Reject matched
29021 operands whose sizes aren't ordered.
29022 (match_reload): Refer to this check here.
29023
29024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29025 Alan Hayward <alan.hayward@arm.com>
29026 David Sherwood <david.sherwood@arm.com>
29027
29028 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29029 that the mode size is in the set {1, 2, 4, 8, 16}.
29030
29031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29032 Alan Hayward <alan.hayward@arm.com>
29033 David Sherwood <david.sherwood@arm.com>
29034
29035 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29036 Use plus_constant instead of gen_rtx_PLUS.
29037
29038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29039 Alan Hayward <alan.hayward@arm.com>
29040 David Sherwood <david.sherwood@arm.com>
29041
29042 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29043 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29044 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29045 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29046 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29047 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29048 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29049 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29050 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29051 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29052 a poly_int64.
29053 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29054 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29055 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29056 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29057 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29058 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29059 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29060 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29061 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29062 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29063 function.
29064 * expr.c (emit_move_resolve_push): Treat the input and result
29065 of PUSH_ROUNDING as a poly_int64.
29066 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29067 (emit_push_insn): Likewise.
29068 * lra-eliminations.c (mark_not_eliminable): Likewise.
29069 * recog.c (push_operand): Likewise.
29070 * reload1.c (elimination_effects): Likewise.
29071 * rtlanal.c (nonzero_bits1): Likewise.
29072 * calls.c (store_one_arg): Likewise. Require the padding to be
29073 known at compile time.
29074
29075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29076 Alan Hayward <alan.hayward@arm.com>
29077 David Sherwood <david.sherwood@arm.com>
29078
29079 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29080 Use plus_constant instead of gen_rtx_PLUS.
29081
29082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29083 Alan Hayward <alan.hayward@arm.com>
29084 David Sherwood <david.sherwood@arm.com>
29085
29086 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29087 rather than an int.
29088
29089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29090 Alan Hayward <alan.hayward@arm.com>
29091 David Sherwood <david.sherwood@arm.com>
29092
29093 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29094 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29095 via stack temporaries. Treat the mode size as polynomial too.
29096
29097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29098 Alan Hayward <alan.hayward@arm.com>
29099 David Sherwood <david.sherwood@arm.com>
29100
29101 * expr.c (expand_expr_real_2): When handling conversions involving
29102 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29103 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29104 as a poly_uint64 too.
29105
29106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29107 Alan Hayward <alan.hayward@arm.com>
29108 David Sherwood <david.sherwood@arm.com>
29109
29110 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
29117 REGMODE_NATURAL_SIZE.
29118 * expmed.c (store_bit_field_1): Likewise.
29119 * expr.c (store_constructor): Likewise.
29120 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29121 and polynomial REGMODE_NATURAL_SIZE.
29122 (gen_lowpart_common): Likewise.
29123 * reginfo.c (record_subregs_of_mode): Likewise.
29124 * rtlanal.c (read_modify_subreg_p): Likewise.
29125
29126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29127 Alan Hayward <alan.hayward@arm.com>
29128 David Sherwood <david.sherwood@arm.com>
29129
29130 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29131 numbers of elements.
29132
29133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29134 Alan Hayward <alan.hayward@arm.com>
29135 David Sherwood <david.sherwood@arm.com>
29136
29137 * match.pd: Cope with polynomial numbers of vector 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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29144 in a POINTER_PLUS_EXPR.
29145
29146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29147 Alan Hayward <alan.hayward@arm.com>
29148 David Sherwood <david.sherwood@arm.com>
29149
29150 * omp-simd-clone.c (simd_clone_subparts): New function.
29151 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29152 (ipa_simd_modify_function_body): Likewise.
29153
29154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29155 Alan Hayward <alan.hayward@arm.com>
29156 David Sherwood <david.sherwood@arm.com>
29157
29158 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29159 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29160 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29161 (expand_vector_condition, vector_element): Likewise.
29162 (subparts_gt): New function.
29163 (get_compute_type): Use subparts_gt.
29164 (count_type_subparts): Delete.
29165 (expand_vector_operations_1): Use subparts_gt instead of
29166 count_type_subparts.
29167
29168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29169 Alan Hayward <alan.hayward@arm.com>
29170 David Sherwood <david.sherwood@arm.com>
29171
29172 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29173 (vect_compile_time_alias): ...this new function. Do the calculation
29174 on poly_ints rather than trees.
29175 (vect_prune_runtime_alias_test_list): Update call accordingly.
29176
29177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29178 Alan Hayward <alan.hayward@arm.com>
29179 David Sherwood <david.sherwood@arm.com>
29180
29181 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29182 numbers of units.
29183 (vect_schedule_slp_instance): Likewise.
29184
29185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29186 Alan Hayward <alan.hayward@arm.com>
29187 David Sherwood <david.sherwood@arm.com>
29188
29189 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29190 constant and extern definitions for variable-length vectors.
29191 (vect_get_constant_vectors): Note that the number of units
29192 is known to be constant.
29193
29194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29195 Alan Hayward <alan.hayward@arm.com>
29196 David Sherwood <david.sherwood@arm.com>
29197
29198 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29199 of units as polynomial. Choose between WIDE and NARROW based
29200 on multiple_p.
29201
29202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29203 Alan Hayward <alan.hayward@arm.com>
29204 David Sherwood <david.sherwood@arm.com>
29205
29206 * tree-vect-stmts.c (simd_clone_subparts): New function.
29207 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29208
29209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29210 Alan Hayward <alan.hayward@arm.com>
29211 David Sherwood <david.sherwood@arm.com>
29212
29213 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29214 vectors as polynomial. Use build_index_vector for
29215 IFN_GOMP_SIMD_LANE.
29216
29217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29218 Alan Hayward <alan.hayward@arm.com>
29219 David Sherwood <david.sherwood@arm.com>
29220
29221 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29222 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29223 for variable-length vectors.
29224 (vectorizable_mask_load_store): Treat the number of units as
29225 polynomial, asserting that it is constant if the condition has
29226 already been enforced.
29227 (vectorizable_store, vectorizable_load): Likewise.
29228
29229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29230 Alan Hayward <alan.hayward@arm.com>
29231 David Sherwood <david.sherwood@arm.com>
29232
29233 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29234 of units as polynomial. Punt if we can't tell at compile time
29235 which vector contains the final result.
29236
29237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29238 Alan Hayward <alan.hayward@arm.com>
29239 David Sherwood <david.sherwood@arm.com>
29240
29241 * tree-vect-loop.c (vectorizable_induction): Treat the number
29242 of units as polynomial. Punt on SLP inductions. Use an integer
29243 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29244 cast of such a series for variable-length floating-point
29245 reductions.
29246
29247 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29248 Alan Hayward <alan.hayward@arm.com>
29249 David Sherwood <david.sherwood@arm.com>
29250
29251 * tree.h (build_index_vector): Declare.
29252 * tree.c (build_index_vector): New function.
29253 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29254 of units as polynomial, forcibly converting it to a constant if
29255 vectorizable_reduction has already enforced the condition.
29256 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29257 to create a {1,2,3,...} vector.
29258 (vectorizable_reduction): Treat the number of units as polynomial.
29259 Choose vectype_in based on the largest scalar element size rather
29260 than the smallest number of units. Enforce the restrictions
29261 relied on above.
29262
29263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29264 Alan Hayward <alan.hayward@arm.com>
29265 David Sherwood <david.sherwood@arm.com>
29266
29267 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29268 number of units as polynomial.
29269
29270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29271 Alan Hayward <alan.hayward@arm.com>
29272 David Sherwood <david.sherwood@arm.com>
29273
29274 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29275 * target.def (autovectorize_vector_sizes): Return the vector sizes
29276 by pointer, using vector_sizes rather than a bitmask.
29277 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29278 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29279 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29280 Likewise.
29281 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29282 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29283 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29284 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29285 * omp-general.c (omp_max_vf): Likewise.
29286 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29287 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29288 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29289 * tree-vect-slp.c (vect_slp_bb): Likewise.
29290 * doc/tm.texi: Regenerate.
29291 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29292 to a poly_uint64.
29293 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29294 the vector size as a poly_uint64 rather than an unsigned int.
29295 (current_vector_size): Change from an unsigned int to a poly_uint64.
29296 (get_vectype_for_scalar_type): Update accordingly.
29297 * tree.h (build_truth_vector_type): Take the size and number of
29298 units as a poly_uint64 rather than an unsigned int.
29299 (build_vector_type): Add a temporary overload that takes
29300 the number of units as a poly_uint64 rather than an unsigned int.
29301 * tree.c (make_vector_type): Likewise.
29302 (build_truth_vector_type): Take the number of units as a poly_uint64
29303 rather than an unsigned int.
29304
29305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29306 Alan Hayward <alan.hayward@arm.com>
29307 David Sherwood <david.sherwood@arm.com>
29308
29309 * target.def (get_mask_mode): Take the number of units and length
29310 as poly_uint64s rather than unsigned ints.
29311 * targhooks.h (default_get_mask_mode): Update accordingly.
29312 * targhooks.c (default_get_mask_mode): Likewise.
29313 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29314 * doc/tm.texi: Regenerate.
29315
29316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29317 Alan Hayward <alan.hayward@arm.com>
29318 David Sherwood <david.sherwood@arm.com>
29319
29320 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29321 * omp-general.c (omp_max_vf): Likewise.
29322 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29323 (expand_omp_simd): Handle polynomial safelen.
29324 * omp-low.c (omplow_simd_context): Add a default constructor.
29325 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29326 (lower_rec_simd_input_clauses): Update accordingly.
29327 (lower_rec_input_clauses): Likewise.
29328
29329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29330 Alan Hayward <alan.hayward@arm.com>
29331 David Sherwood <david.sherwood@arm.com>
29332
29333 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29334 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29335 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29336 (vect_analyze_slp_cost): Likewise.
29337 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29338 (vect_model_load_cost): Likewise.
29339
29340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29341 Alan Hayward <alan.hayward@arm.com>
29342 David Sherwood <david.sherwood@arm.com>
29343
29344 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29345 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29346 from an unsigned int * to a poly_uint64_pod *.
29347 (calculate_unrolling_factor): New function.
29348 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29349
29350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29351 Alan Hayward <alan.hayward@arm.com>
29352 David Sherwood <david.sherwood@arm.com>
29353
29354 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29355 from an unsigned int to a poly_uint64.
29356 (_loop_vec_info::slp_unrolling_factor): Likewise.
29357 (_loop_vec_info::vectorization_factor): Change from an int
29358 to a poly_uint64.
29359 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29360 (vect_get_num_vectors): New function.
29361 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29362 (vect_get_num_copies): Use vect_get_num_vectors.
29363 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29364 to an unsigned int *.
29365 (vect_analyze_data_refs): Change min_vf from an int * to a
29366 poly_uint64 *.
29367 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29368 than an unsigned HOST_WIDE_INT.
29369 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29370 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29371 to an unsigned int *.
29372 (vect_analyze_data_ref_dependences): Likewise.
29373 (vect_compute_data_ref_alignment): Handle polynomial vf.
29374 (vect_enhance_data_refs_alignment): Likewise.
29375 (vect_prune_runtime_alias_test_list): Likewise.
29376 (vect_shift_permute_load_chain): Likewise.
29377 (vect_supportable_dr_alignment): Likewise.
29378 (dependence_distance_ge_vf): Take the vectorization factor as a
29379 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29380 (vect_analyze_data_refs): Change min_vf from an int * to a
29381 poly_uint64 *.
29382 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29383 vfm1 as a poly_uint64 rather than an int. Make the same change
29384 for the returned bound_scalar.
29385 (vect_gen_vector_loop_niters): Handle polynomial vf.
29386 (vect_do_peeling): Likewise. Update call to
29387 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29388 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29389 be constant.
29390 * tree-vect-loop.c (vect_determine_vectorization_factor)
29391 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29392 (vect_get_known_peeling_cost): Likewise.
29393 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29394 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29395 (vect_transform_loop): Likewise. Use the lowest possible VF when
29396 updating the upper bounds of the loop.
29397 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29398 rather than an int.
29399 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29400 polynomial unroll factors.
29401 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29402 (vect_make_slp_decision): Likewise.
29403 (vect_supported_load_permutation_p): Likewise, and polynomial
29404 vf too.
29405 (vect_analyze_slp_cost): Handle polynomial vf.
29406 (vect_slp_analyze_node_operations): Likewise.
29407 (vect_slp_analyze_bb_1): Likewise.
29408 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29409 than an unsigned HOST_WIDE_INT.
29410 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29411 (vectorizable_load): Handle polynomial vf.
29412 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29413 a poly_uint64.
29414 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29415
29416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29417 Alan Hayward <alan.hayward@arm.com>
29418 David Sherwood <david.sherwood@arm.com>
29419
29420 * match.pd: Handle bit operations involving three constants
29421 and try to fold one pair.
29422
29423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29424
29425 * tree-vect-loop-manip.c: Include gimple-fold.h.
29426 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29427 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29428 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29429 Add a path that uses a step of VF instead of 1, but disable it
29430 for now.
29431 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29432 and niters_no_overflow parameters. Update calls to
29433 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29434 Create a new SSA name if the latter choses to use a ste other
29435 than zero, and return it via niters_vector_mult_vf_var.
29436 * tree-vect-loop.c (vect_transform_loop): Update calls to
29437 vect_do_peeling, vect_gen_vector_loop_niters and
29438 slpeel_make_loop_iterate_ntimes.
29439 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29440 (vect_gen_vector_loop_niters): Update declarations after above changes.
29441
29442 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29443
29444 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29445 128-bit round to integer instructions.
29446 (ceil<mode>2): Likewise.
29447 (btrunc<mode>2): Likewise.
29448 (round<mode>2): Likewise.
29449
29450 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29451
29452 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29453 unaligned VSX load/store on P8/P9.
29454 (expand_block_clear): Allow the use of unaligned VSX
29455 load/store on P8/P9.
29456
29457 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29458
29459 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29460 New function.
29461 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29462 swap associated with both a load and a store.
29463
29464 2018-01-02 Andrew Waterman <andrew@sifive.com>
29465
29466 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29467 * config/riscv/riscv.md (clear_cache): Use it.
29468
29469 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29470
29471 * web.c: Remove out-of-date comment.
29472
29473 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29474
29475 * expr.c (fixup_args_size_notes): Check that any existing
29476 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29477 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29478 (emit_single_push_insn): ...here.
29479
29480 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29481
29482 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29483 (const_vector_encoded_nelts): New function.
29484 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29485 (const_vector_int_elt, const_vector_elt): Declare.
29486 * emit-rtl.c (const_vector_int_elt_1): New function.
29487 (const_vector_elt): Likewise.
29488 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29489 of CONST_VECTOR_ELT.
29490
29491 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29492
29493 * expr.c: Include rtx-vector-builder.h.
29494 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29495 directly on the tree encoding.
29496 (const_vector_from_tree): Likewise.
29497 * optabs.c: Include rtx-vector-builder.h.
29498 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29499 sequence of "u" values.
29500 * vec-perm-indices.c: Include rtx-vector-builder.h.
29501 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29502 directly on the vec_perm_indices encoding.
29503
29504 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29505
29506 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29507 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29508 * rtx-vector-builder.h: New file.
29509 * rtx-vector-builder.c: Likewise.
29510 * rtl.h (rtx_def::u2): Add a const_vector field.
29511 (CONST_VECTOR_NPATTERNS): New macro.
29512 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29513 (CONST_VECTOR_DUPLICATE_P): Likewise.
29514 (CONST_VECTOR_STEPPED_P): Likewise.
29515 (CONST_VECTOR_ENCODED_ELT): Likewise.
29516 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29517 (unwrap_const_vec_duplicate): Likewise.
29518 (const_vec_series_p): Check for a non-duplicated vector encoding.
29519 Say that the function only returns true for integer vectors.
29520 * emit-rtl.c: Include rtx-vector-builder.h.
29521 (gen_const_vec_duplicate_1): Delete.
29522 (gen_const_vector): Call gen_const_vec_duplicate instead of
29523 gen_const_vec_duplicate_1.
29524 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29525 (gen_const_vec_duplicate): Use rtx_vector_builder.
29526 (gen_const_vec_series): Likewise.
29527 (gen_rtx_CONST_VECTOR): Likewise.
29528 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29529 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29530 Build a new vector rather than modifying a CONST_VECTOR in-place.
29531 (handle_special_swappables): Update call accordingly.
29532 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29533 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29534 Build a new vector rather than modifying a CONST_VECTOR in-place.
29535 (handle_special_swappables): Update call accordingly.
29536
29537 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29538
29539 * simplify-rtx.c (simplify_const_binary_operation): Use
29540 CONST_VECTOR_ELT instead of XVECEXP.
29541
29542 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29543
29544 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29545 the selector elements to be different from the data elements
29546 if the selector is a VECTOR_CST.
29547 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29548 ssizetype for the selector.
29549
29550 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29551
29552 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29553 before testing each element individually.
29554 * tree-vect-generic.c (lower_vec_perm): Likewise.
29555
29556 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29557
29558 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29559 * selftest-run-tests.c (selftest::run_tests): Call it.
29560 * vector-builder.h (vector_builder::operator ==): New function.
29561 (vector_builder::operator !=): Likewise.
29562 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29563 (vec_perm_indices::all_from_input_p): New function.
29564 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29565 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29566 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29567 instead of reading the VECTOR_CST directly. Detect whether both
29568 vector inputs are the same before constructing the vec_perm_indices,
29569 and update the number of inputs argument accordingly. Use the
29570 utility functions added above. Only construct sel2 if we need to.
29571
29572 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29573
29574 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29575 the broadcast of the low byte.
29576 (expand_mult_highpart): Use an explicit encoding for the permutes.
29577 * optabs-query.c (can_mult_highpart_p): Likewise.
29578 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29579 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29580 (vectorizable_bswap): Likewise.
29581 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29582 explicit encoding for the power-of-2 permutes.
29583 (vect_permute_store_chain): Likewise.
29584 (vect_grouped_load_supported): Likewise.
29585 (vect_permute_load_chain): Likewise.
29586
29587 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29588
29589 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29590 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29591 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29592 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29593 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29594 (vect_gen_perm_mask_any): Likewise.
29595
29596 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29597
29598 * int-vector-builder.h: New file.
29599 * vec-perm-indices.h: Include int-vector-builder.h.
29600 (vec_perm_indices): Redefine as an int_vector_builder.
29601 (auto_vec_perm_indices): Delete.
29602 (vec_perm_builder): Redefine as a stand-alone class.
29603 (vec_perm_indices::vec_perm_indices): New function.
29604 (vec_perm_indices::clamp): Likewise.
29605 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29606 (vec_perm_indices::new_vector): New function.
29607 (vec_perm_indices::new_expanded_vector): Update for new
29608 vec_perm_indices class.
29609 (vec_perm_indices::rotate_inputs): New function.
29610 (vec_perm_indices::all_in_range_p): Operate directly on the
29611 encoded form, without computing elided elements.
29612 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29613 encoding. Update for new vec_perm_indices class.
29614 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29615 the given vec_perm_builder.
29616 (expand_vec_perm_var): Update vec_perm_builder constructor.
29617 (expand_mult_highpart): Use vec_perm_builder instead of
29618 auto_vec_perm_indices.
29619 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29620 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29621 or double series encoding as appropriate.
29622 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29623 vec_perm_indices instead of auto_vec_perm_indices.
29624 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29625 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29626 (vect_permute_store_chain): Likewise.
29627 (vect_grouped_load_supported): Likewise.
29628 (vect_permute_load_chain): Likewise.
29629 (vect_shift_permute_load_chain): Likewise.
29630 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29631 (vect_transform_slp_perm_load): Likewise.
29632 (vect_schedule_slp_instance): Likewise.
29633 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29634 (vectorizable_mask_load_store): Likewise.
29635 (vectorizable_bswap): Likewise.
29636 (vectorizable_store): Likewise.
29637 (vectorizable_load): Likewise.
29638 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29639 vec_perm_indices instead of auto_vec_perm_indices. Use
29640 tree_to_vec_perm_builder to read the vector from a tree.
29641 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29642 vec_perm_builder instead of a vec_perm_indices.
29643 (have_whole_vector_shift): Use vec_perm_builder and
29644 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29645 truncation to calc_vec_perm_mask_for_shift.
29646 (vect_create_epilog_for_reduction): Likewise.
29647 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29648 from auto_vec_perm_indices to vec_perm_indices.
29649 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29650 instead of changing individual elements.
29651 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29652 the vector in d.perm.
29653 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29654 from auto_vec_perm_indices to vec_perm_indices.
29655 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29656 instead of changing individual elements.
29657 (arm_vectorize_vec_perm_const): Use new_vector to install
29658 the vector in d.perm.
29659 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29660 Update vec_perm_builder constructor.
29661 (rs6000_expand_interleave): Likewise.
29662 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29663 (rs6000_expand_interleave): Likewise.
29664
29665 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29666
29667 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29668 to qimode could truncate the indices.
29669 * optabs.c (expand_vec_perm_var): Likewise.
29670
29671 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29672
29673 * Makefile.in (OBJS): Add vec-perm-indices.o.
29674 * vec-perm-indices.h: New file.
29675 * vec-perm-indices.c: Likewise.
29676 * target.h (vec_perm_indices): Replace with a forward class
29677 declaration.
29678 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29679 * optabs.h: Include vec-perm-indices.h.
29680 (expand_vec_perm): Delete.
29681 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29682 (expand_vec_perm_const): Declare.
29683 * target.def (vec_perm_const_ok): Replace with...
29684 (vec_perm_const): ...this new hook.
29685 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29686 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29687 * doc/tm.texi: Regenerate.
29688 * optabs.def (vec_perm_const): Delete.
29689 * doc/md.texi (vec_perm_const): Likewise.
29690 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29691 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29692 expand_vec_perm for constant permutation vectors. Assert that
29693 the mode of variable permutation vectors is the integer equivalent
29694 of the mode that is being permuted.
29695 * optabs-query.h (selector_fits_mode_p): Declare.
29696 * optabs-query.c: Include vec-perm-indices.h.
29697 (selector_fits_mode_p): New function.
29698 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29699 is defined, instead of checking whether the vec_perm_const_optab
29700 exists. Use targetm.vectorize.vec_perm_const instead of
29701 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29702 fit in the vector mode before using a variable permute.
29703 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29704 vec_perm_indices instead of an rtx.
29705 (expand_vec_perm): Replace with...
29706 (expand_vec_perm_const): ...this new function. Take the selector
29707 as a vec_perm_indices rather than an rtx. Also take the mode of
29708 the selector. Update call to shift_amt_for_vec_perm_mask.
29709 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29710 Use vec_perm_indices::new_expanded_vector to expand the original
29711 selector into bytes. Check whether the indices fit in the vector
29712 mode before using a variable permute.
29713 (expand_vec_perm_var): Make global.
29714 (expand_mult_highpart): Use expand_vec_perm_const.
29715 * fold-const.c: Includes vec-perm-indices.h.
29716 * tree-ssa-forwprop.c: Likewise.
29717 * tree-vect-data-refs.c: Likewise.
29718 * tree-vect-generic.c: Likewise.
29719 * tree-vect-loop.c: Likewise.
29720 * tree-vect-slp.c: Likewise.
29721 * tree-vect-stmts.c: Likewise.
29722 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29723 Delete.
29724 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29725 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29726 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29727 (aarch64_vectorize_vec_perm_const): ...this new function.
29728 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29729 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29730 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29731 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29732 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29733 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29734 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29735 into...
29736 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
29737 check for NEON modes.
29738 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29739 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29740 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29741 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29742 into...
29743 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
29744 the old VEC_PERM_CONST conditions.
29745 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29746 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29747 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29748 (ia64_vectorize_vec_perm_const_ok): Merge into...
29749 (ia64_vectorize_vec_perm_const): ...this new function.
29750 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29751 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29752 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29753 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29754 * config/mips/mips.c (mips_expand_vec_perm_const)
29755 (mips_vectorize_vec_perm_const_ok): Merge into...
29756 (mips_vectorize_vec_perm_const): ...this new function.
29757 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29758 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29759 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29760 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29761 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29762 (rs6000_expand_vec_perm_const): Delete.
29763 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29764 Delete.
29765 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29766 (altivec_expand_vec_perm_const_le): Take each operand individually.
29767 Operate on constant selectors rather than rtxes.
29768 (altivec_expand_vec_perm_const): Likewise. Update call to
29769 altivec_expand_vec_perm_const_le.
29770 (rs6000_expand_vec_perm_const): Delete.
29771 (rs6000_vectorize_vec_perm_const_ok): Delete.
29772 (rs6000_vectorize_vec_perm_const): New function.
29773 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29774 an element count and rtx array.
29775 (rs6000_expand_extract_even): Update call accordingly.
29776 (rs6000_expand_interleave): Likewise.
29777 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29778 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29779 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29780 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29781 (rs6000_expand_vec_perm_const): Delete.
29782 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29783 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29784 (altivec_expand_vec_perm_const_le): Take each operand individually.
29785 Operate on constant selectors rather than rtxes.
29786 (altivec_expand_vec_perm_const): Likewise. Update call to
29787 altivec_expand_vec_perm_const_le.
29788 (rs6000_expand_vec_perm_const): Delete.
29789 (rs6000_vectorize_vec_perm_const_ok): Delete.
29790 (rs6000_vectorize_vec_perm_const): New function. Remove stray
29791 reference to the SPE evmerge intructions.
29792 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29793 an element count and rtx array.
29794 (rs6000_expand_extract_even): Update call accordingly.
29795 (rs6000_expand_interleave): Likewise.
29796 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
29797 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
29798 new function.
29799 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29800
29801 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29802
29803 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
29804 vector mode and that that mode matches the mode of the data
29805 being permuted.
29806 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
29807 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
29808 directly using expand_vec_perm_1 when forcing selectors into
29809 registers.
29810 (expand_vec_perm_var): New function, split out from expand_vec_perm.
29811
29812 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29813
29814 * optabs-query.h (can_vec_perm_p): Delete.
29815 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
29816 * optabs-query.c (can_vec_perm_p): Split into...
29817 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
29818 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
29819 particular selector is valid.
29820 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29821 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29822 (vect_grouped_load_supported): Likewise.
29823 (vect_shift_permute_load_chain): Likewise.
29824 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29825 (vect_transform_slp_perm_load): Likewise.
29826 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29827 (vectorizable_bswap): Likewise.
29828 (vect_gen_perm_mask_checked): Likewise.
29829 * fold-const.c (fold_ternary_loc): Likewise. Don't take
29830 implementations of variable permutation vectors into account
29831 when deciding which selector to use.
29832 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
29833 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
29834 with a false third argument.
29835 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
29836 to test whether the constant selector is valid and can_vec_perm_var_p
29837 to test whether a variable selector is valid.
29838
29839 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29840
29841 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
29842 * optabs-query.c (can_vec_perm_p): Likewise.
29843 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
29844 instead of vec_perm_indices.
29845 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
29846 (vect_gen_perm_mask_checked): Likewise,
29847 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
29848 (vect_gen_perm_mask_checked): Likewise,
29849
29850 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29851
29852 * optabs-query.h (qimode_for_vec_perm): Declare.
29853 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
29854 (qimode_for_vec_perm): ...this new function.
29855 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
29856
29857 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29858
29859 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
29860 does not have a conditional at the top.
29861
29862 2018-01-02 Richard Biener <rguenther@suse.de>
29863
29864 * ipa-inline.c (big_speedup_p): Fix expression.
29865
29866 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29867
29868 PR target/81616
29869 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
29870 for generic 4->6.
29871
29872 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
29873
29874 PR target/81616
29875 Generic tuning.
29876 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
29877 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
29878 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
29879 cond_taken_branch_cost 3->4.
29880
29881 2018-01-01 Jakub Jelinek <jakub@redhat.com>
29882
29883 PR tree-optimization/83581
29884 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
29885 TODO_cleanup_cfg if any changes have been made.
29886
29887 PR middle-end/83608
29888 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
29889 convert_modes if target mode has the right side, but different mode
29890 class.
29891
29892 PR middle-end/83609
29893 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
29894 last argument when extracting from CONCAT. If either from_real or
29895 from_imag is NULL, use expansion through memory. If result is not
29896 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
29897 the parts directly to inner mode, if even that fails, use expansion
29898 through memory.
29899
29900 PR middle-end/83623
29901 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29902 check for bswap in mode rather than HImode and use that in expand_unop
29903 too.
29904 \f
29905 Copyright (C) 2018 Free Software Foundation, Inc.
29906
29907 Copying and distribution of this file, with or without modification,
29908 are permitted in any medium without royalty provided the copyright
29909 notice and this notice are preserved.